Skip to contentSkip to conversation

systemd: package split

PATCH Superseded Anders Darander 2 participants 6 messages Jan 10, 2012

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 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.

------------------------------------
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      |   10 +++++++---
 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, 17 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.8.3
#1 lore raw

PATCH v2 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 v2 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 v2 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 |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-core/systemd/systemd_git.bb +2 -2
index 0fa61a7..7af8357 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 \
Signature · 1 line
1.7.8.3
#4 lore raw

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

NACK!

If you use MACHINE_FEATURES it needs to set PACKAGE_ARCH to machine too.

Quoted 40 lines · Anders Darander

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

---
 meta-oe/recipes-core/systemd/systemd_git.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

systemd_git.bb
index 0fa61a7..7af8357 100644

meta-oe/recipes-core/systemd/systemd_git.bb +2 -2
@@ -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 \

--
1.7.8.3

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

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

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

Quoted 3 lines · Otavio Salvador

NACK!

If you use MACHINE_FEATURES it needs to set PACKAGE_ARCH to machine too.

Thanks for noticing!

I've just submitted a v3, hopefully I've set the PACKAGE_ARCH in a correct way. (I tried to grep through meta-oe to see how PACKAGE_ARCH is set).

Please, let me know if I should have set PACKAGE_ARCH to something else, or in some other way.

Cheers,
Anders

Quoted 33 lines · Anders Darander
Quoted 32 lines

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

---
 meta-oe/recipes-core/systemd/systemd_git.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

systemd_git.bb
index 0fa61a7..7af8357 100644

meta-oe/recipes-core/systemd/systemd_git.bb +2 -2
@@ -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 \
Signature · 2 lines
Anders Darander
ChargeStorm AB / eStorm AB