summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-08-22 21:09:34 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2009-08-22 21:09:34 +0200
commit994e42f0b850c8f939dd4c3dc300c8e5d5cb1959 (patch)
tree017565bbffd8d165cf758ff40b718c4102fbfed8
parent361d29abbbbbc313d01ea95862742ad890ad6eea (diff)
parentc823698fc91f462eae028ba7e0dfcb9cc0f3e98c (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
-rw-r--r--mk/build.mk15
-rw-r--r--package/Depends.mk3
-rw-r--r--package/iproute2/Config.in73
-rw-r--r--package/iproute2/Makefile105
-rw-r--r--package/iproute2/patches/patch-Makefile33
-rw-r--r--package/iproute2/patches/patch-configure30
-rw-r--r--package/iproute2/patches/patch-ip_Makefile10
-rw-r--r--package/iproute2/patches/patch-ip_iptunnel_c17
-rw-r--r--package/iproute2/patches/patch-misc_Makefile13
9 files changed, 223 insertions, 76 deletions
diff --git a/mk/build.mk b/mk/build.mk
index df07fcba8..9f2683642 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -117,9 +117,24 @@ root_clean:
@$(TRACE) root_clean
rm -rf $(TARGET_DIR)
+# Do a per-package clean here, too. This way stale headers and
+# libraries from cross_*/target/ get wiped away, which keeps
+# future package build's configure scripts from returning false
+# dependencies information.
+
clean:
@$(TRACE) clean
$(MAKE) -C $(CONFIG) clean
+ for d in ${STAGING_PARENT_PFX}; do \
+ echo "clean: entering $$d" ; \
+ for f in $$d/pkg/[a-z]*; do \
+ echo "clean: cleaning for $$f" ; \
+ while read file ; do \
+ rm $$d/target/$$file ; \
+ done < $$f ; \
+ rm $$f ; \
+ done \
+ done
rm -rf $(BUILD_DIR) $(BIN_DIR) $(TARGET_DIR) ${TOPDIR}/.cfg
rm -f ${TOPDIR}/package/*/info.mk
diff --git a/package/Depends.mk b/package/Depends.mk
index 1c5a671e9..46fab2a02 100644
--- a/package/Depends.mk
+++ b/package/Depends.mk
@@ -75,6 +75,9 @@ ipcad-compile: libpcap-compile
ifeq (${ADK_COMPILE_IPERF_WITH_UCLIBCXX},y)
iperf-compile: uclibc++-compile
endif
+ifneq ($(strip ${ADK_PACKAGE_TC_ATM}),)
+iproute2-compile: linux-atm-compile
+endif
ipsec-tools-compile: openssl-compile
iptraf-compile: ncurses-compile
irssi-compile: glib-compile ncurses-compile
diff --git a/package/iproute2/Config.in b/package/iproute2/Config.in
index a2f60f226..d431a5293 100644
--- a/package/iproute2/Config.in
+++ b/package/iproute2/Config.in
@@ -1,18 +1,79 @@
config ADK_COMPILE_IPROUTE2
+ prompt "iproute2.......................... iproute2 suite of networking utilities"
tristate
default n
config ADK_PACKAGE_IP
- prompt "ip................................ iproute2 routing control utility"
+ prompt "ip................................ ip utility"
tristate
- default n
- select ADK_COMPILE_IPROUTE2
+ default ADK_COMPILE_IPROUTE2
+ depends on ADK_COMPILE_IPROUTE2
+ help
+ IP routing control utility, well-known replacement for ifconfig and route.
config ADK_PACKAGE_TC
- prompt "tc................................ iproute2 traffic control utility"
+ prompt "tc................................ tc utility"
tristate
- default n
- select ADK_COMPILE_IPROUTE2
+ default m
+ depends on ADK_COMPILE_IPROUTE2
help
Traffic shaping control utility. Please choose the kmod-sched-* modules
you need.
+
+config ADK_PACKAGE_TC_ATM
+ prompt "atm support....................... atm support for tc"
+ tristate
+ default n
+ depends on ADK_PACKAGE_TC
+ select ADK_PACKAGE_LIBATM
+ help
+ ATM traffic control support library.
+
+# FIXME: WTF is this "genl" used for??
+# "ifcfg" is lame, just a simple 'ip addr {add|del}' frontend
+
+config ADK_PACKAGE_IFSTAT
+ prompt "ifstat............................ ifstat utility"
+ tristate
+ default m
+ depends on ADK_COMPILE_IPROUTE2
+ help
+ Interface statistics utility.
+
+config ADK_PACKAGE_LNSTAT
+ prompt "lnstat............................ lnstat, ctstat, rtstat, nstat and rtacct utilities"
+ tristate
+ default m
+ depends on ADK_COMPILE_IPROUTE2
+ help
+ Unified linux networking statistics. Lnstat is a replacement for the
+ old rstat program, nstat and rtacct are simple tools to monitor
+ kernel snmp counters and network interface statistics.
+
+
+config ADK_PACKAGE_ROUTEL
+ prompt "routel............................ routel/routef utilities"
+ tristate
+ default m
+ depends on ADK_COMPILE_IPROUTE2
+ help
+ List and flush routes.
+
+config ADK_PACKAGE_RTMON
+ prompt "rtmon............................. RTnetlink monitor"
+ tristate
+ default m
+ depends on ADK_COMPILE_IPROUTE2
+ help
+ Listen to and monitor RTnetlink.
+
+# "rtpr" converts back the output of 'ip -o' (quite useless I guess)
+
+config ADK_PACKAGE_SS
+ prompt "ss................................ socket statistics utility"
+ tristate
+ default m
+ depends on ADK_COMPILE_IPROUTE2
+ help
+ A utility to investigate sockets, similar to netstat.
+
diff --git a/package/iproute2/Makefile b/package/iproute2/Makefile
index ca71c53ab..5195693c0 100644
--- a/package/iproute2/Makefile
+++ b/package/iproute2/Makefile
@@ -5,49 +5,90 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= iproute2
PKG_VERSION:= 2.6.29-1
-PKG_RELEASE:= 1
+PKG_RELEASE:= 2
PKG_MD5SUM:= c1bc258a6c345905e79935ac7a3cc582
PKG_DESCR:= iproute2 routing control utility
PKG_SECTION:= net
PKG_URL:= http://www.linuxfoundation.org/en/Net:Iproute2
PKG_SITES:= http://developer.osdl.org/dev/iproute2/download/
-PKG_DESCR_1:= iproute2 traffic control utility
-PKG_DEPENDS_1:= kmod-sched
+PKG_DESCR_TC:= iproute2 traffic control utility
+PKG_DEPENDS_TC:= kmod-sched
+PKG_DESCR_TC_ATM:= iproute2 traffic control ATM support library
+PKG_DEPENDS_TC_ATM:= tc
+PKG_DESCR_IFSTAT:= iproute2 interface statistics utility
+PKG_DESCR_LNSTAT:= iproute2 network statistics utilities
+PKG_DESCR_ROUTEL:= iproute2 route list and flush utilities
+PKG_DESCR_RTMON:= iproute2 RTnetlink monitor
+PKG_DESCR_SS:= iproute2 socket statistics utility
DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,IP,ip,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-$(eval $(call PKG_template,TC,tc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_1},${PKG_DESCR_1},${PKG_SECTION}))
-
-do-configure:
- ${SED} "s:-O2:${TARGET_CFLAGS}:g" ${WRKBUILD}/Makefile
- ${SED} "s,-I/usr/include/db3,," ${WRKBUILD}/Makefile
- ${SED} "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=${LINUX_DIR}/include," \
- ${WRKBUILD}/Makefile
- ${SED} "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=${STAGING_DIR}/include," \
- ${WRKBUILD}/Makefile
- # For now disable compiling of the misc directory because it seems to fail
- rm -rf ${WRKBUILD}/misc
- ${SED} "s, misc,," ${WRKBUILD}/Makefile
- # netem is 2.6 only stuff
- ${SED} "s, netem,," ${WRKBUILD}/Makefile
-
-do-build:
- ${MAKE} -C ${WRKBUILD}/netem \
- HOSTCC=${HOSTCC} \
- CCOPTS="-I${LINUX_DIR}" \
- ${MAKE} -C ${WRKBUILD} ${TARGET_CONFIGURE_OPTS} \
- CFLAGS="-D_GNU_SOURCE ${TARGET_CFLAGS} -I ../include -DRESOLVE_HOSTNAMES" \
- KERNEL_INCLUDE=${LINUX_DIR}/include all tc/tc ip/ip \
- CCOPTS="-I${LINUX_DIR}"
-
-do-install:
- ${INSTALL_DIR} ${IDIR_IP}/usr/sbin
- ${CP} ${WRKBUILD}/ip/ip ${IDIR_IP}/usr/sbin/
- ${INSTALL_DIR} ${IDIR_TC}/usr/sbin
- ${CP} ${WRKBUILD}/tc/tc ${IDIR_TC}/usr/sbin/
+$(eval $(call PKG_template,TC,tc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_TC},${PKG_DESCR_TC},${PKG_SECTION}))
+$(eval $(call PKG_template,TC_ATM,tc-atm,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_TC_ATM},${PKG_DESCR_TC_ATM},${PKG_SECTION}))
+$(eval $(call PKG_template,IFSTAT,ifstat,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_IFSTAT},${PKG_DESCR_IFSTAT},${PKG_SECTION}))
+$(eval $(call PKG_template,LNSTAT,lnstat,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_LNSTAT},${PKG_DESCR_LNSTAT},${PKG_SECTION}))
+$(eval $(call PKG_template,ROUTEL,routel,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_ROUTEL},${PKG_DESCR_ROUTEL},${PKG_SECTION}))
+$(eval $(call PKG_template,RTMON,rtmon,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_RTMON},${PKG_DESCR_RTMON},${PKG_SECTION}))
+$(eval $(call PKG_template,SS,ss,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_SS},${PKG_DESCR_SS},${PKG_SECTION}))
+
+CONFIGURE_STYLE= gnu
+CONFIGURE_FLAGS+= KERNEL_INCLUDE="${LINUX_DIR}/include"
+MAKE_FLAGS+= MFLAGS="CC=${TARGET_CC}"
+BUILD_STYLE= auto
+INSTALL_STYLE= auto
+
+INSTALL_y:=
+INSTALL_m:=
+INSTALL_${ADK_PACKAGE_IP}:= install-ip
+INSTALL_${ADK_PACKAGE_TC}:= install-tc
+INSTALL_${ADK_PACKAGE_TC_ATM}:= install-tc-atm
+INSTALL_${ADK_PACKAGE_IFSTAT}:= install-ifstat
+INSTALL_${ADK_PACKAGE_LNSTAT}:= install-lnstat
+INSTALL_${ADK_PACKAGE_ROUTEL}:= install-routel
+INSTALL_${ADK_PACKAGE_RTMON}:= install-rtmon
+INSTALL_${ADK_PACKAGE_SS}:= install-ss
+
+post-install: ${INSTALL_y} ${INSTALL_m}
+
+install-ip:
+ ${INSTALL_DIR} ${IDIR_IP}/{etc/iproute2,usr/sbin}
+ ${INSTALL_DATA} ${WRKINST}/etc/iproute2/* ${IDIR_IP}/etc/iproute2/
+ ${INSTALL_BIN} ${WRKINST}/sbin/ip ${IDIR_IP}/usr/sbin/ip
+
+install-tc:
+ ${INSTALL_DIR} ${IDIR_TC}/{lib/tc,usr/sbin}
+ ${INSTALL_DATA} ${WRKINST}/lib/tc/* ${IDIR_TC}/lib/tc/
+ ${INSTALL_BIN} ${WRKINST}/sbin/tc ${IDIR_TC}/usr/sbin/
+
+install-tc-atm:
+ ${INSTALL_DIR} ${IDIR_TC_ATM}/usr/lib/tc
+ ${INSTALL_DATA} ${WRKINST}/usr/lib/tc/q_atm.so ${IDIR_TC_ATM}/usr/lib/tc/
+
+install-ifstat:
+ ${INSTALL_DIR} ${IDIR_IFSTAT}/usr/sbin
+ ${INSTALL_BIN} ${WRKINST}/sbin/ifstat ${IDIR_IFSTAT}/usr/sbin
+
+install-lnstat:
+ ${INSTALL_DIR} ${IDIR_LNSTAT}/usr/sbin
+ ${INSTALL_BIN} ${WRKINST}/sbin/{ln,n}stat ${IDIR_LNSTAT}/usr/sbin
+ ln -sf lnstat ${IDIR_LNSTAT}/usr/sbin/rtstat
+ ln -sf lnstat ${IDIR_LNSTAT}/usr/sbin/ctstat
+ ${INSTALL_BIN} ${WRKINST}/sbin/rtacct ${IDIR_LNSTAT}/usr/sbin
+
+install-routel:
+ ${INSTALL_DIR} ${IDIR_ROUTEL}/usr/sbin
+ ${INSTALL_BIN} ${WRKINST}/sbin/route{l,f} ${IDIR_ROUTEL}/usr/sbin
+
+install-rtmon:
+ ${INSTALL_DIR} ${IDIR_RTMON}/usr/sbin
+ ${INSTALL_BIN} ${WRKINST}/sbin/rtmon ${IDIR_RTMON}/usr/sbin
+
+install-ss:
+ ${INSTALL_DIR} ${IDIR_SS}/usr/sbin
+ ${INSTALL_BIN} ${WRKINST}/sbin/ss ${IDIR_SS}/usr/sbin
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/iproute2/patches/patch-Makefile b/package/iproute2/patches/patch-Makefile
index bb7ba6a10..194162a87 100644
--- a/package/iproute2/patches/patch-Makefile
+++ b/package/iproute2/patches/patch-Makefile
@@ -1,19 +1,30 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- iproute2-2.6.26.orig/Makefile 2008-07-25 22:46:07.000000000 +0200
-+++ iproute2-2.6.26/Makefile 2008-10-09 17:08:16.000000000 +0200
-@@ -21,13 +21,13 @@ ADDLIB+=ipx_ntop.o ipx_pton.o
+ - allow variables to be overridden
+ - allow passing TARGET_CFLAGS
+ overriding CCOPTS instead wont work, as this variable is being
+ used to compile host-utils in netem/
+ - define LIBUTIL for misc/ss to compile correctly
+--- iproute2-2.6.29-1.orig/Makefile 2009-03-24 23:40:54.000000000 +0100
++++ iproute2-2.6.29-1/Makefile 2009-08-22 02:42:31.939603104 +0200
+@@ -20,10 +20,10 @@ ADDLIB+=dnet_ntop.o dnet_pton.o
+ #options for ipx
+ ADDLIB+=ipx_ntop.o ipx_pton.o
- CC = gcc
- HOSTCC = gcc
+-CC = gcc
+-HOSTCC = gcc
-CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall
-+CCOPTS = -D_GNU_SOURCE -fwrapv -fno-ident -fwrapv -fno-ident -O2 -pipe -march=i586 -funit-at-a-time -pipe -march=i586 -funit-at-a-time -Wstrict-prototypes -Wall
- CFLAGS = $(CCOPTS) -I../include $(DEFINES)
+-CFLAGS = $(CCOPTS) -I../include $(DEFINES)
++CC := gcc
++HOSTCC := gcc
++CCOPTS := -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall
++CFLAGS = $(CCOPTS) -I../include $(DEFINES) ${TARGET_CFLAGS}
YACCFLAGS = -d -t -v
LDLIBS += -L../lib -lnetlink -lutil
-
--SUBDIRS=lib ip tc misc netem genl
-+SUBDIRS=lib ip tc genl
+@@ -31,6 +31,7 @@ LDLIBS += -L../lib -lnetlink -lutil
+ SUBDIRS=lib ip tc misc netem genl
LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
++LIBUTIL=../lib/libutil.a
+ all: Config
+ @set -e; \
diff --git a/package/iproute2/patches/patch-configure b/package/iproute2/patches/patch-configure
new file mode 100644
index 000000000..38586090d
--- /dev/null
+++ b/package/iproute2/patches/patch-configure
@@ -0,0 +1,30 @@
+ use the compiler passed in $CC
+--- iproute2-2.6.29-1.orig/configure 2009-03-24 23:40:54.000000000 +0100
++++ iproute2-2.6.29-1/configure 2009-08-22 02:23:52.642364236 +0200
+@@ -16,7 +16,7 @@ int main(int argc, char **argv) {
+ return 0;
+ }
+ EOF
+-gcc -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
++$CC -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
+ if [ $? -eq 0 ]
+ then
+ echo "TC_CONFIG_ATM:=y" >>Config
+@@ -49,7 +49,7 @@ int main(int argc, char **argv) {
+ }
+
+ EOF
+-gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
++$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
+
+ if [ $? -eq 0 ]
+ then
+@@ -81,7 +81,7 @@ int main(int argc, char **argv) {
+ }
+
+ EOF
+-gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
++$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
+
+ if [ $? -eq 0 ]
+ then
diff --git a/package/iproute2/patches/patch-ip_Makefile b/package/iproute2/patches/patch-ip_Makefile
deleted file mode 100644
index d1f2cceec..000000000
--- a/package/iproute2/patches/patch-ip_Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- iproute2-2.6.26.orig/ip/Makefile 2008-07-25 22:46:07.000000000 +0200
-+++ iproute2-2.6.26/ip/Makefile 2008-10-09 17:07:10.000000000 +0200
-@@ -1,5 +1,5 @@
- IPOBJ=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o \
-- rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
-+ rtm_map.o iptunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
- ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o \
- ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o \
- iplink_vlan.o link_veth.o
diff --git a/package/iproute2/patches/patch-ip_iptunnel_c b/package/iproute2/patches/patch-ip_iptunnel_c
deleted file mode 100644
index c9e6098fb..000000000
--- a/package/iproute2/patches/patch-ip_iptunnel_c
+++ /dev/null
@@ -1,17 +0,0 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- iproute2-2.6.26.orig/ip/iptunnel.c 2008-07-25 22:46:07.000000000 +0200
-+++ iproute2-2.6.26/ip/iptunnel.c 2008-10-09 17:08:43.000000000 +0200
-@@ -478,13 +478,6 @@ int do_iptunnel(int argc, char **argv)
- break;
- case AF_INET:
- break;
-- /*
-- * This is silly enough but we have no easy way to make it
-- * protocol-independent because of unarranged structure between
-- * IPv4 and IPv6.
-- */
-- case AF_INET6:
-- return do_ip6tunnel(argc, argv);
- default:
- fprintf(stderr, "Unsupported family:%d\n", preferred_family);
- exit(-1);
diff --git a/package/iproute2/patches/patch-misc_Makefile b/package/iproute2/patches/patch-misc_Makefile
new file mode 100644
index 000000000..95dbe51ec
--- /dev/null
+++ b/package/iproute2/patches/patch-misc_Makefile
@@ -0,0 +1,13 @@
+ disable compiling of arpd since it needs berkeley db which we dont have
+ yet
+--- iproute2-2.6.29-1.orig/misc/Makefile 2009-03-24 23:40:54.000000000 +0100
++++ iproute2-2.6.29-1/misc/Makefile 2009-08-22 02:48:24.794861772 +0200
+@@ -1,7 +1,7 @@
+ SSOBJ=ss.o ssfilter.o
+ LNSTATOBJ=lnstat.o lnstat_util.o
+
+-TARGETS=ss nstat ifstat rtacct arpd lnstat
++TARGETS=ss nstat ifstat rtacct lnstat
+
+ include ../Config
+