Skip to contentSkip to conversation

safe systemd patches

PATCH In review Ross Burton 4 participants 17 messages Mar 11, 2013 – Mar 12, 2013

lore
Share & tools
lore
#0 lore raw

cover safe systemd patches

Hi,

This series is a set of simple/safe systemd related patches. I've a follow-up series to implement hybrid system/sysvinit.

Ross

The following changes since commit 365eb9b5d22208c967dcd91d8ab52faed20f04b5:

bitbake: bitbake-layers: fix duplicated help info (2013-03-10 04:36:52 +0000)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib ross/systemd-safe

for you to fetch changes up to 1fd5b960dd36458b7b829f9094df18cd8b5ac201:

systemd: remove libsystemd-daemon linkage in libudev (2013-03-11 10:59:54 -0700)

----------------------------------------------------------------
Ross Burton (12):
connman: explicitly disable systemd if we don't want it enabled
polkit: explicitly disable systemd if we're using consolekit
xf86-video-intel: add explicit dependency on udev
avahi: explicitly disable systemd if we don't want it enabled
xkeyboard-config: remove long-gone build dependencies
systemd-compat-units: add missing systemd-systemctl-native dependency
busybox: enable swapon -p (91 byte increase)
systemd: busybox's swapon now supports -p
systemd: remove util-linux-mount dependency
systemd: set the location of the kill binary
util-linux: disable systemd support
systemd: remove libsystemd-daemon linkage in libudev

 meta/recipes-connectivity/avahi/avahi.inc          |    2 +-
 meta/recipes-connectivity/connman/connman.inc      |    2 +-
 meta/recipes-core/busybox/busybox-1.20.2/defconfig |    2 +-
 meta/recipes-core/systemd/systemd-compat-units.bb  |    2 +
 .../systemd/systemd/udev-linkage.patch             |   62 ++++++++++++++++++++
 meta/recipes-core/systemd/systemd_197.bb           |    8 +--
 meta/recipes-core/util-linux/util-linux.inc        |    1 +
 meta/recipes-extended/polkit/polkit_0.104.bb       |    5 +-
 .../xorg-driver/xf86-video-intel_2.21.0.bb         |    2 +-
 .../xorg-driver/xf86-video-intel_git.bb            |    2 +-
 .../xorg-lib/xkeyboard-config_2.8.bb               |    2 +-
 11 files changed, 76 insertions(+), 14 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/udev-linkage.patch

Ross Burton (12):
connman: explicitly disable systemd if we don't want it enabled
polkit: explicitly disable systemd if we're using consolekit
xf86-video-intel: add explicit dependency on udev
avahi: explicitly disable systemd if we don't want it enabled
xkeyboard-config: remove long-gone build dependencies
systemd-compat-units: add missing systemd-systemctl-native dependency
busybox: enable swapon -p (91 byte increase)
systemd: busybox's swapon now supports -p
systemd: remove util-linux-mount dependency
systemd: set the location of the kill binary
util-linux: disable systemd support
systemd: remove libsystemd-daemon linkage in libudev

 meta/recipes-connectivity/avahi/avahi.inc          |    2 +-
 meta/recipes-connectivity/connman/connman.inc      |    2 +-
 meta/recipes-core/busybox/busybox-1.20.2/defconfig |    2 +-
 meta/recipes-core/systemd/systemd-compat-units.bb  |    2 +
 .../systemd/systemd/udev-linkage.patch             |   62 ++++++++++++++++++++
 meta/recipes-core/systemd/systemd_197.bb           |    8 +--
 meta/recipes-core/util-linux/util-linux.inc        |    1 +
 meta/recipes-extended/polkit/polkit_0.104.bb       |    5 +-
 .../xorg-driver/xf86-video-intel_2.21.0.bb         |    2 +-
 .../xorg-driver/xf86-video-intel_git.bb            |    2 +-
 .../xorg-lib/xkeyboard-config_2.8.bb               |    2 +-
 11 files changed, 76 insertions(+), 14 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/udev-linkage.patch
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/12 connman: explicitly disable systemd if we don't want it enabled

Otherwise configure will use pkg-config and may find systemd, even though we don't want it.

---
 meta/recipes-connectivity/connman/connman.inc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/connman/connman.inc +1 -1
index 04b21f7..96ebc55 100644
@@ -40,7 +40,7 @@ EXTRA_OECONF += "\
     --disable-polkit \
     --enable-client \
     --enable-fake \
-    ${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdunitdir=${systemd_unitdir}/system/', '', d)} \
+    ${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdunitdir=${systemd_unitdir}/system/', '--with-systemdunitdir=', d)} \
 "
 
 INITSCRIPT_NAME = "connman"
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/12 polkit: explicitly disable systemd if we're using consolekit

In reply to Ross Burton
---
 meta/recipes-extended/polkit/polkit_0.104.bb |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-extended/polkit/polkit_0.104.bb +3 -2
index ab2547b..342fbe1 100644
@@ -12,8 +12,9 @@ PACKAGECONFIG = "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
 
 PACKAGECONFIG[pam] = "--with-authfw=pam,--with-authfw=shadow,libpam,libpam"
 PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd"
-# there is no --enable/--disable option for consolekit and it's not picked by shlibs, so add it to RDEPENDS
-PACKAGECONFIG[consolekit] = ",,,consolekit"
+# There is no --enable/--disable option for consolekit, so disable systemd to
+# force it.  ConsoleKit is accessed via DBus, so add it to RDEPENDS.
+PACKAGECONFIG[consolekit] = "--disable-systemd,,,consolekit"
 
 PR = "r9"
 
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH 3/12 xf86-video-intel: add explicit dependency on udev

In reply to Ross Burton

Otherwise configure will auto-detect, and not be reliable.

---
 meta/recipes-graphics/xorg-driver/xf86-video-intel_2.21.0.bb |    2 +-
 meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/xorg-driver/xf86-video-intel_2.21.0.bb +1 -1
index 157e0f3..32253f6 100644
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8730ad58d11c7bbad9a7066d69f7808e"
 PR = "${INC_PR}.0"
 
 DEPENDS += "virtual/libx11 drm xf86driproto glproto \
-	    virtual/libgl xineramaproto xf86driproto libpciaccess"
+	    virtual/libgl xineramaproto xf86driproto libpciaccess udev"
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[sna] = "--enable-sna,--disable-sna"
meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb +1 -1
index 83a24ce..cb48fc2 100644
@@ -8,7 +8,7 @@ the driver supports hardware accelerated 3D via the Direct Rendering \
 Infrastructure (DRI)."
 
 DEPENDS += "virtual/libx11 drm dri2proto glproto \
-	    virtual/libgl xineramaproto libpciaccess"
+	    virtual/libgl xineramaproto libpciaccess udev"
 
 SRCREV = "87ea531c5dc5b39809395b277c330854aaaaf019"
 PV = "2.10.0+git${SRCPV}"
Signature · 1 line
1.7.10.4
#4 lore raw

PATCH 4/12 avahi: explicitly disable systemd if we don't want it enabled

In reply to Ross Burton
---
 meta/recipes-connectivity/avahi/avahi.inc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/avahi/avahi.inc +1 -1
index 28e37b9..d8d9a9d 100644
@@ -56,7 +56,7 @@ EXTRA_OECONF = "--disable-introspection \
 
 # The distro choice determines what init scripts are installed
 EXTRA_OECONF_SYSVINIT = "${@base_contains('DISTRO_FEATURES','sysvinit','--with-distro=debian','--with-distro=none',d)}"
-EXTRA_OECONF_SYSTEMD = "${@base_contains('DISTRO_FEATURES','systemd','--with-systemdsystemunitdir=${systemd_unitdir}/system/','',d)}"
+EXTRA_OECONF_SYSTEMD = "${@base_contains('DISTRO_FEATURES','systemd','--with-systemdsystemunitdir=${systemd_unitdir}/system/','--without-systemdsystemunitdir',d)}"
 
 AVAHI_GTK ?= "--disable-gtk --disable-gtk3"
 
Signature · 1 line
1.7.10.4
#5 lore raw

PATCH 5/12 xkeyboard-config: remove long-gone build dependencies

In reply to Ross Burton
---
 meta/recipes-graphics/xorg-lib/xkeyboard-config_2.8.bb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/xorg-lib/xkeyboard-config_2.8.bb +1 -1
index 8ca2f6a..ccb9f74 100644
@@ -17,7 +17,7 @@ SRC_URI[md5sum] = "e66d567d85a954d589c5723fb0e1f3dd"
 SRC_URI[sha256sum] = "4e1cf5468d488aaf320ddfd439e03cbda0b213550fd734026d23138e4b2078ae"
 
 SECTION = "x11/libs"
-DEPENDS = "intltool-native xkbcomp-native glib-2.0 virtual/gettext"
+DEPENDS = "intltool-native virtual/gettext"
 
 PR = "r0"
 
Signature · 1 line
1.7.10.4
#6 lore raw

PATCH 6/12 systemd-compat-units: add missing systemd-systemctl-native dependency

In reply to Ross Burton

This package has postinsts that run on the build host, but wasn't depending on systemd-systemctl-native.

---
 meta/recipes-core/systemd/systemd-compat-units.bb |    2 ++
 1 file changed, 2 insertions(+)
meta/recipes-core/systemd/systemd-compat-units.bb +2 -0
index a7bfee3..19a1ea1 100644
@@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
 
 PR = "r18"
 
+DEPENDS = "systemd-systemctl-native"
+
 inherit allarch
 
 SRC_URI = "file://*.service"
Signature · 1 line
1.7.10.4
#7 lore raw

Re: [PATCH 06/12] systemd-compat-units: add missing systemd-systemctl-native dependency

Quoted 13 lines · Ross Burton

This package has postinsts that run on the build host, but wasn't depending on systemd-systemctl-native.

---
 meta/recipes-core/systemd/systemd-compat-units.bb |    2 ++
 1 file changed, 2 insertions(+)
meta/recipes-core/systemd/systemd-compat-units.bb +0 -0
index a7bfee3..19a1ea1 100644

meta/recipes-core/systemd/systemd-compat-units.bb LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3 · line 8

Quoted 4 lines
meta/recipes-core/systemd/systemd-compat-units.bb +1 -0
@@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
 
 PR = "r18"
 
+DEPENDS = "systemd-systemctl-native"

Do you want RDEPENDS_${PN} here?

Quoted 12 lines
meta/recipes-core/systemd/systemd-compat-units.bb +1 -0
+
 inherit allarch
 
 SRC_URI = "file://*.service"
Signature · 7 lines
1.7.10.4


_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#8 lore raw

Re: [PATCH 06/12] systemd-compat-units: add missing systemd-systemctl-native dependency

Op 12 mrt. 2013, om 08:08 heeft Martin Jansa <[email protected]> het volgende geschreven:

Quoted 15 lines · Ross Burton
Quoted 14 lines

This package has postinsts that run on the build host, but wasn't depending on systemd-systemctl-native.

---
meta/recipes-core/systemd/systemd-compat-units.bb | 2 ++

1 file changed, 2 insertions(+)
meta/recipes-core/systemd/systemd-compat-units.bb +0 -0
index a7bfee3..19a1ea1 100644
@@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
 
Quoted 5 lines
Quoted 3 lines

PR = "r18"

+DEPENDS = "systemd-systemctl-native"

Do you want RDEPENDS_${PN} here?

I don't think a -native package will do something usefull on the target :)

#9 lore raw

Re: [PATCH 06/12] systemd-compat-units: add missing systemd-systemctl-native dependency

Quoted 18 lines · Koen Kooi

Op 12 mrt. 2013, om 08:08 heeft Martin Jansa <[email protected]> het volgende geschreven:

Quoted 15 lines · Ross Burton
Quoted 14 lines

This package has postinsts that run on the build host, but wasn't depending on systemd-systemctl-native.

---
meta/recipes-core/systemd/systemd-compat-units.bb | 2 ++

1 file changed, 2 insertions(+)
meta/recipes-core/systemd/systemd-compat-units.bb +0 -0
index a7bfee3..19a1ea1 100644
@@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
 
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

PR = "r18"

+DEPENDS = "systemd-systemctl-native"

Do you want RDEPENDS_${PN} here?

I don't think a -native package will do something usefull on the target :)

Ah right, commit message said it's needed for postinsts and "send" button haven't failed with -ENOCOFFEE.

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#10 lore raw

PATCH 7/12 busybox: enable swapon -p (91 byte increase)

In reply to Ross Burton

systemd needs "swapon -p", so as the impact is minimal enable it unversally.

---
 meta/recipes-core/busybox/busybox-1.20.2/defconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/busybox/busybox-1.20.2/defconfig +1 -1
index b39234f..bdfdadf 100644
@@ -596,7 +596,7 @@ CONFIG_RDATE=y
 # CONFIG_SCRIPTREPLAY is not set
 # CONFIG_SETARCH is not set
 CONFIG_SWAPONOFF=y
-# CONFIG_FEATURE_SWAPON_PRI is not set
+CONFIG_FEATURE_SWAPON_PRI=y
 CONFIG_SWITCH_ROOT=y
 CONFIG_UMOUNT=y
 CONFIG_FEATURE_UMOUNT_ALL=y
Signature · 1 line
1.7.10.4
#11 lore raw

PATCH 8/12 systemd: busybox's swapon now supports -p

In reply to Ross Burton

Now that busybox's swapon supports -p, systemd doesn't need to depend on util-linux.

---
 meta/recipes-core/systemd/systemd_197.bb |    2 --
 1 file changed, 2 deletions(-)
meta/recipes-core/systemd/systemd_197.bb +0 -2
index 31add79..2e637e0 100644
@@ -173,11 +173,9 @@ RDEPENDS_${PN} += "dbus udev-systemd"
 
 # kbd -> loadkeys,setfont
 # And pull in the kernel modules mentioned in INSTALL
-# swapon -p is also not supported by busybox
 # busybox mount is broken
 RRECOMMENDS_${PN} += "systemd-serialgetty \
                       util-linux-agetty \
-                      util-linux-swaponoff \
                       util-linux-fsck e2fsprogs-e2fsck \
                       util-linux-mount util-linux-umount \
                       kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
Signature · 1 line
1.7.10.4
#12 lore raw

PATCH 9/12 systemd: remove util-linux-mount dependency

In reply to Ross Burton

There's been a lot of action in busybox to fix mount's behaviour for systemd, so remove the dependency on util-linux.

---
 meta/recipes-core/systemd/systemd_197.bb |    4 ----
 1 file changed, 4 deletions(-)
meta/recipes-core/systemd/systemd_197.bb +0 -4
index 2e637e0..5473666 100644
@@ -171,13 +171,9 @@ FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ $
 
 RDEPENDS_${PN} += "dbus udev-systemd"
 
-# kbd -> loadkeys,setfont
-# And pull in the kernel modules mentioned in INSTALL
-# busybox mount is broken
 RRECOMMENDS_${PN} += "systemd-serialgetty \
                       util-linux-agetty \
                       util-linux-fsck e2fsprogs-e2fsck \
-                      util-linux-mount util-linux-umount \
                       kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
 "
 
Signature · 1 line
1.7.10.4
#13 lore raw

PATCH 10/12 systemd: set the location of the kill binary

In reply to Ross Burton

Otherwise systemd uses AC_PROG_PATH and finds it in the sysroot, which won't work on the target.

---
 meta/recipes-core/systemd/systemd_197.bb |    1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/systemd/systemd_197.bb +1 -0
index 5473666..e2bf415 100644
@@ -64,6 +64,7 @@ EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
                  --disable-microhttpd \
                  --without-python \
                  --with-sysvrcnd-path=${sysconfdir} \
+                 ac_cv_path_KILL=${base_bindir}/kill \
                "
 # uclibc does not have NSS
 EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
Signature · 1 line
1.7.10.4
#14 lore raw

PATCH 11/12 util-linux: disable systemd support

In reply to Ross Burton

The only binary in util-linux with systemd support is uuidd, which is rarely used.

I tried making this respect the systemd DISTRO_FEATURE but it ended up with a build cycle. uuidd isn't critical so this can wait.

---
 meta/recipes-core/util-linux/util-linux.inc |    1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/util-linux/util-linux.inc +1 -0
index 1cb4f5f..149cdc5 100644
@@ -43,6 +43,7 @@ EXTRA_OECONF = "--libdir=${base_libdir} --disable-use-tty-group \
                 --disable-vipw --disable-newgrp --disable-chfn-chsh --disable-su \
                 --enable-write --enable-arch --enable-mount --with-fsprobe=builtin \
                 --enable-libuuid --enable-libblkid --enable-fsck --without-udev \
+                --disable-socket-activation --without-systemdsystemunitdir \
 		usrsbin_execdir='${sbindir}' \
 "
 
Signature · 1 line
1.7.10.4
#15 lore raw

Re: [PATCH 11/12] util-linux: disable systemd support

Ross Burton <[email protected]>

Quoted 2 lines · writes:

The only binary in util-linux with systemd support is uuidd, which is rarely used.

uidd should be moved into a separate subpackage then instead of disabling the initscripts.

Enrico

#16 lore raw

PATCH 12/12 systemd: remove libsystemd-daemon linkage in libudev

In reply to Ross Burton

libudev was statically linking to libsystemd-shared, which was linking to libsystemd-daemon (via libtool). This is a spurious dependency so backport a commit from upstream to remove it.

---
 .../systemd/systemd/udev-linkage.patch             |   62 ++++++++++++++++++++
 meta/recipes-core/systemd/systemd_197.bb           |    1 +
 2 files changed, 63 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/udev-linkage.patch
meta/recipes-core/systemd/systemd/udev-linkage.patch new file +62 -0
new file mode 100644
index 0000000..a0d9b4c
@@ -0,0 +1,62 @@
+Don't cause libudev to link against libsystemd-daemon.
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <[email protected]>
+
+From 8ee37c2bed1d452d566abf85b0cdf732b7ca029a Mon Sep 17 00:00:00 2001
+From: Kay Sievers <[email protected]>
+Date: Thu, 7 Feb 2013 13:47:46 +0100
+Subject: [PATCH] build-sys: at least for now, never link libudev against
+ systemd's shared libraries
+
+---
+ Makefile.am |   12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 474110a..0e6c88f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -811,8 +811,6 @@ libsystemd_shared_la_SOURCES = \
+ 	src/shared/calendarspec.c \
+ 	src/shared/calendarspec.h
+ 
+-libsystemd_shared_la_LIBADD = libsystemd-daemon.la
+-
+ #-------------------------------------------------------------------------------
+ noinst_LTLIBRARIES += \
+ 	libsystemd-dbus.la
+@@ -1662,6 +1660,9 @@ systemd_tty_ask_password_agent_LDADD = \
+ libsystemd_daemon_la_SOURCES = \
+ 	src/libsystemd-daemon/sd-daemon.c
+ 
++libsystemd_daemon_internal_la_SOURCES = \
++        $(libsystemd_daemon_la_SOURCES)
++
+ libsystemd_daemon_la_CFLAGS = \
+ 	$(AM_CFLAGS) \
+ 	-fvisibility=hidden \
+@@ -1689,6 +1690,9 @@ UNINSTALL_EXEC_HOOKS += libsystemd-daemon-uninstall-hook
+ lib_LTLIBRARIES += \
+ 	libsystemd-daemon.la
+ 
++noinst_LTLIBRARIES += \
++        libsystemd-daemon-internal.la
++
+ pkgconfiglib_DATA += \
+ 	src/libsystemd-daemon/libsystemd-daemon.pc
+ 
+@@ -1768,7 +1772,9 @@ libudev_la_LDFLAGS = \
+ 	-Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
+ 
+ libudev_la_LIBADD = \
+-	libsystemd-shared.la
++	libsystemd-shared.la \
++	libsystemd-daemon-internal.la \
++	libsystemd-id128-internal.la
+ 
+ pkgconfiglib_DATA += \
+ 	src/libudev/libudev.pc
+-- 
+1.7.10.4
+
meta/recipes-core/systemd/systemd_197.bb +1 -0
index e2bf415..5180eef 100644
@@ -25,6 +25,7 @@ SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
            ${UCLIBCPATCHES} \
            file://00-create-volatile.conf \
            file://0001-systemd-analyze-rewrite-in-C.patch \
+           file://udev-linkage.patch \
           "
 SRC_URI[md5sum] = "56a860dceadfafe59f40141eb5223743"
 SRC_URI[sha256sum] = "e6857ea21ae24d7056e7b0f4c2aaaba73b8bf57025b8949c0a8af0c1bc9774b5"
Signature · 1 line
1.7.10.4