Patchwork [1/1] util-linux: better co-operate with systemd

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date March 19, 2013, 6:51 a.m.
Message ID <face120c816e78dffad876f43218920c1a7da423.1363673104.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/46437/
State New
Headers show

Comments

Qi.Chen@windriver.com - March 19, 2013, 6:51 a.m.
From: Chen Qi <Qi.Chen@windriver.com>

util-linux upstream is now supporting systemd.

So in case of a systemd based image, we add to EXTRA_OECONF
'--with-systemdsystemunitdir' to specify the location of systemd unit
files, and '--enable-socket-activation' to build uuidd with socket
activation.

Also, package systemd unit files into util-linux if systemd is in
DISTRO_FEATURES.

[YOCTO #4038]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/util-linux/util-linux.inc       |    8 ++++++++
 meta/recipes-core/util-linux/util-linux_2.22.2.bb |    2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)
Ross Burton - March 20, 2013, 5:27 p.m.
On 19 March 2013 06:51,  <Qi.Chen@windriver.com> wrote:
> util-linux upstream is now supporting systemd.
>
> So in case of a systemd based image, we add to EXTRA_OECONF
> '--with-systemdsystemunitdir' to specify the location of systemd unit
> files, and '--enable-socket-activation' to build uuidd with socket
> activation.
>
> Also, package systemd unit files into util-linux if systemd is in
> DISTRO_FEATURES.

I've merged a version of this to my systemd branch.

Ross
Enrico Scholz - March 20, 2013, 6:13 p.m.
<Qi.Chen-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> writes:

> So in case of a systemd based image, we add to EXTRA_OECONF
> '--with-systemdsystemunitdir' to specify the location of systemd unit
> files, and '--enable-socket-activation' to build uuidd with socket
> activation.

nak; this should go into an own subpackage:

* the socket itself is broken: systemd tries to create the /var/uiidd/request
  socket which will fail on ro filesystems.  It should be moved to a
  volatile location

* util-linux contains lot of other programs which might be useful for
  other purposes; having a daemon which is activated silently is unwanted.


Enrico
Ross Burton - March 20, 2013, 6:51 p.m.
On 20 March 2013 18:13, Enrico Scholz <enrico.scholz@sigma-chemnitz.de> wrote:
> nak; this should go into an own subpackage:
>
> * the socket itself is broken: systemd tries to create the /var/uiidd/request
>   socket which will fail on ro filesystems.  It should be moved to a
>   volatile location
>
> * util-linux contains lot of other programs which might be useful for
>   other purposes; having a daemon which is activated silently is unwanted.

I should have said that's splitting into a separate package is one of
the changes that I'd made.  I didn't realise it was using a stupid
location for the socket, I'll fix that up.

Ross

Patch

diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 41a5471..b62390a 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -46,8 +46,16 @@  EXTRA_OECONF = "--libdir=${base_libdir} --disable-use-tty-group \
 		usrsbin_execdir='${sbindir}' \
 "
 
+# Build uuidd with socket activation for systemd based images
+EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'systemd', '--enable-socket-activation', '', d)}"
+# Specify systemdsystemunitdir for systemd based images
+EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '', d)}"
+
 EXTRA_OECONF_append_class-native = " --disable-login --disable-su"
 
+# Package systemd unit files
+FILES_${PN} += "${@base_contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/', '', d)}"
+
 FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
 
 FILES_util-linux-agetty = "${base_sbindir}/agetty"
diff --git a/meta/recipes-core/util-linux/util-linux_2.22.2.bb b/meta/recipes-core/util-linux/util-linux_2.22.2.bb
index 9b94a47..43a55a6 100644
--- a/meta/recipes-core/util-linux/util-linux_2.22.2.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.22.2.bb
@@ -1,5 +1,5 @@ 
 MAJOR_VERSION = "2.22"
-PR = "r2"
+PR = "r3"
 require util-linux.inc
 
 SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \