Skip to contentSkip to conversation

systemd: package split

PATCH Superseded Anders Darander 3 participants 7 messages Jan 10, 2012 – Jan 11, 2012

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover systemd: package split

At least while using rpm-packaging, the systemd package (rpm) got a dependency on python, as systemd-analyze needs this (in the shebang). When trying to create a small image using systemd, this isn't always desirable. Thus the splitting of systemd-analyze to a separate package.

As an RRECOMMENDS for python-pycairo is added for systemd-analyze, we also add new patch to conditionally build cairo with x11-support. This is desired for x11-less systems, to reduce build time and size. The actual patch is similar to how it is solved in oe-core.

Conditionally RRECOMMENDS kbd and kbd-consolefonts: if the machine in question do not have keyboards, there is no need for kbd and kbd-consolefonts.

The first patch should be fine for pulling. The 2nd patch should also be relativly non-controversial.

The 3rd patch is new for v2, and can be omitted if more discussions is needed.

All patches has been verified on a few internal arm-based machines, with a custom distro.

------------------------------------
v3: * Set PACKAGE_ARCH for systemd, as its RRECOMMENDS now depends on
MACHINE_FEATURES.

v2: * The SRC_URI update has been applied to master.

* Let systemd-analyze RDEPENDS on python-dbus, and RRECOMMENDS python-pycairo.

* Add a patch to conditionally enable/disable x11 support when buildling cairo.

* Add patch which makes the systemd's RRECOMMENDS on kbd and kbd-consolefonts conditional on the keyboard MACHINE_FEATURES.

The following changes since commit d3a451bbd08f7bb0ddea1aa0b314a72d65c660d4:

systemd: git repo moved (2012-01-10 08:25:55 +0100)

are available in the git repository at:
git://github.com/darander/meta-oe systemd-move
https://github.com/darander/meta-oe/tree/systemd-move

Anders Darander (3):
systemd: split out systemd-analyze
cairo: conditionally enable x11 dependencies
systemd: conditionally RRECOMMENDS kbd*

 meta-oe/recipes-core/systemd/systemd_git.bb      |   13 ++++++++++---
 meta-oe/recipes-graphics/cairo/cairo.inc         |    7 ++++++-
 meta-oe/recipes-graphics/cairo/cairo_1.10.2.bb   |    2 ++
 meta-oe/recipes-graphics/cairo/cairomm_1.10.0.bb |    2 ++
 4 files changed, 20 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.8.3
#1 lore raw

PATCH v3 1/3 systemd: split out systemd-analyze

Split systemd-analyze to a separate package, to remove the implicit dependency on python. (At least the rpm-packaging backend created a run-time dependency on python).

Add an RDEPENDS_${PN}-analyze on python-dbus, as this is required for systemd-analyze to work.

---
 meta-oe/recipes-core/systemd/systemd_git.bb |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
meta-oe/recipes-core/systemd/systemd_git.bb +6 -2
index bdaaf16..0fa61a7 100644
@@ -14,7 +14,7 @@ inherit gitpkgv
 PKGV = "v${GITPKGVTAG}"
 
 PV = "git"
-PR = "r7"
+PR = "r8"
 
 inherit useradd pkgconfig autotools vala perlnative
 
@@ -57,11 +57,15 @@ do_install() {
 	ln -s ${base_bindir}/systemd ${D}/init
 }
 
-PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs"
+PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze"
 
 USERADD_PACKAGES = "${PN}"
 GROUPADD_PARAM_${PN} = "-r lock"
 
+FILES_${PN}-analyze = "${bindir}/systemd-analyze"
+RDEPENDS_${PN}-analyze = "python-dbus"
+RRECOMMENDS_${PN}-analyze = "python-pycairo"
+
 FILES_${PN}-initramfs = "/init"
 RDEPENDS_${PN}-initramfs = "${PN}"
 
Signature · 1 line
1.7.8.3
#2 lore raw

PATCH v3 2/3 cairo: conditionally enable x11 dependencies

In reply to Anders Darander

Take the same approach to conditionally enable x11 and x11-dependencies as used in oe-core.

---
 meta-oe/recipes-graphics/cairo/cairo.inc         |    7 ++++++-
 meta-oe/recipes-graphics/cairo/cairo_1.10.2.bb   |    2 ++
 meta-oe/recipes-graphics/cairo/cairomm_1.10.0.bb |    2 ++
 3 files changed, 10 insertions(+), 1 deletions(-)
meta-oe/recipes-graphics/cairo/cairo.inc +6 -1
index 6157004..bd38233 100644
@@ -1,7 +1,12 @@
 SECTION = "libs"
-DEPENDS = "virtual/libx11 pixman libsm libpng fontconfig libxrender glib-2.0"
+X11DEPENDS = "virtual/libx11 libsm libxrender"
+DEPENDS = "pixman libpng fontconfig glib-2.0"
 DESCRIPTION = "Cairo graphics library"
 LICENSE = "MPL LGPL"
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+           ${@base_contains('DISTRO_FEATURES', 'gtk-directfb', 'directfb', '', d)}"
+PACKAGECONFIG[x11] = "--with-x=yes,--without-x,${X11DEPENDS}"
+PACKAGECONFIG[gtk-directfb] = "--enable-directfb=yes,,directfb"
 
 #check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points 
 require cairo-fpu.inc
meta-oe/recipes-graphics/cairo/cairo_1.10.2.bb +2 -0
index 9de75ed..e7b65af 100644
@@ -2,6 +2,8 @@ require cairo.inc
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77"
 
+PR = "r1"
+
 SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.gz;name=cairo \
 "
 SRC_URI[cairo.md5sum] = "f101a9e88b783337b20b2e26dfd26d5f"
meta-oe/recipes-graphics/cairo/cairomm_1.10.0.bb +2 -0
index e4fec3c..496a605 100644
@@ -5,6 +5,8 @@ DESCRIPTION = "C++ bindings for Cairo graphics library"
 LICENSE = "LGPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9"
 
+PR = "r1"
+
 DEPENDS = "cairo libsigc++-2.0"
 
 SRC_URI = "http://cairographics.org/releases/cairomm-${PV}.tar.gz;name=archive"
Signature · 1 line
1.7.8.3
#3 lore raw

PATCH v3 3/3 systemd: conditionally RRECOMMENDS kbd*

In reply to Anders Darander

If the machine lacks keyboard support, there is no need for kbd*-packages.

---
 meta-oe/recipes-core/systemd/systemd_git.bb |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
meta-oe/recipes-core/systemd/systemd_git.bb +5 -2
index 0fa61a7..56e5d82 100644
@@ -14,7 +14,7 @@ inherit gitpkgv
 PKGV = "v${GITPKGVTAG}"
 
 PV = "git"
-PR = "r8"
+PR = "r9"
 
 inherit useradd pkgconfig autotools vala perlnative
 
@@ -101,7 +101,7 @@ RDEPENDS_${PN} += "dbus-systemd udev-systemd"
 # 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
-RRECOMMENDS_${PN} += "kbd kbd-consolefonts \
+RRECOMMENDS_${PN} += "${@base_contains("MACHINE_FEATURES", "keyboard", "kbd kbd-consolefonts", "", d)} \
                       systemd-serialgetty \
                       util-linux-agetty \
                       util-linux-swaponoff \
@@ -110,6 +110,9 @@ RRECOMMENDS_${PN} += "kbd kbd-consolefonts \
                       kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
 "
 
+# RRECOMMENDS depends on MACHINE_FEATURES, thus this needs to be MACHINE_ARCH
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
 # TODO:
 # u-a for runlevel and telinit
 
Signature · 1 line
1.7.8.3
#4 lore raw

Re: [meta-oe][PATCH v3 3/3] systemd: conditionally RRECOMMENDS kbd*

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 10-01-12 12:52, Anders Darander schreef:

Quoted 2 lines

If the machine lacks keyboard support, there is no need for kbd*-packages.

NAK, this would make the complete systemd machine specific, which we do not want.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org

iEYEARECAAYFAk8MopkACgkQMkyGM64RGpHj8wCcCH4ow/Ou9KEmgNj/XekDhDGr QLMAnRIqKHElDl0kRip2iNGWlNCGnLAz
=lY3N
-----END PGP SIGNATURE-----

#5 lore raw

Re: [meta-oe][PATCH v3 3/3] systemd: conditionally RRECOMMENDS kbd*

Quoted 7 lines · Koen Kooi

Op 10-01-12 12:52, Anders Darander schreef:

Quoted 2 lines

If the machine lacks keyboard support, there is no need for kbd*-packages.

NAK, this would make the complete systemd machine specific, which we do not want.

IMO the keyboard support ought to be handled, in systemd case, as a distro feature so allowing it to be machine independent but allowing for the flexibility of removing its recommendations if need.

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
#6 lore raw

Re: [meta-oe][PATCH v3 3/3] systemd: conditionally RRECOMMENDS kbd*

Quoted 6 lines · Otavio Salvador
Quoted 4 lines · Koen Kooi

Op 10-01-12 12:52, Anders Darander schreef:

Quoted 2 lines

If the machine lacks keyboard support, there is no need for kbd*-packages.

Quoted 7 lines
Quoted 3 lines

NAK, this would make the complete systemd machine specific, which we do not want.

IMO the keyboard support ought to be handled, in systemd case, as a distro feature so allowing it to be machine independent but allowing for the flexibility of removing its recommendations if need.

Good point.

If we add a 'keyboard' distro feature, the issue would indeed be solved. I'll try to see if I can find some time to make such a suggestion, including adding keyboard to the default distro features, to try to reduce problems for existing users. (Altough, it might take a while, as I've just been put o other assignments, reducing my time to work on oe).

Cheers,
Anders