package/iputils: move binaries to the location also used by Busybox
PATCH v2 1/2 package/iputils: move binaries to the location also used by Busybox
iputils installs several programs that are also implemented as applets in Busybox. Two of these (arping and tftpd) are installed by iputils in /bin, while Busybox installs them in /usr/sbin, causing both to be present if both iputils and busybox are enabled.
This commit moves the binaries installed by iputils to /usr/sbin, so that only these are installed (Busybox will be installed later thanks to its optional dependency on iputils, but it will not override the tools installed by iputils).
---
Changes since v1:
- Take into account BR2_ROOTFS_MERGED_USR when moving the ping program
--- package/iputils/iputils.mk | 11 +++++++++++ 1 file changed, 11 insertions(+)
package/iputils/iputils.mk +11 -0
@@ -52,6 +52,17 @@ endif # XSL Stylesheets for DocBook 5 not packaged for buildroot IPUTILS_CONF_OPTS += -DBUILD_MANS=false -DBUILD_HTML_MANS=false +# move iputils binaries to the same location as where Busybox installs +# the corresponding applets, so that we have a single version of the +# tools (from iputils) +define IPUTILS_MOVE_BINARIES + mv $(TARGET_DIR)/usr/bin/arping $(TARGET_DIR)/usr/sbin/arping + $(if $(BR2_ROOTFS_MERGED_USR),,\ + mv $(TARGET_DIR)/usr/bin/ping $(TARGET_DIR)/bin/ping) + mv $(TARGET_DIR)/usr/bin/tftpd $(TARGET_DIR)/usr/sbin/tftpd +endef +IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_MOVE_BINARIES + # handle permissions ourselves IPUTILS_CONF_OPTS += -DNO_SETCAP_OR_SUID=true define IPUTILS_PERMISSIONS
Signature · 1 line
2.21.0
PATCH v2 2/2 package/iputils: fix IPUTILS_PERMISSIONS
The IPUTILS_PERMISSIONS variable was wrong, because iputils installs its programs in /usr/bin, not in /bin. It probably was only tested with the merged /usr option enabled.
This commit fixes IPUTILS_PERMISSIONS, taking into account the change done in "package/iputils: move binaries to the location also used by Busybox":
- arping is moved by the post-install target hook to /usr/sbin
- clockdiff is installed by iputils in /usr/bin
- ping is moved by the post-install target hook to /bin, which makes the previously incorrect path in IPUTILS_PERMISSIONS now correct
Fixes:
http://autobuild.buildroot.net/results/fe378bca29c86a681ba9ad40386cb89248195c50/
---
Changes since v1: None
--- package/iputils/iputils.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
package/iputils/iputils.mk +3 -3
@@ -66,9 +66,9 @@ IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_MOVE_BINARIES # handle permissions ourselves IPUTILS_CONF_OPTS += -DNO_SETCAP_OR_SUID=true define IPUTILS_PERMISSIONS - /bin/arping f 4755 0 0 - - - - - - /bin/clockdiff f 4755 0 0 - - - - - - /bin/ping f 4755 0 0 - - - - - + /usr/sbin/arping f 4755 0 0 - - - - - + /usr/bin/clockdiff f 4755 0 0 - - - - - + /bin/ping f 4755 0 0 - - - - - endef $(eval $(meson-package))
Signature · 1 line
2.21.0
PATCH v2 2/2 package/iputils: fix IPUTILS_PERMISSIONS
Both applied to master, thanks.
Quoted 6 lines · Thomas Petazzoni
The
IPUTILS_PERMISSIONSvariable was wrong, because iputils installs its programs in/usr/bin, not in /bin. It probably was only tested with the merged /usr option enabled.This commit fixes
IPUTILS_PERMISSIONS, taking into account the change done in "package/iputils: move binaries to the location also used by
I've added the has of the actual commit here.
Regards,
Arnout
Quoted 38 lines
Busybox":
- arping is moved by the post-install target hook to
/usr/sbin- clockdiff is installed by iputils in
/usr/bin- ping is moved by the post-install target hook to /bin, which makes the previously incorrect path in
IPUTILS_PERMISSIONSnow correctFixes:
http://autobuild.buildroot.net/results/fe378bca29c86a681ba9ad40386cb89248195c50/
Signed-off-by Thomas Petazzoni <[email protected]>---
Changes since v1: None--- package/iputils/iputils.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)package/iputils/iputils.mk +3
-3@@ -66,9 +66,9 @@ IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_MOVE_BINARIES # handle permissions ourselves IPUTILS_CONF_OPTS += -DNO_SETCAP_OR_SUID=true define IPUTILS_PERMISSIONS - /bin/arping f 4755 0 0 - - - - - - /bin/clockdiff f 4755 0 0 - - - - - - /bin/ping f 4755 0 0 - - - - - + /usr/sbin/arping f 4755 0 0 - - - - - + /usr/bin/clockdiff f 4755 0 0 - - - - - + /bin/ping f 4755 0 0 - - - - - endef $(eval $(meson-package))