package/busybox: invert dependency with syslog-ng
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 8 Jul 2018 09:45:38 +0000 (11:45 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sun, 8 Jul 2018 10:22:14 +0000 (12:22 +0200)
In so doing, we must now ensure that busybox does not overwrite
the startup script already installed by syslog-ng.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/busybox/busybox.mk
package/syslog-ng/syslog-ng.mk

index 9d3ea22d96e7f3a741988a328a0e0d4e57f90328..c6c7b03ab3275f34a962ca8111569cc317fd8d8f 100644 (file)
@@ -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
index 2b6f2c09e9d25413c7f422b83124393dfd055b99..793fea0972091fcfe2e50ea67a013b3d6a9f5042 100644 (file)
@@ -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