Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [SECURITY][PATCHv2] Bump quagga to 0.99.17
From: Peter Korsgaard @ 2010-10-01  8:31 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20100930234735.4ffdc3ea@surf>

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> On Thu, 30 Sep 2010 21:47:42 +0200
 Thomas> Peter Korsgaard <jacmet@uclibc.org> wrote:

 >> Could someone using the external toolchain (Thomas?) give netsnmp a
 >> quick test?

 Thomas> I confirm that since Gustavo converted the package to autotargets, the
 Thomas> previously existing build failures with external toolchain have
 Thomas> disappeared. I just tested with a recent (a few days) Git, and net-snmp
 Thomas> built just fine with an external ARM CodeSourcery toolchain.

 Thomas> Now, I have no idea if it actually works, since I don't know how to
 Thomas> test it. But that's another story :-)

Thanks - Did you also build something using netsnmp
(E.G. BR2_PACKAGE_QUAGGA_SNMP)? The problem was afaik dependent packages
not finding netsnmp.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] libpng install question
From: Lionel Landwerlin @ 2010-10-01  8:14 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <0D753D10438DA54287A00B0270842697644545753B@AUSP01VMBX24.collaborationhost.net>

Hello,

libpng12-config and libpng-config are part of the libpng package, so
it is normal they are being installed on the target. However they
shouldn't be installed unless you've selected to installed development
files in the buildroot config.
This might be a small regression introduced by this commit :
http://git.buildroot.org/buildroot/commit/?id=55ade5c7964e15f9b1eba061ab840cc4c25e4e37
Are you using a recent version of the buildroot's git repository ?

--
Lionel Landwerlin

On Fri, Oct 1, 2010 at 2:51 AM, H Hartley Sweeten
<hartleys@visionengravers.com> wrote:
> Hello all,
>
> I was wondering why libpng12-config and libpng-config are installed to the target.
> I thought these were host tools?
>
> Regards,
> Hartley
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>

^ permalink raw reply

* [Buildroot] CONFIG_BLK_DEV_INITRD deactivated on automatic build
From: Dennis Borgmann @ 2010-10-01  7:30 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20100930194624.62fdea0e@surf>

Thomas,

thank you!

Thomas Petazzoni schrieb:
> Hello Dennis,
>
> On Thu, 30 Sep 2010 13:23:46 +0200
> Dennis Borgmann <dennis.borgmann@googlemail.com> wrote:
>
>   
>> First of all - thank you for the work done for this project. It is
>> awesome and I really like it. Straightforward and quick to use.
>>
>> I think, I found a bug. If you download buildroot and start
>> configuring your project with "make menuconfig" and after that
>> configure the kernel with "make linux26-menuconfig", everything seems
>> to be ok. I did give it a custom kernel-config named
>> "/tmp/config-2.6.34".
>>
>> After running "make", everything seems to be ok, but the resulting
>> kernel does not contain the option "CONFIG_BLK_DEV_INITRD". I need to
>> manually do a "make linux26-menuconfig" again and rebuild the kernel
>> for the resulting kernel to contain this option.
>>
>> This was a really silly thing to find, took me around one week,
>> because you wouldn't think of such a mistake. Could it be, that this
>> is a bug? I am using buildroot-2010.08.
>>     
>
> Yes, it was a bug. When "initramfs" isn't used as the target filesystem
> format, we forcefully disabled the CONFIG_BLK_DEV_INITRD option. This
> has been fixed post-2010.08, by the following commit:
>
>  http://git.buildroot.net/buildroot/commit/?id=ee3f319249e146d92b093ad8c45a3a908d44236f
>
> So you can either apply this patch on top of 2010.08, or use the latest
> Buildroot git. We unfortunately do not maintain "stabilized" versions
> of Buildroot (such as 2010.08.x) for the moment.
>
> Regards,
>
> Thomas
>   

^ permalink raw reply

* [Buildroot] [PATCH 3/3] l2tp: convert to gentargets and change to xl2tp
From: Martin Banky @ 2010-10-01  6:32 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285914753-22744-1-git-send-email-Martin.Banky@gmail.com>

l2tp is no longer being developed, and xl2tpd is forked from l2tpd and is
maintained by Xelerance Corporation.

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/Config.in                              |    2 +-
 package/l2tp/Config.in                         |    7 ---
 package/l2tp/l2tp-legacy.patch                 |   14 ------
 package/l2tp/l2tp-no-gnu-extensions.patch      |   33 -------------
 package/l2tp/l2tp-sanity.patch                 |   49 -------------------
 package/l2tp/l2tp.mk                           |   60 ------------------------
 package/l2tp/l2tpd                             |   27 -----------
 package/xl2tp/Config.in                        |   11 ++++
 package/xl2tp/xl2tp-1.2.7-legacy.patch         |   14 ++++++
 package/xl2tp/xl2tp-1.2.7-makefile-flags.patch |   30 ++++++++++++
 package/xl2tp/xl2tp.mk                         |   33 +++++++++++++
 package/xl2tp/xl2tpd                           |   27 +++++++++++
 12 files changed, 116 insertions(+), 191 deletions(-)
 delete mode 100644 package/l2tp/Config.in
 delete mode 100644 package/l2tp/l2tp-legacy.patch
 delete mode 100644 package/l2tp/l2tp-no-gnu-extensions.patch
 delete mode 100644 package/l2tp/l2tp-sanity.patch
 delete mode 100644 package/l2tp/l2tp.mk
 delete mode 100755 package/l2tp/l2tpd
 create mode 100644 package/xl2tp/Config.in
 create mode 100644 package/xl2tp/xl2tp-1.2.7-legacy.patch
 create mode 100644 package/xl2tp/xl2tp-1.2.7-makefile-flags.patch
 create mode 100644 package/xl2tp/xl2tp.mk
 create mode 100755 package/xl2tp/xl2tpd

diff --git a/package/Config.in b/package/Config.in
index 7a38e7d..94d330c 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -370,7 +370,7 @@ source "package/ipsec-tools/Config.in"
 source "package/iptables/Config.in"
 source "package/iw/Config.in"
 source "package/kismet/Config.in"
-source "package/l2tp/Config.in"
+source "package/xl2tp/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/lighttpd/Config.in"
 endif
diff --git a/package/l2tp/Config.in b/package/l2tp/Config.in
deleted file mode 100644
index da4f589..0000000
--- a/package/l2tp/Config.in
+++ /dev/null
@@ -1,7 +0,0 @@
-config BR2_PACKAGE_L2TP
-	bool "l2tp"
-	help
-	  Layer 2 Tunnelling Protocol (RFC2661).
-
-	  http://sourceforge.net/projects/l2tpd/
-
diff --git a/package/l2tp/l2tp-legacy.patch b/package/l2tp/l2tp-legacy.patch
deleted file mode 100644
index 39506d8..0000000
--- a/package/l2tp/l2tp-legacy.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- l2tpd-0.70-pre20031121.oorig/osport.h	2004-07-08 22:47:52.000000000 +0200
-+++ l2tpd-0.70-pre20031121/osport.h	2006-12-28 15:32:50.000000000 +0100
-@@ -37,4 +37,11 @@
- 
- #endif /* defined(SOLARIS) */
- 
-+#if defined __UCLIBC__ && !defined UCLIBC_SUSV3_LEGACY_MACROS
-+# define index(x, y)        strchr(x, y)
-+# define bcopy(S1, S2, LEN) ((void)memmove(S2, S1, LEN))
-+# define bzero(S1, LEN)     ((void)memset(S1,  0, LEN))
-+# define bcmp(S1,S2,LEN)    ((memcmp(S2, S1, LEN)==0)?0:1)
-+#endif /* defined __UCLIBC__ && !defined UCLIBC_SUSV3_LEGACY_MACROS */
-+
- #endif /* _OSPORT_H_ */
diff --git a/package/l2tp/l2tp-no-gnu-extensions.patch b/package/l2tp/l2tp-no-gnu-extensions.patch
deleted file mode 100644
index ef07e26..0000000
--- a/package/l2tp/l2tp-no-gnu-extensions.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- l2tpd-0.70-pre20031121.oorig/avpsend.c	2006-12-28 16:00:26.000000000 +0100
-+++ l2tpd-0.70-pre20031121/avpsend.c	2006-12-28 16:21:06.000000000 +0100
-@@ -98,19 +98,26 @@ int add_hostname_avp(struct buffer *buf,
- 	int sz = 0;
- 	if(t->lac && t->lac->hostname[0]) {
- 		strncpy(n,t->lac->hostname, sizeof(n));
--		sz = strnlen(t->lac->hostname, sizeof(t->lac->hostname));
-+		sz = strlen(t->lac->hostname);
-+		if (sz > sizeof(t->lac->hostname))
-+			sz = sizeof(t->lac->hostname);
- 	}
- 	else if(t->lns && t->lns->hostname[0]) {
- 		strncpy(n,t->lns->hostname, sizeof(n));
--		sz = strnlen(t->lns->hostname, sizeof(t->lns->hostname));
-+		sz = strlen(t->lns->hostname);
-+		if (sz > sizeof(t->lns->hostname))
-+			sz = sizeof(t->lns->hostname);
- 	}
- 	else {
- 		if(gethostname(n, STRLEN)) {
- 			strcpy(n,"eriwan");
- 			sz = 6;
- 		}
--		else
--			sz = strnlen(n, sizeof(n));
-+		else {
-+			sz = strlen(n);
-+			if (sz > sizeof(n))
-+				sz = sizeof(n);
-+		}
- 	}
- 	if(add_avp(buf, HOSTNAME_AVP, n, sz, 1))
- 		return 1;
diff --git a/package/l2tp/l2tp-sanity.patch b/package/l2tp/l2tp-sanity.patch
deleted file mode 100644
index 1d0533d..0000000
--- a/package/l2tp/l2tp-sanity.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff -rdup l2tpd-0.70-pre20031121.oorig/avp.c l2tpd-0.70-pre20031121/avp.c
---- l2tpd-0.70-pre20031121.oorig/avp.c	2006-12-28 16:00:26.000000000 +0100
-+++ l2tpd-0.70-pre20031121/avp.c	2006-12-28 16:06:43.000000000 +0100
-@@ -146,6 +146,7 @@ int validate_msgtype_avp(int attr,  stru
- 	u_int8_t *p = data + sizeof(struct avp_hdr);
- 	c->msgtype = get16(p);
- 
-+#ifdef SANITY
-     if (t->sanity)
-     {
-         /*
-@@ -293,6 +294,7 @@ int validate_msgtype_avp(int attr,  stru
-             return -EINVAL;
-         }
-     }
-+#endif
- 	return 0;
- }
- 
-@@ -301,7 +303,7 @@ int validate_gen_avp(int attr,  struct t
- 					 void *data, int datalen) {
- 	(void)data; (void)datalen;
- 	int i = 0, found = 0;
--
-+#ifdef SANITY
-     if(t->sanity) {
- 		for(i = 0; i < 8; i++) {
- 			if(c->msgtype == avps[attr].allowed_states[i])
-@@ -310,6 +312,7 @@ int validate_gen_avp(int attr,  struct t
- 		if(!found) 
- 			return -EINVAL;
- 	}
-+#endif
- 	return 0;
- }
- 
-diff -rdup l2tpd-0.70-pre20031121.oorig/l2tpd.c l2tpd-0.70-pre20031121/l2tpd.c
---- l2tpd-0.70-pre20031121.oorig/l2tpd.c	2006-12-28 16:00:26.000000000 +0100
-+++ l2tpd-0.70-pre20031121/l2tpd.c	2006-12-28 16:04:15.000000000 +0100
-@@ -748,7 +748,9 @@ struct tunnel *new_tunnel ()
-     tmp->peer.sin_family = AF_INET;
-     tmp->peer.sin_port = 0;
-     bzero (&(tmp->peer.sin_addr), sizeof (tmp->peer.sin_addr));
-+#ifdef SANITY
-     tmp->sanity = -1;
-+#endif
-     tmp->qtid = -1;
-     tmp->ourfc = ASYNC_FRAMING | SYNC_FRAMING;
-     tmp->ourbc = 0;
diff --git a/package/l2tp/l2tp.mk b/package/l2tp/l2tp.mk
deleted file mode 100644
index e8b4c79..0000000
--- a/package/l2tp/l2tp.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-#############################################################
-#
-# l2tp
-#
-#############################################################
-L2TP_VERSION:=0.70-pre20031121
-L2TP_SOURCE:=l2tpd_$(L2TP_VERSION).orig.tar.gz
-L2TP_PATCH:=l2tpd_$(L2TP_VERSION)-2.2.diff.gz
-L2TP_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/l/l2tpd/
-L2TP_DIR:=$(BUILD_DIR)/l2tpd-$(L2TP_VERSION)
-L2TP_CAT:=$(ZCAT)
-L2TP_BINARY:=l2tpd
-L2TP_TARGET_BINARY:=usr/sbin/l2tpd
-
-$(DL_DIR)/$(L2TP_SOURCE):
-	$(call DOWNLOAD,$(L2TP_SITE),$(L2TP_SOURCE))
-
-$(DL_DIR)/$(L2TP_PATCH):
-	$(call DOWNLOAD,$(L2TP_SITE),$(L2TP_PATCH))
-
-l2tp-source: $(DL_DIR)/$(L2TP_SOURCE) $(DL_DIR)/$(L2TP_PATCH)
-
-$(L2TP_DIR)/.unpacked: $(DL_DIR)/$(L2TP_SOURCE) $(DL_DIR)/$(L2TP_PATCH)
-	$(L2TP_CAT) $(DL_DIR)/$(L2TP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	-mv -f $(L2TP_DIR).orig $(L2TP_DIR)
-ifneq ($(L2TP_PATCH),)
-	(cd $(L2TP_DIR) && $(L2TP_CAT) $(DL_DIR)/$(L2TP_PATCH) | patch -p1)
-	if [ -d $(L2TP_DIR)/debian/patches ]; then \
-		toolchain/patch-kernel.sh $(L2TP_DIR) $(L2TP_DIR)/debian/patches \*.patch; \
-	fi
-endif
-	toolchain/patch-kernel.sh $(L2TP_DIR) package/l2tp/ l2tp\*.patch
-	touch $(L2TP_DIR)/.unpacked
-
-$(L2TP_DIR)/$(L2TP_BINARY): $(L2TP_DIR)/.unpacked
-	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(L2TP_DIR) \
-		DFLAGS= \
-		OSFLAGS="-DLINUX -UUSE_KERNEL $(TARGET_CFLAGS) -USANITY"
-
-$(TARGET_DIR)/$(L2TP_TARGET_BINARY): $(L2TP_DIR)/$(L2TP_BINARY)
-	cp -dpf $(L2TP_DIR)/$(L2TP_BINARY) $@
-	cp -dpf package/l2tp/l2tpd $(TARGET_DIR)/etc/init.d/
-	$(STRIPCMD) $@
-
-l2tp: $(TARGET_DIR)/$(L2TP_TARGET_BINARY)
-
-l2tp-clean:
-	-$(MAKE) -C $(L2TP_DIR) clean
-	rm -f $(TARGET_DIR)/$(L2TP_TARGET_BINARY)
-
-l2tp-dirclean:
-	rm -rf $(L2TP_DIR)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_L2TP),y)
-TARGETS+=l2tp
-endif
diff --git a/package/l2tp/l2tpd b/package/l2tp/l2tpd
deleted file mode 100755
index 8bed72d..0000000
--- a/package/l2tp/l2tpd
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-DAEMON=/usr/sbin/l2tpd
-PIDFILE=/var/run/l2tpd.pid
-
-test -f $DAEMON || exit 0
-
-case "$1" in
-  start)
-    start-stop-daemon -S  -p $PIDFILE -x $DAEMON -- -D &
-    ;;
-  stop)
-    start-stop-daemon -K  -p $PIDFILE -x $DAEMON
-    ;;
-  restart|force-reload)
-    start-stop-daemon -K  -p $PIDFILE -x $DAEMON 
-    sleep 1
-    start-stop-daemon -S  -p $PIDFILE -x $DAEMON
-    ;;
-  *)
-    echo "Usage: /etc/init.d/l2tdp {start|stop|restart|force-reload}"
-    exit 1
-    ;;
-esac
-
-exit 0
diff --git a/package/xl2tp/Config.in b/package/xl2tp/Config.in
new file mode 100644
index 0000000..8f9d9b1
--- /dev/null
+++ b/package/xl2tp/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_XL2TP
+	bool "xl2tp"
+	select BR2_PACKAGE_LIBPCAP
+	help
+	  Layer 2 Tunnelling Protocol (RFC2661).
+
+	  xl2tpd is an open source implementation of the L2TP tunneling
+	  protocol. xl2tpd is forked from l2tpd and is maintained by
+	  Xelerance Corporation.
+
+	  http://www.xelerance.com/software/xl2tpd/
diff --git a/package/xl2tp/xl2tp-1.2.7-legacy.patch b/package/xl2tp/xl2tp-1.2.7-legacy.patch
new file mode 100644
index 0000000..39506d8
--- /dev/null
+++ b/package/xl2tp/xl2tp-1.2.7-legacy.patch
@@ -0,0 +1,14 @@
+--- l2tpd-0.70-pre20031121.oorig/osport.h	2004-07-08 22:47:52.000000000 +0200
++++ l2tpd-0.70-pre20031121/osport.h	2006-12-28 15:32:50.000000000 +0100
+@@ -37,4 +37,11 @@
+ 
+ #endif /* defined(SOLARIS) */
+ 
++#if defined __UCLIBC__ && !defined UCLIBC_SUSV3_LEGACY_MACROS
++# define index(x, y)        strchr(x, y)
++# define bcopy(S1, S2, LEN) ((void)memmove(S2, S1, LEN))
++# define bzero(S1, LEN)     ((void)memset(S1,  0, LEN))
++# define bcmp(S1,S2,LEN)    ((memcmp(S2, S1, LEN)==0)?0:1)
++#endif /* defined __UCLIBC__ && !defined UCLIBC_SUSV3_LEGACY_MACROS */
++
+ #endif /* _OSPORT_H_ */
diff --git a/package/xl2tp/xl2tp-1.2.7-makefile-flags.patch b/package/xl2tp/xl2tp-1.2.7-makefile-flags.patch
new file mode 100644
index 0000000..26ca592
--- /dev/null
+++ b/package/xl2tp/xl2tp-1.2.7-makefile-flags.patch
@@ -0,0 +1,30 @@
+--- xl2tp-1.2.7/Makefile-orig	2010-08-05 15:33:46.000000000 -0700
++++ xl2tp-1.2.7/Makefile	2010-09-30 22:34:54.000000000 -0700
+@@ -90,7 +90,7 @@ OSFLAGS?= -DLINUX -I$(KERNELSRC)/include
+ 
+ IPFLAGS?= -DIP_ALLOCATION
+ 
+-CFLAGS+= $(DFLAGS) -O2 -fno-builtin -Wall -DSANITY $(OSFLAGS) $(IPFLAGS)
++COMPILE_FLAGS+= $(DFLAGS) -fno-builtin -Wall -DSANITY $(OSFLAGS) $(IPFLAGS)
+ HDRS=l2tp.h avp.h misc.h control.h call.h scheduler.h file.h aaa.h md5.h
+ OBJS=xl2tpd.o pty.o misc.o control.o avp.o call.o network.o avpsend.o scheduler.o file.o aaa.o md5.o
+ SRCS=${OBJS:.o=.c} ${HDRS}
+@@ -105,6 +105,9 @@ MANDIR?=$(DESTDIR)${PREFIX}/share/man
+ 
+ all: $(EXEC) pfc
+ 
++%.o: %.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o $@ -shared $<
++
+ clean:
+ 	rm -f $(OBJS) $(EXEC) pfc.o pfc
+ 
+@@ -112,7 +115,7 @@ $(EXEC): $(OBJS) $(HDRS)
+ 	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
+ 
+ pfc:
+-	$(CC) $(CFLAGS) -c contrib/pfc.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c contrib/pfc.c
+ 	$(CC) $(LDFLAGS) -lpcap $(LDLIBS) -o pfc pfc.o
+ 
+ romfs:
diff --git a/package/xl2tp/xl2tp.mk b/package/xl2tp/xl2tp.mk
new file mode 100644
index 0000000..1cbd760
--- /dev/null
+++ b/package/xl2tp/xl2tp.mk
@@ -0,0 +1,33 @@
+#############################################################
+#
+# xl2tp
+#
+#############################################################
+XL2TP_VERSION = 1.2.7
+XL2TP_SOURCE = xl2tpd-$(XL2TP_VERSION).tar.gz
+XL2TP_SITE = ftp://ftp.xelerance.com/xl2tpd/
+
+XL2TP_DEPENDENCIES = pppd libpcap
+
+define XL2TP_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D)
+endef
+
+define XL2TP_INSTALL_TARGET_CMDS
+	$(MAKE) DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D) install
+endef
+
+define XL2TP_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/usr/bin/pfc
+	rm -f $(TARGET_DIR)/usr/sbin/xl2tpd
+	rm -f $(TARGET_DIR)/usr/share/man/man1/pfc.1
+	rm -f $(TARGET_DIR)/usr/share/man/man8/xl2tpd.8
+	rm -f $(TARGET_DIR)/usr/share/man/man5/xl2tpd.conf.5
+	rm -f $(TARGET_DIR)/usr/share/man/man5/l2tp-secrets.5
+endef
+
+define XL2TP_CLEAN_CMDS
+	-$(MAKE) -C $(@D) clean
+endef
+
+$(eval $(call GENTARGETS,package,xl2tp))
diff --git a/package/xl2tp/xl2tpd b/package/xl2tp/xl2tpd
new file mode 100755
index 0000000..36c12a2
--- /dev/null
+++ b/package/xl2tp/xl2tpd
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/usr/sbin/xl2tpd
+PIDFILE=/var/run/xl2tpd.pid
+
+test -f $DAEMON || exit 0
+
+case "$1" in
+  start)
+    start-stop-daemon -S  -p $PIDFILE -x $DAEMON -- -D &
+    ;;
+  stop)
+    start-stop-daemon -K  -p $PIDFILE -x $DAEMON
+    ;;
+  restart|force-reload)
+    start-stop-daemon -K  -p $PIDFILE -x $DAEMON 
+    sleep 1
+    start-stop-daemon -S  -p $PIDFILE -x $DAEMON
+    ;;
+  *)
+    echo "Usage: /etc/init.d/xl2tdp {start|stop|restart|force-reload}"
+    exit 1
+    ;;
+esac
+
+exit 0
-- 
1.7.3

^ permalink raw reply related

* [Buildroot] [PATCH 2/3] pppd: convert to gentargets
From: Martin Banky @ 2010-10-01  6:32 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285914753-22744-1-git-send-email-Martin.Banky@gmail.com>

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/pppd/pppd-2.4.5-define-aligned_u64.patch |   13 +
 package/pppd/pppd-2.4.5-makefile-flags.patch     |  403 ++++++++++++++++++++++
 package/pppd/pppd-2.4.5-man-dir.patch            |   31 ++
 package/pppd/pppd-2.4.5-pppol2tp.patch           |   34 ++
 package/pppd/pppd.mk                             |  107 ++++---
 5 files changed, 540 insertions(+), 48 deletions(-)
 create mode 100644 package/pppd/pppd-2.4.5-define-aligned_u64.patch
 create mode 100644 package/pppd/pppd-2.4.5-makefile-flags.patch
 create mode 100644 package/pppd/pppd-2.4.5-man-dir.patch
 create mode 100644 package/pppd/pppd-2.4.5-pppol2tp.patch

diff --git a/package/pppd/pppd-2.4.5-define-aligned_u64.patch b/package/pppd/pppd-2.4.5-define-aligned_u64.patch
new file mode 100644
index 0000000..7eb0ad1
--- /dev/null
+++ b/package/pppd/pppd-2.4.5-define-aligned_u64.patch
@@ -0,0 +1,13 @@
+Define aligned_u64, because it is not defined in the linux headers.
+--- a/pppd/sys-linux.c	2010-09-26 23:23:05.000000000 -0700
++++ b/pppd/sys-linux.c	2010-09-26 23:24:51.000000000 -0700
+@@ -118,6 +118,10 @@
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ 
++#ifndef aligned_u64
++#define aligned_u64 unsigned long long __attribute__((aligned(8)))
++#endif
++ 
+ #include <linux/ppp_defs.h>
+ #include <linux/if_ppp.h>
diff --git a/package/pppd/pppd-2.4.5-makefile-flags.patch b/package/pppd/pppd-2.4.5-makefile-flags.patch
new file mode 100644
index 0000000..9fb457d
--- /dev/null
+++ b/package/pppd/pppd-2.4.5-makefile-flags.patch
@@ -0,0 +1,403 @@
+Preserve the settings that we need, because buildroot clobbers
+the cflag settings in the various makefiles in pppd.
+--- a/chat/Makefile.linux	2009-11-16 15:26:07.000000000 -0700
++++ b/chat/Makefile.linux	2010-09-30 17:53:31.000000000 -0700
+@@ -21,7 +21,7 @@ chat:	chat.o
+ 	$(CC) -o chat chat.o
+ 
+ chat.o:	chat.c
+-	$(CC) -c $(CFLAGS) -o chat.o chat.c
++	$(CC) -c $(CDEFS) $(CFLAGS) -o chat.o chat.c
+ 
+ install: chat
+ 	mkdir -p $(BINDIR) $(MANDIR)
+
+--- a/pppd/Makefile.linux	2010-09-30 17:46:46.000000000 -0700
++++ b/pppd/Makefile.linux	2010-09-30 17:53:28.000000000 -0700
+@@ -77,26 +77,24 @@ MAXOCTETS=y
+ 
+ INCLUDE_DIRS= -I../include
+ 
+-COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP
+-
+-CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"'
++COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP -I../include '-DDESTDIR="@DESTDIR@"'
+ 
+ ifdef CHAPMS
+-CFLAGS   += -DCHAPMS=1
++COMPILE_FLAGS   += -DCHAPMS=1
+ NEEDDES=y
+ PPPDOBJS += md4.o chap_ms.o
+ HEADERS	+= md4.h chap_ms.h
+ ifdef MSLANMAN
+-CFLAGS   += -DMSLANMAN=1
++COMPILE_FLAGS   += -DMSLANMAN=1
+ endif
+ ifdef MPPE
+-CFLAGS   += -DMPPE=1
++COMPILE_FLAGS   += -DMPPE=1
+ endif
+ endif
+ 
+ # EAP SRP-SHA1
+ ifdef USE_SRP
+-CFLAGS	+= -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
++COMPILE_FLAGS	+= -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
+ LIBS	+= -lsrp -L/usr/local/ssl/lib -lcrypto
+ TARGETS	+= srp-entry
+ EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
+@@ -113,12 +111,12 @@ PPPDOBJS += sha1.o
+ endif
+ 
+ ifdef HAS_SHADOW
+-CFLAGS   += -DHAS_SHADOW
++COMPILE_FLAGS   += -DHAS_SHADOW
+ #LIBS     += -lshadow $(LIBS)
+ endif
+ 
+ ifneq ($(wildcard /usr/include/crypt.h),)
+-CFLAGS  += -DHAVE_CRYPT_H=1
++COMPILE_FLAGS  += -DHAVE_CRYPT_H=1
+ LIBS	+= -lcrypt
+ endif
+ 
+@@ -126,7 +124,7 @@ ifdef NEEDDES
+ ifndef USE_CRYPT
+ LIBS     += -ldes $(LIBS)
+ else
+-CFLAGS   += -DUSE_CRYPT=1
++COMPILE_FLAGS   += -DUSE_CRYPT=1
+ endif
+ PPPDOBJS += pppcrypt.o
+ HEADERS += pppcrypt.h
+@@ -134,7 +132,7 @@ endif
+ 
+ # For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.
+ ifdef USE_PAM
+-CFLAGS   += -DUSE_PAM
++COMPILE_FLAGS   += -DUSE_PAM
+ LIBS     += -lpam -ldl
+ endif
+ 
+@@ -143,14 +141,14 @@ ifdef HAVE_MULTILINK
+ 	# Multilink implies the use of TDB
+ 	USE_TDB=y
+ 
+-	CFLAGS += -DHAVE_MULTILINK
++	COMPILE_FLAGS += -DHAVE_MULTILINK
+ 	PPPDSRCS += multilink.c
+ 	PPPDOBJS += multilink.o
+ endif
+ 
+ # TDB
+ ifdef USE_TDB
+-	CFLAGS += -DUSE_TDB=1
++	COMPILE_FLAGS += -DUSE_TDB=1
+ 	PPPDSRCS += tdb.c spinlock.c
+ 	PPPDOBJS += tdb.o spinlock.o
+ 	HEADERS += tdb.h spinlock.h
+@@ -159,11 +157,11 @@ endif
+ # Lock library binary for Linux is included in 'linux' subdirectory.
+ ifdef LOCKLIB
+ LIBS     += -llock
+-CFLAGS   += -DLOCKLIB=1
++COMPILE_FLAGS   += -DLOCKLIB=1
+ endif
+ 
+ ifdef PLUGIN
+-CFLAGS	+= -DPLUGIN
++COMPILE_FLAGS	+= -DPLUGIN
+ LDFLAGS	+= -Wl,-E
+ LIBS	+= -ldl
+ endif
+@@ -171,7 +169,7 @@ endif
+ ifdef FILTER
+ ifneq ($(wildcard /usr/include/pcap-bpf.h),)
+ LIBS    += -lpcap
+-CFLAGS  += -DPPP_FILTER
++COMPILE_FLAGS  += -DPPP_FILTER
+ endif
+ endif
+ 
+@@ -179,24 +177,27 @@ ifdef HAVE_INET6
+      PPPDSRCS += ipv6cp.c eui64.c
+      HEADERS  += ipv6cp.h eui64.h
+      PPPDOBJS += ipv6cp.o eui64.o
+-     CFLAGS   += -DINET6=1
++     COMPILE_FLAGS   += -DINET6=1
+ endif
+ 
+ ifdef CBCP
+      PPPDSRCS += cbcp.c
+      PPPDOBJS += cbcp.o
+-     CFLAGS += -DCBCP_SUPPORT
++     COMPILE_FLAGS += -DCBCP_SUPPORT
+      HEADERS += cbcp.h
+ endif
+ 
+ ifdef MAXOCTETS
+-     CFLAGS += -DMAXOCTETS
++     COMPILE_FLAGS += -DMAXOCTETS
+ endif
+ 
+ INSTALL= install
+ 
+ all: $(TARGETS)
+ 
++%.o: %.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o $@ -shared $<
++
+ install: pppd
+ 	mkdir -p $(BINDIR) $(MANDIR)
+ 	$(EXTRAINSTALL)
+@@ -206,10 +207,10 @@ install: pppd
+ 	$(INSTALL) -c -m 444 pppd.8 $(MANDIR)
+ 
+ pppd: $(PPPDOBJS)
+-	$(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
+ 
+ srp-entry:	srp-entry.c
+-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
+ 
+ install-devel:
+ 	mkdir -p $(INCDIR)/pppd
+@@ -219,4 +220,4 @@ clean:
+ 	rm -f $(PPPDOBJS) $(EXTRACLEAN) $(TARGETS) *~ #* core
+ 
+ depend:
+-	$(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend
++	$(CPP) -M $(COMPILE_FLAGS) $(CFLAGS) $(PPPDSRCS) >.depend
+
+--- a/pppd/plugins/Makefile.linux	2009-11-16 15:26:07.000000000 -0700
++++ b/pppd/plugins/Makefile.linux	2010-09-30 17:59:16.000000000 -0700
+@@ -1,7 +1,7 @@
+ #CC	= gcc
+ COPTS	= -O2 -g
+-CFLAGS	= $(COPTS) -I.. -I../../include -fPIC
+-LDFLAGS	= -shared
++COMPILE_FLAGS	= -I.. -I../../include -fPIC
++LINK_FLAGS	= -shared
+ INSTALL	= install
+ 
+ DESTDIR = $(INSTROOT)@DESTDIR@
+@@ -23,7 +23,7 @@ all:	$(PLUGINS)
+ 	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done
+ 
+ %.so: %.c
+-	$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
++	$(CC) -o $@ $(LINK_FLAGS) $(COMPILE_FLAGS) $(CFLAGS) $^
+ 
+ VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)
+ 
+@@ -37,5 +37,5 @@ clean:
+ 	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d clean; done
+ 
+ depend:
+-	$(CPP) -M $(CFLAGS) *.c >.depend
++	$(CPP) -M $(COMPILE_FLAGS) $(CFLAGS) *.c >.depend
+ 	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d depend; done
+
+--- a/pppd/plugins/pppoatm/Makefile.linux	2009-11-16 15:26:07.000000000 -0700
++++ b/pppd/plugins/pppoatm/Makefile.linux	2010-09-30 17:59:16.000000000 -0700
+@@ -1,6 +1,6 @@
+ #CC	= gcc
+ COPTS	= -O2 -g
+-CFLAGS	= $(COPTS) -I../.. -I../../../include -fPIC
++COMPILE_FLAGS	= -I../.. -I../../../include -fPIC
+ LDFLAGS	= -shared
+ INSTALL	= install
+ 
+@@ -24,7 +24,7 @@ PLUGIN_OBJS := pppoatm.o
+ ifdef HAVE_LIBATM
+ LIBS := -latm
+ else
+-CFLAGS += -I.
++COMPILE_FLAGS += -I.
+ PLUGIN_OBJS += text2qos.o text2atm.o misc.o ans.o
+ LIBS := -lresolv
+ endif
+@@ -33,7 +33,7 @@ endif
+ all: $(PLUGIN)
+ 
+ $(PLUGIN): $(PLUGIN_OBJS)
+-	$(CC) $(CFLAGS) -o $@ -shared $^ $(LIBS)
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -o $@ -shared $^ $(LIBS)
+ 
+ install: all
+ 	$(INSTALL) -d -m 755 $(LIBDIR)
+@@ -43,4 +43,4 @@ clean:
+ 	rm -f *.o *.so
+ 
+ %.o: %.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o $@ -shared $<
+
+--- a/pppd/plugins/pppol2tp/Makefile.linux	2009-11-16 15:26:07.000000000 -0700
++++ b/pppd/plugins/pppol2tp/Makefile.linux	2010-09-30 17:59:16.000000000 -0700
+@@ -1,6 +1,6 @@
+ #CC	= gcc
+ COPTS	= -O2 -g
+-CFLAGS	= $(COPTS) -I. -I../.. -I../../../include -fPIC
++COMPILE_FLAGS	= -I. -I../.. -I../../../include -fPIC
+ LDFLAGS	= -shared
+ INSTALL	= install
+ 
+@@ -16,7 +16,7 @@ PLUGINS := pppol2tp.so openl2tp.so
+ all: $(PLUGINS)
+ 
+ %.so: %.o
+-	$(CC) $(CFLAGS) -o $@ -shared $^ $(LIBS)
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -o $@ -shared $^ $(LIBS)
+ 
+ install: all
+ 	$(INSTALL) -d -m 755 $(LIBDIR)
+@@ -26,4 +26,4 @@ clean:
+ 	rm -f *.o *.so
+ 
+ %.o: %.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o $@ $<
+
+--- a/pppd/plugins/radius/Makefile.linux	2009-11-16 15:26:07.000000000 -0700
++++ b/pppd/plugins/radius/Makefile.linux	2010-09-30 18:29:31.000000000 -0700
+@@ -12,7 +12,7 @@ VERSION = $(shell awk -F '"' '/VERSION/
+ INSTALL	= install
+ 
+ PLUGIN=radius.so radattr.so radrealms.so
+-CFLAGS=-I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
++COMPILE_FLAGS = -I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
+ 
+ # Uncomment the next line to include support for Microsoft's
+ # MS-CHAP authentication protocol.
+@@ -23,17 +23,20 @@ MPPE=y
+ MAXOCTETS=y
+ 
+ ifdef CHAPMS
+-CFLAGS += -DCHAPMS=1
++COMPILE_FLAGS += -DCHAPMS=1
+ ifdef MPPE
+-CFLAGS += -DMPPE=1
++COMPILE_FLAGS += -DMPPE=1
+ endif
+ endif
+ ifdef MAXOCTETS
+-CFLAGS += -DMAXOCTETS=1
++COMPILE_FLAGS += -DMAXOCTETS=1
+ endif
+ 
+ all: $(PLUGIN)
+ 
++%.o: %.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o $@ -shared $<
++
+ install: all
+ 	$(INSTALL) -d -m 755 $(LIBDIR)
+ 	$(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
+@@ -43,13 +46,13 @@ install: all
+ 	$(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
+ 
+ radius.so: radius.o libradiusclient.a
+-	$(CC) -o radius.so -shared radius.o libradiusclient.a
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -o radius.so -shared radius.o libradiusclient.a
+ 
+ radattr.so: radattr.o
+-	$(CC) -o radattr.so -shared radattr.o
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -o radattr.so -shared radattr.o
+ 
+ radrealms.so: radrealms.o
+-	$(CC) -o radrealms.so -shared radrealms.o
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -o radrealms.so -shared radrealms.o
+ 
+ CLIENTOBJS = avpair.o buildreq.o config.o dict.o ip_util.o \
+ 	clientid.o sendserver.o lock.o util.o md5.o
+
+--- a/pppd/plugins/rp-pppoe/Makefile.linux	2009-11-16 15:26:07.000000000 -0700
++++ b/pppd/plugins/rp-pppoe/Makefile.linux	2010-09-30 17:59:16.000000000 -0700
+@@ -26,20 +26,20 @@ INSTALL	= install
+ RP_VERSION=3.8p
+ 
+ COPTS=-O2 -g
+-CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
++COMPILE_FLAGS= -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
+ all: rp-pppoe.so pppoe-discovery
+ 
+ pppoe-discovery: pppoe-discovery.o debug.o
+-	$(CC) -o pppoe-discovery pppoe-discovery.o debug.o
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -o pppoe-discovery pppoe-discovery.o debug.o
+ 
+ pppoe-discovery.o: pppoe-discovery.c
+-	$(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
+ 
+ debug.o: debug.c
+-	$(CC) $(CFLAGS) -c -o debug.o debug.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o debug.o debug.c
+ 
+ rp-pppoe.so: plugin.o discovery.o if.o common.o
+-	$(CC) -o rp-pppoe.so -shared plugin.o discovery.o if.o common.o
++	$(CC) $(COMPILE_FLAGS) -o rp-pppoe.so -shared plugin.o discovery.o if.o common.o
+ 
+ install: all
+ 	$(INSTALL) -d -m 755 $(LIBDIR)
+@@ -51,14 +51,14 @@ clean:
+ 	rm -f *.o *.so pppoe-discovery
+ 
+ plugin.o: plugin.c
+-	$(CC) $(CFLAGS) -I../../.. -c -o plugin.o -fPIC plugin.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -I../../.. -c -o plugin.o -fPIC plugin.c
+ 
+ discovery.o: discovery.c
+-	$(CC) $(CFLAGS) -I../../.. -c -o discovery.o -fPIC discovery.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -I../../.. -c -o discovery.o -fPIC discovery.c
+ 
+ if.o: if.c
+-	$(CC) $(CFLAGS) -I../../.. -c -o if.o -fPIC if.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -I../../.. -c -o if.o -fPIC if.c
+ 
+ common.o: common.c
+-	$(CC) $(CFLAGS) -I../../.. -c -o common.o -fPIC common.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -I../../.. -c -o common.o -fPIC common.c
+ 
+
+--- a/pppdump/Makefile.linux	2009-11-16 15:26:07.000000000 -0700
++++ b/pppdump/Makefile.linux	2010-09-30 17:59:16.000000000 -0700
+@@ -2,15 +2,18 @@ DESTDIR = $(INSTROOT)@DESTDIR@
+ BINDIR = $(DESTDIR)/sbin
+ MANDIR = $(DESTDIR)/share/man/man8
+ 
+-CFLAGS= -O -I../include/net
++COMPILE_FLAGS= -I../include/net
+ OBJS = pppdump.o bsd-comp.o deflate.o zlib.o
+ 
+ INSTALL= install
+ 
+ all:	pppdump
+ 
++%.o: %.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o $@ -shared $<
++
+ pppdump: $(OBJS)
+-	$(CC) -o pppdump $(OBJS)
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -o pppdump $(OBJS)
+ 
+ clean:
+ 	rm -f pppdump $(OBJS) *~
+
+--- a/pppstats/Makefile.linux	2009-11-16 15:26:07.000000000 -0700
++++ b/pppstats/Makefile.linux	2010-09-30 17:59:16.000000000 -0700
+@@ -26,11 +26,11 @@ install: pppstats
+ 	$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
+ 
+ pppstats: $(PPPSTATSRCS)
+-	$(CC) $(CFLAGS) -o pppstats pppstats.c $(LIBS)
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -o pppstats pppstats.c $(LIBS)
+ 
+ clean:
+ 	rm -f pppstats *~ #* core
+ 
+ depend:
+-	cpp -M $(CFLAGS) $(PPPSTATSRCS) >.depend
++	cpp -M $(COMPILE_FLAGS) $(CFLAGS) $(PPPSTATSRCS) >.depend
+ #	makedepend $(CFLAGS) $(PPPSTATSRCS)
diff --git a/package/pppd/pppd-2.4.5-man-dir.patch b/package/pppd/pppd-2.4.5-man-dir.patch
new file mode 100644
index 0000000..c9434f6
--- /dev/null
+++ b/package/pppd/pppd-2.4.5-man-dir.patch
@@ -0,0 +1,31 @@
+Change the MANDIR variable in the top makefile
+to match the rest of the makefiles
+--- a/linux/Makefile.top	2009-11-16 15:26:07.000000000 -0700
++++ b/linux/Makefile.top	2010-09-30 19:57:19.000000000 -0700
+@@ -3,7 +3,7 @@
+ DESTDIR = $(INSTROOT)@DESTDIR@
+ BINDIR = $(DESTDIR)/sbin
+ INCDIR = $(DESTDIR)/include
+-MANDIR = $(DESTDIR)/share/man
++MANDIR = $(DESTDIR)/share/man/man8
+ ETCDIR = $(INSTROOT)@SYSCONF@/ppp
+ 
+ # uid 0 = root
+@@ -16,7 +16,7 @@ all:
+ 	cd pppstats; $(MAKE) $(MFLAGS) all
+ 	cd pppdump; $(MAKE) $(MFLAGS) all
+ 
+-install: $(BINDIR) $(MANDIR)/man8 install-progs install-devel
++install: $(BINDIR) $(MANDIR) install-progs install-devel
+ 
+ install-progs:
+ 	cd chat; $(MAKE) $(MFLAGS) install
+@@ -40,7 +40,7 @@ $(ETCDIR)/chap-secrets:
+ 
+ $(BINDIR):
+ 	$(INSTALL) -d -m 755 $@
+-$(MANDIR)/man8:
++$(MANDIR):
+ 	$(INSTALL) -d -m 755 $@
+ $(ETCDIR):
+ 	$(INSTALL) -d -m 755 $@
diff --git a/package/pppd/pppd-2.4.5-pppol2tp.patch b/package/pppd/pppd-2.4.5-pppol2tp.patch
new file mode 100644
index 0000000..249789a
--- /dev/null
+++ b/package/pppd/pppd-2.4.5-pppol2tp.patch
@@ -0,0 +1,34 @@
+Per Paul Howarth
+
+"...due to ppp bundling a copy of linux/if_pppol2tp.h and this being used in
+preference to the system one. A recent change in kernel-headers has added a
+definition of struct pppol2tpv3_addr to this header file, and that definition
+is needed by linux/if_pppox.h but isn't found when compiling ppp due to the
+presence of the bundled copy of linux/if_pppol2tp.h. Simplest fix is to add
+the definition of struct pppol2tpv3_addr to the bundled copy..."
+
+See https://bugzilla.redhat.com/show_bug.cgi?id=617625
+
+--- ppp-2.4.5/include/linux/if_pppol2tp.h	2009-11-16 22:26:07.000000000 +0000
++++ ppp-2.4.5/include/linux/if_pppol2tp.h	2010-07-16 22:35:22.000000000 +0100
+@@ -32,6 +32,20 @@
+ 	__u16 d_tunnel, d_session;	/* For sending outgoing packets */
+ };
+ 
++/* The L2TPv3 protocol changes tunnel and session ids from 16 to 32
++ * bits. So we need a different sockaddr structure.
++ */
++struct pppol2tpv3_addr {
++	pid_t	pid;			/* pid that owns the fd.
++					 * 0 => current */
++	int	fd;			/* FD of UDP or IP socket to use */
++
++	struct sockaddr_in addr;	/* IP address and port to send to */
++
++	__u32 s_tunnel, s_session;	/* For matching incoming packets */
++	__u32 d_tunnel, d_session;	/* For sending outgoing packets */
++};
++
+ /* Socket options:
+  * DEBUG	- bitmask of debug message categories
+  * SENDSEQ	- 0 => don't send packets with sequence numbers
diff --git a/package/pppd/pppd.mk b/package/pppd/pppd.mk
index 35fd451..f1249ef 100644
--- a/package/pppd/pppd.mk
+++ b/package/pppd/pppd.mk
@@ -3,72 +3,83 @@
 # pppd
 #
 #############################################################
-
 PPPD_VERSION = 2.4.5
 PPPD_SOURCE = ppp-$(PPPD_VERSION).tar.gz
 PPPD_SITE = ftp://ftp.samba.org/pub/ppp
+PPPD_INSTALL_STAGING = YES
+
+PPPD_MANPAGES = chat pppd pppdump pppstats
 PPPD_TARGET_BINS = chat pppd pppdump pppstats
-PPPD_MANPAGES = $(if $(BR2_HAVE_DOCUMENTATION),chat pppd pppdump pppstats)
-PPPD_MAKE = $(MAKE) CC="$(TARGET_CC)" COPTS="$(TARGET_CFLAGS)" -C $(PPPD_DIR) $(PPPD_MAKE_OPT)
+
+PPPD_STAGING_INSTALL_OPTS = BINDIR=$(STAGING_DIR)/usr/sbin \
+		ETCDIR=$(STAGING_DIR)/etc/ppp \
+		INCDIR=$(STAGING_DIR)/usr/include \
+		LIBDIR=$(STAGING_DIR)/usr/lib/pppd/$(PPPD_VERSION) \
+		MANDIR=$(STAGING_DIR)/usr/share/man/man8
+
+PPPD_TARGET_INSTALL_OPTS = BINDIR=$(TARGET_DIR)/usr/sbin \
+		ETCDIR=$(TARGET_DIR)/etc/ppp \
+		INCDIR=$(TARGET_DIR)/usr/include \
+		LIBDIR=$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION) \
+		MANDIR=$(TARGET_DIR)/usr/share/man/man8
 
 ifeq ($(BR2_PACKAGE_PPPD_FILTER),y)
-	PPPD_DEPENDENCIES += libpcap
-	PPPD_MAKE_OPT += FILTER=y
+PPPD_DEPENDENCIES += libpcap
+else
+define PPPD_NO_FILTER
+	$(SED) 's/FILTER=y/#FILTER=y/' $(@D)/pppd/Makefile.linux
+endef
 endif
 
 ifeq ($(BR2_INET_IPV6),y)
-	PPPD_MAKE_OPT += HAVE_INET6=y
+PPPD_MAKE_OPTS += HAVE_INET6=y
 endif
 
-$(eval $(call AUTOTARGETS,package,pppd))
+define PPPD_CONFIGURE_CMDS
+	$(PPPD_NO_FILTER)
+	(cd $(@D); \
+		CFLAGS="$(TARGET_CFLAGS)" \
+		./configure \
+	)
+endef
 
-$(PPPD_HOOK_POST_EXTRACT):
-	$(SED) 's/FILTER=y/#FILTER=y/' $(PPPD_DIR)/pppd/Makefile.linux
-	$(SED) 's/ifneq ($$(wildcard \/usr\/include\/pcap-bpf.h),)/ifdef FILTER/' $(PPPD_DIR)/*/Makefile.linux
-	touch $@
+define PPPD_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+	LDFLAGS="$(TARGET_LDFLAGS)" $(PPPD_MAKE_OPTS) -C $(@D)
+endef
 
-$(PPPD_TARGET_INSTALL_TARGET):
-	$(call MESSAGE,"Installing to target")
-	for sbin in $(PPPD_TARGET_BINS); do \
-		$(INSTALL) -D $(PPPD_DIR)/$$sbin/$$sbin \
-			$(TARGET_DIR)/usr/sbin/$$sbin; \
-	done
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/minconn.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/minconn.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/passprompt.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/passprompt.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/passwordfd.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/passwordfd.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/pppoatm/pppoatm.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/pppoatm.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/rp-pppoe/rp-pppoe.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/rp-pppoe.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/rp-pppoe/pppoe-discovery \
-		$(TARGET_DIR)/usr/sbin/pppoe-discovery
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/winbind.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/winbind.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/pppol2tp/openl2tp.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/openl2tp.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/pppol2tp/pppol2tp.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/pppol2tp.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radattr.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radattr.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radius.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radius.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radrealms.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radrealms.so
+define PPPD_INSTALL_STAGING_CMDS
+	$(MAKE) $(PPPD_STAGING_INSTALL_OPTS) -C $(@D) install
+	$(MAKE) $(PPPD_STAGING_INSTALL_OPTS) -C $(@D) install-etcppp
+endef
+
+define PPPD_INSTALL_TARGET_CMDS
+	$(MAKE) $(PPPD_TARGET_INSTALL_OPTS) -C $(@D) install
+	$(MAKE) $(PPPD_TARGET_INSTALL_OPTS) -C $(@D) install-etcppp
+endef
+
+define PPPD_UNINSTALL_STAGING_CMDS
+	rm -f $(addprefix $(STAGING_DIR)/usr/sbin/, $(PPPD_TARGET_BINS))
 	for m in $(PPPD_MANPAGES); do \
-		$(INSTALL) -m 644 -D $(PPPD_DIR)/$$m/$$m.8 \
-			$(TARGET_DIR)/usr/share/man/man8/$$m.8; \
+		rm -f $(STAGING_DIR)/usr/share/man/man8/$$m.8; \
 	done
-	touch $@
+	rm -rf $(STAGING_DIR)/etc/ppp
+	rm -rf $(STAGING_DIR)/usr/include/pppd
+	rm -rf $(STAGING_DIR)/usr/lib/pppd
+endef
 
-$(PPPD_TARGET_UNINSTALL):
-	$(call MESSAGE,"Uninstalling")
+define PPPD_UNINSTALL_TARGET_CMDS
 	rm -f $(addprefix $(TARGET_DIR)/usr/sbin/, $(PPPD_TARGET_BINS))
-	rm -f $(TARGET_DIR)/usr/sbin/pppoe-discovery
 	for m in $(PPPD_MANPAGES); do \
 		rm -f $(TARGET_DIR)/usr/share/man/man8/$$m.8; \
 	done
+	rm -rf $(TARGET_DIR)/etc/ppp
+	rm -rf $(TARGET_DIR)/usr/include/pppd
 	rm -rf $(TARGET_DIR)/usr/lib/pppd
-	rm -f $(PPPD_TARGET_INSTALL_TARGET) $(PPPD_HOOK_POST_INSTALL)
+endef
+
+define PPPD_CLEAN_CMDS
+	-$(MAKE) -C $(@D) clean
+endef
+
+$(eval $(call GENTARGETS,package,pppd))
-- 
1.7.3

^ permalink raw reply related

* [Buildroot] [PATCH 1/3] libpcap: bump to 1.1.1
From: Martin Banky @ 2010-10-01  6:32 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285914753-22744-1-git-send-email-Martin.Banky@gmail.com>

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/libpcap/libpcap-1.0.0-wireless.patch |   26 --------------------------
 package/libpcap/libpcap.mk                   |    2 +-
 2 files changed, 1 insertions(+), 27 deletions(-)
 delete mode 100644 package/libpcap/libpcap-1.0.0-wireless.patch

diff --git a/package/libpcap/libpcap-1.0.0-wireless.patch b/package/libpcap/libpcap-1.0.0-wireless.patch
deleted file mode 100644
index 7bcfcda..0000000
--- a/package/libpcap/libpcap-1.0.0-wireless.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-[PATCH]: pcap-linux: fix build with wireless support
-
-Based on ba23aa7b upstream.
-
-linux/wireless.h includes linux/if.h, which conflicts with net/if.h as
-they both define if* structures. Fix build by simply using linux/if.h
-instead of net/if.h.
-
-Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
----
- pcap-linux.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: libpcap-1.0.0/pcap-linux.c
-===================================================================
---- libpcap-1.0.0.orig/pcap-linux.c
-+++ libpcap-1.0.0/pcap-linux.c
-@@ -93,7 +93,7 @@ static const char rcsid[] _U_ =
- #include <sys/ioctl.h>
- #include <sys/utsname.h>
- #include <sys/mman.h>
--#include <net/if.h>
-+#include <linux/if.h>
- #include <netinet/in.h>
- #include <linux/if_ether.h>
- #include <net/if_arp.h>
diff --git a/package/libpcap/libpcap.mk b/package/libpcap/libpcap.mk
index b14a6f7..eebfc03 100644
--- a/package/libpcap/libpcap.mk
+++ b/package/libpcap/libpcap.mk
@@ -4,7 +4,7 @@
 #
 #############################################################
 
-LIBPCAP_VERSION:=1.0.0
+LIBPCAP_VERSION:=1.1.1
 LIBPCAP_SITE:=http://www.tcpdump.org/release
 LIBPCAP_SOURCE:=libpcap-$(LIBPCAP_VERSION).tar.gz
 LIBPCAP_INSTALL_STAGING:=YES
-- 
1.7.3

^ permalink raw reply related

* [Buildroot] [PATCH 0/3] change l2tp to xl2tp
From: Martin Banky @ 2010-10-01  6:32 UTC (permalink / raw)
  To: buildroot

I'm not sure what format pppd.mk was in, I think it might have been an
intermediate version, but it wouldn't compile. I heavily reworked this package
so that it would compile correctly, there were several issues with CFLAGS that
had to be fixed.

l2tp is no longer available on debian's site, but there is a fork called xl2tp
that is currently being maintained.

Each patch is dependant on the previous patch.

[PATCH 1/3] libpcap: bump to 1.1.1
[PATCH 2/3] pppd: convert to gentargets
[PATCH 3/3] l2tp: convert to gentargets and change to xl2tp

^ permalink raw reply

* [Buildroot] libpng install question
From: H Hartley Sweeten @ 2010-10-01  0:51 UTC (permalink / raw)
  To: buildroot

Hello all,

I was wondering why libpng12-config and libpng-config are installed to the target.
I thought these were host tools?

Regards,
Hartley

^ permalink raw reply

* [Buildroot] [SECURITY][PATCHv2] Bump quagga to 0.99.17
From: Thomas Petazzoni @ 2010-09-30 21:47 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <87k4m3xbc1.fsf@macbook.be.48ers.dk>

On Thu, 30 Sep 2010 21:47:42 +0200
Peter Korsgaard <jacmet@uclibc.org> wrote:

> Could someone using the external toolchain (Thomas?) give netsnmp a
> quick test?

I confirm that since Gustavo converted the package to autotargets, the
previously existing build failures with external toolchain have
disappeared. I just tested with a recent (a few days) Git, and net-snmp
built just fine with an external ARM CodeSourcery toolchain.

Now, I have no idea if it actually works, since I don't know how to
test it. But that's another story :-)

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply

* [Buildroot] [PATCH 1/2] host tools: create the host sed in $(O)/host/
From: Yann E. MORIN @ 2010-09-30 21:20 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <87bp7fx7dw.fsf@macbook.be.48ers.dk>

Peter, All,

On Thursday 30 September 2010 23:12:59 Peter Korsgaard wrote:
> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@anciens.enib.fr> writes:
>  Yann> The host sed does not belong to $(O)toolchain/ but
>  Yann> really belongs to $(O)/host/
> Thanks, but this is broken (and so was what we had), so I prefer to just
> get rid of it - It's not difficult to install a working sed on your
> build machine.

I was expecting we would have to get rid of the host sed stuff, but I did
not have time to properly do it before I submit the CT-NG backend, so this
little workaround in the meantime. Thanks for taking care of that!

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply

* [Buildroot] [PATCH 1/2] host tools: create the host sed in $(O)/host/
From: Peter Korsgaard @ 2010-09-30 21:12 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1284926049-9882-2-git-send-email-yann.morin.1998@anciens.enib.fr>

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@anciens.enib.fr> writes:

 Yann> The host sed does not belong to $(O)toolchain/ but
 Yann> really belongs to $(O)/host/

Thanks, but this is broken (and so was what we had), so I prefer to just
get rid of it - It's not difficult to install a working sed on your
build machine.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit master 1/1] scripts: fix for POSIX compliance
From: Yann E. MORIN @ 2010-09-30 21:09 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=855fdcaed1e14fd736a8f16bb1a1a4a62e43fc20
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Using two '=' for string comparison is a bashism.
Revert to using one, as stated in POSIX 1003.1-2008.

Of the three affected scripts, two are explicitly called vi #!/bin/bash.
Those two do not _need_ the fix, but gets it nonetheless, in case we
later switch to a POSIX-compliant shell for those scripts.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 scripts/get_linux_config.sh |    6 +++---
 scripts/mkpkg               |   14 +++++++-------
 scripts/testheader.inc      |   16 ++++++++--------
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/scripts/get_linux_config.sh b/scripts/get_linux_config.sh
index 5cd0e37..6c00036 100755
--- a/scripts/get_linux_config.sh
+++ b/scripts/get_linux_config.sh
@@ -23,7 +23,7 @@ LINUX_MINOR_VERSION=${LINUX26_DIR:13}
 
 function DBG_PRINT
 {
-	if [ ${DEBUG} == 1 ] ; then
+	if [ ${DEBUG} = 1 ] ; then
 		echo $1
 	fi
 }
@@ -50,8 +50,8 @@ for i in ${CONFIGS} ; do
 	    echo Copying `basename $i`.config ...
 	    cp $i.config ${LINUX26_CONFIG}
     elif [ ${THIS_MAJOR} -eq ${LINUX_MAJOR_VERSION} ] ; then
-	if [ "${LINUX_MINOR_VERSION}X" == "X" ] ; then
-		if [ "${THIS_MINOR}X" == "X" ] ; then
+	if [ "${LINUX_MINOR_VERSION}X" = "X" ] ; then
+		if [ "${THIS_MINOR}X" = "X" ] ; then
 		    echo Copying `basename $i`.config ...
 		    cp $i.config ${LINUX26_CONFIG}
 		else		
diff --git a/scripts/mkpkg b/scripts/mkpkg
index af47f42..4db0fef 100755
--- a/scripts/mkpkg
+++ b/scripts/mkpkg
@@ -36,7 +36,7 @@ function	process ()
 {
 	make $1 >> ${LOG} 2>&1 || test=${FAIL}
 	grep "\.tar\." ${LOG} > ${DEPENDENCY}
-	if [ ${test} == ${OK} ] ; then
+	if [ ${test} = ${OK} ] ; then
 		mv ${LOG} ${LOG_OK_FILE}
 		printf "%-16s" "OK"
 		if [ "${2}X" != "X" ] ; then
@@ -65,29 +65,29 @@ function build_package ()
 {
 	# echo "BUILD PACKAGE:1=$1 2=$2 3=$3 4=$4 5=$5 6=$6 7=$7"
 	printf "mk	%-32s" "$1"
-	if [ "$2X" == "X" ] ; then		# no parameters
+	if [ "$2X" = "X" ] ; then		# no parameters
 		clean_files	$1
 		dirclean	$1
 		process		$1 "$3"
-	elif [ "$2X" == "?X" ] ; then		# no parameters
+	elif [ "$2X" = "?X" ] ; then		# no parameters
 		clean_files	$1
 		dirclean	$1
 		process		$1 "$3"
-	elif [ "$2X" == "OKX" ] ; then	# Previous build was OK
+	elif [ "$2X" = "OKX" ] ; then	# Previous build was OK
 		clean_files	$1
 		dirclean	$1
 		process		$1 "$3"
-	elif [ "$2X" == "FAILX" ] ; then
+	elif [ "$2X" = "FAILX" ] ; then
 		clean_files	$1
 		dirclean	$1
 		process		$1 "$3"
-	elif [ "$2X" == "BROKENX" ] ; then
+	elif [ "$2X" = "BROKENX" ] ; then
 		printf  "%-16s" "BROKEN"
 		if [ "${3}X" != "X" ] ; then
 			printf	"%s"	"\"$3\"";
 		fi
 		echo
-	elif [ "$2X" == "DISABLEDX" ] ; then
+	elif [ "$2X" = "DISABLEDX" ] ; then
 		printf  "%-16s" "DISABLED"
 		if [ "${3}X" != "X" ] ; then
 			printf	"%s"	"\"$3\"";
diff --git a/scripts/testheader.inc b/scripts/testheader.inc
index 232e1e0..44b5585 100644
--- a/scripts/testheader.inc
+++ b/scripts/testheader.inc
@@ -31,7 +31,7 @@ function	RESTART()
 function	EXE()
 {
 	printf 	"EXE	"				| tee -a ${LOGFILE}
-	if [ ${active} == 1 ] ; then
+	if [ ${active} = 1 ] ; then
 		$1 $2 $3 "$4"
 		return 0;
 	else
@@ -49,10 +49,10 @@ function	EXE()
 function	AVR()
 {
 	printf 	"AVR	"				| tee -a ${LOGFILE}
-	if [ "${ARCH}X" == "avr32X" ] ; then
+	if [ "${ARCH}X" = "avr32X" ] ; then
 		echo "mk $2 UNSUPPORTED \"$4\" $5 $6"	| tee -a ${LOGFILE}
 		return 1;
-	elif [ ${active} == 1 ] ; then
+	elif [ ${active} = 1 ] ; then
 		$1 $2 "$3" "$4"
 		return 0;
 	else
@@ -72,22 +72,22 @@ function skip()
 {
 	printf "skip	%-8s" "$1"			| tee -a ${LOGFILE}
 	printf "%-32s" "$2"				| tee -a ${LOGFILE}
-	if [   "$3X" == "OKX" ] ; then
+	if [   "$3X" = "OKX" ] ; then
 		printf "%-16s"	"DISABLED"		| tee -a ${LOGFILE}
 		if [ "${4}X" != "X" ] ; then
 			printf	"%-64s"	"\"$4\""	| tee -a ${LOGFILE}
 		fi
-	elif [ "$3X" == "FAILX" ] ; then
+	elif [ "$3X" = "FAILX" ] ; then
 		printf "%-16s"	"DISABLED"		| tee -a ${LOGFILE}
 		if [ "${4}X" != "X" ] ; then
 			printf	"%-64s"	"\"$4\""	| tee -a ${LOGFILE}
 		fi
-	elif [ "$3X" == "BROKENX" ] ; then
+	elif [ "$3X" = "BROKENX" ] ; then
 		printf "%-16s"	"DISABLED"		| tee -a ${LOGFILE}
 		if [ "${4}X" != "X" ] ; then
 			printf	"%-64s"	"\"$4\""	| tee -a ${LOGFILE}
 		fi
-	elif [ "$3X" == "DISABLEDX" ] ; then
+	elif [ "$3X" = "DISABLEDX" ] ; then
 		printf "%-16s"	"DISABLED"		| tee -a ${LOGFILE}
 		if [ "${4}X" != "X" ] ; then
 			printf	"%-64s"	"\"$4\""	| tee -a ${LOGFILE}
@@ -104,7 +104,7 @@ function skip()
 function bb()
 {
 	printf 	"%-8s"	"bb"				| tee -a ${LOGFILE}
-	if [ ${busybox} == 1 ] ; then
+	if [ ${busybox} = 1 ] ; then
 		printf "%-8s"	"$1"			| tee -a ${LOGFILE}
 		$1 $2 $3 $4 $5 $6
 		return 0;
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [git commit master 1/1] package/tcl: fix for POSIX compliance
From: Yann E. MORIN @ 2010-09-30 21:09 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=57bc22c6b7ebef4b8b203dce6af4966ed719acef
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Using two '=' for string comparison is a bashism.
Revert to using one, as stated in POSIX 1003.1-2008.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/tcl/tcl.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/tcl/tcl.mk b/package/tcl/tcl.mk
index edcc441..cf46811 100644
--- a/package/tcl/tcl.mk
+++ b/package/tcl/tcl.mk
@@ -15,10 +15,10 @@ TCL_CONF_OPT = \
 
 define TCL_POST_INSTALL_CLEANUP
 	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libtcl8.4.so
-	-if [ "$(BR2_PACKAGE_TCL_DEL_ENCODINGS)" == "y" ]; then \
+	-if [ "$(BR2_PACKAGE_TCL_DEL_ENCODINGS)" = "y" ]; then \
 	rm -Rf $(TARGET_DIR)/usr/lib/tcl8.4/encoding/*; \
 	fi
-	-if [ "$(BR2_PACKAGE_TCL_SHLIB_ONLY)" == "y" ]; then \
+	-if [ "$(BR2_PACKAGE_TCL_SHLIB_ONLY)" = "y" ]; then \
 	rm -f $(TARGET_DIR)/usr/bin/tclsh8.4; \
 	fi
 endef
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [git commit master 1/1] sed: get rid of host-sed variant
From: Peter Korsgaard @ 2010-09-30 21:09 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=d0c3d1cf4365a80ba2ec35eef0c3ed7ac907f320
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

And all the infrastructure surrounding it. A broken sed implementation
is quite rare nowadays, as seen by the fact that the current host-sed
support has been broken for a while, so just get rid of it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 Makefile                                 |    2 +-
 linux/linux.mk                           |    2 +-
 package/Makefile.in                      |    1 +
 package/sed/configure.patch              |   29 -----------
 package/sed/sed.mk                       |   78 ------------------------------
 package/sed/sedcheck.sh                  |   11 ----
 toolchain/dependencies/check-host-sed.sh |   35 -------------
 toolchain/dependencies/dependencies.mk   |    6 +--
 toolchain/dependencies/dependencies.sh   |   33 +++++-------
 toolchain/uClibc/uclibc.mk               |    2 +-
 10 files changed, 19 insertions(+), 180 deletions(-)
 delete mode 100644 package/sed/configure.patch
 delete mode 100755 package/sed/sedcheck.sh
 delete mode 100755 toolchain/dependencies/check-host-sed.sh

diff --git a/Makefile b/Makefile
index 9c2e6af..d941b66 100644
--- a/Makefile
+++ b/Makefile
@@ -589,7 +589,7 @@ endif
 flush:
 	rm -f $(BUILD_DIR)/tgt-config.cache $(BUILD_DIR)/host-config.cache
 
-configured: dirs host-sed kernel-headers uclibc-config busybox-config linux26-config
+configured: dirs kernel-headers uclibc-config busybox-config linux26-config
 
 prepatch:	gcc-patched binutils-patched gdb-patched uclibc-patched
 
diff --git a/linux/linux.mk b/linux/linux.mk
index 55dc2bf..7f7bb05 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -138,7 +138,7 @@ $(LINUX26_DIR)/.stamp_installed: $(LINUX26_DIR)/.stamp_compiled
 
 linux26: host-module-init-tools $(LINUX26_DEPENDENCIES) $(LINUX26_DIR)/.stamp_installed
 
-linux26-menuconfig linux26-xconfig linux26-gconfig: host-sed dirs $(LINUX26_DIR)/.stamp_configured
+linux26-menuconfig linux26-xconfig linux26-gconfig: dirs $(LINUX26_DIR)/.stamp_configured
 	$(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) $(subst linux26-,,$@)
 
 # Support for rebuilding the kernel after the initramfs file list has
diff --git a/package/Makefile.in b/package/Makefile.in
index bb2aafa..f0dda27 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -161,6 +161,7 @@ endif
 INSTALL:=$(shell which install || type -p install)
 FLEX:=$(shell which flex || type -p flex)
 BISON:=$(shell which bison || type -p bison)
+SED:=$(shell which sed || type -p sed) -i -e
 
 HOST_CFLAGS   += -I$(HOST_DIR)/include -I$(HOST_DIR)/usr/include
 HOST_CXXFLAGS += -I$(HOST_DIR)/include -I$(HOST_DIR)/usr/include
diff --git a/package/sed/configure.patch b/package/sed/configure.patch
deleted file mode 100644
index 3e90c39..0000000
--- a/package/sed/configure.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff -Nru sed-4.1.5.orig/configure sed-4.1.5/configure
---- sed-4.1.5.orig/configure	2006-02-03 11:24:40.000000000 +0200
-+++ sed-4.1.5/configure	2007-02-23 14:03:55.000000000 +0200
-@@ -10147,8 +10147,6 @@
-     LINGUAS="${LINGUAS-%UNSET%}"
- 
- 
--  install_sh="$install_sh"
--
- _ACEOF
- 
- 
-@@ -11265,14 +11263,10 @@
-       esac
-     done ;;
-     gettext-fix )
--  sed -e '/^mkinstalldirs *=/a\' \
--      -e "install_sh=$install_sh" \
--      -e 's/^mkinstalldirs *=.*/mkinstalldirs=$(MKINSTALLDIRS)/' \
-+  sed -e 's/^mkinstalldirs *=.*/mkinstalldirs=$(MKINSTALLDIRS)/' \
-       intl/Makefile > intl/Makefile.tmp
-   mv intl/Makefile.tmp intl/Makefile
--  sed -e '/^mkinstalldirs *=/a\' \
--      -e "install_sh=$install_sh" \
--      -e 's/^mkinstalldirs *=.*/mkinstalldirs=$(MKINSTALLDIRS)/' \
-+  sed -e 's/^mkinstalldirs *=.*/mkinstalldirs=$(MKINSTALLDIRS)/' \
-       po/Makefile > po/Makefile.tmp
-   mv po/Makefile.tmp po/Makefile ;;
-   esac
diff --git a/package/sed/sed.mk b/package/sed/sed.mk
index c393dd9..d6f53be 100644
--- a/package/sed/sed.mk
+++ b/package/sed/sed.mk
@@ -7,18 +7,12 @@ SED_VERSION:=4.2.1
 SED_SOURCE:=sed-$(SED_VERSION).tar.gz
 SED_SITE:=$(BR2_GNU_MIRROR)/sed
 SED_CAT:=$(ZCAT)
-SED_DIR1:=$(TOOLCHAIN_DIR)/sed-$(SED_VERSION)
 SED_DIR2:=$(BUILD_DIR)/sed-$(SED_VERSION)
 SED_BINARY:=sed/sed
 SED_TARGET_BINARY:=bin/sed
 ifeq ($(BR2_LARGEFILE),y)
 SED_CPPFLAGS=-D_FILE_OFFSET_BITS=64
 endif
-#HOST_SED_DIR:=$(STAGING_DIR)
-HOST_SED_DIR:=$(TOOLCHAIN_DIR)
-SED:=$(HOST_SED_DIR)/bin/sed -i -e
-HOST_SED_BINARY:=$(shell package/sed/sedcheck.sh)
-HOST_SED_IF_ANY=$(shell toolchain/dependencies/check-host-sed.sh)
 
 $(DL_DIR)/$(SED_SOURCE):
 	mkdir -p $(DL_DIR)
@@ -26,78 +20,6 @@ $(DL_DIR)/$(SED_SOURCE):
 
 sed-source: $(DL_DIR)/$(SED_SOURCE)
 
-
-#############################################################
-#
-# build sed for use on the host system
-#
-#############################################################
-$(SED_DIR1)/.unpacked: $(DL_DIR)/$(SED_SOURCE)
-	mkdir -p $(TOOLCHAIN_DIR)
-	mkdir -p $(HOST_SED_DIR)/bin
-	$(SED_CAT) $(DL_DIR)/$(SED_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) -
-	toolchain/patch-kernel.sh $(SED_DIR1) package/sed/ configure.patch
-	$(CONFIG_UPDATE) $(SED_DIR1)/config
-	touch $@
-
-$(SED_DIR1)/.configured: $(SED_DIR1)/.unpacked
-	(cd $(SED_DIR1); rm -rf config.cache; \
-		./configure $(QUIET) \
-		--prefix=/usr \
-	)
-	touch $@
-
-$(SED_DIR1)/$(SED_BINARY): $(SED_DIR1)/.configured
-	$(MAKE) -C $(SED_DIR1)
-
-# This stuff is needed to work around GNU make deficiencies
-build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY)
-	@if [ -L $(HOST_SED_DIR)/$(SED_TARGET_BINARY) ]; then \
-		rm -f $(HOST_SED_DIR)/$(SED_TARGET_BINARY); \
-	fi
-	@if [ ! -f $(HOST_SED_DIR)/$(SED_TARGET_BINARY) \
-	      -o $(HOST_SED_DIR)/$(SED_TARGET_BINARY) \
-	      -ot $(SED_DIR1)/$(SED_BINARY) ]; then \
-		set -x; \
-		mkdir -p $(HOST_SED_DIR)/bin; \
-		$(MAKE) DESTDIR=$(HOST_SED_DIR) -C $(SED_DIR1) install; \
-		mv $(HOST_SED_DIR)/usr/bin/sed $(HOST_SED_DIR)/bin/; \
-		rm -rf $(HOST_SED_DIR)/share/locale; \
-		rm -rf $(HOST_SED_DIR)/usr/share/doc; \
-	fi
-
-$(HOST_SED_DIR)/$(SED_TARGET_BINARY):
-	if [ ! -e "$(HOST_SED_DIR)/$(SED_TARGET_BINARY)" ]; then \
-		mkdir -p "$(HOST_SED_DIR)/bin"; \
-		rm -f "$(HOST_SED_DIR)/$(SED_TARGET_BINARY)"; \
-		ln -sf "$(HOST_SED_IF_ANY)" \
-			"$(HOST_SED_DIR)/$(SED_TARGET_BINARY)"; \
-	fi
-
-.PHONY: sed host-sed use-sed-host-binary
-
-use-sed-host-binary: $(HOST_SED_DIR)/$(SED_TARGET_BINARY)
-
-host-sed: $(HOST_SED_BINARY)
-
-ifeq ($(HOST_SED_BINARY),build-sed-host-binary)
-host-sed-clean:
-	$(MAKE) DESTDIR=$(HOST_SED_DIR) -C $(SED_DIR1) uninstall
-	-$(MAKE) -C $(SED_DIR1) clean
-
-host-sed-dirclean:
-	rm -rf $(SED_DIR1)
-
-else
-host-sed-clean host-sed-dirclean:
-
-endif
-
-#############################################################
-#
-# build sed for use on the target system
-#
-#############################################################
 $(SED_DIR2)/.unpacked: $(DL_DIR)/$(SED_SOURCE)
 	$(SED_CAT) $(DL_DIR)/$(SED_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
 	$(CONFIG_UPDATE) $(SED_DIR2)/build-aux
diff --git a/package/sed/sedcheck.sh b/package/sed/sedcheck.sh
deleted file mode 100755
index 3fe44e8..0000000
--- a/package/sed/sedcheck.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-# Make sure the host sed supports '-i' (in-place).
-# If it doesn't, we'll build and use our own.
-SED=$(toolchain/dependencies/check-host-sed.sh)
-
-if [ -z "$SED" ] ; then
-	echo build-sed-host-binary
-else
-	echo use-sed-host-binary
-fi
diff --git a/toolchain/dependencies/check-host-sed.sh b/toolchain/dependencies/check-host-sed.sh
deleted file mode 100755
index ed9a1d4..0000000
--- a/toolchain/dependencies/check-host-sed.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-SEDLIST="/usr/bin/sed /bin/sed sed gnused gsed"
-
-for SED in $SEDLIST
-do
-	if ! test -x $SED ; then
-		SED=$(which $SED 2> /dev/null)
-		if ! test -x "$SED" > /dev/null ; then
-			SED=""
-			continue
-		fi
-	fi
-
-	tmp=$(mktemp)
-	echo "HELLO" > $tmp
-	$SED -i -e "s/HELLO/GOODBYE/" $tmp >/dev/null 2>&1
-	RESULT=$(cat $tmp)
-
-	if test $? != 0 ; then
-		SED=""
-	elif test -e ".sedtest-e" ; then
-		rm -f ".sedtest-e"
-		SED=""
-	elif [ "x$RESULT" = "x" ] || [ "$RESULT" != "GOODBYE" ] > /dev/null ;
-	then
-		SED=""
-	fi
-
-	rm -f $tmp
-	if [ ! -z "$SED" ] ; then
-		break
-	fi
-done
-echo $SED
diff --git a/toolchain/dependencies/dependencies.mk b/toolchain/dependencies/dependencies.mk
index b334811..89ffd88 100644
--- a/toolchain/dependencies/dependencies.mk
+++ b/toolchain/dependencies/dependencies.mk
@@ -9,13 +9,9 @@ DEPENDENCIES_HOST_PREREQ:=
 ifeq ($(BR2_STRIP_sstrip),y)
 DEPENDENCIES_HOST_PREREQ+=sstrip_host
 endif
-ifneq ($(findstring y,$(BR2_KERNEL_HEADERS_LZMA)),)
-DEPENDENCIES_HOST_PREREQ+=host-lzma
-endif
 
-dependencies: host-sed $(DEPENDENCIES_HOST_PREREQ)
+dependencies: $(DEPENDENCIES_HOST_PREREQ)
 	@HOSTCC="$(firstword $(HOSTCC))" MAKE="$(MAKE)" \
-		HOST_SED_DIR="$(HOST_SED_DIR)" \
 		CONFIG_FILE="$(CONFIG_DIR)/.config" \
 		$(TOPDIR)/toolchain/dependencies/dependencies.sh
 
diff --git a/toolchain/dependencies/dependencies.sh b/toolchain/dependencies/dependencies.sh
index b47e9d8..ee21b37 100755
--- a/toolchain/dependencies/dependencies.sh
+++ b/toolchain/dependencies/dependencies.sh
@@ -55,14 +55,9 @@ if ! which which > /dev/null ; then
 	exit 1;
 fi;
 
-# Check sed
-SED=$(toolchain/dependencies/check-host-sed.sh)
-
-if [ -z "$SED" ] ; then
-	XSED=$HOST_SED_DIR/bin/sed
-	/bin/echo -e "\nSed doesn't work, using buildroot version instead\n"
-else
-	XSED=$SED
+if ! which sed > /dev/null ; then
+	/bin/echo -e "\nYou must install 'sed' on your build machine\n"
+	exit 1
 fi
 
 # Check make
@@ -71,13 +66,13 @@ if [ -z "$MAKE" ] ; then
 	/bin/echo -e "\nYou must install 'make' on your build machine\n";
 	exit 1;
 fi;
-MAKE_VERSION=$($MAKE --version 2>&1 | $XSED -e 's/^.* \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q')
+MAKE_VERSION=$($MAKE --version 2>&1 | sed -e 's/^.* \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q')
 if [ -z "$MAKE_VERSION" ] ; then
 	/bin/echo -e "\nYou must install 'make' on your build machine\n";
 	exit 1;
 fi;
-MAKE_MAJOR=$(echo $MAKE_VERSION | $XSED -e "s/\..*//g")
-MAKE_MINOR=$(echo $MAKE_VERSION | $XSED -e "s/^$MAKE_MAJOR\.//g" -e "s/\..*//g" -e "s/[a-zA-Z].*//g")
+MAKE_MAJOR=$(echo $MAKE_VERSION | sed -e "s/\..*//g")
+MAKE_MINOR=$(echo $MAKE_VERSION | sed -e "s/^$MAKE_MAJOR\.//g" -e "s/\..*//g" -e "s/[a-zA-Z].*//g")
 if [ $MAKE_MAJOR -lt 3 ] || [ $MAKE_MAJOR -eq 3 -a $MAKE_MINOR -lt 81 ] ; then
 	/bin/echo -e "\nYou have make '$MAKE_VERSION' installed.  GNU make >=3.81 is required\n"
 	exit 1;
@@ -93,14 +88,14 @@ if [ -z "$COMPILER" ] ; then
 	exit 1;
 fi;
 
-COMPILER_VERSION=$($COMPILER -v 2>&1 | $XSED -n '/^gcc version/p' |
-	$XSED -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q')
+COMPILER_VERSION=$($COMPILER -v 2>&1 | sed -n '/^gcc version/p' |
+	sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q')
 if [ -z "$COMPILER_VERSION" ] ; then
 	/bin/echo -e "\nYou must install 'gcc' on your build machine\n";
 	exit 1;
 fi;
-COMPILER_MAJOR=$(echo $COMPILER_VERSION | $XSED -e "s/\..*//g")
-COMPILER_MINOR=$(echo $COMPILER_VERSION | $XSED -e "s/^$COMPILER_MAJOR\.//g" -e "s/\..*//g")
+COMPILER_MAJOR=$(echo $COMPILER_VERSION | sed -e "s/\..*//g")
+COMPILER_MINOR=$(echo $COMPILER_VERSION | sed -e "s/^$COMPILER_MAJOR\.//g" -e "s/\..*//g")
 if [ $COMPILER_MAJOR -lt 3 -o $COMPILER_MAJOR -eq 2 -a $COMPILER_MINOR -lt 95 ] ; then
 	echo "\nYou have gcc '$COMPILER_VERSION' installed.  gcc >= 2.95 is required\n"
 	exit 1;
@@ -116,14 +111,14 @@ if [ -z "$CXXCOMPILER" ] ; then
 	#exit 1
 fi
 if [ ! -z "$CXXCOMPILER" ] ; then
-	CXXCOMPILER_VERSION=$($CXXCOMPILER -v 2>&1 | $XSED -n '/^gcc version/p' |
-		$XSED -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q')
+	CXXCOMPILER_VERSION=$($CXXCOMPILER -v 2>&1 | sed -n '/^gcc version/p' |
+		sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q')
 	if [ -z "$CXXCOMPILER_VERSION" ] ; then
 		/bin/echo -e "\nYou may have to install 'g++' on your build machine\n"
 	fi
 
-	CXXCOMPILER_MAJOR=$(echo $CXXCOMPILER_VERSION | $XSED -e "s/\..*//g")
-	CXXCOMPILER_MINOR=$(echo $CXXCOMPILER_VERSION | $XSED -e "s/^$CXXCOMPILER_MAJOR\.//g" -e "s/\..*//g")
+	CXXCOMPILER_MAJOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/\..*//g")
+	CXXCOMPILER_MINOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/^$CXXCOMPILER_MAJOR\.//g" -e "s/\..*//g")
 	if [ $CXXCOMPILER_MAJOR -lt 3 -o $CXXCOMPILER_MAJOR -eq 2 -a $CXXCOMPILER_MINOR -lt 95 ] ; then
 		/bin/echo -e "\nYou have g++ '$CXXCOMPILER_VERSION' installed.  g++ >= 2.95 is required\n"
 		exit 1
diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index 4fb9393..1ed40cc 100644
--- a/toolchain/uClibc/uclibc.mk
+++ b/toolchain/uClibc/uclibc.mk
@@ -425,7 +425,7 @@ $(UCLIBC_DIR)/lib/libc.a: $(UCLIBC_DIR)/.configured $(gcc_intermediate) $(LIBFLO
 		all
 	touch -c $@
 
-uclibc-menuconfig: host-sed dirs $(UCLIBC_DIR)/.config
+uclibc-menuconfig: dirs $(UCLIBC_DIR)/.config
 	$(MAKE1) -C $(UCLIBC_DIR) \
 		ARCH="$(UCLIBC_TARGET_ARCH)" \
 		PREFIX=$(TOOLCHAIN_DIR)/uClibc_dev/ \
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [git commit master 1/1] toolchain: fix helpers for POSIX compliance
From: Yann E. MORIN @ 2010-09-30 21:09 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=d12bc6294a37d52150fe14292d4e84d7a70e4861
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Using two '=' for string comparison is a bashism.
Revert to using one, as stated in POSIX 1003.1-2008.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 toolchain/helpers.mk |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 5c87d2b..05d43e7 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -170,11 +170,11 @@ check_glibc = \
 #
 check_uclibc_feature = \
 	IS_IN_LIBC=`grep -q "\#define $(1) 1" $(3) && echo y` ; \
-	if [ x$($(2)) != x"y" -a x$${IS_IN_LIBC} == x"y" ] ; then \
+	if [ x$($(2)) != x"y" -a x$${IS_IN_LIBC} = x"y" ] ; then \
 		echo "$(4) available in C library, please enable $(2)" ; \
 		exit 1 ; \
 	fi ; \
-	if [ x$($(2)) == x"y" -a x$${IS_IN_LIBC} != x"y" ] ; then \
+	if [ x$($(2)) = x"y" -a x$${IS_IN_LIBC} != x"y" ] ; then \
 		echo "$(4) not available in C library, please disable $(2)" ; \
 		exit 1 ; \
 	fi
@@ -214,11 +214,11 @@ check_arm_abi = \
 	else \
 		EXT_TOOLCHAIN_ABI="oabi" ; \
 	fi ; \
-	if [ x$(BR2_ARM_OABI) == x"y" -a $${EXT_TOOLCHAIN_ABI} == "eabi" ] ; then \
+	if [ x$(BR2_ARM_OABI) = x"y" -a $${EXT_TOOLCHAIN_ABI} = "eabi" ] ; then \
 		echo "Incorrect ABI setting" ; \
 		exit 1 ; \
 	fi ; \
-	if [ x$(BR2_ARM_EABI) == x"y" -a $${EXT_TOOLCHAIN_ABI} == "oabi" ] ; then \
+	if [ x$(BR2_ARM_EABI) = x"y" -a $${EXT_TOOLCHAIN_ABI} = "oabi" ] ; then \
 		echo "Incorrect ABI setting" ; \
 		exit 1 ; \
 	fi ; \
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [git commit master 1/1] skeleton: fix atstk1005, ststk100x and atngw100 for POSIX compliance
From: Yann E. MORIN @ 2010-09-30 21:09 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=5c6320f1b550b3607cc4ed42a95811381d31395f
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Using two '=' for string comparison is a bashism.
Revert to using one, as stated in POSIX 1003.1-2008.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 .../atngw100/target_skeleton/etc/init.d/S99gpio    |    6 +++---
 .../atstk1005/target_skeleton/etc/init.d/S99gpio   |    6 +++---
 .../atstk100x/target_skeleton/etc/init.d/S99gpio   |    6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/target/device/Atmel/atngw100/target_skeleton/etc/init.d/S99gpio b/target/device/Atmel/atngw100/target_skeleton/etc/init.d/S99gpio
index ea07784..3a17740 100755
--- a/target/device/Atmel/atngw100/target_skeleton/etc/init.d/S99gpio
+++ b/target/device/Atmel/atngw100/target_skeleton/etc/init.d/S99gpio
@@ -8,9 +8,9 @@ fi
 
 BOARD=`cat /etc/release | cut -d ' ' -f1`
 
-if [ "${BOARD}" == "" ]; then
+if [ "${BOARD}" = "" ]; then
 	echo "none";
-elif [ "${BOARD}" == "NGW100" ]; then
+elif [ "${BOARD}" = "NGW100" ]; then
 	echo "'${BOARD}'"
 
 	echo -n "  boot LED: "
@@ -111,7 +111,7 @@ elif [ "${BOARD}" == "NGW100" ]; then
 		echo "failed"
 		exit 1
 	fi
-elif [ "${BOARD}" == "STK1000" ]; then # end NGW100
+elif [ "${BOARD}" = "STK1000" ]; then # end NGW100
 	echo "'${BOARD}'"
 
 	echo -n "  switches: "
diff --git a/target/device/Atmel/atstk1005/target_skeleton/etc/init.d/S99gpio b/target/device/Atmel/atstk1005/target_skeleton/etc/init.d/S99gpio
index 967761a..7c07f28 100644
--- a/target/device/Atmel/atstk1005/target_skeleton/etc/init.d/S99gpio
+++ b/target/device/Atmel/atstk1005/target_skeleton/etc/init.d/S99gpio
@@ -8,9 +8,9 @@ fi
 
 BOARD=`cat /etc/release | cut -d ' ' -f1`
 
-if [ "${BOARD}" == "" ]; then
+if [ "${BOARD}" = "" ]; then
 	echo "none";
-elif [ "${BOARD}" == "NGW" ]; then
+elif [ "${BOARD}" = "NGW" ]; then
 	echo "'${BOARD}'"
 
 	echo -n "  boot LED: "
@@ -111,7 +111,7 @@ elif [ "${BOARD}" == "NGW" ]; then
 		echo "failed"
 		exit 1
 	fi
-elif [ "${BOARD}" == "STK1000" ]; then # end NGW
+elif [ "${BOARD}" = "STK1000" ]; then # end NGW
 	echo "'${BOARD}'"
 
 	echo -n "  switches: "
diff --git a/target/device/Atmel/atstk100x/target_skeleton/etc/init.d/S99gpio b/target/device/Atmel/atstk100x/target_skeleton/etc/init.d/S99gpio
index 967761a..7c07f28 100644
--- a/target/device/Atmel/atstk100x/target_skeleton/etc/init.d/S99gpio
+++ b/target/device/Atmel/atstk100x/target_skeleton/etc/init.d/S99gpio
@@ -8,9 +8,9 @@ fi
 
 BOARD=`cat /etc/release | cut -d ' ' -f1`
 
-if [ "${BOARD}" == "" ]; then
+if [ "${BOARD}" = "" ]; then
 	echo "none";
-elif [ "${BOARD}" == "NGW" ]; then
+elif [ "${BOARD}" = "NGW" ]; then
 	echo "'${BOARD}'"
 
 	echo -n "  boot LED: "
@@ -111,7 +111,7 @@ elif [ "${BOARD}" == "NGW" ]; then
 		echo "failed"
 		exit 1
 	fi
-elif [ "${BOARD}" == "STK1000" ]; then # end NGW
+elif [ "${BOARD}" = "STK1000" ]; then # end NGW
 	echo "'${BOARD}'"
 
 	echo -n "  switches: "
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [ Patch 0/4] Fix for POSIX compliance
From: Peter Korsgaard @ 2010-09-30 20:09 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285017969-32280-1-git-send-email-yann.morin.1998@anciens.enib.fr>

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@anciens.enib.fr> writes:

 Yann> Hello All!
 Yann> This series adds fixes for POSIX 1003.1-2008 compliance in some shell
 Yann> scripts, with respect to string comparison. POSIX says that string
 Yann> comparison in test(1) is done using a sing '='; using two is a bashism.
 Yann> See:
 Yann>   http://www.opengroup.org/onlinepubs/9699919799/utilities/test.html
 Yann>   man 1 test
 Yann>   man 1 bash

Committed all 4, thanks!

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit master 1/1] quagga: bump version, fix conflicting options, enhance help
From: Peter Korsgaard @ 2010-09-30 19:50 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=b8ce1fb184e1308a53ab7f58a1fbcf8add0c3c73
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 CHANGES                                            |   10 +-
 package/quagga/Config.in                           |   78 ++++++++++----------
 ...ing.patch => quagga-fix-ipctl-forwarding.patch} |    0
 package/quagga/quagga.mk                           |   12 +--
 4 files changed, 48 insertions(+), 52 deletions(-)
 rename package/quagga/{quagga-0.99.16-fix-ipctl-forwarding.patch => quagga-fix-ipctl-forwarding.patch} (100%)

diff --git a/CHANGES b/CHANGES
index 5910bb7..f5c1616 100644
--- a/CHANGES
+++ b/CHANGES
@@ -36,11 +36,11 @@
 	mdadm, mesa3d, metacity, mtd-utils, mysql_client, nano, nbd,
 	ncftp, neon, netperf, netsnmp, ng-spice-rework, ntfsprogs,
 	ntp, openntpd, openssh, openvpn, oprofile, pango, patch, pcre,
-	php, pkg-config, prboom, radvd, rdesktop, ruby, qt, samba,
-	sawman, sdl_mixer, sdl_sound, setserial, shared-mime-info,
-	speex, sqlite, squashfs, strace, sylpheed, taglib, tcpdump,
-	thttpd, tiff, tn5250, udev, udpcast, usbmount, usbutils,
-	vsftpd, vtun, which, wpa_supplicant,
+	php, pkg-config, prboom, radvd, rdesktop, ruby, qt, quagga,
+	samba, sawman, sdl_mixer, sdl_sound, setserial,
+	shared-mime-info, speex, sqlite, squashfs, strace, sylpheed,
+	taglib, tcpdump, thttpd, tiff, tn5250, udev, udpcast,
+	usbmount, usbutils, vsftpd, vtun, which, wpa_supplicant,
 	xdriver_xf86-input-{acecad,aiptek,evdev,joystick,keyboard},
 	xdriver-xf86-input-{mouse,synaptics,vmmouse,void},
 	xdriver-xf86-video-{apm,ark,ast,ati,chips,cirrus,dummy,fbdev},
diff --git a/package/quagga/Config.in b/package/quagga/Config.in
index fb0d590..9ca2f98 100644
--- a/package/quagga/Config.in
+++ b/package/quagga/Config.in
@@ -1,8 +1,8 @@
 config BR2_PACKAGE_QUAGGA
 	bool "quagga"
 	help
-	  routing software suite, providing implementations of
-	  OSPFv2, OSPFv3, RIP v1 and v2, RIPng and BGP-4.
+	  Routing software suite, providing implementations of
+	  OSPFv2, OSPFv3 (IPv6), RIP v1 and v2, RIPng (IPv6) and BGPv4+.
 
 	  http://www.quagga.net/
 
@@ -13,62 +13,64 @@ config BR2_PACKAGE_QUAGGA_ZEBRA
 	help
 	  Build zebra daemon.
 
-config BR2_PACKAGE_QUAGGA_BGPD
-	bool "bgpd support"
+config BR2_PACKAGE_QUAGGA_TCP_ZEBRA
+	bool "Use TCP sockets between zebra and protocol daemons"
 	help
-	  Enable bgpd support in quagga.
+	  Use a TCP socket to communicate between zebra (supervisor) and
+	  the different protocol daemons.
 
-config BR2_PACKAGE_QUAGGA_RIPD
-	bool "ripd support"
+	  You'll want this enabled if zebra and the protocol daemon(s) run
+	  on different hosts.
+
+config BR2_PACKAGE_QUAGGA_BGPD
+	bool "BPGv4+ protocol"
 	help
-	  Enable ripd support in quagga.
+	  Build bpgd daemon.
 
-config BR2_PACKAGE_QUAGGA_RIPNGD
-	bool "ripngd support"
-	depends on BR2_INET_IPV6
+config BR2_PACKAGE_QUAGGA_BGP_ANNOUNCE
+	bool "BGP route announcement"
+	depends on BR2_PACKAGE_QUAGGA_BGPD
+
+config BR2_PACKAGE_QUAGGA_ISISD
+	bool "IS-IS protocol"
 	help
-	  Enable ripngd support in quagga.
+	  Enable isisd support in quagga.
 
 config BR2_PACKAGE_QUAGGA_OSPFD
-	bool "ospfd support"
+	bool "OSPFv2 protocol"
 	help
-	  Enable ospfd support in quagga.
+	  Build ospfd daemon.
+
+config BR2_PACKAGE_QUAGGA_OPAQUE_LSA
+	bool "OSPF Opaque-LSA with OSPFAPI support (RFC2370)"
+	depends on BR2_PACKAGE_QUAGGA_OSPFD
 
 config BR2_PACKAGE_QUAGGA_OSPF6D
-	bool "ospf6d support"
+	bool "OSPFv3 (IPv6) protocol"
 	depends on BR2_INET_IPV6
 	help
-	  Enable ospf6d support in quagga.
+	  Build ospf6d daemon.
 
-config BR2_PACKAGE_QUAGGA_WATCHQUAGGA
-	bool "watchquagga support"
+config BR2_PACKAGE_QUAGGA_RIPD
+	bool "RIPv2/v3 protocol"
 	help
-	  Enable watchquagga support in quagga.
+	  Build ripd daemon.
 
-config BR2_PACKAGE_QUAGGA_ISISD
-	bool "isisd support"
+config BR2_PACKAGE_QUAGGA_RIPNGD
+	bool "RIPng (IPv6) protocol"
+	depends on BR2_INET_IPV6
 	help
-	  Enable isisd support in quagga.
+	  Build ripngd daemon.
 
-config BR2_PACKAGE_QUAGGA_BGP_ANNOUNCE
-	bool "BGP route announcement"
-
-config BR2_PACKAGE_QUAGGA_NETLINK
-	bool "use linux netlink interface"
-	default y
+config BR2_PACKAGE_QUAGGA_WATCHQUAGGA
+	bool "Build watchquagga"
+	help
+	  Build and install watchquagga, a zebra/protocol daemon supervisor.
 
 config BR2_PACKAGE_QUAGGA_SNMP
 	bool "SNMP support"
-	depends on !BR2_TOOLCHAIN_EXTERNAL
 	select BR2_PACKAGE_NETSNMP
-
-comment "quagga snmp support broken with external toolchains"
-	depends on BR2_TOOLCHAIN_EXTERNAL
-
-config BR2_PACKAGE_QUAGGA_TCP_ZEBRA
-	bool "TCP/IP socket connection between zebra and proto daemon"
-
-config BR2_PACKAGE_QUAGGA_OPAGUE_LSA
-	bool "OSPF Opaque-LSA with OSPFAPI support (RFC2370)"
+	help
+	  Make quagga information available via SNMP SMUX.
 
 endif
diff --git a/package/quagga/quagga-0.99.16-fix-ipctl-forwarding.patch b/package/quagga/quagga-fix-ipctl-forwarding.patch
similarity index 100%
rename from package/quagga/quagga-0.99.16-fix-ipctl-forwarding.patch
rename to package/quagga/quagga-fix-ipctl-forwarding.patch
diff --git a/package/quagga/quagga.mk b/package/quagga/quagga.mk
index 79c0b71..c1eeee8 100644
--- a/package/quagga/quagga.mk
+++ b/package/quagga/quagga.mk
@@ -3,13 +3,13 @@
 # quagga suite
 #
 #############################################################
-QUAGGA_VERSION:=0.99.16
+QUAGGA_VERSION:=0.99.17
 QUAGGA_SOURCE:=quagga-$(QUAGGA_VERSION).tar.gz
 QUAGGA_SITE:=http://www.quagga.net/download/
 
 QUAGGA_DEPENDENCIES = host-gawk
 QUAGGA_LIBTOOL_PATCH = NO
-QUAGGA_CONF_OPT = --program-transform-name=''
+QUAGGA_CONF_OPT = --program-transform-name='' --enable-netlink
 
 ifeq ($(BR2_PACKAGE_QUAGGA_ZEBRA),y)
 QUAGGA_CONF_OPT+=--enable-zebra
@@ -65,12 +65,6 @@ else
 QUAGGA_CONF_OPT+=--disable-bgp-announce
 endif
 
-ifeq ($(BR2_PACKAGE_QUAGGA_NETLINK),y)
-QUAGGA_CONF_OPT+=--enable-netlink
-else
-QUAGGA_CONF_OPT+=--disable-netlink
-endif
-
 ifeq ($(BR2_PACKAGE_QUAGGA_SNMP),y)
 QUAGGA_CONF_OPT+=--enable-snmp
 QUAGGA_DEPENDENCIES+=netsnmp
@@ -84,7 +78,7 @@ else
 QUAGGA_CONF_OPT+=--disable-tcp-zebra
 endif
 
-ifeq ($(BR2_PACKAGE_QUAGGA_OPAGUE_LSA),y)
+ifeq ($(BR2_PACKAGE_QUAGGA_OPAQUE_LSA),y)
 QUAGGA_CONF_OPT+=--enable-opaque-lsa
 else
 QUAGGA_CONF_OPT+=--disable-opaque-lsa
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [SECURITY][PATCHv2] Bump quagga to 0.99.17
From: Peter Korsgaard @ 2010-09-30 19:47 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <4CA4E521.30407@zacarias.com.ar>

>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> On 09/30/10 16:16, Peter Korsgaard wrote:
 >> I also see that you removed the comment about snmp support being broken
 >> with external toolchains. Is that resolved?

 Gustavo> Forgot about this point, snmp support with external toolchain
 Gustavo> was broken at the net-snmp package (bad staging), so i removed
 Gustavo> the kludge since it's supposedly fixed when i rewrote the
 Gustavo> net-snmp package for autotargets.

Ok, thanks.

Could someone using the external toolchain (Thomas?) give netsnmp a
quick test?

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [SECURITY][PATCHv2] Bump quagga to 0.99.17
From: Gustavo Zacarias @ 2010-09-30 19:29 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <87ocbfxcsg.fsf@macbook.be.48ers.dk>

On 09/30/10 16:16, Peter Korsgaard wrote:

> I also see that you removed the comment about snmp support being broken
> with external toolchains. Is that resolved?

Forgot about this point, snmp support with external toolchain was broken
at the net-snmp package (bad staging), so i removed the kludge since
it's supposedly fixed when i rewrote the net-snmp package for autotargets.

^ permalink raw reply

* [Buildroot] [SECURITY][PATCHv2] Bump quagga to 0.99.17
From: Gustavo Zacarias @ 2010-09-30 19:26 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <87ocbfxcsg.fsf@macbook.be.48ers.dk>

On 09/30/10 16:16, Peter Korsgaard wrote:

>>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:
> 
>  Gustavo> Bump quagga to version 0.99.17.
>  Gustavo> [SECURITY] Fixes remote crash in bgpd.
>  Gustavo> Other fixes for ospfd, ospf6d, zebra and isisd.
>  Gustavo> Fix conflicting options in the package, enhance help, reorder options.
>  Gustavo> Should fix most breakage with randpackageconfig (Peter: ring me if you
>  Gustavo> hit another one!).
> 
> With this I still have the same bug:
> 
> make[3]: *** No rule to make target `../ospfd/libospf.la', needed by `ospfclient
> 
> grep QUAGGA .config
> BR2_PACKAGE_QUAGGA=y
> # BR2_PACKAGE_QUAGGA_ZEBRA is not set
> # BR2_PACKAGE_QUAGGA_BGPD is not set
> # BR2_PACKAGE_QUAGGA_RIPD is not set
> # BR2_PACKAGE_QUAGGA_OSPFD is not set
> # BR2_PACKAGE_QUAGGA_WATCHQUAGGA is not set
> # BR2_PACKAGE_QUAGGA_ISISD is not set
> # BR2_PACKAGE_QUAGGA_BGP_ANNOUNCE is not set
> # BR2_PACKAGE_QUAGGA_NETLINK is not set
> # BR2_PACKAGE_QUAGGA_SNMP is not set
> BR2_PACKAGE_QUAGGA_TCP_ZEBRA=y
> BR2_PACKAGE_QUAGGA_OPAGUE_LSA=y
> 
> I also see that you removed the comment about snmp support being broken
> with external toolchains. Is that resolved?
> 
> And finally, how do you create your patches? Could you please use git
> format-patch for it, so I can apply them with git am?

Did you make oldconfig to avoid OPAQUE_LSA? (heh, nice typo there, feel
free to fix it). OPAQUE shouldn't be enabled unless OSPFD is enabled.
I'm doing the usual git commit, git format-patch and attach it as text,
can't do git send-email since git fails terribly at smtp auth.
Regards.

^ permalink raw reply

* [Buildroot] [SECURITY][PATCHv2] Bump quagga to 0.99.17
From: Peter Korsgaard @ 2010-09-30 19:16 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <4CA4A278.6040303@zacarias.com.ar>

>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> Bump quagga to version 0.99.17.
 Gustavo> [SECURITY] Fixes remote crash in bgpd.
 Gustavo> Other fixes for ospfd, ospf6d, zebra and isisd.
 Gustavo> Fix conflicting options in the package, enhance help, reorder options.
 Gustavo> Should fix most breakage with randpackageconfig (Peter: ring me if you
 Gustavo> hit another one!).

With this I still have the same bug:

make[3]: *** No rule to make target `../ospfd/libospf.la', needed by `ospfclient

grep QUAGGA .config
BR2_PACKAGE_QUAGGA=y
# BR2_PACKAGE_QUAGGA_ZEBRA is not set
# BR2_PACKAGE_QUAGGA_BGPD is not set
# BR2_PACKAGE_QUAGGA_RIPD is not set
# BR2_PACKAGE_QUAGGA_OSPFD is not set
# BR2_PACKAGE_QUAGGA_WATCHQUAGGA is not set
# BR2_PACKAGE_QUAGGA_ISISD is not set
# BR2_PACKAGE_QUAGGA_BGP_ANNOUNCE is not set
# BR2_PACKAGE_QUAGGA_NETLINK is not set
# BR2_PACKAGE_QUAGGA_SNMP is not set
BR2_PACKAGE_QUAGGA_TCP_ZEBRA=y
BR2_PACKAGE_QUAGGA_OPAGUE_LSA=y

I also see that you removed the comment about snmp support being broken
with external toolchains. Is that resolved?

And finally, how do you create your patches? Could you please use git
format-patch for it, so I can apply them with git am?

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [PATCH 6/6] coreutils: add uname patch
From: Martin Banky @ 2010-09-30 19:03 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285873416-20755-1-git-send-email-Martin.Banky@gmail.com>

On linux platforms, grok /proc/cpuinfo for the CPU/vendor info.

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/coreutils/coreutils-8.5-uname.patch |  173 +++++++++++++++++++++++++++
 package/coreutils/coreutils.mk              |    8 ++
 2 files changed, 181 insertions(+), 0 deletions(-)
 create mode 100644 package/coreutils/coreutils-8.5-uname.patch

diff --git a/package/coreutils/coreutils-8.5-uname.patch b/package/coreutils/coreutils-8.5-uname.patch
new file mode 100644
index 0000000..b458abe
--- /dev/null
+++ b/package/coreutils/coreutils-8.5-uname.patch
@@ -0,0 +1,173 @@
+On linux platforms, grok /proc/cpuinfo for the CPU/vendor info.
+
+Prob not suitable for upstream seeing as how it's 100% linux-specific
+http://lists.gnu.org/archive/html/bug-coreutils/2005-09/msg00063.html
+
+Patch originally by Carlos E. Gorges <carlos@techlinux.com.br>, but 
+heavily reworked to suck less.
+
+To add support for additional platforms, check out the show_cpuinfo()
+func in the linux/arch/<ARCH>/ source tree of the kernel.
+
+--- coreutils/src/uname.c
++++ coreutils/src/uname.c
+@@ -50,6 +50,11 @@
+ # include <mach-o/arch.h>
+ #endif
+ 
++#if defined(__linux__)
++# define USE_PROCINFO
++# define UNAME_HARDWARE_PLATFORM
++#endif
++
+ #include "system.h"
+ #include "error.h"
+ #include "quote.h"
+@@ -138,6 +143,117 @@
+   exit (status);
+ }
+ 
++#if defined(USE_PROCINFO)
++
++# if defined(__s390__) || defined(__s390x__)
++#  define CPUINFO_FILE    "/proc/sysinfo"
++#  define CPUINFO_FORMAT  "%64[^\t :]%*[ :]%256[^\n]%c"
++# else
++#  define CPUINFO_FILE    "/proc/cpuinfo"
++#  define CPUINFO_FORMAT  "%64[^\t:]\t:%256[^\n]%c"
++# endif
++
++# define PROCINFO_PROCESSOR      0
++# define PROCINFO_HARDWARE_PLATFORM 1
++
++static void __eat_cpuinfo_space(char *buf)
++{
++	/* first eat trailing space */
++	char *tmp = buf + strlen(buf) - 1;
++	while (tmp > buf && isspace(*tmp))
++		*tmp-- = '\0';
++	/* then eat leading space */
++	tmp = buf;
++	while (*tmp && isspace(*tmp))
++		tmp++;
++	if (tmp != buf)
++		memmove(buf, tmp, strlen(tmp)+1);
++	/* finally collapse whitespace */
++	tmp = buf;
++	while (tmp[0] && tmp[1]) {
++		if (isspace(tmp[0]) && isspace(tmp[1])) {
++			memmove(tmp, tmp+1, strlen(tmp));
++			continue;
++		}
++		++tmp;
++	}
++}
++
++static int __linux_procinfo(int x, char *fstr, size_t s)
++{
++	FILE *fp;
++
++	char *procinfo_keys[] = {
++		/* --processor --hardware-platform */
++		#if defined(__alpha__)
++			"cpu model", "system type"
++		#elif defined(__arm__)
++			"Processor", "Hardware"
++		#elif defined(__avr32__)
++			"processor", "cpu family"
++		#elif defined(__bfin__)
++			"CPU", "BOARD Name"
++		#elif defined(__cris__)
++			"cpu", "cpu model"
++		#elif defined(__frv__)
++			"CPU-Core", "System"
++		#elif defined(__i386__) || defined(__x86_64__)
++			"model name", "vendor_id"
++		#elif defined(__ia64__)
++			"family", "vendor"
++		#elif defined(__hppa__)
++			"cpu", "model"
++		#elif defined(__m68k__)
++			"CPU", "MMU"
++		#elif defined(__mips__)
++			"cpu model", "system type"
++		#elif defined(__powerpc__) || defined(__powerpc64__)
++			"cpu", "machine"
++		#elif defined(__s390__) || defined(__s390x__)
++			"Type", "Manufacturer"
++		#elif defined(__sh__)
++			"cpu type", "machine"
++		#elif defined(sparc) || defined(__sparc__)
++			"type", "cpu"
++		#elif defined(__vax__)
++			"cpu type", "cpu"
++		#else
++			"unknown", "unknown"
++		#endif
++	};
++
++	if ((fp = fopen(CPUINFO_FILE, "r")) != NULL) {
++		char key[65], value[257], eol, *ret = NULL;
++
++		while (fscanf(fp, CPUINFO_FORMAT, key, value, &eol) != EOF) {
++			__eat_cpuinfo_space(key);
++			if (!strcmp(key, procinfo_keys[x])) {
++				__eat_cpuinfo_space(value);
++				ret = value;
++				break;
++			}
++			if (eol != '\n') {
++				/* we need two fscanf's here in case the previous
++				 * length limit caused us to read right up to the
++				 * newline ... doing "%*[^\n]\n" wont eat the newline
++				 */
++				fscanf(fp, "%*[^\n]");
++				fscanf(fp, "\n");
++			}
++		}
++		fclose(fp);
++
++		if (ret) {
++			strncpy(fstr, ret, s);
++			return 0;
++		}
++	}
++
++	return -1;
++}
++
++#endif
++
+ /* Print ELEMENT, preceded by a space if something has already been
+    printed.  */
+ 
+@@ -250,10 +344,14 @@ main (int argc, char **argv)
+   if (toprint & PRINT_PROCESSOR)
+     {
+       char const *element = unknown;
+-#if HAVE_SYSINFO && defined SI_ARCHITECTURE
++#if ( HAVE_SYSINFO && defined SI_ARCHITECTURE ) || defined(USE_PROCINFO)
+       {
+         static char processor[257];
++#if defined(USE_PROCINFO)
++        if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor))
++#else
+         if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
++#endif
+           element = processor;
+       }
+ #endif
+@@ -306,9 +404,13 @@ main (int argc, char **argv)
+       if (element == unknown)
+         {
+           static char hardware_platform[257];
++#if defined(USE_PROCINFO)
++          if (0 <= __linux_procinfo (PROCINFO_HARDWARE_PLATFORM, hardware_platform, sizeof hardware_platform))
++#else
+           size_t s = sizeof hardware_platform;
+           static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM };
+           if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0)
++#endif
+             element = hardware_platform;
+         }
+ #endif
diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk
index ae8863f..d934ae8 100644
--- a/package/coreutils/coreutils.mk
+++ b/package/coreutils/coreutils.mk
@@ -54,6 +54,14 @@ COREUTILS_CONF_OPT = --disable-rpath \
 		--disable-dependency-tracking \
 		--enable-install-program=hostname
 
+define COREUTILS_TOUCH_UNAME_C
+	# ensure uname.c file's timestamp does not change,
+	# so help2man does not run
+	touch -d '2010-01-01' $(@D)/src/uname.c
+endef
+
+COREUTILS_POST_PATCH_HOOKS += COREUTILS_TOUCH_UNAME_C
+
 define COREUTILS_POST_INSTALL
 	# some things go in root rather than usr
 	for f in $(COREUTILS_BIN_PROGS); do \
-- 
1.7.3

^ permalink raw reply related

* [Buildroot] [PATCH 5/6] coreutils: changed/removed some of the configure environmental variables
From: Martin Banky @ 2010-09-30 19:03 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285873416-20755-1-git-send-email-Martin.Banky@gmail.com>

gl_ac_cv_func_link_follows_symlink=no - changed to gl_cv_func_link_follows_symlink
gl_cv_func_mkdir_trailing_slash_bug=no - no longer used
gl_cv_func_rename_dest_exists_bug=no - no longer used
gl_cv_func_rename_trailing_slash_bug=no - no longer used

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/coreutils/coreutils.mk |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk
index 73dd662..ae8863f 100644
--- a/package/coreutils/coreutils.mk
+++ b/package/coreutils/coreutils.mk
@@ -38,14 +38,11 @@ COREUTILS_CONF_ENV = ac_cv_c_restrict=no \
 		ac_use_included_regex=no \
 		am_cv_func_working_getline=yes \
 		fu_cv_sys_stat_statfs2_bsize=yes \
-		gl_ac_cv_func_link_follows_symlink=no \
 		gl_cv_func_getcwd_null=yes \
 		gl_cv_func_getcwd_path_max=yes \
 		gl_cv_func_gettimeofday_clobber=no \
-		gl_cv_func_mkdir_trailing_slash_bug=no \
+		gl_cv_func_link_follows_symlink=no \
 		gl_cv_func_re_compile_pattern_working=yes \
-		gl_cv_func_rename_dest_exists_bug=no \
-		gl_cv_func_rename_trailing_slash_bug=no \
 		gl_cv_func_svid_putenv=yes \
 		gl_cv_func_tzset_clobber=no \
 		gl_cv_func_working_mkstemp=yes \
-- 
1.7.3

^ permalink raw reply related

* [Buildroot] [PATCH 4/6] coreutils: bump to 8.5
From: Martin Banky @ 2010-09-30 19:03 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285873416-20755-1-git-send-email-Martin.Banky@gmail.com>

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/coreutils/coreutils-7.4-hostname-man.patch |   51 --------------------
 .../coreutils/coreutils-7.4-rename-m4-fix.patch    |   44 -----------------
 package/coreutils/coreutils-8.5-hostname-man.patch |   51 ++++++++++++++++++++
 package/coreutils/coreutils.mk                     |   10 +----
 4 files changed, 52 insertions(+), 104 deletions(-)
 delete mode 100644 package/coreutils/coreutils-7.4-hostname-man.patch
 delete mode 100644 package/coreutils/coreutils-7.4-rename-m4-fix.patch
 create mode 100644 package/coreutils/coreutils-8.5-hostname-man.patch

diff --git a/package/coreutils/coreutils-7.4-hostname-man.patch b/package/coreutils/coreutils-7.4-hostname-man.patch
deleted file mode 100644
index 843ecaa..0000000
--- a/package/coreutils/coreutils-7.4-hostname-man.patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- /dev/null	2010-09-18 00:21:07.280000001 -0700
-+++ b/man/hostname.1	2010-09-23 12:08:06.000000000 -0700
-@@ -0,0 +1,48 @@
-+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.35.
-+.TH HOSTNAME "1" "September 2010" "GNU coreutils 7.4" "User Commands"
-+.SH NAME
-+hostname \- set or print the name of the current host system
-+.SH SYNOPSIS
-+.B hostname
-+[\fINAME\fR]
-+.br
-+.B hostname
-+\fIOPTION\fR
-+.SH DESCRIPTION
-+.\" Add any additional description here
-+.PP
-+Print or set the hostname of the current system.
-+.TP
-+\fB\-\-help\fR
-+display this help and exit
-+.TP
-+\fB\-\-version\fR
-+output version information and exit
-+.SH AUTHOR
-+Written by Jim Meyering.
-+.SH "REPORTING BUGS"
-+Report hostname bugs to bug\-coreutils at gnu.org
-+.br
-+GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
-+.br
-+General help using GNU software: <http://www.gnu.org/gethelp/>
-+.br
-+Report hostname translation bugs to <http://translationproject.org/team/>
-+.SH COPYRIGHT
-+Copyright \(co 2010 Free Software Foundation, Inc.
-+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-+.br
-+This is free software: you are free to change and redistribute it.
-+There is NO WARRANTY, to the extent permitted by law.
-+.SH "SEE ALSO"
-+The full documentation for
-+.B hostname
-+is maintained as a Texinfo manual.  If the
-+.B info
-+and
-+.B hostname
-+programs are properly installed at your site, the command
-+.IP
-+.B info coreutils \(aqhostname invocation\(aq
-+.PP
-+should give you access to the complete manual.
diff --git a/package/coreutils/coreutils-7.4-rename-m4-fix.patch b/package/coreutils/coreutils-7.4-rename-m4-fix.patch
deleted file mode 100644
index 8177200..0000000
--- a/package/coreutils/coreutils-7.4-rename-m4-fix.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Commit 7fcb389fb4cd5ba26e330fef991ffdc05392f289 from gnulib, to fix
-the rename bugs detection macros.
----
- m4/rename.m4 |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Index: coreutils-7.4/m4/rename.m4
-===================================================================
---- coreutils-7.4.orig/m4/rename.m4
-+++ coreutils-7.4/m4/rename.m4
-@@ -51,12 +51,12 @@
-     AC_LIBOBJ([rename])
-     AC_DEFINE([rename], [rpl_rename],
-       [Define to rpl_rename if the replacement function should be used.])
--    if test $gl_cv_func_rename_trailing_slash_bug; then
-+    if test $gl_cv_func_rename_trailing_slash_bug = yes; then
-       AC_DEFINE([RENAME_TRAILING_SLASH_BUG], [1],
- 	[Define if rename does not work for source file names with a trailing
- 	 slash, like the one from SunOS 4.1.1_U1.])
-     fi
--    if test $gl_cv_func_rename_dest_exists_bug; then
-+    if test $gl_cv_func_rename_dest_exists_bug = yes; then
-       AC_DEFINE([RENAME_DEST_EXISTS_BUG], [1],
- 	[Define if rename does not work when the destination file exists,
- 	 as on Windows.])
-Index: coreutils-7.4/configure
-===================================================================
---- coreutils-7.4.orig/configure
-+++ coreutils-7.4/configure
-@@ -28698,12 +28698,12 @@ $as_echo "$gl_cv_func_rename_dest_exists
- 
- $as_echo "#define rename rpl_rename" >>confdefs.h
- 
--    if test $gl_cv_func_rename_trailing_slash_bug; then
-+    if test $gl_cv_func_rename_trailing_slash_bug = yes; then
- 
- $as_echo "#define RENAME_TRAILING_SLASH_BUG 1" >>confdefs.h
- 
-     fi
--    if test $gl_cv_func_rename_dest_exists_bug; then
-+    if test $gl_cv_func_rename_dest_exists_bug = yes; then
- 
- $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
- 
diff --git a/package/coreutils/coreutils-8.5-hostname-man.patch b/package/coreutils/coreutils-8.5-hostname-man.patch
new file mode 100644
index 0000000..6025f56
--- /dev/null
+++ b/package/coreutils/coreutils-8.5-hostname-man.patch
@@ -0,0 +1,51 @@
+--- /dev/null	2010-09-18 00:21:07.280000001 -0700
++++ b/man/hostname.1	2010-09-23 12:08:06.000000000 -0700
+@@ -0,0 +1,48 @@
++.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.35.
++.TH HOSTNAME "1" "September 2010" "GNU coreutils 8.5" "User Commands"
++.SH NAME
++hostname \- set or print the name of the current host system
++.SH SYNOPSIS
++.B hostname
++[\fINAME\fR]
++.br
++.B hostname
++\fIOPTION\fR
++.SH DESCRIPTION
++.\" Add any additional description here
++.PP
++Print or set the hostname of the current system.
++.TP
++\fB\-\-help\fR
++display this help and exit
++.TP
++\fB\-\-version\fR
++output version information and exit
++.SH AUTHOR
++Written by Jim Meyering.
++.SH "REPORTING BUGS"
++Report hostname bugs to bug\-coreutils at gnu.org
++.br
++GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
++.br
++General help using GNU software: <http://www.gnu.org/gethelp/>
++.br
++Report hostname translation bugs to <http://translationproject.org/team/>
++.SH COPYRIGHT
++Copyright \(co 2010 Free Software Foundation, Inc.
++License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
++.br
++This is free software: you are free to change and redistribute it.
++There is NO WARRANTY, to the extent permitted by law.
++.SH "SEE ALSO"
++The full documentation for
++.B hostname
++is maintained as a Texinfo manual.  If the
++.B info
++and
++.B hostname
++programs are properly installed at your site, the command
++.IP
++.B info coreutils \(aqhostname invocation\(aq
++.PP
++should give you access to the complete manual.
diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk
index 7e64d25..73dd662 100644
--- a/package/coreutils/coreutils.mk
+++ b/package/coreutils/coreutils.mk
@@ -3,7 +3,7 @@
 # coreutils
 #
 #############################################################
-COREUTILS_VERSION = 7.4
+COREUTILS_VERSION = 8.5
 COREUTILS_SOURCE = coreutils-$(COREUTILS_VERSION).tar.gz
 COREUTILS_SITE = $(BR2_GNU_MIRROR)/coreutils
 
@@ -57,14 +57,6 @@ COREUTILS_CONF_OPT = --disable-rpath \
 		--disable-dependency-tracking \
 		--enable-install-program=hostname
 
-define COREUTILS_TOUCH_RENAME_M4
-	# ensure rename.m4 file is older than configure / aclocal.m4 so
-	# auto* isn't rerun
-	touch -d '1979-01-01' $(@D)/m4/rename.m4
-endef
-
-COREUTILS_POST_PATCH_HOOKS += COREUTILS_TOUCH_RENAME_M4
-
 define COREUTILS_POST_INSTALL
 	# some things go in root rather than usr
 	for f in $(COREUTILS_BIN_PROGS); do \
-- 
1.7.3

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox