RFC: systemd and service files cleanup
All,
Currently, package service files for systemd are installed by buildroot in a variety of locations: /etc, /lib, and /usr/lib. For systemd, split /lib is deprecated and only checked if a split /lib and /usr/lib is enabled. /etc is meant for local customizations to the default service files. It is my opinion that buildroot should install all upstream package and buildroot-provided service files in /usr/lib, and this series cleans up our packages to do exactly that. Enabling them by default by linking them to /etc/systemd/system/multi-user.target.wants has been preserved.
Upstream systemd's standard installation directory for its binaries is /usr/lib. It appears that historically, buildroot's systemd installation location has been switched between /lib and /usr/lib multiple times. I couldn't find any particular reason for this, so I've moved it back to /usr/lib along with its service files.
Anyway, please send comments :).
Mike Williams
PATCH 1/15 ntp: move systemd service file to /usr/lib
--- package/ntp/ntp.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/ntp/ntp.mk +2 -2
@@ -71,9 +71,9 @@ define NTP_INSTALL_INIT_SYSV endef define NTP_INSTALL_INIT_SYSTEMD - $(INSTALL) -D -m 644 package/ntp/ntpd.service $(TARGET_DIR)/etc/systemd/system/ntpd.service + $(INSTALL) -D -m 644 package/ntp/ntpd.service $(TARGET_DIR)/usr/lib/systemd/system/ntpd.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../ntpd.service $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service + ln -fs /usr/lib/systemd/system/ntpd.service $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service endef endif
Signature · 1 line
2.1.0
PATCH 1/15 ntp: move systemd service file to /usr/lib
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>
Quoted 20 lines
--- package/ntp/ntp.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)package/ntp/ntp.mk +2
-2@@ -71,9 +71,9 @@ define NTP_INSTALL_INIT_SYSV endef define NTP_INSTALL_INIT_SYSTEMD - $(INSTALL) -D -m 644 package/ntp/ntpd.service $(TARGET_DIR)/etc/systemd/system/ntpd.service + $(INSTALL) -D -m 644 package/ntp/ntpd.service $(TARGET_DIR)/usr/lib/systemd/system/ntpd.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../ntpd.service $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service + ln -fs /usr/lib/systemd/system/ntpd.service $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service endef endif
PATCH 1/15 ntp: move systemd service file to /usr/lib
Quoted 4 lines · Steven Noonan
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>Reviewed-by Steven Noonan <[email protected]>
Regards,
Signature · 1 line
Samuel
PATCH 2/15 openvmtools: move systemd service to /usr/lib
In reply to Mike Williams--- package/openvmtools/openvmtools.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/openvmtools/openvmtools.mk +2 -2
@@ -67,9 +67,9 @@ endef define OPENVMTOOLS_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/openvmtools/vmtoolsd.service \ - $(TARGET_DIR)/etc/systemd/system/vmtoolsd.service + $(TARGET_DIR)/usr/lib/systemd/system/vmtoolsd.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../vmtoolsd.service \ + ln -fs /usr/lib/systemd/system/vmtoolsd.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/vmtoolsd.service endef
Signature · 1 line
2.1.0
PATCH 2/15 openvmtools: move systemd service to /usr/lib
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>
Quoted 27 lines
--- package/openvmtools/openvmtools.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)package/openvmtools/openvmtools.mk +2
-3@@ -67,9 +67,9 @@ endef define OPENVMTOOLS_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/openvmtools/vmtoolsd.service \ - $(TARGET_DIR)/etc/systemd/system/vmtoolsd.service + $(TARGET_DIR)/usr/lib/systemd/system/vmtoolsd.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../vmtoolsd.service \ + ln -fs /usr/lib/systemd/system/vmtoolsd.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/vmtoolsd.service endef --2.1.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 2/15 openvmtools: move systemd service to /usr/lib
Quoted 4 lines · Steven Noonan
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>Reviewed-by Steven Noonan <[email protected]>
Regards,
Signature · 1 line
Samuel
PATCH 3/15 psplash: move systemd service files to /usr/lib
In reply to Mike Williams--- package/psplash/psplash.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
package/psplash/psplash.mk +5 -5
@@ -11,15 +11,15 @@ PSPLASH_AUTORECONF = YES define PSPLASH_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/psplash/psplash-start.service \ - $(TARGET_DIR)/etc/systemd/system/psplash-start.service - $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants - ln -sf ../psplash-start.service \ + $(TARGET_DIR)/usr/lib/systemd/system/psplash-start.service + $(INSTALL) -d $(TARGET_DIR)/usr/lib/systemd/system/sysinit.target.wants + ln -sf /usr/lib/systemd/system/psplash-start.service \ $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants/ $(INSTALL) -D -m 644 package/psplash/psplash-quit.service \ - $(TARGET_DIR)/etc/systemd/system/psplash-quit.service + $(TARGET_DIR)/usr/lib/systemd/system/psplash-quit.service $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -sf ../psplash-quit.service \ + ln -sf /usr/lib/systemd/system/psplash-quit.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ endef
Signature · 1 line
2.1.0
PATCH 3/15 psplash: move systemd service files to /usr/lib
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>
Quoted 36 lines
--- package/psplash/psplash.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)package/psplash/psplash.mk +5
-6@@ -11,15 +11,15 @@ PSPLASH_AUTORECONF = YES define PSPLASH_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/psplash/psplash-start.service \ - $(TARGET_DIR)/etc/systemd/system/psplash-start.service - $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants - ln -sf ../psplash-start.service \ + $(TARGET_DIR)/usr/lib/systemd/system/psplash-start.service + $(INSTALL) -d $(TARGET_DIR)/usr/lib/systemd/system/sysinit.target.wants + ln -sf /usr/lib/systemd/system/psplash-start.service \ $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants/ $(INSTALL) -D -m 644 package/psplash/psplash-quit.service \ - $(TARGET_DIR)/etc/systemd/system/psplash-quit.service + $(TARGET_DIR)/usr/lib/systemd/system/psplash-quit.service $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -sf ../psplash-quit.service \ + ln -sf /usr/lib/systemd/system/psplash-quit.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ endef --2.1.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 3/15 psplash: move systemd service files to /usr/lib
Quoted 4 lines · Steven Noonan
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>Reviewed-by Steven Noonan <[email protected]>
Regards,
Signature · 1 line
Samuel
PATCH 4/15 openntpd: move systemd service files to /usr/lib
In reply to Mike Williams--- package/openntpd/openntpd.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/openntpd/openntpd.mk +2 -2
@@ -11,9 +11,9 @@ OPENNTPD_LICENSE_FILES = COPYING define OPENNTPD_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 0644 package/openntpd/ntpd.service \ - $(TARGET_DIR)/etc/systemd/system/ntpd.service + $(TARGET_DIR)/usr/lib/systemd/system/ntpd.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../ntpd.service \ + ln -fs /usr/lib/systemd/system/ntpd.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service endef
Signature · 1 line
2.1.0
PATCH 4/15 openntpd: move systemd service files to /usr/lib
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>
Quoted 27 lines
--- package/openntpd/openntpd.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)package/openntpd/openntpd.mk +2
-3@@ -11,9 +11,9 @@ OPENNTPD_LICENSE_FILES = COPYING define OPENNTPD_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 0644 package/openntpd/ntpd.service \ - $(TARGET_DIR)/etc/systemd/system/ntpd.service + $(TARGET_DIR)/usr/lib/systemd/system/ntpd.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../ntpd.service \ + ln -fs /usr/lib/systemd/system/ntpd.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service endef --2.1.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 4/15 openntpd: move systemd service files to /usr/lib
Quoted 4 lines · Steven Noonan
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>Reviewed-by Steven Noonan <[email protected]>
Regards,
Signature · 1 line
Samuel
PATCH 5/15 dbus: move systemd service files to /usr/lib
In reply to Mike Williams--- package/dbus/dbus.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/dbus/dbus.mk +1 -1
@@ -54,7 +54,7 @@ endif ifeq ($(BR2_INIT_SYSTEMD),y) DBUS_CONF_OPTS += \ --enable-systemd \ - --with-systemdsystemunitdir=/lib/systemd/system + --with-systemdsystemunitdir=/usr/lib/systemd/system DBUS_DEPENDENCIES += systemd else DBUS_CONF_OPTS += --disable-systemd
Signature · 1 line
2.1.0
PATCH 5/15 dbus: move systemd service files to /usr/lib
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>
Quoted 24 lines
--- package/dbus/dbus.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)package/dbus/dbus.mk +1
-2@@ -54,7 +54,7 @@ endif ifeq ($(BR2_INIT_SYSTEMD),y) DBUS_CONF_OPTS += \ --enable-systemd \ - --with-systemdsystemunitdir=/lib/systemd/system + --with-systemdsystemunitdir=/usr/lib/systemd/system DBUS_DEPENDENCIES += systemd else DBUS_CONF_OPTS += --disable-systemd --2.1.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 5/15 dbus: move systemd service files to /usr/lib
Quoted 4 lines · Steven Noonan
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>Reviewed-by Steven Noonan <[email protected]>
Regards,
Signature · 1 line
Samuel
PATCH 6/15 avahi: systemd cleanups
In reply to Mike Williams* Move service files to /usr/lib/systemd/system/
* Only disable systemd support on non-systemd systems
--- package/avahi/0002-disable-systemd-support.patch | 22 ---------------------- package/avahi/avahi.mk | 8 ++++++-- 2 files changed, 6 insertions(+), 24 deletions(-) delete mode 100644 package/avahi/0002-disable-systemd-support.patch
package/avahi/0002-disable-systemd-support.patch deleted +0 -22
@@ -1,22 +0,0 @@ -[PATCH] avahi-daemon: disable systemd support - -Disable systemd support as it isn't needed for BR, and uses SOCK_CLOEXEC -which isn't available on uClibc. - -Signed-off-by: Peter Korsgaard <[email protected]> ---- - avahi-daemon/sd-daemon.h | 1 + - 1 file changed, 1 insertion(+) - -Index: avahi-0.6.27/avahi-daemon/sd-daemon.h -=================================================================== ---- avahi-0.6.27.orig/avahi-daemon/sd-daemon.h -+++ avahi-0.6.27/avahi-daemon/sd-daemon.h -@@ -66,6 +66,7 @@ extern "C" { - - See sd-daemon(7) for more information. - */ -+#define DISABLE_SYSTEMD /* no systemd support in BR */ - - #if __GNUC__ >= 4 - #define _sd_printf_attr_(a,b) __attribute__ ((format (printf, a, b)))
package/avahi/avahi.mk +6 -2
@@ -88,6 +88,10 @@ AVAHI_DEPENDENCIES = \ $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-intltool \ host-pkgconf host-gettext +ifneq ($(BR2_PACKAGE_SYSTEMD),y) +AVAHI_EXTRA_CFLAGS += -DDISABLE_SYSTEMD +endif + ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),) AVAHI_DEPENDENCIES += libdaemon else
@@ -185,10 +189,10 @@ ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y) define AVAHI_INSTALL_INIT_SYSTEMD mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs /lib/systemd/system/avahi-daemon.service \ + ln -fs /usr/lib/systemd/system/avahi-daemon.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-daemon.service - ln -fs /lib/systemd/system/avahi-dnsconfd.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 \
Signature · 1 line
2.1.0
PATCH 6/15 avahi: systemd cleanups
Quoted 4 lines · Mike Williams
* Move service files to
/usr/lib/systemd/system/
* Only disable systemd support on non-systemd systemsSigned-off-by Mike Williams <[email protected]>
Quoted 69 lines
--- package/avahi/0002-disable-systemd-support.patch | 22 ---------------------- package/avahi/avahi.mk | 8 ++++++-- 2 files changed, 6 insertions(+), 24 deletions(-) delete mode 100644 package/avahi/0002-disable-systemd-support.patchpackage/avahi/0002-disable-systemd-support.patch deleted +0
-22@@ -1,22 +0,0 @@ -[PATCH] avahi-daemon: disable systemd support - -Disable systemd support as it isn't needed for BR, and uses SOCK_CLOEXEC -which isn't available on uClibc. - -Signed-off-by: Peter Korsgaard <[email protected]> ---- - avahi-daemon/sd-daemon.h | 1 + - 1 file changed, 1 insertion(+) - -Index: avahi-0.6.27/avahi-daemon/sd-daemon.h -=================================================================== ---- avahi-0.6.27.orig/avahi-daemon/sd-daemon.h -+++ avahi-0.6.27/avahi-daemon/sd-daemon.h -@@ -66,6 +66,7 @@ extern "C" { - - See sd-daemon(7) for more information. - */ -+#define DISABLE_SYSTEMD /* no systemd support in BR */ - - #if __GNUC__ >= 4 - #define _sd_printf_attr_(a,b) __attribute__ ((format (printf, a, b)))package/avahi/avahi.mk +6
-3@@ -88,6 +88,10 @@ AVAHI_DEPENDENCIES = \ $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-intltool \ host-pkgconf host-gettext +ifneq ($(BR2_PACKAGE_SYSTEMD),y) +AVAHI_EXTRA_CFLAGS += -DDISABLE_SYSTEMD +endif + ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),) AVAHI_DEPENDENCIES += libdaemon else@@ -185,10 +189,10 @@ ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y) define AVAHI_INSTALL_INIT_SYSTEMD mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs /lib/systemd/system/avahi-daemon.service \ + ln -fs /usr/lib/systemd/system/avahi-daemon.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-daemon.service - ln -fs /lib/systemd/system/avahi-dnsconfd.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 \ --2.1.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 6/15 avahi: systemd cleanups
Quoted 5 lines · Steven Noonan
Quoted 4 lines · Mike Williams
* Move service files to
/usr/lib/systemd/system/
* Only disable systemd support on non-systemd systemsSigned-off-by Mike Williams <[email protected]>
Regards,
Signature · 1 line
Samuel
PATCH 6/15 avahi: systemd cleanups
In reply to Mike WilliamsDear Mike Williams,
package/avahi/avahi.mk AVAHI_DEPENDENCIES = \ · line 93
Quoted 3 lines · Mike Williams
package/avahi/avahi.mk +3
-0+ifneq ($(BR2_PACKAGE_SYSTEMD),y) +AVAHI_EXTRA_CFLAGS += -DDISABLE_SYSTEMD +endif
This cannot work, since AVAHI_EXTRA_CFLAGS is not used by anything.
I'm surprised you got a Reviewed-by from Samuel and Steven with this big issue.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 6/15 avahi: systemd cleanups
Quoted 4 lines · Thomas Petazzoni
Dear Mike Williams,
On Thu, 19 Mar 2015 13:56:38 -0400, Mike Williams wrote:
Quoted 8 lines
package/avahi/avahi.mk AVAHI_DEPENDENCIES = \ · line 93
Quoted 3 lines
package/avahi/avahi.mk +3
-0+ifneq ($(BR2_PACKAGE_SYSTEMD),y) +AVAHI_EXTRA_CFLAGS += -DDISABLE_SYSTEMD +endifThis cannot work, since
AVAHI_EXTRA_CFLAGSis not used by anything.I'm surprised you got a Reviewed-by from Samuel and Steven with this big issue.
argh! right! I missed that :-s
Signature · 1 line
Samuel
PATCH 7/15 irqbalance: move systemd service file to /usr/lib
In reply to Mike Williams--- package/irqbalance/irqbalance.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/irqbalance/irqbalance.mk +2 -2
@@ -26,9 +26,9 @@ endef define IRQBALANCE_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/irqbalance/irqbalance.service \ - $(TARGET_DIR)/etc/systemd/system/irqbalance.service + $(TARGET_DIR)/usr/lib/systemd/system/irqbalance.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../irqbalance.service \ + ln -fs /usr/lib/systemd/system/irqbalance.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/irqbalance.service endef
Signature · 1 line
2.1.0
PATCH 7/15 irqbalance: move systemd service file to /usr/lib
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>
Quoted 27 lines
--- package/irqbalance/irqbalance.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)package/irqbalance/irqbalance.mk +2
-3@@ -26,9 +26,9 @@ endef define IRQBALANCE_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/irqbalance/irqbalance.service \ - $(TARGET_DIR)/etc/systemd/system/irqbalance.service + $(TARGET_DIR)/usr/lib/systemd/system/irqbalance.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../irqbalance.service \ + ln -fs /usr/lib/systemd/system/irqbalance.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/irqbalance.service endef --2.1.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 7/15 irqbalance: move systemd service file to /usr/lib
Quoted 4 lines · Steven Noonan
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>Reviewed-by Steven Noonan <[email protected]>
Regards,
Signature · 1 line
Samuel
PATCH 8/15 openssh: move systemd service files to /usr/lib
In reply to Mike Williams--- package/openssh/openssh.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
package/openssh/openssh.mk +3 -3
@@ -36,10 +36,10 @@ endif define OPENSSH_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/openssh/sshd.service \ - $(TARGET_DIR)/etc/systemd/system/sshd.service + $(TARGET_DIR)/usr/lib/systemd/system/sshd.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../sshd.service \ - $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/sshd.service + ln -fs /usr/lib/systemd/system/sshd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/multi-user.target.wants/sshd.service endef define OPENSSH_INSTALL_INIT_SYSV
Signature · 1 line
2.1.0
PATCH 8/15 openssh: move systemd service files to /usr/lib
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>
Quoted 29 lines
--- package/openssh/openssh.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)package/openssh/openssh.mk +3
-4@@ -36,10 +36,10 @@ endif define OPENSSH_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/openssh/sshd.service \ - $(TARGET_DIR)/etc/systemd/system/sshd.service + $(TARGET_DIR)/usr/lib/systemd/system/sshd.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../sshd.service \ - $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/sshd.service + ln -fs /usr/lib/systemd/system/sshd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/multi-user.target.wants/sshd.service endef define OPENSSH_INSTALL_INIT_SYSV --2.1.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 8/15 openssh: move systemd service files to /usr/lib
Quoted 4 lines · Steven Noonan
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>Reviewed-by Steven Noonan <[email protected]>
Regards,
Signature · 1 line
Samuel
PATCH 9/15 rsyslog: move systemd service file to /usr/lib
In reply to Mike Williams--- package/rsyslog/rsyslog.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/rsyslog/rsyslog.mk +1 -1
@@ -65,7 +65,7 @@ define RSYSLOG_INSTALL_INIT_SYSV endef define RSYSLOG_INSTALL_INIT_SYSTEMD - ln -sf /lib/systemd/system/rsyslog.service \ + ln -sf /usr/lib/systemd/system/rsyslog.service \ $(TARGET_DIR)/etc/systemd/system/syslog.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants ln -sf ../syslog.service \
Signature · 1 line
2.1.0
PATCH 9/15 rsyslog: move systemd service file to /usr/lib
Quoted 10 lines · Mike Williams
Signed-off-by Mike Williams <[email protected]>--- package/rsyslog/rsyslog.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)package/rsyslog/rsyslog.mk +0
-0
package/rsyslog/rsyslog.mk define RSYSLOG_INSTALL_INIT_SYSV · line 69
Quoted 6 lines
package/rsyslog/rsyslog.mk +1
-1@@ -65,7 +65,7 @@ define RSYSLOG_INSTALL_INIT_SYSV endef define RSYSLOG_INSTALL_INIT_SYSTEMD - ln -sf /lib/systemd/system/rsyslog.service \ + ln -sf /usr/lib/systemd/system/rsyslog.service \ $(TARGET_DIR)/etc/systemd/system/syslog.service
Nothing needs to change in rsyslog to make it install the unit to this location?
Quoted 9 lines
package/rsyslog/rsyslog.mk +0
-1mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants ln -sf ../syslog.service \ --2.1.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 9/15 rsyslog: move systemd service file to /usr/lib
In reply to Mike WilliamsHi Mike,
Quoted 10 lines · Mike Williams
Signed-off-by Mike Williams <[email protected]>--- package/rsyslog/rsyslog.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)package/rsyslog/rsyslog.mk +0
-0
package/rsyslog/rsyslog.mk define RSYSLOG_INSTALL_INIT_SYSV · line 71
Quoted 8 lines
package/rsyslog/rsyslog.mk +1
-1@@ -65,7 +65,7 @@ define RSYSLOG_INSTALL_INIT_SYSV endef define RSYSLOG_INSTALL_INIT_SYSTEMD - ln -sf /lib/systemd/system/rsyslog.service \ + ln -sf /usr/lib/systemd/system/rsyslog.service \ $(TARGET_DIR)/etc/systemd/system/syslog.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants ln -sf ../syslog.service \
You also need to update the symlink target here.
Regards,
Signature · 1 line
Samuel
PATCH 10/15 dropbear: move systemd service file to /usr/lib
In reply to Mike Williams--- package/dropbear/dropbear.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/dropbear/dropbear.mk +2 -2
@@ -53,9 +53,9 @@ endef define DROPBEAR_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/dropbear/dropbear.service \ - $(TARGET_DIR)/lib/systemd/system/dropbear.service + $(TARGET_DIR)/usr/lib/systemd/system/dropbear.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs /lib/systemd/system/dropbear.service \ + ln -fs /usr/lib/systemd/system/dropbear.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dropbear.service endef
Signature · 1 line
2.1.0
PATCH 10/15 dropbear: move systemd service file to /usr/lib
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>
Quoted 27 lines
--- package/dropbear/dropbear.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)package/dropbear/dropbear.mk +2
-3@@ -53,9 +53,9 @@ endef define DROPBEAR_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/dropbear/dropbear.service \ - $(TARGET_DIR)/lib/systemd/system/dropbear.service + $(TARGET_DIR)/usr/lib/systemd/system/dropbear.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs /lib/systemd/system/dropbear.service \ + ln -fs /usr/lib/systemd/system/dropbear.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dropbear.service endef --2.1.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 10/15 dropbear: move systemd service file to /usr/lib
Quoted 4 lines · Steven Noonan
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>Reviewed-by Steven Noonan <[email protected]>
Regards,
Signature · 1 line
Samuel
PATCH 11/15 postgresql: move systemd service file to /usr/lib
In reply to Mike Williams--- package/postgresql/postgresql.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/postgresql/postgresql.mk +2 -2
@@ -85,9 +85,9 @@ endef define POSTGRESQL_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/postgresql/postgresql.service \ - $(TARGET_DIR)/etc/systemd/system/postgresql.service + $(TARGET_DIR)/usr/lib/systemd/system/postgresql.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../postgresql.service \ + ln -fs /usr/lib/systemd/system/postgresql.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/postgresql.service endef
Signature · 1 line
2.1.0
PATCH 11/15 postgresql: move systemd service file to /usr/lib
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>
Quoted 27 lines
--- package/postgresql/postgresql.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)package/postgresql/postgresql.mk +2
-3@@ -85,9 +85,9 @@ endef define POSTGRESQL_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/postgresql/postgresql.service \ - $(TARGET_DIR)/etc/systemd/system/postgresql.service + $(TARGET_DIR)/usr/lib/systemd/system/postgresql.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../postgresql.service \ + ln -fs /usr/lib/systemd/system/postgresql.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/postgresql.service endef --2.1.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 11/15 postgresql: move systemd service file to /usr/lib
Quoted 4 lines · Steven Noonan
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>Reviewed-by Steven Noonan <[email protected]>
Regards,
Signature · 1 line
Samuel
PATCH 12/15 libiio: move systemd service file to /usr/lib
In reply to Mike Williams--- package/libiio/libiio.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/libiio/libiio.mk +2 -2
@@ -41,8 +41,8 @@ endef define LIBIIO_INSTALL_INIT_SYSTEMD $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants $(INSTALL) -D -m 0644 $(@D)/debian/iiod.service \ - $(TARGET_DIR)/lib/systemd/system/iiod.service - ln -fs /lib/systemd/system/iiod.service \ + $(TARGET_DIR)/usr/lib/systemd/system/iiod.service + ln -fs /usr/lib/systemd/system/iiod.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/iiod.service endef endif
Signature · 1 line
2.1.0
PATCH 12/15 libiio: move systemd service file to /usr/lib
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>
Quoted 26 lines
--- package/libiio/libiio.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)package/libiio/libiio.mk +2
-3@@ -41,8 +41,8 @@ endef define LIBIIO_INSTALL_INIT_SYSTEMD $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants $(INSTALL) -D -m 0644 $(@D)/debian/iiod.service \ - $(TARGET_DIR)/lib/systemd/system/iiod.service - ln -fs /lib/systemd/system/iiod.service \ + $(TARGET_DIR)/usr/lib/systemd/system/iiod.service + ln -fs /usr/lib/systemd/system/iiod.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/iiod.service endef endif --2.1.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 12/15 libiio: move systemd service file to /usr/lib
Quoted 4 lines · Steven Noonan
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>Reviewed-by Steven Noonan <[email protected]>
Regards,
Signature · 1 line
Samuel
PATCH 13/15 dhcp: move systemd service file to /usr/lib
In reply to Mike Williams--- package/dhcp/dhcp.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/dhcp/dhcp.mk +2 -2
@@ -78,11 +78,11 @@ endef ifeq ($(BR2_PACKAGE_DHCP_SERVER),y) define DHCP_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/dhcp/dhcpd.service \ - $(TARGET_DIR)/lib/systemd/system/dhcpd.service + $(TARGET_DIR)/usr/lib/systemd/system/dhcpd.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -sf ../../../../lib/systemd/system/dhcpd.service \ + ln -sf /usr/lib/systemd/system/dhcpd.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dhcpd.service echo "d /var/lib/dhcp 0755 - - - -" > \
Signature · 1 line
2.1.0
PATCH 13/15 dhcp: move systemd service file to /usr/lib
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>
Quoted 29 lines
--- package/dhcp/dhcp.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)package/dhcp/dhcp.mk +2
-3@@ -78,11 +78,11 @@ endef ifeq ($(BR2_PACKAGE_DHCP_SERVER),y) define DHCP_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/dhcp/dhcpd.service \ - $(TARGET_DIR)/lib/systemd/system/dhcpd.service + $(TARGET_DIR)/usr/lib/systemd/system/dhcpd.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -sf ../../../../lib/systemd/system/dhcpd.service \ + ln -sf /usr/lib/systemd/system/dhcpd.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dhcpd.service echo "d /var/lib/dhcp 0755 - - - -" > \ --2.1.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 13/15 dhcp: move systemd service file to /usr/lib
Quoted 4 lines · Steven Noonan
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>Reviewed-by Steven Noonan <[email protected]>
Regards,
Signature · 1 line
Samuel
PATCH 14/15 kodi: move systemd service file to /usr/lib
In reply to Mike Williams--- package/kodi/kodi.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/kodi/kodi.mk +2 -2
@@ -256,11 +256,11 @@ endef define KODI_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/kodi/kodi.service \ - $(TARGET_DIR)/etc/systemd/system/kodi.service + $(TARGET_DIR)/usr/lib/systemd/system/kodi.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../kodi.service \ + ln -fs /usr/lib/systemd/system/kodi.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/kodi.service endef
Signature · 1 line
2.1.0
PATCH 14/15 kodi: move systemd service file to /usr/lib
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>
Quoted 29 lines
--- package/kodi/kodi.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)package/kodi/kodi.mk +2
-3@@ -256,11 +256,11 @@ endef define KODI_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/kodi/kodi.service \ - $(TARGET_DIR)/etc/systemd/system/kodi.service + $(TARGET_DIR)/usr/lib/systemd/system/kodi.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../kodi.service \ + ln -fs /usr/lib/systemd/system/kodi.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/kodi.service endef --2.1.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 14/15 kodi: move systemd service file to /usr/lib
Quoted 4 lines · Steven Noonan
Quoted 1 line · Mike Williams
Signed-off-by Mike Williams <[email protected]>Reviewed-by Steven Noonan <[email protected]>
Regards,
Signature · 1 line
Samuel
PATCH 15/15 systemd: change install path to /usr/lib
In reply to Mike Williams/usr/lib is the default path for upstream systemd.
--- package/systemd/systemd.mk | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-)
package/systemd/systemd.mk +12 -14
@@ -27,8 +27,6 @@ SYSTEMD_DEPENDENCIES += busybox endif SYSTEMD_CONF_OPTS += \ - --with-rootprefix= \ - --with-rootlibdir=/lib \ --enable-static=no \ --disable-manpages \ --disable-selinux \
@@ -100,16 +98,16 @@ endif ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD),y) SYSTEMD_CONF_OPTS += --enable-networkd define SYSTEMD_INSTALL_RESOLVCONF_HOOK - ln -sf ../run/systemd/resolve/resolv.conf \ + ln -sf /run/systemd/resolve/resolv.conf \ $(TARGET_DIR)/etc/resolv.conf endef else SYSTEMD_CONF_OPTS += --disable-networkd define SYSTEMD_INSTALL_SERVICE_NETWORK $(INSTALL) -D -m 644 package/systemd/network.service \ - $(TARGET_DIR)/etc/systemd/system/network.service + $(TARGET_DIR)/usr/lib/systemd/system/network.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../network.service \ + ln -fs /usr/lib/systemd/system/network.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/network.service endef endif
@@ -118,7 +116,7 @@ ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD),y) SYSTEMD_CONF_OPTS += --enable-timesyncd define SYSTEMD_INSTALL_SERVICE_TIMESYNC mkdir -p $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants - ln -sf ../../../../lib/systemd/system/systemd-timesyncd.service \ + ln -sf /usr/lib/systemd/system/systemd-timesyncd.service \ $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service endef else
@@ -144,12 +142,12 @@ SYSTEMD_MAKE_OPTS += LIBS=-lrt SYSTEMD_MAKE_OPTS += LDFLAGS+=-ldl define SYSTEMD_INSTALL_INIT_HOOK - ln -fs ../lib/systemd/systemd $(TARGET_DIR)/sbin/init - ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/halt - ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/poweroff - ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/reboot + ln -fs /usr/lib/systemd/systemd $(TARGET_DIR)/sbin/init + ln -fs /usr/bin/systemctl $(TARGET_DIR)/sbin/halt + ln -fs /usr/bin/systemctl $(TARGET_DIR)/sbin/poweroff + ln -fs /usr/bin/systemctl $(TARGET_DIR)/sbin/reboot - ln -fs ../../../lib/systemd/system/multi-user.target $(TARGET_DIR)/etc/systemd/system/default.target + ln -fs /usr/lib/systemd/system/multi-user.target $(TARGET_DIR)/etc/systemd/system/default.target endef define SYSTEMD_INSTALL_MACHINEID_HOOK
@@ -157,14 +155,14 @@ define SYSTEMD_INSTALL_MACHINEID_HOOK endef define SYSTEMD_SANITIZE_PATH_IN_UNITS - find $(TARGET_DIR)/lib/systemd/system -name '*.service' \ + find $(TARGET_DIR)/usr/lib/systemd/system -name '*.service' \ -exec $(SED) 's,$(HOST_DIR),,g' {} \; endef # Disable ldconfig.service, as /sbin/ldconfig is not available when the # target is built with a glibc-based toolchain. define SYSTEMD_DISABLE_LDCONFIG_SERVICE_HOOK - rm -f $(TARGET_DIR)/lib/systemd/system/sysinit.target.wants/ldconfig.service + rm -f $(TARGET_DIR)/usr/lib/systemd/system/sysinit.target.wants/ldconfig.service endef SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
@@ -199,7 +197,7 @@ define SYSTEMD_INSTALL_SERVICE_TTY else \ SERVICE="serial-getty"; \ fi; \ - ln -fs ../../../../lib/systemd/system/$${SERVICE}@.service \ + ln -fs /usr/lib/systemd/system/$${SERVICE}@.service \ $(TARGET_DIR)/etc/systemd/system/getty.target.wants/$${SERVICE}@$(BR2_TARGET_GENERIC_GETTY_PORT).service endef endif
Signature · 1 line
2.1.0
PATCH 15/15 systemd: change install path to /usr/lib
Quoted 3 lines · Mike Williams
/usr/libis the default path for upstream systemd.Signed-off-by Mike Williams <[email protected]>
Quoted 97 lines
--- package/systemd/systemd.mk | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-)package/systemd/systemd.mk +12
-15@@ -27,8 +27,6 @@ SYSTEMD_DEPENDENCIES += busybox endif SYSTEMD_CONF_OPTS += \ - --with-rootprefix= \ - --with-rootlibdir=/lib \ --enable-static=no \ --disable-manpages \ --disable-selinux \@@ -100,16 +98,16 @@ endif ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD),y) SYSTEMD_CONF_OPTS += --enable-networkd define SYSTEMD_INSTALL_RESOLVCONF_HOOK - ln -sf ../run/systemd/resolve/resolv.conf \ + ln -sf /run/systemd/resolve/resolv.conf \ $(TARGET_DIR)/etc/resolv.conf endef else SYSTEMD_CONF_OPTS += --disable-networkd define SYSTEMD_INSTALL_SERVICE_NETWORK $(INSTALL) -D -m 644 package/systemd/network.service \ - $(TARGET_DIR)/etc/systemd/system/network.service + $(TARGET_DIR)/usr/lib/systemd/system/network.service mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../network.service \ + ln -fs /usr/lib/systemd/system/network.service \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/network.service endef endif@@ -118,7 +116,7 @@ ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD),y) SYSTEMD_CONF_OPTS += --enable-timesyncd define SYSTEMD_INSTALL_SERVICE_TIMESYNC mkdir -p $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants - ln -sf ../../../../lib/systemd/system/systemd-timesyncd.service \ + ln -sf /usr/lib/systemd/system/systemd-timesyncd.service \ $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service endef else@@ -144,12 +142,12 @@ SYSTEMD_MAKE_OPTS += LIBS=-lrt SYSTEMD_MAKE_OPTS += LDFLAGS+=-ldl define SYSTEMD_INSTALL_INIT_HOOK - ln -fs ../lib/systemd/systemd $(TARGET_DIR)/sbin/init - ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/halt - ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/poweroff - ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/reboot + ln -fs /usr/lib/systemd/systemd $(TARGET_DIR)/sbin/init + ln -fs /usr/bin/systemctl $(TARGET_DIR)/sbin/halt + ln -fs /usr/bin/systemctl $(TARGET_DIR)/sbin/poweroff + ln -fs /usr/bin/systemctl $(TARGET_DIR)/sbin/reboot - ln -fs ../../../lib/systemd/system/multi-user.target $(TARGET_DIR)/etc/systemd/system/default.target + ln -fs /usr/lib/systemd/system/multi-user.target $(TARGET_DIR)/etc/systemd/system/default.target endef define SYSTEMD_INSTALL_MACHINEID_HOOK@@ -157,14 +155,14 @@ define SYSTEMD_INSTALL_MACHINEID_HOOK endef define SYSTEMD_SANITIZE_PATH_IN_UNITS - find $(TARGET_DIR)/lib/systemd/system -name '*.service' \ + find $(TARGET_DIR)/usr/lib/systemd/system -name '*.service' \ -exec $(SED) 's,$(HOST_DIR),,g' {} \; endef # Disable ldconfig.service, as /sbin/ldconfig is not available when the # target is built with a glibc-based toolchain. define SYSTEMD_DISABLE_LDCONFIG_SERVICE_HOOK - rm -f $(TARGET_DIR)/lib/systemd/system/sysinit.target.wants/ldconfig.service + rm -f $(TARGET_DIR)/usr/lib/systemd/system/sysinit.target.wants/ldconfig.service endef SYSTEMD_POST_INSTALL_TARGET_HOOKS += \@@ -199,7 +197,7 @@ define SYSTEMD_INSTALL_SERVICE_TTY else \ SERVICE="serial-getty"; \ fi; \ - ln -fs ../../../../lib/systemd/system/$${SERVICE}@.service \ + ln -fs /usr/lib/systemd/system/$${SERVICE}@.service \ $(TARGET_DIR)/etc/systemd/system/getty.target.wants/$${SERVICE}@$(BR2_TARGET_GENERIC_GETTY_PORT).service endef endif --2.1.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 15/15 systemd: change install path to /usr/lib
Quoted 6 lines · Steven Noonan
Quoted 3 lines · Mike Williams
/usr/libis the default path for upstream systemd.Signed-off-by Mike Williams <[email protected]>Reviewed-by Steven Noonan <[email protected]>
Regards,
Signature · 1 line
Samuel
Quoted 8 lines · Mike Williams
All,
Currently, package service files for systemd are installed by buildroot in a variety of locations: /etc, /lib, and
/usr/lib. For systemd, split /lib is deprecated and only checked if a split /lib and/usr/libis enabled. /etc is meant for local customizations to the default service files. It is my opinion that buildroot should install all upstream package and buildroot-provided service files in/usr/lib, and this series cleans up our packages to do exactly that. Enabling them by default by linking them to/etc/systemd/system/multi-user.target.wantshas been preserved.Upstream systemd's standard installation directory for its binaries is
/usr/lib. It appears that historically, buildroot's systemd installation location has been switched between /lib and/usr/libmultiple times. I couldn't find any particular reason for this, so I've moved it back to/usr/libalong with its service files.Anyway, please send comments :).
Nice. Basically any systemd units installed by Buildroot should be in /usr/lib/systemd/system and nothing from Buildroot should be installed to /etc/systemd/system, so I agree with this series as a whole in terms of direction.
Also, I have a related patch set, but it has only had very light testing on my end:
http://git.uplinklabs.net/snoonan/projects/buildroot.git/log/?h=unified-bin
I come from the Arch Linux world, so I made a new skeleton that matches the Arch base filesystem layout: with /bin, /sbin, /usr/bin, and /usr/sbin all unified (likewise with /lib and /usr/lib). I haven't convinced myself to post the series because I can't think of a particularly good justification for it in the Buildroot context.
Quoted 5 lines
I come from the Arch Linux world, so I made a new skeleton that matches the Arch base filesystem layout: with /bin, /sbin,
/usr/bin, and/usr/sbinall unified (likewise with /lib and/usr/lib). I haven't convinced myself to post the series because I can't think of a particularly good justification for it in the Buildroot context.
I'm working that way myself, I don't know what use cases in Buildroot still require the split.
Quoted 8 lines · Mike Williams
Quoted 5 lines
I come from the Arch Linux world, so I made a new skeleton that matches the Arch base filesystem layout: with /bin, /sbin,
/usr/bin, and/usr/sbinall unified (likewise with /lib and/usr/lib). I haven't convinced myself to post the series because I can't think of a particularly good justification for it in the Buildroot context.I'm working that way myself, I don't know what use cases in Buildroot still require the split.
We could consider offering it as an experimental alternative to the default skeleton (just add another "choice" in kconfig, as I did in my patch series). And open a discussion about unifying the directory structure. It's certainly possible to support both use cases, though it does require more testing.
Quoted 7 lines · Steven Noonan
Quoted 6 lines · Mike Williams
Quoted 5 lines
I come from the Arch Linux world, so I made a new skeleton that matches the Arch base filesystem layout: with /bin, /sbin,
/usr/bin, and/usr/sbinall unified (likewise with /lib and/usr/lib). I haven't convinced myself to post the series because I can't think of a particularly good justification for it in the Buildroot context.
Quoted 8 lines
Quoted 2 lines
I'm working that way myself, I don't know what use cases in Buildroot still require the split.
We could consider offering it as an experimental alternative to the default skeleton (just add another "choice" in kconfig, as I did in my patch series). And open a discussion about unifying the directory structure. It's certainly possible to support both use cases, though it does require more testing.
I've also started using a unified /bin /sbin /usr/bin /usr/sbin and unified
/lib /usr/lib /lib64 /usr/lib64, and it really simplifies things a lot. I yet have to find a disadvantage.
Make it it a choice sounds like a great idea! Please Cc me on the patch :-)
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: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
All,
Quoted 17 lines · Arnout Vandecappelle
Quoted 7 lines · Steven Noonan
Quoted 6 lines · Mike Williams
Quoted 5 lines
I come from the Arch Linux world, so I made a new skeleton that matches the Arch base filesystem layout: with /bin, /sbin,
/usr/bin, and/usr/sbinall unified (likewise with /lib and/usr/lib). I haven't convinced myself to post the series because I can't think of a particularly good justification for it in the Buildroot context.Quoted 8 lines
Quoted 2 lines
I'm working that way myself, I don't know what use cases in Buildroot still require the split.
We could consider offering it as an experimental alternative to the default skeleton (just add another "choice" in kconfig, as I did in my patch series). And open a discussion about unifying the directory structure. It's certainly possible to support both use cases, though it does require more testing.
Quoted 3 lines
I've also started using a unified /bin /sbin
/usr/bin/usr/sbinand unified
/lib/usr/lib/lib64/usr/lib64, and it really simplifies things a lot. I yet have to find a disadvantage.
Working through this systemd cleanup, I'm now finding that some packages install udev rules to /lib/udev/rules.d by default. The udev documentation states that:
"The udev rules are read from the files located in the system rules directory /usr/lib/udev/rules.d, the volatile runtime directory /run/udev/rules.d and the local administration directory /etc/udev/rules.d." I can verify that systemd's udev does not check /lib/udev/rules.d, even with --enable-split-usr (our current setup). I'm not sure what eudev does.
https://www.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html
It makes me wonder how many upstream developers are already using a merged /usr system, and are not noticing the technically wrong defaults for split systems. Likewise, apparently many of buildroot's systemd users have merged /usr already, they won't notice this breakage in their testing either.
Mike
Hi Mike, all,
Quoted 7 lines · Mike Williams
All,
Currently, package service files for systemd are installed by buildroot in a variety of locations: /etc, /lib, and
/usr/lib. For systemd, split /lib is deprecated and only checked if a split /lib and/usr/libis enabled. /etc is meant for local customizations to the default service files. It is my opinion that buildroot should install all upstream package and buildroot-provided service files in/usr/lib, and this series cleans up our packages to do exactly that. Enabling them by default by linking them to/etc/systemd/system/multi-user.target.wantshas been preserved.Upstream systemd's standard installation directory for its binaries is
/usr/lib. It appears that historically, buildroot's systemd installation location has been switched between /lib and/usr/libmultiple times. I couldn't find any particular reason for this, so I've moved it back to/usr/libalong with its service files.Anyway, please send comments :).
Thanks for helping improving this point. :)
Just one global comment:
In the series, you change all relative symlink with absolute one. We use to use relative symlink to avoid confusing people looking at the target tree because they are still right.
I don't have strong opinion about this, so let's see what others think about it.
Regards,
Signature · 1 line
Samuel
Dear Mike Williams,
Adding Steven in Cc.
Quoted 10 lines · Mike Williams
Currently, package service files for systemd are installed by buildroot in a variety of locations: /etc, /lib, and
/usr/lib. For systemd, split /lib is deprecated and only checked if a split /lib and/usr/libis enabled. /etc is meant for local customizations to the default service files. It is my opinion that buildroot should install all upstream package and buildroot-provided service files in/usr/lib, and this series cleans up our packages to do exactly that. Enabling them by default by linking them
to/etc/systemd/system/multi-user.target.wantshas been preserved.
Quoted 5 lines
Upstream systemd's standard installation directory for its binaries is
/usr/lib. It appears that historically, buildroot's systemd installation location has been switched between /lib and/usr/libmultiple times. I couldn't find any particular reason for this, so I've moved it back to/usr/libalong with its service files.
I am generally fine with the proposed changes, especially since other systemd users looked at them.
However, there's one thing I'm not sure about: you're changing all the relative symbolic links to absolute symbolic links:
- ln -fs ../ntpd.service $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service
+ ln -fs /usr/lib/systemd/system/ntpd.service $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service
While it causes no problem on the target, it means that when looking at output/target/ on your build machine, now all those symbolic links are broken. I find it quite nice when relative symlinks are used, since it allows to have things in output/target looking somewhat sensible.
Is there any strong reason for switching to absolute symbolic links?
Also, there are *lots* of systemd related patches sitting in patchwork. Could you and Steven have a look at those pending patches, and let me know which ones can be applied, which ones cannot?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Thomas,
Quoted 31 lines · Thomas Petazzoni
Dear Mike Williams,
Adding Steven in Cc.
Quoted 10 lines · Mike Williams
Currently, package service files for systemd are installed by buildroot in a variety of locations: /etc, /lib, and
/usr/lib. For systemd, split /lib is deprecated and only checked if a split /lib and/usr/libis enabled. /etc is meant for local customizations to the default service files. It is my opinion that buildroot should install all upstream package and buildroot-provided service files in/usr/lib, and this series cleans up our packages to do exactly that. Enabling them by default by linking them
to/etc/systemd/system/multi-user.target.wantshas been preserved.Quoted 5 lines
Upstream systemd's standard installation directory for its binaries is
/usr/lib. It appears that historically, buildroot's systemd installation location has been switched between /lib and/usr/libmultiple times. I couldn't find any particular reason for this, so I've moved it back to/usr/libalong with its service files.I am generally fine with the proposed changes, especially since other systemd users looked at them.
However, there's one thing I'm not sure about: you're changing all the relative symbolic links to absolute symbolic links:
(quoted diff) +1
-1- ln -fs ../ntpd.service $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service + ln -fs /usr/lib/systemd/system/ntpd.service $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service
Quoted 6 lines
While it causes no problem on the target, it means that when looking at output/target/ on your build machine, now all those symbolic links are broken. I find it quite nice when relative symlinks are used, since it allows to have things in output/target looking somewhat sensible.
Is there any strong reason for switching to absolute symbolic links?
No, they were just relative to the files that used to be in /etc and I used absolute because it was easier for me to not screw them up when changing them :). How about you or one of the other buildroot core team tell me how you want it done, and I'll re-roll the patch series.
Quoted 4 lines
Also, there are *lots* of systemd related patches sitting in patchwork. Could you and Steven have a look at those pending patches, and let me know which ones can be applied, which ones cannot?
Will do. I think after the next series of this patch, and a couple new spins of other patches, we should be able to send you a large list of patches to commit.
Quoted 8 lines
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Dear Mike Williams,
Quoted 6 lines · Mike Williams
Quoted 1 line
Is there any strong reason for switching to absolute symbolic links?
No, they were just relative to the files that used to be in /etc and I used absolute because it was easier for me to not screw them up when changing them :). How about you or one of the other buildroot core team tell me how you want it done, and I'll re-roll the patch series.
Ok, then I believe staying with relative symlinks is probably the safest option, since that's generally what we're doing in the rest of Buildroot.
Quoted 3 lines
Will do. I think after the next series of this patch, and a couple new spins of other patches, we should be able to send you a large list of patches to commit.
Ok, good. If some of the patches need a bit of rework, don't hesitate to pick them up and resend an updated version as needed.
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com