All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes
@ 2013-03-26 16:49 Ross Burton
  2013-03-26 16:49 ` [PATCH 01/24] busybox: enable systemd integration for syslogd Ross Burton
                   ` (23 more replies)
  0 siblings, 24 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:49 UTC (permalink / raw)
  To: openembedded-core

Hi,

An iteration on the previous series, this fixes the issues that Saul and Martin
noticed, removes the commit that is targetted at meta-yocto, and importantly
fixes pure-systemd booting which was previously aborting dramatically when
populate-volatiles copied the contents of /run to /var/volatile/run (and then
deleted the originals).  systemd really doesn't like having it's internal pipes
and sockets deleted.

Ross

The following changes since commit f36926a264190e6202830e8520b41b30ae77ea43:

  docbook-utils-native: Unbreak the build after source and build dir split (2013-03-25 20:51:19 +0000)

are available in the git repository at:

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

for you to fetch changes up to a56f9f8d95194dc4365e83488a34f37a4ee0bce1:

  udev: move /run volatile entry to udev instead of initscripts (2013-03-26 16:26:09 +0000)

----------------------------------------------------------------
Andreas Oberritter (1):
      Revert "base-files: add fstab for systemd based systems"

Radu Moisan (1):
      busybox: enable systemd integration for syslogd

Ross Burton (22):
      busybox: add strictatime support to mount
      systemd: make xz support (compressed journal) optional, defaulting to on.
      systemd: merge udev-systemd into udev
      core-image-minimal-initramfs: don't install busybox-syslog
      systemd: don't depend on the PCI/USB databases
      systemd: split out the hwdb data
      default-providers: change udev selection logic
      update-rcd.bbclass: handle both sysvinit and systemd features being present
      util-linux: split uuidd into it's own package, and enable for systemd
      update-rcd: drop depends to recommends, check for update-rcd in scripts
      systemd: check for systemctl first, and don't force systemd to be installed.
      systemd: add udev init script for hybrid sysvinit/systemd usage
      update-rc.d/systemd: change communication variable name
      default-distrovars: don't add INITMAN to DISTRO_FEATURES and DISTRO_FEATURES_BACKFILL
      bitbake.conf: explicitly backfill sysvinit, not DISTRO_FEATURES_INITMAN
      default-distrovars: remove obsolete DISTRO_FEATURES_INITMAN reference
      packagegroup-core-boot: revert to specifying sysvinit as default init manager
      systemd-compat-units: disable dbus-1
      systemd: recommend systemd-compat-units
      dbus: explicitly disable systemd when no systemd
      busybox: order and group initscript variables logically
      udev: move /run volatile entry to udev instead of initscripts

 meta/classes/systemd.bbclass                       |   38 ++++----
 meta/classes/update-rc.d.bbclass                   |   22 +++--
 meta/conf/bitbake.conf                             |    2 +-
 meta/conf/distro/include/default-distrovars.inc    |    3 +-
 meta/conf/distro/include/default-providers.inc     |    2 +-
 .../base-files/base-files/fstab.systemd            |    9 --
 meta/recipes-core/base-files/base-files_3.0.14.bb  |    7 +-
 .../busybox/busybox-1.20.2/strict-atime.patch      |   49 ++++++++++
 meta/recipes-core/busybox/busybox.inc              |   22 ++++-
 meta/recipes-core/busybox/busybox_1.20.2.bb        |    5 +-
 .../busybox/files/busybox-klogd.service.in         |    8 ++
 .../busybox/files/busybox-syslog.service.in        |   13 +++
 meta/recipes-core/dbus/dbus.inc                    |    4 +-
 .../images/core-image-minimal-initramfs.bb         |    2 +
 .../initscripts/initscripts-1.0/volatiles          |    1 -
 .../packagegroups/packagegroup-core-boot.bb        |    5 +-
 meta/recipes-core/systemd/systemd-compat-units.bb  |    1 +
 meta/recipes-core/systemd/systemd/init             |  101 ++++++++++++++++++++
 meta/recipes-core/systemd/systemd_197.bb           |   49 +++++++---
 meta/recipes-core/udev/udev.inc                    |    6 +-
 meta/recipes-core/udev/udev/volatiles              |    1 +
 meta/recipes-core/util-linux/util-linux.inc        |   11 ++-
 22 files changed, 289 insertions(+), 72 deletions(-)
 delete mode 100644 meta/recipes-core/base-files/base-files/fstab.systemd
 create mode 100644 meta/recipes-core/busybox/busybox-1.20.2/strict-atime.patch
 create mode 100644 meta/recipes-core/busybox/files/busybox-klogd.service.in
 create mode 100644 meta/recipes-core/busybox/files/busybox-syslog.service.in
 create mode 100644 meta/recipes-core/systemd/systemd/init
 create mode 100644 meta/recipes-core/udev/udev/volatiles

Andreas Oberritter (1):
  Revert "base-files: add fstab for systemd based systems"

Radu Moisan (1):
  busybox: enable systemd integration for syslogd

Ross Burton (22):
  busybox: add strictatime support to mount
  systemd: make xz support (compressed journal) optional, defaulting to
    on.
  systemd: merge udev-systemd into udev
  core-image-minimal-initramfs: don't install busybox-syslog
  systemd: don't depend on the PCI/USB databases
  systemd: split out the hwdb data
  default-providers: change udev selection logic
  update-rcd.bbclass: handle both sysvinit and systemd features being
    present
  util-linux: split uuidd into it's own package, and enable for systemd
  update-rcd: drop depends to recommends, check for update-rcd in
    scripts
  systemd: check for systemctl first, and don't force systemd to be
    installed.
  systemd: add udev init script for hybrid sysvinit/systemd usage
  update-rc.d/systemd: change communication variable name
  default-distrovars: don't add INITMAN to DISTRO_FEATURES and
    DISTRO_FEATURES_BACKFILL
  bitbake.conf: explicitly backfill sysvinit, not
    DISTRO_FEATURES_INITMAN
  default-distrovars: remove obsolete DISTRO_FEATURES_INITMAN reference
  packagegroup-core-boot: revert to specifying sysvinit as default init
    manager
  systemd-compat-units: disable dbus-1
  systemd: recommend systemd-compat-units
  dbus: explicitly disable systemd when no systemd
  busybox: order and group initscript variables logically
  udev: move /run volatile entry to udev instead of initscripts

 meta/classes/systemd.bbclass                       |   38 ++++----
 meta/classes/update-rc.d.bbclass                   |   22 +++--
 meta/conf/bitbake.conf                             |    2 +-
 meta/conf/distro/include/default-distrovars.inc    |    3 +-
 meta/conf/distro/include/default-providers.inc     |    2 +-
 .../base-files/base-files/fstab.systemd            |    9 --
 meta/recipes-core/base-files/base-files_3.0.14.bb  |    7 +-
 .../busybox/busybox-1.20.2/strict-atime.patch      |   49 ++++++++++
 meta/recipes-core/busybox/busybox.inc              |   22 ++++-
 meta/recipes-core/busybox/busybox_1.20.2.bb        |    5 +-
 .../busybox/files/busybox-klogd.service.in         |    8 ++
 .../busybox/files/busybox-syslog.service.in        |   13 +++
 meta/recipes-core/dbus/dbus.inc                    |    4 +-
 .../images/core-image-minimal-initramfs.bb         |    2 +
 .../initscripts/initscripts-1.0/volatiles          |    1 -
 .../packagegroups/packagegroup-core-boot.bb        |    5 +-
 meta/recipes-core/systemd/systemd-compat-units.bb  |    1 +
 meta/recipes-core/systemd/systemd/init             |  101 ++++++++++++++++++++
 meta/recipes-core/systemd/systemd_197.bb           |   49 +++++++---
 meta/recipes-core/udev/udev.inc                    |    6 +-
 meta/recipes-core/udev/udev/volatiles              |    1 +
 meta/recipes-core/util-linux/util-linux.inc        |   11 ++-
 22 files changed, 289 insertions(+), 72 deletions(-)
 delete mode 100644 meta/recipes-core/base-files/base-files/fstab.systemd
 create mode 100644 meta/recipes-core/busybox/busybox-1.20.2/strict-atime.patch
 create mode 100644 meta/recipes-core/busybox/files/busybox-klogd.service.in
 create mode 100644 meta/recipes-core/busybox/files/busybox-syslog.service.in
 create mode 100644 meta/recipes-core/systemd/systemd/init
 create mode 100644 meta/recipes-core/udev/udev/volatiles

-- 
1.7.10.4




^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 01/24] busybox: enable systemd integration for syslogd
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
@ 2013-03-26 16:49 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 02/24] busybox: add strictatime support to mount Ross Burton
                   ` (22 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:49 UTC (permalink / raw)
  To: openembedded-core

From: Radu Moisan <radu.moisan@intel.com>

Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/busybox/busybox.inc                |   18 ++++++++++++++++--
 meta/recipes-core/busybox/busybox_1.20.2.bb          |    2 ++
 .../busybox/files/busybox-klogd.service.in           |    8 ++++++++
 .../busybox/files/busybox-syslog.service.in          |   13 +++++++++++++
 4 files changed, 39 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/busybox/files/busybox-klogd.service.in
 create mode 100644 meta/recipes-core/busybox/files/busybox-syslog.service.in

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index fc6ca91..e936e59 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -18,7 +18,7 @@ export EXTRA_LDFLAGS = "${LDFLAGS}"
 PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
 
 FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
-FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf*"
+FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${systemd_unitdir}/system/syslog.service"
 FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf"
 FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
 FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc"
@@ -32,12 +32,16 @@ INITSCRIPT_NAME_${PN}-mdev = "mdev"
 INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh"
 INITSCRIPT_PARAMS_${PN}-mdev = "start 06 S ."
 INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" 
+
+SYSTEMD_PACKAGES = "${PN}-syslog"
+SYSTEMD_SERVICE_${PN}-syslog = "${PN}-syslog.service"
+
 CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}"
 CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
 
 RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
 
-inherit cml1 update-rc.d
+inherit cml1 systemd update-rc.d
 
 # internal helper
 def busybox_cfg(feature, features, tokens, cnf, rem):
@@ -213,6 +217,16 @@ do_install () {
                fi
 	fi
 	install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
+
+    if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d ${D}${systemd_unitdir}/system
+        sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \
+            > ${D}${systemd_unitdir}/system/busybox-syslog.service
+        sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \
+            > ${D}${systemd_unitdir}/system/busybox-klogd.service
+
+        ln -sf /dev/null ${D}${systemd_unitdir}/system/syslog.service
+    fi
 }
 
 inherit update-alternatives
diff --git a/meta/recipes-core/busybox/busybox_1.20.2.bb b/meta/recipes-core/busybox/busybox_1.20.2.bb
index 783261e..a02cd38 100644
--- a/meta/recipes-core/busybox/busybox_1.20.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.20.2.bb
@@ -28,6 +28,8 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://fix-for-spurious-testsuite-failure.patch \
            file://busybox-1.20.2-kernel_ver.patch \
            file://stat-usr-bin.patch \
+           file://busybox-syslog.service.in \
+           file://busybox-klogd.service.in \
            file://testsuite-du-du-k-works-fix-false-positive.patch"
 
 SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c"
diff --git a/meta/recipes-core/busybox/files/busybox-klogd.service.in b/meta/recipes-core/busybox/files/busybox-klogd.service.in
new file mode 100644
index 0000000..d7c7755
--- /dev/null
+++ b/meta/recipes-core/busybox/files/busybox-klogd.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=Kernel Logging Service
+
+[Service]
+ExecStart=@base_sbindir@/klogd -n
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-core/busybox/files/busybox-syslog.service.in b/meta/recipes-core/busybox/files/busybox-syslog.service.in
new file mode 100644
index 0000000..2e04321
--- /dev/null
+++ b/meta/recipes-core/busybox/files/busybox-syslog.service.in
@@ -0,0 +1,13 @@
+[Unit]
+Description=System Logging Service
+Wants=busybox-klogd.service
+
+[Service]
+EnvironmentFile=-/etc/default/busybox-syslog
+ExecStart=@base_sbindir@/syslogd -n $OPTIONS
+Sockets=syslog.socket
+
+[Install]
+WantedBy=multi-user.target
+Also=busybox-klogd.service
+Alias=syslog.service
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 02/24] busybox: add strictatime support to mount
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
  2013-03-26 16:49 ` [PATCH 01/24] busybox: enable systemd integration for syslogd Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 03/24] systemd: make xz support (compressed journal) optional, defaulting to on Ross Burton
                   ` (21 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

systemd uses strictatime when mounting tmpfs.  Luckily this is already supported
upstream, so backport the patch from git.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 .../busybox/busybox-1.20.2/strict-atime.patch      |   49 ++++++++++++++++++++
 meta/recipes-core/busybox/busybox_1.20.2.bb        |    3 +-
 2 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/busybox/busybox-1.20.2/strict-atime.patch

diff --git a/meta/recipes-core/busybox/busybox-1.20.2/strict-atime.patch b/meta/recipes-core/busybox/busybox-1.20.2/strict-atime.patch
new file mode 100644
index 0000000..8696427
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.20.2/strict-atime.patch
@@ -0,0 +1,49 @@
+Add support for the "strictatime" mount option.
+
+Upstream-Status: Backport [9ad8979ff15e1b894ee1f4bb6a2535a1a2c20d65]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+Index: busybox-1.20.2/util-linux/mount.c
+===================================================================
+--- busybox-1.20.2.orig/util-linux/mount.c	2012-07-02 15:08:25.000000000 +0100
++++ busybox-1.20.2/util-linux/mount.c	2013-03-22 15:37:31.340277463 +0000
+@@ -113,6 +113,12 @@
+ #ifndef MS_RELATIME
+ # define MS_RELATIME    (1 << 21)
+ #endif
++#ifndef MS_STRICTATIME
++# define MS_STRICTATIME (1 << 24)
++#endif
++
++/* Any ~MS_FOO value has this bit set: */
++#define BB_MS_INVERTED_VALUE (1u << 31)
+ 
+ #include "libbb.h"
+ #if ENABLE_FEATURE_MOUNT_LABEL
+@@ -239,6 +245,7 @@
+ 		/* "nomand"      */ ~MS_MANDLOCK,
+ 		/* "relatime"    */ MS_RELATIME,
+ 		/* "norelatime"  */ ~MS_RELATIME,
++		/* "strictatime" */ MS_STRICTATIME,
+ 		/* "loud"        */ ~MS_SILENT,
+ 		/* "rbind"       */ MS_BIND|MS_RECURSIVE,
+ 
+@@ -295,6 +302,7 @@
+ 		"nomand\0"
+ 		"relatime\0"
+ 		"norelatime\0"
++		"strictatime\0"
+ 		"loud\0"
+ 		"rbind\0"
+ 
+@@ -466,8 +474,8 @@
+ 		// Find this option in mount_options
+ 		for (i = 0; i < ARRAY_SIZE(mount_options); i++) {
+ 			if (strcasecmp(option_str, options) == 0) {
+-				long fl = mount_options[i];
+-				if (fl < 0)
++				unsigned long fl = mount_options[i];
++				if (fl & BB_MS_INVERTED_VALUE)
+ 					flags &= fl;
+ 				else
+ 					flags |= fl;
diff --git a/meta/recipes-core/busybox/busybox_1.20.2.bb b/meta/recipes-core/busybox/busybox_1.20.2.bb
index a02cd38..c09a492 100644
--- a/meta/recipes-core/busybox/busybox_1.20.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.20.2.bb
@@ -30,7 +30,8 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://stat-usr-bin.patch \
            file://busybox-syslog.service.in \
            file://busybox-klogd.service.in \
-           file://testsuite-du-du-k-works-fix-false-positive.patch"
+           file://testsuite-du-du-k-works-fix-false-positive.patch \
+           file://strict-atime.patch"
 
 SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c"
 SRC_URI[tarball.sha256sum] = "eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882"
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 03/24] systemd: make xz support (compressed journal) optional, defaulting to on.
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
  2013-03-26 16:49 ` [PATCH 01/24] busybox: enable systemd integration for syslogd Ross Burton
  2013-03-26 16:50 ` [PATCH 02/24] busybox: add strictatime support to mount Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 04/24] systemd: merge udev-systemd into udev Ross Burton
                   ` (20 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

Compressed journals means using liblzma, sf the journal isn't going to be used
this can be disabled.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/systemd/systemd_197.bb |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_197.bb b/meta/recipes-core/systemd/systemd_197.bb
index 5180eef..dc54f36 100644
--- a/meta/recipes-core/systemd/systemd_197.bb
+++ b/meta/recipes-core/systemd/systemd_197.bb
@@ -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"
@@ -43,9 +43,11 @@ LDFLAGS_libc-uclibc_append = " -lrt"
 
 GTKDOC_DOCDIR = "${S}/docs/"
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "xz"
 # Sign the journal for anti-tampering
 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"
 
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 04/24] systemd: merge udev-systemd into udev
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (2 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 03/24] systemd: make xz support (compressed journal) optional, defaulting to on Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 05/24] core-image-minimal-initramfs: don't install busybox-syslog Ross Burton
                   ` (19 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

Merge the contents of udev-systemd, which is just the service files, into udev
itself.  This split wasn't intended to ever happen in oe-core.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/systemd/systemd_197.bb |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_197.bb b/meta/recipes-core/systemd/systemd_197.bb
index dc54f36..9a66a4e 100644
--- a/meta/recipes-core/systemd/systemd_197.bb
+++ b/meta/recipes-core/systemd/systemd_197.bb
@@ -173,7 +173,7 @@ FILES_${PN} = " ${base_bindir}/* \
 FILES_${PN}-dbg += "${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/"
 FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
 
-RDEPENDS_${PN} += "dbus udev-systemd"
+RDEPENDS_${PN} += "dbus"
 
 RRECOMMENDS_${PN} += "systemd-serialgetty \
                       util-linux-agetty \
@@ -181,7 +181,7 @@ RRECOMMENDS_${PN} += "systemd-serialgetty \
                       kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
 "
 
-PACKAGES =+ "udev-dbg udev udev-consolekit udev-utils udev-systemd"
+PACKAGES =+ "udev-dbg udev udev-consolekit udev-utils"
 
 FILES_udev-dbg += "/lib/udev/.debug"
 
@@ -212,6 +212,8 @@ FILES_udev += "${base_sbindir}/udevd \
                /lib/udev/rules.d/95*.rules \
                ${base_libdir}/udev/hwdb.d \
                ${sysconfdir}/udev \
+               ${systemd_unitdir}/system/*udev* \
+               ${systemd_unitdir}/system/*.wants/*udev* \
               "
 
 FILES_udev-consolekit += "/lib/ConsoleKit"
@@ -219,9 +221,6 @@ RDEPENDS_udev-consolekit += "${@base_contains('DISTRO_FEATURES', 'x11', 'console
 
 FILES_udev-utils = "${bindir}/udevadm"
 
-FILES_udev-systemd = "${systemd_unitdir}/system/*udev* ${systemd_unitdir}/system/*.wants/*udev*"
-RDEPENDS_udev-systemd = "udev"
-
 # TODO:
 # u-a for runlevel and telinit
 
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 05/24] core-image-minimal-initramfs: don't install busybox-syslog
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (3 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 04/24] systemd: merge udev-systemd into udev Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 17:05   ` Mark Hatle
  2013-03-26 16:50 ` [PATCH 06/24] systemd: don't depend on the PCI/USB databases Ross Burton
                   ` (18 subsequent siblings)
  23 siblings, 1 reply; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

This uses BAD_RECOMMENDATIONS which isn't supported by all package backends, but
it's a start.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/images/core-image-minimal-initramfs.bb |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-core/images/core-image-minimal-initramfs.bb b/meta/recipes-core/images/core-image-minimal-initramfs.bb
index 7f6826c..6de24b3 100644
--- a/meta/recipes-core/images/core-image-minimal-initramfs.bb
+++ b/meta/recipes-core/images/core-image-minimal-initramfs.bb
@@ -17,3 +17,5 @@ IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
 inherit core-image
 
 IMAGE_ROOTFS_SIZE = "8192"
+
+BAD_RECOMMENDATIONS += "busybox-syslog"
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 06/24] systemd: don't depend on the PCI/USB databases
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (4 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 05/24] core-image-minimal-initramfs: don't install busybox-syslog Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 07/24] systemd: split out the hwdb data Ross Burton
                   ` (17 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

systemd ships its own databases (hwdb), so we don't need another copy.
--with-pci-ids isn't recognised by configure, so remove it.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/systemd/systemd_197.bb |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_197.bb b/meta/recipes-core/systemd/systemd_197.bb
index 9a66a4e..56ced66 100644
--- a/meta/recipes-core/systemd/systemd_197.bb
+++ b/meta/recipes-core/systemd/systemd_197.bb
@@ -61,7 +61,6 @@ EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
                  --disable-manpages \
                  --disable-coredump \
                  --disable-introspection \
-                 --with-pci-ids-path=/usr/share/misc \
                  --disable-tcpwrap \
                  --enable-split-usr \
                  --disable-microhttpd \
@@ -187,7 +186,7 @@ FILES_udev-dbg += "/lib/udev/.debug"
 
 RDEPENDS_udev += "udev-utils"
 RPROVIDES_udev = "hotplug"
-RRECOMMENDS_udev += "udev-extraconf usbutils-ids pciutils-ids"
+RRECOMMENDS_udev += "udev-extraconf"
 
 FILES_udev += "${base_sbindir}/udevd \
                ${base_libdir}/systemd/systemd-udevd \
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 07/24] systemd: split out the hwdb data
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (5 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 06/24] systemd: don't depend on the PCI/USB databases Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 08/24] default-providers: change udev selection logic Ross Burton
                   ` (16 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

The hardware databases are not essential and also quite large, so split them out
into udev-hwdb.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/systemd/systemd_197.bb |   22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_197.bb b/meta/recipes-core/systemd/systemd_197.bb
index 56ced66..a006ec8 100644
--- a/meta/recipes-core/systemd/systemd_197.bb
+++ b/meta/recipes-core/systemd/systemd_197.bb
@@ -180,13 +180,13 @@ RRECOMMENDS_${PN} += "systemd-serialgetty \
                       kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
 "
 
-PACKAGES =+ "udev-dbg udev udev-consolekit udev-utils"
+PACKAGES =+ "udev-dbg udev udev-consolekit udev-utils udev-hwdb"
 
 FILES_udev-dbg += "/lib/udev/.debug"
 
 RDEPENDS_udev += "udev-utils"
 RPROVIDES_udev = "hotplug"
-RRECOMMENDS_udev += "udev-extraconf"
+RRECOMMENDS_udev += "udev-extraconf udev-hwdb"
 
 FILES_udev += "${base_sbindir}/udevd \
                ${base_libdir}/systemd/systemd-udevd \
@@ -209,7 +209,6 @@ FILES_udev += "${base_sbindir}/udevd \
                /lib/udev/rules.d/78*.rules \
                /lib/udev/rules.d/8*.rules \
                /lib/udev/rules.d/95*.rules \
-               ${base_libdir}/udev/hwdb.d \
                ${sysconfdir}/udev \
                ${systemd_unitdir}/system/*udev* \
                ${systemd_unitdir}/system/*.wants/*udev* \
@@ -220,6 +219,8 @@ RDEPENDS_udev-consolekit += "${@base_contains('DISTRO_FEATURES', 'x11', 'console
 
 FILES_udev-utils = "${bindir}/udevadm"
 
+FILES_udev-hwdb = "${base_libdir}/udev/hwdb.d"
+
 # TODO:
 # u-a for runlevel and telinit
 
@@ -239,6 +240,21 @@ update-alternatives --remove shutdown ${base_bindir}/systemctl
 update-alternatives --remove poweroff ${base_bindir}/systemctl
 }
 
+pkg_postinst_udev-hwdb () {
+	if test -n "$D"; then
+		exit 1
+	fi
+
+	udevadm hwdb --update
+}
+
+pkg_prerm_udev-hwdb () {
+	if test -n "$D"; then
+		exit 1
+	fi
+
+	rm -f ${sysconfdir}/udev/hwdb.bin
+}
 
 # As this recipe builds udev, respect the systemd DISTRO_FEATURE so we don't try
 # building udev and systemd in world builds.
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 08/24] default-providers: change udev selection logic
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (6 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 07/24] systemd: split out the hwdb data Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 09/24] update-rcd.bbclass: handle both sysvinit and systemd features being present Ross Burton
                   ` (15 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

Change the logic so that the udev provider is the standalone udev, unless the
systemd DISTRO_FEATURE is set.  The previous logic was designed to fail if both
sysvinit and systemd were enabled, which we're supporting now.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/conf/distro/include/default-providers.inc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc
index 39ce7cc..e3a44e6 100644
--- a/meta/conf/distro/include/default-providers.inc
+++ b/meta/conf/distro/include/default-providers.inc
@@ -38,4 +38,4 @@ PREFERRED_PROVIDER_nativesdk-opkg ?= "nativesdk-opkg"
 PREFERRED_PROVIDER_console-tools ?= "kbd"
 PREFERRED_PROVIDER_gzip-native ?= "pigz-native"
 PREFERRED_PROVIDER_make ?= "make"
-PREFERRED_PROVIDER_udev ?= "${@base_contains('DISTRO_FEATURES','sysvinit','udev','',d)}${@base_contains('DISTRO_FEATURES','systemd','systemd','',d)}"
+PREFERRED_PROVIDER_udev ?= "${@base_contains('DISTRO_FEATURES','systemd','systemd','udev',d)}"
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 09/24] update-rcd.bbclass: handle both sysvinit and systemd features being present
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (7 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 08/24] default-providers: change udev selection logic Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 10/24] util-linux: split uuidd into it's own package, and enable for systemd Ross Burton
                   ` (14 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

Run the helper if the sysvinit feature is present, or if the systemd feature is
present but the systemd class hasn't been inherited.  We want to run in the
latter case as systemd has sysvinit compatibility, but we don't want to always
run so that pure systemd images don't have redundant sysvinit files.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/update-rc.d.bbclass |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 65bf022..06b91c1 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -75,9 +75,12 @@ python populate_packages_updatercd () {
         postrm += d.getVar('updatercd_postrm', True)
         d.setVar('pkg_postrm_%s' % pkg, postrm)
 
-    # If the systemd class has also been inherited, then don't do anything as
-    # the systemd units will override anything created by update-rc.d.
-    if not d.getVar("SYSTEMD_BBCLASS_ENABLED", True):
+    # Run if the sysvinit feature is present, or if the systemd feature is present
+    # but the systemd class hasn't been inherited.  We want to run in the latter case
+    # as systemd has sysvinit compatibility, but we don't want to always so that
+    # pure systemd images don't have redundent sysvinit files.
+    if "sysvinit" in d.getVar("DISTRO_FEATURES").split() or \
+       ("systemd" in d.getVar("DISTRO_FEATURES").split() and not d.getVar("SYSTEMD_BBCLASS_ENABLED", True)):
         pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
         if pkgs == None:
             pkgs = d.getVar('UPDATERCPN', True)
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 10/24] util-linux: split uuidd into it's own package, and enable for systemd
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (8 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 09/24] update-rcd.bbclass: handle both sysvinit and systemd features being present Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 11/24] update-rcd: drop depends to recommends, check for update-rcd in scripts Ross Burton
                   ` (13 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/util-linux/util-linux.inc |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 41a5471..46daab7 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -17,7 +17,7 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=679af3e410ee112a5ec94de6501bf5c3
                     file://libmount/COPYING;md5=152f98bc301a5ea649769ede7203ac82 \
                     file://libblkid/COPYING;md5=152f98bc301a5ea649769ede7203ac82"
 
-inherit autotools gettext pkgconfig
+inherit autotools gettext pkgconfig systemd
 DEPENDS = "zlib ncurses"
 DEPENDS_append_class-native = " lzo-native"
 
@@ -34,7 +34,7 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
              util-linux-libmount util-linux-libmount-dev \
              util-linux-libblkid-dev util-linux-libuuid util-linux-libuuid-dev \
              util-linux-uuidgen util-linux-lscpu util-linux-fsck util-linux-blkid \
-             util-linux-mkfs util-linux-mcookie util-linux-reset"
+             util-linux-mkfs util-linux-mcookie util-linux-reset util-linux-uuidd"
 
 EXTRA_OECONF = "--libdir=${base_libdir} --disable-use-tty-group \
                 --disable-makeinstall-chown --enable-elvtune --enable-init \
@@ -46,6 +46,10 @@ EXTRA_OECONF = "--libdir=${base_libdir} --disable-use-tty-group \
 		usrsbin_execdir='${sbindir}' \
 "
 
+# Respect the systemd feature for uuidd
+EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'systemd', '--enable-socket-activation', '--disable-socket-activation', d)}"
+EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
+
 EXTRA_OECONF_append_class-native = " --disable-login --disable-su"
 
 FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
@@ -61,6 +65,7 @@ FILES_util-linux-mcookie = "${bindir}/mcookie"
 FILES_util-linux-umount = "${base_bindir}/umount.${BPN}"
 FILES_util-linux-readprofile = "${base_sbindir}/readprofile.${BPN}"
 FILES_util-linux-uuidgen = "${bindir}/uuidgen"
+FILES_util-linux-uuidd = "${sbindir}/uuidd"
 FILES_util-linux-reset = "${base_bindir}/reset"
 
 FILES_util-linux-libblkid = "${base_libdir}/libblkid.so.*"
@@ -88,6 +93,8 @@ RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-l
 RRECOMMENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-native = ""
 
+SYSTEMD_PACKAGES = "util-linux-uuidd"
+SYSTEMD_SERVICE_util-linux-uuidd = "uuidd.service"
 
 do_compile () {
 	set -e
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 11/24] update-rcd: drop depends to recommends, check for update-rcd in scripts
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (9 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 10/24] util-linux: split uuidd into it's own package, and enable for systemd Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 12/24] systemd: check for systemctl first, and don't force systemd to be installed Ross Burton
                   ` (12 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/update-rc.d.bbclass |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 06b91c1..0997702 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -6,7 +6,7 @@ UPDATERCD_virtclass-cross = ""
 UPDATERCD_class-native = ""
 UPDATERCD_class-nativesdk = ""
 
-RDEPENDS_${UPDATERCPN}_append = " ${UPDATERCD}"
+RRECOMMENDS_${UPDATERCPN}_append = " ${UPDATERCD}"
 
 INITSCRIPT_PARAMS ?= "defaults"
 
@@ -18,7 +18,9 @@ if test "x$D" != "x"; then
 else
 	OPT="-s"
 fi
-update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
+if type update-rc.d >/dev/null; then
+	update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
+fi
 }
 
 updatercd_prerm() {
@@ -28,10 +30,13 @@ fi
 }
 
 updatercd_postrm() {
-if [ "$D" != "" ]; then
-	update-rc.d -f -r $D ${INITSCRIPT_NAME} remove
+if test "$D" != ""; then
+	OPT="-f -r $D"
 else
-	update-rc.d ${INITSCRIPT_NAME} remove
+	OPT=""
+fi
+if type update-rc.d >/dev/null; then
+	update-rc.d $OPT ${INITSCRIPT_NAME} remove
 fi
 }
 
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 12/24] systemd: check for systemctl first, and don't force systemd to be installed.
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (10 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 11/24] update-rcd: drop depends to recommends, check for update-rcd in scripts Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 13/24] systemd: add udev init script for hybrid sysvinit/systemd usage Ross Burton
                   ` (11 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

With both sysvinit and systemd features enabled these postinsts may actually run
on a target without systemd, so check that systemctl is present before using it.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/systemd.bbclass |   27 +++++++++++----------------
 1 file changed, 11 insertions(+), 16 deletions(-)

diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index 564cd72..cca2152 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -24,19 +24,23 @@ if [ -n "$D" ]; then
     OPTS="--root=$D"
 fi
 
-systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
+if type systemctl >/dev/null; then
+	systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
 
-if [ -z "$D" -a "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then
-    systemctl start ${SYSTEMD_SERVICE}
+	if [ -z "$D" -a "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then
+		systemctl start ${SYSTEMD_SERVICE}
+	fi
 fi
 }
 
 systemd_prerm() {
-if [ -z "$D" ]; then
-    systemctl stop ${SYSTEMD_SERVICE}
-fi
+if type systemctl >/dev/null; then
+	if [ -z "$D" ]; then
+		systemctl stop ${SYSTEMD_SERVICE}
+	fi
 
-systemctl disable ${SYSTEMD_SERVICE}
+	systemctl disable ${SYSTEMD_SERVICE}
+fi
 }
 
 python systemd_populate_packages() {
@@ -56,14 +60,6 @@ python systemd_populate_packages() {
             bb.error('%s does not appear in package list, please add it' % pkg_systemd)
 
 
-    # Add a runtime dependency on systemd to pkg
-    def systemd_add_rdepends(pkg):
-        rdepends = d.getVar('RDEPENDS_' + pkg, True) or ""
-        if not 'systemd' in rdepends.split():
-            rdepends = '%s %s' % (rdepends, 'systemd')
-        d.setVar('RDEPENDS_' + pkg, rdepends)
-
-
     def systemd_generate_package_scripts(pkg):
         bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg)
 
@@ -156,7 +152,6 @@ python systemd_populate_packages() {
             systemd_check_package(pkg)
             if d.getVar('SYSTEMD_SERVICE_' + pkg, True):
                 systemd_generate_package_scripts(pkg)
-                systemd_add_rdepends(pkg)
         systemd_check_services()
 }
 
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 13/24] systemd: add udev init script for hybrid sysvinit/systemd usage
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (11 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 12/24] systemd: check for systemctl first, and don't force systemd to be installed Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 14/24] update-rc.d/systemd: change communication variable name Ross Burton
                   ` (10 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

With both sysvinit and systemd features it's possible to use systemd's udev with
sysvinit, so add the required init script.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/systemd/systemd/init   |  101 ++++++++++++++++++++++++++++++
 meta/recipes-core/systemd/systemd_197.bb |   13 +++-
 2 files changed, 113 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/systemd/systemd/init

diff --git a/meta/recipes-core/systemd/systemd/init b/meta/recipes-core/systemd/systemd/init
new file mode 100644
index 0000000..0ddd043
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/init
@@ -0,0 +1,101 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides:          udev
+# Required-Start:    mountvirtfs
+# Required-Stop:
+# Default-Start:     S
+# Default-Stop:
+# Short-Description: Start udevd, populate /dev and load drivers.
+### END INIT INFO
+
+. /etc/init.d/functions
+
+export TZ=/etc/localtime
+
+[ -d /sys/class ] || exit 1
+[ -r /proc/mounts ] || exit 1
+[ -x /lib/systemd/systemd-udevd ] || exit 1
+[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
+[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
+
+readfile () {
+   filename=$1
+   READDATA=""
+   if [ -r $filename ]; then
+       while read line; do
+           READDATA="$READDATA$line"
+       done < $filename
+   fi
+}
+
+case "$1" in
+  start)
+    export ACTION=add
+    # propagate /dev from /sys
+    echo "Starting udev"
+
+    # mount the tmpfs on /dev, if not already done
+    LANG=C awk '$2 == "/dev" && ($3 == "tmpfs" || $3 == "devtmpfs") { exit 1 }' /proc/mounts && {
+            mount -n -o mode=0755 -t tmpfs none "/dev"
+    }
+    [ -e /dev/pts ] || mkdir -m 0755 /dev/pts
+    [ -e /dev/shm ] || mkdir -m 1777 /dev/shm
+    mount -a -t tmpfs 2>/dev/null
+    mkdir -p /var/volatile/run
+
+    # cache handling
+    if [ "$DEVCACHE" != "" ]; then
+            readfile /proc/version
+            VERSION="$READDATA"
+            readfile /proc/cmdline
+            CMDLINE="$READDATA"
+            readfile /proc/devices
+            DEVICES="$READDATA"
+            readfile /proc/atags
+            ATAGS="$READDATA"
+
+            if [ -e $DEVCACHE ]; then
+                    readfile /etc/udev/cache.data
+                    if [ "$READDATA" = "$VERSION$CMDLINE$DEVICES$ATAGS" ]; then
+                            (cd /; tar xf $DEVCACHE > /dev/null 2>&1)
+                            not_first_boot=1
+                    fi
+
+                    echo "$VERSION$CMDLINE$DEVICES$ATAGS" > /dev/shm/udev.cache
+            fi
+    fi
+
+    # make_extra_nodes
+    killproc systemd-udevd > "/dev/null" 2>&1
+
+    # trigger the sorted events
+    echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
+    /lib/systemd/systemd-udevd -d
+
+    /usr/bin/udevadm control --env=STARTUP=1
+    if [ "$not_first_boot" != "" ];then
+            /usr/bin/udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus  --subsystem-nomatch=graphics	 --subsystem-nomatch=backlight --subsystem-nomatch=video4linux	--subsystem-nomatch=platform
+            (/usr/bin/udevadm settle --timeout=3; /usr/bin/udevadm control --env=STARTUP=)&
+    else
+            /usr/bin/udevadm trigger --action=add
+            /usr/bin/udevadm settle
+    fi
+    ;;
+  stop)
+    echo "Stopping udevd"
+    start-stop-daemon --stop --name udevd --quiet
+    ;;
+  restart)
+    $0 stop
+    sleep 1
+    $0 start
+    ;;
+  status)
+    status udevd
+    ;;
+  *)
+    echo "Usage: $0 {start|stop|status|restart}"
+    exit 1
+esac
+exit 0
diff --git a/meta/recipes-core/systemd/systemd_197.bb b/meta/recipes-core/systemd/systemd_197.bb
index a006ec8..d07fa95 100644
--- a/meta/recipes-core/systemd/systemd_197.bb
+++ b/meta/recipes-core/systemd/systemd_197.bb
@@ -16,7 +16,7 @@ DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
 SECTION = "base/shell"
 
-inherit gtk-doc useradd pkgconfig autotools perlnative
+inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d
 
 SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
            file://touchscreen.rules \
@@ -26,6 +26,7 @@ SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
            file://00-create-volatile.conf \
            file://0001-systemd-analyze-rewrite-in-C.patch \
            file://udev-linkage.patch \
+           file://init \
           "
 SRC_URI[md5sum] = "56a860dceadfafe59f40141eb5223743"
 SRC_URI[sha256sum] = "e6857ea21ae24d7056e7b0f4c2aaaba73b8bf57025b8949c0a8af0c1bc9774b5"
@@ -100,6 +101,11 @@ do_install() {
 	install -m 0644 ${WORKDIR}/var-run.conf ${D}${sysconfdir}/tmpfiles.d/
 
 	install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
+
+	if ${@base_contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+		install -d ${D}${sysconfdir}/init.d
+		install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
+	fi
 }
 
 python populate_packages_prepend (){
@@ -210,6 +216,7 @@ FILES_udev += "${base_sbindir}/udevd \
                /lib/udev/rules.d/8*.rules \
                /lib/udev/rules.d/95*.rules \
                ${sysconfdir}/udev \
+               ${sysconfdir}/init.d/systemd-udevd \
                ${systemd_unitdir}/system/*udev* \
                ${systemd_unitdir}/system/*.wants/*udev* \
               "
@@ -221,6 +228,10 @@ FILES_udev-utils = "${bindir}/udevadm"
 
 FILES_udev-hwdb = "${base_libdir}/udev/hwdb.d"
 
+INITSCRIPT_PACKAGES = "udev"
+INITSCRIPT_NAME_udev = "systemd-udevd"
+INITSCRIPT_PARAMS_udev = "start 03 S ."
+
 # TODO:
 # u-a for runlevel and telinit
 
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 14/24] update-rc.d/systemd: change communication variable name
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (12 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 13/24] systemd: add udev init script for hybrid sysvinit/systemd usage Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 15/24] default-distrovars: don't add INITMAN to DISTRO_FEATURES and DISTRO_FEATURES_BACKFILL Ross Burton
                   ` (9 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

Rename SYSTEMD_BBCLASS_ENABLED to INHIBIT_UPDATERCD_BBCLASS to reflect the
action, for clarity.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/systemd.bbclass     |   11 +++++++----
 meta/classes/update-rc.d.bbclass |    8 +++-----
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index cca2152..42fa554 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -10,11 +10,14 @@ SYSTEMD_AUTO_ENABLE ??= "enable"
 # even if the systemd DISTRO_FEATURE isn't enabled.  As such don't make any
 # changes directly but check the DISTRO_FEATURES first.
 python __anonymous() {
-    if "systemd" in d.getVar("DISTRO_FEATURES", True).split():
+    features = d.getVar("DISTRO_FEATURES", True).split()
+    # If the distro features have systemd but not sysvinit, inhibit update-rcd
+    # from doing any work so that pure-systemd images don't have redundant init
+    # files.
+    if "systemd" in features:
         d.appendVar("DEPENDS", " systemd-systemctl-native")
-        # Set a variable so that update-rcd.bbclass knows we're active and can
-        # disable itself.
-        d.setVar("SYSTEMD_BBCLASS_ENABLED", "1")
+        if "sysvinit" not in features:
+            d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
 }
 
 systemd_postinst() {
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 0997702..9f1e28a 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -80,12 +80,10 @@ python populate_packages_updatercd () {
         postrm += d.getVar('updatercd_postrm', True)
         d.setVar('pkg_postrm_%s' % pkg, postrm)
 
-    # Run if the sysvinit feature is present, or if the systemd feature is present
-    # but the systemd class hasn't been inherited.  We want to run in the latter case
-    # as systemd has sysvinit compatibility, but we don't want to always so that
-    # pure systemd images don't have redundent sysvinit files.
+    # Check that this class isn't being inhibited (generally, by
+    # systemd.bbclass) before doing any work.
     if "sysvinit" in d.getVar("DISTRO_FEATURES").split() or \
-       ("systemd" in d.getVar("DISTRO_FEATURES").split() and not d.getVar("SYSTEMD_BBCLASS_ENABLED", True)):
+       not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):
         pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
         if pkgs == None:
             pkgs = d.getVar('UPDATERCPN', True)
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 15/24] default-distrovars: don't add INITMAN to DISTRO_FEATURES and DISTRO_FEATURES_BACKFILL
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (13 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 14/24] update-rc.d/systemd: change communication variable name Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 16/24] bitbake.conf: explicitly backfill sysvinit, not DISTRO_FEATURES_INITMAN Ross Burton
                   ` (8 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

DISTRO_FEATURES_INITMAN is going away as it's not useful in a hybrid init script
environment.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/conf/distro/include/default-distrovars.inc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
index f0fec2a..eafbcc2 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -18,7 +18,7 @@ DISTRO_FEATURES_LIBC_DEFAULT ?= "ipv4 ipv6 libc-backtrace libc-big-macros libc-b
 DISTRO_FEATURES_LIBC ?= "${DISTRO_FEATURES_LIBC_DEFAULT}"
 DISTRO_FEATURES_LIBC_class-nativesdk = "${DISTRO_FEATURES_LIBC_DEFAULT}"
 DISTRO_FEATURES_INITMAN ?= "sysvinit"
-DISTRO_FEATURES ?= "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 ${DISTRO_FEATURES_LIBC} ${DISTRO_FEATURES_INITMAN}"
+DISTRO_FEATURES ?= "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 ${DISTRO_FEATURES_LIBC}"
 
 IMAGE_FEATURES ?= ""
 
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 16/24] bitbake.conf: explicitly backfill sysvinit, not DISTRO_FEATURES_INITMAN
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (14 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 15/24] default-distrovars: don't add INITMAN to DISTRO_FEATURES and DISTRO_FEATURES_BACKFILL Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 17/24] default-distrovars: remove obsolete DISTRO_FEATURES_INITMAN reference Ross Burton
                   ` (7 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

Reflect reality by backfilling sysvinit support, instead of whatever value was
in DISTRO_FEATURES_INITMAN.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/conf/bitbake.conf |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 01ebad4..cd5d61e 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -730,7 +730,7 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
 IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
 
-DISTRO_FEATURES_BACKFILL = "pulseaudio ${DISTRO_FEATURES_INITMAN}"
+DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit"
 MACHINE_FEATURES_BACKFILL = "rtc"
 
 COMBINED_FEATURES = "\
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 17/24] default-distrovars: remove obsolete DISTRO_FEATURES_INITMAN reference
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (15 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 16/24] bitbake.conf: explicitly backfill sysvinit, not DISTRO_FEATURES_INITMAN Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 18/24] packagegroup-core-boot: revert to specifying sysvinit as default init manager Ross Burton
                   ` (6 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/conf/distro/include/default-distrovars.inc |    1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
index eafbcc2..b0586d6 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -17,7 +17,6 @@ DISTRO_FEATURES_LIBC_DEFAULT ?= "ipv4 ipv6 libc-backtrace libc-big-macros libc-b
 					libc-posix-wchar-io"
 DISTRO_FEATURES_LIBC ?= "${DISTRO_FEATURES_LIBC_DEFAULT}"
 DISTRO_FEATURES_LIBC_class-nativesdk = "${DISTRO_FEATURES_LIBC_DEFAULT}"
-DISTRO_FEATURES_INITMAN ?= "sysvinit"
 DISTRO_FEATURES ?= "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 ${DISTRO_FEATURES_LIBC}"
 
 IMAGE_FEATURES ?= ""
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 18/24] packagegroup-core-boot: revert to specifying sysvinit as default init manager
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (16 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 17/24] default-distrovars: remove obsolete DISTRO_FEATURES_INITMAN reference Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 19/24] Revert "base-files: add fstab for systemd based systems" Ross Burton
                   ` (5 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

Don't follow DISTRO_FEATURES_INITMAN as that makes the packagegroups rebuild if
you switch init manager.

As in hybrid situations there's generally a clear primary and minimal init
manager choice, so change VIRTUAL-RUNTIME_init_manager to set the primary init
manager, and roll your own groups/images for the secondary.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/packagegroups/packagegroup-core-boot.bb |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
index b9183a8..9306a34 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
@@ -26,8 +26,8 @@ RCONFLICTS_${PN} = "task-core-boot"
 # Distro can override the following VIRTUAL-RUNTIME providers:
 VIRTUAL-RUNTIME_dev_manager ?= "udev"
 VIRTUAL-RUNTIME_login_manager ?= "tinylogin"
-VIRTUAL-RUNTIME_init_manager ?= "${DISTRO_FEATURES_INITMAN}"
-VIRTUAL-RUNTIME_initscripts ?= "${@base_contains('DISTRO_FEATURES', 'sysvinit', 'initscripts', '',d)}"
+VIRTUAL-RUNTIME_init_manager ?= "sysvinit"
+VIRTUAL-RUNTIME_initscripts ?= "initscripts"
 VIRTUAL-RUNTIME_keymaps ?= "keymaps"
 
 RDEPENDS_${PN} = "\
@@ -42,7 +42,6 @@ RDEPENDS_${PN} = "\
     ${VIRTUAL-RUNTIME_login_manager} \
     ${VIRTUAL-RUNTIME_init_manager} \
     ${VIRTUAL-RUNTIME_initscripts} \
-    ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd-compat-units', '',d)} \
     ${VIRTUAL-RUNTIME_dev_manager} \
     ${VIRTUAL-RUNTIME_update-alternatives} \
     ${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 19/24] Revert "base-files: add fstab for systemd based systems"
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (17 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 18/24] packagegroup-core-boot: revert to specifying sysvinit as default init manager Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 20/24] systemd-compat-units: disable dbus-1 Ross Burton
                   ` (4 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

From: Andreas Oberritter <obi@opendreambox.org>

For hybrid systemd/sysvinit builds, only one fstab can be used.
The default fstab used by sysvinit should work fine with systemd.

Since virtually every machine will ship its own fstab in its bsp
layer, the bsp layer may decide how to override the fstab based
on distro features.

This reverts commit 77bbb839ba25b974a538b90d346b454ccd5deefd.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/base-files/base-files/fstab.systemd |    9 ---------
 meta/recipes-core/base-files/base-files_3.0.14.bb     |    7 +------
 2 files changed, 1 insertion(+), 15 deletions(-)
 delete mode 100644 meta/recipes-core/base-files/base-files/fstab.systemd

diff --git a/meta/recipes-core/base-files/base-files/fstab.systemd b/meta/recipes-core/base-files/base-files/fstab.systemd
deleted file mode 100644
index cb48a0d..0000000
--- a/meta/recipes-core/base-files/base-files/fstab.systemd
+++ /dev/null
@@ -1,9 +0,0 @@
-# stock fstab - you probably want to override this with a machine specific one
-
-rootfs               /                    auto       defaults              1  1
-tmpfs                /var/volatile        tmpfs      defaults              0  0
-tmpfs                /media/ram           tmpfs      defaults              0  0
-
-# uncomment this if your device has a SD/MMC/Transflash slot
-#/dev/mmcblk0p1       /media/card          auto       defaults,sync,noauto  0  0
-
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index e7a9d82..a56450d 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -18,7 +18,6 @@ SRC_URI = "file://rotation \
            file://profile \
            file://shells \
            file://fstab \
-           file://fstab.systemd \
            file://filesystems \
            file://issue.net \
            file://issue \
@@ -92,11 +91,7 @@ do_install () {
  		install -m 0644 ${WORKDIR}/rotation ${D}${sysconfdir}/rotation
 	fi
 
-	if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-		install -m 0644 ${WORKDIR}/fstab.systemd ${D}${sysconfdir}/fstab
-	else
-		install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab
-	fi
+	install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab
 	install -m 0644 ${WORKDIR}/filesystems ${D}${sysconfdir}/filesystems
 	install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd
 	sed -i "s#ROOTHOME#${ROOT_HOME}#" ${WORKDIR}/profile
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 20/24] systemd-compat-units: disable dbus-1
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (18 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 19/24] Revert "base-files: add fstab for systemd based systems" Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 21/24] systemd: recommend systemd-compat-units Ross Burton
                   ` (3 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core


Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/systemd/systemd-compat-units.bb |    1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb
index 19a1ea1..9b4a8a4 100644
--- a/meta/recipes-core/systemd/systemd-compat-units.bb
+++ b/meta/recipes-core/systemd/systemd-compat-units.bb
@@ -34,6 +34,7 @@ SYSTEMD_DISABLED_SYSV_SERVICES = " \
   hwclock \
   networking \
   syslog.busybox \
+  dbus-1 \
 "
 
 pkg_postinst_${PN} () {
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 21/24] systemd: recommend systemd-compat-units
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (19 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 20/24] systemd-compat-units: disable dbus-1 Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 22/24] dbus: explicitly disable systemd when no systemd Ross Burton
                   ` (2 subsequent siblings)
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

These are more than useful as they ensure some services are not started twice,
and cause the first-boot postinstalls to run.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/systemd/systemd_197.bb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_197.bb b/meta/recipes-core/systemd/systemd_197.bb
index d07fa95..5ba3a23 100644
--- a/meta/recipes-core/systemd/systemd_197.bb
+++ b/meta/recipes-core/systemd/systemd_197.bb
@@ -180,7 +180,7 @@ FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ $
 
 RDEPENDS_${PN} += "dbus"
 
-RRECOMMENDS_${PN} += "systemd-serialgetty \
+RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units \
                       util-linux-agetty \
                       util-linux-fsck e2fsprogs-e2fsck \
                       kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 22/24] dbus: explicitly disable systemd when no systemd
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (20 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 21/24] systemd: recommend systemd-compat-units Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 23/24] busybox: order and group initscript variables logically Ross Burton
  2013-03-26 16:50 ` [PATCH 24/24] udev: move /run volatile entry to udev instead of initscripts Ross Burton
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

If systemd isn't a distro feature, explicitly disable the systemd unit path
check as otherwise it will search the sysroot.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/dbus/dbus.inc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index affffbc..c64084f 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -68,8 +68,8 @@ pkg_postinst_dbus() {
 EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
 EXTRA_OECONF_X_class-native = "--without-x --disable-x11-autolaunch"
 # TODO: would like to --enable-systemd but that's a circular build-dependency
-# between systemd <->dbus
-EXTRA_OECONF_SYSTEMD = "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '', d)}"
+# between systemd<->dbus
+EXTRA_OECONF_SYSTEMD = "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
 
 EXTRA_OECONF = "--disable-tests \
                 --disable-checks \
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 23/24] busybox: order and group initscript variables logically
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (21 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 22/24] dbus: explicitly disable systemd when no systemd Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  2013-03-26 16:50 ` [PATCH 24/24] udev: move /run volatile entry to udev instead of initscripts Ross Burton
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/busybox/busybox.inc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index e936e59..655cb3c 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -27,10 +27,10 @@ FILES_${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh"
 INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev ${PN}-hwclock"
 
 INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
-INITSCRIPT_NAME_${PN}-syslog = "syslog"
-INITSCRIPT_NAME_${PN}-mdev = "mdev"
 INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh"
+INITSCRIPT_NAME_${PN}-mdev = "mdev"
 INITSCRIPT_PARAMS_${PN}-mdev = "start 06 S ."
+INITSCRIPT_NAME_${PN}-syslog = "syslog"
 INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" 
 
 SYSTEMD_PACKAGES = "${PN}-syslog"
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 24/24] udev: move /run volatile entry to udev instead of initscripts
  2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
                   ` (22 preceding siblings ...)
  2013-03-26 16:50 ` [PATCH 23/24] busybox: order and group initscript variables logically Ross Burton
@ 2013-03-26 16:50 ` Ross Burton
  23 siblings, 0 replies; 28+ messages in thread
From: Ross Burton @ 2013-03-26 16:50 UTC (permalink / raw)
  To: openembedded-core

initscripts is generally installed on systemd-using images, but because it
specifies that /run is a symlink to /var/run managed by volatiles it totally
breaks systemd by copying/deleting /run from underneath systemd.  Deleting
sockets mid-boot doesn't leave systemd in a happy place.

As this volatile reference of /run was introduced by udev 182, move it's
reference to the udev recipe.  This way it will never be present on systemd
images, as systemd manages /run as a tmpfs itself.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/initscripts/initscripts-1.0/volatiles |    1 -
 meta/recipes-core/udev/udev.inc                         |    6 +++++-
 meta/recipes-core/udev/udev/volatiles                   |    1 +
 3 files changed, 6 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/udev/udev/volatiles

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
index f0c796c..270f128 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles
+++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
@@ -35,4 +35,3 @@ f root root 0664 /var/log/wtmp none
 f root root 0664 /var/run/utmp none
 l root root 0644 /etc/resolv.conf /var/run/resolv.conf
 f root root 0644 /var/run/resolv.conf none
-l root root 0755 /run /var/run
diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc
index bd82c34..e358d2d 100644
--- a/meta/recipes-core/udev/udev.inc
+++ b/meta/recipes-core/udev/udev.inc
@@ -27,7 +27,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
            file://local.rules \
            file://udev-cache \
            file://udev-cache.default \
-           file://init"
+           file://init \
+           file://volatiles"
 
 inherit autotools pkgconfig update-rc.d
 
@@ -81,6 +82,9 @@ do_install_append () {
 	install -d ${D}${sysconfdir}/default
 	install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache
 
+	install -d ${D}${sysconfdir}/default/volatiles
+	install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_udev
+
 	touch ${D}${sysconfdir}/udev/cache.data
 
 	install -d ${D}${sysconfdir}/udev/rules.d/
diff --git a/meta/recipes-core/udev/udev/volatiles b/meta/recipes-core/udev/udev/volatiles
new file mode 100644
index 0000000..e33561b
--- /dev/null
+++ b/meta/recipes-core/udev/udev/volatiles
@@ -0,0 +1 @@
+l root root 0755 /run /var/run
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH 05/24] core-image-minimal-initramfs: don't install busybox-syslog
  2013-03-26 16:50 ` [PATCH 05/24] core-image-minimal-initramfs: don't install busybox-syslog Ross Burton
@ 2013-03-26 17:05   ` Mark Hatle
  2013-03-26 17:13     ` Paul Eggleton
  2013-03-26 17:14     ` Burton, Ross
  0 siblings, 2 replies; 28+ messages in thread
From: Mark Hatle @ 2013-03-26 17:05 UTC (permalink / raw)
  To: openembedded-core

On 3/26/13 11:50 AM, Ross Burton wrote:
> This uses BAD_RECOMMENDATIONS which isn't supported by all package backends, but
> it's a start.

Since it's not supported in all backends, can you add a bugzilla to add support 
to the various backends?

--Mark

> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>   meta/recipes-core/images/core-image-minimal-initramfs.bb |    2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-core/images/core-image-minimal-initramfs.bb b/meta/recipes-core/images/core-image-minimal-initramfs.bb
> index 7f6826c..6de24b3 100644
> --- a/meta/recipes-core/images/core-image-minimal-initramfs.bb
> +++ b/meta/recipes-core/images/core-image-minimal-initramfs.bb
> @@ -17,3 +17,5 @@ IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
>   inherit core-image
>
>   IMAGE_ROOTFS_SIZE = "8192"
> +
> +BAD_RECOMMENDATIONS += "busybox-syslog"
>





^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 05/24] core-image-minimal-initramfs: don't install busybox-syslog
  2013-03-26 17:05   ` Mark Hatle
@ 2013-03-26 17:13     ` Paul Eggleton
  2013-03-26 17:14     ` Burton, Ross
  1 sibling, 0 replies; 28+ messages in thread
From: Paul Eggleton @ 2013-03-26 17:13 UTC (permalink / raw)
  To: Mark Hatle; +Cc: openembedded-core

On Tuesday 26 March 2013 12:05:33 Mark Hatle wrote:
> On 3/26/13 11:50 AM, Ross Burton wrote:
> > This uses BAD_RECOMMENDATIONS which isn't supported by all package
> > backends, but it's a start.
> 
> Since it's not supported in all backends, can you add a bugzilla to add
> support to the various backends?

FYI, Ross already filed one for RPM:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=3916

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 05/24] core-image-minimal-initramfs: don't install busybox-syslog
  2013-03-26 17:05   ` Mark Hatle
  2013-03-26 17:13     ` Paul Eggleton
@ 2013-03-26 17:14     ` Burton, Ross
  1 sibling, 0 replies; 28+ messages in thread
From: Burton, Ross @ 2013-03-26 17:14 UTC (permalink / raw)
  To: Mark Hatle; +Cc: openembedded-core

On 26 March 2013 17:05, Mark Hatle <mark.hatle@windriver.com> wrote:
> On 3/26/13 11:50 AM, Ross Burton wrote:
>>
>> This uses BAD_RECOMMENDATIONS which isn't supported by all package
>> backends, but
>> it's a start.
>
> Since it's not supported in all backends, can you add a bugzilla to add
> support to the various backends?

I'd previously filed #3916 for rootfs_rpm, but failed to do the same
for rootfs_deb (now done, #4120).

Ross



^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2013-03-26 17:31 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-26 16:49 [PATCH V2 00/24] hybrid systemd/sysvinit, and systemd fixes Ross Burton
2013-03-26 16:49 ` [PATCH 01/24] busybox: enable systemd integration for syslogd Ross Burton
2013-03-26 16:50 ` [PATCH 02/24] busybox: add strictatime support to mount Ross Burton
2013-03-26 16:50 ` [PATCH 03/24] systemd: make xz support (compressed journal) optional, defaulting to on Ross Burton
2013-03-26 16:50 ` [PATCH 04/24] systemd: merge udev-systemd into udev Ross Burton
2013-03-26 16:50 ` [PATCH 05/24] core-image-minimal-initramfs: don't install busybox-syslog Ross Burton
2013-03-26 17:05   ` Mark Hatle
2013-03-26 17:13     ` Paul Eggleton
2013-03-26 17:14     ` Burton, Ross
2013-03-26 16:50 ` [PATCH 06/24] systemd: don't depend on the PCI/USB databases Ross Burton
2013-03-26 16:50 ` [PATCH 07/24] systemd: split out the hwdb data Ross Burton
2013-03-26 16:50 ` [PATCH 08/24] default-providers: change udev selection logic Ross Burton
2013-03-26 16:50 ` [PATCH 09/24] update-rcd.bbclass: handle both sysvinit and systemd features being present Ross Burton
2013-03-26 16:50 ` [PATCH 10/24] util-linux: split uuidd into it's own package, and enable for systemd Ross Burton
2013-03-26 16:50 ` [PATCH 11/24] update-rcd: drop depends to recommends, check for update-rcd in scripts Ross Burton
2013-03-26 16:50 ` [PATCH 12/24] systemd: check for systemctl first, and don't force systemd to be installed Ross Burton
2013-03-26 16:50 ` [PATCH 13/24] systemd: add udev init script for hybrid sysvinit/systemd usage Ross Burton
2013-03-26 16:50 ` [PATCH 14/24] update-rc.d/systemd: change communication variable name Ross Burton
2013-03-26 16:50 ` [PATCH 15/24] default-distrovars: don't add INITMAN to DISTRO_FEATURES and DISTRO_FEATURES_BACKFILL Ross Burton
2013-03-26 16:50 ` [PATCH 16/24] bitbake.conf: explicitly backfill sysvinit, not DISTRO_FEATURES_INITMAN Ross Burton
2013-03-26 16:50 ` [PATCH 17/24] default-distrovars: remove obsolete DISTRO_FEATURES_INITMAN reference Ross Burton
2013-03-26 16:50 ` [PATCH 18/24] packagegroup-core-boot: revert to specifying sysvinit as default init manager Ross Burton
2013-03-26 16:50 ` [PATCH 19/24] Revert "base-files: add fstab for systemd based systems" Ross Burton
2013-03-26 16:50 ` [PATCH 20/24] systemd-compat-units: disable dbus-1 Ross Burton
2013-03-26 16:50 ` [PATCH 21/24] systemd: recommend systemd-compat-units Ross Burton
2013-03-26 16:50 ` [PATCH 22/24] dbus: explicitly disable systemd when no systemd Ross Burton
2013-03-26 16:50 ` [PATCH 23/24] busybox: order and group initscript variables logically Ross Burton
2013-03-26 16:50 ` [PATCH 24/24] udev: move /run volatile entry to udev instead of initscripts Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.