Skip to contentSkip to conversation

package/busybox: invert dependencies

PATCH New Yann E. MORIN 3 participants 68 messages Jul 8, 2018 – Jul 9, 2018

lore
Share & tools
lore
#0 lore raw

v2 cover package/busybox: invert dependencies

Hello All!

Currently, the issue that busybox may install the same executables as those from other packages, is handled in all those packages. This is not very practical from a maintenance point of view.

Furthermore, this means that those packages all overwrite the busybox-installed applets, which means that this triggers the no-two-packages-touch-the-same-file rule. So far, this is only a warning, but when we eventually go with TLPB, we may have to enforce that rule.

But busybox can be told to be smart, and not replace existing files during installation. This is in fact what we do with a hook, which uses 'sed' to force the 'noclobber' install. But now, Busybox upstream has proper support for doing a noclobber install without artifice. So we bump busybox to the latest release, use the new install-noclobber rule, and drop our hook.

All other commits are just trivial dependency order exchange between a package and busybox, except for syslog-ng, for which we must take care that busybox does not overwrite the init script.

Eventually, we also add a new dependency onto the 'attr' package, to solve a potential conflict with the setfattr applet.

Inverting a single dependency could introduce a dependency loop, which would be resolved by a latter inversion. For example, suppose we were to start with this initial situation:

    B -->-- A -->-- busybox
     `------>-------'

With the first inversion, we'd get to now have a dependency loop:

    B -->-- A -->-- busybox -->-- B

Then with the second inversion, we'd resolve that loop:

                    busybox -->-- B -->-- A
                           `------>------'

Detecting and avoiding those loops is not trivial, because they may imply multiple intermediate packages between B and A. So, the series does not attempt to prevent those loops, as they are entirely resolved by the end of the series anyway.

Regards,
Yann E. MORIN.

The following changes since commit 0fe0c50d3683be4975a4551ac183707692b11215

systemd: Fix polkit build order (2018-07-08 00:19:37 +0200)

are available in the git repository at:

git://git.buildroot.org/~ymorin/git/buildroot.git

for you to fetch changes up to 7d4417e280d8c1db48496f8e35895c4819cae957

support/scripts: don't draw most of busybox' dependencies (2018-07-08 11:24:23 +0200)

----------------------------------------------------------------
Yann E. MORIN (50):
package/busybox: update to 1.29.0 package/busybox: invert dependency with whois package/busybox: invert dependency with wget package/busybox: invert dependency with vim package/busybox: invert dependency with util-linux package/busybox: invert dependency with usbutils package/busybox: invert dependency with unzip package/busybox: invert dependency with traceroute package/busybox: invert dependency with tftpd package/busybox: invert dependency with tar package/busybox: invert dependency with sysvinit package/busybox: invert dependency with systemd package/busybox: invert dependency with syslog-ng package/busybox: invert dependency with sysklogd package/busybox: invert dependency with start-stop-daemon package/busybox: invert dependency with rsyslog package/busybox: invert dependency with psmisc package/busybox: invert dependency with procps-ng package/busybox: invert dependency with pciutils package/busybox: invert dependency with ntp package/busybox: invert dependency with nmap package/busybox: invert dependency with netcat-openbsd package/busybox: invert dependency with netcat package/busybox: invert dependency with net-tools package/busybox: invert dependency with mtd package/busybox: invert dependency with lsof package/busybox: invert dependency with less package/busybox: invert dependency with kmod package/busybox: invert dependency with iputils package/busybox: invert dependency with iproute2 package/busybox: invert dependency with ifupdown package/busybox: invert dependency with ifplugd package/busybox: invert dependency with ifenslave package/busybox: invert dependency with i2c-tools package/busybox: invert dependency with gzip package/busybox: invert dependency with grep package/busybox: invert dependency with gawk package/busybox: invert dependency with fbset package/busybox: invert dependency with e2fsprogs package/busybox: invert dependency with dos2unix package/busybox: invert dependency with diffutils package/busybox: invert dependency with debianutils package/busybox: invert dependency with dcron package/busybox: invert dependency with cpio package/busybox: invert dependency with coreutils package/busybox: invert dependency with binutils package/busybox: invert dependency with bc package/busybox: invert dependency with bash package/busybox: add dependency on attr support/scripts: don't draw most of busybox' dependencies

 package/bash/bash.mk                               |  4 +-
 package/bc/bc.mk                                   |  5 --
 package/binutils/binutils.mk                       |  5 --
 ...ags-strip-non-l-arguments-returned-by-pkg.patch |  4 +-
 package/busybox/busybox.hash                       | 10 +---
 package/busybox/busybox.mk                         | 68 +++++++++++++++++++---
 package/coreutils/coreutils.mk                     |  6 --
 package/cpio/cpio.mk                               |  1 -
 package/dcron/dcron.mk                             |  5 --
 package/debianutils/debianutils.mk                 |  2 -
 package/diffutils/diffutils.mk                     |  4 --
 package/dos2unix/dos2unix.mk                       |  4 +-
 package/e2fsprogs/e2fsprogs.mk                     | 10 +---
 package/fbset/fbset.mk                             |  5 --
 package/gawk/gawk.mk                               |  5 --
 package/grep/grep.mk                               |  5 --
 package/gzip/gzip.mk                               |  2 -
 package/i2c-tools/i2c-tools.mk                     |  4 --
 package/ifenslave/ifenslave.mk                     |  1 -
 package/ifplugd/ifplugd.mk                         |  5 --
 package/ifupdown/ifupdown.mk                       |  1 -
 package/iproute2/iproute2.mk                       |  6 --
 package/iputils/iputils.mk                         |  6 --
 package/kmod/kmod.mk                               |  3 -
 package/less/less.mk                               |  3 +-
 package/lsof/lsof.mk                               |  3 -
 package/mtd/mtd.mk                                 |  4 --
 package/net-tools/net-tools.mk                     |  8 +--
 package/netcat-openbsd/netcat-openbsd.mk           |  6 --
 package/netcat/netcat.mk                           | 13 -----
 package/nmap/nmap.mk                               |  6 --
 package/ntp/ntp.mk                                 |  2 +-
 package/pciutils/pciutils.mk                       |  5 --
 package/procps-ng/procps-ng.mk                     | 10 +---
 package/psmisc/psmisc.mk                           |  5 --
 package/rsyslog/rsyslog.mk                         |  5 --
 package/start-stop-daemon/start-stop-daemon.mk     |  3 +-
 package/sysklogd/sysklogd.mk                       |  5 --
 package/syslog-ng/syslog-ng.mk                     |  5 --
 package/systemd/systemd.mk                         |  6 --
 package/sysvinit/sysvinit.mk                       |  5 --
 package/tar/tar.mk                                 |  7 +--
 package/tftpd/tftpd.mk                             |  5 --
 package/traceroute/traceroute.mk                   |  5 --
 package/unzip/unzip.mk                             |  2 -
 package/usbutils/usbutils.mk                       |  5 --
 package/util-linux/util-linux.mk                   |  6 --
 package/vim/vim.mk                                 |  5 +-
 package/wget/wget.mk                               |  5 --
 package/whois/whois.mk                             |  3 +-
 support/scripts/graph-depends                      | 11 ++++
 51 files changed, 90 insertions(+), 229 deletions(-)
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH v2 1/50 package/busybox: update to 1.29.0

The two patches are still needed, with the second needing a slight refresh around the edge.

Since upstream has now full support to perform a noclobber install, drop of our hook and use the new install rule.

Cc Baruch Siach <[email protected]>
Cc Matt Weber <[email protected]>

---
Notes: Matt, I did not carry your reviewd-by tag, as the patch entirely changed since you reviewed it. Thanks for your initial review! :-)

---
Changes v1?-> v2;
- bump version now it is released (Baruch)

---
 ...akefile.flags-strip-non-l-arguments-returned-by-pkg.patch |  4 +++-
 package/busybox/busybox.hash                                 | 10 +++-------
 package/busybox/busybox.mk                                   | 12 ++++--------
 3 files changed, 10 insertions(+), 16 deletions(-)
package/busybox/0002-Makefile.flags-strip-non-l-arguments-returned-by-pkg.patch +3 -1
index a5da3a251e..8375ae0531 100644
@@ -4,6 +4,8 @@ Date: Mon, 25 Nov 2013 22:51:53 +0100
 Subject: [PATCH] Makefile.flags: strip non -l arguments returned by pkg-config
 
 Signed-off-by: Thomas Petazzoni <[email protected]>
+[yann.morin.1998 at free.fr: refresh for 1.29.0]
+Signed-off-by: "Yann E. MORIN" <[email protected]>
 ---
  Makefile.flags | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
@@ -22,7 +24,7 @@ index 307afa7..885e323 100644
 +       $(SELINUX_PC_MODULES:lib%=%))
  endif
  
- ifeq ($(CONFIG_EFENCE),y)
+ ifeq ($(CONFIG_FEATURE_NSLOOKUP_BIG),y)
 -- 
 1.8.1.2
 
package/busybox/busybox.hash +3 -7
index 066817aefb..26194be3a9 100644
@@ -1,7 +1,3 @@
-# From https://busybox.net/downloads/busybox-1.28.4.tar.bz2.sign
-md5 5661d013c9ef7cc31a453640c320f56b  busybox-1.28.4.tar.bz2
-sha1 acd0558a659b795da1dfbd7e0ed5353d6836fa37  busybox-1.28.4.tar.bz2
-
-# Locally calculated
-sha256 e3c14a3699dc7e82fed397392957afc78e37bdf25398ac38ead6e84621b2ae6a  busybox-1.28.4.tar.bz2
-sha256	bbfc9843646d483c334664f651c208b9839626891d8f17604db2146962f43548	LICENSE
+# From https://busybox.net/downloads/busybox-1.29.0.tar.bz2.sha256
+sha256 c8115612f0be640644e7c35098766ddaac4a88b773c4c4f0e43564982f660c82  busybox-1.29.0.tar.bz2
+sha256 bbfc9843646d483c334664f651c208b9839626891d8f17604db2146962f43548  LICENSE
package/busybox/busybox.mk +4 -8
index ba5a16b5b7..948a8313c3 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-BUSYBOX_VERSION = 1.28.4
+BUSYBOX_VERSION = 1.29.0
 BUSYBOX_SITE = http://www.busybox.net/downloads
 BUSYBOX_SOURCE = busybox-$(BUSYBOX_VERSION).tar.bz2
 BUSYBOX_LICENSE = GPL-2.0
@@ -253,12 +253,6 @@ define BUSYBOX_INSTALL_ADD_TO_SHELLS
 endef
 BUSYBOX_TARGET_FINALIZE_HOOKS += BUSYBOX_INSTALL_ADD_TO_SHELLS
 
-# Enable "noclobber" in install.sh, to prevent BusyBox from overwriting any
-# full-blown versions of apps installed by other packages with sym/hard links.
-define BUSYBOX_NOCLOBBER_INSTALL
-	$(SED) 's/^noclobber="0"$$/noclobber="1"/' $(@D)/applets/install.sh
-endef
-
 define BUSYBOX_KCONFIG_FIXUP_CMDS
 	$(BUSYBOX_SET_MMU)
 	$(BUSYBOX_PREFER_STATIC)
@@ -280,7 +274,9 @@ define BUSYBOX_BUILD_CMDS
 endef
 
 define BUSYBOX_INSTALL_TARGET_CMDS
-	$(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(@D) install
+	# Use the 'noclobber' install rule, to prevent BusyBox from overwriting
+	# any full-blown versions of apps installed by other packages.
+	$(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(@D) install-noclobber
 	$(BUSYBOX_INSTALL_INITTAB)
 	$(BUSYBOX_INSTALL_UDHCPC_SCRIPT)
 	$(BUSYBOX_INSTALL_MDEV_CONF)
Signature · 1 line
2.14.1
#2 lore raw

PATCH v2 1/50 package/busybox: update to 1.29.0

Quoted 2 lines · Yann E. MORIN

The two patches are still needed, with the second needing a slight refresh around the edge.

Is the first one really needed? If it is, the patch description should be
updated, because since 4e8dadfe4b9c it no longer replaces net/if_packet.h with linux/if_packet.h since upstream no longer includes net/if_packet.h.

It would be nice if the two patches (if really needed) could be upstreamed.

Quoted 3 lines

Since upstream has now full support to perform a noclobber install, drop of our hook and use the new install rule.

I've corrected this sentence and applied to master, thanks.

Quoted 13 lines
Cc Baruch Siach <[email protected]>
Cc Matt Weber <[email protected]>

---
Notes: Matt, I did not carry your reviewd-by tag, as the patch entirely changed since you reviewed it. Thanks for your initial review! :-)

---
Changes v1?-> v2;
- bump version now it is released (Baruch)
---

[snip]

package/busybox/busybox.mk define BUSYBOX_BUILD_CMDS · line 279

Quoted 5 lines

define BUSYBOX_INSTALL_TARGET_CMDS

package/busybox/busybox.mk +3 -1
-	$(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(@D) install
+	# Use the 'noclobber' install rule, to prevent BusyBox from overwriting
+	# any full-blown versions of apps installed by other packages.
+	$(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(@D) install-noclobber

Small nit: I don't like comments within _CMDS very much, because they will
appear in the output (they are interpreted as shell commands, and the shell just happens to treat # lines as comments as well). So I generally prefer to have the comments _before_ the define.

But I've left it as is for now. It's no big deal.

Regards,
Arnout

Quoted 4 lines
package/busybox/busybox.mk +0 -0
 	$(BUSYBOX_INSTALL_INITTAB)
 	$(BUSYBOX_INSTALL_UDHCPC_SCRIPT)
 	$(BUSYBOX_INSTALL_MDEV_CONF)
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#3 lore raw

PATCH v2 2/50 package/busybox: invert dependency with whois

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 4 ++++
 package/whois/whois.mk     | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)
package/busybox/busybox.mk +4 -0
index 948a8313c3..47047d1a81 100644
@@ -20,6 +20,10 @@ BUSYBOX_CFLAGS = \
 BUSYBOX_LDFLAGS = \
 	$(TARGET_LDFLAGS)
 
+# Packages that provide commands that may also be busybox applets:
+BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_WHOIS),whois)
+
 # Link against libtirpc if available so that we can leverage its RPC
 # support for NFS mounting with BusyBox
 ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
package/whois/whois.mk +1 -2
index c9203d8c0d..6b6069c51a 100644
@@ -7,8 +7,7 @@
 WHOIS_VERSION = 5.3.1
 WHOIS_SITE = http://snapshot.debian.org/archive/debian/20180522T155750Z/pool/main/w/whois
 WHOIS_SOURCE = whois_$(WHOIS_VERSION).tar.xz
-# take precedence over busybox implementation
-WHOIS_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox) $(TARGET_NLS_DEPENDENCIES)
+WHOIS_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 WHOIS_MAKE_ENV = $(TARGET_MAKE_ENV)
 WHOIS_MAKE_OPTS = CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
 	LIBS="$(WHOIS_EXTRA_LIBS)"
Signature · 1 line
2.14.1
#4 lore raw

PATCH v2 3/50 package/busybox: invert dependency with wget

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/wget/wget.mk       | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)
package/busybox/busybox.mk +1 -0
index 47047d1a81..e5de1b7284 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_WGET),wget) \
 	$(if $(BR2_PACKAGE_WHOIS),whois)
 
 # Link against libtirpc if available so that we can leverage its RPC
package/wget/wget.mk +0 -5
index 36afea761a..28bd0a264f 100644
@@ -11,11 +11,6 @@ WGET_DEPENDENCIES = host-pkgconf
 WGET_LICENSE = GPL-3.0+
 WGET_LICENSE_FILES = COPYING
 
-# Prefer full-blown wget over busybox
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-WGET_DEPENDENCIES += busybox
-endif
-
 ifeq ($(BR2_PACKAGE_GNUTLS),y)
 WGET_CONF_OPTS += --with-ssl=gnutls
 WGET_DEPENDENCIES += gnutls
Signature · 1 line
2.14.1
#5 lore raw

PATCH v2 4/50 package/busybox: invert dependency with vim

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/vim/vim.mk         | 5 +----
 2 files changed, 2 insertions(+), 4 deletions(-)
package/busybox/busybox.mk +1 -0
index e5de1b7284..c42c4a470a 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_VIM),vim) \
 	$(if $(BR2_PACKAGE_WGET),wget) \
 	$(if $(BR2_PACKAGE_WHOIS),whois)
 
package/vim/vim.mk +1 -4
index 0c02ead7b5..dbf71c573f 100644
@@ -6,10 +6,7 @@
 
 VIM_VERSION = v8.1.0133
 VIM_SITE = $(call github,vim,vim,$(VIM_VERSION))
-# Win over busybox vi since vim is more feature-rich
-VIM_DEPENDENCIES = \
-	ncurses $(TARGET_NLS_DEPENDENCIES) \
-	$(if $(BR2_PACKAGE_BUSYBOX),busybox)
+VIM_DEPENDENCIES = ncurses $(TARGET_NLS_DEPENDENCIES)
 VIM_SUBDIR = src
 VIM_CONF_ENV = \
 	vim_cv_toupper_broken=no \
Signature · 1 line
2.14.1
#6 lore raw

PATCH v2 5/50 package/busybox: invert dependency with util-linux

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk       | 1 +
 package/util-linux/util-linux.mk | 6 ------
 2 files changed, 1 insertion(+), 6 deletions(-)
package/busybox/busybox.mk +1 -0
index c42c4a470a..38f0246b4f 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_UTIL_LINUX),util-linux) \
 	$(if $(BR2_PACKAGE_VIM),vim) \
 	$(if $(BR2_PACKAGE_WGET),wget) \
 	$(if $(BR2_PACKAGE_WHOIS),whois)
package/util-linux/util-linux.mk +0 -6
index 80a8a08051..76f4b97f5f 100644
@@ -31,12 +31,6 @@ HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
 # We also don't want the host-python dependency
 HOST_UTIL_LINUX_CONF_OPTS = --without-python
 
-# If both util-linux and busybox are selected, make certain util-linux
-# wins the fight over who gets to have their utils actually installed
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-UTIL_LINUX_DEPENDENCIES += busybox
-endif
-
 # Prevent the installation from attempting to move shared libraries from
 # ${usrlib_execdir} (/usr/lib) to ${libdir} (/lib), since both paths are
 # the same when merged usr is in use.
Signature · 1 line
2.14.1
#7 lore raw

PATCH v2 6/50 package/busybox: invert dependency with usbutils

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk   | 1 +
 package/usbutils/usbutils.mk | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)
package/busybox/busybox.mk +1 -0
index 38f0246b4f..817f7a9c63 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_USBUTILS),usbutils) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX),util-linux) \
 	$(if $(BR2_PACKAGE_VIM),vim) \
 	$(if $(BR2_PACKAGE_WGET),wget) \
package/usbutils/usbutils.mk +0 -5
index 43322e4a65..4bd12f34ff 100644
@@ -11,11 +11,6 @@ USBUTILS_DEPENDENCIES = host-pkgconf libusb udev
 USBUTILS_LICENSE = GPL-2.0+ (utils) GPL-2.0 or GPL-3.0 (lsusb.py)
 USBUTILS_LICENSE_FILES = LICENSES/GPL-2.0.txt LICENSES/GPL-3.0.txt
 
-# Build after busybox since it's got a lightweight lsusb
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-USBUTILS_DEPENDENCIES += busybox
-endif
-
 # Nice lsusb.py script only if there's python 3.x
 ifeq ($(BR2_PACKAGE_PYTHON3),)
 define USBUTILS_REMOVE_PYTHON
Signature · 1 line
2.14.1
#8 lore raw

PATCH v2 7/50 package/busybox: invert dependency with unzip

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/unzip/unzip.mk     | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)
package/busybox/busybox.mk +1 -0
index 817f7a9c63..45153731af 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_UNZIP),unzip) \
 	$(if $(BR2_PACKAGE_USBUTILS),usbutils) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX),util-linux) \
 	$(if $(BR2_PACKAGE_VIM),vim) \
package/unzip/unzip.mk +0 -2
index 7d48d25309..cff5951ac0 100644
@@ -7,8 +7,6 @@
 UNZIP_VERSION = 60
 UNZIP_SOURCE = unzip$(UNZIP_VERSION).tgz
 UNZIP_SITE = ftp://ftp.info-zip.org/pub/infozip/src
-# take precedence over busybox implementation
-UNZIP_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox)
 UNZIP_LICENSE = Info-ZIP
 UNZIP_LICENSE_FILES = LICENSE
 
Signature · 1 line
2.14.1
#9 lore raw

PATCH v2 8/50 package/busybox: invert dependency with traceroute

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk       | 1 +
 package/traceroute/traceroute.mk | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)
package/busybox/busybox.mk +1 -0
index 45153731af..36527ce24e 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_TRACEROUTE),traceroute) \
 	$(if $(BR2_PACKAGE_UNZIP),unzip) \
 	$(if $(BR2_PACKAGE_USBUTILS),usbutils) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX),util-linux) \
package/traceroute/traceroute.mk +0 -5
index d01c62d5ea..192197498d 100644
@@ -10,11 +10,6 @@ TRACEROUTE_SITE = http://downloads.sourceforge.net/traceroute/traceroute/tracero
 TRACEROUTE_LICENSE = GPL-2.0+, LGPL-2.1+
 TRACEROUTE_LICENSE_FILES = COPYING COPYING.LIB
 
-# Prefer full-featured traceroute over busybox's version
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-TRACEROUTE_DEPENDENCIES += busybox
-endif
-
 define TRACEROUTE_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
 		CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" -C $(@D)
Signature · 1 line
2.14.1
#10 lore raw

PATCH v2 9/50 package/busybox: invert dependency with tftpd

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/tftpd/tftpd.mk     | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)
package/busybox/busybox.mk +1 -0
index 36527ce24e..270dcc1416 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_TFTPD),tftpd) \
 	$(if $(BR2_PACKAGE_TRACEROUTE),traceroute) \
 	$(if $(BR2_PACKAGE_UNZIP),unzip) \
 	$(if $(BR2_PACKAGE_USBUTILS),usbutils) \
package/tftpd/tftpd.mk +0 -5
index 78df835aa5..c42456afd1 100644
@@ -9,11 +9,6 @@ TFTPD_SOURCE = tftp-hpa-$(TFTPD_VERSION).tar.xz
 TFTPD_SITE = $(BR2_KERNEL_MIRROR)/software/network/tftp/tftp-hpa
 TFTPD_CONF_OPTS = --without-tcpwrappers
 
-# Override BusyBox implementations if BusyBox is enabled.
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-TFTPD_DEPENDENCIES += busybox
-endif
-
 define TFTPD_INSTALL_TARGET_CMDS
 	$(INSTALL) -D $(@D)/tftp/tftp $(TARGET_DIR)/usr/bin/tftp
 	$(INSTALL) -D $(@D)/tftpd/tftpd $(TARGET_DIR)/usr/sbin/tftpd
Signature · 1 line
2.14.1
#11 lore raw

PATCH v2 10/50 package/busybox: invert dependency with tar

In reply to Yann E. MORIN

---
Chamges v1 -> v2:
- fix typo (Baruch)

---
 package/busybox/busybox.mk | 1 +
 package/tar/tar.mk         | 7 +------
 2 files changed, 2 insertions(+), 6 deletions(-)
package/busybox/busybox.mk +1 -0
index 270dcc1416..ff2e4c770c 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_TAR),tar) \
 	$(if $(BR2_PACKAGE_TFTPD),tftpd) \
 	$(if $(BR2_PACKAGE_TRACEROUTE),traceroute) \
 	$(if $(BR2_PACKAGE_UNZIP),unzip) \
package/tar/tar.mk +1 -6
index 9942e77737..6f609d7a02 100644
@@ -8,16 +8,11 @@ TAR_VERSION = 1.29
 TAR_SOURCE = tar-$(TAR_VERSION).tar.xz
 TAR_SITE = $(BR2_GNU_MIRROR)/tar
 # busybox installs in /bin, so we need tar to install as well in /bin
-# so that it overrides the Busybox symlinks.
+# so that we don't end up with two different tar
 TAR_CONF_OPTS = --exec-prefix=/
 TAR_LICENSE = GPL-3.0+
 TAR_LICENSE_FILES = COPYING
 
-# Prefer full-blown tar over buybox's version
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-TAR_DEPENDENCIES += busybox
-endif
-
 ifeq ($(BR2_PACKAGE_ACL),y)
 TAR_DEPENDENCIES += acl
 TAR_CONF_OPTS += --with-posix-acls
Signature · 1 line
2.14.1
#12 lore raw

PATCH v2 11/50 package/busybox: invert dependency with sysvinit

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk   | 1 +
 package/sysvinit/sysvinit.mk | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)
package/busybox/busybox.mk +1 -0
index ff2e4c770c..e504924540 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_SYSVINIT),sysvinit) \
 	$(if $(BR2_PACKAGE_TAR),tar) \
 	$(if $(BR2_PACKAGE_TFTPD),tftpd) \
 	$(if $(BR2_PACKAGE_TRACEROUTE),traceroute) \
package/sysvinit/sysvinit.mk +0 -5
index a606ddabf0..993e399e73 100644
@@ -13,11 +13,6 @@ SYSVINIT_LICENSE_FILES = COPYING
 
 SYSVINIT_MAKE_OPTS = SYSROOT=$(STAGING_DIR)
 
-# Override BusyBox implementations if BusyBox is enabled.
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-SYSVINIT_DEPENDENCIES = busybox
-endif
-
 ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
 SYSVINIT_DEPENDENCIES += libselinux
 SYSVINIT_MAKE_OPTS += WITH_SELINUX="yes"
Signature · 1 line
2.14.1
#13 lore raw

PATCH v2 12/50 package/busybox: invert dependency with systemd

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/systemd/systemd.mk | 6 ------
 2 files changed, 1 insertion(+), 6 deletions(-)
package/busybox/busybox.mk +1 -0
index e504924540..9d3ea22d96 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_SYSTEMD),systemd) \
 	$(if $(BR2_PACKAGE_SYSVINIT),sysvinit) \
 	$(if $(BR2_PACKAGE_TAR),tar) \
 	$(if $(BR2_PACKAGE_TFTPD),tftpd) \
package/systemd/systemd.mk +0 -6
index 04775ee778..d7031ed21d 100644
@@ -18,12 +18,6 @@ SYSTEMD_DEPENDENCIES = \
 
 SYSTEMD_PROVIDES = udev
 
-# Make sure that systemd will always be built after busybox so that we have
-# a consistent init setup between two builds
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-SYSTEMD_DEPENDENCIES += busybox
-endif
-
 SYSTEMD_CONF_OPTS += \
 	-Drootlibdir='/usr/lib' \
 	-Dblkid=true \
Signature · 1 line
2.14.1
#14 lore raw

PATCH v2 13/50 package/busybox: invert dependency with syslog-ng

In reply to Yann E. MORIN

In so doing, we must now ensure that busybox does not overwrite the startup script already installed by syslog-ng.

---
 package/busybox/busybox.mk     | 6 +++++-
 package/syslog-ng/syslog-ng.mk | 5 -----
 2 files changed, 5 insertions(+), 6 deletions(-)
package/busybox/busybox.mk +5 -1
index 9d3ea22d96..c6c7b03ab3 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_SYSLOG_NG),syslog-ng) \
 	$(if $(BR2_PACKAGE_SYSTEMD),systemd) \
 	$(if $(BR2_PACKAGE_SYSVINIT),sysvinit) \
 	$(if $(BR2_PACKAGE_TAR),tar) \
@@ -208,8 +209,11 @@ define BUSYBOX_INSTALL_INDIVIDUAL_BINARIES
 endef
 endif
 
+# Only install our own if no other package already did.
 define BUSYBOX_INSTALL_LOGGING_SCRIPT
-	if grep -q CONFIG_SYSLOGD=y $(@D)/.config; then \
+	if grep -q CONFIG_SYSLOGD=y $(@D)/.config && \
+		[ ! -e $(TARGET_DIR)/etc/init.d/S01logging ]; \
+	then \
 		$(INSTALL) -m 0755 -D package/busybox/S01logging \
 			$(TARGET_DIR)/etc/init.d/S01logging; \
 	fi
package/syslog-ng/syslog-ng.mk +0 -5
index 2b6f2c09e9..793fea0972 100644
@@ -17,11 +17,6 @@ SYSLOG_NG_CONF_ENV = LIBS=-lrt
 SYSLOG_NG_CONF_OPTS = --disable-manpages --localstatedir=/var/run \
 	--disable-java --disable-java-modules --disable-mongodb
 
-# We override busybox's S01logging init script
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-SYSLOG_NG_DEPENDENCIES += busybox
-endif
-
 ifeq ($(BR2_PACKAGE_GEOIP),y)
 SYSLOG_NG_DEPENDENCIES += geoip
 SYSLOG_NG_CONF_OPTS += --enable-geoip
Signature · 1 line
2.14.1
#15 lore raw

PATCH v2 14/50 package/busybox: invert dependency with sysklogd

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk   | 1 +
 package/sysklogd/sysklogd.mk | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)
package/busybox/busybox.mk +1 -0
index c6c7b03ab3..bbf3834e0d 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_SYSKLOGD),sysklogd) \
 	$(if $(BR2_PACKAGE_SYSLOG_NG),syslog-ng) \
 	$(if $(BR2_PACKAGE_SYSTEMD),systemd) \
 	$(if $(BR2_PACKAGE_SYSVINIT),sysvinit) \
package/sysklogd/sysklogd.mk +0 -5
index 1c8259a9af..c4f064c10b 100644
@@ -9,11 +9,6 @@ SYSKLOGD_SITE = http://www.infodrom.org/projects/sysklogd/download
 SYSKLOGD_LICENSE = GPL-2.0+
 SYSKLOGD_LICENSE_FILES = COPYING
 
-# Override BusyBox implementations if BusyBox is enabled.
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-SYSKLOGD_DEPENDENCIES = busybox
-endif
-
 # Override SKFLAGS which is used as CFLAGS.
 define SYSKLOGD_BUILD_CMDS
 	$(MAKE) $(TARGET_CONFIGURE_OPTS) SKFLAGS="$(TARGET_CFLAGS) -DSYSV" \
Signature · 1 line
2.14.1
#16 lore raw

PATCH v2 15/50 package/busybox: invert dependency with start-stop-daemon

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk                     | 1 +
 package/start-stop-daemon/start-stop-daemon.mk | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
package/busybox/busybox.mk +1 -0
index bbf3834e0d..00e17c4be6 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_START_STOP_DAEMON),start-stop-daemon) \
 	$(if $(BR2_PACKAGE_SYSKLOGD),sysklogd) \
 	$(if $(BR2_PACKAGE_SYSLOG_NG),syslog-ng) \
 	$(if $(BR2_PACKAGE_SYSTEMD),systemd) \
package/start-stop-daemon/start-stop-daemon.mk +1 -2
index 7071f5617e..01a6719762 100644
@@ -19,8 +19,7 @@ START_STOP_DAEMON_CONF_ENV = \
 	dpkg_cv_va_copy=yes \
 	dpkg_cv_c99_snprintf=yes \
 	DPKG_DEVEL_MODE=1
-START_STOP_DAEMON_DEPENDENCIES = host-pkgconf \
-	$(if $(BR2_PACKAGE_BUSYBOX),busybox)
+START_STOP_DAEMON_DEPENDENCIES = host-pkgconf
 # Patching m4/dpkg-arch.m4
 START_STOP_DAEMON_AUTORECONF = YES
 START_STOP_DAEMON_LICENSE = GPL-2.0+
Signature · 1 line
2.14.1
#17 lore raw

PATCH v2 16/50 package/busybox: invert dependency with rsyslog

In reply to Yann E. MORIN

---
Changes v1 -> v2:
- s/rsyslogd/rsyslog/ (Carlos)

---
 package/busybox/busybox.mk | 1 +
 package/rsyslog/rsyslog.mk | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)
package/busybox/busybox.mk +1 -0
index 00e17c4be6..22b798207a 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_RSYSLOGD),rsyslog) \
 	$(if $(BR2_PACKAGE_START_STOP_DAEMON),start-stop-daemon) \
 	$(if $(BR2_PACKAGE_SYSKLOGD),sysklogd) \
 	$(if $(BR2_PACKAGE_SYSLOG_NG),syslog-ng) \
package/rsyslog/rsyslog.mk +0 -5
index e32505be22..61e08ba765 100644
@@ -17,11 +17,6 @@ RSYSLOG_PLUGINS = imdiag imfile impstats imptcp \
 RSYSLOG_CONF_OPTS = --disable-generate-man-pages \
 	$(foreach x,$(call qstrip,$(RSYSLOG_PLUGINS)),--enable-$(x))
 
-# Build after BusyBox
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-RSYSLOG_DEPENDENCIES += busybox
-endif
-
 ifeq ($(BR2_PACKAGE_GNUTLS),y)
 RSYSLOG_DEPENDENCIES += gnutls
 RSYSLOG_CONF_OPTS += --enable-gnutls
Signature · 1 line
2.14.1
#18 lore raw

PATCH v2 16/50 package/busybox: invert dependency with rsyslog

----- Original Message -----

Quoted 43 lines

From: "Yann Morin" <[email protected]>
To: "buildroot" <[email protected]>
Cc: "Yann Morin" <[email protected]>, "DATACOM" <[email protected]>
Sent: Sunday, July 8, 2018 6:45:41 AM
Subject: [PATCH 16/50 v2] package/busybox: invert dependency with rsyslog

---
Changes v1 -> v2:
- s/rsyslogd/rsyslog/ (Carlos)
---
package/busybox/busybox.mk | 1 +
package/rsyslog/rsyslog.mk | 5 -----

2 files changed, 1 insertion(+), 5 deletions(-)
package/busybox/busybox.mk +1 -0
index 00e17c4be6..22b798207a 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_RSYSLOGD),rsyslog) \
 	$(if $(BR2_PACKAGE_START_STOP_DAEMON),start-stop-daemon) \
 	$(if $(BR2_PACKAGE_SYSKLOGD),sysklogd) \
 	$(if $(BR2_PACKAGE_SYSLOG_NG),syslog-ng) \
package/rsyslog/rsyslog.mk +0 -5
index e32505be22..61e08ba765 100644
@@ -17,11 +17,6 @@ RSYSLOG_PLUGINS = imdiag imfile impstats imptcp \
 RSYSLOG_CONF_OPTS = --disable-generate-man-pages \
 	$(foreach x,$(call qstrip,$(RSYSLOG_PLUGINS)),--enable-$(x))
 
-# Build after BusyBox
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-RSYSLOG_DEPENDENCIES += busybox
-endif
-
 ifeq ($(BR2_PACKAGE_GNUTLS),y)
Quoted 4 lines

RSYSLOG_DEPENDENCIES += gnutls
RSYSLOG_CONF_OPTS += --enable-gnutls
--
2.14.1

Signature · 3 lines
Carlos Santos (Casantos) - DATACOM, P&D
?Marched towards the enemy, spear upright, armed with the certainty
that only the ignorant can have.? ? Epitaph of a volunteer
#19 lore raw

PATCH v2 17/50 package/busybox: invert dependency with psmisc

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/psmisc/psmisc.mk   | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)
package/busybox/busybox.mk +1 -0
index 22b798207a..1a1ed792a2 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_PSMISC),psmisc) \
 	$(if $(BR2_PACKAGE_RSYSLOGD),rsyslog) \
 	$(if $(BR2_PACKAGE_START_STOP_DAEMON),start-stop-daemon) \
 	$(if $(BR2_PACKAGE_SYSKLOGD),sysklogd) \
package/psmisc/psmisc.mk +0 -5
index 3d9a80462d..3916e34b08 100644
@@ -23,9 +23,4 @@ ifeq ($(BR2_TOOLCHAIN_HAS_SSP),)
 PSMISC_CONF_OPTS = --disable-harden-flags
 endif
 
-# build after busybox, we prefer fat versions while we're at it
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-PSMISC_DEPENDENCIES += busybox
-endif
-
 $(eval $(autotools-package))
Signature · 1 line
2.14.1
#20 lore raw

PATCH v2 18/50 package/busybox: invert dependency with procps-ng

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk     |  1 +
 package/procps-ng/procps-ng.mk | 10 ++--------
 2 files changed, 3 insertions(+), 8 deletions(-)
package/busybox/busybox.mk +1 -0
index 1a1ed792a2..df51f288c4 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_PROCPS_NG),procps-ng) \
 	$(if $(BR2_PACKAGE_PSMISC),psmisc) \
 	$(if $(BR2_PACKAGE_RSYSLOGD),rsyslog) \
 	$(if $(BR2_PACKAGE_START_STOP_DAEMON),start-stop-daemon) \
package/procps-ng/procps-ng.mk +2 -8
index e1fddea32c..03b74784d2 100644
@@ -13,12 +13,6 @@ PROCPS_NG_INSTALL_STAGING = YES
 PROCPS_NG_DEPENDENCIES = ncurses host-pkgconf $(TARGET_NLS_DEPENDENCIES)
 PROCPS_NG_CONF_OPTS = LIBS=$(TARGET_NLS_LIBS)
 
-# If both procps-ng and busybox are selected, make certain procps-ng
-# wins the fight over who gets to have their utils actually installed.
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-PROCPS_NG_DEPENDENCIES += busybox
-endif
-
 ifeq ($(BR2_PACKAGE_SYSTEMD),y)
 PROCPS_NG_DEPENDENCIES += systemd
 PROCPS_NG_CONF_OPTS += --with-systemd
@@ -26,8 +20,8 @@ else
 PROCPS_NG_CONF_OPTS += --without-systemd
 endif
 
-# Make sure binaries get installed in /bin, so that they overwrite
-# their busybox counterparts.
+# Make sure binaries get installed in /bin, as busybox does, so that we
+# don't end up with two versions.
 # Make sure libprocps.pc is installed in STAGING_DIR/usr/lib/pkgconfig/
 # otherwise it's installed in STAGING_DIR/lib/pkgconfig/ breaking
 # pkg-config --libs libprocps.
Signature · 1 line
2.14.1
#21 lore raw

PATCH v2 19/50 package/busybox: invert dependency with pciutils

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk   | 1 +
 package/pciutils/pciutils.mk | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)
package/busybox/busybox.mk +1 -0
index df51f288c4..c87bcec0e4 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_PCIUTILS),pciutils) \
 	$(if $(BR2_PACKAGE_PROCPS_NG),procps-ng) \
 	$(if $(BR2_PACKAGE_PSMISC),psmisc) \
 	$(if $(BR2_PACKAGE_RSYSLOGD),rsyslog) \
package/pciutils/pciutils.mk +0 -5
index 2dd5771f21..30d429e75a 100644
@@ -46,11 +46,6 @@ else
 PCIUTILS_MAKE_OPTS += SHARED=yes
 endif
 
-# Build after busybox since it's got a lightweight lspci
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-PCIUTILS_DEPENDENCIES += busybox
-endif
-
 define PCIUTILS_CONFIGURE_CMDS
 	$(SED) 's/wget --no-timestamping/wget/' $(PCIUTILS_DIR)/update-pciids.sh
 	$(SED) 's/uname -s/echo Linux/' \
Signature · 1 line
2.14.1
#22 lore raw

PATCH v2 20/50 package/busybox: invert dependency with ntp

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/ntp/ntp.mk         | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
package/busybox/busybox.mk +1 -0
index c87bcec0e4..1d3d202f53 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_NTP),ntp) \
 	$(if $(BR2_PACKAGE_PCIUTILS),pciutils) \
 	$(if $(BR2_PACKAGE_PROCPS_NG),procps-ng) \
 	$(if $(BR2_PACKAGE_PSMISC),psmisc) \
package/ntp/ntp.mk +1 -1
index 77bb33a42f..674c368395 100644
@@ -7,7 +7,7 @@
 NTP_VERSION_MAJOR = 4.2
 NTP_VERSION = $(NTP_VERSION_MAJOR).8p11
 NTP_SITE = https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-$(NTP_VERSION_MAJOR)
-NTP_DEPENDENCIES = host-pkgconf libevent $(if $(BR2_PACKAGE_BUSYBOX),busybox)
+NTP_DEPENDENCIES = host-pkgconf libevent
 NTP_LICENSE = NTP
 NTP_LICENSE_FILES = COPYRIGHT
 NTP_CONF_ENV = ac_cv_lib_md5_MD5Init=no
Signature · 1 line
2.14.1
#23 lore raw

PATCH v2 21/50 package/busybox: invert dependency with nmap

In reply to Yann E. MORIN

We only need that dependency whan nmap's ncat is enabled.

For consistency, we add a dependency on nmap, not a suboption of it, to have a dependency list in busybox that is only about packages, and directly associates the upper-case package variable to the lower-case package name, e.g. NMAP <-> nmap.

---
Changes v1 -> v2:
- fix typo (Carlos)

---
 package/busybox/busybox.mk | 1 +
 package/nmap/nmap.mk       | 6 ------
 2 files changed, 1 insertion(+), 6 deletions(-)
package/busybox/busybox.mk +1 -0
index 1d3d202f53..55c3d25b8e 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_NMAP),nmap) \
 	$(if $(BR2_PACKAGE_NTP),ntp) \
 	$(if $(BR2_PACKAGE_PCIUTILS),pciutils) \
 	$(if $(BR2_PACKAGE_PROCPS_NG),procps-ng) \
package/nmap/nmap.mk +0 -6
index 1c89b5424e..420aec82d7 100644
@@ -76,12 +76,6 @@ else
 NMAP_CONF_OPTS += --without-nping
 endif
 
-# If we are going to install ncat, ensure Busybox gets built/installed
-# before, so that this package overrides Busybox nc.
-ifeq ($(BR2_PACKAGE_NMAP_NCAT)$(BR2_PACKAGE_BUSYBOX),yy)
-NMAP_DEPENDENCIES += busybox
-endif
-
 # Add a symlink to "nc" if none of the competing netcats is selected
 ifeq ($(BR2_PACKAGE_NMAP_NCAT):$(BR2_PACKAGE_NETCAT)$(BR2_PACKAGE_NETCAT_OPENBSD),y:)
 define NMAP_INSTALL_NCAT_SYMLINK
Signature · 1 line
2.14.1
#24 lore raw

PATCH v2 21/50 package/busybox: invert dependency with nmap

Quoted 6 lines · Yann E. MORIN

We only need that dependency whan nmap's ncat is enabled.

For consistency, we add a dependency on nmap, not a suboption of it, to have a dependency list in busybox that is only about packages, and directly associates the upper-case package variable to the lower-case package name, e.g. NMAP <-> nmap.

I have extended this commit message a little bit to make it explicit that we
get a spurious dependency, but that that's a small price to pay.

Regards,
Arnout

Quoted 42 lines

---
Changes v1 -> v2:
- fix typo (Carlos)

---
 package/busybox/busybox.mk | 1 +
 package/nmap/nmap.mk       | 6 ------
 2 files changed, 1 insertion(+), 6 deletions(-)
package/busybox/busybox.mk +1 -0
index 1d3d202f53..55c3d25b8e 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_NMAP),nmap) \
 	$(if $(BR2_PACKAGE_NTP),ntp) \
 	$(if $(BR2_PACKAGE_PCIUTILS),pciutils) \
 	$(if $(BR2_PACKAGE_PROCPS_NG),procps-ng) \
package/nmap/nmap.mk +0 -6
index 1c89b5424e..420aec82d7 100644
@@ -76,12 +76,6 @@ else
 NMAP_CONF_OPTS += --without-nping
 endif
 
-# If we are going to install ncat, ensure Busybox gets built/installed
-# before, so that this package overrides Busybox nc.
-ifeq ($(BR2_PACKAGE_NMAP_NCAT)$(BR2_PACKAGE_BUSYBOX),yy)
-NMAP_DEPENDENCIES += busybox
-endif
-
 # Add a symlink to "nc" if none of the competing netcats is selected
 ifeq ($(BR2_PACKAGE_NMAP_NCAT):$(BR2_PACKAGE_NETCAT)$(BR2_PACKAGE_NETCAT_OPENBSD),y:)
 define NMAP_INSTALL_NCAT_SYMLINK
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#25 lore raw

PATCH v2 21/50 package/busybox: invert dependency with nmap

Arnout, All,

On 2018-07-08 13:12 +0200, Arnout Vandecappelle spake thusly:

Quoted 10 lines · Yann E. MORIN
Quoted 6 lines

We only need that dependency whan nmap's ncat is enabled.

For consistency, we add a dependency on nmap, not a suboption of it, to have a dependency list in busybox that is only about packages, and directly associates the upper-case package variable to the lower-case package name, e.g. NMAP <-> nmap.

I have extended this commit message a little bit to make it explicit that we
get a spurious dependency, but that that's a small price to pay.

You added:

Thus, if BR2_PACKAGE_NMAP_NCAT is selected, we have a redundant dependency. But that doesn't hurt and it really simplifies things.

But that's is the opposite: the dependency *is* usefull when nmap's ncat is enabled. So did you meant to write instead:

Thus, if BR2_PACKAGE_NMAP_NCAT is disabled, we have a useless dependency. [...]

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#26 lore raw

PATCH v2 21/50 package/busybox: invert dependency with nmap

Quoted 16 lines · Yann E. MORIN

Arnout, All,

On 2018-07-08 13:12 +0200, Arnout Vandecappelle spake thusly:

Quoted 10 lines · Yann E. MORIN
Quoted 6 lines

We only need that dependency whan nmap's ncat is enabled.

For consistency, we add a dependency on nmap, not a suboption of it, to have a dependency list in busybox that is only about packages, and directly associates the upper-case package variable to the lower-case package name, e.g. NMAP <-> nmap.

I have extended this commit message a little bit to make it explicit that we
get a spurious dependency, but that that's a small price to pay.

You added:

Quoted 8 lines

Thus, if BR2_PACKAGE_NMAP_NCAT is selected, we have a redundant dependency. But that doesn't hurt and it really simplifies things.

But that's is the opposite: the dependency *is* usefull when nmap's ncat is enabled. So did you meant to write instead:

Thus, if BR2_PACKAGE_NMAP_NCAT is disabled, we have a useless dependency. [...]

Argh, yes of course I meant NOT selected...

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#27 lore raw

PATCH v2 22/50 package/busybox: invert dependency with netcat-openbsd

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk               | 1 +
 package/netcat-openbsd/netcat-openbsd.mk | 6 ------
 2 files changed, 1 insertion(+), 6 deletions(-)
package/busybox/busybox.mk +1 -0
index 55c3d25b8e..003909806a 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_NETCAT_OPENSBSD),netcat-openbsd) \
 	$(if $(BR2_PACKAGE_NMAP),nmap) \
 	$(if $(BR2_PACKAGE_NTP),ntp) \
 	$(if $(BR2_PACKAGE_PCIUTILS),pciutils) \
package/netcat-openbsd/netcat-openbsd.mk +0 -6
index 5784e4d68e..e98b479c4f 100644
@@ -10,12 +10,6 @@ NETCAT_OPENBSD_LICENSE = BSD-3-Clause
 NETCAT_OPENBSD_LICENSE_FILES = debian/copyright
 NETCAT_OPENBSD_DEPENDENCIES = host-pkgconf libbsd
 
-# Ensure Busybox gets built/installed before, so that this package
-# overrides Busybox nc.
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-NETCAT_OPENBSD_DEPENDENCIES += busybox
-endif
-
 define NETCAT_OPENBSD_APPLY_DEBIAN_PATCHES
 	if [ -d $(@D)/debian/patches ]; then \
 		$(APPLY_PATCHES) $(@D) $(@D)/debian/patches *.dpatch; \
Signature · 1 line
2.14.1
#28 lore raw

PATCH v2 23/50 package/busybox: invert dependency with netcat

In reply to Yann E. MORIN

Since netcat would be installed before busybox, we don't need to remove a pre-installed 'nc' anymore.

If another netcat implementation (e.g. netcat-openbsd) is also enabled, there is no way to tell which would win in the end, especially when we add TLPB, in which case that will be forbidden.

So, we don't need to remove anything anymore.

---
 package/busybox/busybox.mk |  1 +
 package/netcat/netcat.mk   | 13 -------------
 2 files changed, 1 insertion(+), 13 deletions(-)
package/busybox/busybox.mk +1 -0
index 003909806a..eeb9dc5bac 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_NETCAT),netcat) \
 	$(if $(BR2_PACKAGE_NETCAT_OPENSBSD),netcat-openbsd) \
 	$(if $(BR2_PACKAGE_NMAP),nmap) \
 	$(if $(BR2_PACKAGE_NTP),ntp) \
package/netcat/netcat.mk +0 -13
index d8b3c930b9..eb7ddcac27 100644
@@ -9,17 +9,4 @@ NETCAT_SITE = http://downloads.sourceforge.net/project/netcat/netcat/$(NETCAT_VE
 NETCAT_LICENSE = GPL-2.0+
 NETCAT_LICENSE_FILES = COPYING
 
-# Ensure Busybox gets built/installed before, so that this package
-# overrides Busybox nc.
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-NETCAT_DEPENDENCIES += busybox
-endif
-
-# Netcat doesn't overwrite a pre-existing 'nc' (e.g. from busybox) so
-# force-remove it.
-define NETCAT_RMOVE_NC_LINK
-	rm -f $(TARGET_DIR)/usr/bin/nc
-endef
-NETCAT_PRE_INSTALL_TARGET_HOOKS += NETCAT_RMOVE_NC_LINK
-
 $(eval $(autotools-package))
Signature · 1 line
2.14.1
#29 lore raw

PATCH v2 23/50 package/busybox: invert dependency with netcat

Quoted 8 lines · Yann E. MORIN

Since netcat would be installed before busybox, we don't need to remove a pre-installed 'nc' anymore.

If another netcat implementation (e.g. netcat-openbsd) is also enabled, there is no way to tell which would win in the end, especially when we add TLPB, in which case that will be forbidden.

So, we don't need to remove anything anymore.

Well, we will have to add a dependency, and then we have to re-introduce this
thing. But maybe we'll have another solution (e.g. making them mutually exclusive at the configure level) so let's remove it for now.

Regards,
Arnout

Quoted 42 lines
---
 package/busybox/busybox.mk |  1 +
 package/netcat/netcat.mk   | 13 -------------
 2 files changed, 1 insertion(+), 13 deletions(-)
package/busybox/busybox.mk +1 -0
index 003909806a..eeb9dc5bac 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_NETCAT),netcat) \
 	$(if $(BR2_PACKAGE_NETCAT_OPENSBSD),netcat-openbsd) \
 	$(if $(BR2_PACKAGE_NMAP),nmap) \
 	$(if $(BR2_PACKAGE_NTP),ntp) \
package/netcat/netcat.mk +0 -13
index d8b3c930b9..eb7ddcac27 100644
@@ -9,17 +9,4 @@ NETCAT_SITE = http://downloads.sourceforge.net/project/netcat/netcat/$(NETCAT_VE
 NETCAT_LICENSE = GPL-2.0+
 NETCAT_LICENSE_FILES = COPYING
 
-# Ensure Busybox gets built/installed before, so that this package
-# overrides Busybox nc.
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-NETCAT_DEPENDENCIES += busybox
-endif
-
-# Netcat doesn't overwrite a pre-existing 'nc' (e.g. from busybox) so
-# force-remove it.
-define NETCAT_RMOVE_NC_LINK
-	rm -f $(TARGET_DIR)/usr/bin/nc
-endef
-NETCAT_PRE_INSTALL_TARGET_HOOKS += NETCAT_RMOVE_NC_LINK
-
 $(eval $(autotools-package))
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#30 lore raw

PATCH v2 24/50 package/busybox: invert dependency with net-tools

In reply to Yann E. MORIN

---
Changes v1 -> v2:
- fix typo (Baruch)

---
 package/busybox/busybox.mk     | 1 +
 package/net-tools/net-tools.mk | 8 ++------
 2 files changed, 3 insertions(+), 6 deletions(-)
package/busybox/busybox.mk +1 -0
index eeb9dc5bac..451aae46a5 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_NET_TOOLS),net-tools) \
 	$(if $(BR2_PACKAGE_NETCAT),netcat) \
 	$(if $(BR2_PACKAGE_NETCAT_OPENSBSD),netcat-openbsd) \
 	$(if $(BR2_PACKAGE_NMAP),nmap) \
package/net-tools/net-tools.mk +2 -6
index adab475b35..985fe2e35e 100644
@@ -10,11 +10,6 @@ NET_TOOLS_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 NET_TOOLS_LICENSE = GPL-2.0+
 NET_TOOLS_LICENSE_FILES = COPYING
 
-# Install after busybox for the full-blown versions
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-NET_TOOLS_DEPENDENCIES += busybox
-endif
-
 define NET_TOOLS_CONFIGURE_CMDS
 	(cd $(@D); yes "" | ./configure.sh config.in )
 endef
@@ -40,7 +35,8 @@ define NET_TOOLS_BUILD_CMDS
 endef
 
 # install renames conflicting binaries, update does not
-# ifconfig & route reside in /sbin for busybox
+# ifconfig & route reside in /sbin for busybox, so ensure we don't end
+# up with two versions of those.
 define NET_TOOLS_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) update
 	mv -f $(TARGET_DIR)/bin/ifconfig $(TARGET_DIR)/sbin/ifconfig
Signature · 1 line
2.14.1
#31 lore raw

PATCH v2 25/50 package/busybox: invert dependency with mtd

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/mtd/mtd.mk         | 4 ----
 2 files changed, 1 insertion(+), 4 deletions(-)
package/busybox/busybox.mk +1 -0
index 451aae46a5..efb463554c 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_MTD),mtd) \
 	$(if $(BR2_PACKAGE_NET_TOOLS),net-tools) \
 	$(if $(BR2_PACKAGE_NETCAT),netcat) \
 	$(if $(BR2_PACKAGE_NETCAT_OPENSBSD),netcat-openbsd) \
package/mtd/mtd.mk +0 -4
index 83bd6a6ae9..13e501fc33 100644
@@ -31,10 +31,6 @@ else
 MTD_CONF_OPTS += --disable-tests --disable-install-tests
 endif
 
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-MTD_DEPENDENCIES += busybox
-endif
-
 # If extended attributes are required, the acl package must
 # also be enabled which will also include the attr package.
 ifeq ($(BR2_PACKAGE_ACL),y)
Signature · 1 line
2.14.1
#32 lore raw

PATCH v2 26/50 package/busybox: invert dependency with lsof

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/lsof/lsof.mk       | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
package/busybox/busybox.mk +1 -0
index efb463554c..cb629892cd 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_LSOF),lsof) \
 	$(if $(BR2_PACKAGE_MTD),mtd) \
 	$(if $(BR2_PACKAGE_NET_TOOLS),net-tools) \
 	$(if $(BR2_PACKAGE_NETCAT),netcat) \
package/lsof/lsof.mk +0 -3
index 0dc8e2de2f..83a9b6c388 100644
@@ -13,9 +13,6 @@ LSOF_LICENSE = lsof license
 # It is also defined in 00README, but that contains a lot of other cruft.
 LSOF_LICENSE_FILES = dialects/linux/dproto.h
 
-# Make certain full-blown lsof gets built after the busybox version (1.20+)
-LSOF_DEPENDENCIES += $(if $(BR2_PACKAGE_BUSYBOX),busybox)
-
 ifeq ($(BR2_USE_WCHAR),)
 define LSOF_CONFIGURE_WCHAR_FIXUPS
 	$(SED) 's,^#define[[:space:]]*HASWIDECHAR.*,#undef HASWIDECHAR,' \
Signature · 1 line
2.14.1
#33 lore raw

PATCH v2 27/50 package/busybox: invert dependency with less

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/less/less.mk       | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
package/busybox/busybox.mk +1 -0
index cb629892cd..95fea18b50 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_LESS),less) \
 	$(if $(BR2_PACKAGE_LSOF),lsof) \
 	$(if $(BR2_PACKAGE_MTD),mtd) \
 	$(if $(BR2_PACKAGE_NET_TOOLS),net-tools) \
package/less/less.mk +1 -2
index bccc08b89f..ef3643c0aa 100644
@@ -8,8 +8,7 @@ LESS_VERSION = 487
 LESS_SITE = $(BR2_GNU_MIRROR)/less
 LESS_LICENSE = GPL-3.0+
 LESS_LICENSE_FILES = COPYING
-# Build after busybox, full-blown is better
-LESS_DEPENDENCIES = ncurses $(if $(BR2_PACKAGE_BUSYBOX),busybox)
+LESS_DEPENDENCIES = ncurses
 
 define LESS_INSTALL_TARGET_CMDS
 	$(INSTALL) -m 0755 $(@D)/less $(TARGET_DIR)/usr/bin/less
Signature · 1 line
2.14.1
#34 lore raw

PATCH v2 28/50 package/busybox: invert dependency with kmod

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/kmod/kmod.mk       | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
package/busybox/busybox.mk +1 -0
index 95fea18b50..812de14ad0 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_KMOD),kmod) \
 	$(if $(BR2_PACKAGE_LESS),less) \
 	$(if $(BR2_PACKAGE_LSOF),lsof) \
 	$(if $(BR2_PACKAGE_MTD),mtd) \
package/kmod/kmod.mk +0 -3
index e1149b7b65..7c796ab19f 100644
@@ -49,9 +49,6 @@ ifeq ($(BR2_PACKAGE_KMOD_TOOLS),y)
 KMOD_LICENSE := $(KMOD_LICENSE), GPL-2.0+ (tools)
 KMOD_LICENSE_FILES += COPYING
 
-# take precedence over busybox implementation
-KMOD_DEPENDENCIES += $(if $(BR2_PACKAGE_BUSYBOX),busybox)
-
 # /sbin is really /usr/sbin with merged /usr, so adjust relative symlink
 ifeq ($(BR2_ROOTFS_MERGED_USR),y)
 KMOD_BIN_PATH = ../bin/kmod
Signature · 1 line
2.14.1
#35 lore raw

PATCH v2 29/50 package/busybox: invert dependency with iputils

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/iputils/iputils.mk | 6 ------
 2 files changed, 1 insertion(+), 6 deletions(-)
package/busybox/busybox.mk +1 -0
index 812de14ad0..399db06bb9 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_IPUTILS),iputils) \
 	$(if $(BR2_PACKAGE_KMOD),kmod) \
 	$(if $(BR2_PACKAGE_LESS),less) \
 	$(if $(BR2_PACKAGE_LSOF),lsof) \
package/iputils/iputils.mk +0 -6
index 13e33898d6..713b0e4abf 100644
@@ -17,12 +17,6 @@ IPUTILS_LICENSE = GPL-2.0+, BSD-3-Clause, BSD-4-Clause
 # Only includes a license file for BSD
 IPUTILS_LICENSE_FILES = ninfod/COPYING
 
-# Build after busybox so target ends up with this package's full
-# versions of the applications instead of busybox applets.
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-IPUTILS_DEPENDENCIES += busybox
-endif
-
 IPUTILS_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) USE_SYSFS=no USE_IDN=no\
 	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
 
Signature · 1 line
2.14.1
#36 lore raw

PATCH v2 30/50 package/busybox: invert dependency with iproute2

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk   | 1 +
 package/iproute2/iproute2.mk | 6 ------
 2 files changed, 1 insertion(+), 6 deletions(-)
package/busybox/busybox.mk +1 -0
index 399db06bb9..a7823d82ae 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_IPROUTE2),iproute2) \
 	$(if $(BR2_PACKAGE_IPUTILS),iputils) \
 	$(if $(BR2_PACKAGE_KMOD),kmod) \
 	$(if $(BR2_PACKAGE_LESS),less) \
package/iproute2/iproute2.mk +0 -6
index 1f276ac7ed..48413401cd 100644
@@ -12,12 +12,6 @@ IPROUTE2_DEPENDENCIES = host-bison host-flex host-pkgconf \
 IPROUTE2_LICENSE = GPL-2.0+
 IPROUTE2_LICENSE_FILES = COPYING
 
-# If both iproute2 and busybox are selected, make certain we win
-# the fight over who gets to have their utils actually installed.
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-IPROUTE2_DEPENDENCIES += busybox
-endif
-
 ifeq ($(BR2_PACKAGE_ELFUTILS),y)
 IPROUTE2_DEPENDENCIES += elfutils
 endif
Signature · 1 line
2.14.1
#37 lore raw

PATCH v2 31/50 package/busybox: invert dependency with ifupdown

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk   | 1 +
 package/ifupdown/ifupdown.mk | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)
package/busybox/busybox.mk +1 -0
index a7823d82ae..b03945ad9c 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_IFUPDOWN),ifupdown) \
 	$(if $(BR2_PACKAGE_IPROUTE2),iproute2) \
 	$(if $(BR2_PACKAGE_IPUTILS),iputils) \
 	$(if $(BR2_PACKAGE_KMOD),kmod) \
package/ifupdown/ifupdown.mk +0 -1
index dfc3f3cc11..84d24aedab 100644
@@ -7,7 +7,6 @@
 IFUPDOWN_VERSION = 0.8.16
 IFUPDOWN_SOURCE = ifupdown_$(IFUPDOWN_VERSION).tar.xz
 IFUPDOWN_SITE = http://snapshot.debian.org/archive/debian/20160922T165503Z/pool/main/i/ifupdown
-IFUPDOWN_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox)
 IFUPDOWN_LICENSE = GPL-2.0+
 IFUPDOWN_LICENSE_FILES = COPYING
 
Signature · 1 line
2.14.1
#38 lore raw

PATCH v2 32/50 package/busybox: invert dependency with ifplugd

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/ifplugd/ifplugd.mk | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)
package/busybox/busybox.mk +1 -0
index b03945ad9c..fb6e02336d 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_IFPLUGD),ifplugd) \
 	$(if $(BR2_PACKAGE_IFUPDOWN),ifupdown) \
 	$(if $(BR2_PACKAGE_IPROUTE2),iproute2) \
 	$(if $(BR2_PACKAGE_IPUTILS),iputils) \
package/ifplugd/ifplugd.mk +0 -5
index b569320963..c7874b49e5 100644
@@ -15,11 +15,6 @@ IFPLUGD_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-exec
 IFPLUGD_CONF_OPTS = --disable-lynx --with-initdir=/etc/init.d/
 IFPLUGD_DEPENDENCIES = libdaemon
 
-# Prefer big ifplugd
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-IFPLUGD_DEPENDENCIES += busybox
-endif
-
 define IFPLUGD_INSTALL_FIXUP
 	$(INSTALL) -D -m 0644 $(@D)/conf/ifplugd.conf $(TARGET_DIR)/etc/ifplugd/ifplugd.conf; \
 	$(SED) 's^\(ARGS=.*\)w^\1^' $(TARGET_DIR)/etc/ifplugd/ifplugd.conf; \
Signature · 1 line
2.14.1
#39 lore raw

PATCH v2 33/50 package/busybox: invert dependency with ifenslave

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk     | 1 +
 package/ifenslave/ifenslave.mk | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)
package/busybox/busybox.mk +1 -0
index fb6e02336d..2d61927c21 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_IFENSLAVE),ifenslave) \
 	$(if $(BR2_PACKAGE_IFPLUGD),ifplugd) \
 	$(if $(BR2_PACKAGE_IFUPDOWN),ifupdown) \
 	$(if $(BR2_PACKAGE_IPROUTE2),iproute2) \
package/ifenslave/ifenslave.mk +0 -1
index 4030d22e82..b51aa72051 100644
@@ -9,7 +9,6 @@ IFENSLAVE_SOURCE = ifenslave_$(IFENSLAVE_VERSION).tar.xz
 IFENSLAVE_SITE = http://snapshot.debian.org/archive/debian/20170102T091407Z/pool/main/i/ifenslave
 IFENSLAVE_LICENSE = GPL-3.0+
 IFENSLAVE_LICENSE_FILES = debian/copyright
-IFENSLAVE_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox)
 
 # shell script, so nothing to build
 
Signature · 1 line
2.14.1
#40 lore raw

PATCH v2 34/50 package/busybox: invert dependency with i2c-tools

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk     | 1 +
 package/i2c-tools/i2c-tools.mk | 4 ----
 2 files changed, 1 insertion(+), 4 deletions(-)
package/busybox/busybox.mk +1 -0
index 2d61927c21..8e32a58c2d 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_I2C_TOOLS),i2c-tools) \
 	$(if $(BR2_PACKAGE_IFENSLAVE),ifenslave) \
 	$(if $(BR2_PACKAGE_IFPLUGD),ifplugd) \
 	$(if $(BR2_PACKAGE_IFUPDOWN),ifupdown) \
package/i2c-tools/i2c-tools.mk +0 -4
index 9ddaa72786..db26647eb5 100644
@@ -19,10 +19,6 @@ ifeq ($(BR2_PACKAGE_PYTHON3),y)
 I2C_TOOLS_DEPENDENCIES += python3
 endif
 
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-I2C_TOOLS_DEPENDENCIES += busybox
-endif
-
 ifeq ($(BR2_STATIC_LIBS),y)
 I2C_TOOLS_MAKE_OPTS += BUILD_DYNAMIC_LIB=0 USE_STATIC_LIB=1
 endif
Signature · 1 line
2.14.1
#41 lore raw

PATCH v2 35/50 package/busybox: invert dependency with gzip

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/gzip/gzip.mk       | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)
package/busybox/busybox.mk +1 -0
index 8e32a58c2d..b00341c576 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_GZIP),gzip) \
 	$(if $(BR2_PACKAGE_I2C_TOOLS),i2c-tools) \
 	$(if $(BR2_PACKAGE_IFENSLAVE),ifenslave) \
 	$(if $(BR2_PACKAGE_IFPLUGD),ifplugd) \
package/gzip/gzip.mk +0 -2
index 26fc8ec347..d69215a850 100644
@@ -9,8 +9,6 @@ GZIP_SOURCE = gzip-$(GZIP_VERSION).tar.xz
 GZIP_SITE = $(BR2_GNU_MIRROR)/gzip
 # Some other tools expect it to be in /bin
 GZIP_CONF_OPTS = --exec-prefix=/
-# Prefer full gzip over potentially lightweight/slower from busybox
-GZIP_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox)
 GZIP_LICENSE = GPL-3.0+
 GZIP_LICENSE_FILES = COPYING
 GZIP_CONF_ENV += gl_cv_func_fflush_stdin=yes
Signature · 1 line
2.14.1
#42 lore raw

PATCH v2 36/50 package/busybox: invert dependency with grep

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/grep/grep.mk       | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)
package/busybox/busybox.mk +1 -0
index b00341c576..f614576de7 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_GREP),grep) \
 	$(if $(BR2_PACKAGE_GZIP),gzip) \
 	$(if $(BR2_PACKAGE_I2C_TOOLS),i2c-tools) \
 	$(if $(BR2_PACKAGE_IFENSLAVE),ifenslave) \
package/grep/grep.mk +0 -5
index 6e44a189f0..730f36a344 100644
@@ -25,9 +25,4 @@ else
 GREP_CONF_OPTS += --disable-perl-regexp
 endif
 
-# Full grep preferred over busybox grep
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-GREP_DEPENDENCIES += busybox
-endif
-
 $(eval $(autotools-package))
Signature · 1 line
2.14.1
#43 lore raw

PATCH v2 37/50 package/busybox: invert dependency with gawk

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/gawk/gawk.mk       | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)
package/busybox/busybox.mk +1 -0
index f614576de7..aac31fdba7 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_GAWK),gawk) \
 	$(if $(BR2_PACKAGE_GREP),grep) \
 	$(if $(BR2_PACKAGE_GZIP),gzip) \
 	$(if $(BR2_PACKAGE_I2C_TOOLS),i2c-tools) \
package/gawk/gawk.mk +0 -5
index 0779736882..1315abb9ee 100644
@@ -11,11 +11,6 @@ GAWK_DEPENDENCIES = host-gawk
 GAWK_LICENSE = GPL-3.0+
 GAWK_LICENSE_FILES = COPYING
 
-# Prefer full-blown gawk over busybox awk
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-GAWK_DEPENDENCIES += busybox
-endif
-
 ifeq ($(BR2_PACKAGE_LIBSIGSEGV),y)
 GAWK_DEPENDENCIES += libsigsegv
 endif
Signature · 1 line
2.14.1
#44 lore raw

PATCH v2 38/50 package/busybox: invert dependency with fbset

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/fbset/fbset.mk     | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)
package/busybox/busybox.mk +1 -0
index aac31fdba7..a567f25231 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_FBSET),fbset) \
 	$(if $(BR2_PACKAGE_GAWK),gawk) \
 	$(if $(BR2_PACKAGE_GREP),grep) \
 	$(if $(BR2_PACKAGE_GZIP),gzip) \
package/fbset/fbset.mk +0 -5
index d6ee104a22..787b4e1dca 100644
@@ -9,11 +9,6 @@ FBSET_SITE = http://users.telenet.be/geertu/Linux/fbdev
 FBSET_DEPENDENCIES = host-bison host-flex
 FBSET_LICENSE = GPL-2.0
 
-# Make sure full fbset wins over busybox fbset
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-FBSET_DEPENDENCIES += busybox
-endif
-
 define FBSET_BUILD_CMDS
 	$(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D)
 endef
Signature · 1 line
2.14.1
#45 lore raw

PATCH v2 39/50 package/busybox: invert dependency with e2fsprogs

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk     |  1 +
 package/e2fsprogs/e2fsprogs.mk | 10 ++--------
 2 files changed, 3 insertions(+), 8 deletions(-)
package/busybox/busybox.mk +1 -0
index a567f25231..166d187081 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_E2FSPROGS),e2fsprogs) \
 	$(if $(BR2_PACKAGE_FBSET),fbset) \
 	$(if $(BR2_PACKAGE_GAWK),gawk) \
 	$(if $(BR2_PACKAGE_GREP),grep) \
package/e2fsprogs/e2fsprogs.mk +2 -8
index 316546a8d7..efc10d0e99 100644
@@ -17,12 +17,6 @@ E2FSPROGS_INSTALL_STAGING = YES
 E2FSPROGS_DEPENDENCIES = host-pkgconf util-linux
 HOST_E2FSPROGS_DEPENDENCIES = host-pkgconf host-util-linux
 
-# If both e2fsprogs and busybox are selected, make certain e2fsprogs
-# wins the fight over who gets to have their utils actually installed
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-E2FSPROGS_DEPENDENCIES += busybox
-endif
-
 # e4defrag doesn't build on older systems like RHEL5.x, and we don't
 # need it on the host anyway.
 # Disable fuse2fs as well to avoid carrying over deps, and it's unused
@@ -35,8 +29,8 @@ HOST_E2FSPROGS_CONF_OPTS = \
 	--enable-symlink-install \
 	--disable-testio-debug
 
-# Set the binary directories to "/bin" and "/sbin" to override programs
-# installed by busybox.
+# Set the binary directories to "/bin" and "/sbin", as busybox does,
+# so that we do not end up with two versions of e2fs tools.
 E2FSPROGS_CONF_OPTS = \
 	--bindir=/bin \
 	--sbindir=/sbin \
Signature · 1 line
2.14.1
#46 lore raw

PATCH v2 40/50 package/busybox: invert dependency with dos2unix

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk   | 1 +
 package/dos2unix/dos2unix.mk | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)
package/busybox/busybox.mk +1 -0
index 166d187081..e50ca1447d 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_DOS2UNIX),dos2unix) \
 	$(if $(BR2_PACKAGE_E2FSPROGS),e2fsprogs) \
 	$(if $(BR2_PACKAGE_FBSET),fbset) \
 	$(if $(BR2_PACKAGE_GAWK),gawk) \
package/dos2unix/dos2unix.mk +1 -3
index 5001397f05..0522ad1671 100644
@@ -8,9 +8,7 @@ DOS2UNIX_VERSION = 7.4.0
 DOS2UNIX_SITE = http://waterlan.home.xs4all.nl/dos2unix
 DOS2UNIX_LICENSE = BSD-2-Clause
 DOS2UNIX_LICENSE_FILES = COPYING.txt
-DOS2UNIX_DEPENDENCIES = \
-	$(if $(BR2_PACKAGE_BUSYBOX),busybox) \
-	$(TARGET_NLS_DEPENDENCIES)
+DOS2UNIX_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 
 ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
 DOS2UNIX_MAKE_OPTS += ENABLE_NLS=1
Signature · 1 line
2.14.1
#47 lore raw

PATCH v2 41/50 package/busybox: invert dependency with diffutils

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk     | 1 +
 package/diffutils/diffutils.mk | 4 ----
 2 files changed, 1 insertion(+), 4 deletions(-)
package/busybox/busybox.mk +1 -0
index e50ca1447d..dbb4a9b93f 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_DIFFUTILS),diffutils) \
 	$(if $(BR2_PACKAGE_DOS2UNIX),dos2unix) \
 	$(if $(BR2_PACKAGE_E2FSPROGS),e2fsprogs) \
 	$(if $(BR2_PACKAGE_FBSET),fbset) \
package/diffutils/diffutils.mk +0 -4
index 79785d6f01..9a41c985df 100644
@@ -17,8 +17,4 @@ ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
 DIFFUTILS_CONF_ENV += gl_cv_func_getopt_gnu=yes
 endif
 
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-DIFFUTILS_DEPENDENCIES += busybox
-endif
-
 $(eval $(autotools-package))
Signature · 1 line
2.14.1
#48 lore raw

PATCH v2 42/50 package/busybox: invert dependency with debianutils

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk         | 1 +
 package/debianutils/debianutils.mk | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)
package/busybox/busybox.mk +1 -0
index dbb4a9b93f..20459f123a 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_DEBIANUTILS),debianutils) \
 	$(if $(BR2_PACKAGE_DIFFUTILS),diffutils) \
 	$(if $(BR2_PACKAGE_DOS2UNIX),dos2unix) \
 	$(if $(BR2_PACKAGE_E2FSPROGS),e2fsprogs) \
package/debianutils/debianutils.mk +0 -2
index 86f201da1c..189d983732 100644
@@ -8,8 +8,6 @@ DEBIANUTILS_VERSION = 4.8.1
 DEBIANUTILS_SOURCE = debianutils_$(DEBIANUTILS_VERSION).tar.xz
 DEBIANUTILS_SITE = http://snapshot.debian.org/archive/debian/20161118T033019Z/pool/main/d/debianutils
 DEBIANUTILS_CONF_OPTS = --exec-prefix=/
-# Make sure we override the busybox tools, such as which
-DEBIANUTILS_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox)
 DEBIANUTILS_LICENSE = GPL-2.0+, SMAIL (savelog)
 DEBIANUTILS_LICENSE_FILES = debian/copyright
 
Signature · 1 line
2.14.1
#49 lore raw

PATCH v2 43/50 package/busybox: invert dependency with dcron

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/dcron/dcron.mk     | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)
package/busybox/busybox.mk +1 -0
index 20459f123a..fe36cb3918 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_DCRON),dcron) \
 	$(if $(BR2_PACKAGE_DEBIANUTILS),debianutils) \
 	$(if $(BR2_PACKAGE_DIFFUTILS),diffutils) \
 	$(if $(BR2_PACKAGE_DOS2UNIX),dos2unix) \
package/dcron/dcron.mk +0 -5
index 7e81b63803..2ee0709af5 100644
@@ -9,11 +9,6 @@ DCRON_SITE = http://www.jimpryor.net/linux/releases
 # The source code does not specify the version of the GPL that is used.
 DCRON_LICENSE = GPL
 
-# Overwrite cron-related Busybox commands if available
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-DCRON_DEPENDENCIES = busybox
-endif
-
 define DCRON_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
 endef
Signature · 1 line
2.14.1
#50 lore raw

PATCH v2 44/50 package/busybox: invert dependency with cpio

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk | 1 +
 package/cpio/cpio.mk       | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)
package/busybox/busybox.mk +1 -0
index fe36cb3918..6351869330 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_CPIO),cpio) \
 	$(if $(BR2_PACKAGE_DCRON),dcron) \
 	$(if $(BR2_PACKAGE_DEBIANUTILS),debianutils) \
 	$(if $(BR2_PACKAGE_DIFFUTILS),diffutils) \
package/cpio/cpio.mk +0 -1
index 7e8549dbd8..9a09279572 100644
@@ -7,7 +7,6 @@
 CPIO_VERSION = 2.12
 CPIO_SITE = $(BR2_GNU_MIRROR)/cpio
 CPIO_CONF_OPTS = --bindir=/bin
-CPIO_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox)
 CPIO_LICENSE = GPL-3.0+
 CPIO_LICENSE_FILES = COPYING
 
Signature · 1 line
2.14.1
#51 lore raw

PATCH v2 45/50 package/busybox: invert dependency with coreutils

In reply to Yann E. MORIN
---
 package/busybox/busybox.mk     | 1 +
 package/coreutils/coreutils.mk | 6 ------
 2 files changed, 1 insertion(+), 6 deletions(-)
package/busybox/busybox.mk +1 -0
index 6351869330..748f05aca3 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_COREUTILS),coreutils) \
 	$(if $(BR2_PACKAGE_CPIO),cpio) \
 	$(if $(BR2_PACKAGE_DCRON),dcron) \
 	$(if $(BR2_PACKAGE_DEBIANUTILS),debianutils) \
package/coreutils/coreutils.mk +0 -6
index 4ef888829f..3cb96589f2 100644
@@ -59,12 +59,6 @@ COREUTILS_BIN_PROGS = cat chgrp chmod chown cp date dd df dir echo false \
 	kill link ln ls mkdir mknod mktemp mv nice printenv pwd rm rmdir \
 	vdir sleep stty sync touch true uname join
 
-# If both coreutils and busybox are selected, make certain coreutils
-# wins the fight over who gets to have their utils actually installed.
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-COREUTILS_DEPENDENCIES = busybox
-endif
-
 ifeq ($(BR2_PACKAGE_ACL),y)
 COREUTILS_DEPENDENCIES += acl
 else
Signature · 1 line
2.14.1
#52 lore raw

PATCH v2 46/50 package/busybox: invert dependency with binutils

In reply to Yann E. MORIN
---
 package/binutils/binutils.mk | 5 -----
 package/busybox/busybox.mk   | 1 +
 2 files changed, 1 insertion(+), 5 deletions(-)
package/binutils/binutils.mk +0 -5
index cb6022f7fa..090065a3e4 100644
@@ -72,11 +72,6 @@ ifeq ($(BR2_ARM_CPU_ARMV7M)$(BR2_OPTIMIZE_S),yy)
 BINUTILS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O2"
 endif
 
-# Install binutils after busybox to prefer full-blown utilities
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-BINUTILS_DEPENDENCIES += busybox
-endif
-
 ifeq ($(BR2_PACKAGE_ZLIB),y)
 BINUTILS_DEPENDENCIES += zlib
 endif
package/busybox/busybox.mk +1 -0
index 748f05aca3..d920987d11 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_BINUTILS),binutils) \
 	$(if $(BR2_PACKAGE_COREUTILS),coreutils) \
 	$(if $(BR2_PACKAGE_CPIO),cpio) \
 	$(if $(BR2_PACKAGE_DCRON),dcron) \
Signature · 1 line
2.14.1
#53 lore raw

PATCH v2 47/50 package/busybox: invert dependency with bc

In reply to Yann E. MORIN
---
 package/bc/bc.mk           | 5 -----
 package/busybox/busybox.mk | 1 +
 2 files changed, 1 insertion(+), 5 deletions(-)
package/bc/bc.mk +0 -5
index a6446cef66..ee0e43848b 100644
@@ -11,9 +11,4 @@ BC_DEPENDENCIES = host-flex
 BC_LICENSE = GPL-2.0+, LGPL-2.1+
 BC_LICENSE_FILES = COPYING COPYING.LIB
 
-# Build after busybox so target ends up with bc's "dc" version
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-BC_DEPENDENCIES += busybox
-endif
-
 $(eval $(autotools-package))
package/busybox/busybox.mk +1 -0
index d920987d11..75a2dc4c6d 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_BC),bc) \
 	$(if $(BR2_PACKAGE_BINUTILS),binutils) \
 	$(if $(BR2_PACKAGE_COREUTILS),coreutils) \
 	$(if $(BR2_PACKAGE_CPIO),cpio) \
Signature · 1 line
2.14.1
#54 lore raw

PATCH v2 48/50 package/busybox: invert dependency with bash

In reply to Yann E. MORIN
---
 package/bash/bash.mk       | 4 +---
 package/busybox/busybox.mk | 1 +
 2 files changed, 2 insertions(+), 3 deletions(-)
package/bash/bash.mk +1 -3
index bb52bf3259..7fb7192e2c 100644
@@ -6,9 +6,7 @@
 
 BASH_VERSION = 4.4.18
 BASH_SITE = $(BR2_GNU_MIRROR)/bash
-# Build after since bash is better than busybox shells
-BASH_DEPENDENCIES = ncurses readline host-bison \
-	$(if $(BR2_PACKAGE_BUSYBOX),busybox)
+BASH_DEPENDENCIES = ncurses readline host-bison
 BASH_CONF_OPTS = --with-installed-readline --without-bash-malloc
 BASH_LICENSE = GPL-3.0+
 BASH_LICENSE_FILES = COPYING
package/busybox/busybox.mk +1 -0
index 75a2dc4c6d..0a9af9f17b 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_BASH),bash) \
 	$(if $(BR2_PACKAGE_BC),bc) \
 	$(if $(BR2_PACKAGE_BINUTILS),binutils) \
 	$(if $(BR2_PACKAGE_COREUTILS),coreutils) \
Signature · 1 line
2.14.1
#55 lore raw

PATCH v2 48/50 package/busybox: invert dependency with bash

Quoted 26 lines · Yann E. MORIN
---
 package/bash/bash.mk       | 4 +---
 package/busybox/busybox.mk | 1 +
 2 files changed, 2 insertions(+), 3 deletions(-)
package/bash/bash.mk +1 -3
index bb52bf3259..7fb7192e2c 100644
@@ -6,9 +6,7 @@
 
 BASH_VERSION = 4.4.18
 BASH_SITE = $(BR2_GNU_MIRROR)/bash
-# Build after since bash is better than busybox shells
-BASH_DEPENDENCIES = ncurses readline host-bison \
-	$(if $(BR2_PACKAGE_BUSYBOX),busybox)
+BASH_DEPENDENCIES = ncurses readline host-bison
 BASH_CONF_OPTS = --with-installed-readline --without-bash-malloc
 BASH_LICENSE = GPL-3.0+
 BASH_LICENSE_FILES = COPYING
package/busybox/busybox.mk +0 -0
index 75a2dc4c6d..0a9af9f17b 100644

package/busybox/busybox.mk BUSYBOX_LDFLAGS = \ · line 25

Quoted 4 lines
package/busybox/busybox.mk +1 -0
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_BASH),bash) \

Actually, which applet does busybox have that bash also provides? The shell,
obviously, but that's handled by the BR2_SYSTEM_BIN_SH choice...

I'm going to apply this patch anyway, but it's something to think about.

Regards,
Arnout

Quoted 4 lines
package/busybox/busybox.mk +0 -0
 	$(if $(BR2_PACKAGE_BC),bc) \
 	$(if $(BR2_PACKAGE_BINUTILS),binutils) \
 	$(if $(BR2_PACKAGE_COREUTILS),coreutils) \
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#56 lore raw

PATCH v2 48/50 package/busybox: invert dependency with bash

Arnout, All,

On 2018-07-08 13:06 +0200, Arnout Vandecappelle spake thusly:

Quoted 28 lines · Yann E. MORIN
Quoted 27 lines
---
 package/bash/bash.mk       | 4 +---
 package/busybox/busybox.mk | 1 +
 2 files changed, 2 insertions(+), 3 deletions(-)
package/bash/bash.mk +1 -3
index bb52bf3259..7fb7192e2c 100644
@@ -6,9 +6,7 @@
 
 BASH_VERSION = 4.4.18
 BASH_SITE = $(BR2_GNU_MIRROR)/bash
-# Build after since bash is better than busybox shells
-BASH_DEPENDENCIES = ncurses readline host-bison \
-	$(if $(BR2_PACKAGE_BUSYBOX),busybox)
+BASH_DEPENDENCIES = ncurses readline host-bison
 BASH_CONF_OPTS = --with-installed-readline --without-bash-malloc
 BASH_LICENSE = GPL-3.0+
 BASH_LICENSE_FILES = COPYING
package/busybox/busybox.mk +0 -0
index 75a2dc4c6d..0a9af9f17b 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
Quoted 6 lines

package/busybox/busybox.mk BUSYBOX_LDFLAGS = \ · line 25

Quoted 3 lines
package/busybox/busybox.mk +1 -0
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_BASH),bash) \

Actually, which applet does busybox have that bash also provides? The shell,
obviously, but that's handled by the BR2_SYSTEM_BIN_SH choice...

That dependency has existed for, like, ages now:

commit 3d7a187f7690d3d42f59f933f5d4aa32c096b7b4
Author: Eric Andersen <[email protected]>
Date: Mon Dec 27 21:46:32 2004 +0000

If both bash and busybox are selected, make certain bash wins the fight over who gets to own the /bin/sh symlink
-Erik
---
package/bash/bash.mk | 6 ++++++
1 file changed, 6 insertions(+)

But then this series was meant to be more mechanical than not, i.e. just invert the dependencies without thinking too much about the rationale behind the dependency. I guess it can safely been dropped now...

Regards,
Yann E. MORIN.

Quoted 18 lines

I'm going to apply this patch anyway, but it's something to think about.

Regards,
Arnout

Quoted 4 lines
package/busybox/busybox.mk +0 -0
 	$(if $(BR2_PACKAGE_BC),bc) \
 	$(if $(BR2_PACKAGE_BINUTILS),binutils) \
 	$(if $(BR2_PACKAGE_COREUTILS),coreutils) \
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#57 lore raw

PATCH v2 49/50 package/busybox: add dependency on attr

In reply to Yann E. MORIN

attr and busybox may each install setfattr, so attr must be installed before busybox.

---
 package/busybox/busybox.mk | 1 +
 1 file changed, 1 insertion(+)
package/busybox/busybox.mk +1 -0
index 0a9af9f17b..5266f844b6 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_ATTR),attr) \
 	$(if $(BR2_PACKAGE_BASH),bash) \
 	$(if $(BR2_PACKAGE_BC),bc) \
 	$(if $(BR2_PACKAGE_BINUTILS),binutils) \
Signature · 1 line
2.14.1
#58 lore raw

PATCH v2 49/50 package/busybox: add dependency on attr

Quoted 2 lines · Yann E. MORIN

attr and busybox may each install setfattr, so attr must be installed before busybox.

bzip2 is in a similar situation, and probably more.

Regards,
Arnout

Quoted 19 lines
---
 package/busybox/busybox.mk | 1 +
 1 file changed, 1 insertion(+)
package/busybox/busybox.mk +1 -0
index 0a9af9f17b..5266f844b6 100644
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_ATTR),attr) \
 	$(if $(BR2_PACKAGE_BASH),bash) \
 	$(if $(BR2_PACKAGE_BC),bc) \
 	$(if $(BR2_PACKAGE_BINUTILS),binutils) \
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#59 lore raw

PATCH v2 49/50 package/busybox: add dependency on attr

Arnout, All,

On 2018-07-08 13:09 +0200, Arnout Vandecappelle spake thusly:

Quoted 4 lines · Yann E. MORIN
Quoted 2 lines

attr and busybox may each install setfattr, so attr must be installed before busybox.

bzip2 is in a similar situation, and probably more.

Sure, but I took care only of attr because we had a bug about it, not for the others.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#60 lore raw

PATCH v2 50/50 support/scripts: don't draw most of busybox' dependencies

In reply to Yann E. MORIN

Since most dependencies of busybox' are there to guarantee that busybox does not install applets that are already provided by other packages, they are not really functional dependencies, and mostly clutter the dependency graph.

Only the dependencies on libraries are interesting, so that is all we keep.

Even though that function is only called with pkg set to 'busybox', we still pass it as an argument, for symetry with the other functions that removes the dependencies of a package.

---
Changes v1 -> v2:
- carry tag from Matt
- clarify linux-pam case (Carlos)

---
 support/scripts/graph-depends | 11 +++++++++++
 1 file changed, 11 insertions(+)
support/scripts/graph-depends +11 -0
index 621e603278..0a3bc11be7 100755
@@ -181,6 +181,15 @@ def remove_mandatory_deps(pkg, deps):
     return [p for p in deps[pkg] if p not in ['toolchain', 'skeleton']]
 
 
+# This function removes all dependencies of busybox, except its
+# dependencies on libraries (of which libpam, from linux-pam) and
+# host-pkgconf.
+def remove_busybox_deps(pkg, deps):
+    busybox_dep_whitelist = ['linux-pam', 'host-pkgconf']
+    return [p for p in deps[pkg]
+            if p.startswith('lib') or p in busybox_dep_whitelist]
+
+
 # This function will check that there is no loop in the dependency chain
 # As a side effect, it builds up the dependency cache.
 def check_circular_deps(deps):
@@ -211,6 +220,8 @@ def check_circular_deps(deps):
 # This functions trims down the dependency list of all packages.
 # It applies in sequence all the dependency-elimination methods.
 def remove_extra_deps(deps, transitive):
+    if 'busybox' in list(deps.keys()):
+        deps['busybox'] = remove_busybox_deps('busybox', deps)
     for pkg in list(deps.keys()):
         if not pkg == 'all':
             deps[pkg] = remove_mandatory_deps(pkg, deps)
Signature · 1 line
2.14.1
#61 lore raw

PATCH v2 50/50 support/scripts: don't draw most of busybox' dependencies

Quoted 4 lines · Yann E. MORIN

Since most dependencies of busybox' are there to guarantee that busybox does not install applets that are already provided by other packages, they are not really functional dependencies, and mostly clutter the dependency graph.

The thing is, they still are dependencies. I often use graph-depends to do a
poor man's TLPB by starting builds of individual packages in separate shells, but then I first have to check that their dependency chains are non-overlapping. If you're going to hide some dependencies, that's not going to work any more...

I also sometimes use it to understand why make decides to execute things in a
particular order. Again, hiding dependencies doesn't help there.

On the other hand, it's like the toolchain: you know everything depends on the
toolchain, and similarly you know that buildroot depends on everything. So maybe it's not that bad.

Quoted 25 lines

Only the dependencies on libraries are interesting, so that is all we keep.

Even though that function is only called with pkg set to 'busybox', we still pass it as an argument, for symetry with the other functions that removes the dependencies of a package.

---
Changes v1 -> v2:
- carry tag from Matt
- clarify linux-pam case (Carlos)

---
 support/scripts/graph-depends | 11 +++++++++++
 1 file changed, 11 insertions(+)
support/scripts/graph-depends +0 -0
index 621e603278..0a3bc11be7 100755

support/scripts/graph-depends def remove_mandatory_deps(pkg, deps): · line 190

Quoted 10 lines
support/scripts/graph-depends +7 -0
@@ -181,6 +181,15 @@ def remove_mandatory_deps(pkg, deps):
     return [p for p in deps[pkg] if p not in ['toolchain', 'skeleton']]
 
 
+# This function removes all dependencies of busybox, except its
+# dependencies on libraries (of which libpam, from linux-pam) and
+# host-pkgconf.
+def remove_busybox_deps(pkg, deps):
+    busybox_dep_whitelist = ['linux-pam', 'host-pkgconf']
+    return [p for p in deps[pkg]
+            if p.startswith('lib') or p in busybox_dep_whitelist]

This feels horribly fragile to me...

I would feel more comfortable if we would introduce _INSTALL_DEPENDENCIES, as
discussed in v1 of the series, and then simply exclude the _INSTALL_DEPENDENCIES from the graph. Or maybe even add a graph-depends option to do that.

Note: I have *not* marked this patch as changes requested, since it's actually
good to go, except that I have more fundamental concerns about it.

Regards,
Arnout

Quoted 15 lines
support/scripts/graph-depends +4 -0
+
+
 # This function will check that there is no loop in the dependency chain
 # As a side effect, it builds up the dependency cache.
 def check_circular_deps(deps):
@@ -211,6 +220,8 @@ def check_circular_deps(deps):
 # This functions trims down the dependency list of all packages.
 # It applies in sequence all the dependency-elimination methods.
 def remove_extra_deps(deps, transitive):
+    if 'busybox' in list(deps.keys()):
+        deps['busybox'] = remove_busybox_deps('busybox', deps)
     for pkg in list(deps.keys()):
         if not pkg == 'all':
             deps[pkg] = remove_mandatory_deps(pkg, deps)
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#62 lore raw

PATCH v2 50/50 support/scripts: don't draw most of busybox' dependencies

Arnout, All,

On 2018-07-08 13:25 +0200, Arnout Vandecappelle spake thusly:

Quoted 11 lines · Yann E. MORIN
Quoted 4 lines

Since most dependencies of busybox' are there to guarantee that busybox does not install applets that are already provided by other packages, they are not really functional dependencies, and mostly clutter the dependency graph.

The thing is, they still are dependencies. I often use graph-depends to do a
poor man's TLPB by starting builds of individual packages in separate shells, but then I first have to check that their dependency chains are non-overlapping. If you're going to hide some dependencies, that's not going to work any more...

Quoted 6 lines

I also sometimes use it to understand why make decides to execute things in a
particular order. Again, hiding dependencies doesn't help there.

On the other hand, it's like the toolchain: you know everything depends on the
toolchain, and similarly you know that buildroot depends on everything. So maybe it's not that bad.

Well, I like the depednency graph to also represent "why is the foo package enabled, when I don;t want it? Oh, it is a dependnecy of bar, I should disable bar then." In the case of busybox, that is wrong:
busybox does not need those packages, so graphing such dependency can be misleading...

But I don;t care much, so I marked it as rejected.

Regards,
Yann E. MORIN.

Quoted 74 lines
Quoted 25 lines

Only the dependencies on libraries are interesting, so that is all we keep.

Even though that function is only called with pkg set to 'busybox', we still pass it as an argument, for symetry with the other functions that removes the dependencies of a package.

---
Changes v1 -> v2:
- carry tag from Matt
- clarify linux-pam case (Carlos)

---
 support/scripts/graph-depends | 11 +++++++++++
 1 file changed, 11 insertions(+)
support/scripts/graph-depends +0 -0
index 621e603278..0a3bc11be7 100755

support/scripts/graph-depends def remove_mandatory_deps(pkg, deps): · line 190

Quoted 10 lines
support/scripts/graph-depends +7 -0
@@ -181,6 +181,15 @@ def remove_mandatory_deps(pkg, deps):
     return [p for p in deps[pkg] if p not in ['toolchain', 'skeleton']]
 
 
+# This function removes all dependencies of busybox, except its
+# dependencies on libraries (of which libpam, from linux-pam) and
+# host-pkgconf.
+def remove_busybox_deps(pkg, deps):
+    busybox_dep_whitelist = ['linux-pam', 'host-pkgconf']
+    return [p for p in deps[pkg]
+            if p.startswith('lib') or p in busybox_dep_whitelist]

This feels horribly fragile to me...

I would feel more comfortable if we would introduce _INSTALL_DEPENDENCIES, as
discussed in v1 of the series, and then simply exclude the _INSTALL_DEPENDENCIES from the graph. Or maybe even add a graph-depends option to do that.

Note: I have *not* marked this patch as changes requested, since it's actually
good to go, except that I have more fundamental concerns about it.

Regards,
Arnout

Quoted 15 lines
support/scripts/graph-depends +4 -0
+
+
 # This function will check that there is no loop in the dependency chain
 # As a side effect, it builds up the dependency cache.
 def check_circular_deps(deps):
@@ -211,6 +220,8 @@ def check_circular_deps(deps):
 # This functions trims down the dependency list of all packages.
 # It applies in sequence all the dependency-elimination methods.
 def remove_extra_deps(deps, transitive):
+    if 'busybox' in list(deps.keys()):
+        deps['busybox'] = remove_busybox_deps('busybox', deps)
     for pkg in list(deps.keys()):
         if not pkg == 'all':
             deps[pkg] = remove_mandatory_deps(pkg, deps)
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#63 lore raw

PATCH v2 50/50 support/scripts: don't draw most of busybox' dependencies

Quoted 21 lines · Yann E. MORIN

Arnout, All,

On 2018-07-08 13:25 +0200, Arnout Vandecappelle spake thusly:

Quoted 11 lines · Yann E. MORIN
Quoted 4 lines

Since most dependencies of busybox' are there to guarantee that busybox does not install applets that are already provided by other packages, they are not really functional dependencies, and mostly clutter the dependency graph.

The thing is, they still are dependencies. I often use graph-depends to do a
poor man's TLPB by starting builds of individual packages in separate shells, but then I first have to check that their dependency chains are non-overlapping. If you're going to hide some dependencies, that's not going to work any more...

Quoted 6 lines

I also sometimes use it to understand why make decides to execute things in a
particular order. Again, hiding dependencies doesn't help there.

On the other hand, it's like the toolchain: you know everything depends on the
toolchain, and similarly you know that buildroot depends on everything. So maybe it's not that bad.

Quoted 5 lines

Well, I like the depednency graph to also represent "why is the foo package enabled, when I don;t want it? Oh, it is a dependnecy of bar, I should disable bar then." In the case of busybox, that is wrong:
busybox does not need those packages, so graphing such dependency can be misleading...

That would indeed be really useful. Unfortunately, the dependency graph gives
you none of that information, because you also get the automatic optional dependencies.

And actually, the Kconfig help text already gives that information. If you
think it is unreadable (which it is), update to the latest linux kconfig, it has been much improved.

Quoted 2 lines

But I don;t care much, so I marked it as rejected.

Great! :-)

Regards,
Arnout

Quoted 79 lines

Regards,
Yann E. MORIN.

Quoted 74 lines
Quoted 25 lines

Only the dependencies on libraries are interesting, so that is all we keep.

Even though that function is only called with pkg set to 'busybox', we still pass it as an argument, for symetry with the other functions that removes the dependencies of a package.

---
Changes v1 -> v2:
- carry tag from Matt
- clarify linux-pam case (Carlos)

---
 support/scripts/graph-depends | 11 +++++++++++
 1 file changed, 11 insertions(+)
support/scripts/graph-depends +0 -0
index 621e603278..0a3bc11be7 100755

support/scripts/graph-depends def remove_mandatory_deps(pkg, deps): · line 190

Quoted 10 lines
support/scripts/graph-depends +7 -0
@@ -181,6 +181,15 @@ def remove_mandatory_deps(pkg, deps):
     return [p for p in deps[pkg] if p not in ['toolchain', 'skeleton']]
 
 
+# This function removes all dependencies of busybox, except its
+# dependencies on libraries (of which libpam, from linux-pam) and
+# host-pkgconf.
+def remove_busybox_deps(pkg, deps):
+    busybox_dep_whitelist = ['linux-pam', 'host-pkgconf']
+    return [p for p in deps[pkg]
+            if p.startswith('lib') or p in busybox_dep_whitelist]

This feels horribly fragile to me...

I would feel more comfortable if we would introduce _INSTALL_DEPENDENCIES, as
discussed in v1 of the series, and then simply exclude the _INSTALL_DEPENDENCIES from the graph. Or maybe even add a graph-depends option to do that.

Note: I have *not* marked this patch as changes requested, since it's actually
good to go, except that I have more fundamental concerns about it.

Regards,
Arnout

Quoted 15 lines
support/scripts/graph-depends +4 -0
+
+
 # This function will check that there is no loop in the dependency chain
 # As a side effect, it builds up the dependency cache.
 def check_circular_deps(deps):
@@ -211,6 +220,8 @@ def check_circular_deps(deps):
 # This functions trims down the dependency list of all packages.
 # It applies in sequence all the dependency-elimination methods.
 def remove_extra_deps(deps, transitive):
+    if 'busybox' in list(deps.keys()):
+        deps['busybox'] = remove_busybox_deps('busybox', deps)
     for pkg in list(deps.keys()):
         if not pkg == 'all':
             deps[pkg] = remove_mandatory_deps(pkg, deps)
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#64 lore raw

PATCH v2 50/50 support/scripts: don't draw most of busybox' dependencies

In reply to Yann E. MORIN
Quoted 60 lines

From: "Yann Morin" <[email protected]>
To: "buildroot" <[email protected]>
Cc: "Yann Morin" <[email protected]>, "DATACOM" <[email protected]>
Sent: Sunday, July 8, 2018 6:46:15 AM
Subject: [PATCH 50/50 v2] support/scripts: don't draw most of busybox' dependencies

Since most dependencies of busybox' are there to guarantee that busybox does not install applets that are already provided by other packages, they are not really functional dependencies, and mostly clutter the dependency graph.

Only the dependencies on libraries are interesting, so that is all we keep.

Even though that function is only called with pkg set to 'busybox', we still pass it as an argument, for symetry with the other functions that removes the dependencies of a package.

---
Changes v1 -> v2:
- carry tag from Matt
- clarify linux-pam case (Carlos)
---
support/scripts/graph-depends | 11 +++++++++++

1 file changed, 11 insertions(+)
support/scripts/graph-depends +9 -0
index 621e603278..0a3bc11be7 100755
@@ -181,6 +181,15 @@ def remove_mandatory_deps(pkg, deps):
    return [p for p in deps[pkg] if p not in ['toolchain', 'skeleton']]
 
 
+# This function removes all dependencies of busybox, except its
+# dependencies on libraries (of which libpam, from linux-pam) and
+# host-pkgconf.
+def remove_busybox_deps(pkg, deps):
+    busybox_dep_whitelist = ['linux-pam', 'host-pkgconf']
+    return [p for p in deps[pkg]
+            if p.startswith('lib') or p in busybox_dep_whitelist]
+
+
 # This function will check that there is no loop in the dependency chain
 # As a side effect, it builds up the dependency cache.

def check_circular_deps(deps):

support/scripts/graph-depends +0 -0
@@ -211,6 +220,8 @@ def check_circular_deps(deps):
 # This functions trims down the dependency list of all packages.
 # It applies in sequence all the dependency-elimination methods.

def remove_extra_deps(deps, transitive):

support/scripts/graph-depends +2 -1
+    if 'busybox' in list(deps.keys()):
+        deps['busybox'] = remove_busybox_deps('busybox', deps)
    for pkg in list(deps.keys()):
        if not pkg == 'all':
            deps[pkg] = remove_mandatory_deps(pkg, deps)
--
Quoted 1 line

2.14.1

Signature · 3 lines
Carlos Santos (Casantos) - DATACOM, P&D
?Marched towards the enemy, spear upright, armed with the certainty
that only the ignorant can have.? ? Epitaph of a volunteer
#65 lore raw

PATCH v2 50/50 support/scripts: don't draw most of busybox' dependencies

Quoted 5 lines

From: "DATACOM" <[email protected]>
To: "Yann Morin" <[email protected]>
Cc: "buildroot" <[email protected]>
Sent: Sunday, July 8, 2018 10:41:25 PM
Subject: Re: [Buildroot] [PATCH 50/50 v2] support/scripts: don't draw most of busybox' dependencies

[...]

Quoted 3 lines

So you start writing some review messages but leave home for some hours.

Then you come back and send the messages just to realize, a few minutes later, that the patch was already submitted. Dooh!

Signature · 3 lines
Carlos Santos (Casantos) - DATACOM, P&D
?Marched towards the enemy, spear upright, armed with the certainty
that only the ignorant can have.? ? Epitaph of a volunteer
#66 lore raw

PATCH v2 50/50 support/scripts: don't draw most of busybox' dependencies

Quoted 7 lines · Carlos Santos
Quoted 5 lines

From: "DATACOM" <[email protected]>
To: "Yann Morin" <[email protected]>
Cc: "buildroot" <[email protected]>
Sent: Sunday, July 8, 2018 10:41:25 PM
Subject: Re: [Buildroot] [PATCH 50/50 v2] support/scripts: don't draw most of busybox' dependencies

[...]

Quoted 1 line
Quoted 7 lines
Quoted 2 lines

So you start writing some review messages but leave home for some hours.

Then you come back and send the messages just to realize, a few minutes later, that the patch was already submitted. Dooh!

Actually, it was not submitted, it was rejected... So the review does make
sense, if you want to make a case to keep it after all.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#67 lore raw

v2 cover package/busybox: invert dependencies

In reply to Yann E. MORIN
Quoted 5 lines · Yann E. MORIN

Hello All!

Currently, the issue that busybox may install the same executables as those from other packages, is handled in all those packages. This is not very practical from a maintenance point of view.

[snip]

Quoted 13 lines

Inverting a single dependency could introduce a dependency loop, which would be resolved by a latter inversion. For example, suppose we were to start with this initial situation:

    B -->-- A -->-- busybox
     `------>-------'

With the first inversion, we'd get to now have a dependency loop:

    B -->-- A -->-- busybox -->-- B

Then with the second inversion, we'd resolve that loop:

Quoted 7 lines
                    busybox -->-- B -->-- A
                           `------>------'

Detecting and avoiding those loops is not trivial, because they may imply multiple intermediate packages between B and A. So, the series does not attempt to prevent those loops, as they are entirely resolved by the end of the series anyway.

Because of this, I've applied the entire series 2-49 in one go.

I'm not happy with patch 50 so I'll comment on that.

Regards,
Arnout

Quoted 126 lines

Regards,
Yann E. MORIN.

The following changes since commit 0fe0c50d3683be4975a4551ac183707692b11215

systemd: Fix polkit build order (2018-07-08 00:19:37 +0200)

are available in the git repository at:

git://git.buildroot.org/~ymorin/git/buildroot.git

for you to fetch changes up to 7d4417e280d8c1db48496f8e35895c4819cae957

support/scripts: don't draw most of busybox' dependencies (2018-07-08 11:24:23 +0200)

----------------------------------------------------------------
Yann E. MORIN (50):
package/busybox: update to 1.29.0 package/busybox: invert dependency with whois package/busybox: invert dependency with wget package/busybox: invert dependency with vim package/busybox: invert dependency with util-linux package/busybox: invert dependency with usbutils package/busybox: invert dependency with unzip package/busybox: invert dependency with traceroute package/busybox: invert dependency with tftpd package/busybox: invert dependency with tar package/busybox: invert dependency with sysvinit package/busybox: invert dependency with systemd package/busybox: invert dependency with syslog-ng package/busybox: invert dependency with sysklogd package/busybox: invert dependency with start-stop-daemon package/busybox: invert dependency with rsyslog package/busybox: invert dependency with psmisc package/busybox: invert dependency with procps-ng package/busybox: invert dependency with pciutils package/busybox: invert dependency with ntp package/busybox: invert dependency with nmap package/busybox: invert dependency with netcat-openbsd package/busybox: invert dependency with netcat package/busybox: invert dependency with net-tools package/busybox: invert dependency with mtd package/busybox: invert dependency with lsof package/busybox: invert dependency with less package/busybox: invert dependency with kmod package/busybox: invert dependency with iputils package/busybox: invert dependency with iproute2 package/busybox: invert dependency with ifupdown package/busybox: invert dependency with ifplugd package/busybox: invert dependency with ifenslave package/busybox: invert dependency with i2c-tools package/busybox: invert dependency with gzip package/busybox: invert dependency with grep package/busybox: invert dependency with gawk package/busybox: invert dependency with fbset package/busybox: invert dependency with e2fsprogs package/busybox: invert dependency with dos2unix package/busybox: invert dependency with diffutils package/busybox: invert dependency with debianutils package/busybox: invert dependency with dcron package/busybox: invert dependency with cpio package/busybox: invert dependency with coreutils package/busybox: invert dependency with binutils package/busybox: invert dependency with bc package/busybox: invert dependency with bash package/busybox: add dependency on attr support/scripts: don't draw most of busybox' dependencies

 package/bash/bash.mk                               |  4 +-
 package/bc/bc.mk                                   |  5 --
 package/binutils/binutils.mk                       |  5 --
 ...ags-strip-non-l-arguments-returned-by-pkg.patch |  4 +-
 package/busybox/busybox.hash                       | 10 +---
 package/busybox/busybox.mk                         | 68 +++++++++++++++++++---
 package/coreutils/coreutils.mk                     |  6 --
 package/cpio/cpio.mk                               |  1 -
 package/dcron/dcron.mk                             |  5 --
 package/debianutils/debianutils.mk                 |  2 -
 package/diffutils/diffutils.mk                     |  4 --
 package/dos2unix/dos2unix.mk                       |  4 +-
 package/e2fsprogs/e2fsprogs.mk                     | 10 +---
 package/fbset/fbset.mk                             |  5 --
 package/gawk/gawk.mk                               |  5 --
 package/grep/grep.mk                               |  5 --
 package/gzip/gzip.mk                               |  2 -
 package/i2c-tools/i2c-tools.mk                     |  4 --
 package/ifenslave/ifenslave.mk                     |  1 -
 package/ifplugd/ifplugd.mk                         |  5 --
 package/ifupdown/ifupdown.mk                       |  1 -
 package/iproute2/iproute2.mk                       |  6 --
 package/iputils/iputils.mk                         |  6 --
 package/kmod/kmod.mk                               |  3 -
 package/less/less.mk                               |  3 +-
 package/lsof/lsof.mk                               |  3 -
 package/mtd/mtd.mk                                 |  4 --
 package/net-tools/net-tools.mk                     |  8 +--
 package/netcat-openbsd/netcat-openbsd.mk           |  6 --
 package/netcat/netcat.mk                           | 13 -----
 package/nmap/nmap.mk                               |  6 --
 package/ntp/ntp.mk                                 |  2 +-
 package/pciutils/pciutils.mk                       |  5 --
 package/procps-ng/procps-ng.mk                     | 10 +---
 package/psmisc/psmisc.mk                           |  5 --
 package/rsyslog/rsyslog.mk                         |  5 --
 package/start-stop-daemon/start-stop-daemon.mk     |  3 +-
 package/sysklogd/sysklogd.mk                       |  5 --
 package/syslog-ng/syslog-ng.mk                     |  5 --
 package/systemd/systemd.mk                         |  6 --
 package/sysvinit/sysvinit.mk                       |  5 --
 package/tar/tar.mk                                 |  7 +--
 package/tftpd/tftpd.mk                             |  5 --
 package/traceroute/traceroute.mk                   |  5 --
 package/unzip/unzip.mk                             |  2 -
 package/usbutils/usbutils.mk                       |  5 --
 package/util-linux/util-linux.mk                   |  6 --
 package/vim/vim.mk                                 |  5 +-
 package/wget/wget.mk                               |  5 --
 package/whois/whois.mk                             |  3 +-
 support/scripts/graph-depends                      | 11 ++++
 51 files changed, 90 insertions(+), 229 deletions(-)
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF