Skip to contentSkip to conversation

systemd tweaks

PATCH In review Ross Burton 3 participants 14 messages Feb 27, 2013

lore
Share & tools
lore
#0 lore raw

cover systemd tweaks

Hi,

Whilst whittling down the install footprint of systemd I made several fixes. Here are the simple ones, including a fixed /bin/kill patch.

Ross

The following changes since commit 2cc4fe4a0874c42421b1bf3fa100160a9e60a9da:

upstream_tracking.inc: Coonectivity and multimedia packages updates (2013-02-25 05:58:20 -0800)

are available in the git repository at:

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

for you to fetch changes up to b4fdb05f5e0f97b427125f27e4d824f09eb7c651:

systemd: set the location of the kill binary (2013-02-27 14:12:03 +0000)

----------------------------------------------------------------
Ross Burton (7):
systemd: systemd uses libkmod instead of modprobe, remove dependencies
systemd: don't recommend IPv6 kernel module
systemd: make gcrypt support (for signing the journal) optional
systemd: remove unused cached configure variables
systemd: make xz support (compressed journal) optional
systemd: remove --with-distro option, it's not used
systemd: set the location of the kill binary

 meta/recipes-core/systemd/systemd_197.bb |   23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

Ross Burton (7):
systemd: systemd uses libkmod instead of modprobe, remove
dependencies
systemd: don't recommend IPv6 kernel module
systemd: make gcrypt support (for signing the journal) optional
systemd: remove unused cached configure variables
systemd: make xz support (compressed journal) optional
systemd: remove --with-distro option, it's not used
systemd: set the location of the kill binary

 meta/recipes-core/systemd/systemd_197.bb |   23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/7 systemd: systemd uses libkmod instead of modprobe, remove dependencies

---
 meta/recipes-core/systemd/systemd_197.bb |    3 ---
 1 file changed, 3 deletions(-)
meta/recipes-core/systemd/systemd_197.bb +0 -3
index 0c3ebc4..880fbcd 100644
@@ -174,8 +174,6 @@ FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ $
 RDEPENDS_${PN} += "dbus udev-systemd"
 
 # kbd -> loadkeys,setfont
-# systemd calls 'modprobe -sab --', which busybox doesn't support due to lack
-# of blacklist support, so use proper modprobe from module-init-tools
 # And pull in the kernel modules mentioned in INSTALL
 # swapon -p is also not supported by busybox
 # busybox mount is broken
@@ -183,7 +181,6 @@ RRECOMMENDS_${PN} += "systemd-serialgetty \
                       util-linux-agetty \
                       util-linux-swaponoff \
                       util-linux-fsck e2fsprogs-e2fsck \
-                      module-init-tools \
                       util-linux-mount util-linux-umount \
                       kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
 "
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/7 systemd: don't recommend IPv6 kernel module

In reply to Ross Burton

systemd doesn't need ipv6 support directly, so don't pull it.

---
 meta/recipes-core/systemd/systemd_197.bb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/systemd/systemd_197.bb +1 -1
index 880fbcd..c871bb5 100644
@@ -182,7 +182,7 @@ RRECOMMENDS_${PN} += "systemd-serialgetty \
                       util-linux-swaponoff \
                       util-linux-fsck e2fsprogs-e2fsck \
                       util-linux-mount util-linux-umount \
-                      kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
+                      kernel-module-autofs4 kernel-module-unix \
 "
 
 PACKAGES =+ "udev-dbg udev udev-consolekit udev-utils udev-systemd"
Signature · 1 line
1.7.10.4
#3 lore raw

Re: [PATCH 2/7] systemd: don't recommend IPv6 kernel module

Quoted 1 line · Ross Burton

systemd doesn't need ipv6 support directly, so don't pull it.

It will trigger an error on startup, which seems to scare most of my users :(

#4 lore raw

Re: [PATCH 2/7] systemd: don't recommend IPv6 kernel module

Quoted 5 lines · Koen Kooi
Quoted 1 line · Ross Burton

systemd doesn't need ipv6 support directly, so don't pull it.

It will trigger an error on startup, which seems to scare most of my users :(

Well that's silly of systemd isn't it. Just noticed it didn't cause a problem here because the BSP I'm testing on appears to put ipv6 into the kernel

Can you point to where the log is coming from - silencing that warning seems like a sensible thing to do, as no ipv6 is a legitimate choice (albeit rapidly not a sane choice...).

Ross

#5 lore raw

Re: [PATCH 2/7] systemd: don't recommend IPv6 kernel module

Quoted 7 lines · Ross
Quoted 5 lines · Koen Kooi
Quoted 1 line · Ross Burton

systemd doesn't need ipv6 support directly, so don't pull it.

It will trigger an error on startup, which seems to scare most of my users :(

Quoted 7 lines

Well that's silly of systemd isn't it. Just noticed it didn't cause a problem here because the BSP I'm testing on appears to put ipv6 into the kernel

Can you point to where the log is coming from - silencing that warning seems like a sensible thing to do, as no ipv6 is a legitimate choice (albeit rapidly not a sane choice...)

src/core/kmod-setup.c:

static const KModule kmod_table[] = {
        { "autofs4",  "/sys/class/misc/autofs",    NULL } ,
        { "ipv6",     "/sys/module/ipv6",          NULL },
        { "unix",     "/proc/net/unix",            NULL } ,
};

[..]

err = kmod_module_probe_insert_module(mod,
KMOD_PROBE_APPLY_BLACKLIST, NULL, NULL, NULL, NULL);
if (err == 0)
log_info("Inserted module '%s'",
kmod_module_get_name(mod));
else if (err == KMOD_PROBE_APPLY_BLACKLIST)
log_info("Module '%s' is blacklisted",
kmod_module_get_name(mod));
else
log_error("Failed to insert module '%s'",
kmod_module_get_name(mod));

And looking at the other code you'll need to load ipv6 before starting the sockets otherwise socket activation over ipv6 won't work.

regards,

Koen

#6 lore raw

PATCH 3/7 systemd: make gcrypt support (for signing the journal) optional

In reply to Ross Burton
---
 meta/recipes-core/systemd/systemd_197.bb |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-core/systemd/systemd_197.bb +5 -1
index c871bb5..2232b60 100644
@@ -11,7 +11,7 @@ PROVIDES = "udev"
 PE = "1"
 PR = "r4"
 
-DEPENDS = "xz kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0 libgcrypt"
+DEPENDS = "xz kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0"
 DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
 SECTION = "base/shell"
@@ -49,6 +49,10 @@ CACHED_CONFIGUREVARS = "ac_cv_file__usr_share_pci_ids=no \
 
 GTKDOC_DOCDIR = "${S}/docs/"
 
+PACKAGECONFIG ??= ""
+# Sign the journal for anti-tampering
+PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
+
 # The gtk+ tools should get built as a separate recipe e.g. systemd-tools
 EXTRA_OECONF = " --with-distro=${SYSTEMDDISTRO} \
                  --with-rootprefix=${base_prefix} \
Signature · 1 line
1.7.10.4
#7 lore raw

PATCH 4/7 systemd: remove unused cached configure variables

In reply to Ross Burton
---
 meta/recipes-core/systemd/systemd_197.bb |    4 ----
 1 file changed, 4 deletions(-)
meta/recipes-core/systemd/systemd_197.bb +0 -4
index 2232b60..7a11c8c 100644
@@ -43,10 +43,6 @@ LDFLAGS_libc-uclibc_append = " -lrt"
 # This will disappear with systemd 197
 SYSTEMDDISTRO ?= "debian"
 
-CACHED_CONFIGUREVARS = "ac_cv_file__usr_share_pci_ids=no \
-                        ac_cv_file__usr_share_hwdata_pci_ids=no \
-                        ac_cv_file__usr_share_misc_pci_ids=yes"
-
 GTKDOC_DOCDIR = "${S}/docs/"
 
 PACKAGECONFIG ??= ""
Signature · 1 line
1.7.10.4
#8 lore raw

PATCH 5/7 systemd: make xz support (compressed journal) optional

In reply to Ross Burton
---
 meta/recipes-core/systemd/systemd_197.bb |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-core/systemd/systemd_197.bb +3 -1
index 7a11c8c..0e13d78 100644
@@ -11,7 +11,7 @@ PROVIDES = "udev"
 PE = "1"
 PR = "r4"
 
-DEPENDS = "xz kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0"
+DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0"
 DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
 SECTION = "base/shell"
@@ -48,6 +48,8 @@ GTKDOC_DOCDIR = "${S}/docs/"
 PACKAGECONFIG ??= ""
 # Sign the journal for anti-tampering
 PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
+# Compress the journal
+PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
 
 # The gtk+ tools should get built as a separate recipe e.g. systemd-tools
 EXTRA_OECONF = " --with-distro=${SYSTEMDDISTRO} \
Signature · 1 line
1.7.10.4
#9 lore raw

Re: [PATCH 5/7] systemd: make xz support (compressed journal) optional

Quoted 19 lines · Ross Burton
---
 meta/recipes-core/systemd/systemd_197.bb |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-core/systemd/systemd_197.bb +1 -1
index 7a11c8c..0e13d78 100644
@@ -11,7 +11,7 @@ PROVIDES = "udev"
 PE = "1"
 PR = "r4"
 
-DEPENDS = "xz kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0"
+DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0"
 DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
 SECTION = "base/shell"

meta/recipes-core/systemd/systemd_197.bb GTKDOC_DOCDIR = "${S}/docs/" · line 55

Quoted 8 lines
meta/recipes-core/systemd/systemd_197.bb +2 -0
@@ -48,6 +48,8 @@ GTKDOC_DOCDIR = "${S}/docs/"
 PACKAGECONFIG ??= ""
 # Sign the journal for anti-tampering
 PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
+# Compress the journal
+PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
 
 # The gtk+ tools should get built as a separate recipe e.g. systemd-tools
 EXTRA_OECONF = " --with-distro=${SYSTEMDDISTRO} \

Your commit fails to mention that you are changing the default to off, it is on now.

#10 lore raw

Re: [PATCH 5/7] systemd: make xz support (compressed journal) optional

Quoted 2 lines · Koen Kooi

Your commit fails to mention that you are changing the default to off, it is on now.

That's true. I'm actually dithering on this now, and will probably flip it back to enabled by default but still an option for people who want to prune dependencies.

Ross

#11 lore raw

PATCH 6/7 systemd: remove --with-distro option, it's not used

In reply to Ross Burton
---
 meta/recipes-core/systemd/systemd_197.bb |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
meta/recipes-core/systemd/systemd_197.bb +1 -5
index 0e13d78..1773aed 100644
@@ -40,9 +40,6 @@ UCLIBCPATCHES_libc-uclibc = "file://systemd-pam-configure-check-uclibc.patch \
                             "
 LDFLAGS_libc-uclibc_append = " -lrt"
 
-# This will disappear with systemd 197
-SYSTEMDDISTRO ?= "debian"
-
 GTKDOC_DOCDIR = "${S}/docs/"
 
 PACKAGECONFIG ??= ""
@@ -52,8 +49,7 @@ PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
 PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
 
 # The gtk+ tools should get built as a separate recipe e.g. systemd-tools
-EXTRA_OECONF = " --with-distro=${SYSTEMDDISTRO} \
-                 --with-rootprefix=${base_prefix} \
+EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
                  --with-rootlibdir=${base_libdir} \
                  --sbindir=${base_sbindir} \
                  --libexecdir=${base_libdir} \
Signature · 1 line
1.7.10.4
#12 lore raw

PATCH 7/7 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 |    2 ++
 1 file changed, 2 insertions(+)
meta/recipes-core/systemd/systemd_197.bb +2 -0
index 1773aed..ec2ba5f 100644
@@ -48,6 +48,8 @@ PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
 # Compress the journal
 PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
 
+CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill"
+
 # The gtk+ tools should get built as a separate recipe e.g. systemd-tools
 EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
                  --with-rootlibdir=${base_libdir} \
Signature · 1 line
1.7.10.4
Acked-by on v1 7/7
#13 lore raw

Re: [PATCH 7/7] systemd: set the location of the kill binary

Quoted 4 lines · Ross Burton

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

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br