* [Buildroot] [PATCH 0/5] systemd service file cleanups
@ 2015-04-21 17:50 Mike Williams
2015-04-21 17:50 ` [Buildroot] [PATCH 1/5] avahi: systemd cleanups Mike Williams
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Mike Williams @ 2015-04-21 17:50 UTC (permalink / raw)
To: buildroot
All,
This set of patches fixes and cleans up some systemd service files for various packages.
avahi was build-tested on both systemd and busybox init. psplash started but failed due to lack of a framebuffer on my device. rsyslog, ofono, and connman appeared to be working correctly.
The previous versions of this series also moved the systemd installation location, and fixed a number of packages' udev rules installation directory. For now, I recommend those patches be dropped. When systemd is built to be installed in its default directory, it no longer searches /lib/udev for rules as the upstream default is /usr/lib/udev.
Unfortunately, it appears that either many packages are built assuming an un-split /usr/lib and /lib, or they are only tested on systems where systemd is installed to /lib when the split exists. I'm not sure its worth the effort to patch all of these upstream packages, and I instead recommend that we merge /lib and /usr/lib for systemd systems.
Finally, the gpsd patch has been dropped for now because it was attempting to incorrectly interact with the host systemd.
Mike Williams (5):
avahi: systemd cleanups
psplash: move systemd service files to /usr/lib
rsyslog: fix systemd service installation
ofono: enable systemd service by default
connman: enable systemd service by default
package/avahi/0002-disable-systemd-support.patch | 22 ----------------------
package/avahi/avahi.mk | 12 ++++++++++--
package/connman/connman.mk | 5 +++++
package/ofono/ofono.mk | 6 ++++++
package/psplash/psplash.mk | 8 ++++----
package/rsyslog/rsyslog.mk | 7 ++++---
6 files changed, 29 insertions(+), 31 deletions(-)
delete mode 100644 package/avahi/0002-disable-systemd-support.patch
--
2.1.4
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/5] avahi: systemd cleanups
2015-04-21 17:50 [Buildroot] [PATCH 0/5] systemd service file cleanups Mike Williams
@ 2015-04-21 17:50 ` Mike Williams
2015-04-22 20:19 ` Thomas Petazzoni
2015-04-21 17:50 ` [Buildroot] [PATCH 2/5] psplash: move systemd service files to /usr/lib Mike Williams
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Mike Williams @ 2015-04-21 17:50 UTC (permalink / raw)
To: buildroot
* Move service files to /usr/lib/systemd/system/
* Only disable systemd support on non-systemd systems
Signed-off-by: Mike Williams <mike@mikebwilliams.com>
---
package/avahi/0002-disable-systemd-support.patch | 22 ----------------------
package/avahi/avahi.mk | 12 ++++++++++--
2 files changed, 10 insertions(+), 24 deletions(-)
delete mode 100644 package/avahi/0002-disable-systemd-support.patch
diff --git a/package/avahi/0002-disable-systemd-support.patch b/package/avahi/0002-disable-systemd-support.patch
deleted file mode 100644
index 909795a..0000000
--- a/package/avahi/0002-disable-systemd-support.patch
+++ /dev/null
@@ -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 <jacmet@sunsite.dk>
----
- 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)))
diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk
index 10c9915..bd236ca 100644
--- a/package/avahi/avahi.mk
+++ b/package/avahi/avahi.mk
@@ -88,6 +88,12 @@ AVAHI_DEPENDENCIES = \
$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-intltool \
host-pkgconf host-gettext
+AVAHI_CFLAGS = $(TARGET_CFLAGS)
+
+ifneq ($(BR2_PACKAGE_SYSTEMD),y)
+AVAHI_CFLAGS += -DDISABLE_SYSTEMD
+endif
+
ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),)
AVAHI_DEPENDENCIES += libdaemon
else
@@ -154,6 +160,8 @@ else
AVAHI_CONF_OPTS += --disable-python-dbus
endif
+AVAHI_CONF_ENV += CFLAGS="$(AVAHI_CFLAGS)"
+
AVAHI_MAKE_OPTS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl)
define AVAHI_USERS
@@ -185,10 +193,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.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 2/5] psplash: move systemd service files to /usr/lib
2015-04-21 17:50 [Buildroot] [PATCH 0/5] systemd service file cleanups Mike Williams
2015-04-21 17:50 ` [Buildroot] [PATCH 1/5] avahi: systemd cleanups Mike Williams
@ 2015-04-21 17:50 ` Mike Williams
2015-04-22 20:51 ` Thomas Petazzoni
2015-04-21 17:50 ` [Buildroot] [PATCH 3/5] rsyslog: fix systemd service installation Mike Williams
` (2 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Mike Williams @ 2015-04-21 17:50 UTC (permalink / raw)
To: buildroot
Signed-off-by: Mike Williams <mike@mikebwilliams.com>
---
package/psplash/psplash.mk | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/package/psplash/psplash.mk b/package/psplash/psplash.mk
index 5901547..85c0fb8 100644
--- a/package/psplash/psplash.mk
+++ b/package/psplash/psplash.mk
@@ -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
+ $(TARGET_DIR)/usr/lib/systemd/system/psplash-start.service
$(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants
- ln -sf ../psplash-start.service \
+ 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.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 3/5] rsyslog: fix systemd service installation
2015-04-21 17:50 [Buildroot] [PATCH 0/5] systemd service file cleanups Mike Williams
2015-04-21 17:50 ` [Buildroot] [PATCH 1/5] avahi: systemd cleanups Mike Williams
2015-04-21 17:50 ` [Buildroot] [PATCH 2/5] psplash: move systemd service files to /usr/lib Mike Williams
@ 2015-04-21 17:50 ` Mike Williams
2015-04-22 20:53 ` Thomas Petazzoni
2015-04-21 17:50 ` [Buildroot] [PATCH 4/5] ofono: enable systemd service by default Mike Williams
2015-04-21 17:50 ` [Buildroot] [PATCH 5/5] connman: " Mike Williams
4 siblings, 1 reply; 11+ messages in thread
From: Mike Williams @ 2015-04-21 17:50 UTC (permalink / raw)
To: buildroot
Signed-off-by: Mike Williams <mike@mikebwilliams.com>
---
package/rsyslog/rsyslog.mk | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/package/rsyslog/rsyslog.mk b/package/rsyslog/rsyslog.mk
index 99e6eba..0b7df4b 100644
--- a/package/rsyslog/rsyslog.mk
+++ b/package/rsyslog/rsyslog.mk
@@ -65,11 +65,12 @@ define RSYSLOG_INSTALL_INIT_SYSV
endef
define RSYSLOG_INSTALL_INIT_SYSTEMD
- ln -sf /lib/systemd/system/rsyslog.service \
+ mkdir -p $(TARGET_DIR)/etc/systemd/system
+ ln -fs ../../../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 \
- $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/syslog.service
+ ln -fs ../../../../usr/lib/systemd/system/rsyslog.service \
+ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/rsyslog.service
endef
define RSYSLOG_INSTALL_CONF
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 4/5] ofono: enable systemd service by default
2015-04-21 17:50 [Buildroot] [PATCH 0/5] systemd service file cleanups Mike Williams
` (2 preceding siblings ...)
2015-04-21 17:50 ` [Buildroot] [PATCH 3/5] rsyslog: fix systemd service installation Mike Williams
@ 2015-04-21 17:50 ` Mike Williams
2015-04-22 20:56 ` Thomas Petazzoni
2015-04-21 17:50 ` [Buildroot] [PATCH 5/5] connman: " Mike Williams
4 siblings, 1 reply; 11+ messages in thread
From: Mike Williams @ 2015-04-21 17:50 UTC (permalink / raw)
To: buildroot
Signed-off-by: Mike Williams <mike@mikebwilliams.com>
---
package/ofono/ofono.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/ofono/ofono.mk b/package/ofono/ofono.mk
index 98e2fbc..f1a63e2 100644
--- a/package/ofono/ofono.mk
+++ b/package/ofono/ofono.mk
@@ -26,6 +26,12 @@ 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
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 5/5] connman: enable systemd service by default
2015-04-21 17:50 [Buildroot] [PATCH 0/5] systemd service file cleanups Mike Williams
` (3 preceding siblings ...)
2015-04-21 17:50 ` [Buildroot] [PATCH 4/5] ofono: enable systemd service by default Mike Williams
@ 2015-04-21 17:50 ` Mike Williams
2015-04-22 20:56 ` Thomas Petazzoni
4 siblings, 1 reply; 11+ messages in thread
From: Mike Williams @ 2015-04-21 17:50 UTC (permalink / raw)
To: buildroot
Signed-off-by: Mike Williams <mike@mikebwilliams.com>
---
package/connman/connman.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/connman/connman.mk b/package/connman/connman.mk
index 4b55392..016eff7 100644
--- a/package/connman/connman.mk
+++ b/package/connman/connman.mk
@@ -31,6 +31,11 @@ define CONNMAN_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/connman/S45connman $(TARGET_DIR)/etc/init.d/S45connman
endef
+define CONNMAN_INSTALL_INIT_SYSTEMD
+ mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+ ln -fs ../../../../usr/lib/systemd/system/connman.service \
+ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/connman.service
+endef
ifeq ($(BR2_PACKAGE_CONNMAN_CLIENT),y)
CONNMAN_CONF_OPTS += --enable-client
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/5] avahi: systemd cleanups
2015-04-21 17:50 ` [Buildroot] [PATCH 1/5] avahi: systemd cleanups Mike Williams
@ 2015-04-22 20:19 ` Thomas Petazzoni
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2015-04-22 20:19 UTC (permalink / raw)
To: buildroot
Dear Mike Williams,
On Tue, 21 Apr 2015 13:50:34 -0400, Mike Williams wrote:
> +ifneq ($(BR2_PACKAGE_SYSTEMD),y)
We normally use:
ifeq ($(BR2_PACKAGE_SYSTEMD),)
instead.
Other than that, applied.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 2/5] psplash: move systemd service files to /usr/lib
2015-04-21 17:50 ` [Buildroot] [PATCH 2/5] psplash: move systemd service files to /usr/lib Mike Williams
@ 2015-04-22 20:51 ` Thomas Petazzoni
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2015-04-22 20:51 UTC (permalink / raw)
To: buildroot
Dear Mike Williams,
On Tue, 21 Apr 2015 13:50:35 -0400, Mike Williams wrote:
> Signed-off-by: Mike Williams <mike@mikebwilliams.com>
> ---
> package/psplash/psplash.mk | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/package/psplash/psplash.mk b/package/psplash/psplash.mk
> index 5901547..85c0fb8 100644
> --- a/package/psplash/psplash.mk
> +++ b/package/psplash/psplash.mk
> @@ -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
> + $(TARGET_DIR)/usr/lib/systemd/system/psplash-start.service
> $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants
> - ln -sf ../psplash-start.service \
> + ln -sf ../../../../usr/lib/systemd/system/psplash-start.service \
> $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants/
We usually use a full destination path here.
>
> $(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/
And here.
Nonetheless, I've applied the patch as is, I'll let you decide in which
direction the systemd service installation commands should be
made consistent across packages.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 3/5] rsyslog: fix systemd service installation
2015-04-21 17:50 ` [Buildroot] [PATCH 3/5] rsyslog: fix systemd service installation Mike Williams
@ 2015-04-22 20:53 ` Thomas Petazzoni
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2015-04-22 20:53 UTC (permalink / raw)
To: buildroot
Dear Mike Williams,
On Tue, 21 Apr 2015 13:50:36 -0400, Mike Williams wrote:
> define RSYSLOG_INSTALL_INIT_SYSTEMD
> - ln -sf /lib/systemd/system/rsyslog.service \
> + mkdir -p $(TARGET_DIR)/etc/systemd/system
> + ln -fs ../../../usr/lib/systemd/system/rsyslog.service \
> $(TARGET_DIR)/etc/systemd/system/syslog.service
Why are we doing this link? In all other systemd service installation,
we:
1/ install to /usr/lib/systemd/system/ when the service file has not
been installed by the package build system itself.
2/ create a symlink
from /etc/systemd/system/multi-user.target.wants/<foo>.service
to /usr/lib/systemd/system/rsyslog.service
Why would we need this additional symlink here?
(Remember that when you're talking to me, you're talking to a complete
system newbie.)
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 4/5] ofono: enable systemd service by default
2015-04-21 17:50 ` [Buildroot] [PATCH 4/5] ofono: enable systemd service by default Mike Williams
@ 2015-04-22 20:56 ` Thomas Petazzoni
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2015-04-22 20:56 UTC (permalink / raw)
To: buildroot
Dear Mike Williams,
On Tue, 21 Apr 2015 13:50:37 -0400, Mike Williams wrote:
> Signed-off-by: Mike Williams <mike@mikebwilliams.com>
> ---
> package/ofono/ofono.mk | 6 ++++++
> 1 file changed, 6 insertions(+)
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 5/5] connman: enable systemd service by default
2015-04-21 17:50 ` [Buildroot] [PATCH 5/5] connman: " Mike Williams
@ 2015-04-22 20:56 ` Thomas Petazzoni
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2015-04-22 20:56 UTC (permalink / raw)
To: buildroot
Dear Mike Williams,
On Tue, 21 Apr 2015 13:50:38 -0400, Mike Williams wrote:
> Signed-off-by: Mike Williams <mike@mikebwilliams.com>
> ---
> package/connman/connman.mk | 5 +++++
> 1 file changed, 5 insertions(+)
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2015-04-22 20:56 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-21 17:50 [Buildroot] [PATCH 0/5] systemd service file cleanups Mike Williams
2015-04-21 17:50 ` [Buildroot] [PATCH 1/5] avahi: systemd cleanups Mike Williams
2015-04-22 20:19 ` Thomas Petazzoni
2015-04-21 17:50 ` [Buildroot] [PATCH 2/5] psplash: move systemd service files to /usr/lib Mike Williams
2015-04-22 20:51 ` Thomas Petazzoni
2015-04-21 17:50 ` [Buildroot] [PATCH 3/5] rsyslog: fix systemd service installation Mike Williams
2015-04-22 20:53 ` Thomas Petazzoni
2015-04-21 17:50 ` [Buildroot] [PATCH 4/5] ofono: enable systemd service by default Mike Williams
2015-04-22 20:56 ` Thomas Petazzoni
2015-04-21 17:50 ` [Buildroot] [PATCH 5/5] connman: " Mike Williams
2015-04-22 20:56 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox