package: rely on systemctl preset-all for upstream-provided services
authorJérémy Rosen <jeremy.rosen@smile.fr>
Mon, 16 Dec 2019 10:30:44 +0000 (11:30 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Wed, 18 Dec 2019 17:33:22 +0000 (18:33 +0100)
All these packages have an upstream-provided service, but buildroot
enabled manually the services in exactly the same way as the [Install]
section.

This is not needed anymore

Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr>
[yann.morin.1998@free.fr: fix check-package errors]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
23 files changed:
package/audit/audit.mk
package/avahi/avahi.mk
package/bluez5_utils/bluez5_utils.mk
package/boinc/boinc.mk
package/docker-engine/docker-engine.mk
package/fail2ban/fail2ban.mk
package/gerbera/gerbera.mk
package/iputils/iputils.mk
package/lighttpd/lighttpd.mk
package/lldpd/lldpd.mk
package/mosquitto/mosquitto.mk
package/nfs-utils/nfs-utils.mk
package/ofono/ofono.mk
package/pcsc-lite/pcsc-lite.mk
package/php/php.mk
package/rsyslog/rsyslog.mk
package/samba4/samba4.mk
package/squid/squid.mk
package/sshguard/sshguard.mk
package/sysrepo/sysrepo.mk
package/systemd-bootchart/systemd-bootchart.mk
package/transmission/transmission.mk
package/upmpdcli/upmpdcli.mk

index 1e05688f4589d99118723bacaa52a91945c3717d..03967ee6502f352d1bd46e692c4bd0c0f041db42 100644 (file)
@@ -44,10 +44,6 @@ define AUDIT_INSTALL_INIT_SYSV
 endef
 
 define AUDIT_INSTALL_INIT_SYSTEMD
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -fs ../../../../usr/lib/systemd/system/auditd.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/auditd.service
-
        $(INSTALL) -D -m 644 package/audit/audit_tmpfiles.conf \
                $(TARGET_DIR)/usr/lib/tmpfiles.d/audit.conf
 endef
index baffe3cb69e7dc9bb5cd14e5c31372bf78c82637..53021f6b6d3d2a074dcfbf7a622cece60d7ddfb9 100644 (file)
@@ -198,14 +198,6 @@ endef
 endif
 
 define AVAHI_INSTALL_INIT_SYSTEMD
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-
-       ln -fs ../../../../usr/lib/systemd/system/avahi-daemon.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-daemon.service
-
-       ln -fs ../../../../usr/lib/systemd/system/avahi-dnsconfd.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-dnsconfd.service
-
        $(INSTALL) -D -m 644 package/avahi/avahi_tmpfiles.conf \
                $(TARGET_DIR)/usr/lib/tmpfiles.d/avahi.conf
 
index 7c5202b717c132c33ff3f76b107c70e0b00603dd..8f9249454dd752d00ccbba2fea54a4c59bfc0d31 100644 (file)
@@ -118,12 +118,4 @@ else
 BLUEZ5_UTILS_CONF_OPTS += --disable-systemd
 endif
 
-define BLUEZ5_UTILS_INSTALL_INIT_SYSTEMD
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants
-       ln -fs ../../../../usr/lib/systemd/system/bluetooth.service \
-               $(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants/bluetooth.service
-       ln -fs ../../../usr/lib/systemd/system/bluetooth.service \
-               $(TARGET_DIR)/etc/systemd/system/dbus-org.bluez.service
-endef
-
 $(eval $(autotools-package))
index 5a29214f46021904f076eeb7392be23a4291c1aa..827eaa0c84c099a2f7e8db0df7ace3e68bf1b2e5 100644 (file)
@@ -53,10 +53,4 @@ define BOINC_INSTALL_INIT_SYSV
                $(TARGET_DIR)/etc/init.d/S99boinc-client
 endef
 
-define BOINC_INSTALL_INIT_SYSTEMD
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -sf ../../../../usr/lib/systemd/system/boinc-client.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/boinc-client.service
-endef
-
 $(eval $(autotools-package))
index 6a225ee5f01023f548a7efbc640184b0c77276a8..c6a0442570b1b2bd41c62419c567fa1eb87cc969 100644 (file)
@@ -68,9 +68,6 @@ define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD
                $(TARGET_DIR)/usr/lib/systemd/system/docker.service
        $(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.socket \
                $(TARGET_DIR)/usr/lib/systemd/system/docker.socket
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/
-       ln -fs ../../../../usr/lib/systemd/system/docker.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/docker.service
 endef
 
 define DOCKER_ENGINE_INSTALL_INIT_SYSV
index 16fa63c147110c34d2456265f6838d265e6f977b..a0325dffc5b46e95c00cede4bdea657dde9e76ce 100644 (file)
@@ -25,9 +25,6 @@ endef
 define FAIL2BAN_INSTALL_INIT_SYSTEMD
        $(INSTALL) -D -m 0644 $(@D)/files/fail2ban.service.in \
                $(TARGET_DIR)/usr/lib/systemd/system/fail2ban.service
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -fs ../../../../usr/lib//systemd/system/fail2ban.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/fail2ban.service
        $(SED) 's,@BINDIR@,/usr/bin,g' $(TARGET_DIR)/usr/lib/systemd/system/fail2ban.service
        $(SED) '/^PIDFile/c\PIDFile=/run/fail2ban.pid' $(TARGET_DIR)/usr/lib/systemd/system/fail2ban.service
 endef
index 2579b8f2e468bd44cca70358aaa1377e7da72a8b..21c683695264e33a5bfa7ec7232c53cd5e12fe8f 100644 (file)
@@ -104,11 +104,4 @@ define GERBERA_INSTALL_INIT_SYSV
                $(TARGET_DIR)/etc/init.d/S99gerbera
 endef
 
-# gerbera.service is installed by cmake in $(TARGET_DIR)/usr/lib/systemd/system
-define GERBERA_INSTALL_INIT_SYSTEMD
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -sf ../../../../usr/lib/systemd/system/gerbera.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/gerbera.service
-endef
-
 $(eval $(cmake-package))
index daceb192f2846dbc99ceadcd5cf2396c51af3627..5b20d4f99eeca0bf80fa7d5f53b46838e9029664 100644 (file)
@@ -62,11 +62,6 @@ ifeq ($(IPUTILS_NINFOD),n)
 IPUTILS_CONF_OPTS += -DBUILD_NINFOD=false
 else
 IPUTILS_CONF_OPTS += -DBUILD_NINFOD=true
-define IPUTILS_INSTALL_SERVICE_NINFOD
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -sf ../../../../lib/systemd/system/ninfod.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ninfod.service
-endef
 endif
 
 ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
@@ -118,15 +113,4 @@ define IPUTILS_PERMISSIONS
 endef
 endif
 
-define IPUTILS_INSTALL_SERVICE_RDISC
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -sf ../../../../lib/systemd/system/rdisc.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/rdisc.service
-endef
-
-define IPUTILS_INSTALL_INIT_SYSTEMD
-       $(IPUTILS_INSTALL_SERVICE_NINFOD)
-       $(IPUTILS_INSTALL_SERVICE_RDISC)
-endef
-
 $(eval $(meson-package))
index 449b4b4de21e3f50d3bb0e31c0f7ed04bba1e651..d7622ad822883bd3f99522d2f87d7448d6958e7f 100644 (file)
@@ -99,12 +99,6 @@ endef
 define LIGHTTPD_INSTALL_INIT_SYSTEMD
        $(INSTALL) -D -m 0644 $(@D)/doc/systemd/lighttpd.service \
                $(TARGET_DIR)/usr/lib/systemd/system/lighttpd.service
-
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-
-       ln -fs ../../../../usr/lib/systemd/system/lighttpd.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/lighttpd.service
-
        $(INSTALL) -D -m 644 package/lighttpd/lighttpd_tmpfiles.conf \
                $(TARGET_DIR)/usr/lib/tmpfiles.d/lighttpd.conf
 endef
index 5569e409dd302a6473dcf9aaf94dd5b5886d7814..264323a879e5dde2d21d3e5163cbe0cb027ba2b2 100644 (file)
@@ -65,10 +65,4 @@ define LLDPD_INSTALL_INIT_SYSV
                $(TARGET_DIR)/etc/init.d/S60lldpd
 endef
 
-define LLDPD_INSTALL_INIT_SYSTEMD
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -sf ../../../../usr/lib/systemd/system/lldpd.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/lldpd.service
-endef
-
 $(eval $(autotools-package))
index d0ffffd1d69a33e63f7318322042a39d25c30703..2c3bd18d5e6b016dff8e0f3f5d2508e5eea0f9f7 100644 (file)
@@ -111,9 +111,6 @@ endef
 define MOSQUITTO_INSTALL_INIT_SYSTEMD
        $(INSTALL) -D -m 644 $(@D)/service/systemd/mosquitto.service.notify \
                $(TARGET_DIR)/usr/lib/systemd/system/mosquitto.service
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -fs ../../../../usr/lib/systemd/system/mosquitto.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/mosquitto.service
 endef
 
 define MOSQUITTO_USERS
index cb2caa03f0b4187113d640a8a2485a5471c3b97e..a3484286d11d6b8a21df127ce4cb4fcf6e681552 100644 (file)
@@ -73,25 +73,9 @@ define NFS_UTILS_INSTALL_INIT_SYSV
                $(TARGET_DIR)/etc/init.d/S60nfs
 endef
 
-define NFS_UTILS_INSTALL_INIT_SYSTEMD_NFSD
-       ln -fs ../../../../usr/lib/systemd/system/nfs-server.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nfs-server.service
-endef
 endif
 
 define NFS_UTILS_INSTALL_INIT_SYSTEMD
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-
-       $(NFS_UTILS_INSTALL_INIT_SYSTEMD_NFSD)
-
-       ln -fs ../../../../usr/lib/systemd/system/nfs-client.target \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nfs-client.target
-
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/remote-fs.target.wants
-
-       ln -fs ../../../../usr/lib/systemd/system/nfs-client.target \
-               $(TARGET_DIR)/etc/systemd/system/remote-fs.target.wants/nfs-client.target
-
        $(INSTALL) -D -m 0755 package/nfs-utils/nfs-utils_env.sh \
                $(TARGET_DIR)/usr/libexec/nfs-utils/nfs-utils_env.sh
 
index 0765ff97c1fe5433d654530dfd6b22d7574d8646..797e30bd436879e85aa45d906831b552059ded66 100644 (file)
@@ -31,12 +31,6 @@ define OFONO_INSTALL_INIT_SYSV
        $(INSTALL) -m 0755 -D package/ofono/S46ofono $(TARGET_DIR)/etc/init.d/S46ofono
 endef
 
-define OFONO_INSTALL_INIT_SYSTEMD
-       mkdir -p $(TARGET_DIR)/etc/systemd/systemd/multi-user.target.wants
-       ln -fs ../../../../usr/lib/systemd/system/ofono.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-endef
-
 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 OFONO_CONF_OPTS += --enable-udev
 OFONO_DEPENDENCIES += udev
index e819a93910da683253fdb0f5da993c9810ab1b4f..08aab466fcbb2a7dd581c65d7717d67431ab950f 100644 (file)
@@ -44,10 +44,4 @@ ifeq ($(PACKAGE_PCSC_LITE_EMBEDDED),y)
 PCSC_LITE_CONF_OPTS += --enable-embedded
 endif
 
-define PCSC_LITE_INSTALL_INIT_SYSTEMD
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/sockets.target.wants
-       ln -sf ../../../../usr/lib/systemd/system/pcscd.socket \
-               $(TARGET_DIR)/etc/systemd/system/sockets.target.wants/pcscd.socket
-endef
-
 $(eval $(autotools-package))
index 1f3972c4135c8cc8ccdc32b7d7bcbf524660553b..be35ed445622eeb807815d1817a63e256587c36a 100644 (file)
@@ -338,9 +338,6 @@ endef
 define PHP_INSTALL_INIT_SYSTEMD
        $(INSTALL) -D -m 0644 $(@D)/sapi/fpm/php-fpm.service \
                $(TARGET_DIR)/usr/lib/systemd/system/php-fpm.service
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -fs ../../../../usr/lib/systemd/system/php-fpm.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/php-fpm.service
 endef
 
 define PHP_INSTALL_FPM_CONF
index 1d535fc26b704b4f3e0cd466965e336951a70763..c4446c210da3039b2abf6d14375f3309ade32228 100644 (file)
@@ -85,20 +85,6 @@ define RSYSLOG_INSTALL_INIT_SYSV
                $(TARGET_DIR)/etc/init.d/S01rsyslogd
 endef
 
-# The rsyslog.service is installed by rsyslog, but the link is not created
-# so the service is not enabled.
-# We need to create another link which is due to the fact that the
-# rsyslog.service contains an Alias=
-# If we were to use systemctl enable to enable the service, it would
-# create both, so we mimic that.
-define RSYSLOG_INSTALL_INIT_SYSTEMD
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -sf ../../../../usr/lib/systemd/system/rsyslog.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/rsyslog.service
-       ln -sf ../../../usr/lib/systemd/system/rsyslog.service \
-               $(TARGET_DIR)/etc/systemd/system/syslog.service
-endef
-
 define RSYSLOG_INSTALL_CONF
        $(INSTALL) -m 0644 -D $(@D)/platform/redhat/rsyslog.conf \
                $(TARGET_DIR)/etc/rsyslog.conf
index 201328fe4ba2441452ecc07faff5cfaac3592997..bf9636f6e8770d2ff1d7e7c8f48636864e6e3fbf 100644 (file)
@@ -174,13 +174,6 @@ SAMBA4_DEPENDENCIES += systemd
 endif
 
 define SAMBA4_INSTALL_INIT_SYSTEMD
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -sf ../../../../usr/lib/systemd/system/nmb.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nmb.service
-       ln -sf ../../../../usr/lib/systemd/system/smb.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/smb.service
-       ln -sf ../../../../usr/lib/systemd/system/winbind.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/winbind.service
        $(INSTALL) -D -m 644 $(@D)/packaging/systemd/samba.conf.tmp \
                $(TARGET_DIR)/usr/lib/tmpfiles.d/samba.conf
        printf "d /var/log/samba  755 root root\n" >>$(TARGET_DIR)/usr/lib/tmpfiles.d/samba.conf
index 0d09968bd382e923bd3f72b67de7bb126a4f2a9e..34a463d80dddb3a43bdc836dbe019162b5cbe7f6 100644 (file)
@@ -85,9 +85,6 @@ endef
 define SQUID_INSTALL_INIT_SYSTEMD
        $(INSTALL) -D -m 0644 $(@D)/tools/systemd/squid.service \
                $(TARGET_DIR)/usr/lib/systemd/system/squid.service
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -sf ../../../..//usr/lib/systemd/system/squid.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/squid.service
 endef
 
 $(eval $(autotools-package))
index 0f39974d46eca86b6bcf447acfe3b89f64fbe842..ceff5206930ece53c8da3f6117a0a8b53a72093d 100644 (file)
@@ -25,9 +25,6 @@ endef
 define SSHGUARD_INSTALL_INIT_SYSTEMD
        $(INSTALL) -D -m 0644 $(@D)/examples/sshguard.service \
                $(TARGET_DIR)/usr/lib/systemd/system/sshguard.service
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -fs ../../../../usr/lib/systemd/system/sshguard.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/sshguard.service
 endef
 
 $(eval $(autotools-package))
index cc4f8e406f85eec02d66546c022d2806bae7d9bc..f693ff70da4e71668730da0de47437406e591fed 100644 (file)
@@ -41,14 +41,6 @@ define SYSREPO_INSTALL_INIT_SYSV
                $(TARGET_DIR)/etc/init.d/S51sysrepo-plugind
 endef
 
-define SYSREPO_INSTALL_INIT_SYSTEMD
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -fs ../../../../usr/lib/systemd/system/sysrepod.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -fs ../../../../usr/lib/systemd/system/sysrepo-plugind.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-endef
-
 HOST_SYSREPO_CONF_OPTS = \
        -DGEN_PYTHON2_TESTS=OFF \
        -DENABLE_TESTS=OFF \
index 62bc79539b1ac6f3828c0105f08b562d1f1daec7..bcc3dbe22af2510cfce13fe90e3d6bbe36fe5981 100644 (file)
@@ -16,10 +16,4 @@ SYSTEMD_BOOTCHART_DEPENDENCIES = systemd
 
 SYSTEMD_BOOTCHART_CONF_OPTS = --disable-man
 
-define SYSTEMD_BOOTCHART_INSTALL_INIT_SYSTEMD
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants
-       ln -sf ../../../../lib/systemd/system/systemd-bootchart.service \
-               $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants/systemd-bootchart.service
-endef
-
 $(eval $(autotools-package))
index 00652e7f4ce589614eacd96b85a000f3e28ddfd5..8fbda5eea35cae67770aa1e99e51571888306003 100644 (file)
@@ -66,9 +66,6 @@ endef
 define TRANSMISSION_INSTALL_INIT_SYSTEMD
        $(INSTALL) -D -m 0644 $(@D)/daemon/transmission-daemon.service \
                $(TARGET_DIR)/usr/lib/systemd/system/transmission-daemon.service
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -fs ../../../../usr/lib/systemd/system/transmission-daemon.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/transmission-daemon.service
 endef
 
 else
index 6fa3ae3c5ed75a5acc4ddc096b2e69e40f363232..290cdcb1f25d163d235f18a8e72720e482bdc6e3 100644 (file)
@@ -27,9 +27,6 @@ endef
 define UPMPDCLI_INSTALL_INIT_SYSTEMD
        $(INSTALL) -D -m 644 $(@D)/systemd/upmpdcli.service \
                $(TARGET_DIR)/usr/lib/systemd/system/upmpdcli.service
-       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-       ln -sf ../../../../usr/lib/systemd/system/upmpdcli.service \
-               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/upmpdcli.service
 endef
 
 define UPMPDCLI_INSTALL_CONF_FILE