Skip to contentSkip to conversation

SystemD fixes and improvements

PATCH Superseded Otavio Salvador 3 participants 11 messages Oct 21, 2011 – Oct 24, 2011

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover SystemD fixes and improvements

The following changes since commit 36423031ae2cc2157232f3bec8f5c9fa53ef215d:

Cloud9: incremental submodule and build fixes (2011-10-21 14:57:30 +0200)

are available in the git repository at:
git://github.com/OSSystems/meta-oe master
https://github.com/OSSystems/meta-oe/tree/master

Otavio Salvador (5):
systemd-serialgetty: don't require systemd_git.bb
systemd: add systemd-initramfs
systemd: add lock group using useradd.bbclass
systemd: do not recommend systemd-serialgetty
task-basic: add "serial-console" machine feature

 .../recipes-core/systemd/systemd-serialgetty.bb    |   23 +-
 .../systemd/systemd-serialgetty/LICENSE            |  339 ++++++++++++++++++++
 meta-oe/recipes-core/systemd/systemd_git.bb        |   24 +-
 meta-oe/recipes-core/tasks/task-basic.bb           |    1 +
 4 files changed, 360 insertions(+), 27 deletions(-)
 create mode 100644 meta-oe/recipes-core/systemd/systemd-serialgetty/LICENSE
Signature · 1 line
1.7.2.5
#1 lore raw

PATCH 1/5 systemd-serialgetty: don't require systemd_git.bb

Avoids the recompile of this package every time systemd is change.

---
 .../recipes-core/systemd/systemd-serialgetty.bb    |   23 +-
 .../systemd/systemd-serialgetty/LICENSE            |  339 ++++++++++++++++++++
 2 files changed, 347 insertions(+), 15 deletions(-)
 create mode 100644 meta-oe/recipes-core/systemd/systemd-serialgetty/LICENSE
meta-oe/recipes-core/systemd/systemd-serialgetty.bb +8 -15
index d7e8571..86d833e 100644
@@ -1,19 +1,11 @@
-require systemd_git.bb
-
-SRC_URI = "git://anongit.freedesktop.org/systemd;protocol=git \
-           file://[email protected] \
-          "
-
 DESCRIPTION = "Systemd serial config"
-SERIAL_CONSOLE ?= "115200 /dev/ttyS0"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=751419260aa954499f7abaabaa882bbe"
 
-do_configure() {
-	:
-}
+SERIAL_CONSOLE ?= "115200 /dev/ttyS0"
 
-do_compile() {
-	:
-}
+SRC_URI = "file://LICENSE \
+           file://[email protected]"
 
 def get_baudrate(bb, d):
     return bb.data.getVar('SERIAL_CONSOLE', d, 1).split()[0]
@@ -27,9 +19,11 @@ do_install() {
 		install -d ${D}${base_libdir}/systemd/system/
 		install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/
 		install ${WORKDIR}/[email protected] ${D}${base_libdir}/systemd/system/
+
+		# enable the service
 		ln -sf ${base_libdir}/systemd/system/[email protected] \
 			${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty@${@get_console(bb, d)}.service
-		fi
+	fi
 }
 
 PACKAGES = "${PN} ${PN}-dbg ${PN}-dev ${PN}-doc"
@@ -40,4 +34,3 @@ RDEPENDS_${PN} = "systemd"
 # This is a machine specific file
 FILES_${PN} = "${base_libdir}/systemd/system/[email protected] ${sysconfdir}"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
-
meta-oe/recipes-core/systemd/systemd-serialgetty/LICENSE new file +339 -0

339 lines not on this page · raw message

Signature · 1 line
1.7.2.5
#2 lore raw

PATCH 2/5 systemd: add systemd-initramfs

In reply to Otavio Salvador

Includes a /init that points to ${base_sbin}/init that is called so to avoid having to include post rootfs commands for it.

---
 meta-oe/recipes-core/systemd/systemd_git.bb |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
meta-oe/recipes-core/systemd/systemd_git.bb +8 -2
index 8faedd0..f9e024b 100644
@@ -14,7 +14,7 @@ inherit gitpkgv
 PKGV = "v${GITPKGVTAG}"
 
 PV = "git"
-PR = "r0"
+PR = "r1"
 
 inherit pkgconfig autotools vala perlnative
 
@@ -52,9 +52,15 @@ do_install() {
 	autotools_do_install
 	# provided by a seperate recipe
 	rm ${D}${base_libdir}/systemd/system/serial-getty* -f
+
+	# provide support for initramfs
+	ln -s ${base_sbindir}/init ${D}/systemd
 }
 
-PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup"
+PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs"
+
+FILES_${PN}-initramfs = "/init"
+RDEPENDS_${PN}-initramfs = "${PN}"
 
 FILES_${PN}-gui = "${bindir}/systemadm"
 
Signature · 1 line
1.7.2.5
#3 lore raw

Re: [meta-oe][PATCH 2/5] systemd: add systemd-initramfs

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

Op 21-10-11 15:55, Otavio Salvador schreef:

Quoted 19 lines

Includes a /init that points to ${base_sbin}/init that is called so to avoid having to include post rootfs commands for it.

meta-oe/recipes-core/systemd/systemd_git.bb | 10 ++++++++-- 1 files
changed, 8 insertions(+), 2 deletions(-)

(quoted diff) +0 -0

b/meta-oe/recipes-core/systemd/systemd_git.bb index 8faedd0..f9e024b 100644 --- a/meta-oe/recipes-core/systemd/systemd_git.bb +++ b/meta-oe/recipes-core/systemd/systemd_git.bb @@ -14,7 +14,7 @@ inherit gitpkgv PKGV = "v${GITPKGVTAG}"

PV = "git" -PR = "r0" +PR = "r1"

inherit pkgconfig autotools vala perlnative

(quoted diff) +0 -0
@@ -52,9 +52,15 @@ do_install() { autotools_do_install # provided by a

seperate recipe rm ${D}${base_libdir}/systemd/system/serial-getty* -f + +

Quoted 2 lines
# provide support for initramfs +	ln -s ${base_sbindir}/init
${D}/systemd }

I wasn't paying attention, sorry. The above needs to be:

ln -s ${base_bindir}/systemd ${D}/init

shall I fix it myself or do you want to send a patch?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFOoYHPMkyGM64RGpERAtmbAJ42uS1WPeIwDl0SBUC055oZa9gnfACeNNLO V8rl5ePtsBq4ReGOtP8g8Ho=
=sQxg
-----END PGP SIGNATURE-----

#4 lore raw

Re: [meta-oe][PATCH 2/5] systemd: add systemd-initramfs

On Fri, Oct 21, 2011 at 12:29, Koen Kooi <[email protected]> wrote:
...

Quoted 3 lines

ln -s ${base_bindir}/systemd ${D}/init

shall I fix it myself or do you want to send a patch?

If you can amend it and push better, so I just rebase it here and avoid another pull request.

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

PATCH 3/5 systemd: add lock group using useradd.bbclass

In reply to Otavio Salvador
---
 meta-oe/recipes-core/systemd/systemd_git.bb |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)
meta-oe/recipes-core/systemd/systemd_git.bb +5 -10
index f9e024b..89ded56 100644
@@ -14,9 +14,9 @@ inherit gitpkgv
 PKGV = "v${GITPKGVTAG}"
 
 PV = "git"
-PR = "r1"
+PR = "r2"
 
-inherit pkgconfig autotools vala perlnative
+inherit useradd pkgconfig autotools vala perlnative
 
 SRCREV = "64685e0cea62b4937f0804e47ce2cb7929f58223"
 
@@ -59,6 +59,9 @@ do_install() {
 
 PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs"
 
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "-r lock"
+
 FILES_${PN}-initramfs = "/init"
 RDEPENDS_${PN}-initramfs = "${PN}"
 
@@ -113,12 +116,4 @@ update-alternatives --install ${base_sbindir}/halt halt ${base_bindir}/systemctl
 update-alternatives --install ${base_sbindir}/reboot reboot ${base_bindir}/systemctl 300
 update-alternatives --install ${base_sbindir}/shutdown shutdown ${base_bindir}/systemctl 300
 update-alternatives --install ${base_sbindir}/poweroff poweroff ${base_bindir}/systemctl 300
-
-# can't do this offline, but we need the u-a bits above
-if [ "x$D" != "x" ]; then
-	echo "can't do addgroup offline" ; exit 1
-else
-	grep "^lock:" /etc/group > /dev/null || addgroup lock
-fi
 }
-
Signature · 1 line
1.7.2.5
#6 lore raw

PATCH 4/5 systemd: do not recommend systemd-serialgetty

In reply to Otavio Salvador

The service ought to be add if need. Not by default on all images.

---
 meta-oe/recipes-core/systemd/systemd_git.bb |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
meta-oe/recipes-core/systemd/systemd_git.bb +1 -2
index 89ded56..9d55a0d 100644
@@ -14,7 +14,7 @@ inherit gitpkgv
 PKGV = "v${GITPKGVTAG}"
 
 PV = "git"
-PR = "r2"
+PR = "r3"
 
 inherit useradd pkgconfig autotools vala perlnative
 
@@ -98,7 +98,6 @@ RDEPENDS_${PN} += "dbus-systemd udev-systemd"
 # And pull in the kernel modules mentioned in INSTALL
 # swapon -p is also not supported by busybox
 RRECOMMENDS_${PN} += "kbd kbd-consolefonts \
-                      systemd-serialgetty \
                       util-linux-agetty \
                       util-linux-swaponoff \
                       util-linux-fsck e2fsprogs-e2fsck \
Signature · 1 line
1.7.2.5
#7 lore raw

PATCH 5/5 task-basic: add "serial-console" machine feature

In reply to Otavio Salvador

The "serial-console" machine feature makes the task-basic recommends systemd-serialgetty so serial tty works out of box.

---
 meta-oe/recipes-core/tasks/task-basic.bb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
meta-oe/recipes-core/tasks/task-basic.bb +1 -0
index 34aa7e1..d130313 100644
@@ -47,6 +47,7 @@ RDEPENDS_${PN} = "\
 RRECOMMENDS_${PN} = "\
 	${MACHINE_EXTRA_RRECOMMENDS} \
 	${@base_contains("MACHINE_FEATURES", "usbhost", "usbutils", "", d)} \
+	${@base_contains("MACHINE_FEATURES", "serial-console", "systemd-serialgetty", "", d)} \
 	${@base_contains("MACHINE_FEATURES", "alsa", "alsa-utils-alsamixer", "", d)} \
 	${@base_contains("MACHINE_FEATURES", "usbgadget", "kernel-module-g-ether kernel-module-g-serial kernel-module-g-mass-storage", "", d)} \
 	\
Signature · 1 line
1.7.2.5
#8 lore raw

Re: [meta-oe][PATCH 5/5] task-basic: add "serial-console" machine feature

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

Op 21-10-11 15:55, Otavio Salvador schreef:

Quoted 8 lines

The "serial-console" machine feature makes the task-basic recommends systemd-serialgetty so serial tty works out of box.

meta-oe/recipes-core/tasks/task-basic.bb | 1 + 1 files changed, 1
insertions(+), 0 deletions(-)

(quoted diff) +0 -0
Quoted 10 lines

b/meta-oe/recipes-core/tasks/task-basic.bb index 34aa7e1..d130313 100644 --- a/meta-oe/recipes-core/tasks/task-basic.bb +++ b/meta-oe/recipes-core/tasks/task-basic.bb @@ -47,6 +47,7 @@ RDEPENDS_${PN} = "\ RRECOMMENDS_${PN} = "\ ${MACHINE_EXTRA_RRECOMMENDS} \ ${@base_contains("MACHINE_FEATURES", "usbhost", "usbutils", "", d)} \ + ${@base_contains("MACHINE_FEATURES", "serial-console", "systemd-serialgetty", "", d)} \ ${@base_contains("MACHINE_FEATURES", "alsa", "alsa-utils-alsamixer", "", d)} \
${@base_contains("MACHINE_FEATURES", "usbgadget", "kernel-module-g-ether kernel-module-g-serial kernel-module-g-mass-storage", "", d)} \ \

As we discussed briefly on IRC, DISTRO_FEATURE or IMAGE_FEATURE might be better. So, what do others think?

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFOoXviMkyGM64RGpERAheGAJoDXgXaUrRz2CsNGj75/Ftuk0/HEQCePVqo s2pquzXlMBHh3l1YjLASZSU=
=6Hwz
-----END PGP SIGNATURE-----

#9 lore raw

Re: [meta-oe][PATCH 5/5] task-basic: add "serial-console" machine feature

Quoted 3 lines · Koen Kooi

As we discussed briefly on IRC, DISTRO_FEATURE or IMAGE_FEATURE might be better. So, what do others think?

I think IMAGE_FEATURE is appropriate here.

#10 lore raw
In reply to Otavio Salvador

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

Op 21-10-11 15:55, Otavio Salvador schreef:

Quoted 6 lines

The following changes since commit
36423031ae2cc2157232f3bec8f5c9fa53ef215d:

Cloud9: incremental submodule and build fixes (2011-10-21 14:57:30 +0200)

Quoted 6 lines

are available in the git repository at:
git://github.com/OSSystems/meta-oe master
https://github.com/OSSystems/meta-oe/tree/master

Otavio Salvador (5): systemd-serialgetty: don't require systemd_git.bb
systemd: add systemd-initramfs

These 2 have been merged

Quoted 1 line

systemd: add lock group using useradd.bbclass

This one is waiting for the matching useradd fix to go in to oe-core

Quoted 2 lines

systemd: do not recommend systemd-serialgetty task-basic: add "serial-console" machine feature

I'd like some more feedback on this from the oe-core people, since we're adding a new MACHINE/DISTRO/IMAGE_FEATURE.

I'll be at ELC-E in Prague this week with other OE developers, so the patchflow will slow down.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFOpQvqMkyGM64RGpERAmCzAKCancsMz7U/YndZn2Gc2WLzJHnVxACfcbBk tb1bywVIb3azG5MC90B9PX0=
=licP
-----END PGP SIGNATURE-----