inetutils: new package
PATCH v2 1/1 inetutils: new package
GNU Inetutils is a collection of common network programs. Clients included:
dnsdomainname, ftp, hostname, ifconfig, logger, ping, ping6, rcp, rexec, rlogin, rsh, talk, telnet, tftp, traceroute, whois Servers included:
ftpd, inetd, rexecd, rlogind, rshd, syslogd, talkd, telnetd, tftpd, uucpd
---
Changes v1 -> v2:
- Changed selections to individual in a menuconfig in Config.in
- Added all possible package dependencies
- Fixed install path of various binaries, no utility redundancy
- Added setuid bit installation where required
package/Config.in | 3 + package/inetutils/0001-PATH_PROCNET_DEV.patch | 20 +++ package/inetutils/Config.in | 172 +++++++++++++++++++++++++ package/inetutils/inetutils.hash | 2 + package/inetutils/inetutils.mk | 103 +++++++++++++++ 5 files changed, 300 insertions(+) create mode 100644 package/inetutils/0001-PATH_PROCNET_DEV.patch create mode 100644 package/inetutils/Config.in create mode 100644 package/inetutils/inetutils.hash create mode 100644 package/inetutils/inetutils.mk
package/Config.in +3 -0
@@ -1017,6 +1017,9 @@ endif source "package/igh-ethercat/Config.in" source "package/igmpproxy/Config.in" source "package/inadyn/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/inetutils/Config.in" +endif source "package/iperf/Config.in" source "package/iproute2/Config.in" source "package/ipsec-tools/Config.in"
package/inetutils/0001-PATH_PROCNET_DEV.patch new file +20 -0
@@ -0,0 +1,20 @@ +Fix missing #define + +Original patch from: +http://repository.timesys.com/buildsources/i/inetutils/inetutils-1.9.1/inetutils-1.9.1-PATH_PROCNET_DEV.patch + +Signed-off-by: Karoly Kasza <[email protected]> + +--- inetutils-1.9.2.orig/ifconfig/system/linux.c 2014-11-01 18:18:20.279765742 +0100 ++++ inetutils-1.9.2/ifconfig/system/linux.c 2014-11-01 18:18:28.000000000 +0100 +@@ -50,6 +50,10 @@ + #include "../ifconfig.h" + + ++#ifndef PATH_PROCNET_DEV ++ #define PATH_PROCNET_DEV "/proc/net/dev" ++#endif ++ + /* ARPHRD stuff. */ + + static void
package/inetutils/Config.in new file +172 -0
172 lines not on this page · raw message
package/inetutils/inetutils.hash new file +2 -0
@@ -0,0 +1,2 @@ +# calculated after checking PGP signature (signed by ams at gnu.org) +sha256 e3783372540772bbadd6aa2c90f8a75511db4e7d40bbfa37ffdb1bc7a9697f3e inetutils-1.9.2.tar.xz
package/inetutils/inetutils.mk new file +103 -0
103 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH v2 1/1 inetutils: new package
Dear Karoly Kasza,
package/inetutils/0001-PATH_PROCNET_DEV.patch
Quoted 5 lines · Karoly Kasza
package/inetutils/0001-PATH_PROCNET_DEV.patch new file +0
-0
A lowercase file name would be nicer here.
Quoted 15 lines
package/inetutils/Config.in new file +9
-0@@ -0,0 +1,172 @@ +menuconfig BR2_PACKAGE_INETUTILS + bool "inetutils" + depends on BR2_USE_WCHAR + help + GNU Inetutils is a collection of common network programs. + Clients included: + dnsdomainname, ftp, hostname, ifconfig, logger, ping, ping6, rcp, + rexec, rlogin, rsh, talk, telnet, tftp, traceroute, whois + Servers included:
package/inetutils/Config.in line 19
Quoted 10 lines
package/inetutils/Config.in new file +10
-0+ ftpd, inetd, rexecd, rlogind, rshd, syslogd, talkd, telnetd, tftpd, + uucpd + +if BR2_PACKAGE_INETUTILS + +config BR2_PACKAGE_INETUTILS_DNSDOMAINNAME + bool "dnsdomainname" + +comment "dnsdomainname overwrites the net-tools package's version if selected!" + depends on BR2_PACKAGE_INETUTILS_DNSDOMAINNAME && BR2_PACKAGE_NET_TOOLS
We don't want to have these comments. Instead, in the Config.in helptext you can indicate something like: "This package may override programs that will overwrite programs already installed by the following
packages: net-tools, ..., ..., ...".
package/inetutils/Config.in line 42
Quoted 3 lines
package/inetutils/Config.in new file +3
-0+config BR2_PACKAGE_INETUTILS_PING + bool "ping" + depends on BR2_INET_IPV6
ping6 needs IPv6. But why ping also needs IPv6 ?
package/inetutils/Config.in line 62
Quoted 3 lines
package/inetutils/Config.in new file +3
-0+config BR2_PACKAGE_INETUTILS_RCP + bool "rcp" + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
Isn't rcp like rsh and al. ? What is the relation with RPC support?
package/inetutils/Config.in line 72
Quoted 3 lines
package/inetutils/Config.in new file +3
-0+config BR2_PACKAGE_INETUTILS_RLOGIN + bool "rlogin" + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
Same here.
If RPC is really needed, I guess we want to be able to use either the native RPC support of the toolchain, or libtirpc.
package/inetutils/Config.in line 126
Quoted 3 lines
package/inetutils/Config.in new file +3
-0+config BR2_PACKAGE_INETUTILS_RLOGIND + bool "rlogind" + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
Also RPC support needed?
Quoted 6 lines
package/inetutils/inetutils.mk new file +0
-0
package/inetutils/inetutils.mk line 10
Quoted 10 lines
package/inetutils/inetutils.mk new file +10
-0@@ -0,0 +1,103 @@ +################################################################################ +# +# inetutils +# +################################################################################ + +INETUTILS_VERSION = 1.9.2 +INETUTILS_SITE = $(BR2_GNU_MIRROR)/inetutils +INETUTILS_SOURCE = inetutils-$(INETUTILS_VERSION).tar.xz +INETUTILS_LICENSE = GPLv3
The license seems to be GPLv3+, not GPLv3.
package/inetutils/inetutils.mk line 20
Quoted 8 lines
package/inetutils/inetutils.mk new file +8
-0+define INETUTILS_PERMISSIONS +/bin/ping f 4755 0 0 - - - - - +/bin/ping6 f 4755 0 0 - - - - - +/usr/bin/rlogin f 4755 0 0 - - - - - +/usr/bin/rsh f 4755 0 0 - - - - - +/usr/bin/rcp f 4755 0 0 - - - - - +/usr/bin/traceroute f 4755 0 0 - - - - - +endef
This will not work, since some of the programs are optional, and the <pkg>_PERMISSIONS mechanism will bail out with an error if a file doesn't exist. So you have to do something like:
ifeq ($(BR2_PACKAGE_INETUTILS_PING),y) INETUTILS_PERMISSIONS += /bin/ping f 4755 0 0 - - - - -$(sep) INETUTILS_CONF_OPTS += --enable-ping INETUTILS_USR_BINS_MOVE += ping
endif
package/inetutils/inetutils.mk line 22
Quoted 1 line
package/inetutils/inetutils.mk new file +1
-0+INETUTILS_CONF_OPTS += --libexecdir=/usr/sbin --disable-clients --disable-servers
Please add a comment that explains why we pass --libexecdir=/usr/sbin.
package/inetutils/inetutils.mk line 30
Quoted 7 lines
package/inetutils/inetutils.mk new file +7
-0+INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_BUSYBOX),busybox) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_NCURSES),ncurses) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_NET_TOOLS),net-tools) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_IPUTILS),iputils) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_RSH_REDONE),rsh-redone) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_SYSKLOGD),sysklogd) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_WHOIS),whois)
I think we should split these dependencies in two categories with a comment:
# ncurses is a dependency of some inetutils programs ... ncurses stuff here ....
# inetutils provides programs also provided by other packages, and we # want inetutils to win over those packages ... busybox, net-tools, iputils, rsh-redone, sysklogd, whois ....
Quoted 37 lines
package/inetutils/inetutils.mk new file +37
-0+INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_DNSDOMAINNAME),--enable-dnsdomainname) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_FTP),--enable-ftp) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_HOSTNAME),--enable-hostname) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_IFCONFIG),--enable-ifconfig) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_LOGGER),--enable-logger) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_PING),--enable-ping) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_PING6),--enable-ping6) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_RCP),--enable-rcp) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_REXEC),--enable-rexec) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_RLOGIN),--enable-rlogin) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_RSH),--enable-rsh) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_TALK),--enable-talk) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_TELNET),--enable-telnet) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_TFTP),--enable-tftp) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_TRACEROUTE),--enable-traceroute) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_WHOIS),--enable-whois) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_FTPD),--enable-ftpd) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_INETD),--enable-inetd) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_REXECD),--enable-rexecd) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_RLOGIND),--enable-rlogind) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_RSHD),--enable-rshd) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_SYSLOGD),--enable-syslogd) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_TALKD),--enable-talkd) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_TELNETD),--enable-telnetd) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_TFTPD),--enable-tftpd) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_UUCPD),--enable-uucpd) + +# Move binaries to proper path (possibly overwriting other utility versions) +define INETUTILS_MOVE_PROPER_PATH + if [ -e $(TARGET_DIR)/usr/bin/dnsdomainname ]; then \ + mv -f $(TARGET_DIR)/usr/bin/dnsdomainname $(TARGET_DIR)/bin/dnsdomainname; \ + fi; + if [ -e $(TARGET_DIR)/usr/bin/ping ]; then \ + mv -f $(TARGET_DIR)/usr/bin/ping $(TARGET_DIR)/bin/ping; \ + fi; + if [ -e $(TARGET_DIR)/usr/bin/ping6 ]; then \ + mv -f $(TARGET_DIR)/usr/bin/ping6 $(TARGET_DIR)/bin/ping6; \
package/inetutils/inetutils.mk line 85
Quoted 10 lines
package/inetutils/inetutils.mk new file +10
-0+ fi; + if [ -e $(TARGET_DIR)/usr/bin/hostname ]; then \ + mv -f $(TARGET_DIR)/usr/bin/hostname $(TARGET_DIR)/bin/hostname; \ + fi; + if [ -e $(TARGET_DIR)/usr/sbin/syslogd ]; then \ + mv -f $(TARGET_DIR)/usr/sbin/syslogd $(TARGET_DIR)/sbin/syslogd; \ + fi; + if [ -e $(TARGET_DIR)/usr/bin/ifconfig ]; then \ + mv -f $(TARGET_DIR)/usr/bin/ifconfig $(TARGET_DIR)/sbin/ifconfig; \ + fi;
Use the INETUTILS_USR_BINS_MOVE variable that will contain the list of programs to move from /usr/bin to /bin, and INETUTILS_USR_SBINS_MOVE will contain the list of programs to move from /usr/sbin to /sbin.
package/inetutils/inetutils.mk line 98
Quoted 11 lines
package/inetutils/inetutils.mk new file +11
-0+# Remove iputils and rsd-redone utilities to avoid redundancy +define INETUTILS_REMOVE_REDUNDANT_TOOLS + if [ -e $(TARGET_DIR)/usr/sbin/in.rlogind ] && [ -e $(TARGET_DIR)/usr/sbin/rlogind ]; then \ + rm $(TARGET_DIR)/usr/sbin/in.rlogind; \ + fi; + if [ -e $(TARGET_DIR)/usr/sbin/in.rshd ] && [ -e $(TARGET_DIR)/usr/sbin/rshd ]; then \ + rm $(TARGET_DIR)/usr/sbin/in.rshd; \ + fi; + if [ -e $(TARGET_DIR)/usr/sbin/in.tftpd ] && [ -e $(TARGET_DIR)/usr/sbin/tftpd ]; then \ + rm $(TARGET_DIR)/usr/sbin/in.tftpd; \ + fi;
Try to also use a make variable to list the programs that should be removed. Maybe you should explicit a bit more why they are redundant. Redundant between what and what?
Could you work on those issues and send an updated version?
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 inetutils: new package
Hello Thomas, all,
I'll look into the matter as soon as I'll have time, until then:
Quoted 5 lines
+++
b/package/inetutils/0001-PATH_PROCNET_DEV.patchA lowercase file name would be nicer here.
OK
+config BR2_PACKAGE_INETUTILS_DNSDOMAINNAME
Quoted 4 lines
package/inetutils/Config.in
Quoted 3 lines
package/inetutils/Config.in new file +3
-0+ bool "dnsdomainname" + +comment "dnsdomainname overwrites the net-tools package's version ifselected!"
Quoted 9 lines
Quoted 1 line
+ depends on
BR2_PACKAGE_INETUTILS_DNSDOMAINNAME&&
BR2_PACKAGE_NET_TOOLSWe don't want to have these comments. Instead, in the Config.in helptext you can indicate something like: "This package may override programs that will overwrite programs already installed by the following
packages: net-tools, ..., ..., ...".
OK
Quoted 7 lines
package/inetutils/Config.in line 42
Quoted 3 lines
package/inetutils/Config.in new file +3
-0+config BR2_PACKAGE_INETUTILS_PING + bool "ping" + depends on BR2_INET_IPV6ping6 needs IPv6. But why ping also needs IPv6 ?
Yeah, this look ridiculous I know, but it did need IPv6 for the compilation as I remember. I'll double check.
Quoted 7 lines
package/inetutils/Config.in line 62
Quoted 3 lines
package/inetutils/Config.in new file +3
-0+config BR2_PACKAGE_INETUTILS_RCP + bool "rcp" + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPCIsn't rcp like rsh and al. ? What is the relation with RPC support?
Like IPv6 above. It did need it at compilation time. I guess it's some dependency of an #include.
Quoted 10 lines
+config
BR2_PACKAGE_INETUTILS_RLOGINReview
Quoted 2 lines
(quoted diff) +2
-0+ bool "rlogin" + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPCSame here.
If RPC is really needed, I guess we want to be able to use either the native RPC support of the toolchain, or libtirpc.
OK, I'll check.
Quoted 8 lines
package/inetutils/Config.in line 126
Quoted 5 lines
package/inetutils/Config.in new file +3
-0+config BR2_PACKAGE_INETUTILS_RLOGIND + bool "rlogind" + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPCAlso RPC support needed?
:) all r* needed RPC for compilation.
Quoted 5 lines
Quoted 2 lines
+INETUTILS_LICENSE = GPLv3
The license seems to be GPLv3+, not GPLv3.
Dunno, I'll check.
Quoted 13 lines
package/inetutils/inetutils.mk line 20
Quoted 8 lines
package/inetutils/inetutils.mk new file +8
-0+define INETUTILS_PERMISSIONS +/bin/ping f 4755 0 0 - - - - - +/bin/ping6 f 4755 0 0 - - - - - +/usr/bin/rlogin f 4755 0 0 - - - - - +/usr/bin/rsh f 4755 0 0 - - - - - +/usr/bin/rcp f 4755 0 0 - - - - - +/usr/bin/traceroute f 4755 0 0 - - - - - +endefThis will not work, since some of the programs are optional, and the <pkg>_PERMISSIONS mechanism will bail out with an error if a file doesn't exist. So you have to do something like:
Quoted 7 lines
ifeq ($(BR2_PACKAGE_INETUTILS_PING),y)
INETUTILS_PERMISSIONS+=/bin/pingf 4755 0 0 - - - - -$(sep)INETUTILS_CONF_OPTS+= --enable-pingINETUTILS_USR_BINS_MOVE+= ping
endif
OK
Quoted 5 lines
Quoted 1 line
+INETUTILS_CONF_OPTS += --libexecdir=/usr/sbin --disable-clients
--disable-servers
Please add a comment that explains why we pass --libexecdir=/usr/sbin.
OK
Quoted 11 lines
package/inetutils/inetutils.mk line 30
Quoted 7 lines
package/inetutils/inetutils.mk new file +7
-0+INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_BUSYBOX),busybox) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_NCURSES),ncurses) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_NET_TOOLS),net-tools) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_IPUTILS),iputils) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_RSH_REDONE),rsh-redone) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_SYSKLOGD),sysklogd) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_WHOIS),whois)I think we should split these dependencies in two categories with a comment:
Quoted 7 lines
# ncurses is a dependency of some inetutils programs ... ncurses stuff here ....# inetutils provides programs also provided by other packages, and we # want inetutils to win over those packages ... busybox, net-tools, iputils, rsh-redone, sysklogd, whois ....
OK
Quoted 71 lines
Quoted 3 lines
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_DNSDOMAINNAME),--enable-dnsdomainname)
Review
Quoted 2 lines
(quoted diff) +2
-0+INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_FTP),--enable-ftp) +INETUTILS_CONF_OPTS += $(if$(BR2_PACKAGE_INETUTILS_HOSTNAME),--enable-hostname)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_IFCONFIG),--enable-ifconfig)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_LOGGER),--enable-logger)
Review
Quoted 2 lines
(quoted diff) +2
-0+INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_PING),--enable-ping) +INETUTILS_CONF_OPTS += $(if$(BR2_PACKAGE_INETUTILS_PING6),--enable-ping6)
Review
Quoted 2 lines
(quoted diff) +2
-0+INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_RCP),--enable-rcp) +INETUTILS_CONF_OPTS += $(if$(BR2_PACKAGE_INETUTILS_REXEC),--enable-rexec)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_RLOGIN),--enable-rlogin)
package/inetutils/inetutils.mk
Quoted 3 lines
package/inetutils/inetutils.mk new file +3
-0+INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_RSH),--enable-rsh) +INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_TALK),--enable-talk) +INETUTILS_CONF_OPTS += $(if$(BR2_PACKAGE_INETUTILS_TELNET),--enable-telnet)
Review
Quoted 2 lines
(quoted diff) +2
-0+INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_TFTP),--enable-tftp) +INETUTILS_CONF_OPTS += $(if$(BR2_PACKAGE_INETUTILS_TRACEROUTE),--enable-traceroute)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_WHOIS),--enable-whois)
Review
Quoted 2 lines
(quoted diff) +2
-0+INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_FTPD),--enable-ftpd) +INETUTILS_CONF_OPTS += $(if$(BR2_PACKAGE_INETUTILS_INETD),--enable-inetd)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_REXECD),--enable-rexecd)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_RLOGIND),--enable-rlogind)
Review
Quoted 2 lines
(quoted diff) +2
-0+INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_RSHD),--enable-rshd) +INETUTILS_CONF_OPTS += $(if$(BR2_PACKAGE_INETUTILS_SYSLOGD),--enable-syslogd)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_TALKD),--enable-talkd)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_TELNETD),--enable-telnetd)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_TFTPD),--enable-tftpd)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_UUCPD),--enable-uucpd)
Review
Quoted 2 lines
(quoted diff) +2
-0+ +# Move binaries to proper path (possibly overwriting other utilityversions)
package/inetutils/inetutils.mk
Quoted 3 lines
package/inetutils/inetutils.mk new file +3
-0+define INETUTILS_MOVE_PROPER_PATH + if [ -e $(TARGET_DIR)/usr/bin/dnsdomainname ]; then \ + mv -f $(TARGET_DIR)/usr/bin/dnsdomainname$(TARGET_DIR)/bin/dnsdomainname; \
package/inetutils/inetutils.mk
Quoted 6 lines
package/inetutils/inetutils.mk new file +6
-0+ fi; + if [ -e $(TARGET_DIR)/usr/bin/ping ]; then \ + mv -f $(TARGET_DIR)/usr/bin/ping $(TARGET_DIR)/bin/ping; \ + fi; + if [ -e $(TARGET_DIR)/usr/bin/ping6 ]; then \ + mv -f $(TARGET_DIR)/usr/bin/ping6 $(TARGET_DIR)/bin/ping6;\
package/inetutils/inetutils.mk
Quoted 3 lines
package/inetutils/inetutils.mk new file +3
-0+ fi; + if [ -e $(TARGET_DIR)/usr/bin/hostname ]; then \ + mv -f $(TARGET_DIR)/usr/bin/hostname$(TARGET_DIR)/bin/hostname; \
package/inetutils/inetutils.mk
Quoted 3 lines
package/inetutils/inetutils.mk new file +3
-0+ fi; + if [ -e $(TARGET_DIR)/usr/sbin/syslogd ]; then \ + mv -f $(TARGET_DIR)/usr/sbin/syslogd$(TARGET_DIR)/sbin/syslogd; \
package/inetutils/inetutils.mk
Quoted 3 lines
package/inetutils/inetutils.mk new file +3
-0+ fi; + if [ -e $(TARGET_DIR)/usr/bin/ifconfig ]; then \ + mv -f $(TARGET_DIR)/usr/bin/ifconfig
Quoted 7 lines
$(TARGET_DIR)/sbin/ifconfig; \
Quoted 1 line
+ fi;
Use the
INETUTILS_USR_BINS_MOVEvariable that will contain the list of programs to move from/usr/binto /bin, andINETUTILS_USR_SBINS_MOVEwill contain the list of programs to move from/usr/sbinto /sbin.
OK
Quoted 12 lines
package/inetutils/inetutils.mk
Quoted 4 lines
package/inetutils/inetutils.mk new file +3
-0+# Remove iputils and rsd-redone utilities to avoid redundancy +define INETUTILS_REMOVE_REDUNDANT_TOOLS + if [ -e $(TARGET_DIR)/usr/sbin/in.rlogind ] && [ -e$(TARGET_DIR)/usr/sbin/rlogind ]; then \
package/inetutils/inetutils.mk
Quoted 3 lines
package/inetutils/inetutils.mk new file +3
-0+ rm $(TARGET_DIR)/usr/sbin/in.rlogind; \ + fi; + if [ -e $(TARGET_DIR)/usr/sbin/in.rshd ] && [ -e$(TARGET_DIR)/usr/sbin/rshd ]; then \
package/inetutils/inetutils.mk
Quoted 3 lines
package/inetutils/inetutils.mk new file +3
-0+ rm $(TARGET_DIR)/usr/sbin/in.rshd; \ + fi; + if [ -e $(TARGET_DIR)/usr/sbin/in.tftpd ] && [ -e
Quoted 8 lines
$(TARGET_DIR)/usr/sbin/tftpd ]; then \
package/inetutils/inetutils.mk line 98
Quoted 2 lines
package/inetutils/inetutils.mk new file +2
-0+ rm $(TARGET_DIR)/usr/sbin/in.tftpd; \ + fi;Try to also use a make variable to list the programs that should be removed. Maybe you should explicit a bit more why they are redundant. Redundant between what and what?
These are the same tools from different packages with different filenames/paths.
Quoted 3 lines
Could you work on those issues and send an updated version?
OFC, I guess I can do this sometime next week.
Kind regards,
Karoly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150205/5502da01/attachment.html>
PATCH v2 1/1 inetutils: new package
Hi Thomas, Yann, all,
Sorry for the large RTT, real life called, she wanted her lawn mower back... :)
Some additional comments on Inetutils v2 patch.
v3 shall follow shortly.
Quoted 7 lines · K?roly Kasza
+++
b/package/inetutils/0001-PATH_PROCNET_DEV.patchQuoted 4 lines
A lowercase file name would be nicer here.
OK
This is the exact (case-sensitive) name of the missing C preprocessor macro defined in the patch. I would rather not lower-case it.
Quoted 10 lines
+config
BR2_PACKAGE_INETUTILS_PINGQuoted 6 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ bool "ping" + depends on BR2_INET_IPV6ping6 needs IPv6. But why ping also needs IPv6 ?
Yeah, this look ridiculous I know, but it did need IPv6 for the compilation as I remember. I'll double check.
ping/ping_common.h has an include for netinet/icmp6.h
It would require some work to create a patch for ping not to depend on icmp6.h - a new separate ping_common6.h or something.
I think this should be left intact.
Quoted 10 lines
+config
BR2_PACKAGE_INETUTILS_RCPQuoted 6 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ bool "rcp" + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPCIsn't rcp like rsh and al. ? What is the relation with RPC support?
Like IPv6 above. It did need it at compilation time. I guess it's some dependency of an #include.
Compilation fails with undefined reference to `rcmd', which is defined in "libc/inet/rpc/rcmd.c" in uClibc.
I'm sure this needs RPC support.
Quoted 5 lines
+config
BR2_PACKAGE_INETUTILS_RLOGINQuoted 3 lines
Quoted 2 lines
(quoted diff) +2
-0+ bool "rlogin" + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
Quoted 8 lines
Quoted 5 lines
Same here.
If RPC is really needed, I guess we want to be able to use either the native RPC support of the toolchain, or libtirpc.
OK, I'll check.
I'm afraid that doesn't seem to be possible.
libtirpc does not include rcmd.c or an "int rcmd()" function which is called by rcp/rsh/rlogin implementations in inetutils.
Quoted 9 lines
+config
BR2_PACKAGE_INETUTILS_RLOGINDQuoted 5 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ bool "rlogind" + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPCAlso RPC support needed?
:) all r* needed RPC for compilation.
Except rexec. My bad.
Quoted 7 lines
+INETUTILS_LICENSE = GPLv3
Quoted 3 lines
The license seems to be GPLv3+, not GPLv3.
Dunno, I'll check.
COPYING looks a pretty standard GPLv3 to me, but of course it states that any later version of GPL can be applied to it / which is also defined in the original GPLv3.
I think all GPLv3 is GPLv3+ in this sense? I don't know the difference.
Quoted 13 lines
+define
INETUTILS_PERMISSIONSQuoted 12 lines
package/inetutils/inetutils.mk line 20
Quoted 7 lines
package/inetutils/inetutils.mk new file +7
-0+/bin/ping f 4755 0 0 - - - - - +/bin/ping6 f 4755 0 0 - - - - - +/usr/bin/rlogin f 4755 0 0 - - - - - +/usr/bin/rsh f 4755 0 0 - - - - - +/usr/bin/rcp f 4755 0 0 - - - - - +/usr/bin/traceroute f 4755 0 0 - - - - - +endefThis will not work, since some of the programs are optional, and the <pkg>_PERMISSIONS mechanism will bail out with an error if a file doesn't exist. So you have to do something like:
Quoted 9 lines
Quoted 7 lines
ifeq ($(BR2_PACKAGE_INETUTILS_PING),y)
INETUTILS_PERMISSIONS+=/bin/pingf 4755 0 0 - - - - -$(sep)INETUTILS_CONF_OPTS+= --enable-pingINETUTILS_USR_BINS_MOVE+= ping
endifOK
Done in v3.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
+INETUTILS_CONF_OPTS += --libexecdir=/usr/sbin --disable-clients
--disable-servers
Please add a comment that explains why we pass --libexecdir=/usr/sbin.
OK
(Because by default the daemons are installed in /usr/libexec, which would make it possible to have multiple versions of the same tools in different paths. Buildroot installs the daemons in the (Linux default) /usr/sbin. Inetutils should do the same.)
Commented in v3.
Quoted 14 lines
+INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_BUSYBOX),busybox)
Quoted 13 lines
package/inetutils/inetutils.mk line 30
Quoted 6 lines
package/inetutils/inetutils.mk new file +6
-0+INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_NCURSES),ncurses) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_NET_TOOLS),net-tools) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_IPUTILS),iputils) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_RSH_REDONE),rsh-redone) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_SYSKLOGD),sysklogd) +INETUTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_WHOIS),whois)I think we should split these dependencies in two categories with a comment:
# ncurses is a dependency of some inetutils programs ... ncurses stuff here ....
Quoted 7 lines
Quoted 4 lines
# inetutils provides programs also provided by other packages, and we # want inetutils to win over those packages ... busybox, net-tools, iputils, rsh-redone, sysklogd, whois ....OK
Done in v3.
Quoted 75 lines
+INETUTILS_CONF_OPTS += $(if
Quoted 74 lines
$(BR2_PACKAGE_INETUTILS_DNSDOMAINNAME),--enable-dnsdomainname)
Review
Quoted 2 lines
(quoted diff) +2
-0+INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_FTP),--enable-ftp) +INETUTILS_CONF_OPTS += $(if$(BR2_PACKAGE_INETUTILS_HOSTNAME),--enable-hostname)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_IFCONFIG),--enable-ifconfig)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_LOGGER),--enable-logger)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_PING),--enable-ping)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_PING6),--enable-ping6)
Review
Quoted 2 lines
(quoted diff) +2
-0+INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_RCP),--enable-rcp) +INETUTILS_CONF_OPTS += $(if$(BR2_PACKAGE_INETUTILS_REXEC),--enable-rexec)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_RLOGIN),--enable-rlogin)
Review
Quoted 2 lines
(quoted diff) +2
-0+INETUTILS_CONF_OPTS += $(if $(BR2_PACKAGE_INETUTILS_RSH),--enable-rsh) +INETUTILS_CONF_OPTS += $(if$(BR2_PACKAGE_INETUTILS_TALK),--enable-talk)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_TELNET),--enable-telnet)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_TFTP),--enable-tftp)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_TRACEROUTE),--enable-traceroute)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_WHOIS),--enable-whois)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_FTPD),--enable-ftpd)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_INETD),--enable-inetd)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_REXECD),--enable-rexecd)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_RLOGIND),--enable-rlogind)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_RSHD),--enable-rshd)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_SYSLOGD),--enable-syslogd)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_TALKD),--enable-talkd)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_TELNETD),--enable-telnetd)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_TFTPD),--enable-tftpd)
Quoted 1 line
+INETUTILS_CONF_OPTS += $(if
$(BR2_PACKAGE_INETUTILS_UUCPD),--enable-uucpd)
Review
Quoted 2 lines
(quoted diff) +2
-0+ +# Move binaries to proper path (possibly overwriting other utilityversions)
package/inetutils/inetutils.mk
Quoted 3 lines
package/inetutils/inetutils.mk new file +3
-0+define INETUTILS_MOVE_PROPER_PATH + if [ -e $(TARGET_DIR)/usr/bin/dnsdomainname ]; then \ + mv -f $(TARGET_DIR)/usr/bin/dnsdomainname$(TARGET_DIR)/bin/dnsdomainname; \
package/inetutils/inetutils.mk
Quoted 6 lines
package/inetutils/inetutils.mk new file +6
-0+ fi; + if [ -e $(TARGET_DIR)/usr/bin/ping ]; then \ + mv -f $(TARGET_DIR)/usr/bin/ping $(TARGET_DIR)/bin/ping; \ + fi; + if [ -e $(TARGET_DIR)/usr/bin/ping6 ]; then \ + mv -f $(TARGET_DIR)/usr/bin/ping6$(TARGET_DIR)/bin/ping6; \
package/inetutils/inetutils.mk
Quoted 3 lines
package/inetutils/inetutils.mk new file +3
-0+ fi; + if [ -e $(TARGET_DIR)/usr/bin/hostname ]; then \ + mv -f $(TARGET_DIR)/usr/bin/hostname$(TARGET_DIR)/bin/hostname; \
package/inetutils/inetutils.mk
Quoted 3 lines
package/inetutils/inetutils.mk new file +3
-0+ fi; + if [ -e $(TARGET_DIR)/usr/sbin/syslogd ]; then \ + mv -f $(TARGET_DIR)/usr/sbin/syslogd$(TARGET_DIR)/sbin/syslogd; \
package/inetutils/inetutils.mk
Quoted 3 lines
package/inetutils/inetutils.mk new file +3
-0+ fi; + if [ -e $(TARGET_DIR)/usr/bin/ifconfig ]; then \ + mv -f $(TARGET_DIR)/usr/bin/ifconfig$(TARGET_DIR)/sbin/ifconfig; \
Quoted 9 lines
Quoted 6 lines
Quoted 1 line
+ fi;
Use the
INETUTILS_USR_BINS_MOVEvariable that will contain the list of programs to move from/usr/binto /bin, andINETUTILS_USR_SBINS_MOVEwill contain the list of programs to move from/usr/sbinto /sbin.OK
Done in v3.
Quoted 15 lines
Quoted 15 lines
+# Remove iputils and rsd-redone utilities to avoid redundancy
Review
Quoted 2 lines
(quoted diff) +2
-0+define INETUTILS_REMOVE_REDUNDANT_TOOLS + if [ -e $(TARGET_DIR)/usr/sbin/in.rlogind ] && [ -e$(TARGET_DIR)/usr/sbin/rlogind ]; then \
package/inetutils/inetutils.mk
Quoted 3 lines
package/inetutils/inetutils.mk new file +3
-0+ rm $(TARGET_DIR)/usr/sbin/in.rlogind; \ + fi; + if [ -e $(TARGET_DIR)/usr/sbin/in.rshd ] && [ -e$(TARGET_DIR)/usr/sbin/rshd ]; then \
package/inetutils/inetutils.mk
Quoted 3 lines
package/inetutils/inetutils.mk new file +3
-0+ rm $(TARGET_DIR)/usr/sbin/in.rshd; \ + fi; + if [ -e $(TARGET_DIR)/usr/sbin/in.tftpd ] && [ -e$(TARGET_DIR)/usr/sbin/tftpd ]; then \
Quoted 2 lines
package/inetutils/inetutils.mk new file +2
-0+ rm $(TARGET_DIR)/usr/sbin/in.tftpd; \ + fi;
Quoted 8 lines
Quoted 4 lines
Try to also use a make variable to list the programs that should be removed. Maybe you should explicit a bit more why they are redundant. Redundant between what and what?
These are the same tools from different packages with different filenames/paths.
Added comment and variable in v3.
Best regards,
Karoly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150225/6d45c401/attachment.html>