All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] kmod new packageconfig and dbus split package
@ 2015-01-21 20:00 ` Bruno Bottazzini
  2015-01-21 20:00   ` [PATCH 1/2] kmod: new PACKAGECONFIG debug and logging to help reduce binary size Bruno Bottazzini
                     ` (2 more replies)
  0 siblings, 3 replies; 73+ messages in thread
From: Bruno Bottazzini @ 2015-01-21 20:00 UTC (permalink / raw)
  To: openembedded-core

In this patchset we include two changes:

1- kmod: new PACKAGECONFIG debug and logging to help reduce binary size.
2- dbus: split it into two package. We will be able to choose if we want the
         full version or a smaller one.

Gustavo Sverzut Barbieri (2):
  kmod: new PACKAGECONFIG debug and logging to help reduce binary size.
  dbus: split tools package.

 meta/recipes-core/dbus/dbus.inc   | 13 +++++++------
 meta/recipes-kernel/kmod/kmod.inc |  5 ++++-
 2 files changed, 11 insertions(+), 7 deletions(-)

--
1.9.1



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

* [PATCH 1/2] kmod: new PACKAGECONFIG debug and logging to help reduce binary size.
  2015-01-21 20:00 ` [PATCH 0/2] kmod new packageconfig and dbus split package Bruno Bottazzini
@ 2015-01-21 20:00   ` Bruno Bottazzini
  2015-01-21 20:00   ` [PATCH 2/2] dbus: split tools package Bruno Bottazzini
  2015-01-28 15:47   ` [PATCH 0/2] kmod new packageconfig and dbus split package Bottazzini, Bruno
  2 siblings, 0 replies; 73+ messages in thread
From: Bruno Bottazzini @ 2015-01-21 20:00 UTC (permalink / raw)
  To: openembedded-core

From: Gustavo Sverzut Barbieri <gustavo.barbieri@intel.com>

debug and logging will make kmod and its library bigger than expected
due many strings in the resulting binaries. While these are useful for
development, they are of no use for deployment.

With them enabled kmod is 154Kb, libkmod is 99Kb. Disabling reduces to
kmod 139Kb (10%) and libkmod 83Kb (19%) on i586 stripped.

Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com>
---
 meta/recipes-kernel/kmod/kmod.inc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc
index dda74c8..652c6f5 100644
--- a/meta/recipes-kernel/kmod/kmod.inc
+++ b/meta/recipes-kernel/kmod/kmod.inc
@@ -32,7 +32,10 @@ SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
 S = "${WORKDIR}/git"
 
 EXTRA_AUTORECONF += "--install --symlink"
-EXTRA_OECONF +="--enable-debug --enable-logging --enable-tools --disable-manpages --with-zlib"
+EXTRA_OECONF +=" --enable-tools --disable-manpages --with-zlib"
+
+PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
+PACKAGECONFIG[logging] = " --enable-logging,--disable-logging"
 
 do_configure_prepend () {
         gtkdocize --docdir ${S}/libkmod/docs || touch ${S}/libkmod/docs/gtk-doc.make
-- 
1.9.1



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

* [PATCH 2/2] dbus: split tools package.
  2015-01-21 20:00 ` [PATCH 0/2] kmod new packageconfig and dbus split package Bruno Bottazzini
  2015-01-21 20:00   ` [PATCH 1/2] kmod: new PACKAGECONFIG debug and logging to help reduce binary size Bruno Bottazzini
@ 2015-01-21 20:00   ` Bruno Bottazzini
  2015-01-28 15:47   ` [PATCH 0/2] kmod new packageconfig and dbus split package Bottazzini, Bruno
  2 siblings, 0 replies; 73+ messages in thread
From: Bruno Bottazzini @ 2015-01-21 20:00 UTC (permalink / raw)
  To: openembedded-core

From: Gustavo Sverzut Barbieri <gustavo.barbieri@intel.com>

Most tools are not required if one is launching a simple daemon.
The user will be able to exclude dbus-tool and save  some space in his
build

Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com>
---
 meta/recipes-core/dbus/dbus.inc | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index d38ba7e..8b14647 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -39,7 +39,7 @@ CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
 
 DEBIANNAME_${PN} = "dbus-1"
 
-PACKAGES =+ "${PN}-lib"
+PACKAGES =+ "${PN}-lib ${PN}-tools"
 
 OLDPKGNAME = "dbus-x11"
 OLDPKGNAME_class-nativesdk = ""
@@ -49,12 +49,7 @@ RPROVIDES_${PN} = "${OLDPKGNAME}"
 RREPLACES_${PN} += "${OLDPKGNAME}"
 
 FILES_${PN} = "${bindir}/dbus-daemon* \
-               ${bindir}/dbus-uuidgen \
-               ${bindir}/dbus-cleanup-sockets \
                ${bindir}/dbus-send \
-               ${bindir}/dbus-monitor \
-               ${bindir}/dbus-launch \
-               ${bindir}/dbus-run-session \
                ${libexecdir}/dbus* \
                ${sysconfdir} \
                ${localstatedir} \
@@ -64,6 +59,12 @@ FILES_${PN} = "${bindir}/dbus-daemon* \
 FILES_${PN}-lib = "${libdir}/lib*.so.*"
 RRECOMMENDS_${PN}-lib = "${PN}"
 FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
+FILES_${PN}-tools += "${bindir}/dbus-uuidgen \
+                      ${bindir}/dbus-cleanup-sockets \
+                      ${bindir}/dbus-monitor \
+                      ${bindir}/dbus-launch \
+                      ${bindir}/dbus-run-session"
+RRECOMMENDS_${PN} = "${PN}-tools"
 
 pkg_postinst_dbus() {
 	# If both systemd and sysvinit are enabled, mask the dbus-1 init script
-- 
1.9.1



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

* Re: [PATCH 0/2] kmod new packageconfig and dbus split package
  2015-01-21 20:00 ` [PATCH 0/2] kmod new packageconfig and dbus split package Bruno Bottazzini
  2015-01-21 20:00   ` [PATCH 1/2] kmod: new PACKAGECONFIG debug and logging to help reduce binary size Bruno Bottazzini
  2015-01-21 20:00   ` [PATCH 2/2] dbus: split tools package Bruno Bottazzini
@ 2015-01-28 15:47   ` Bottazzini, Bruno
  2015-01-28 16:00     ` Burton, Ross
  2 siblings, 1 reply; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-01-28 15:47 UTC (permalink / raw)
  To: Bruno Bottazzini; +Cc: openembedded-core

On Wed, 21 Jan 2015 18:00:56 -0200
Bruno Bottazzini <bruno.bottazzini@intel.com> wrote:

Guys, were you able to look at this patch ?

> In this patchset we include two changes:
> 
> 1- kmod: new PACKAGECONFIG debug and logging to help reduce binary
> size. 2- dbus: split it into two package. We will be able to choose
> if we want the full version or a smaller one.
> 
> Gustavo Sverzut Barbieri (2):
>   kmod: new PACKAGECONFIG debug and logging to help reduce binary
> size. dbus: split tools package.
> 
>  meta/recipes-core/dbus/dbus.inc   | 13 +++++++------
>  meta/recipes-kernel/kmod/kmod.inc |  5 ++++-
>  2 files changed, 11 insertions(+), 7 deletions(-)
> 
> --
> 1.9.1
> 



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

* Re: [PATCH 0/2] kmod new packageconfig and dbus split package
  2015-01-28 15:47   ` [PATCH 0/2] kmod new packageconfig and dbus split package Bottazzini, Bruno
@ 2015-01-28 16:00     ` Burton, Ross
  2015-01-28 18:55       ` Dan McGregor
  0 siblings, 1 reply; 73+ messages in thread
From: Burton, Ross @ 2015-01-28 16:00 UTC (permalink / raw)
  To: Bottazzini, Bruno; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 166 bytes --]

On 28 January 2015 at 15:47, Bottazzini, Bruno <bruno.bottazzini@intel.com>
wrote:

> Guys, were you able to look at this patch ?
>

Yep, it's queued.

Ross

[-- Attachment #2: Type: text/html, Size: 562 bytes --]

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

* Re: [PATCH 0/2] kmod new packageconfig and dbus split package
  2015-01-28 16:00     ` Burton, Ross
@ 2015-01-28 18:55       ` Dan McGregor
  2015-01-28 19:57         ` Burton, Ross
  0 siblings, 1 reply; 73+ messages in thread
From: Dan McGregor @ 2015-01-28 18:55 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On 28 January 2015 at 10:00, Burton, Ross <ross.burton@intel.com> wrote:
>
> On 28 January 2015 at 15:47, Bottazzini, Bruno <bruno.bottazzini@intel.com>
> wrote:
>>
>> Guys, were you able to look at this patch ?
>
>
> Yep, it's queued.


Is there a public place to see what you have queued?


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

* Re: [PATCH 0/2] kmod new packageconfig and dbus split package
  2015-01-28 18:55       ` Dan McGregor
@ 2015-01-28 19:57         ` Burton, Ross
  2015-02-02 12:39           ` Bottazzini, Bruno
  0 siblings, 1 reply; 73+ messages in thread
From: Burton, Ross @ 2015-01-28 19:57 UTC (permalink / raw)
  To: Dan McGregor; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 235 bytes --]

On 28 January 2015 at 18:55, Dan McGregor <danismostlikely@gmail.com> wrote:

> Is there a public place to see what you have queued?
>

Sure it, ross/mut in poky-contrib.  As often seen on the autobuilder in all
red. :)

Ross

[-- Attachment #2: Type: text/html, Size: 643 bytes --]

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

* Re: [PATCH 0/2] kmod new packageconfig and dbus split package
  2015-01-28 19:57         ` Burton, Ross
@ 2015-02-02 12:39           ` Bottazzini, Bruno
  0 siblings, 0 replies; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-02-02 12:39 UTC (permalink / raw)
  To: Burton, Ross, Dan McGregor; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 500 bytes --]

Ping.

From: Burton, Ross [mailto:ross.burton@intel.com]
Sent: Wednesday, January 28, 2015 5:58 PM
To: Dan McGregor
Cc: Bottazzini, Bruno; OE-core
Subject: Re: [OE-core] [PATCH 0/2] kmod new packageconfig and dbus split package


On 28 January 2015 at 18:55, Dan McGregor <danismostlikely@gmail.com<mailto:danismostlikely@gmail.com>> wrote:
Is there a public place to see what you have queued?

Sure it, ross/mut in poky-contrib.  As often seen on the autobuilder in all red. :)

Ross

[-- Attachment #2: Type: text/html, Size: 3260 bytes --]

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

* [PATCH] systemd: update version from 216 to 218
@ 2015-02-03 18:21 ` Bruno Bottazzini
  2015-02-03 18:21   ` Bruno Bottazzini
  0 siblings, 1 reply; 73+ messages in thread
From: Bruno Bottazzini @ 2015-02-03 18:21 UTC (permalink / raw)
  To: openembedded-core

Also, in this patch we split systemd into packages.

Since, systemd has a lot of features, now the user can exclude them from the
final build.

Instead of carrying all systemd modules. We will be able to customize it
as our needs.

In the end we will be able to get a smaller and optimized system

Bruno Bottazzini (1):
  systemd: update version from 216 to 218

 ...r-executing-scripts-under-etc-systemd-218.patch |  131 ++
 .../systemd/systemd_218-pam-fix-fallocate.patch    |   91 ++
 meta/recipes-core/systemd/systemd_218.bb           | 1251 ++++++++++++++++++++
 3 files changed, 1473 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch
 create mode 100644 meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch
 create mode 100644 meta/recipes-core/systemd/systemd_218.bb

-- 
1.9.1



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

* [PATCH] systemd: update version from 216 to 218
  2015-02-03 18:21 ` [PATCH] systemd: update version from 216 to 218 Bruno Bottazzini
@ 2015-02-03 18:21   ` Bruno Bottazzini
  2015-02-03 21:23     ` Randy Witt
  2015-02-04 11:48     ` Enrico Scholz
  0 siblings, 2 replies; 73+ messages in thread
From: Bruno Bottazzini @ 2015-02-03 18:21 UTC (permalink / raw)
  To: openembedded-core

Spliting into packages to be able to choose what to be installed.
The final result may get smaller, if the user wanted to.
By default it will install the whole systemd which may be big.
---
 ...r-executing-scripts-under-etc-systemd-218.patch |  131 ++
 .../systemd/systemd_218-pam-fix-fallocate.patch    |   91 ++
 meta/recipes-core/systemd/systemd_218.bb           | 1251 ++++++++++++++++++++
 3 files changed, 1473 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch
 create mode 100644 meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch
 create mode 100644 meta/recipes-core/systemd/systemd_218.bb

diff --git a/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch
new file mode 100644
index 0000000..d50f2cb
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch
@@ -0,0 +1,131 @@
+From 0dec519c563654148d3cdd363d2598b50313de60 Mon Sep 17 00:00:00 2001
+From: Bruno Bottazzini <bruno.bottazzini@intel.com>
+Date: Mon, 2 Feb 2015 13:53:24 -0200
+Subject: [PATCH 1/1] add support for executing scripts under /etc/rcS.d/
+
+To be compatible, all services translated from scripts under /etc/rcS.d would
+run before services translated from scripts under /etc/rcN.d.
+---
+ src/sysv-generator/sysv-generator.c | 46 ++++++++++++++++++++++++++++---------
+ 1 file changed, 35 insertions(+), 11 deletions(-)
+
+diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
+index b8b77aa..9494afb 100644
+--- a/src/sysv-generator/sysv-generator.c
++++ b/src/sysv-generator/sysv-generator.c
+@@ -42,7 +42,8 @@
+ 
+ typedef enum RunlevelType {
+         RUNLEVEL_UP,
+-        RUNLEVEL_DOWN
++        RUNLEVEL_DOWN,
++        RUNLEVEL_SYSINIT
+ } RunlevelType;
+ 
+ static const struct {
+@@ -57,6 +58,9 @@ static const struct {
+         { "rc4.d",  SPECIAL_RUNLEVEL4_TARGET, RUNLEVEL_UP },
+         { "rc5.d",  SPECIAL_RUNLEVEL5_TARGET, RUNLEVEL_UP },
+ 
++        /* Debian style rcS.d, also adopted by OE */
++        { "rcS.d",  SPECIAL_SYSINIT_TARGET,   RUNLEVEL_SYSINIT},
++
+         /* Standard SysV runlevels for shutdown */
+         { "rc0.d",  SPECIAL_POWEROFF_TARGET,  RUNLEVEL_DOWN },
+         { "rc6.d",  SPECIAL_REBOOT_TARGET,    RUNLEVEL_DOWN }
+@@ -65,7 +69,7 @@ static const struct {
+            directories in this order, and we want to make sure that
+            sysv_start_priority is known when we first load the
+            unit. And that value we only know from S links. Hence
+-           UP must be read before DOWN */
++           UP/SYSINIT must be read before DOWN */
+ };
+ 
+ typedef struct SysvStub {
+@@ -81,6 +85,8 @@ typedef struct SysvStub {
+         char **conflicts;
+         bool has_lsb;
+         bool reload;
++        bool default_dependencies;
++        bool from_rcsd;
+ } SysvStub;
+ 
+ const char *arg_dest = "/tmp";
+@@ -189,6 +195,8 @@ static int generate_unit_file(SysvStub *s) {
+                 "Description=%s\n",
+                 s->path, s->description);
+ 
++        if (!s->default_dependencies)
++                fprintf(f, "DefaultDependencies=no\n");
+         if (!isempty(before))
+                 fprintf(f, "Before=%s\n", before);
+         if (!isempty(after))
+@@ -717,15 +725,26 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
+                         r = strv_extend(&s->after, other->name);
+                         if (r < 0)
+                                 return log_oom();
+-                }
+-                else if (other->sysv_start_priority > s->sysv_start_priority) {
+-                        r = strv_extend(&s->before, other->name);
++               } else if (other->from_rcsd && !s->from_rcsd) {
++                        r = strv_extend(&s->after, other->name);
+                         if (r < 0)
+                                 return log_oom();
+-                }
+-                else
+-                        continue;
+-
++        } else {
++          /* All scripts under /etc/rcS.d should execute before scripts under
++           * /etc/rcN.d */
++                 if (!other->from_rcsd && s->from_rcsd) {
++                         r = strv_extend(&s->before, other->name);
++                                if (r < 0)
++                                        return log_oom();
++                        }
++                        else if (other->sysv_start_priority > s->sysv_start_priority) {
++                                r = strv_extend(&s->before, other->name);
++                                if (r < 0)
++                                        return log_oom();
++                        }
++                        else
++                                continue;
++               }
+                 /* FIXME: Maybe we should compare the name here lexicographically? */
+         }
+ 
+@@ -784,6 +803,8 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
+                                 return log_oom();
+ 
+                         service->sysv_start_priority = -1;
++                        service->default_dependencies = true;
++                        service->from_rcsd = false;
+                         service->name = name;
+                         service->path = fpath;
+ 
+@@ -869,9 +890,11 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
+ 
+                                 if (de->d_name[0] == 'S')  {
+ 
+-                                        if (rcnd_table[i].type == RUNLEVEL_UP) {
++                                        if (rcnd_table[i].type == RUNLEVEL_UP || rcnd_table[i].type == RUNLEVEL_SYSINIT) {
+                                                 service->sysv_start_priority =
+                                                         MAX(a*10 + b, service->sysv_start_priority);
++                                                service->default_dependencies = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?false:true;
++                                                service->from_rcsd = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?true:false;
+                                         }
+ 
+                                         r = set_ensure_allocated(&runlevel_services[i], NULL);
+@@ -883,7 +906,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
+                                                 goto finish;
+ 
+                                 } else if (de->d_name[0] == 'K' &&
+-                                           (rcnd_table[i].type == RUNLEVEL_DOWN)) {
++                                        (rcnd_table[i].type == RUNLEVEL_DOWN ||
++                                         rcnd_table[i].type == RUNLEVEL_SYSINIT)) {
+ 
+                                         r = set_ensure_allocated(&shutdown_services, NULL);
+                                         if (r < 0)
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch b/meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch
new file mode 100644
index 0000000..2fbf4b4
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch
@@ -0,0 +1,91 @@
+From 84c87cf474f9ffd23332a40b7e06900ff8272a69 Mon Sep 17 00:00:00 2001
+From: Bruno Bottazzini <bruno.bottazzini@intel.com>
+Date: Fri, 30 Jan 2015 18:14:42 -0200
+Subject: [PATCH 1/1] This patch is uclibc specific, thus not suitable for
+ upstream.
+
+---
+ src/journal/journal-file.c  | 15 ++++++++++++++-
+ src/journal/journald-kmsg.c | 16 ++++++++++++++--
+ 2 files changed, 28 insertions(+), 3 deletions(-)
+
+diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
+index ec12e89..3d21528 100644
+--- a/src/journal/journal-file.c
++++ b/src/journal/journal-file.c
+@@ -35,6 +35,7 @@
+ #include "lookup3.h"
+ #include "compress.h"
+ #include "fsprg.h"
++#include "config.h"
+ 
+ #define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*sizeof(HashItem))
+ #define DEFAULT_FIELD_HASH_TABLE_SIZE (333ULL*sizeof(HashItem))
+@@ -354,7 +355,7 @@ static int journal_file_fstat(JournalFile *f) {
+ 
+ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) {
+         uint64_t old_size, new_size;
+-        int r;
++        int r = 0;
+ 
+         assert(f);
+ 
+@@ -418,9 +419,21 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size)
+         /* Note that the glibc fallocate() fallback is very
+            inefficient, hence we try to minimize the allocation area
+            as we can. */
++#ifdef HAVE_POSIX_FALLOCATE
+         r = posix_fallocate(f->fd, old_size, new_size - old_size);
+         if (r != 0)
+                 return -r;
++#else
++        /* Write something every 512 bytes to make sure the block is allocated */
++        uint64_t len = new_size - old_size;
++        uint64_t offset = old_size;
++        for (offset += (len-1) % 512; len > 0; offset += 512) {
++                len -= 512;
++                if (pwrite(f->fd, "", 1, offset) != 1)
++                        return -errno;
++        }
++
++#endif /* HAVE_POSIX_FALLOCATE */
+ 
+         f->header->arena_size = htole64(new_size - le64toh(f->header->header_size));
+ 
+diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
+index aca4571..f3c2c19 100644
+--- a/src/journal/journald-kmsg.c
++++ b/src/journal/journald-kmsg.c
+@@ -437,6 +437,7 @@ fail:
+ int server_open_kernel_seqnum(Server *s) {
+         _cleanup_close_ int fd;
+         uint64_t *p;
++        int r = 0;
+ 
+         assert(s);
+ 
+@@ -449,8 +450,19 @@ int server_open_kernel_seqnum(Server *s) {
+                 log_error_errno(errno, "Failed to open /run/systemd/journal/kernel-seqnum, ignoring: %m");
+                 return 0;
+         }
+-
+-        if (posix_fallocate(fd, 0, sizeof(uint64_t)) < 0) {
++#ifdef HAVE_POSIX_FALLOCATE
++        r = posix_fallocate(fd, 0, sizeof(uint64_t));
++#else
++       /* Use good old method to write zeros into the journal file
++          perhaps very inefficient yet working. */
++       char *buf = alloca(sizeof(uint64_t));
++       off_t oldpos = lseek(fd, 0, SEEK_CUR);
++       bzero(buf, sizeof(uint64_t));
++       lseek(fd, 0, SEEK_SET);
++       r = write(fd, buf, sizeof(uint64_t));
++       lseek(fd, oldpos, SEEK_SET);
++#endif /* HAVE_POSIX_FALLOCATE */
++       if (r < 0) {
+                 log_error_errno(errno, "Failed to allocate sequential number file, ignoring: %m");
+                 return 0;
+         }
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd_218.bb b/meta/recipes-core/systemd/systemd_218.bb
new file mode 100644
index 0000000..9f9dbb0
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd_218.bb
@@ -0,0 +1,1251 @@
+SUMMARY = "System and service manager for Linux, replacing SysVinit"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
+
+LICENSE = "GPLv2 & LGPLv2.1 & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
+                    file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
+                    file://LICENSE.MIT;md5=544799d0b492f119fa04641d1b8868ed"
+
+PE = "1"
+
+DEPENDS = "docbook-sgml-dtd-4.1-native intltool-native gperf-native libcap qemu-native curl glibc"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+SECTION = "base/shell"
+
+inherit gtk-doc pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext
+
+SRCREV = "820aced6f6067a6b7c57b7d36e44f64378870cbf"
+
+PV = "218+git${SRCPV}"
+
+SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=git \
+           file://systemd-pam-configure-check-uclibc.patch \
+           file://systemd-pam-fix-execvpe.patch \
+           file://systemd-pam-fix-mkostemp.patch \
+           file://systemd_218-pam-fix-fallocate.patch \
+           file://optional_secure_getenv.patch \
+           file://uclibc-get-physmem.patch \
+           file://0001-add-support-for-executing-scripts-under-etc-systemd-218.patch \
+           file://0001-systemd-user-avoid-using-system-auth.patch \
+           file://touchscreen.rules \
+           file://00-create-volatile.conf \
+           file://init \
+           file://run-ptest \
+          "
+
+S = "${WORKDIR}/git"
+
+SRC_URI_append_libc-uclibc = "\
+                             file://systemd-pam-fix-getty-unit.patch \
+                            "
+LDFLAGS_append_libc-uclibc = " -lrt"
+
+GTKDOC_DOCDIR = "${S}/docs/"
+
+# regardless of PACKAGECONFIG, libgcrypt is always required to expand
+# the AM_PATH_LIBGCRYPT autoconf macro
+DEPENDS += "libgcrypt"
+
+PACKAGECONFIG ??= "acl blkid efi kmod gcrypt lz4 xz libidn"
+
+PACKAGECONFIG[glib] = "--enable-gudev,--disable-gudev,glib-2.0"
+
+
+########################################################################
+# Highly Recommended Section
+########################################################################
+
+# ACL (Access Control List), see http://savannah.nongnu.org/projects/acl
+# used by systemd, journald and logind to provide fine grained access to files.
+# NOTE: do not remove unless you know what you are doing.
+PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
+
+# blkid from util-linux to read block devices, see ftp://ftp.kernel.org/pub/linux/utils/util-linux
+# required to:
+#  - discover and mount GPT partitions as /, /home and /srv based on GUIDs.
+#  - nspawn to locate partitions
+#  - udev to probe and use block devices
+# NOTE: do not remove unless you know what you are doing.
+PACKAGECONFIG[blkid] = "--enable-blkid,--disable-blkid,util-linux"
+
+# EFI support in systemd and udev, includes discovery and mount of partitions and efivars.
+# NOTE: do not remove unless you know what you are doing.
+PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
+
+# kmod to load kernel modules, provides modprobe, insmod et al, see https://www.kernel.org/pub/linux/utils/kernel/kmod/
+# required to:
+#  - let systemd load required modules automatically (ipv6, unix, kdbus...)
+#  - let udev load modules for devices (hotplug and coldplug) using a built-in
+# NOTE: do not remove unless you know what you are doing.
+PACKAGECONFIG[kmod] = "--enable-kmod,--disable-kmod,kmod"
+
+# D-Bus policy and authentication framework, see http://www.freedesktop.org/wiki/Software/polkit/
+# WARN: no package "polkit" in poky
+PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,,polkit"
+
+
+########################################################################
+# Security Section
+########################################################################
+
+# SELinux (Security Enhanced Linux), see http://selinuxproject.org/page/Main_Page
+# WARN: no package "libselinux" in poky
+PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
+
+# See http://people.redhat.com/sgrubb/audit/
+# WARN: no package "libaudit" in poky
+PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,libaudit"
+
+# SMACK (Simplified Mandatory Access Control Kernel), see http://schaufler-ca.com/
+# needs Kernel CONFIG_SECURITY_SMACK and /etc/smack/accesses.d/ to be useful, otherwise is unused.
+PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
+
+# IMA (Integrity Measurement Architecture) setup, see http://linux-ima.sourceforge.net/
+# needs Kernel CONFIG_IMA and /etc/ima/ima-policy to be useful, otherwise is unused.
+PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
+
+# AppArmor, proactively protects the operating system and applications
+# from external or internal threats, even zero-day attacks, by
+# enforcing good behavior and preventing even unknown application flaws
+# from being exploited. See http://wiki.apparmor.net/index.php/Main_Page
+# needs Kernel CONFIG_SECURITY_APPARMOR to be useful, otherwise is unused.
+# WARN: no package "libapparmor" in poky
+PACKAGECONFIG[apparmor] = "--enable-apparmor,--disable-apparmor,libapparmor"
+
+# SECCOMP provides syscall filtering and sandboxing, see http://sourceforge.net/projects/libseccomp/
+# It is used by browsers to implement their plugins.
+# systemd will allow restricting the syscalls available to an application with a line like below
+# in [Service] block:
+#    SystemCallFilter=brk mmap access open fstat close read fstat mprotect arch_prctl munmap write
+# needs Kernel CONFIG_SECCOMP, CONFIG_SECCOMP_FILTER and CONFIG_HAVE_ARCH_SECCOMP_FILTER to be useful.
+# WARN: no package "libseccomp" in poky
+PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
+
+
+########################################################################
+# Journal Section
+########################################################################
+
+# extract ELF symbols and store the stack trace along the coredump
+PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils (>= 0.158)"
+
+# Sign the journal for anti-tampering
+PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
+
+# Compress the journal (and coredumps stored in the journal) using lz4
+PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
+
+# Compress the journal (and coredumps stored in the journal) using xz (lzma)
+# xz has lower priority than lz4 for compression, but having both may help to extract and decompress
+# journal entries generated in other systems.
+PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
+
+# when generating gcrypt verification keys (journalctl --setup-keys), output the secret
+# as QR code so it can be easily scanned by a phone or systems with digital camera and QR scanner.
+# WARN: no package "libqrencode" in poky
+PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,libqrencode"
+
+
+########################################################################
+# Resolve Daemon Section
+########################################################################
+
+# IDN (Internationalized Domain Name) see http://www.gnu.org/software/libidn/
+PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
+
+CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill"
+
+# Helper variables to clarify locations.  This mirrors the logic in systemd's
+# build system.
+rootprefix ?= "${base_prefix}"
+rootlibdir ?= "${base_libdir}"
+rootlibexecdir = "${rootprefix}/lib"
+
+EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
+                 --with-rootlibdir=${rootlibdir} \
+                 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
+                 --disable-manpages \
+                 --disable-introspection \
+                 --disable-kdbus \
+                 --disable-terminal \
+                 --enable-split-usr \
+                 --without-python \
+                 --enable-libcurl \
+                 --enable-coredump \
+                 --enable-ldconfig \
+                 --enable-backlight \
+                 --enable-binfmt \
+                 --enable-bootchart \
+                 --enable-firstboot \
+                 --enable-hostnamed \
+                 --enable-localed \
+                 --enable-logind \
+                 --enable-machined \
+                 --enable-networkd \
+                 --enable-quotacheck \
+                 --enable-randomseed \
+                 --enable-resolved \
+                 --enable-rfkill \
+                 --enable-sysusers \
+                 --enable-vconsole \
+                 --with-sysvrcnd-path=${sysconfdir} \
+                 ac_cv_path_KILL=${base_bindir}/kill \
+               "
+
+# uclibc does not have NSS
+EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
+
+do_configure_prepend() {
+	export CPP="${HOST_PREFIX}cpp ${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}"
+	export NM="${HOST_PREFIX}gcc-nm"
+	export AR="${HOST_PREFIX}gcc-ar"
+	export RANLIB="${HOST_PREFIX}gcc-ranlib"
+	export KMOD="${base_bindir}/kmod"
+	if [ -d ${S}/units.pre_sed ] ; then
+		cp -r ${S}/units.pre_sed ${S}/units
+	else
+		cp -r ${S}/units ${S}/units.pre_sed
+	fi
+	sed -i -e 's:=/root:=${ROOT_HOME}:g' ${S}/units/*.service*
+	sed -i '/ln --relative --help/d' ${S}/configure.ac
+	sed -i -e 's:\$(LN_S) --relative -f:lnr:g' ${S}/Makefile.am
+	sed -i -e 's:\$(LN_S) --relative:lnr:g' ${S}/Makefile.am
+}
+
+do_install() {
+	autotools_do_install
+	install -d ${D}/${base_sbindir}
+
+	# Provide support for initramfs
+	[ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
+	[ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
+
+	# Create machine-id
+	# 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
+	touch ${D}${sysconfdir}/machine-id
+
+	install -m 0644 ${WORKDIR}/*.rules ${D}${rootlibexecdir}/udev/rules.d/
+
+	install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${exec_prefix}/lib/tmpfiles.d/
+
+	if ${@bb.utils.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
+		sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
+	fi
+
+	# Move libgudev back to ${rootlibdir} to keep backward compatibility
+	if ${@bb.utils.contains('PACKAGECONFIG','glib','true','false',d)}; then
+		if [ ${rootlibdir} != ${exec_prefix}/lib ]; then
+			mv -t ${D}${rootlibdir} ${D}${exec_prefix}/lib/libgudev*
+		fi
+	fi
+
+        # Delete journal README, as log can be symlinked inside volatile.
+        rm -f ${D}/${localstatedir}/log/README
+}
+
+do_install_ptest () {
+       install -d ${D}${PTEST_PATH}/test
+       cp -rf ${S}/test/* ${D}${PTEST_PATH}/test
+       install -m 0755  ${B}/test-udev ${D}${PTEST_PATH}/
+       install -d ${D}${PTEST_PATH}/build-aux
+       cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
+       cp -rf ${B}/rules ${D}${PTEST_PATH}/
+       # This directory needs to be there for udev-test.pl to work.
+       install -d ${D}${libdir}/udev/rules.d
+       cp ${B}/Makefile ${D}${PTEST_PATH}/
+       cp ${S}/test/sys.tar.xz ${D}${PTEST_PATH}/test
+       sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/test/udev-test.pl
+       sed -i 's#${S}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile
+       sed -i 's#${B}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile
+}
+
+python populate_packages_prepend (){
+    systemdlibdir = d.getVar("rootlibdir", True)
+    do_split_packages(d, systemdlibdir, '^lib(udev|gudev|systemd|nss)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
+}
+PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd|nss).*"
+
+########################################################################
+# Base Packages
+########################################################################
+
+PACKAGES =+ "${PN}-generators-filesystems"
+SUMMARY_${PN}-generators-filesystems = "systemd's generator for filesystem services based on fstab and GPT"
+RDEPENDS_${PN}-generators-filesystems = "${PN}-services-fsck"
+FILES_${PN}-generators-filesystems = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-fstab-generator \
+        ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
+        ${rootlibexecdir}/systemd/systemd-remount-fs \
+        ${systemd_unitdir}/system/local-fs.target.wants/systemd-remount-fs.service \
+        ${systemd_unitdir}/system/systemd-remount-fs.service \
+"
+
+PACKAGES =+ "${PN}-generators-getty"
+SUMMARY_${PN}-generators-getty = "systemd's generator TTY services"
+RDEPENDS_${PN}-generators-getty = "${PN}-services-getty"
+FILES_${PN}-generators-getty = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-getty-generator \
+"
+
+PACKAGES =+ "${PN}-tools"
+SUMMARY_${PN}-tools = "systemd command line tools (cgls, delta, run, analyze...)"
+RRECOMMENDS_${PN}-tools = "${PN}-services-base"
+FILES_${PN}-tools = "\
+        ${base_bindir}/systemd-machine-id-setup \
+        ${bindir}/busctl \
+        ${bindir}/coredumpctl \
+        ${bindir}/systemd-analyze \
+        ${bindir}/systemd-cat \
+        ${bindir}/systemd-cgls \
+        ${bindir}/systemd-cgtop \
+        ${bindir}/systemd-delta \
+        ${bindir}/systemd-detect-virt \
+        ${bindir}/systemd-path \
+        ${bindir}/systemd-run \
+        ${rootlibexecdir}/systemd/systemd-ac-power \
+        ${rootlibexecdir}/systemd/systemd-activate \
+        ${rootlibexecdir}/systemd/systemd-reply-password \
+        ${rootprefix}/bin/systemd-escape \
+        ${rootprefix}/bin/systemd-notify \
+"
+
+########################################################################
+# Services Packages
+########################################################################
+
+PACKAGES =+ "${PN}-services-ask-password"
+SUMMARY_${PN}-services-ask-password = "systemd's service and tool to query the user for a system password"
+RRECOMMENDS_${PN}-services-ask-password = "${PN}-services-base"
+FILES_${PN}-services-ask-password = "\
+        ${rootprefix}/bin/systemd-ask-password \
+        ${rootprefix}/bin/systemd-tty-ask-password-agent \
+        ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
+        ${systemd_unitdir}/system/systemd-ask-password-console.path \
+        ${systemd_unitdir}/system/systemd-ask-password-console.service \
+        ${systemd_unitdir}/system/systemd-ask-password-wall.path \
+        ${systemd_unitdir}/system/systemd-ask-password-wall.service \
+"
+
+PACKAGES =+ "${PN}-services-backlight"
+SUMMARY_${PN}-services-backlight = "systemd's backlight state save/restore service"
+FILES_${PN}-services-backlight = "\
+        ${systemd_unitdir}/system/systemd-backlight@.service \
+        ${rootlibexecdir}/systemd/systemd-backlight \
+"
+
+PACKAGES =+ "${PN}-services-binfmt"
+SUMMARY_${PN}-services-binfmt = "systemd's service to configure additional binary formats for executables"
+RRECOMMENDS_${PN}-services-binfmt = "kernel-module-binfmt-misc"
+FILES_${PN}-services-binfmt = "\
+        ${sysconfdir}/binfmt.d/ \
+        ${exec_prefix}/lib/binfmt.d/ \
+        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.automount \
+        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.mount \
+        ${systemd_unitdir}/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-binfmt.service \
+        ${systemd_unitdir}/system/systemd-binfmt.service \
+        ${rootlibexecdir}/systemd/systemd-binfmt \
+"
+
+PACKAGES =+ "${PN}-services-bootchart"
+SUMMARY_${PN}-services-bootchart = "systemd's boot performance service and graphing tool"
+CONFFILES_${PN}-services-bootchart = "${sysconfdir}/systemd/bootchart.conf"
+FILES_${PN}-services-bootchart = "\
+        ${sysconfdir}/systemd/bootchart.conf \
+        ${rootlibexecdir}/systemd/systemd-bootchart \
+"
+
+PACKAGES =+ "${PN}-services-coredump"
+SUMMARY_${PN}-services-coredump = "systemd's coredump log hook and service"
+RDEPENDS_${PN}-services-coredump = "${PN}-services-sysctl"
+CONFFILES_${PN}-services-coredump = "${sysconfdir}/systemd/coredump.conf"
+FILES_${PN}-services-coredump = "\
+        ${exec_prefix}/lib/sysctl.d/50-coredump.conf \
+        ${sysconfdir}/systemd/coredump.conf \
+        ${rootlibexecdir}/systemd/systemd-coredump \
+"
+
+PACKAGES =+ "${PN}-services-cryptsetup"
+SUMMARY_${PN}-services-cryptsetup = "systemd's disk decryption service"
+ALLOW_EMPTY_${PN}-services-cryptsetup = "1"
+FILES_${PN}-services-cryptsetup = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-cryptsetup-generator \
+        ${systemd_unitdir}/system/cryptsetup-pre.target \
+        ${systemd_unitdir}/system/cryptsetup.target \
+        ${systemd_unitdir}/system/sysinit.target.wants/cryptsetup.target \
+        ${rootlibexecdir}/systemd/systemd-cryptsetup \
+"
+
+PACKAGES =+ "${PN}-services-dbus"
+SUMMARY_${PN}-services-dbus = "systemd's DBus daemon system service"
+# NOTE: dbus dependency will go away when kdbus is in use
+RDEPENDS_${PN}-services-dbus = "dbus"
+FILES_${PN}-services-dbus = "\
+        ${datadir}/dbus-1/services/org.freedesktop.systemd1.service \
+        ${datadir}/dbus-1/system-services/org.freedesktop.systemd1.service \
+        ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
+        ${systemd_unitdir}/system/sockets.target.wants/dbus.socket \
+        ${systemd_unitdir}/system/dbus.target.wants/dbus.socket \
+        ${systemd_unitdir}/system/multi-user.target.wants/dbus.service \
+        ${systemd_unitdir}/system/dbus.socket \
+        ${systemd_unitdir}/system/dbus.service \
+"
+
+PACKAGES =+ "${PN}-services-debug"
+SUMMARY_${PN}-services-debug = "systemd's debug service"
+RRECOMMENDS_${PN}-services-debug = "${PN}-services-base ${PN}-tools"
+FILES_${PN}-services-debug = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-debug-generator \
+        ${systemd_unitdir}/system/debug-shell.service \
+        ${systemd_unitdir}/system/sys-kernel-config.mount \
+        ${systemd_unitdir}/system/sys-kernel-debug.mount \
+        ${systemd_unitdir}/system/sysinit.target.wants/sys-kernel-config.mount \
+        ${systemd_unitdir}/system/sysinit.target.wants/sys-kernel-debug.mount \
+"
+
+PACKAGES =+ "${PN}-services-firstboot"
+SUMMARY_${PN}-services-firstboot = "systemd's service to initialize basic system settings"
+FILES_${PN}-services-firstboot = "\
+        ${base_bindir}/systemd-firstboot \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-firstboot.service \
+        ${systemd_unitdir}/system/systemd-firstboot.service \
+"
+
+PACKAGES =+ "${PN}-services-fsck"
+SUMMARY_${PN}-services-fsck = "systemd's filesystem check service"
+RRECOMMENDS_${PN}-services-fsck = "util-linux-fsck e2fsprogs-e2fsck"
+FILES_${PN}-services-fsck = "\
+        ${systemd_unitdir}/system/systemd-fsck-root.service \
+        ${systemd_unitdir}/system/systemd-fsck@.service \
+        ${rootlibexecdir}/systemd/systemd-fsck \
+"
+
+PACKAGES =+ "${PN}-services-fuse"
+SUMMARY_${PN}-services-fuse = "systemd's FUSE (filesystem in userspace) service"
+FILES_${PN}-services-fuse = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/sys-fs-fuse-connections.mount \
+        ${systemd_unitdir}/system/sys-fs-fuse-connections.mount \
+"
+
+PACKAGES =+ "${PN}-services-getty"
+SUMMARY_${PN}-services-getty = "systemd's getty service"
+RRECOMMENDS_${PN}-services-getty = "util-linux-agetty ${PN}-generators-getty"
+FILES_${PN}-services-getty = "\
+        ${systemd_unitdir}/system/autovt@.service \
+        ${systemd_unitdir}/system/console-getty.service \
+        ${systemd_unitdir}/system/container-getty@.service \
+        ${systemd_unitdir}/system/getty@.service \
+        ${systemd_unitdir}/system/serial-getty@.service \
+        ${sysconfdir}/systemd/system/getty.target.wants/ \
+"
+
+PACKAGES =+ "${PN}-services-hostnamed"
+SUMMARY_${PN}-services-hostnamed = "systemd's hostname management service"
+RDEPENDS_${PN}-services-hostnamed = "${PN}-services-dbus"
+CONFFILES_${PN}-services-hostnamed = "${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf"
+FILES_${PN}-services-hostnamed = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
+        ${bindir}/hostnamectl \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.hostname1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.hostname1.service \
+        ${systemd_unitdir}/system/org.freedesktop.hostname1.busname \
+        ${systemd_unitdir}/system/systemd-hostnamed.service \
+        ${rootlibexecdir}/systemd/systemd-hostnamed \
+        ${datadir}/dbus-1/system-services/org.freedesktop.hostname1.service \
+        ${datadir}/polkit-1/actions/org.freedesktop.hostname1.policy \
+"
+
+PACKAGES =+ "${PN}-services-journal"
+SUMMARY_${PN}-services-journal = "systemd's journal (logging) service"
+CONFFILES_${PN}-services-journal = "${sysconfdir}/systemd/journald.conf"
+FILES_${PN}-services-journal = "\
+        ${base_bindir}/journalctl \
+        ${rootlibexecdir}/systemd/systemd-journald \
+        ${sysconfdir}/systemd/journald.conf \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-journald-dev-log.socket \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-journald.socket \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journal-catalog-update.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journal-flush.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journald.service \
+        ${systemd_unitdir}/system/systemd-journal-catalog-update.service \
+        ${systemd_unitdir}/system/systemd-journal-flush.service \
+        ${systemd_unitdir}/system/systemd-journald-dev-log.socket \
+        ${systemd_unitdir}/system/systemd-journald.service \
+        ${systemd_unitdir}/system/systemd-journald.socket \
+        ${exec_prefix}/lib/systemd/catalog/ \
+"
+
+
+PACKAGES =+ "${PN}-services-journal-remote"
+SUMMARY_${PN}-services-journal-remote = "systemd's service and tools to receive journal messages over the network"
+RDEPENDS_${PN}-services-journal-remote = "${PN}-services-journal"
+# NOTE: if no sysusers or tmpfiles, then users/groups and FS structure must be setup
+RRECOMMENDS_${PN}-services-journal-remote = "${PN}-services-sysusers ${PN}-services-tmpfiles"
+CONFFILES_${PN}-services-journal-remote = "${sysconfdir}/systemd/journald-remote.conf"
+FILES_${PN}-services-journal-remote = "\
+        ${exec_prefix}/lib/sysusers.d/systemd-remote.conf \
+        ${exec_prefix}/lib/tmpfiles.d/systemd-remote.conf \
+        ${rootlibexecdir}/systemd/systemd-journal-remote \
+        ${sysconfdir}/systemd/journal-remote.conf \
+"
+
+PACKAGES =+ "${PN}-services-journal-upload"
+SUMMARY_${PN}-services-journal-upload = "systemd's service and tools to send journal messages over the network"
+RDEPENDS_${PN}-services-journal-upload = "${PN}-services-journal"
+# NOTE: if no sysusers, then users/groups must be setup
+RRECOMMENDS_${PN}-services-journal-upload = "${PN}-services-sysusers"
+CONFFILES_${PN}-services-journal-upload = "${sysconfdir}/systemd/journald-upload.conf"
+FILES_${PN}-services-journal-upload = "\
+        ${rootlibexecdir}/systemd/systemd-journal-upload \
+        ${sysconfdir}/systemd/journal-upload.conf \
+        ${systemd_unitdir}/system/systemd-journal-upload.service \
+"
+
+PACKAGES =+ "${PN}-services-ldconfig"
+SUMMARY_${PN}-services-ldconfig = "systemd's service to run ldconfig after updates"
+FILES_${PN}-services-ldconfig = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/ldconfig.service \
+        ${systemd_unitdir}/system/ldconfig.service \
+"
+
+PACKAGES =+ "${PN}-services-localed"
+SUMMARY_${PN}-services-localed = "systemd's locale management service"
+RDEPENDS_${PN}-services-localed = "${PN}-services-dbus"
+CONFFILES_${PN}-services-localed = "${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf"
+FILES_${PN}-services-localed = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf \
+        ${bindir}/localectl \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.locale1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.locale1.service \
+        ${systemd_unitdir}/system/org.freedesktop.locale1.busname \
+        ${systemd_unitdir}/system/systemd-localed.service \
+        ${rootlibexecdir}/systemd/systemd-localed \
+        ${datadir}/dbus-1/system-services/org.freedesktop.locale1.service \
+        ${datadir}/polkit-1/actions/org.freedesktop.locale1.policy \
+        ${datadir}/systemd/kbd-model-map \
+"
+
+PACKAGES =+ "${PN}-services-logind"
+SUMMARY_${PN}-services-logind = "systemd's login management service"
+RDEPENDS_${PN}-services-logind = "${PN}-services-dbus ${PN}-services-tmpfiles"
+RRECOMMENDS_${PN}-services-logind = "udev"
+CONFFILES_${PN}-services-logind = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf \
+        ${sysconfdir}/systemd/logind.conf \
+"
+FILES_${PN}-services-logind = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf \
+        ${sysconfdir}/systemd/logind.conf \
+        ${base_bindir}/loginctl \
+        ${base_bindir}/systemd-inhibit \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.login1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.login1.service \
+        ${systemd_unitdir}/system/multi-user.target.wants/systemd-logind.service \
+        ${systemd_unitdir}/system/multi-user.target.wants/systemd-user-sessions.service \
+        ${systemd_unitdir}/system/org.freedesktop.login1.busname \
+        ${systemd_unitdir}/system/systemd-logind.service \
+        ${systemd_unitdir}/system/systemd-user-sessions.service \
+        ${systemd_unitdir}/system/user@.service \
+        ${rootlibexecdir}/systemd/systemd-logind \
+        ${rootlibexecdir}/systemd/systemd-user-sessions \
+        ${datadir}/dbus-1/system-services/org.freedesktop.login1.service \
+        ${datadir}/polkit-1/actions/org.freedesktop.login1.policy \
+        ${rootlibexecdir}/udev/rules.d/70-uaccess.rules \
+        ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
+        ${rootlibexecdir}/udev/rules.d/71-seat.rules \
+        ${rootlibexecdir}/udev/rules.d/73-seat-late.rules \
+"
+
+PACKAGES =+ "${PN}-services-machined"
+SUMMARY_${PN}-services-machined = "systemd's virtual machine and container management service"
+RDEPENDS_${PN}-services-machined = "${PN}-services-dbus"
+CONFFILES_${PN}-services-machined = "${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf"
+FILES_${PN}-services-machined = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
+        ${base_bindir}/machinectl \
+        ${exec_prefix}/lib/libnss_mymachines.so.2 \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.machine1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.machine1.service \
+        ${systemd_unitdir}/system/machine.slice \
+        ${systemd_unitdir}/system/org.freedesktop.machine1.busname \
+        ${systemd_unitdir}/system/systemd-machined.service \
+        ${rootlibexecdir}/systemd/systemd-machined \
+        ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
+"
+
+PACKAGES =+ "${PN}-services-modules-load"
+SUMMARY_${PN}-services-modules-load = "systemd's kernel module loading service"
+FILES_${PN}-services-modules-load = "\
+        ${sysconfdir}/modules-load.d/ \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-modules-load.service \
+        ${systemd_unitdir}/system/systemd-modules-load.service \
+        ${rootlibexecdir}/systemd/systemd-modules-load \
+        ${exec_prefix}/lib/modules-load.d \
+"
+
+PACKAGES =+ "${PN}-services-modules-static-nodes"
+SUMMARY_${PN}-services-modules-static-nodes = "systemd's kernel module static nodes creation service"
+RDEPENDS_${PN}-services-modules-static-nodes = "kmod ${PN}-services-tmpfiles"
+FILES_${PN}-services-modules-static-nodes = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/kmod-static-nodes.service \
+        ${systemd_unitdir}/system/kmod-static-nodes.service \
+"
+
+
+PACKAGES =+ "${PN}-services-multi-seat-x"
+SUMMARY_${PN}-services-multi-seat-x = "systemd's X11 multi-seat support service"
+RDEPENDS_${PN}-services-multi-seat-x = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/xserver', '', d)}"
+FILES_${PN}-services-multi-seat-x = "\
+        ${rootlibexecdir}/systemd/systemd-multi-seat-x \
+"
+
+PACKAGES =+ "${PN}-services-networkd"
+SUMMARY_${PN}-services-networkd = "systemd's network management (static, DHCP, bridge...) service"
+# NOTE: if no sysusers, then users/groups must be setup
+RRECOMMENDS_${PN}-services-networkd = "${PN}-services-sysusers"
+FILES_${PN}-services-networkd = "\
+        ${sysconfdir}/systemd/network/ \
+        ${sysconfdir}/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service \
+        ${sysconfdir}/systemd/system/multi-user.target.wants/systemd-networkd.service \
+        ${base_bindir}/networkctl \
+        ${rootlibexecdir}/systemd/network/80-container-host0.network \
+        ${rootlibexecdir}/systemd/network/80-container-ve.network \
+        ${rootlibexecdir}/systemd/network/99-default.link \
+        ${systemd_unitdir}/system/systemd-networkd-wait-online.service \
+        ${systemd_unitdir}/system/systemd-networkd.service \
+        ${rootlibexecdir}/systemd/systemd-networkd \
+        ${rootlibexecdir}/systemd/systemd-networkd-wait-online \
+        ${exec_prefix}/lib/systemd/network \
+"
+
+PACKAGES =+ "${PN}-services-nspawn"
+SUMMARY_${PN}-services-nspawn = "systemd's namespace spawing service and tool"
+FILES_${PN}-services-nspawn = "\
+        ${systemd_unitdir}/system/systemd-nspawn@.service \
+        ${bindir}/systemd-nspawn \
+"
+
+PACKAGES =+ "${PN}-services-quota"
+SUMMARY_${PN}-services-quota = "systemd's file system quota enable and check service"
+RDEPENDS_${PN}-services-quota = "quota"
+FILES_${PN}-services-quota = "\
+        ${systemd_unitdir}/system/quotaon.service \
+        ${systemd_unitdir}/system/systemd-quotacheck.service \
+        ${rootlibexecdir}/systemd/systemd-quotacheck \
+"
+
+PACKAGES =+ "${PN}-services-randomseed"
+SUMMARY_${PN}-services-randomseed = "systemd's random seed save/restore service"
+FILES_${PN}-services-randomseed = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-random-seed.service \
+        ${systemd_unitdir}/system/systemd-random-seed.service \
+        ${rootlibexecdir}/systemd/systemd-random-seed \
+"
+
+PACKAGES =+ "${PN}-services-readahead"
+SUMMARY_${PN}-services-readahead = "systemd's disk read ahead service"
+FILES_${PN}-services-readahead = "\
+        ${systemd_unitdir}/system/systemd-readahead-collect.service \
+        ${systemd_unitdir}/system/systemd-readahead-done.service \
+        ${systemd_unitdir}/system/systemd-readahead-done.timer \
+        ${systemd_unitdir}/system/systemd-readahead-drop.service \
+        ${systemd_unitdir}/system/systemd-readahead-replay.service \
+        ${rootlibexecdir}/systemd/systemd-readahead \
+"
+
+PACKAGES =+ "${PN}-services-resolved"
+SUMMARY_${PN}-services-resolved = "systemd's network name resolution management service"
+# NOTE: if no sysusers or tmpfiles, then users/groups and FS structure must be setup
+RRECOMMENDS_${PN}-services-resolved = "${PN}-services-dbus ${PN}-services-sysusers ${PN}-services-tmpfiles"
+CONFFILES_${PN}-services-resolved = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
+        ${sysconfdir}/systemd/resolved.conf \
+"
+FILES_${PN}-services-resolved = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
+        ${sysconfdir}/systemd/resolved.conf \
+        ${sysconfdir}/systemd/system/multi-user.target.wants/systemd-resolved.service \
+        ${exec_prefix}/lib/libnss_resolve.so.2 \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.resolve1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.resolve1.service \
+        ${systemd_unitdir}/system/org.freedesktop.resolve1.busname \
+        ${systemd_unitdir}/system/systemd-resolved.service \
+        ${rootlibexecdir}/systemd/systemd-resolve-host \
+        ${rootlibexecdir}/systemd/systemd-resolved \
+        ${datadir}/dbus-1/system-services/org.freedesktop.resolve1.service \
+"
+
+PACKAGES =+ "${PN}-services-rfkill"
+SUMMARY_${PN}-services-rfkill = "systemd's rfkill state save/restore service"
+FILES_${PN}-services-rfkill = "\
+        ${systemd_unitdir}/system/systemd-rfkill@.service \
+        ${rootlibexecdir}/systemd/systemd-rfkill \
+"
+
+PACKAGES =+ "${PN}-services-sleep"
+SUMMARY_${PN}-services-sleep = "systemd's sleep, suspend and hiberate services"
+FILES_${PN}-services-sleep = "\
+        ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
+        ${systemd_unitdir}/system/systemd-suspend.service \
+        ${systemd_unitdir}/system/systemd-hibernate.service \
+        ${systemd_unitdir}/system-sleep/ \
+        ${rootlibexecdir}/systemd/systemd-sleep \
+"
+
+PACKAGES =+ "${PN}-services-sysctl"
+SUMMARY_${PN}-services-sysctl = "systemd's kernel parameters configuration service"
+FILES_${PN}-services-sysctl = "\
+        ${sysconfdir}/sysctl.d/ \
+        ${exec_prefix}/lib/sysctl.d/ \
+        ${exec_prefix}/lib/sysctl.d/50-default.conf \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-sysctl.service \
+        ${systemd_unitdir}/system/systemd-sysctl.service \
+        ${rootlibexecdir}/systemd/systemd-sysctl \
+"
+
+PACKAGES =+ "${PN}-services-sysusers"
+SUMMARY_${PN}-services-sysusers = "systemd's service and tool to allocate system users and groups"
+FILES_${PN}-services-sysusers = "\
+        ${base_bindir}/systemd-sysusers \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-sysusers.service \
+        ${systemd_unitdir}/system/systemd-sysusers.service \
+        ${exec_prefix}/lib/sysusers.d/basic.conf \
+        ${exec_prefix}/lib/sysusers.d/systemd.conf \
+"
+
+PACKAGES =+ "${PN}-services-sysvcompat"
+SUMMARY_${PN}-services-sysvcompat = "systemd's SYSV legacy and compatibility service"
+# NOTE: if no sysusers or tmpfiles, then users/groups and FS structure must be setup
+RRECOMMENDS_${PN}-services-sysvcompat = "${PN}-services-sysusers ${PN}-services-tmpfiles"
+FILES_${PN}-services-sysvcompat = "\
+        ${rootlibexecdir}/systemd/systemd-bus-proxyd \
+        ${rootlibexecdir}/systemd/systemd-socket-proxyd \
+        ${bindir}/systemd-stdio-bridge \
+        ${rootlibexecdir}/systemd/system-generators/systemd-rc-local-generator \
+        ${rootlibexecdir}/systemd/system-generators/systemd-sysv-generator \
+        ${rootlibexecdir}/systemd/systemd-initctl \
+        ${rootlibexecdir}/systemd/systemd-update-utmp \
+        ${systemd_unitdir}/system/halt-local.service \
+        ${systemd_unitdir}/system/rc-local.service \
+        ${systemd_unitdir}/system/runlevel1.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/runlevel2.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/runlevel3.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/runlevel4.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/runlevel5.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-update-utmp.service \
+        ${systemd_unitdir}/system/systemd-initctl.service \
+        ${systemd_unitdir}/system/systemd-initctl.socket \
+        ${systemd_unitdir}/system/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/systemd-update-utmp.service \
+        ${exec_prefix}/lib/tmpfiles.d/legacy.conf \
+"
+
+PACKAGES =+ "${PN}-services-timedated"
+SUMMARY_${PN}-services-timedated = "systemd's time and date management service"
+RDEPENDS_${PN}-services-timedated = "${PN}-services-dbus"
+CONFFILES_${PN}-services-timedated = "${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf"
+FILES_${PN}-services-timedated = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
+        ${bindir}/timedatectl \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.timedate1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.timedate1.service \
+        ${systemd_unitdir}/system/org.freedesktop.timedate1.busname \
+        ${systemd_unitdir}/system/systemd-timedated.service \
+        ${rootlibexecdir}/systemd/systemd-timedated \
+        ${datadir}/dbus-1/system-services/org.freedesktop.timedate1.service \
+        ${datadir}/polkit-1/actions/org.freedesktop.timedate1.policy \
+"
+
+PACKAGES =+ "${PN}-services-timesyncd"
+SUMMARY_${PN}-services-timesyncd = "systemd's NTP sync service"
+# NOTE: if no sysusers, then users/groups must be setup
+RRECOMMENDS_${PN}-services-timesyncd = "${PN}-services-sysusers"
+CONFFILES_${PN}-services-timesyncd = "${sysconfdir}/systemd/timesyncd.conf"
+FILES_${PN}-services-timesyncd = "\
+        ${sysconfdir}/systemd/system/sysinit.target.wants/systemd-timesyncd.service \
+        ${sysconfdir}/systemd/timesyncd.conf \
+        ${systemd_unitdir}/system/systemd-timesyncd.service \
+        ${rootlibexecdir}/systemd/systemd-timesyncd \
+"
+
+PACKAGES =+ "${PN}-services-tmpfiles"
+SUMMARY_${PN}-services-tmpfiles = "systemd's service to create, delete and clean up volatile/tmp files/dirs"
+FILES_${PN}-services-tmpfiles = "\
+        ${sysconfdir}/tmpfiles.d/ \
+        ${base_bindir}/systemd-tmpfiles \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-tmpfiles-setup.service \
+        ${systemd_unitdir}/system/systemd-tmpfiles-clean.service \
+        ${systemd_unitdir}/system/systemd-tmpfiles-clean.timer \
+        ${systemd_unitdir}/system/systemd-tmpfiles-setup-dev.service \
+        ${systemd_unitdir}/system/systemd-tmpfiles-setup.service \
+        ${systemd_unitdir}/system/timers.target.wants/systemd-tmpfiles-clean.timer \
+        ${exec_prefix}/lib/tmpfiles.d/etc.conf \
+        ${exec_prefix}/lib/tmpfiles.d/systemd-nologin.conf \
+        ${exec_prefix}/lib/tmpfiles.d/systemd.conf \
+        ${exec_prefix}/lib/tmpfiles.d/tmp.conf \
+        ${exec_prefix}/lib/tmpfiles.d/var.conf \
+        ${exec_prefix}/lib/tmpfiles.d/00-create-volatile.conf \
+        ${exec_prefix}/lib/tmpfiles.d/x11.conf \
+"
+
+PACKAGES =+ "${PN}-services-udev"
+SUMMARY_${PN}-services-udev = "systemd's udev services"
+RDEPENDS_${PN}-services-udev = "udev"
+FILES_${PN}-services-udev = "\
+        ${systemd_unitdir}/system/initrd-udevadm-cleanup-db.service \
+        ${systemd_unitdir}/system/systemd-udev-hwdb-update.service \
+        ${systemd_unitdir}/system/systemd-udev-settle.service \
+        ${systemd_unitdir}/system/systemd-udev-trigger.service \
+        ${systemd_unitdir}/system/systemd-udevd-control.socket \
+        ${systemd_unitdir}/system/systemd-udevd-kernel.socket \
+        ${systemd_unitdir}/system/systemd-udevd.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udevd.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udev-trigger.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udev-hwdb-update.service \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-udevd-kernel.socket \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-udevd-control.socket \
+"
+
+PACKAGES =+ "${PN}-services-update"
+SUMMARY_${PN}-services-update = "systemd's post update service"
+FILES_${PN}-services-update = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-system-update-generator \
+        ${rootlibexecdir}/systemd/systemd-update-done \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-update-done.service \
+        ${systemd_unitdir}/system/systemd-update-done.service \
+"
+
+PACKAGES =+ "${PN}-services-vconsole"
+SUMMARY_${PN}-services-vconsole = "systemd's service to configure the virtual console (keyboard/font)"
+RDEPENDS_${PN}-services-vconsole = "kbd kbd-consolefonts kbd-keymaps"
+FILES_${PN}-services-vconsole = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service \
+        ${systemd_unitdir}/system/systemd-vconsole-setup.service \
+        ${rootlibexecdir}/systemd/systemd-vconsole-setup \
+"
+
+########################################################################
+# Standard BitBake Packages
+########################################################################
+
+FILES_${PN}-dbg += "\
+        ${base_libdir}/security/.debug/ \
+        ${libdir}/systemd/ptest/.debug \
+        ${rootlibdir}/.debug \
+        ${systemd_unitdir}/*/.debug \
+        ${systemd_unitdir}/.debug \
+"
+
+FILES_${PN}-dev += "\
+        ${base_libdir}/security/*.la \
+        ${datadir}/dbus-1/interfaces/ \
+"
+
+# The test cases need perl and bash to run correctly.
+RDEPENDS_${PN}-ptest += "perl bash"
+FILES_${PN}-ptest += "\
+        ${libdir}/udev/rules.d \
+"
+
+########################################################################
+# Misc Packages
+########################################################################
+
+PACKAGES =+ "${PN}-bash"
+SUMMARY_${PN}-bash = "systemd bash shell commands completion"
+FILES_${PN}-bash = "\
+        ${datadir}/bash-completion/completions/bootctl \
+        ${datadir}/bash-completion/completions/busctl \
+        ${datadir}/bash-completion/completions/coredumpctl \
+        ${datadir}/bash-completion/completions/hostnamectl \
+        ${datadir}/bash-completion/completions/journalctl \
+        ${datadir}/bash-completion/completions/kernel-install \
+        ${datadir}/bash-completion/completions/localectl \
+        ${datadir}/bash-completion/completions/loginctl \
+        ${datadir}/bash-completion/completions/machinectl \
+        ${datadir}/bash-completion/completions/systemctl \
+        ${datadir}/bash-completion/completions/systemd-* \
+        ${datadir}/bash-completion/completions/timedatectl \
+"
+
+PACKAGES =+ "${PN}-initramfs"
+SUMMARY_${PN}-initramfs = "systemd's initramfs support"
+FILES_${PN}-initramfs = "/init"
+RDEPENDS_${PN}-initramfs = "${PN}"
+
+PACKAGES =+ "${PN}-kernel-install"
+SUMMARY_${PN}-kernel-install = "systemd tool to add/remove kernel and initramfs images to/from /boot"
+RDEPENDS_${PN}-kernel-install = "bash kmod"
+FILES_${PN}-kernel-install = "\
+        ${bindir}/kernel-install \
+        ${sysconfdir}/kernel/install.d/ \
+        ${exec_prefix}/lib/kernel/install.d/ \
+"
+
+PACKAGES =+ "${PN}-pam"
+SUMMARY_${PN}-pam = "systemd PAM modules and configuration"
+FILES_${PN}-pam = "\
+        ${sysconfdir}/pam.d \
+        ${base_libdir}/security/pam_systemd.so \
+"
+
+PACKAGES =+ "${PN}-preset"
+SUMMARY_${PN}-preset = "systemd's service enablement presets"
+FILES_${PN}-preset = "${systemd_unitdir}/system-preset/90-systemd.preset"
+
+PACKAGES =+ "${PN}-rpm-macros"
+SUMMARY_${PN}-rpm-macros = "systemd RPM macros"
+FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm/macros.d/macros.systemd"
+
+PACKAGES =+ "${PN}-zsh"
+SUMMARY_${PN}-zsh = "systemd zsh shell commands completion"
+FILES_${PN}-zsh = "\
+        ${datadir}/zsh/site-functions/_bootctl \
+        ${datadir}/zsh/site-functions/_busctl \
+        ${datadir}/zsh/site-functions/_coredumpctl \
+        ${datadir}/zsh/site-functions/_hostnamectl \
+        ${datadir}/zsh/site-functions/_journalctl \
+        ${datadir}/zsh/site-functions/_kernel-install \
+        ${datadir}/zsh/site-functions/_localectl \
+        ${datadir}/zsh/site-functions/_loginctl \
+        ${datadir}/zsh/site-functions/_machinectl \
+        ${datadir}/zsh/site-functions/_sd_* \
+        ${datadir}/zsh/site-functions/_systemctl \
+        ${datadir}/zsh/site-functions/_systemd \
+        ${datadir}/zsh/site-functions/_systemd-* \
+        ${datadir}/zsh/site-functions/_timedatectl \
+"
+
+
+########################################################################
+# Aggregation of Split Packages
+########################################################################
+
+PACKAGES =+ "${PN}-services-essential"
+SUMMARY_${PN}-services-essential = "systemd's essential services aggregation"
+ALLOW_EMPTY_${PN}-services-essential = "1"
+RDEPENDS_${PN}-services-essential = "\
+        ${PN}-generators-filesystems \
+        ${PN}-preset \
+        ${PN}-services-fsck \
+        ${PN}-services-journal \
+        ${PN}-services-modules-load \
+        ${PN}-services-randomseed \
+        ${PN}-services-sleep \
+        ${PN}-services-sysctl \
+        ${PN}-services-sysusers \
+        ${PN}-services-tmpfiles \
+        ${PN}-services-udev \
+        udev-rules-systemd \
+"
+
+PACKAGES =+ "${PN}-services-base"
+SUMMARY_${PN}-services-base = "systemd's base services aggregation"
+ALLOW_EMPTY_${PN}-services-base = "1"
+RDEPENDS_${PN}-services-base = "${PN}-services-essential \
+        ${PN}-services-ask-password \
+        ${PN}-services-backlight \
+        ${PN}-services-binfmt \
+        ${PN}-services-coredump \
+        ${PN}-services-dbus \
+        ${PN}-services-firstboot \
+        ${PN}-services-fuse \
+        ${PN}-services-hostnamed \
+        ${PN}-services-ldconfig \
+        ${PN}-services-localed \
+        ${PN}-services-logind \
+        ${PN}-services-networkd \
+        ${PN}-services-quota \
+        ${PN}-services-resolved \
+        ${PN}-services-rfkill \
+        ${PN}-services-timedated \
+        ${PN}-services-timesyncd \
+        ${PN}-services-update \
+        ${PN}-services-vconsole \
+"
+
+PACKAGES =+ "${PN}-services-all"
+SUMMARY_${PN}-services-all = "systemd's all services and tools aggregation"
+ALLOW_EMPTY_${PN}-services-all = "1"
+RDEPENDS_${PN}-services-all = "${PN}-services-base \
+        ${PN}-services-bootchart \
+        ${PN}-services-cryptsetup \
+        ${PN}-services-debug \
+        ${PN}-services-journal-remote \
+        ${PN}-services-journal-upload \
+        ${PN}-services-machined \
+        ${PN}-services-nspawn \
+        ${PN}-services-sysvcompat \
+        ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${PN}-services-multi-seat-x', '', d)} \
+        ${PN}-tools \
+"
+
+
+########################################################################
+# Core Package
+########################################################################
+
+CONFFILES_${PN} = "\
+        ${sysconfdir}/machine-id \
+        ${sysconfdir}/systemd/system.conf \
+        ${sysconfdir}/systemd/user.conf \
+"
+
+FILES_${PN} = "\
+        ${base_bindir}/systemctl \
+        ${base_bindir}/systemd-hwdb \
+        ${bindir}/bootctl \
+        ${datadir}/${BPN} \
+        ${datadir}/factory \
+        ${exec_prefix}/lib/libnss_myhostname* \
+        ${libdir}/systemd/user-generators/ \
+        ${libdir}/systemd/user/ \
+        ${localstatedir} \
+        ${rootlibexecdir}/systemd/systemd \
+        ${rootlibexecdir}/systemd/systemd-cgroups-agent \
+        ${rootlibexecdir}/systemd/systemd-shutdown \
+        ${rootlibexecdir}/systemd/systemd-shutdownd \
+        ${rootlibexecdir}/systemd/systemd-machine-id-commit \
+        ${rootlibexecdir}/systemd/systemd-hibernate-resume \
+        ${rootlibexecdir}/systemd/systemd-importd \
+        ${rootlibexecdir}/systemd/import-pubring.gpg \
+        ${rootlibexecdir}/systemd/systemd-pull \
+        ${sysconfdir}/init.d/README \
+        ${sysconfdir}/machine-id \
+        ${sysconfdir}/systemd/system.conf \
+        ${sysconfdir}/systemd/system/ \
+        ${sysconfdir}/systemd/user.conf \
+        ${sysconfdir}/systemd/user/ \
+        ${sysconfdir}/xdg/systemd/ \
+        ${systemd_unitdir}/system-generators/ \
+        ${systemd_unitdir}/system-preset/ \
+        ${systemd_unitdir}/system-shutdown/ \
+        ${systemd_unitdir}/system/ \
+"
+
+#RDEPENDS_${PN} += "volatile-binds"
+
+RRECOMMENDS_${PN} += "\
+        ${PN}-services-base \
+        ${PN}-services-essential \
+        ${PN}-generators-getty \
+        ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PN}-pam', '', d)} \
+        ${PN}-services-getty \
+        ${PN}-tools \
+        kernel-module-autofs4 \
+        kernel-module-ipv6 \
+        kernel-module-unix \
+        os-release \
+        udev (= ${EXTENDPKGV}) \
+        udev-hwdb \
+"
+
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
+
+ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
+ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
+ALTERNATIVE_PRIORITY[init] ?= "300"
+
+ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
+ALTERNATIVE_PRIORITY[halt] ?= "300"
+
+ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
+ALTERNATIVE_PRIORITY[reboot] ?= "300"
+
+ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
+ALTERNATIVE_PRIORITY[shutdown] ?= "300"
+
+ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
+ALTERNATIVE_PRIORITY[poweroff] ?= "300"
+
+ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
+ALTERNATIVE_PRIORITY[runlevel] ?= "300"
+
+
+########################################################################
+# UDEV Section
+########################################################################
+
+PACKAGES =+ "udev-dbg"
+SUMMARY_udev-dbg = "Dynamic device management - Debugging files"
+RRECOMMENDS_udev-dbg += "${PN}-dbg"
+FILES_udev-dbg = "\
+        ${rootlibexecdir}/udev/.debug \
+        ${base_sbindir}/.debug/udevd \
+        ${base_bindir}/.debug/udevadm \
+        ${rootlibexecdir}/systemd/.debug/systemd-udevd \
+        ${base_libdir}/.debug/libudev* \
+        ${base_libdir}/.debug/libgudev* \
+        ${exec_prefix}/lib/.debug/libgudev* \
+"
+
+PACKAGES =+ "udev-dev"
+SUMMARY_udev-dev = "Dynamic device management - Development files"
+RRECOMMENDS_udev-dev += "${PN}-dev"
+FILES_udev-dev = "\
+        ${datadir}/pkgconfig/*udev* \
+        ${libdir}/pkgconfig/*udev* \
+        ${libdir}/lib*udev*.la \
+        ${includedir}/*udev* \
+"
+
+PACKAGES =+ "udev-hwdb"
+SUMMARY_udev-hwdb = "Dynamic device management - Hardware database"
+RDEPENDS_udev-hwdb = "udev"
+FILES_udev-hwdb = "\
+        ${rootlibexecdir}/udev/hwdb.d/ \
+"
+
+pkg_postinst_udev-hwdb () {
+	if test -n "$D"; then
+		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
+			--root $D
+	else
+		udevadm hwdb --update
+	fi
+}
+
+pkg_prerm_udev-hwdb () {
+	if test -n "$D"; then
+		exit 1
+	fi
+
+	rm -f ${sysconfdir}/udev/hwdb.bin
+}
+
+PACKAGES =+ "udev-bash"
+SUMMARY_udev-bash = "Dynamic device management - Bash shell commands completion"
+FILES_udev-bash = "${datadir}/bash-completion/completions/udevadm"
+
+PACKAGES =+ "udev-zsh"
+SUMMARY_udev-zsh = "Dynamic device management - zsh shell commands completion"
+FILES_udev-zsh = "${datadir}/zsh/site-functions/_udevadm"
+
+
+########################################################################
+# UDEV Rules Packages
+# split rules that require external programs or dependencies.
+# those that use only builtins are not split
+########################################################################
+
+PACKAGES =+ "udev-rules-accelerometer"
+SUMMARY_udev-rules-accelerometer = "Dynamic device management - accelerometer rules"
+FILES_udev-rules-accelerometer = "\
+        ${rootlibexecdir}/udev/accelerometer \
+        ${rootlibexecdir}/udev/rules.d/61-accelerometer.rules \
+"
+
+PACKAGES =+ "udev-rules-cdrom"
+SUMMARY_udev-rules-cdrom = "Dynamic device management - cdrom rules"
+FILES_udev-rules-cdrom = "\
+        ${rootlibexecdir}/udev/cdrom_id \
+        ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \
+"
+
+PACKAGES =+ "udev-rules-mtd"
+SUMMARY_udev-rules-mtd = "Dynamic device management - mtd rules"
+FILES_udev-rules-mtd = "\
+        ${rootlibexecdir}/udev/mtd_probe \
+        ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \
+"
+
+PACKAGES =+ "udev-rules-persistent-storage"
+SUMMARY_udev-rules-persistent-storage = "Dynamic device management - persistent storage rules"
+FILES_udev-rules-persistent-storage = "\
+        ${rootlibexecdir}/udev/ata_id \
+        ${rootlibexecdir}/udev/scsi_id \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \
+"
+
+PACKAGES =+ "udev-rules-systemd"
+SUMMARY_udev-rules-systemd = "Dynamic device management - systemd rules"
+RDEPENDS_udev-rules-systemd = "${PN} ${PN}-services-sysctl"
+FILES_udev-rules-systemd = "\
+        ${rootlibexecdir}/udev/rules.d/99-systemd.rules \
+"
+
+PACKAGES =+ "udev-rules-v4l"
+SUMMARY_udev-rules-v4l = "Dynamic device management - v4l rules"
+FILES_udev-rules-v4l = "\
+        ${rootlibexecdir}/udev/v4l_id \
+        ${rootlibexecdir}/udev/rules.d/*-persistent-v4l.rules \
+"
+
+PACKAGES =+ "udev-rules-all"
+SUMMARY_udev-rules-all = "Dynamic device management - all rules aggregation"
+ALLOW_EMPTY_udev-rules-all = "1"
+RDEPENDS_udev-rules-all = "\
+        udev-rules-accelerometer \
+        udev-rules-cdrom \
+        udev-rules-mtd \
+        udev-rules-persistent-storage \
+        udev-rules-systemd \
+        udev-rules-v4l \
+"
+
+PACKAGES =+ "udev"
+SUMMARY_udev = "Dynamic device management"
+RPROVIDES_udev = "hotplug"
+PROVIDES = "udev"
+CONFFILES_udev = "${sysconfdir}/udev/udev.conf"
+FILES_udev = "\
+        ${base_bindir}/udevadm \
+        ${base_sbindir}/udevd \
+        ${rootlibexecdir}/systemd/systemd-udevd \
+        ${rootlibexecdir}/udev/collect \
+        ${rootlibexecdir}/udev/rules.d/42-usb-hid-pm.rules \
+        ${rootlibexecdir}/udev/rules.d/50-firmware.rules \
+        ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \
+        ${rootlibexecdir}/udev/rules.d/60-drm.rules \
+        ${rootlibexecdir}/udev/rules.d/60-keyboard.rules \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-serial.rules \
+        ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \
+        ${rootlibexecdir}/udev/rules.d/75-net-description.rules \
+        ${rootlibexecdir}/udev/rules.d/75-tty-description.rules \
+        ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \
+        ${rootlibexecdir}/udev/rules.d/80-drivers.rules \
+        ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \
+        ${rootlibexecdir}/udev/rules.d/95-udev-late.rules \
+        ${rootlibexecdir}/udev/rules.d/70-mouse.rules \
+        ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
+        ${rootlibexecdir}/udev/rules.d/touchscreen.rules \
+        ${sysconfdir}/init.d/systemd-udevd \
+        ${sysconfdir}/udev \
+"
+
+RRECOMMENDS_udev = "\
+        udev-hwdb \
+        udev-rules-all \
+"
+
+INITSCRIPT_PACKAGES = "udev"
+INITSCRIPT_NAME_udev = "systemd-udevd"
+INITSCRIPT_PARAMS_udev = "start 03 S ."
+
+python __anonymous() {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
+# that we don't build both udev and systemd in world builds.
+python () {
+    if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
+        raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
+}
-- 
1.9.1



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

* Re: [PATCH] systemd: update version from 216 to 218
  2015-02-03 18:21   ` Bruno Bottazzini
@ 2015-02-03 21:23     ` Randy Witt
  2015-02-03 21:33       ` Bottazzini, Bruno
  2015-02-04 11:48     ` Enrico Scholz
  1 sibling, 1 reply; 73+ messages in thread
From: Randy Witt @ 2015-02-03 21:23 UTC (permalink / raw)
  To: Bruno Bottazzini, openembedded-core

On 02/03/2015 10:21 AM, Bruno Bottazzini wrote:
> Spliting into packages to be able to choose what to be installed.
> The final result may get smaller, if the user wanted to.
> By default it will install the whole systemd which may be big.
> ---
>   ...r-executing-scripts-under-etc-systemd-218.patch |  131 ++
>   .../systemd/systemd_218-pam-fix-fallocate.patch    |   91 ++
>   meta/recipes-core/systemd/systemd_218.bb           | 1251 ++++++++++++++++++++
>   3 files changed, 1473 insertions(+)
>   create mode 100644 meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch
>   create mode 100644 meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch
>   create mode 100644 meta/recipes-core/systemd/systemd_218.bb
>
> diff --git a/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch
> new file mode 100644
> index 0000000..d50f2cb
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch
> @@ -0,0 +1,131 @@
> +From 0dec519c563654148d3cdd363d2598b50313de60 Mon Sep 17 00:00:00 2001
> +From: Bruno Bottazzini <bruno.bottazzini@intel.com>
> +Date: Mon, 2 Feb 2015 13:53:24 -0200
> +Subject: [PATCH 1/1] add support for executing scripts under /etc/rcS.d/
> +
> +To be compatible, all services translated from scripts under /etc/rcS.d would
> +run before services translated from scripts under /etc/rcN.d.
> +---
> + src/sysv-generator/sysv-generator.c | 46 ++++++++++++++++++++++++++++---------
> + 1 file changed, 35 insertions(+), 11 deletions(-)
> +
> +diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
> +index b8b77aa..9494afb 100644
> +--- a/src/sysv-generator/sysv-generator.c
> ++++ b/src/sysv-generator/sysv-generator.c
> +@@ -42,7 +42,8 @@
> +
> + typedef enum RunlevelType {
> +         RUNLEVEL_UP,
> +-        RUNLEVEL_DOWN
> ++        RUNLEVEL_DOWN,
> ++        RUNLEVEL_SYSINIT
> + } RunlevelType;
> +
> + static const struct {
> +@@ -57,6 +58,9 @@ static const struct {
> +         { "rc4.d",  SPECIAL_RUNLEVEL4_TARGET, RUNLEVEL_UP },
> +         { "rc5.d",  SPECIAL_RUNLEVEL5_TARGET, RUNLEVEL_UP },
> +
> ++        /* Debian style rcS.d, also adopted by OE */
> ++        { "rcS.d",  SPECIAL_SYSINIT_TARGET,   RUNLEVEL_SYSINIT},
> ++
> +         /* Standard SysV runlevels for shutdown */
> +         { "rc0.d",  SPECIAL_POWEROFF_TARGET,  RUNLEVEL_DOWN },
> +         { "rc6.d",  SPECIAL_REBOOT_TARGET,    RUNLEVEL_DOWN }
> +@@ -65,7 +69,7 @@ static const struct {
> +            directories in this order, and we want to make sure that
> +            sysv_start_priority is known when we first load the
> +            unit. And that value we only know from S links. Hence
> +-           UP must be read before DOWN */
> ++           UP/SYSINIT must be read before DOWN */
> + };
> +
> + typedef struct SysvStub {
> +@@ -81,6 +85,8 @@ typedef struct SysvStub {
> +         char **conflicts;
> +         bool has_lsb;
> +         bool reload;
> ++        bool default_dependencies;
> ++        bool from_rcsd;
> + } SysvStub;
> +
> + const char *arg_dest = "/tmp";
> +@@ -189,6 +195,8 @@ static int generate_unit_file(SysvStub *s) {
> +                 "Description=%s\n",
> +                 s->path, s->description);
> +
> ++        if (!s->default_dependencies)
> ++                fprintf(f, "DefaultDependencies=no\n");
> +         if (!isempty(before))
> +                 fprintf(f, "Before=%s\n", before);
> +         if (!isempty(after))
> +@@ -717,15 +725,26 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
> +                         r = strv_extend(&s->after, other->name);
> +                         if (r < 0)
> +                                 return log_oom();
> +-                }
> +-                else if (other->sysv_start_priority > s->sysv_start_priority) {
> +-                        r = strv_extend(&s->before, other->name);
> ++               } else if (other->from_rcsd && !s->from_rcsd) {
> ++                        r = strv_extend(&s->after, other->name);
> +                         if (r < 0)
> +                                 return log_oom();
> +-                }
> +-                else
> +-                        continue;
> +-
> ++        } else {
> ++          /* All scripts under /etc/rcS.d should execute before scripts under
> ++           * /etc/rcN.d */
> ++                 if (!other->from_rcsd && s->from_rcsd) {
> ++                         r = strv_extend(&s->before, other->name);
> ++                                if (r < 0)
> ++                                        return log_oom();
> ++                        }
> ++                        else if (other->sysv_start_priority > s->sysv_start_priority) {
> ++                                r = strv_extend(&s->before, other->name);
> ++                                if (r < 0)
> ++                                        return log_oom();
> ++                        }
> ++                        else
> ++                                continue;
> ++               }
> +                 /* FIXME: Maybe we should compare the name here lexicographically? */
> +         }
> +
> +@@ -784,6 +803,8 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
> +                                 return log_oom();
> +
> +                         service->sysv_start_priority = -1;
> ++                        service->default_dependencies = true;
> ++                        service->from_rcsd = false;
> +                         service->name = name;
> +                         service->path = fpath;
> +
> +@@ -869,9 +890,11 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
> +
> +                                 if (de->d_name[0] == 'S')  {
> +
> +-                                        if (rcnd_table[i].type == RUNLEVEL_UP) {
> ++                                        if (rcnd_table[i].type == RUNLEVEL_UP || rcnd_table[i].type == RUNLEVEL_SYSINIT) {
> +                                                 service->sysv_start_priority =
> +                                                         MAX(a*10 + b, service->sysv_start_priority);
> ++                                                service->default_dependencies = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?false:true;
> ++                                                service->from_rcsd = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?true:false;
> +                                         }
> +
> +                                         r = set_ensure_allocated(&runlevel_services[i], NULL);
> +@@ -883,7 +906,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
> +                                                 goto finish;
> +
> +                                 } else if (de->d_name[0] == 'K' &&
> +-                                           (rcnd_table[i].type == RUNLEVEL_DOWN)) {
> ++                                        (rcnd_table[i].type == RUNLEVEL_DOWN ||
> ++                                         rcnd_table[i].type == RUNLEVEL_SYSINIT)) {
> +
> +                                         r = set_ensure_allocated(&shutdown_services, NULL);
> +                                         if (r < 0)
> +--
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch b/meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch
> new file mode 100644
> index 0000000..2fbf4b4
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch
> @@ -0,0 +1,91 @@
> +From 84c87cf474f9ffd23332a40b7e06900ff8272a69 Mon Sep 17 00:00:00 2001
> +From: Bruno Bottazzini <bruno.bottazzini@intel.com>
> +Date: Fri, 30 Jan 2015 18:14:42 -0200
> +Subject: [PATCH 1/1] This patch is uclibc specific, thus not suitable for
> + upstream.
> +
> +---
> + src/journal/journal-file.c  | 15 ++++++++++++++-
> + src/journal/journald-kmsg.c | 16 ++++++++++++++--
> + 2 files changed, 28 insertions(+), 3 deletions(-)
> +
> +diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
> +index ec12e89..3d21528 100644
> +--- a/src/journal/journal-file.c
> ++++ b/src/journal/journal-file.c
> +@@ -35,6 +35,7 @@
> + #include "lookup3.h"
> + #include "compress.h"
> + #include "fsprg.h"
> ++#include "config.h"
> +
> + #define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*sizeof(HashItem))
> + #define DEFAULT_FIELD_HASH_TABLE_SIZE (333ULL*sizeof(HashItem))
> +@@ -354,7 +355,7 @@ static int journal_file_fstat(JournalFile *f) {
> +
> + static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) {
> +         uint64_t old_size, new_size;
> +-        int r;
> ++        int r = 0;
> +
> +         assert(f);
> +
> +@@ -418,9 +419,21 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size)
> +         /* Note that the glibc fallocate() fallback is very
> +            inefficient, hence we try to minimize the allocation area
> +            as we can. */
> ++#ifdef HAVE_POSIX_FALLOCATE
> +         r = posix_fallocate(f->fd, old_size, new_size - old_size);
> +         if (r != 0)
> +                 return -r;
> ++#else
> ++        /* Write something every 512 bytes to make sure the block is allocated */
> ++        uint64_t len = new_size - old_size;
> ++        uint64_t offset = old_size;
> ++        for (offset += (len-1) % 512; len > 0; offset += 512) {
> ++                len -= 512;
> ++                if (pwrite(f->fd, "", 1, offset) != 1)
> ++                        return -errno;
> ++        }
> ++
> ++#endif /* HAVE_POSIX_FALLOCATE */
> +
> +         f->header->arena_size = htole64(new_size - le64toh(f->header->header_size));
> +
> +diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
> +index aca4571..f3c2c19 100644
> +--- a/src/journal/journald-kmsg.c
> ++++ b/src/journal/journald-kmsg.c
> +@@ -437,6 +437,7 @@ fail:
> + int server_open_kernel_seqnum(Server *s) {
> +         _cleanup_close_ int fd;
> +         uint64_t *p;
> ++        int r = 0;
> +
> +         assert(s);
> +
> +@@ -449,8 +450,19 @@ int server_open_kernel_seqnum(Server *s) {
> +                 log_error_errno(errno, "Failed to open /run/systemd/journal/kernel-seqnum, ignoring: %m");
> +                 return 0;
> +         }
> +-
> +-        if (posix_fallocate(fd, 0, sizeof(uint64_t)) < 0) {
> ++#ifdef HAVE_POSIX_FALLOCATE
> ++        r = posix_fallocate(fd, 0, sizeof(uint64_t));
> ++#else
> ++       /* Use good old method to write zeros into the journal file
> ++          perhaps very inefficient yet working. */
> ++       char *buf = alloca(sizeof(uint64_t));
> ++       off_t oldpos = lseek(fd, 0, SEEK_CUR);
> ++       bzero(buf, sizeof(uint64_t));
> ++       lseek(fd, 0, SEEK_SET);
> ++       r = write(fd, buf, sizeof(uint64_t));
> ++       lseek(fd, oldpos, SEEK_SET);
> ++#endif /* HAVE_POSIX_FALLOCATE */
> ++       if (r < 0) {
> +                 log_error_errno(errno, "Failed to allocate sequential number file, ignoring: %m");
> +                 return 0;
> +         }
> +--
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd_218.bb b/meta/recipes-core/systemd/systemd_218.bb
> new file mode 100644
> index 0000000..9f9dbb0
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd_218.bb
> @@ -0,0 +1,1251 @@
> +SUMMARY = "System and service manager for Linux, replacing SysVinit"
> +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
> +
> +LICENSE = "GPLv2 & LGPLv2.1 & MIT"
> +LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
> +                    file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
> +                    file://LICENSE.MIT;md5=544799d0b492f119fa04641d1b8868ed"
> +
> +PE = "1"
> +
> +DEPENDS = "docbook-sgml-dtd-4.1-native intltool-native gperf-native libcap qemu-native curl glibc"
> +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
> +
> +SECTION = "base/shell"
> +
> +inherit gtk-doc pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext
> +
> +SRCREV = "820aced6f6067a6b7c57b7d36e44f64378870cbf"
> +
> +PV = "218+git${SRCPV}"
> +
> +SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=git \
> +           file://systemd-pam-configure-check-uclibc.patch \
> +           file://systemd-pam-fix-execvpe.patch \
> +           file://systemd-pam-fix-mkostemp.patch \
> +           file://systemd_218-pam-fix-fallocate.patch \
> +           file://optional_secure_getenv.patch \
> +           file://uclibc-get-physmem.patch \
> +           file://0001-add-support-for-executing-scripts-under-etc-systemd-218.patch \
> +           file://0001-systemd-user-avoid-using-system-auth.patch \
> +           file://touchscreen.rules \
> +           file://00-create-volatile.conf \
> +           file://init \
> +           file://run-ptest \
> +          "
> +
> +S = "${WORKDIR}/git"
> +
> +SRC_URI_append_libc-uclibc = "\
> +                             file://systemd-pam-fix-getty-unit.patch \
> +                            "
> +LDFLAGS_append_libc-uclibc = " -lrt"
> +
> +GTKDOC_DOCDIR = "${S}/docs/"
> +
> +# regardless of PACKAGECONFIG, libgcrypt is always required to expand
> +# the AM_PATH_LIBGCRYPT autoconf macro
> +DEPENDS += "libgcrypt"
> +
> +PACKAGECONFIG ??= "acl blkid efi kmod gcrypt lz4 xz libidn"
> +
> +PACKAGECONFIG[glib] = "--enable-gudev,--disable-gudev,glib-2.0"
> +
> +
> +########################################################################
> +# Highly Recommended Section
> +########################################################################
> +
> +# ACL (Access Control List), see http://savannah.nongnu.org/projects/acl
> +# used by systemd, journald and logind to provide fine grained access to files.
> +# NOTE: do not remove unless you know what you are doing.
> +PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
> +
> +# blkid from util-linux to read block devices, see ftp://ftp.kernel.org/pub/linux/utils/util-linux
> +# required to:
> +#  - discover and mount GPT partitions as /, /home and /srv based on GUIDs.
> +#  - nspawn to locate partitions
> +#  - udev to probe and use block devices
> +# NOTE: do not remove unless you know what you are doing.
> +PACKAGECONFIG[blkid] = "--enable-blkid,--disable-blkid,util-linux"
> +
> +# EFI support in systemd and udev, includes discovery and mount of partitions and efivars.
> +# NOTE: do not remove unless you know what you are doing.
> +PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
> +
> +# kmod to load kernel modules, provides modprobe, insmod et al, see https://www.kernel.org/pub/linux/utils/kernel/kmod/
> +# required to:
> +#  - let systemd load required modules automatically (ipv6, unix, kdbus...)
> +#  - let udev load modules for devices (hotplug and coldplug) using a built-in
> +# NOTE: do not remove unless you know what you are doing.
> +PACKAGECONFIG[kmod] = "--enable-kmod,--disable-kmod,kmod"
> +
> +# D-Bus policy and authentication framework, see http://www.freedesktop.org/wiki/Software/polkit/
> +# WARN: no package "polkit" in poky
> +PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,,polkit"
> +
> +
> +########################################################################
> +# Security Section
> +########################################################################
> +
> +# SELinux (Security Enhanced Linux), see http://selinuxproject.org/page/Main_Page
> +# WARN: no package "libselinux" in poky
> +PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
> +
> +# See http://people.redhat.com/sgrubb/audit/
> +# WARN: no package "libaudit" in poky
> +PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,libaudit"
> +
> +# SMACK (Simplified Mandatory Access Control Kernel), see http://schaufler-ca.com/
> +# needs Kernel CONFIG_SECURITY_SMACK and /etc/smack/accesses.d/ to be useful, otherwise is unused.
> +PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
> +
> +# IMA (Integrity Measurement Architecture) setup, see http://linux-ima.sourceforge.net/
> +# needs Kernel CONFIG_IMA and /etc/ima/ima-policy to be useful, otherwise is unused.
> +PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
> +
> +# AppArmor, proactively protects the operating system and applications
> +# from external or internal threats, even zero-day attacks, by
> +# enforcing good behavior and preventing even unknown application flaws
> +# from being exploited. See http://wiki.apparmor.net/index.php/Main_Page
> +# needs Kernel CONFIG_SECURITY_APPARMOR to be useful, otherwise is unused.
> +# WARN: no package "libapparmor" in poky
> +PACKAGECONFIG[apparmor] = "--enable-apparmor,--disable-apparmor,libapparmor"
> +
> +# SECCOMP provides syscall filtering and sandboxing, see http://sourceforge.net/projects/libseccomp/
> +# It is used by browsers to implement their plugins.
> +# systemd will allow restricting the syscalls available to an application with a line like below
> +# in [Service] block:
> +#    SystemCallFilter=brk mmap access open fstat close read fstat mprotect arch_prctl munmap write
> +# needs Kernel CONFIG_SECCOMP, CONFIG_SECCOMP_FILTER and CONFIG_HAVE_ARCH_SECCOMP_FILTER to be useful.
> +# WARN: no package "libseccomp" in poky
> +PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
> +
> +
> +########################################################################
> +# Journal Section
> +########################################################################
> +
> +# extract ELF symbols and store the stack trace along the coredump
> +PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils (>= 0.158)"
> +
> +# Sign the journal for anti-tampering
> +PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
> +
> +# Compress the journal (and coredumps stored in the journal) using lz4
> +PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
> +
> +# Compress the journal (and coredumps stored in the journal) using xz (lzma)
> +# xz has lower priority than lz4 for compression, but having both may help to extract and decompress
> +# journal entries generated in other systems.
> +PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
> +
> +# when generating gcrypt verification keys (journalctl --setup-keys), output the secret
> +# as QR code so it can be easily scanned by a phone or systems with digital camera and QR scanner.
> +# WARN: no package "libqrencode" in poky
> +PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,libqrencode"
> +
> +
> +########################################################################
> +# Resolve Daemon Section
> +########################################################################
> +
> +# IDN (Internationalized Domain Name) see http://www.gnu.org/software/libidn/
> +PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
> +
> +CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill"
> +
> +# Helper variables to clarify locations.  This mirrors the logic in systemd's
> +# build system.
> +rootprefix ?= "${base_prefix}"
> +rootlibdir ?= "${base_libdir}"
> +rootlibexecdir = "${rootprefix}/lib"
> +
> +EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
> +                 --with-rootlibdir=${rootlibdir} \
> +                 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
> +                 --disable-manpages \
> +                 --disable-introspection \
> +                 --disable-kdbus \
> +                 --disable-terminal \
> +                 --enable-split-usr \
> +                 --without-python \
> +                 --enable-libcurl \
> +                 --enable-coredump \
> +                 --enable-ldconfig \
> +                 --enable-backlight \
> +                 --enable-binfmt \
> +                 --enable-bootchart \
> +                 --enable-firstboot \
> +                 --enable-hostnamed \
> +                 --enable-localed \
> +                 --enable-logind \
> +                 --enable-machined \
> +                 --enable-networkd \
> +                 --enable-quotacheck \
> +                 --enable-randomseed \
> +                 --enable-resolved \
> +                 --enable-rfkill \
> +                 --enable-sysusers \
> +                 --enable-vconsole \
> +                 --with-sysvrcnd-path=${sysconfdir} \
> +                 ac_cv_path_KILL=${base_bindir}/kill \
> +               "
> +
> +# uclibc does not have NSS
> +EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
> +
> +do_configure_prepend() {
> +	export CPP="${HOST_PREFIX}cpp ${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}"
> +	export NM="${HOST_PREFIX}gcc-nm"
> +	export AR="${HOST_PREFIX}gcc-ar"
> +	export RANLIB="${HOST_PREFIX}gcc-ranlib"
> +	export KMOD="${base_bindir}/kmod"
> +	if [ -d ${S}/units.pre_sed ] ; then
> +		cp -r ${S}/units.pre_sed ${S}/units
> +	else
> +		cp -r ${S}/units ${S}/units.pre_sed
> +	fi
> +	sed -i -e 's:=/root:=${ROOT_HOME}:g' ${S}/units/*.service*
> +	sed -i '/ln --relative --help/d' ${S}/configure.ac
> +	sed -i -e 's:\$(LN_S) --relative -f:lnr:g' ${S}/Makefile.am
> +	sed -i -e 's:\$(LN_S) --relative:lnr:g' ${S}/Makefile.am
> +}
> +
> +do_install() {
> +	autotools_do_install
> +	install -d ${D}/${base_sbindir}
> +
> +	# Provide support for initramfs
> +	[ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
> +	[ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
> +
> +	# Create machine-id
> +	# 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
> +	touch ${D}${sysconfdir}/machine-id
> +
> +	install -m 0644 ${WORKDIR}/*.rules ${D}${rootlibexecdir}/udev/rules.d/
> +
> +	install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${exec_prefix}/lib/tmpfiles.d/
> +
> +	if ${@bb.utils.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
> +		sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
> +	fi
> +
> +	# Move libgudev back to ${rootlibdir} to keep backward compatibility
> +	if ${@bb.utils.contains('PACKAGECONFIG','glib','true','false',d)}; then
> +		if [ ${rootlibdir} != ${exec_prefix}/lib ]; then
> +			mv -t ${D}${rootlibdir} ${D}${exec_prefix}/lib/libgudev*
> +		fi
> +	fi
> +
> +        # Delete journal README, as log can be symlinked inside volatile.
> +        rm -f ${D}/${localstatedir}/log/README
> +}
> +
> +do_install_ptest () {
> +       install -d ${D}${PTEST_PATH}/test
> +       cp -rf ${S}/test/* ${D}${PTEST_PATH}/test
> +       install -m 0755  ${B}/test-udev ${D}${PTEST_PATH}/
> +       install -d ${D}${PTEST_PATH}/build-aux
> +       cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
> +       cp -rf ${B}/rules ${D}${PTEST_PATH}/
> +       # This directory needs to be there for udev-test.pl to work.
> +       install -d ${D}${libdir}/udev/rules.d
> +       cp ${B}/Makefile ${D}${PTEST_PATH}/
> +       cp ${S}/test/sys.tar.xz ${D}${PTEST_PATH}/test
> +       sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/test/udev-test.pl
> +       sed -i 's#${S}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile
> +       sed -i 's#${B}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile
> +}
> +
> +python populate_packages_prepend (){
> +    systemdlibdir = d.getVar("rootlibdir", True)
> +    do_split_packages(d, systemdlibdir, '^lib(udev|gudev|systemd|nss)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
> +}
> +PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd|nss).*"
> +
> +########################################################################
> +# Base Packages
> +########################################################################
> +
> +PACKAGES =+ "${PN}-generators-filesystems"
> +SUMMARY_${PN}-generators-filesystems = "systemd's generator for filesystem services based on fstab and GPT"
> +RDEPENDS_${PN}-generators-filesystems = "${PN}-services-fsck"
> +FILES_${PN}-generators-filesystems = "\
> +        ${rootlibexecdir}/systemd/system-generators/systemd-fstab-generator \
> +        ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
> +        ${rootlibexecdir}/systemd/systemd-remount-fs \
> +        ${systemd_unitdir}/system/local-fs.target.wants/systemd-remount-fs.service \
> +        ${systemd_unitdir}/system/systemd-remount-fs.service \
> +"
> +
> +PACKAGES =+ "${PN}-generators-getty"
> +SUMMARY_${PN}-generators-getty = "systemd's generator TTY services"
> +RDEPENDS_${PN}-generators-getty = "${PN}-services-getty"
> +FILES_${PN}-generators-getty = "\
> +        ${rootlibexecdir}/systemd/system-generators/systemd-getty-generator \
> +"
> +
> +PACKAGES =+ "${PN}-tools"
> +SUMMARY_${PN}-tools = "systemd command line tools (cgls, delta, run, analyze...)"
> +RRECOMMENDS_${PN}-tools = "${PN}-services-base"
> +FILES_${PN}-tools = "\
> +        ${base_bindir}/systemd-machine-id-setup \
> +        ${bindir}/busctl \
> +        ${bindir}/coredumpctl \
> +        ${bindir}/systemd-analyze \
> +        ${bindir}/systemd-cat \
> +        ${bindir}/systemd-cgls \
> +        ${bindir}/systemd-cgtop \
> +        ${bindir}/systemd-delta \
> +        ${bindir}/systemd-detect-virt \
> +        ${bindir}/systemd-path \
> +        ${bindir}/systemd-run \
> +        ${rootlibexecdir}/systemd/systemd-ac-power \
> +        ${rootlibexecdir}/systemd/systemd-activate \
> +        ${rootlibexecdir}/systemd/systemd-reply-password \
> +        ${rootprefix}/bin/systemd-escape \
> +        ${rootprefix}/bin/systemd-notify \
> +"
> +
> +########################################################################
> +# Services Packages
> +########################################################################
> +
> +PACKAGES =+ "${PN}-services-ask-password"
> +SUMMARY_${PN}-services-ask-password = "systemd's service and tool to query the user for a system password"
> +RRECOMMENDS_${PN}-services-ask-password = "${PN}-services-base"
> +FILES_${PN}-services-ask-password = "\
> +        ${rootprefix}/bin/systemd-ask-password \
> +        ${rootprefix}/bin/systemd-tty-ask-password-agent \
> +        ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
> +        ${systemd_unitdir}/system/systemd-ask-password-console.path \
> +        ${systemd_unitdir}/system/systemd-ask-password-console.service \
> +        ${systemd_unitdir}/system/systemd-ask-password-wall.path \
> +        ${systemd_unitdir}/system/systemd-ask-password-wall.service \
> +"
> +
> +PACKAGES =+ "${PN}-services-backlight"
> +SUMMARY_${PN}-services-backlight = "systemd's backlight state save/restore service"
> +FILES_${PN}-services-backlight = "\
> +        ${systemd_unitdir}/system/systemd-backlight@.service \
> +        ${rootlibexecdir}/systemd/systemd-backlight \
> +"
> +
> +PACKAGES =+ "${PN}-services-binfmt"
> +SUMMARY_${PN}-services-binfmt = "systemd's service to configure additional binary formats for executables"
> +RRECOMMENDS_${PN}-services-binfmt = "kernel-module-binfmt-misc"
> +FILES_${PN}-services-binfmt = "\
> +        ${sysconfdir}/binfmt.d/ \
> +        ${exec_prefix}/lib/binfmt.d/ \
> +        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.automount \
> +        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.mount \
> +        ${systemd_unitdir}/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-binfmt.service \
> +        ${systemd_unitdir}/system/systemd-binfmt.service \
> +        ${rootlibexecdir}/systemd/systemd-binfmt \
> +"
> +
> +PACKAGES =+ "${PN}-services-bootchart"
> +SUMMARY_${PN}-services-bootchart = "systemd's boot performance service and graphing tool"
> +CONFFILES_${PN}-services-bootchart = "${sysconfdir}/systemd/bootchart.conf"
> +FILES_${PN}-services-bootchart = "\
> +        ${sysconfdir}/systemd/bootchart.conf \
> +        ${rootlibexecdir}/systemd/systemd-bootchart \
> +"
> +
> +PACKAGES =+ "${PN}-services-coredump"
> +SUMMARY_${PN}-services-coredump = "systemd's coredump log hook and service"
> +RDEPENDS_${PN}-services-coredump = "${PN}-services-sysctl"
> +CONFFILES_${PN}-services-coredump = "${sysconfdir}/systemd/coredump.conf"
> +FILES_${PN}-services-coredump = "\
> +        ${exec_prefix}/lib/sysctl.d/50-coredump.conf \
> +        ${sysconfdir}/systemd/coredump.conf \
> +        ${rootlibexecdir}/systemd/systemd-coredump \
> +"
> +
> +PACKAGES =+ "${PN}-services-cryptsetup"
> +SUMMARY_${PN}-services-cryptsetup = "systemd's disk decryption service"
> +ALLOW_EMPTY_${PN}-services-cryptsetup = "1"
> +FILES_${PN}-services-cryptsetup = "\
> +        ${rootlibexecdir}/systemd/system-generators/systemd-cryptsetup-generator \
> +        ${systemd_unitdir}/system/cryptsetup-pre.target \
> +        ${systemd_unitdir}/system/cryptsetup.target \
> +        ${systemd_unitdir}/system/sysinit.target.wants/cryptsetup.target \
> +        ${rootlibexecdir}/systemd/systemd-cryptsetup \
> +"
> +
> +PACKAGES =+ "${PN}-services-dbus"
> +SUMMARY_${PN}-services-dbus = "systemd's DBus daemon system service"
> +# NOTE: dbus dependency will go away when kdbus is in use
> +RDEPENDS_${PN}-services-dbus = "dbus"
> +FILES_${PN}-services-dbus = "\
> +        ${datadir}/dbus-1/services/org.freedesktop.systemd1.service \
> +        ${datadir}/dbus-1/system-services/org.freedesktop.systemd1.service \
> +        ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
> +        ${systemd_unitdir}/system/sockets.target.wants/dbus.socket \
> +        ${systemd_unitdir}/system/dbus.target.wants/dbus.socket \
> +        ${systemd_unitdir}/system/multi-user.target.wants/dbus.service \
> +        ${systemd_unitdir}/system/dbus.socket \
> +        ${systemd_unitdir}/system/dbus.service \
> +"
> +
> +PACKAGES =+ "${PN}-services-debug"
> +SUMMARY_${PN}-services-debug = "systemd's debug service"
> +RRECOMMENDS_${PN}-services-debug = "${PN}-services-base ${PN}-tools"
> +FILES_${PN}-services-debug = "\
> +        ${rootlibexecdir}/systemd/system-generators/systemd-debug-generator \
> +        ${systemd_unitdir}/system/debug-shell.service \
> +        ${systemd_unitdir}/system/sys-kernel-config.mount \
> +        ${systemd_unitdir}/system/sys-kernel-debug.mount \
> +        ${systemd_unitdir}/system/sysinit.target.wants/sys-kernel-config.mount \
> +        ${systemd_unitdir}/system/sysinit.target.wants/sys-kernel-debug.mount \
> +"
> +
> +PACKAGES =+ "${PN}-services-firstboot"
> +SUMMARY_${PN}-services-firstboot = "systemd's service to initialize basic system settings"
> +FILES_${PN}-services-firstboot = "\
> +        ${base_bindir}/systemd-firstboot \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-firstboot.service \
> +        ${systemd_unitdir}/system/systemd-firstboot.service \
> +"
> +
> +PACKAGES =+ "${PN}-services-fsck"
> +SUMMARY_${PN}-services-fsck = "systemd's filesystem check service"
> +RRECOMMENDS_${PN}-services-fsck = "util-linux-fsck e2fsprogs-e2fsck"
> +FILES_${PN}-services-fsck = "\
> +        ${systemd_unitdir}/system/systemd-fsck-root.service \
> +        ${systemd_unitdir}/system/systemd-fsck@.service \
> +        ${rootlibexecdir}/systemd/systemd-fsck \
> +"
> +
> +PACKAGES =+ "${PN}-services-fuse"
> +SUMMARY_${PN}-services-fuse = "systemd's FUSE (filesystem in userspace) service"
> +FILES_${PN}-services-fuse = "\
> +        ${systemd_unitdir}/system/sysinit.target.wants/sys-fs-fuse-connections.mount \
> +        ${systemd_unitdir}/system/sys-fs-fuse-connections.mount \
> +"
> +
> +PACKAGES =+ "${PN}-services-getty"
> +SUMMARY_${PN}-services-getty = "systemd's getty service"
> +RRECOMMENDS_${PN}-services-getty = "util-linux-agetty ${PN}-generators-getty"
> +FILES_${PN}-services-getty = "\
> +        ${systemd_unitdir}/system/autovt@.service \
> +        ${systemd_unitdir}/system/console-getty.service \
> +        ${systemd_unitdir}/system/container-getty@.service \
> +        ${systemd_unitdir}/system/getty@.service \
> +        ${systemd_unitdir}/system/serial-getty@.service \
> +        ${sysconfdir}/systemd/system/getty.target.wants/ \
> +"
> +
> +PACKAGES =+ "${PN}-services-hostnamed"
> +SUMMARY_${PN}-services-hostnamed = "systemd's hostname management service"
> +RDEPENDS_${PN}-services-hostnamed = "${PN}-services-dbus"
> +CONFFILES_${PN}-services-hostnamed = "${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf"
> +FILES_${PN}-services-hostnamed = "\
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
> +        ${bindir}/hostnamectl \
> +        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.hostname1.busname \
> +        ${systemd_unitdir}/system/dbus-org.freedesktop.hostname1.service \
> +        ${systemd_unitdir}/system/org.freedesktop.hostname1.busname \
> +        ${systemd_unitdir}/system/systemd-hostnamed.service \
> +        ${rootlibexecdir}/systemd/systemd-hostnamed \
> +        ${datadir}/dbus-1/system-services/org.freedesktop.hostname1.service \
> +        ${datadir}/polkit-1/actions/org.freedesktop.hostname1.policy \
> +"
> +
> +PACKAGES =+ "${PN}-services-journal"
> +SUMMARY_${PN}-services-journal = "systemd's journal (logging) service"
> +CONFFILES_${PN}-services-journal = "${sysconfdir}/systemd/journald.conf"
> +FILES_${PN}-services-journal = "\
> +        ${base_bindir}/journalctl \
> +        ${rootlibexecdir}/systemd/systemd-journald \
> +        ${sysconfdir}/systemd/journald.conf \
> +        ${systemd_unitdir}/system/sockets.target.wants/systemd-journald-dev-log.socket \
> +        ${systemd_unitdir}/system/sockets.target.wants/systemd-journald.socket \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journal-catalog-update.service \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journal-flush.service \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journald.service \
> +        ${systemd_unitdir}/system/systemd-journal-catalog-update.service \
> +        ${systemd_unitdir}/system/systemd-journal-flush.service \
> +        ${systemd_unitdir}/system/systemd-journald-dev-log.socket \
> +        ${systemd_unitdir}/system/systemd-journald.service \
> +        ${systemd_unitdir}/system/systemd-journald.socket \
> +        ${exec_prefix}/lib/systemd/catalog/ \
> +"
> +
> +
> +PACKAGES =+ "${PN}-services-journal-remote"
> +SUMMARY_${PN}-services-journal-remote = "systemd's service and tools to receive journal messages over the network"
> +RDEPENDS_${PN}-services-journal-remote = "${PN}-services-journal"
> +# NOTE: if no sysusers or tmpfiles, then users/groups and FS structure must be setup
> +RRECOMMENDS_${PN}-services-journal-remote = "${PN}-services-sysusers ${PN}-services-tmpfiles"
> +CONFFILES_${PN}-services-journal-remote = "${sysconfdir}/systemd/journald-remote.conf"
> +FILES_${PN}-services-journal-remote = "\
> +        ${exec_prefix}/lib/sysusers.d/systemd-remote.conf \
> +        ${exec_prefix}/lib/tmpfiles.d/systemd-remote.conf \
> +        ${rootlibexecdir}/systemd/systemd-journal-remote \
> +        ${sysconfdir}/systemd/journal-remote.conf \
> +"
> +
> +PACKAGES =+ "${PN}-services-journal-upload"
> +SUMMARY_${PN}-services-journal-upload = "systemd's service and tools to send journal messages over the network"
> +RDEPENDS_${PN}-services-journal-upload = "${PN}-services-journal"
> +# NOTE: if no sysusers, then users/groups must be setup
> +RRECOMMENDS_${PN}-services-journal-upload = "${PN}-services-sysusers"
> +CONFFILES_${PN}-services-journal-upload = "${sysconfdir}/systemd/journald-upload.conf"
> +FILES_${PN}-services-journal-upload = "\
> +        ${rootlibexecdir}/systemd/systemd-journal-upload \
> +        ${sysconfdir}/systemd/journal-upload.conf \
> +        ${systemd_unitdir}/system/systemd-journal-upload.service \
> +"
> +
> +PACKAGES =+ "${PN}-services-ldconfig"
> +SUMMARY_${PN}-services-ldconfig = "systemd's service to run ldconfig after updates"
> +FILES_${PN}-services-ldconfig = "\
> +        ${systemd_unitdir}/system/sysinit.target.wants/ldconfig.service \
> +        ${systemd_unitdir}/system/ldconfig.service \
> +"
> +
> +PACKAGES =+ "${PN}-services-localed"
> +SUMMARY_${PN}-services-localed = "systemd's locale management service"
> +RDEPENDS_${PN}-services-localed = "${PN}-services-dbus"
> +CONFFILES_${PN}-services-localed = "${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf"
> +FILES_${PN}-services-localed = "\
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf \
> +        ${bindir}/localectl \
> +        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.locale1.busname \
> +        ${systemd_unitdir}/system/dbus-org.freedesktop.locale1.service \
> +        ${systemd_unitdir}/system/org.freedesktop.locale1.busname \
> +        ${systemd_unitdir}/system/systemd-localed.service \
> +        ${rootlibexecdir}/systemd/systemd-localed \
> +        ${datadir}/dbus-1/system-services/org.freedesktop.locale1.service \
> +        ${datadir}/polkit-1/actions/org.freedesktop.locale1.policy \
> +        ${datadir}/systemd/kbd-model-map \
> +"
> +
> +PACKAGES =+ "${PN}-services-logind"
> +SUMMARY_${PN}-services-logind = "systemd's login management service"
> +RDEPENDS_${PN}-services-logind = "${PN}-services-dbus ${PN}-services-tmpfiles"
> +RRECOMMENDS_${PN}-services-logind = "udev"
> +CONFFILES_${PN}-services-logind = "\
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf \
> +        ${sysconfdir}/systemd/logind.conf \
> +"
> +FILES_${PN}-services-logind = "\
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf \
> +        ${sysconfdir}/systemd/logind.conf \
> +        ${base_bindir}/loginctl \
> +        ${base_bindir}/systemd-inhibit \
> +        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.login1.busname \
> +        ${systemd_unitdir}/system/dbus-org.freedesktop.login1.service \
> +        ${systemd_unitdir}/system/multi-user.target.wants/systemd-logind.service \
> +        ${systemd_unitdir}/system/multi-user.target.wants/systemd-user-sessions.service \
> +        ${systemd_unitdir}/system/org.freedesktop.login1.busname \
> +        ${systemd_unitdir}/system/systemd-logind.service \
> +        ${systemd_unitdir}/system/systemd-user-sessions.service \
> +        ${systemd_unitdir}/system/user@.service \
> +        ${rootlibexecdir}/systemd/systemd-logind \
> +        ${rootlibexecdir}/systemd/systemd-user-sessions \
> +        ${datadir}/dbus-1/system-services/org.freedesktop.login1.service \
> +        ${datadir}/polkit-1/actions/org.freedesktop.login1.policy \
> +        ${rootlibexecdir}/udev/rules.d/70-uaccess.rules \
> +        ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
> +        ${rootlibexecdir}/udev/rules.d/71-seat.rules \
> +        ${rootlibexecdir}/udev/rules.d/73-seat-late.rules \
> +"
> +
> +PACKAGES =+ "${PN}-services-machined"
> +SUMMARY_${PN}-services-machined = "systemd's virtual machine and container management service"
> +RDEPENDS_${PN}-services-machined = "${PN}-services-dbus"
> +CONFFILES_${PN}-services-machined = "${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf"
> +FILES_${PN}-services-machined = "\
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
> +        ${base_bindir}/machinectl \
> +        ${exec_prefix}/lib/libnss_mymachines.so.2 \
> +        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.machine1.busname \
> +        ${systemd_unitdir}/system/dbus-org.freedesktop.machine1.service \
> +        ${systemd_unitdir}/system/machine.slice \
> +        ${systemd_unitdir}/system/org.freedesktop.machine1.busname \
> +        ${systemd_unitdir}/system/systemd-machined.service \
> +        ${rootlibexecdir}/systemd/systemd-machined \
> +        ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
> +"
> +
> +PACKAGES =+ "${PN}-services-modules-load"
> +SUMMARY_${PN}-services-modules-load = "systemd's kernel module loading service"
> +FILES_${PN}-services-modules-load = "\
> +        ${sysconfdir}/modules-load.d/ \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-modules-load.service \
> +        ${systemd_unitdir}/system/systemd-modules-load.service \
> +        ${rootlibexecdir}/systemd/systemd-modules-load \
> +        ${exec_prefix}/lib/modules-load.d \
> +"
> +
> +PACKAGES =+ "${PN}-services-modules-static-nodes"
> +SUMMARY_${PN}-services-modules-static-nodes = "systemd's kernel module static nodes creation service"
> +RDEPENDS_${PN}-services-modules-static-nodes = "kmod ${PN}-services-tmpfiles"
> +FILES_${PN}-services-modules-static-nodes = "\
> +        ${systemd_unitdir}/system/sysinit.target.wants/kmod-static-nodes.service \
> +        ${systemd_unitdir}/system/kmod-static-nodes.service \
> +"
> +
> +
> +PACKAGES =+ "${PN}-services-multi-seat-x"
> +SUMMARY_${PN}-services-multi-seat-x = "systemd's X11 multi-seat support service"
> +RDEPENDS_${PN}-services-multi-seat-x = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/xserver', '', d)}"
> +FILES_${PN}-services-multi-seat-x = "\
> +        ${rootlibexecdir}/systemd/systemd-multi-seat-x \
> +"
> +
> +PACKAGES =+ "${PN}-services-networkd"
> +SUMMARY_${PN}-services-networkd = "systemd's network management (static, DHCP, bridge...) service"
> +# NOTE: if no sysusers, then users/groups must be setup
> +RRECOMMENDS_${PN}-services-networkd = "${PN}-services-sysusers"
> +FILES_${PN}-services-networkd = "\
> +        ${sysconfdir}/systemd/network/ \
> +        ${sysconfdir}/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service \
> +        ${sysconfdir}/systemd/system/multi-user.target.wants/systemd-networkd.service \
> +        ${base_bindir}/networkctl \
> +        ${rootlibexecdir}/systemd/network/80-container-host0.network \
> +        ${rootlibexecdir}/systemd/network/80-container-ve.network \
> +        ${rootlibexecdir}/systemd/network/99-default.link \
> +        ${systemd_unitdir}/system/systemd-networkd-wait-online.service \
> +        ${systemd_unitdir}/system/systemd-networkd.service \
> +        ${rootlibexecdir}/systemd/systemd-networkd \
> +        ${rootlibexecdir}/systemd/systemd-networkd-wait-online \
> +        ${exec_prefix}/lib/systemd/network \
> +"
> +
> +PACKAGES =+ "${PN}-services-nspawn"
> +SUMMARY_${PN}-services-nspawn = "systemd's namespace spawing service and tool"
> +FILES_${PN}-services-nspawn = "\
> +        ${systemd_unitdir}/system/systemd-nspawn@.service \
> +        ${bindir}/systemd-nspawn \
> +"
> +
> +PACKAGES =+ "${PN}-services-quota"
> +SUMMARY_${PN}-services-quota = "systemd's file system quota enable and check service"
> +RDEPENDS_${PN}-services-quota = "quota"
> +FILES_${PN}-services-quota = "\
> +        ${systemd_unitdir}/system/quotaon.service \
> +        ${systemd_unitdir}/system/systemd-quotacheck.service \
> +        ${rootlibexecdir}/systemd/systemd-quotacheck \
> +"
> +
> +PACKAGES =+ "${PN}-services-randomseed"
> +SUMMARY_${PN}-services-randomseed = "systemd's random seed save/restore service"
> +FILES_${PN}-services-randomseed = "\
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-random-seed.service \
> +        ${systemd_unitdir}/system/systemd-random-seed.service \
> +        ${rootlibexecdir}/systemd/systemd-random-seed \
> +"
> +
> +PACKAGES =+ "${PN}-services-readahead"
> +SUMMARY_${PN}-services-readahead = "systemd's disk read ahead service"
> +FILES_${PN}-services-readahead = "\
> +        ${systemd_unitdir}/system/systemd-readahead-collect.service \
> +        ${systemd_unitdir}/system/systemd-readahead-done.service \
> +        ${systemd_unitdir}/system/systemd-readahead-done.timer \
> +        ${systemd_unitdir}/system/systemd-readahead-drop.service \
> +        ${systemd_unitdir}/system/systemd-readahead-replay.service \
> +        ${rootlibexecdir}/systemd/systemd-readahead \
> +"
> +
> +PACKAGES =+ "${PN}-services-resolved"
> +SUMMARY_${PN}-services-resolved = "systemd's network name resolution management service"
> +# NOTE: if no sysusers or tmpfiles, then users/groups and FS structure must be setup
> +RRECOMMENDS_${PN}-services-resolved = "${PN}-services-dbus ${PN}-services-sysusers ${PN}-services-tmpfiles"
> +CONFFILES_${PN}-services-resolved = "\
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
> +        ${sysconfdir}/systemd/resolved.conf \
> +"
> +FILES_${PN}-services-resolved = "\
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
> +        ${sysconfdir}/systemd/resolved.conf \
> +        ${sysconfdir}/systemd/system/multi-user.target.wants/systemd-resolved.service \
> +        ${exec_prefix}/lib/libnss_resolve.so.2 \
> +        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.resolve1.busname \
> +        ${systemd_unitdir}/system/dbus-org.freedesktop.resolve1.service \
> +        ${systemd_unitdir}/system/org.freedesktop.resolve1.busname \
> +        ${systemd_unitdir}/system/systemd-resolved.service \
> +        ${rootlibexecdir}/systemd/systemd-resolve-host \
> +        ${rootlibexecdir}/systemd/systemd-resolved \
> +        ${datadir}/dbus-1/system-services/org.freedesktop.resolve1.service \
> +"
> +
> +PACKAGES =+ "${PN}-services-rfkill"
> +SUMMARY_${PN}-services-rfkill = "systemd's rfkill state save/restore service"
> +FILES_${PN}-services-rfkill = "\
> +        ${systemd_unitdir}/system/systemd-rfkill@.service \
> +        ${rootlibexecdir}/systemd/systemd-rfkill \
> +"
> +
> +PACKAGES =+ "${PN}-services-sleep"
> +SUMMARY_${PN}-services-sleep = "systemd's sleep, suspend and hiberate services"
> +FILES_${PN}-services-sleep = "\
> +        ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
> +        ${systemd_unitdir}/system/systemd-suspend.service \
> +        ${systemd_unitdir}/system/systemd-hibernate.service \
> +        ${systemd_unitdir}/system-sleep/ \
> +        ${rootlibexecdir}/systemd/systemd-sleep \
> +"
> +
> +PACKAGES =+ "${PN}-services-sysctl"
> +SUMMARY_${PN}-services-sysctl = "systemd's kernel parameters configuration service"
> +FILES_${PN}-services-sysctl = "\
> +        ${sysconfdir}/sysctl.d/ \
> +        ${exec_prefix}/lib/sysctl.d/ \
> +        ${exec_prefix}/lib/sysctl.d/50-default.conf \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-sysctl.service \
> +        ${systemd_unitdir}/system/systemd-sysctl.service \
> +        ${rootlibexecdir}/systemd/systemd-sysctl \
> +"
> +
> +PACKAGES =+ "${PN}-services-sysusers"
> +SUMMARY_${PN}-services-sysusers = "systemd's service and tool to allocate system users and groups"
> +FILES_${PN}-services-sysusers = "\
> +        ${base_bindir}/systemd-sysusers \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-sysusers.service \
> +        ${systemd_unitdir}/system/systemd-sysusers.service \
> +        ${exec_prefix}/lib/sysusers.d/basic.conf \
> +        ${exec_prefix}/lib/sysusers.d/systemd.conf \
> +"
> +
> +PACKAGES =+ "${PN}-services-sysvcompat"
> +SUMMARY_${PN}-services-sysvcompat = "systemd's SYSV legacy and compatibility service"
> +# NOTE: if no sysusers or tmpfiles, then users/groups and FS structure must be setup
> +RRECOMMENDS_${PN}-services-sysvcompat = "${PN}-services-sysusers ${PN}-services-tmpfiles"
> +FILES_${PN}-services-sysvcompat = "\
> +        ${rootlibexecdir}/systemd/systemd-bus-proxyd \
> +        ${rootlibexecdir}/systemd/systemd-socket-proxyd \
> +        ${bindir}/systemd-stdio-bridge \
> +        ${rootlibexecdir}/systemd/system-generators/systemd-rc-local-generator \
> +        ${rootlibexecdir}/systemd/system-generators/systemd-sysv-generator \
> +        ${rootlibexecdir}/systemd/systemd-initctl \
> +        ${rootlibexecdir}/systemd/systemd-update-utmp \
> +        ${systemd_unitdir}/system/halt-local.service \
> +        ${systemd_unitdir}/system/rc-local.service \
> +        ${systemd_unitdir}/system/runlevel1.target.wants/systemd-update-utmp-runlevel.service \
> +        ${systemd_unitdir}/system/runlevel2.target.wants/systemd-update-utmp-runlevel.service \
> +        ${systemd_unitdir}/system/runlevel3.target.wants/systemd-update-utmp-runlevel.service \
> +        ${systemd_unitdir}/system/runlevel4.target.wants/systemd-update-utmp-runlevel.service \
> +        ${systemd_unitdir}/system/runlevel5.target.wants/systemd-update-utmp-runlevel.service \
> +        ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-update-utmp.service \
> +        ${systemd_unitdir}/system/systemd-initctl.service \
> +        ${systemd_unitdir}/system/systemd-initctl.socket \
> +        ${systemd_unitdir}/system/systemd-update-utmp-runlevel.service \
> +        ${systemd_unitdir}/system/systemd-update-utmp.service \
> +        ${exec_prefix}/lib/tmpfiles.d/legacy.conf \
> +"
> +
> +PACKAGES =+ "${PN}-services-timedated"
> +SUMMARY_${PN}-services-timedated = "systemd's time and date management service"
> +RDEPENDS_${PN}-services-timedated = "${PN}-services-dbus"
> +CONFFILES_${PN}-services-timedated = "${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf"
> +FILES_${PN}-services-timedated = "\
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
> +        ${bindir}/timedatectl \
> +        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.timedate1.busname \
> +        ${systemd_unitdir}/system/dbus-org.freedesktop.timedate1.service \
> +        ${systemd_unitdir}/system/org.freedesktop.timedate1.busname \
> +        ${systemd_unitdir}/system/systemd-timedated.service \
> +        ${rootlibexecdir}/systemd/systemd-timedated \
> +        ${datadir}/dbus-1/system-services/org.freedesktop.timedate1.service \
> +        ${datadir}/polkit-1/actions/org.freedesktop.timedate1.policy \
> +"
> +
> +PACKAGES =+ "${PN}-services-timesyncd"
> +SUMMARY_${PN}-services-timesyncd = "systemd's NTP sync service"
> +# NOTE: if no sysusers, then users/groups must be setup
> +RRECOMMENDS_${PN}-services-timesyncd = "${PN}-services-sysusers"
> +CONFFILES_${PN}-services-timesyncd = "${sysconfdir}/systemd/timesyncd.conf"
> +FILES_${PN}-services-timesyncd = "\
> +        ${sysconfdir}/systemd/system/sysinit.target.wants/systemd-timesyncd.service \
> +        ${sysconfdir}/systemd/timesyncd.conf \
> +        ${systemd_unitdir}/system/systemd-timesyncd.service \
> +        ${rootlibexecdir}/systemd/systemd-timesyncd \
> +"
> +
> +PACKAGES =+ "${PN}-services-tmpfiles"
> +SUMMARY_${PN}-services-tmpfiles = "systemd's service to create, delete and clean up volatile/tmp files/dirs"
> +FILES_${PN}-services-tmpfiles = "\
> +        ${sysconfdir}/tmpfiles.d/ \
> +        ${base_bindir}/systemd-tmpfiles \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-tmpfiles-setup.service \
> +        ${systemd_unitdir}/system/systemd-tmpfiles-clean.service \
> +        ${systemd_unitdir}/system/systemd-tmpfiles-clean.timer \
> +        ${systemd_unitdir}/system/systemd-tmpfiles-setup-dev.service \
> +        ${systemd_unitdir}/system/systemd-tmpfiles-setup.service \
> +        ${systemd_unitdir}/system/timers.target.wants/systemd-tmpfiles-clean.timer \
> +        ${exec_prefix}/lib/tmpfiles.d/etc.conf \
> +        ${exec_prefix}/lib/tmpfiles.d/systemd-nologin.conf \
> +        ${exec_prefix}/lib/tmpfiles.d/systemd.conf \
> +        ${exec_prefix}/lib/tmpfiles.d/tmp.conf \
> +        ${exec_prefix}/lib/tmpfiles.d/var.conf \
> +        ${exec_prefix}/lib/tmpfiles.d/00-create-volatile.conf \
> +        ${exec_prefix}/lib/tmpfiles.d/x11.conf \
> +"
> +
> +PACKAGES =+ "${PN}-services-udev"
> +SUMMARY_${PN}-services-udev = "systemd's udev services"
> +RDEPENDS_${PN}-services-udev = "udev"
> +FILES_${PN}-services-udev = "\
> +        ${systemd_unitdir}/system/initrd-udevadm-cleanup-db.service \
> +        ${systemd_unitdir}/system/systemd-udev-hwdb-update.service \
> +        ${systemd_unitdir}/system/systemd-udev-settle.service \
> +        ${systemd_unitdir}/system/systemd-udev-trigger.service \
> +        ${systemd_unitdir}/system/systemd-udevd-control.socket \
> +        ${systemd_unitdir}/system/systemd-udevd-kernel.socket \
> +        ${systemd_unitdir}/system/systemd-udevd.service \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udevd.service \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udev-trigger.service \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udev-hwdb-update.service \
> +        ${systemd_unitdir}/system/sockets.target.wants/systemd-udevd-kernel.socket \
> +        ${systemd_unitdir}/system/sockets.target.wants/systemd-udevd-control.socket \
> +"
> +
> +PACKAGES =+ "${PN}-services-update"
> +SUMMARY_${PN}-services-update = "systemd's post update service"
> +FILES_${PN}-services-update = "\
> +        ${rootlibexecdir}/systemd/system-generators/systemd-system-update-generator \
> +        ${rootlibexecdir}/systemd/systemd-update-done \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-update-done.service \
> +        ${systemd_unitdir}/system/systemd-update-done.service \
> +"
> +
> +PACKAGES =+ "${PN}-services-vconsole"
> +SUMMARY_${PN}-services-vconsole = "systemd's service to configure the virtual console (keyboard/font)"
> +RDEPENDS_${PN}-services-vconsole = "kbd kbd-consolefonts kbd-keymaps"
> +FILES_${PN}-services-vconsole = "\
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service \
> +        ${systemd_unitdir}/system/systemd-vconsole-setup.service \
> +        ${rootlibexecdir}/systemd/systemd-vconsole-setup \
> +"
> +
> +########################################################################
> +# Standard BitBake Packages
> +########################################################################
> +
> +FILES_${PN}-dbg += "\
> +        ${base_libdir}/security/.debug/ \
> +        ${libdir}/systemd/ptest/.debug \
> +        ${rootlibdir}/.debug \
> +        ${systemd_unitdir}/*/.debug \
> +        ${systemd_unitdir}/.debug \
> +"
> +
> +FILES_${PN}-dev += "\
> +        ${base_libdir}/security/*.la \
> +        ${datadir}/dbus-1/interfaces/ \
> +"
> +
> +# The test cases need perl and bash to run correctly.
> +RDEPENDS_${PN}-ptest += "perl bash"
> +FILES_${PN}-ptest += "\
> +        ${libdir}/udev/rules.d \
> +"
> +
> +########################################################################
> +# Misc Packages
> +########################################################################
> +
> +PACKAGES =+ "${PN}-bash"
> +SUMMARY_${PN}-bash = "systemd bash shell commands completion"
> +FILES_${PN}-bash = "\
> +        ${datadir}/bash-completion/completions/bootctl \
> +        ${datadir}/bash-completion/completions/busctl \
> +        ${datadir}/bash-completion/completions/coredumpctl \
> +        ${datadir}/bash-completion/completions/hostnamectl \
> +        ${datadir}/bash-completion/completions/journalctl \
> +        ${datadir}/bash-completion/completions/kernel-install \
> +        ${datadir}/bash-completion/completions/localectl \
> +        ${datadir}/bash-completion/completions/loginctl \
> +        ${datadir}/bash-completion/completions/machinectl \
> +        ${datadir}/bash-completion/completions/systemctl \
> +        ${datadir}/bash-completion/completions/systemd-* \
> +        ${datadir}/bash-completion/completions/timedatectl \
> +"
> +
> +PACKAGES =+ "${PN}-initramfs"
> +SUMMARY_${PN}-initramfs = "systemd's initramfs support"
> +FILES_${PN}-initramfs = "/init"
> +RDEPENDS_${PN}-initramfs = "${PN}"
> +
> +PACKAGES =+ "${PN}-kernel-install"
> +SUMMARY_${PN}-kernel-install = "systemd tool to add/remove kernel and initramfs images to/from /boot"
> +RDEPENDS_${PN}-kernel-install = "bash kmod"
> +FILES_${PN}-kernel-install = "\
> +        ${bindir}/kernel-install \
> +        ${sysconfdir}/kernel/install.d/ \
> +        ${exec_prefix}/lib/kernel/install.d/ \
> +"
> +
> +PACKAGES =+ "${PN}-pam"
> +SUMMARY_${PN}-pam = "systemd PAM modules and configuration"
> +FILES_${PN}-pam = "\
> +        ${sysconfdir}/pam.d \
> +        ${base_libdir}/security/pam_systemd.so \
> +"
> +
> +PACKAGES =+ "${PN}-preset"
> +SUMMARY_${PN}-preset = "systemd's service enablement presets"
> +FILES_${PN}-preset = "${systemd_unitdir}/system-preset/90-systemd.preset"
> +
> +PACKAGES =+ "${PN}-rpm-macros"
> +SUMMARY_${PN}-rpm-macros = "systemd RPM macros"
> +FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm/macros.d/macros.systemd"
> +
> +PACKAGES =+ "${PN}-zsh"
> +SUMMARY_${PN}-zsh = "systemd zsh shell commands completion"
> +FILES_${PN}-zsh = "\
> +        ${datadir}/zsh/site-functions/_bootctl \
> +        ${datadir}/zsh/site-functions/_busctl \
> +        ${datadir}/zsh/site-functions/_coredumpctl \
> +        ${datadir}/zsh/site-functions/_hostnamectl \
> +        ${datadir}/zsh/site-functions/_journalctl \
> +        ${datadir}/zsh/site-functions/_kernel-install \
> +        ${datadir}/zsh/site-functions/_localectl \
> +        ${datadir}/zsh/site-functions/_loginctl \
> +        ${datadir}/zsh/site-functions/_machinectl \
> +        ${datadir}/zsh/site-functions/_sd_* \
> +        ${datadir}/zsh/site-functions/_systemctl \
> +        ${datadir}/zsh/site-functions/_systemd \
> +        ${datadir}/zsh/site-functions/_systemd-* \
> +        ${datadir}/zsh/site-functions/_timedatectl \
> +"
> +
> +
> +########################################################################
> +# Aggregation of Split Packages
> +########################################################################
> +
> +PACKAGES =+ "${PN}-services-essential"
> +SUMMARY_${PN}-services-essential = "systemd's essential services aggregation"
> +ALLOW_EMPTY_${PN}-services-essential = "1"
> +RDEPENDS_${PN}-services-essential = "\
> +        ${PN}-generators-filesystems \
> +        ${PN}-preset \
> +        ${PN}-services-fsck \
> +        ${PN}-services-journal \
> +        ${PN}-services-modules-load \
> +        ${PN}-services-randomseed \
> +        ${PN}-services-sleep \
> +        ${PN}-services-sysctl \
> +        ${PN}-services-sysusers \
> +        ${PN}-services-tmpfiles \
> +        ${PN}-services-udev \
> +        udev-rules-systemd \
> +"
> +
> +PACKAGES =+ "${PN}-services-base"
> +SUMMARY_${PN}-services-base = "systemd's base services aggregation"
> +ALLOW_EMPTY_${PN}-services-base = "1"
> +RDEPENDS_${PN}-services-base = "${PN}-services-essential \
> +        ${PN}-services-ask-password \
> +        ${PN}-services-backlight \
> +        ${PN}-services-binfmt \
> +        ${PN}-services-coredump \
> +        ${PN}-services-dbus \
> +        ${PN}-services-firstboot \
> +        ${PN}-services-fuse \
> +        ${PN}-services-hostnamed \
> +        ${PN}-services-ldconfig \
> +        ${PN}-services-localed \
> +        ${PN}-services-logind \
> +        ${PN}-services-networkd \
> +        ${PN}-services-quota \
> +        ${PN}-services-resolved \
> +        ${PN}-services-rfkill \
> +        ${PN}-services-timedated \
> +        ${PN}-services-timesyncd \
> +        ${PN}-services-update \
> +        ${PN}-services-vconsole \
> +"
> +
> +PACKAGES =+ "${PN}-services-all"
> +SUMMARY_${PN}-services-all = "systemd's all services and tools aggregation"
> +ALLOW_EMPTY_${PN}-services-all = "1"
> +RDEPENDS_${PN}-services-all = "${PN}-services-base \
> +        ${PN}-services-bootchart \
> +        ${PN}-services-cryptsetup \
> +        ${PN}-services-debug \
> +        ${PN}-services-journal-remote \
> +        ${PN}-services-journal-upload \
> +        ${PN}-services-machined \
> +        ${PN}-services-nspawn \
> +        ${PN}-services-sysvcompat \
> +        ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${PN}-services-multi-seat-x', '', d)} \
> +        ${PN}-tools \
> +"
> +
> +
> +########################################################################
> +# Core Package
> +########################################################################
> +
> +CONFFILES_${PN} = "\
> +        ${sysconfdir}/machine-id \
> +        ${sysconfdir}/systemd/system.conf \
> +        ${sysconfdir}/systemd/user.conf \
> +"
> +
> +FILES_${PN} = "\
> +        ${base_bindir}/systemctl \
> +        ${base_bindir}/systemd-hwdb \
> +        ${bindir}/bootctl \
> +        ${datadir}/${BPN} \
> +        ${datadir}/factory \
> +        ${exec_prefix}/lib/libnss_myhostname* \
> +        ${libdir}/systemd/user-generators/ \
> +        ${libdir}/systemd/user/ \
> +        ${localstatedir} \
> +        ${rootlibexecdir}/systemd/systemd \
> +        ${rootlibexecdir}/systemd/systemd-cgroups-agent \
> +        ${rootlibexecdir}/systemd/systemd-shutdown \
> +        ${rootlibexecdir}/systemd/systemd-shutdownd \
> +        ${rootlibexecdir}/systemd/systemd-machine-id-commit \
> +        ${rootlibexecdir}/systemd/systemd-hibernate-resume \
> +        ${rootlibexecdir}/systemd/systemd-importd \
> +        ${rootlibexecdir}/systemd/import-pubring.gpg \
> +        ${rootlibexecdir}/systemd/systemd-pull \
> +        ${sysconfdir}/init.d/README \
> +        ${sysconfdir}/machine-id \
> +        ${sysconfdir}/systemd/system.conf \
> +        ${sysconfdir}/systemd/system/ \
> +        ${sysconfdir}/systemd/user.conf \
> +        ${sysconfdir}/systemd/user/ \
> +        ${sysconfdir}/xdg/systemd/ \
> +        ${systemd_unitdir}/system-generators/ \
> +        ${systemd_unitdir}/system-preset/ \
> +        ${systemd_unitdir}/system-shutdown/ \
> +        ${systemd_unitdir}/system/ \
> +"
> +
> +#RDEPENDS_${PN} += "volatile-binds"
> +
> +RRECOMMENDS_${PN} += "\
> +        ${PN}-services-base \
> +        ${PN}-services-essential \
> +        ${PN}-generators-getty \
> +        ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PN}-pam', '', d)} \
> +        ${PN}-services-getty \
> +        ${PN}-tools \
> +        kernel-module-autofs4 \
> +        kernel-module-ipv6 \
> +        kernel-module-unix \
> +        os-release \
> +        udev (= ${EXTENDPKGV}) \
> +        udev-hwdb \
> +"
> +
> +ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
> +
> +ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
> +ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
> +ALTERNATIVE_PRIORITY[init] ?= "300"
> +
> +ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
> +ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
> +ALTERNATIVE_PRIORITY[halt] ?= "300"
> +
> +ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
> +ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
> +ALTERNATIVE_PRIORITY[reboot] ?= "300"
> +
> +ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
> +ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
> +ALTERNATIVE_PRIORITY[shutdown] ?= "300"
> +
> +ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
> +ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
> +ALTERNATIVE_PRIORITY[poweroff] ?= "300"
> +
> +ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
> +ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
> +ALTERNATIVE_PRIORITY[runlevel] ?= "300"
> +
> +
> +########################################################################
> +# UDEV Section
> +########################################################################
> +
> +PACKAGES =+ "udev-dbg"
> +SUMMARY_udev-dbg = "Dynamic device management - Debugging files"
> +RRECOMMENDS_udev-dbg += "${PN}-dbg"
> +FILES_udev-dbg = "\
> +        ${rootlibexecdir}/udev/.debug \
> +        ${base_sbindir}/.debug/udevd \
> +        ${base_bindir}/.debug/udevadm \
> +        ${rootlibexecdir}/systemd/.debug/systemd-udevd \
> +        ${base_libdir}/.debug/libudev* \
> +        ${base_libdir}/.debug/libgudev* \
> +        ${exec_prefix}/lib/.debug/libgudev* \
> +"
> +
> +PACKAGES =+ "udev-dev"
> +SUMMARY_udev-dev = "Dynamic device management - Development files"
> +RRECOMMENDS_udev-dev += "${PN}-dev"
> +FILES_udev-dev = "\
> +        ${datadir}/pkgconfig/*udev* \
> +        ${libdir}/pkgconfig/*udev* \
> +        ${libdir}/lib*udev*.la \
> +        ${includedir}/*udev* \
> +"
> +
> +PACKAGES =+ "udev-hwdb"
> +SUMMARY_udev-hwdb = "Dynamic device management - Hardware database"
> +RDEPENDS_udev-hwdb = "udev"
> +FILES_udev-hwdb = "\
> +        ${rootlibexecdir}/udev/hwdb.d/ \
> +"
> +
> +pkg_postinst_udev-hwdb () {
> +	if test -n "$D"; then
> +		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
> +			--root $D
> +	else
> +		udevadm hwdb --update
> +	fi
> +}
> +
> +pkg_prerm_udev-hwdb () {
> +	if test -n "$D"; then
> +		exit 1
> +	fi
> +
> +	rm -f ${sysconfdir}/udev/hwdb.bin
> +}
> +
> +PACKAGES =+ "udev-bash"
> +SUMMARY_udev-bash = "Dynamic device management - Bash shell commands completion"
> +FILES_udev-bash = "${datadir}/bash-completion/completions/udevadm"
> +
> +PACKAGES =+ "udev-zsh"
> +SUMMARY_udev-zsh = "Dynamic device management - zsh shell commands completion"
> +FILES_udev-zsh = "${datadir}/zsh/site-functions/_udevadm"
> +
> +
> +########################################################################
> +# UDEV Rules Packages
> +# split rules that require external programs or dependencies.
> +# those that use only builtins are not split
> +########################################################################
> +
> +PACKAGES =+ "udev-rules-accelerometer"
> +SUMMARY_udev-rules-accelerometer = "Dynamic device management - accelerometer rules"
> +FILES_udev-rules-accelerometer = "\
> +        ${rootlibexecdir}/udev/accelerometer \
> +        ${rootlibexecdir}/udev/rules.d/61-accelerometer.rules \
> +"
> +
> +PACKAGES =+ "udev-rules-cdrom"
> +SUMMARY_udev-rules-cdrom = "Dynamic device management - cdrom rules"
> +FILES_udev-rules-cdrom = "\
> +        ${rootlibexecdir}/udev/cdrom_id \
> +        ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \
> +"
> +
> +PACKAGES =+ "udev-rules-mtd"
> +SUMMARY_udev-rules-mtd = "Dynamic device management - mtd rules"
> +FILES_udev-rules-mtd = "\
> +        ${rootlibexecdir}/udev/mtd_probe \
> +        ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \
> +"
> +
> +PACKAGES =+ "udev-rules-persistent-storage"
> +SUMMARY_udev-rules-persistent-storage = "Dynamic device management - persistent storage rules"
> +FILES_udev-rules-persistent-storage = "\
> +        ${rootlibexecdir}/udev/ata_id \
> +        ${rootlibexecdir}/udev/scsi_id \
> +        ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \
> +        ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \
> +"
> +
> +PACKAGES =+ "udev-rules-systemd"
> +SUMMARY_udev-rules-systemd = "Dynamic device management - systemd rules"
> +RDEPENDS_udev-rules-systemd = "${PN} ${PN}-services-sysctl"
> +FILES_udev-rules-systemd = "\
> +        ${rootlibexecdir}/udev/rules.d/99-systemd.rules \
> +"
> +
> +PACKAGES =+ "udev-rules-v4l"
> +SUMMARY_udev-rules-v4l = "Dynamic device management - v4l rules"
> +FILES_udev-rules-v4l = "\
> +        ${rootlibexecdir}/udev/v4l_id \
> +        ${rootlibexecdir}/udev/rules.d/*-persistent-v4l.rules \
> +"
> +
> +PACKAGES =+ "udev-rules-all"
> +SUMMARY_udev-rules-all = "Dynamic device management - all rules aggregation"
> +ALLOW_EMPTY_udev-rules-all = "1"
> +RDEPENDS_udev-rules-all = "\
> +        udev-rules-accelerometer \
> +        udev-rules-cdrom \
> +        udev-rules-mtd \
> +        udev-rules-persistent-storage \
> +        udev-rules-systemd \
> +        udev-rules-v4l \
> +"
> +
> +PACKAGES =+ "udev"
> +SUMMARY_udev = "Dynamic device management"
> +RPROVIDES_udev = "hotplug"
> +PROVIDES = "udev"
> +CONFFILES_udev = "${sysconfdir}/udev/udev.conf"
> +FILES_udev = "\
> +        ${base_bindir}/udevadm \
> +        ${base_sbindir}/udevd \
> +        ${rootlibexecdir}/systemd/systemd-udevd \
> +        ${rootlibexecdir}/udev/collect \
> +        ${rootlibexecdir}/udev/rules.d/42-usb-hid-pm.rules \
> +        ${rootlibexecdir}/udev/rules.d/50-firmware.rules \
> +        ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \
> +        ${rootlibexecdir}/udev/rules.d/60-drm.rules \
> +        ${rootlibexecdir}/udev/rules.d/60-keyboard.rules \
> +        ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \
> +        ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \
> +        ${rootlibexecdir}/udev/rules.d/60-persistent-serial.rules \
> +        ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \
> +        ${rootlibexecdir}/udev/rules.d/75-net-description.rules \
> +        ${rootlibexecdir}/udev/rules.d/75-tty-description.rules \
> +        ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \
> +        ${rootlibexecdir}/udev/rules.d/80-drivers.rules \
> +        ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \
> +        ${rootlibexecdir}/udev/rules.d/95-udev-late.rules \
> +        ${rootlibexecdir}/udev/rules.d/70-mouse.rules \
> +        ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
> +        ${rootlibexecdir}/udev/rules.d/touchscreen.rules \
> +        ${sysconfdir}/init.d/systemd-udevd \
> +        ${sysconfdir}/udev \
> +"
> +
> +RRECOMMENDS_udev = "\
> +        udev-hwdb \
> +        udev-rules-all \
> +"
> +
> +INITSCRIPT_PACKAGES = "udev"
> +INITSCRIPT_NAME_udev = "systemd-udevd"
> +INITSCRIPT_PARAMS_udev = "start 03 S ."
> +
> +python __anonymous() {
> +    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
> +        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
> +}
> +
> +# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
> +# that we don't build both udev and systemd in world builds.
> +python () {
> +    if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
> +        raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
> +}
>

Bruno, could you create separate patches for the upgrade and for the 
repackaging? Also what type of testing has been done for partial installs?




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

* Re: [PATCH] systemd: update version from 216 to 218
  2015-02-03 21:23     ` Randy Witt
@ 2015-02-03 21:33       ` Bottazzini, Bruno
  0 siblings, 0 replies; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-02-03 21:33 UTC (permalink / raw)
  To: Randy Witt; +Cc: openembedded-core

On Tue, 3 Feb 2015 13:23:32 -0800
Randy Witt <randy.e.witt@linux.intel.com> wrote:

> On 02/03/2015 10:21 AM, Bruno Bottazzini wrote:
> > Spliting into packages to be able to choose what to be installed.
> > The final result may get smaller, if the user wanted to.
> > By default it will install the whole systemd which may be big.
> > ---
> >   ...r-executing-scripts-under-etc-systemd-218.patch |  131 ++
> >   .../systemd/systemd_218-pam-fix-fallocate.patch    |   91 ++
> >   meta/recipes-core/systemd/systemd_218.bb           | 1251
> > ++++++++++++++++++++ 3 files changed, 1473 insertions(+)
> >   create mode 100644
> > meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch
> > create mode 100644
> > meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch
> > create mode 100644 meta/recipes-core/systemd/systemd_218.bb
> >
> > diff --git
> > a/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch
> > b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch
> > new file mode 100644 index 0000000..d50f2cb --- /dev/null
> > +++
> > b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch
> > @@ -0,0 +1,131 @@ +From 0dec519c563654148d3cdd363d2598b50313de60
> > Mon Sep 17 00:00:00 2001 +From: Bruno Bottazzini
> > <bruno.bottazzini@intel.com> +Date: Mon, 2 Feb 2015 13:53:24 -0200
> > +Subject: [PATCH 1/1] add support for executing scripts
> > under /etc/rcS.d/ +
> > +To be compatible, all services translated from scripts
> > under /etc/rcS.d would +run before services translated from scripts
> > under /etc/rcN.d. +---
> > + src/sysv-generator/sysv-generator.c | 46
> > ++++++++++++++++++++++++++++---------
> > + 1 file changed, 35 insertions(+), 11 deletions(-)
> > +
> > +diff --git a/src/sysv-generator/sysv-generator.c
> > b/src/sysv-generator/sysv-generator.c +index b8b77aa..9494afb 100644
> > +--- a/src/sysv-generator/sysv-generator.c
> > ++++ b/src/sysv-generator/sysv-generator.c
> > +@@ -42,7 +42,8 @@
> > +
> > + typedef enum RunlevelType {
> > +         RUNLEVEL_UP,
> > +-        RUNLEVEL_DOWN
> > ++        RUNLEVEL_DOWN,
> > ++        RUNLEVEL_SYSINIT
> > + } RunlevelType;
> > +
> > + static const struct {
> > +@@ -57,6 +58,9 @@ static const struct {
> > +         { "rc4.d",  SPECIAL_RUNLEVEL4_TARGET, RUNLEVEL_UP },
> > +         { "rc5.d",  SPECIAL_RUNLEVEL5_TARGET, RUNLEVEL_UP },
> > +
> > ++        /* Debian style rcS.d, also adopted by OE */
> > ++        { "rcS.d",  SPECIAL_SYSINIT_TARGET,   RUNLEVEL_SYSINIT},
> > ++
> > +         /* Standard SysV runlevels for shutdown */
> > +         { "rc0.d",  SPECIAL_POWEROFF_TARGET,  RUNLEVEL_DOWN },
> > +         { "rc6.d",  SPECIAL_REBOOT_TARGET,    RUNLEVEL_DOWN }
> > +@@ -65,7 +69,7 @@ static const struct {
> > +            directories in this order, and we want to make sure
> > that
> > +            sysv_start_priority is known when we first load the
> > +            unit. And that value we only know from S links. Hence
> > +-           UP must be read before DOWN */
> > ++           UP/SYSINIT must be read before DOWN */
> > + };
> > +
> > + typedef struct SysvStub {
> > +@@ -81,6 +85,8 @@ typedef struct SysvStub {
> > +         char **conflicts;
> > +         bool has_lsb;
> > +         bool reload;
> > ++        bool default_dependencies;
> > ++        bool from_rcsd;
> > + } SysvStub;
> > +
> > + const char *arg_dest = "/tmp";
> > +@@ -189,6 +195,8 @@ static int generate_unit_file(SysvStub *s) {
> > +                 "Description=%s\n",
> > +                 s->path, s->description);
> > +
> > ++        if (!s->default_dependencies)
> > ++                fprintf(f, "DefaultDependencies=no\n");
> > +         if (!isempty(before))
> > +                 fprintf(f, "Before=%s\n", before);
> > +         if (!isempty(after))
> > +@@ -717,15 +725,26 @@ static int fix_order(SysvStub *s, Hashmap
> > *all_services) {
> > +                         r = strv_extend(&s->after, other->name);
> > +                         if (r < 0)
> > +                                 return log_oom();
> > +-                }
> > +-                else if (other->sysv_start_priority >
> > s->sysv_start_priority) { +-                        r =
> > strv_extend(&s->before, other->name); ++               } else if
> > (other->from_rcsd && !s->from_rcsd) { ++                        r =
> > strv_extend(&s->after, other->name);
> > +                         if (r < 0)
> > +                                 return log_oom();
> > +-                }
> > +-                else
> > +-                        continue;
> > +-
> > ++        } else {
> > ++          /* All scripts under /etc/rcS.d should execute before
> > scripts under ++           * /etc/rcN.d */
> > ++                 if (!other->from_rcsd && s->from_rcsd) {
> > ++                         r = strv_extend(&s->before, other->name);
> > ++                                if (r < 0)
> > ++                                        return log_oom();
> > ++                        }
> > ++                        else if (other->sysv_start_priority >
> > s->sysv_start_priority) { ++                                r =
> > strv_extend(&s->before, other->name);
> > ++                                if (r < 0)
> > ++                                        return log_oom();
> > ++                        } ++                        else
> > ++                                continue;
> > ++               }
> > +                 /* FIXME: Maybe we should compare the name here
> > lexicographically? */
> > +         }
> > +
> > +@@ -784,6 +803,8 @@ static int enumerate_sysv(LookupPaths lp,
> > Hashmap *all_services) {
> > +                                 return log_oom();
> > +
> > +                         service->sysv_start_priority = -1;
> > ++                        service->default_dependencies = true;
> > ++                        service->from_rcsd = false;
> > +                         service->name = name;
> > +                         service->path = fpath;
> > +
> > +@@ -869,9 +890,11 @@ static int
> > set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services)
> > { +
> > +                                 if (de->d_name[0] == 'S')  {
> > +
> > +-                                        if (rcnd_table[i].type ==
> > RUNLEVEL_UP) { ++                                        if
> > (rcnd_table[i].type == RUNLEVEL_UP || rcnd_table[i].type ==
> > RUNLEVEL_SYSINIT) {
> > +
> > service->sysv_start_priority =
> > +                                                         MAX(a*10
> > + b, service->sysv_start_priority);
> > ++
> > service->default_dependencies = (rcnd_table[i].type ==
> > RUNLEVEL_SYSINIT)?false:true;
> > ++
> > service->from_rcsd = (rcnd_table[i].type ==
> > RUNLEVEL_SYSINIT)?true:false;
> > +                                         }
> > +
> > +                                         r =
> > set_ensure_allocated(&runlevel_services[i], NULL); +@@ -883,7
> > +906,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp,
> > Hashmap *all_services) {
> > +                                                 goto finish;
> > +
> > +                                 } else if (de->d_name[0] == 'K' &&
> > +-                                           (rcnd_table[i].type ==
> > RUNLEVEL_DOWN)) { ++
> > (rcnd_table[i].type == RUNLEVEL_DOWN ||
> > ++                                         rcnd_table[i].type ==
> > RUNLEVEL_SYSINIT)) { +
> > +                                         r =
> > set_ensure_allocated(&shutdown_services, NULL);
> > +                                         if (r < 0)
> > +--
> > +1.9.1
> > +
> > diff --git
> > a/meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch
> > b/meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch
> > new file mode 100644 index 0000000..2fbf4b4 --- /dev/null
> > +++
> > b/meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch
> > @@ -0,0 +1,91 @@ +From 84c87cf474f9ffd23332a40b7e06900ff8272a69 Mon
> > Sep 17 00:00:00 2001 +From: Bruno Bottazzini
> > <bruno.bottazzini@intel.com> +Date: Fri, 30 Jan 2015 18:14:42 -0200
> > +Subject: [PATCH 1/1] This patch is uclibc specific, thus not
> > suitable for
> > + upstream.
> > +
> > +---
> > + src/journal/journal-file.c  | 15 ++++++++++++++-
> > + src/journal/journald-kmsg.c | 16 ++++++++++++++--
> > + 2 files changed, 28 insertions(+), 3 deletions(-)
> > +
> > +diff --git a/src/journal/journal-file.c
> > b/src/journal/journal-file.c +index ec12e89..3d21528 100644
> > +--- a/src/journal/journal-file.c
> > ++++ b/src/journal/journal-file.c
> > +@@ -35,6 +35,7 @@
> > + #include "lookup3.h"
> > + #include "compress.h"
> > + #include "fsprg.h"
> > ++#include "config.h"
> > +
> > + #define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*sizeof(HashItem))
> > + #define DEFAULT_FIELD_HASH_TABLE_SIZE (333ULL*sizeof(HashItem))
> > +@@ -354,7 +355,7 @@ static int journal_file_fstat(JournalFile *f) {
> > +
> > + static int journal_file_allocate(JournalFile *f, uint64_t offset,
> > uint64_t size) {
> > +         uint64_t old_size, new_size;
> > +-        int r;
> > ++        int r = 0;
> > +
> > +         assert(f);
> > +
> > +@@ -418,9 +419,21 @@ static int journal_file_allocate(JournalFile
> > *f, uint64_t offset, uint64_t size)
> > +         /* Note that the glibc fallocate() fallback is very
> > +            inefficient, hence we try to minimize the allocation
> > area
> > +            as we can. */
> > ++#ifdef HAVE_POSIX_FALLOCATE
> > +         r = posix_fallocate(f->fd, old_size, new_size - old_size);
> > +         if (r != 0)
> > +                 return -r;
> > ++#else
> > ++        /* Write something every 512 bytes to make sure the block
> > is allocated */ ++        uint64_t len = new_size - old_size;
> > ++        uint64_t offset = old_size;
> > ++        for (offset += (len-1) % 512; len > 0; offset += 512) {
> > ++                len -= 512;
> > ++                if (pwrite(f->fd, "", 1, offset) != 1)
> > ++                        return -errno;
> > ++        }
> > ++
> > ++#endif /* HAVE_POSIX_FALLOCATE */
> > +
> > +         f->header->arena_size = htole64(new_size -
> > le64toh(f->header->header_size)); +
> > +diff --git a/src/journal/journald-kmsg.c
> > b/src/journal/journald-kmsg.c +index aca4571..f3c2c19 100644
> > +--- a/src/journal/journald-kmsg.c
> > ++++ b/src/journal/journald-kmsg.c
> > +@@ -437,6 +437,7 @@ fail:
> > + int server_open_kernel_seqnum(Server *s) {
> > +         _cleanup_close_ int fd;
> > +         uint64_t *p;
> > ++        int r = 0;
> > +
> > +         assert(s);
> > +
> > +@@ -449,8 +450,19 @@ int server_open_kernel_seqnum(Server *s) {
> > +                 log_error_errno(errno, "Failed to
> > open /run/systemd/journal/kernel-seqnum, ignoring: %m");
> > +                 return 0;
> > +         }
> > +-
> > +-        if (posix_fallocate(fd, 0, sizeof(uint64_t)) < 0) {
> > ++#ifdef HAVE_POSIX_FALLOCATE
> > ++        r = posix_fallocate(fd, 0, sizeof(uint64_t));
> > ++#else
> > ++       /* Use good old method to write zeros into the journal file
> > ++          perhaps very inefficient yet working. */
> > ++       char *buf = alloca(sizeof(uint64_t));
> > ++       off_t oldpos = lseek(fd, 0, SEEK_CUR);
> > ++       bzero(buf, sizeof(uint64_t));
> > ++       lseek(fd, 0, SEEK_SET);
> > ++       r = write(fd, buf, sizeof(uint64_t));
> > ++       lseek(fd, oldpos, SEEK_SET);
> > ++#endif /* HAVE_POSIX_FALLOCATE */
> > ++       if (r < 0) {
> > +                 log_error_errno(errno, "Failed to allocate
> > sequential number file, ignoring: %m");
> > +                 return 0;
> > +         }
> > +--
> > +1.9.1
> > +
> > diff --git a/meta/recipes-core/systemd/systemd_218.bb
> > b/meta/recipes-core/systemd/systemd_218.bb new file mode 100644
> > index 0000000..9f9dbb0
> > --- /dev/null
> > +++ b/meta/recipes-core/systemd/systemd_218.bb
> > @@ -0,0 +1,1251 @@
> > +SUMMARY = "System and service manager for Linux, replacing
> > SysVinit" +HOMEPAGE =
> > "http://www.freedesktop.org/wiki/Software/systemd" +
> > +LICENSE = "GPLv2 & LGPLv2.1 & MIT"
> > +LIC_FILES_CHKSUM =
> > "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
> > +
> > file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
> > +
> > file://LICENSE.MIT;md5=544799d0b492f119fa04641d1b8868ed" +
> > +PE = "1"
> > +
> > +DEPENDS = "docbook-sgml-dtd-4.1-native intltool-native
> > gperf-native libcap qemu-native curl glibc" +DEPENDS +=
> > "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" +
> > +SECTION = "base/shell"
> > +
> > +inherit gtk-doc pkgconfig autotools perlnative update-rc.d
> > update-alternatives qemu systemd ptest gettext +
> > +SRCREV = "820aced6f6067a6b7c57b7d36e44f64378870cbf"
> > +
> > +PV = "218+git${SRCPV}"
> > +
> > +SRC_URI =
> > "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=git
> > \
> > +           file://systemd-pam-configure-check-uclibc.patch \
> > +           file://systemd-pam-fix-execvpe.patch \
> > +           file://systemd-pam-fix-mkostemp.patch \
> > +           file://systemd_218-pam-fix-fallocate.patch \
> > +           file://optional_secure_getenv.patch \
> > +           file://uclibc-get-physmem.patch \
> > +
> > file://0001-add-support-for-executing-scripts-under-etc-systemd-218.patch
> > \
> > +           file://0001-systemd-user-avoid-using-system-auth.patch \
> > +           file://touchscreen.rules \
> > +           file://00-create-volatile.conf \
> > +           file://init \
> > +           file://run-ptest \
> > +          "
> > +
> > +S = "${WORKDIR}/git"
> > +
> > +SRC_URI_append_libc-uclibc = "\
> > +
> > file://systemd-pam-fix-getty-unit.patch \
> > +                            "
> > +LDFLAGS_append_libc-uclibc = " -lrt"
> > +
> > +GTKDOC_DOCDIR = "${S}/docs/"
> > +
> > +# regardless of PACKAGECONFIG, libgcrypt is always required to
> > expand +# the AM_PATH_LIBGCRYPT autoconf macro
> > +DEPENDS += "libgcrypt"
> > +
> > +PACKAGECONFIG ??= "acl blkid efi kmod gcrypt lz4 xz libidn"
> > +
> > +PACKAGECONFIG[glib] = "--enable-gudev,--disable-gudev,glib-2.0"
> > +
> > +
> > +########################################################################
> > +# Highly Recommended Section
> > +########################################################################
> > +
> > +# ACL (Access Control List), see
> > http://savannah.nongnu.org/projects/acl +# used by systemd,
> > journald and logind to provide fine grained access to files. +#
> > NOTE: do not remove unless you know what you are doing.
> > +PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl" +
> > +# blkid from util-linux to read block devices, see
> > ftp://ftp.kernel.org/pub/linux/utils/util-linux +# required to:
> > +#  - discover and mount GPT partitions as /, /home and /srv based
> > on GUIDs. +#  - nspawn to locate partitions
> > +#  - udev to probe and use block devices
> > +# NOTE: do not remove unless you know what you are doing.
> > +PACKAGECONFIG[blkid] = "--enable-blkid,--disable-blkid,util-linux"
> > +
> > +# EFI support in systemd and udev, includes discovery and mount of
> > partitions and efivars. +# NOTE: do not remove unless you know what
> > you are doing. +PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
> > +
> > +# kmod to load kernel modules, provides modprobe, insmod et al,
> > see https://www.kernel.org/pub/linux/utils/kernel/kmod/ +# required
> > to: +#  - let systemd load required modules automatically (ipv6,
> > unix, kdbus...) +#  - let udev load modules for devices (hotplug
> > and coldplug) using a built-in +# NOTE: do not remove unless you
> > know what you are doing. +PACKAGECONFIG[kmod] =
> > "--enable-kmod,--disable-kmod,kmod" +
> > +# D-Bus policy and authentication framework, see
> > http://www.freedesktop.org/wiki/Software/polkit/ +# WARN: no
> > package "polkit" in poky +PACKAGECONFIG[polkit] =
> > "--enable-polkit,--disable-polkit,,polkit" +
> > +
> > +########################################################################
> > +# Security Section
> > +########################################################################
> > +
> > +# SELinux (Security Enhanced Linux), see
> > http://selinuxproject.org/page/Main_Page +# WARN: no package
> > "libselinux" in poky +PACKAGECONFIG[selinux] =
> > "--enable-selinux,--disable-selinux,libselinux" +
> > +# See http://people.redhat.com/sgrubb/audit/
> > +# WARN: no package "libaudit" in poky
> > +PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,libaudit"
> > +
> > +# SMACK (Simplified Mandatory Access Control Kernel), see
> > http://schaufler-ca.com/ +# needs Kernel CONFIG_SECURITY_SMACK
> > and /etc/smack/accesses.d/ to be useful, otherwise is unused.
> > +PACKAGECONFIG[smack] = "--enable-smack,--disable-smack" +
> > +# IMA (Integrity Measurement Architecture) setup, see
> > http://linux-ima.sourceforge.net/ +# needs Kernel CONFIG_IMA
> > and /etc/ima/ima-policy to be useful, otherwise is unused.
> > +PACKAGECONFIG[ima] = "--enable-ima,--disable-ima" +
> > +# AppArmor, proactively protects the operating system and
> > applications +# from external or internal threats, even zero-day
> > attacks, by +# enforcing good behavior and preventing even unknown
> > application flaws +# from being exploited. See
> > http://wiki.apparmor.net/index.php/Main_Page +# needs Kernel
> > CONFIG_SECURITY_APPARMOR to be useful, otherwise is unused. +#
> > WARN: no package "libapparmor" in poky +PACKAGECONFIG[apparmor] =
> > "--enable-apparmor,--disable-apparmor,libapparmor" +
> > +# SECCOMP provides syscall filtering and sandboxing, see
> > http://sourceforge.net/projects/libseccomp/ +# It is used by
> > browsers to implement their plugins. +# systemd will allow
> > restricting the syscalls available to an application with a line
> > like below +# in [Service] block: +#    SystemCallFilter=brk mmap
> > access open fstat close read fstat mprotect arch_prctl munmap write
> > +# needs Kernel CONFIG_SECCOMP, CONFIG_SECCOMP_FILTER and
> > CONFIG_HAVE_ARCH_SECCOMP_FILTER to be useful. +# WARN: no package
> > "libseccomp" in poky +PACKAGECONFIG[seccomp] =
> > "--enable-seccomp,--disable-seccomp,libseccomp" + +
> > +########################################################################
> > +# Journal Section
> > +########################################################################
> > +
> > +# extract ELF symbols and store the stack trace along the coredump
> > +PACKAGECONFIG[elfutils] =
> > "--enable-elfutils,--disable-elfutils,elfutils (>= 0.158)" +
> > +# Sign the journal for anti-tampering
> > +PACKAGECONFIG[gcrypt] =
> > "--enable-gcrypt,--disable-gcrypt,libgcrypt" +
> > +# Compress the journal (and coredumps stored in the journal) using
> > lz4 +PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
> > +
> > +# Compress the journal (and coredumps stored in the journal) using
> > xz (lzma) +# xz has lower priority than lz4 for compression, but
> > having both may help to extract and decompress +# journal entries
> > generated in other systems. +PACKAGECONFIG[xz] =
> > "--enable-xz,--disable-xz,xz" +
> > +# when generating gcrypt verification keys (journalctl
> > --setup-keys), output the secret +# as QR code so it can be easily
> > scanned by a phone or systems with digital camera and QR scanner.
> > +# WARN: no package "libqrencode" in poky +PACKAGECONFIG[qrencode]
> > = "--enable-qrencode,--disable-qrencode,libqrencode" +
> > +
> > +########################################################################
> > +# Resolve Daemon Section
> > +########################################################################
> > +
> > +# IDN (Internationalized Domain Name) see
> > http://www.gnu.org/software/libidn/ +PACKAGECONFIG[libidn] =
> > "--enable-libidn,--disable-libidn,libidn" +
> > +CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill"
> > +
> > +# Helper variables to clarify locations.  This mirrors the logic
> > in systemd's +# build system.
> > +rootprefix ?= "${base_prefix}"
> > +rootlibdir ?= "${base_libdir}"
> > +rootlibexecdir = "${rootprefix}/lib"
> > +
> > +EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
> > +                 --with-rootlibdir=${rootlibdir} \
> > +                 ${@bb.utils.contains('DISTRO_FEATURES', 'pam',
> > '--enable-pam', '--disable-pam', d)} \
> > +                 --disable-manpages \
> > +                 --disable-introspection \
> > +                 --disable-kdbus \
> > +                 --disable-terminal \
> > +                 --enable-split-usr \
> > +                 --without-python \
> > +                 --enable-libcurl \
> > +                 --enable-coredump \
> > +                 --enable-ldconfig \
> > +                 --enable-backlight \
> > +                 --enable-binfmt \
> > +                 --enable-bootchart \
> > +                 --enable-firstboot \
> > +                 --enable-hostnamed \
> > +                 --enable-localed \
> > +                 --enable-logind \
> > +                 --enable-machined \
> > +                 --enable-networkd \
> > +                 --enable-quotacheck \
> > +                 --enable-randomseed \
> > +                 --enable-resolved \
> > +                 --enable-rfkill \
> > +                 --enable-sysusers \
> > +                 --enable-vconsole \
> > +                 --with-sysvrcnd-path=${sysconfdir} \
> > +                 ac_cv_path_KILL=${base_bindir}/kill \
> > +               "
> > +
> > +# uclibc does not have NSS
> > +EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
> > +
> > +do_configure_prepend() {
> > +	export CPP="${HOST_PREFIX}cpp ${TOOLCHAIN_OPTIONS}
> > ${HOST_CC_ARCH}"
> > +	export NM="${HOST_PREFIX}gcc-nm"
> > +	export AR="${HOST_PREFIX}gcc-ar"
> > +	export RANLIB="${HOST_PREFIX}gcc-ranlib"
> > +	export KMOD="${base_bindir}/kmod"
> > +	if [ -d ${S}/units.pre_sed ] ; then
> > +		cp -r ${S}/units.pre_sed ${S}/units
> > +	else
> > +		cp -r ${S}/units ${S}/units.pre_sed
> > +	fi
> > +	sed -i -e 's:=/root:=${ROOT_HOME}:g' ${S}/units/*.service*
> > +	sed -i '/ln --relative --help/d' ${S}/configure.ac
> > +	sed -i -e 's:\$(LN_S) --relative -f:lnr:g' ${S}/Makefile.am
> > +	sed -i -e 's:\$(LN_S) --relative:lnr:g' ${S}/Makefile.am
> > +}
> > +
> > +do_install() {
> > +	autotools_do_install
> > +	install -d ${D}/${base_sbindir}
> > +
> > +	# Provide support for initramfs
> > +	[ ! -e ${D}/init ] && ln -s
> > ${rootlibexecdir}/systemd/systemd ${D}/init
> > +	[ ! -e ${D}/${base_sbindir}/udevd ] && ln -s
> > ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd +
> > +	# Create machine-id
> > +	# 20:12 < mezcalero> koen: you have three options: a) run
> > systemd-machine-id-setup at install time, b) have / read-only and
> > an empty file there (for stateless) and c) boot with / writable
> > +	touch ${D}${sysconfdir}/machine-id
> > +
> > +	install -m 0644 ${WORKDIR}/*.rules
> > ${D}${rootlibexecdir}/udev/rules.d/ +
> > +	install -m 0644 ${WORKDIR}/00-create-volatile.conf
> > ${D}${exec_prefix}/lib/tmpfiles.d/ +
> > +	if
> > ${@bb.utils.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
> > +		sed -i
> > s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd%
> > ${D}${sysconfdir}/init.d/systemd-udevd
> > +	fi
> > +
> > +	# Move libgudev back to ${rootlibdir} to keep backward
> > compatibility
> > +	if
> > ${@bb.utils.contains('PACKAGECONFIG','glib','true','false',d)}; then
> > +		if [ ${rootlibdir} != ${exec_prefix}/lib ]; then
> > +			mv -t ${D}${rootlibdir}
> > ${D}${exec_prefix}/lib/libgudev*
> > +		fi
> > +	fi
> > +
> > +        # Delete journal README, as log can be symlinked inside
> > volatile.
> > +        rm -f ${D}/${localstatedir}/log/README
> > +}
> > +
> > +do_install_ptest () {
> > +       install -d ${D}${PTEST_PATH}/test
> > +       cp -rf ${S}/test/* ${D}${PTEST_PATH}/test
> > +       install -m 0755  ${B}/test-udev ${D}${PTEST_PATH}/
> > +       install -d ${D}${PTEST_PATH}/build-aux
> > +       cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
> > +       cp -rf ${B}/rules ${D}${PTEST_PATH}/
> > +       # This directory needs to be there for udev-test.pl to work.
> > +       install -d ${D}${libdir}/udev/rules.d
> > +       cp ${B}/Makefile ${D}${PTEST_PATH}/
> > +       cp ${S}/test/sys.tar.xz ${D}${PTEST_PATH}/test
> > +       sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/test/udev-test.pl
> > +       sed -i 's#${S}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile
> > +       sed -i 's#${B}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile
> > +}
> > +
> > +python populate_packages_prepend (){
> > +    systemdlibdir = d.getVar("rootlibdir", True)
> > +    do_split_packages(d, systemdlibdir,
> > '^lib(udev|gudev|systemd|nss)\.so\.*', 'lib%s', 'Systemd %s
> > library', extra_depends='', allow_links=True) +} +PACKAGES_DYNAMIC
> > += "^lib(udev|gudev|systemd|nss).*" +
> > +########################################################################
> > +# Base Packages
> > +########################################################################
> > +
> > +PACKAGES =+ "${PN}-generators-filesystems"
> > +SUMMARY_${PN}-generators-filesystems = "systemd's generator for
> > filesystem services based on fstab and GPT"
> > +RDEPENDS_${PN}-generators-filesystems = "${PN}-services-fsck"
> > +FILES_${PN}-generators-filesystems = "\
> > +
> > ${rootlibexecdir}/systemd/system-generators/systemd-fstab-generator
> > \
> > +
> > ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator
> > \
> > +        ${rootlibexecdir}/systemd/systemd-remount-fs \
> > +
> > ${systemd_unitdir}/system/local-fs.target.wants/systemd-remount-fs.service
> > \
> > +        ${systemd_unitdir}/system/systemd-remount-fs.service \
> > +"
> > +
> > +PACKAGES =+ "${PN}-generators-getty"
> > +SUMMARY_${PN}-generators-getty = "systemd's generator TTY services"
> > +RDEPENDS_${PN}-generators-getty = "${PN}-services-getty"
> > +FILES_${PN}-generators-getty = "\
> > +
> > ${rootlibexecdir}/systemd/system-generators/systemd-getty-generator
> > \ +" +
> > +PACKAGES =+ "${PN}-tools"
> > +SUMMARY_${PN}-tools = "systemd command line tools (cgls, delta,
> > run, analyze...)" +RRECOMMENDS_${PN}-tools = "${PN}-services-base"
> > +FILES_${PN}-tools = "\
> > +        ${base_bindir}/systemd-machine-id-setup \
> > +        ${bindir}/busctl \
> > +        ${bindir}/coredumpctl \
> > +        ${bindir}/systemd-analyze \
> > +        ${bindir}/systemd-cat \
> > +        ${bindir}/systemd-cgls \
> > +        ${bindir}/systemd-cgtop \
> > +        ${bindir}/systemd-delta \
> > +        ${bindir}/systemd-detect-virt \
> > +        ${bindir}/systemd-path \
> > +        ${bindir}/systemd-run \
> > +        ${rootlibexecdir}/systemd/systemd-ac-power \
> > +        ${rootlibexecdir}/systemd/systemd-activate \
> > +        ${rootlibexecdir}/systemd/systemd-reply-password \
> > +        ${rootprefix}/bin/systemd-escape \
> > +        ${rootprefix}/bin/systemd-notify \
> > +"
> > +
> > +########################################################################
> > +# Services Packages
> > +########################################################################
> > +
> > +PACKAGES =+ "${PN}-services-ask-password"
> > +SUMMARY_${PN}-services-ask-password = "systemd's service and tool
> > to query the user for a system password"
> > +RRECOMMENDS_${PN}-services-ask-password = "${PN}-services-base"
> > +FILES_${PN}-services-ask-password = "\
> > +        ${rootprefix}/bin/systemd-ask-password \
> > +        ${rootprefix}/bin/systemd-tty-ask-password-agent \
> > +
> > ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path
> > \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path
> > \
> > +
> > ${systemd_unitdir}/system/systemd-ask-password-console.path \
> > +
> > ${systemd_unitdir}/system/systemd-ask-password-console.service \
> > +        ${systemd_unitdir}/system/systemd-ask-password-wall.path \
> > +
> > ${systemd_unitdir}/system/systemd-ask-password-wall.service \ +"
> > +
> > +PACKAGES =+ "${PN}-services-backlight"
> > +SUMMARY_${PN}-services-backlight = "systemd's backlight state
> > save/restore service" +FILES_${PN}-services-backlight = "\
> > +        ${systemd_unitdir}/system/systemd-backlight@.service \
> > +        ${rootlibexecdir}/systemd/systemd-backlight \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-binfmt"
> > +SUMMARY_${PN}-services-binfmt = "systemd's service to configure
> > additional binary formats for executables"
> > +RRECOMMENDS_${PN}-services-binfmt = "kernel-module-binfmt-misc"
> > +FILES_${PN}-services-binfmt = "\
> > +        ${sysconfdir}/binfmt.d/ \
> > +        ${exec_prefix}/lib/binfmt.d/ \
> > +
> > ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.automount \
> > +        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.mount \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount
> > \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-binfmt.service
> > \
> > +        ${systemd_unitdir}/system/systemd-binfmt.service \
> > +        ${rootlibexecdir}/systemd/systemd-binfmt \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-bootchart"
> > +SUMMARY_${PN}-services-bootchart = "systemd's boot performance
> > service and graphing tool" +CONFFILES_${PN}-services-bootchart =
> > "${sysconfdir}/systemd/bootchart.conf"
> > +FILES_${PN}-services-bootchart = "\
> > +        ${sysconfdir}/systemd/bootchart.conf \
> > +        ${rootlibexecdir}/systemd/systemd-bootchart \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-coredump"
> > +SUMMARY_${PN}-services-coredump = "systemd's coredump log hook and
> > service" +RDEPENDS_${PN}-services-coredump = "${PN}-services-sysctl"
> > +CONFFILES_${PN}-services-coredump =
> > "${sysconfdir}/systemd/coredump.conf"
> > +FILES_${PN}-services-coredump = "\
> > +        ${exec_prefix}/lib/sysctl.d/50-coredump.conf \
> > +        ${sysconfdir}/systemd/coredump.conf \
> > +        ${rootlibexecdir}/systemd/systemd-coredump \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-cryptsetup"
> > +SUMMARY_${PN}-services-cryptsetup = "systemd's disk decryption
> > service" +ALLOW_EMPTY_${PN}-services-cryptsetup = "1"
> > +FILES_${PN}-services-cryptsetup = "\
> > +
> > ${rootlibexecdir}/systemd/system-generators/systemd-cryptsetup-generator
> > \
> > +        ${systemd_unitdir}/system/cryptsetup-pre.target \
> > +        ${systemd_unitdir}/system/cryptsetup.target \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/cryptsetup.target \
> > +        ${rootlibexecdir}/systemd/systemd-cryptsetup \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-dbus"
> > +SUMMARY_${PN}-services-dbus = "systemd's DBus daemon system
> > service" +# NOTE: dbus dependency will go away when kdbus is in use
> > +RDEPENDS_${PN}-services-dbus = "dbus"
> > +FILES_${PN}-services-dbus = "\
> > +
> > ${datadir}/dbus-1/services/org.freedesktop.systemd1.service \
> > +
> > ${datadir}/dbus-1/system-services/org.freedesktop.systemd1.service \
> > +
> > ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
> > +
> > ${sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
> > +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf
> > \
> > +        ${systemd_unitdir}/system/sockets.target.wants/dbus.socket
> > \
> > +        ${systemd_unitdir}/system/dbus.target.wants/dbus.socket \
> > +
> > ${systemd_unitdir}/system/multi-user.target.wants/dbus.service \
> > +        ${systemd_unitdir}/system/dbus.socket \
> > +        ${systemd_unitdir}/system/dbus.service \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-debug"
> > +SUMMARY_${PN}-services-debug = "systemd's debug service"
> > +RRECOMMENDS_${PN}-services-debug = "${PN}-services-base
> > ${PN}-tools" +FILES_${PN}-services-debug = "\
> > +
> > ${rootlibexecdir}/systemd/system-generators/systemd-debug-generator
> > \
> > +        ${systemd_unitdir}/system/debug-shell.service \
> > +        ${systemd_unitdir}/system/sys-kernel-config.mount \
> > +        ${systemd_unitdir}/system/sys-kernel-debug.mount \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/sys-kernel-config.mount
> > \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/sys-kernel-debug.mount
> > \ +" +
> > +PACKAGES =+ "${PN}-services-firstboot"
> > +SUMMARY_${PN}-services-firstboot = "systemd's service to
> > initialize basic system settings" +FILES_${PN}-services-firstboot =
> > "\
> > +        ${base_bindir}/systemd-firstboot \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-firstboot.service
> > \
> > +        ${systemd_unitdir}/system/systemd-firstboot.service \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-fsck"
> > +SUMMARY_${PN}-services-fsck = "systemd's filesystem check service"
> > +RRECOMMENDS_${PN}-services-fsck = "util-linux-fsck
> > e2fsprogs-e2fsck" +FILES_${PN}-services-fsck = "\
> > +        ${systemd_unitdir}/system/systemd-fsck-root.service \
> > +        ${systemd_unitdir}/system/systemd-fsck@.service \
> > +        ${rootlibexecdir}/systemd/systemd-fsck \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-fuse"
> > +SUMMARY_${PN}-services-fuse = "systemd's FUSE (filesystem in
> > userspace) service" +FILES_${PN}-services-fuse = "\
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/sys-fs-fuse-connections.mount
> > \
> > +        ${systemd_unitdir}/system/sys-fs-fuse-connections.mount \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-getty"
> > +SUMMARY_${PN}-services-getty = "systemd's getty service"
> > +RRECOMMENDS_${PN}-services-getty = "util-linux-agetty
> > ${PN}-generators-getty" +FILES_${PN}-services-getty = "\
> > +        ${systemd_unitdir}/system/autovt@.service \
> > +        ${systemd_unitdir}/system/console-getty.service \
> > +        ${systemd_unitdir}/system/container-getty@.service \
> > +        ${systemd_unitdir}/system/getty@.service \
> > +        ${systemd_unitdir}/system/serial-getty@.service \
> > +        ${sysconfdir}/systemd/system/getty.target.wants/ \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-hostnamed"
> > +SUMMARY_${PN}-services-hostnamed = "systemd's hostname management
> > service" +RDEPENDS_${PN}-services-hostnamed = "${PN}-services-dbus"
> > +CONFFILES_${PN}-services-hostnamed =
> > "${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf"
> > +FILES_${PN}-services-hostnamed = "\
> > +
> > ${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
> > +        ${bindir}/hostnamectl \
> > +
> > ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.hostname1.busname
> > \
> > +
> > ${systemd_unitdir}/system/dbus-org.freedesktop.hostname1.service \
> > +
> > ${systemd_unitdir}/system/org.freedesktop.hostname1.busname \
> > +        ${systemd_unitdir}/system/systemd-hostnamed.service \
> > +        ${rootlibexecdir}/systemd/systemd-hostnamed \
> > +
> > ${datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
> > \
> > +
> > ${datadir}/polkit-1/actions/org.freedesktop.hostname1.policy \ +"
> > +
> > +PACKAGES =+ "${PN}-services-journal"
> > +SUMMARY_${PN}-services-journal = "systemd's journal (logging)
> > service" +CONFFILES_${PN}-services-journal =
> > "${sysconfdir}/systemd/journald.conf" +FILES_${PN}-services-journal
> > = "\
> > +        ${base_bindir}/journalctl \
> > +        ${rootlibexecdir}/systemd/systemd-journald \
> > +        ${sysconfdir}/systemd/journald.conf \
> > +
> > ${systemd_unitdir}/system/sockets.target.wants/systemd-journald-dev-log.socket
> > \
> > +
> > ${systemd_unitdir}/system/sockets.target.wants/systemd-journald.socket
> > \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-journal-catalog-update.service
> > \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-journal-flush.service
> > \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-journald.service
> > \
> > +
> > ${systemd_unitdir}/system/systemd-journal-catalog-update.service \
> > +        ${systemd_unitdir}/system/systemd-journal-flush.service \
> > +        ${systemd_unitdir}/system/systemd-journald-dev-log.socket \
> > +        ${systemd_unitdir}/system/systemd-journald.service \
> > +        ${systemd_unitdir}/system/systemd-journald.socket \
> > +        ${exec_prefix}/lib/systemd/catalog/ \
> > +"
> > +
> > +
> > +PACKAGES =+ "${PN}-services-journal-remote"
> > +SUMMARY_${PN}-services-journal-remote = "systemd's service and
> > tools to receive journal messages over the network"
> > +RDEPENDS_${PN}-services-journal-remote = "${PN}-services-journal"
> > +# NOTE: if no sysusers or tmpfiles, then users/groups and FS
> > structure must be setup +RRECOMMENDS_${PN}-services-journal-remote
> > = "${PN}-services-sysusers ${PN}-services-tmpfiles"
> > +CONFFILES_${PN}-services-journal-remote =
> > "${sysconfdir}/systemd/journald-remote.conf"
> > +FILES_${PN}-services-journal-remote = "\
> > +        ${exec_prefix}/lib/sysusers.d/systemd-remote.conf \
> > +        ${exec_prefix}/lib/tmpfiles.d/systemd-remote.conf \
> > +        ${rootlibexecdir}/systemd/systemd-journal-remote \
> > +        ${sysconfdir}/systemd/journal-remote.conf \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-journal-upload"
> > +SUMMARY_${PN}-services-journal-upload = "systemd's service and
> > tools to send journal messages over the network"
> > +RDEPENDS_${PN}-services-journal-upload = "${PN}-services-journal"
> > +# NOTE: if no sysusers, then users/groups must be setup
> > +RRECOMMENDS_${PN}-services-journal-upload =
> > "${PN}-services-sysusers" +CONFFILES_${PN}-services-journal-upload
> > = "${sysconfdir}/systemd/journald-upload.conf"
> > +FILES_${PN}-services-journal-upload = "\
> > +        ${rootlibexecdir}/systemd/systemd-journal-upload \
> > +        ${sysconfdir}/systemd/journal-upload.conf \
> > +        ${systemd_unitdir}/system/systemd-journal-upload.service \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-ldconfig"
> > +SUMMARY_${PN}-services-ldconfig = "systemd's service to run
> > ldconfig after updates" +FILES_${PN}-services-ldconfig = "\
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/ldconfig.service \
> > +        ${systemd_unitdir}/system/ldconfig.service \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-localed"
> > +SUMMARY_${PN}-services-localed = "systemd's locale management
> > service" +RDEPENDS_${PN}-services-localed = "${PN}-services-dbus"
> > +CONFFILES_${PN}-services-localed =
> > "${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf"
> > +FILES_${PN}-services-localed = "\
> > +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf
> > \
> > +        ${bindir}/localectl \
> > +
> > ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.locale1.busname
> > \
> > +
> > ${systemd_unitdir}/system/dbus-org.freedesktop.locale1.service \
> > +        ${systemd_unitdir}/system/org.freedesktop.locale1.busname \
> > +        ${systemd_unitdir}/system/systemd-localed.service \
> > +        ${rootlibexecdir}/systemd/systemd-localed \
> > +
> > ${datadir}/dbus-1/system-services/org.freedesktop.locale1.service \
> > +        ${datadir}/polkit-1/actions/org.freedesktop.locale1.policy
> > \
> > +        ${datadir}/systemd/kbd-model-map \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-logind"
> > +SUMMARY_${PN}-services-logind = "systemd's login management
> > service" +RDEPENDS_${PN}-services-logind = "${PN}-services-dbus
> > ${PN}-services-tmpfiles" +RRECOMMENDS_${PN}-services-logind = "udev"
> > +CONFFILES_${PN}-services-logind = "\
> > +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf \
> > +        ${sysconfdir}/systemd/logind.conf \
> > +"
> > +FILES_${PN}-services-logind = "\
> > +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf \
> > +        ${sysconfdir}/systemd/logind.conf \
> > +        ${base_bindir}/loginctl \
> > +        ${base_bindir}/systemd-inhibit \
> > +
> > ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.login1.busname
> > \
> > +
> > ${systemd_unitdir}/system/dbus-org.freedesktop.login1.service \
> > +
> > ${systemd_unitdir}/system/multi-user.target.wants/systemd-logind.service
> > \
> > +
> > ${systemd_unitdir}/system/multi-user.target.wants/systemd-user-sessions.service
> > \
> > +        ${systemd_unitdir}/system/org.freedesktop.login1.busname \
> > +        ${systemd_unitdir}/system/systemd-logind.service \
> > +        ${systemd_unitdir}/system/systemd-user-sessions.service \
> > +        ${systemd_unitdir}/system/user@.service \
> > +        ${rootlibexecdir}/systemd/systemd-logind \
> > +        ${rootlibexecdir}/systemd/systemd-user-sessions \
> > +
> > ${datadir}/dbus-1/system-services/org.freedesktop.login1.service \
> > +        ${datadir}/polkit-1/actions/org.freedesktop.login1.policy \
> > +        ${rootlibexecdir}/udev/rules.d/70-uaccess.rules \
> > +        ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
> > +        ${rootlibexecdir}/udev/rules.d/71-seat.rules \
> > +        ${rootlibexecdir}/udev/rules.d/73-seat-late.rules \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-machined"
> > +SUMMARY_${PN}-services-machined = "systemd's virtual machine and
> > container management service" +RDEPENDS_${PN}-services-machined =
> > "${PN}-services-dbus" +CONFFILES_${PN}-services-machined =
> > "${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf"
> > +FILES_${PN}-services-machined = "\
> > +
> > ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
> > +        ${base_bindir}/machinectl \
> > +        ${exec_prefix}/lib/libnss_mymachines.so.2 \
> > +
> > ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.machine1.busname
> > \
> > +
> > ${systemd_unitdir}/system/dbus-org.freedesktop.machine1.service \
> > +        ${systemd_unitdir}/system/machine.slice \
> > +        ${systemd_unitdir}/system/org.freedesktop.machine1.busname
> > \
> > +        ${systemd_unitdir}/system/systemd-machined.service \
> > +        ${rootlibexecdir}/systemd/systemd-machined \
> > +
> > ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service
> > \ +" +
> > +PACKAGES =+ "${PN}-services-modules-load"
> > +SUMMARY_${PN}-services-modules-load = "systemd's kernel module
> > loading service" +FILES_${PN}-services-modules-load = "\
> > +        ${sysconfdir}/modules-load.d/ \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-modules-load.service
> > \
> > +        ${systemd_unitdir}/system/systemd-modules-load.service \
> > +        ${rootlibexecdir}/systemd/systemd-modules-load \
> > +        ${exec_prefix}/lib/modules-load.d \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-modules-static-nodes"
> > +SUMMARY_${PN}-services-modules-static-nodes = "systemd's kernel
> > module static nodes creation service"
> > +RDEPENDS_${PN}-services-modules-static-nodes = "kmod
> > ${PN}-services-tmpfiles" +FILES_${PN}-services-modules-static-nodes
> > = "\
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/kmod-static-nodes.service
> > \
> > +        ${systemd_unitdir}/system/kmod-static-nodes.service \
> > +"
> > +
> > +
> > +PACKAGES =+ "${PN}-services-multi-seat-x"
> > +SUMMARY_${PN}-services-multi-seat-x = "systemd's X11 multi-seat
> > support service" +RDEPENDS_${PN}-services-multi-seat-x =
> > "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/xserver',
> > '', d)}" +FILES_${PN}-services-multi-seat-x = "\
> > +        ${rootlibexecdir}/systemd/systemd-multi-seat-x \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-networkd"
> > +SUMMARY_${PN}-services-networkd = "systemd's network management
> > (static, DHCP, bridge...) service" +# NOTE: if no sysusers, then
> > users/groups must be setup +RRECOMMENDS_${PN}-services-networkd =
> > "${PN}-services-sysusers" +FILES_${PN}-services-networkd = "\
> > +        ${sysconfdir}/systemd/network/ \
> > +
> > ${sysconfdir}/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service
> > \
> > +
> > ${sysconfdir}/systemd/system/multi-user.target.wants/systemd-networkd.service
> > \
> > +        ${base_bindir}/networkctl \
> > +
> > ${rootlibexecdir}/systemd/network/80-container-host0.network \
> > +        ${rootlibexecdir}/systemd/network/80-container-ve.network \
> > +        ${rootlibexecdir}/systemd/network/99-default.link \
> > +
> > ${systemd_unitdir}/system/systemd-networkd-wait-online.service \
> > +        ${systemd_unitdir}/system/systemd-networkd.service \
> > +        ${rootlibexecdir}/systemd/systemd-networkd \
> > +        ${rootlibexecdir}/systemd/systemd-networkd-wait-online \
> > +        ${exec_prefix}/lib/systemd/network \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-nspawn"
> > +SUMMARY_${PN}-services-nspawn = "systemd's namespace spawing
> > service and tool" +FILES_${PN}-services-nspawn = "\
> > +        ${systemd_unitdir}/system/systemd-nspawn@.service \
> > +        ${bindir}/systemd-nspawn \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-quota"
> > +SUMMARY_${PN}-services-quota = "systemd's file system quota enable
> > and check service" +RDEPENDS_${PN}-services-quota = "quota"
> > +FILES_${PN}-services-quota = "\
> > +        ${systemd_unitdir}/system/quotaon.service \
> > +        ${systemd_unitdir}/system/systemd-quotacheck.service \
> > +        ${rootlibexecdir}/systemd/systemd-quotacheck \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-randomseed"
> > +SUMMARY_${PN}-services-randomseed = "systemd's random seed
> > save/restore service" +FILES_${PN}-services-randomseed = "\
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-random-seed.service
> > \
> > +        ${systemd_unitdir}/system/systemd-random-seed.service \
> > +        ${rootlibexecdir}/systemd/systemd-random-seed \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-readahead"
> > +SUMMARY_${PN}-services-readahead = "systemd's disk read ahead
> > service" +FILES_${PN}-services-readahead = "\
> > +
> > ${systemd_unitdir}/system/systemd-readahead-collect.service \
> > +        ${systemd_unitdir}/system/systemd-readahead-done.service \
> > +        ${systemd_unitdir}/system/systemd-readahead-done.timer \
> > +        ${systemd_unitdir}/system/systemd-readahead-drop.service \
> > +        ${systemd_unitdir}/system/systemd-readahead-replay.service
> > \
> > +        ${rootlibexecdir}/systemd/systemd-readahead \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-resolved"
> > +SUMMARY_${PN}-services-resolved = "systemd's network name
> > resolution management service" +# NOTE: if no sysusers or tmpfiles,
> > then users/groups and FS structure must be setup
> > +RRECOMMENDS_${PN}-services-resolved = "${PN}-services-dbus
> > ${PN}-services-sysusers ${PN}-services-tmpfiles"
> > +CONFFILES_${PN}-services-resolved = "\
> > +
> > ${sysconfdir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
> > +        ${sysconfdir}/systemd/resolved.conf \
> > +"
> > +FILES_${PN}-services-resolved = "\
> > +
> > ${sysconfdir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
> > +        ${sysconfdir}/systemd/resolved.conf \
> > +
> > ${sysconfdir}/systemd/system/multi-user.target.wants/systemd-resolved.service
> > \
> > +        ${exec_prefix}/lib/libnss_resolve.so.2 \
> > +
> > ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.resolve1.busname
> > \
> > +
> > ${systemd_unitdir}/system/dbus-org.freedesktop.resolve1.service \
> > +        ${systemd_unitdir}/system/org.freedesktop.resolve1.busname
> > \
> > +        ${systemd_unitdir}/system/systemd-resolved.service \
> > +        ${rootlibexecdir}/systemd/systemd-resolve-host \
> > +        ${rootlibexecdir}/systemd/systemd-resolved \
> > +
> > ${datadir}/dbus-1/system-services/org.freedesktop.resolve1.service
> > \ +" +
> > +PACKAGES =+ "${PN}-services-rfkill"
> > +SUMMARY_${PN}-services-rfkill = "systemd's rfkill state
> > save/restore service" +FILES_${PN}-services-rfkill = "\
> > +        ${systemd_unitdir}/system/systemd-rfkill@.service \
> > +        ${rootlibexecdir}/systemd/systemd-rfkill \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-sleep"
> > +SUMMARY_${PN}-services-sleep = "systemd's sleep, suspend and
> > hiberate services" +FILES_${PN}-services-sleep = "\
> > +        ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
> > +        ${systemd_unitdir}/system/systemd-suspend.service \
> > +        ${systemd_unitdir}/system/systemd-hibernate.service \
> > +        ${systemd_unitdir}/system-sleep/ \
> > +        ${rootlibexecdir}/systemd/systemd-sleep \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-sysctl"
> > +SUMMARY_${PN}-services-sysctl = "systemd's kernel parameters
> > configuration service" +FILES_${PN}-services-sysctl = "\
> > +        ${sysconfdir}/sysctl.d/ \
> > +        ${exec_prefix}/lib/sysctl.d/ \
> > +        ${exec_prefix}/lib/sysctl.d/50-default.conf \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-sysctl.service
> > \
> > +        ${systemd_unitdir}/system/systemd-sysctl.service \
> > +        ${rootlibexecdir}/systemd/systemd-sysctl \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-sysusers"
> > +SUMMARY_${PN}-services-sysusers = "systemd's service and tool to
> > allocate system users and groups" +FILES_${PN}-services-sysusers =
> > "\
> > +        ${base_bindir}/systemd-sysusers \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-sysusers.service
> > \
> > +        ${systemd_unitdir}/system/systemd-sysusers.service \
> > +        ${exec_prefix}/lib/sysusers.d/basic.conf \
> > +        ${exec_prefix}/lib/sysusers.d/systemd.conf \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-sysvcompat"
> > +SUMMARY_${PN}-services-sysvcompat = "systemd's SYSV legacy and
> > compatibility service" +# NOTE: if no sysusers or tmpfiles, then
> > users/groups and FS structure must be setup
> > +RRECOMMENDS_${PN}-services-sysvcompat = "${PN}-services-sysusers
> > ${PN}-services-tmpfiles" +FILES_${PN}-services-sysvcompat = "\
> > +        ${rootlibexecdir}/systemd/systemd-bus-proxyd \
> > +        ${rootlibexecdir}/systemd/systemd-socket-proxyd \
> > +        ${bindir}/systemd-stdio-bridge \
> > +
> > ${rootlibexecdir}/systemd/system-generators/systemd-rc-local-generator
> > \
> > +
> > ${rootlibexecdir}/systemd/system-generators/systemd-sysv-generator \
> > +        ${rootlibexecdir}/systemd/systemd-initctl \
> > +        ${rootlibexecdir}/systemd/systemd-update-utmp \
> > +        ${systemd_unitdir}/system/halt-local.service \
> > +        ${systemd_unitdir}/system/rc-local.service \
> > +
> > ${systemd_unitdir}/system/runlevel1.target.wants/systemd-update-utmp-runlevel.service
> > \
> > +
> > ${systemd_unitdir}/system/runlevel2.target.wants/systemd-update-utmp-runlevel.service
> > \
> > +
> > ${systemd_unitdir}/system/runlevel3.target.wants/systemd-update-utmp-runlevel.service
> > \
> > +
> > ${systemd_unitdir}/system/runlevel4.target.wants/systemd-update-utmp-runlevel.service
> > \
> > +
> > ${systemd_unitdir}/system/runlevel5.target.wants/systemd-update-utmp-runlevel.service
> > \
> > +
> > ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket
> > \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-update-utmp.service
> > \
> > +        ${systemd_unitdir}/system/systemd-initctl.service \
> > +        ${systemd_unitdir}/system/systemd-initctl.socket \
> > +
> > ${systemd_unitdir}/system/systemd-update-utmp-runlevel.service \
> > +        ${systemd_unitdir}/system/systemd-update-utmp.service \
> > +        ${exec_prefix}/lib/tmpfiles.d/legacy.conf \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-timedated"
> > +SUMMARY_${PN}-services-timedated = "systemd's time and date
> > management service" +RDEPENDS_${PN}-services-timedated =
> > "${PN}-services-dbus" +CONFFILES_${PN}-services-timedated =
> > "${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf"
> > +FILES_${PN}-services-timedated = "\
> > +
> > ${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
> > +        ${bindir}/timedatectl \
> > +
> > ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.timedate1.busname
> > \
> > +
> > ${systemd_unitdir}/system/dbus-org.freedesktop.timedate1.service \
> > +
> > ${systemd_unitdir}/system/org.freedesktop.timedate1.busname \
> > +        ${systemd_unitdir}/system/systemd-timedated.service \
> > +        ${rootlibexecdir}/systemd/systemd-timedated \
> > +
> > ${datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
> > \
> > +
> > ${datadir}/polkit-1/actions/org.freedesktop.timedate1.policy \ +"
> > +
> > +PACKAGES =+ "${PN}-services-timesyncd"
> > +SUMMARY_${PN}-services-timesyncd = "systemd's NTP sync service"
> > +# NOTE: if no sysusers, then users/groups must be setup
> > +RRECOMMENDS_${PN}-services-timesyncd = "${PN}-services-sysusers"
> > +CONFFILES_${PN}-services-timesyncd =
> > "${sysconfdir}/systemd/timesyncd.conf"
> > +FILES_${PN}-services-timesyncd = "\
> > +
> > ${sysconfdir}/systemd/system/sysinit.target.wants/systemd-timesyncd.service
> > \
> > +        ${sysconfdir}/systemd/timesyncd.conf \
> > +        ${systemd_unitdir}/system/systemd-timesyncd.service \
> > +        ${rootlibexecdir}/systemd/systemd-timesyncd \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-tmpfiles"
> > +SUMMARY_${PN}-services-tmpfiles = "systemd's service to create,
> > delete and clean up volatile/tmp files/dirs"
> > +FILES_${PN}-services-tmpfiles = "\
> > +        ${sysconfdir}/tmpfiles.d/ \
> > +        ${base_bindir}/systemd-tmpfiles \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service
> > \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-tmpfiles-setup.service
> > \
> > +        ${systemd_unitdir}/system/systemd-tmpfiles-clean.service \
> > +        ${systemd_unitdir}/system/systemd-tmpfiles-clean.timer \
> > +
> > ${systemd_unitdir}/system/systemd-tmpfiles-setup-dev.service \
> > +        ${systemd_unitdir}/system/systemd-tmpfiles-setup.service \
> > +
> > ${systemd_unitdir}/system/timers.target.wants/systemd-tmpfiles-clean.timer
> > \
> > +        ${exec_prefix}/lib/tmpfiles.d/etc.conf \
> > +        ${exec_prefix}/lib/tmpfiles.d/systemd-nologin.conf \
> > +        ${exec_prefix}/lib/tmpfiles.d/systemd.conf \
> > +        ${exec_prefix}/lib/tmpfiles.d/tmp.conf \
> > +        ${exec_prefix}/lib/tmpfiles.d/var.conf \
> > +        ${exec_prefix}/lib/tmpfiles.d/00-create-volatile.conf \
> > +        ${exec_prefix}/lib/tmpfiles.d/x11.conf \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-udev"
> > +SUMMARY_${PN}-services-udev = "systemd's udev services"
> > +RDEPENDS_${PN}-services-udev = "udev"
> > +FILES_${PN}-services-udev = "\
> > +
> > ${systemd_unitdir}/system/initrd-udevadm-cleanup-db.service \
> > +        ${systemd_unitdir}/system/systemd-udev-hwdb-update.service
> > \
> > +        ${systemd_unitdir}/system/systemd-udev-settle.service \
> > +        ${systemd_unitdir}/system/systemd-udev-trigger.service \
> > +        ${systemd_unitdir}/system/systemd-udevd-control.socket \
> > +        ${systemd_unitdir}/system/systemd-udevd-kernel.socket \
> > +        ${systemd_unitdir}/system/systemd-udevd.service \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-udevd.service
> > \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-udev-trigger.service
> > \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-udev-hwdb-update.service
> > \
> > +
> > ${systemd_unitdir}/system/sockets.target.wants/systemd-udevd-kernel.socket
> > \
> > +
> > ${systemd_unitdir}/system/sockets.target.wants/systemd-udevd-control.socket
> > \ +" +
> > +PACKAGES =+ "${PN}-services-update"
> > +SUMMARY_${PN}-services-update = "systemd's post update service"
> > +FILES_${PN}-services-update = "\
> > +
> > ${rootlibexecdir}/systemd/system-generators/systemd-system-update-generator
> > \
> > +        ${rootlibexecdir}/systemd/systemd-update-done \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-update-done.service
> > \
> > +        ${systemd_unitdir}/system/systemd-update-done.service \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-vconsole"
> > +SUMMARY_${PN}-services-vconsole = "systemd's service to configure
> > the virtual console (keyboard/font)"
> > +RDEPENDS_${PN}-services-vconsole = "kbd kbd-consolefonts
> > kbd-keymaps" +FILES_${PN}-services-vconsole = "\
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service
> > \
> > +        ${systemd_unitdir}/system/systemd-vconsole-setup.service \
> > +        ${rootlibexecdir}/systemd/systemd-vconsole-setup \
> > +"
> > +
> > +########################################################################
> > +# Standard BitBake Packages
> > +########################################################################
> > +
> > +FILES_${PN}-dbg += "\
> > +        ${base_libdir}/security/.debug/ \
> > +        ${libdir}/systemd/ptest/.debug \
> > +        ${rootlibdir}/.debug \
> > +        ${systemd_unitdir}/*/.debug \
> > +        ${systemd_unitdir}/.debug \
> > +"
> > +
> > +FILES_${PN}-dev += "\
> > +        ${base_libdir}/security/*.la \
> > +        ${datadir}/dbus-1/interfaces/ \
> > +"
> > +
> > +# The test cases need perl and bash to run correctly.
> > +RDEPENDS_${PN}-ptest += "perl bash"
> > +FILES_${PN}-ptest += "\
> > +        ${libdir}/udev/rules.d \
> > +"
> > +
> > +########################################################################
> > +# Misc Packages
> > +########################################################################
> > +
> > +PACKAGES =+ "${PN}-bash"
> > +SUMMARY_${PN}-bash = "systemd bash shell commands completion"
> > +FILES_${PN}-bash = "\
> > +        ${datadir}/bash-completion/completions/bootctl \
> > +        ${datadir}/bash-completion/completions/busctl \
> > +        ${datadir}/bash-completion/completions/coredumpctl \
> > +        ${datadir}/bash-completion/completions/hostnamectl \
> > +        ${datadir}/bash-completion/completions/journalctl \
> > +        ${datadir}/bash-completion/completions/kernel-install \
> > +        ${datadir}/bash-completion/completions/localectl \
> > +        ${datadir}/bash-completion/completions/loginctl \
> > +        ${datadir}/bash-completion/completions/machinectl \
> > +        ${datadir}/bash-completion/completions/systemctl \
> > +        ${datadir}/bash-completion/completions/systemd-* \
> > +        ${datadir}/bash-completion/completions/timedatectl \
> > +"
> > +
> > +PACKAGES =+ "${PN}-initramfs"
> > +SUMMARY_${PN}-initramfs = "systemd's initramfs support"
> > +FILES_${PN}-initramfs = "/init"
> > +RDEPENDS_${PN}-initramfs = "${PN}"
> > +
> > +PACKAGES =+ "${PN}-kernel-install"
> > +SUMMARY_${PN}-kernel-install = "systemd tool to add/remove kernel
> > and initramfs images to/from /boot" +RDEPENDS_${PN}-kernel-install
> > = "bash kmod" +FILES_${PN}-kernel-install = "\
> > +        ${bindir}/kernel-install \
> > +        ${sysconfdir}/kernel/install.d/ \
> > +        ${exec_prefix}/lib/kernel/install.d/ \
> > +"
> > +
> > +PACKAGES =+ "${PN}-pam"
> > +SUMMARY_${PN}-pam = "systemd PAM modules and configuration"
> > +FILES_${PN}-pam = "\
> > +        ${sysconfdir}/pam.d \
> > +        ${base_libdir}/security/pam_systemd.so \
> > +"
> > +
> > +PACKAGES =+ "${PN}-preset"
> > +SUMMARY_${PN}-preset = "systemd's service enablement presets"
> > +FILES_${PN}-preset =
> > "${systemd_unitdir}/system-preset/90-systemd.preset" +
> > +PACKAGES =+ "${PN}-rpm-macros"
> > +SUMMARY_${PN}-rpm-macros = "systemd RPM macros"
> > +FILES_${PN}-rpm-macros =
> > "${exec_prefix}/lib/rpm/macros.d/macros.systemd" +
> > +PACKAGES =+ "${PN}-zsh"
> > +SUMMARY_${PN}-zsh = "systemd zsh shell commands completion"
> > +FILES_${PN}-zsh = "\
> > +        ${datadir}/zsh/site-functions/_bootctl \
> > +        ${datadir}/zsh/site-functions/_busctl \
> > +        ${datadir}/zsh/site-functions/_coredumpctl \
> > +        ${datadir}/zsh/site-functions/_hostnamectl \
> > +        ${datadir}/zsh/site-functions/_journalctl \
> > +        ${datadir}/zsh/site-functions/_kernel-install \
> > +        ${datadir}/zsh/site-functions/_localectl \
> > +        ${datadir}/zsh/site-functions/_loginctl \
> > +        ${datadir}/zsh/site-functions/_machinectl \
> > +        ${datadir}/zsh/site-functions/_sd_* \
> > +        ${datadir}/zsh/site-functions/_systemctl \
> > +        ${datadir}/zsh/site-functions/_systemd \
> > +        ${datadir}/zsh/site-functions/_systemd-* \
> > +        ${datadir}/zsh/site-functions/_timedatectl \
> > +"
> > +
> > +
> > +########################################################################
> > +# Aggregation of Split Packages
> > +########################################################################
> > +
> > +PACKAGES =+ "${PN}-services-essential"
> > +SUMMARY_${PN}-services-essential = "systemd's essential services
> > aggregation" +ALLOW_EMPTY_${PN}-services-essential = "1"
> > +RDEPENDS_${PN}-services-essential = "\
> > +        ${PN}-generators-filesystems \
> > +        ${PN}-preset \
> > +        ${PN}-services-fsck \
> > +        ${PN}-services-journal \
> > +        ${PN}-services-modules-load \
> > +        ${PN}-services-randomseed \
> > +        ${PN}-services-sleep \
> > +        ${PN}-services-sysctl \
> > +        ${PN}-services-sysusers \
> > +        ${PN}-services-tmpfiles \
> > +        ${PN}-services-udev \
> > +        udev-rules-systemd \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-base"
> > +SUMMARY_${PN}-services-base = "systemd's base services aggregation"
> > +ALLOW_EMPTY_${PN}-services-base = "1"
> > +RDEPENDS_${PN}-services-base = "${PN}-services-essential \
> > +        ${PN}-services-ask-password \
> > +        ${PN}-services-backlight \
> > +        ${PN}-services-binfmt \
> > +        ${PN}-services-coredump \
> > +        ${PN}-services-dbus \
> > +        ${PN}-services-firstboot \
> > +        ${PN}-services-fuse \
> > +        ${PN}-services-hostnamed \
> > +        ${PN}-services-ldconfig \
> > +        ${PN}-services-localed \
> > +        ${PN}-services-logind \
> > +        ${PN}-services-networkd \
> > +        ${PN}-services-quota \
> > +        ${PN}-services-resolved \
> > +        ${PN}-services-rfkill \
> > +        ${PN}-services-timedated \
> > +        ${PN}-services-timesyncd \
> > +        ${PN}-services-update \
> > +        ${PN}-services-vconsole \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-all"
> > +SUMMARY_${PN}-services-all = "systemd's all services and tools
> > aggregation" +ALLOW_EMPTY_${PN}-services-all = "1"
> > +RDEPENDS_${PN}-services-all = "${PN}-services-base \
> > +        ${PN}-services-bootchart \
> > +        ${PN}-services-cryptsetup \
> > +        ${PN}-services-debug \
> > +        ${PN}-services-journal-remote \
> > +        ${PN}-services-journal-upload \
> > +        ${PN}-services-machined \
> > +        ${PN}-services-nspawn \
> > +        ${PN}-services-sysvcompat \
> > +        ${@bb.utils.contains('DISTRO_FEATURES', 'x11',
> > '${PN}-services-multi-seat-x', '', d)} \
> > +        ${PN}-tools \
> > +"
> > +
> > +
> > +########################################################################
> > +# Core Package
> > +########################################################################
> > +
> > +CONFFILES_${PN} = "\
> > +        ${sysconfdir}/machine-id \
> > +        ${sysconfdir}/systemd/system.conf \
> > +        ${sysconfdir}/systemd/user.conf \
> > +"
> > +
> > +FILES_${PN} = "\
> > +        ${base_bindir}/systemctl \
> > +        ${base_bindir}/systemd-hwdb \
> > +        ${bindir}/bootctl \
> > +        ${datadir}/${BPN} \
> > +        ${datadir}/factory \
> > +        ${exec_prefix}/lib/libnss_myhostname* \
> > +        ${libdir}/systemd/user-generators/ \
> > +        ${libdir}/systemd/user/ \
> > +        ${localstatedir} \
> > +        ${rootlibexecdir}/systemd/systemd \
> > +        ${rootlibexecdir}/systemd/systemd-cgroups-agent \
> > +        ${rootlibexecdir}/systemd/systemd-shutdown \
> > +        ${rootlibexecdir}/systemd/systemd-shutdownd \
> > +        ${rootlibexecdir}/systemd/systemd-machine-id-commit \
> > +        ${rootlibexecdir}/systemd/systemd-hibernate-resume \
> > +        ${rootlibexecdir}/systemd/systemd-importd \
> > +        ${rootlibexecdir}/systemd/import-pubring.gpg \
> > +        ${rootlibexecdir}/systemd/systemd-pull \
> > +        ${sysconfdir}/init.d/README \
> > +        ${sysconfdir}/machine-id \
> > +        ${sysconfdir}/systemd/system.conf \
> > +        ${sysconfdir}/systemd/system/ \
> > +        ${sysconfdir}/systemd/user.conf \
> > +        ${sysconfdir}/systemd/user/ \
> > +        ${sysconfdir}/xdg/systemd/ \
> > +        ${systemd_unitdir}/system-generators/ \
> > +        ${systemd_unitdir}/system-preset/ \
> > +        ${systemd_unitdir}/system-shutdown/ \
> > +        ${systemd_unitdir}/system/ \
> > +"
> > +
> > +#RDEPENDS_${PN} += "volatile-binds"
> > +
> > +RRECOMMENDS_${PN} += "\
> > +        ${PN}-services-base \
> > +        ${PN}-services-essential \
> > +        ${PN}-generators-getty \
> > +        ${@bb.utils.contains('DISTRO_FEATURES', 'pam',
> > '${PN}-pam', '', d)} \
> > +        ${PN}-services-getty \
> > +        ${PN}-tools \
> > +        kernel-module-autofs4 \
> > +        kernel-module-ipv6 \
> > +        kernel-module-unix \
> > +        os-release \
> > +        udev (= ${EXTENDPKGV}) \
> > +        udev-hwdb \
> > +"
> > +
> > +ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
> > +
> > +ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
> > +ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
> > +ALTERNATIVE_PRIORITY[init] ?= "300"
> > +
> > +ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
> > +ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
> > +ALTERNATIVE_PRIORITY[halt] ?= "300"
> > +
> > +ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
> > +ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
> > +ALTERNATIVE_PRIORITY[reboot] ?= "300"
> > +
> > +ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
> > +ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
> > +ALTERNATIVE_PRIORITY[shutdown] ?= "300"
> > +
> > +ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
> > +ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
> > +ALTERNATIVE_PRIORITY[poweroff] ?= "300"
> > +
> > +ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
> > +ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
> > +ALTERNATIVE_PRIORITY[runlevel] ?= "300"
> > +
> > +
> > +########################################################################
> > +# UDEV Section
> > +########################################################################
> > +
> > +PACKAGES =+ "udev-dbg"
> > +SUMMARY_udev-dbg = "Dynamic device management - Debugging files"
> > +RRECOMMENDS_udev-dbg += "${PN}-dbg"
> > +FILES_udev-dbg = "\
> > +        ${rootlibexecdir}/udev/.debug \
> > +        ${base_sbindir}/.debug/udevd \
> > +        ${base_bindir}/.debug/udevadm \
> > +        ${rootlibexecdir}/systemd/.debug/systemd-udevd \
> > +        ${base_libdir}/.debug/libudev* \
> > +        ${base_libdir}/.debug/libgudev* \
> > +        ${exec_prefix}/lib/.debug/libgudev* \
> > +"
> > +
> > +PACKAGES =+ "udev-dev"
> > +SUMMARY_udev-dev = "Dynamic device management - Development files"
> > +RRECOMMENDS_udev-dev += "${PN}-dev"
> > +FILES_udev-dev = "\
> > +        ${datadir}/pkgconfig/*udev* \
> > +        ${libdir}/pkgconfig/*udev* \
> > +        ${libdir}/lib*udev*.la \
> > +        ${includedir}/*udev* \
> > +"
> > +
> > +PACKAGES =+ "udev-hwdb"
> > +SUMMARY_udev-hwdb = "Dynamic device management - Hardware database"
> > +RDEPENDS_udev-hwdb = "udev"
> > +FILES_udev-hwdb = "\
> > +        ${rootlibexecdir}/udev/hwdb.d/ \
> > +"
> > +
> > +pkg_postinst_udev-hwdb () {
> > +	if test -n "$D"; then
> > +		${@qemu_run_binary(d, '$D',
> > '${base_bindir}/udevadm')} hwdb --update \
> > +			--root $D
> > +	else
> > +		udevadm hwdb --update
> > +	fi
> > +}
> > +
> > +pkg_prerm_udev-hwdb () {
> > +	if test -n "$D"; then
> > +		exit 1
> > +	fi
> > +
> > +	rm -f ${sysconfdir}/udev/hwdb.bin
> > +}
> > +
> > +PACKAGES =+ "udev-bash"
> > +SUMMARY_udev-bash = "Dynamic device management - Bash shell
> > commands completion" +FILES_udev-bash =
> > "${datadir}/bash-completion/completions/udevadm" +
> > +PACKAGES =+ "udev-zsh"
> > +SUMMARY_udev-zsh = "Dynamic device management - zsh shell commands
> > completion" +FILES_udev-zsh =
> > "${datadir}/zsh/site-functions/_udevadm" +
> > +
> > +########################################################################
> > +# UDEV Rules Packages
> > +# split rules that require external programs or dependencies.
> > +# those that use only builtins are not split
> > +########################################################################
> > +
> > +PACKAGES =+ "udev-rules-accelerometer"
> > +SUMMARY_udev-rules-accelerometer = "Dynamic device management -
> > accelerometer rules" +FILES_udev-rules-accelerometer = "\
> > +        ${rootlibexecdir}/udev/accelerometer \
> > +        ${rootlibexecdir}/udev/rules.d/61-accelerometer.rules \
> > +"
> > +
> > +PACKAGES =+ "udev-rules-cdrom"
> > +SUMMARY_udev-rules-cdrom = "Dynamic device management - cdrom
> > rules" +FILES_udev-rules-cdrom = "\
> > +        ${rootlibexecdir}/udev/cdrom_id \
> > +        ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \
> > +"
> > +
> > +PACKAGES =+ "udev-rules-mtd"
> > +SUMMARY_udev-rules-mtd = "Dynamic device management - mtd rules"
> > +FILES_udev-rules-mtd = "\
> > +        ${rootlibexecdir}/udev/mtd_probe \
> > +        ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \
> > +"
> > +
> > +PACKAGES =+ "udev-rules-persistent-storage"
> > +SUMMARY_udev-rules-persistent-storage = "Dynamic device management
> > - persistent storage rules" +FILES_udev-rules-persistent-storage =
> > "\
> > +        ${rootlibexecdir}/udev/ata_id \
> > +        ${rootlibexecdir}/udev/scsi_id \
> > +        ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules
> > \
> > +
> > ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \ +"
> > +
> > +PACKAGES =+ "udev-rules-systemd"
> > +SUMMARY_udev-rules-systemd = "Dynamic device management - systemd
> > rules" +RDEPENDS_udev-rules-systemd = "${PN} ${PN}-services-sysctl"
> > +FILES_udev-rules-systemd = "\
> > +        ${rootlibexecdir}/udev/rules.d/99-systemd.rules \
> > +"
> > +
> > +PACKAGES =+ "udev-rules-v4l"
> > +SUMMARY_udev-rules-v4l = "Dynamic device management - v4l rules"
> > +FILES_udev-rules-v4l = "\
> > +        ${rootlibexecdir}/udev/v4l_id \
> > +        ${rootlibexecdir}/udev/rules.d/*-persistent-v4l.rules \
> > +"
> > +
> > +PACKAGES =+ "udev-rules-all"
> > +SUMMARY_udev-rules-all = "Dynamic device management - all rules
> > aggregation" +ALLOW_EMPTY_udev-rules-all = "1"
> > +RDEPENDS_udev-rules-all = "\
> > +        udev-rules-accelerometer \
> > +        udev-rules-cdrom \
> > +        udev-rules-mtd \
> > +        udev-rules-persistent-storage \
> > +        udev-rules-systemd \
> > +        udev-rules-v4l \
> > +"
> > +
> > +PACKAGES =+ "udev"
> > +SUMMARY_udev = "Dynamic device management"
> > +RPROVIDES_udev = "hotplug"
> > +PROVIDES = "udev"
> > +CONFFILES_udev = "${sysconfdir}/udev/udev.conf"
> > +FILES_udev = "\
> > +        ${base_bindir}/udevadm \
> > +        ${base_sbindir}/udevd \
> > +        ${rootlibexecdir}/systemd/systemd-udevd \
> > +        ${rootlibexecdir}/udev/collect \
> > +        ${rootlibexecdir}/udev/rules.d/42-usb-hid-pm.rules \
> > +        ${rootlibexecdir}/udev/rules.d/50-firmware.rules \
> > +        ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \
> > +        ${rootlibexecdir}/udev/rules.d/60-drm.rules \
> > +        ${rootlibexecdir}/udev/rules.d/60-keyboard.rules \
> > +        ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \
> > +        ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \
> > +        ${rootlibexecdir}/udev/rules.d/60-persistent-serial.rules \
> > +        ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \
> > +        ${rootlibexecdir}/udev/rules.d/75-net-description.rules \
> > +        ${rootlibexecdir}/udev/rules.d/75-tty-description.rules \
> > +        ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \
> > +        ${rootlibexecdir}/udev/rules.d/80-drivers.rules \
> > +        ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \
> > +        ${rootlibexecdir}/udev/rules.d/95-udev-late.rules \
> > +        ${rootlibexecdir}/udev/rules.d/70-mouse.rules \
> > +        ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
> > +        ${rootlibexecdir}/udev/rules.d/touchscreen.rules \
> > +        ${sysconfdir}/init.d/systemd-udevd \
> > +        ${sysconfdir}/udev \
> > +"
> > +
> > +RRECOMMENDS_udev = "\
> > +        udev-hwdb \
> > +        udev-rules-all \
> > +"
> > +
> > +INITSCRIPT_PACKAGES = "udev"
> > +INITSCRIPT_NAME_udev = "systemd-udevd"
> > +INITSCRIPT_PARAMS_udev = "start 03 S ."
> > +
> > +python __anonymous() {
> > +    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True,
> > False, d):
> > +        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
> > +}
> > +
> > +# As this recipe builds udev, respect systemd being in
> > DISTRO_FEATURES so +# that we don't build both udev and systemd in
> > world builds. +python () {
> > +    if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True,
> > False, d):
> > +        raise bb.parse.SkipPackage("'systemd' not in
> > DISTRO_FEATURES") +}
> >
> 
> Bruno, could you create separate patches for the upgrade and for the 
> repackaging? Also what type of testing has been done for partial
> installs?
> 
> 

Randy,

Sure thing I can separate it. I will send to the mailing list later.

I wrote on my local.conf the following as an example:

PACKAGE_EXCLUDE = "systemd-services-base
systemd-services-essential" 

Also, doing this you can remove some lib dependency such as:
PACKAGECONFIG_remove_pn-systemd = "           \
                   acl                        \
                   blkid                      \
                   efi                        \
                   gcrypt                     \
                   lz4                        \
                   xz                         \
                   libidn                     \
                   "


This example will install the smallest possible.



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

* Re: [PATCH] systemd: update version from 216 to 218
  2015-02-03 18:21   ` Bruno Bottazzini
  2015-02-03 21:23     ` Randy Witt
@ 2015-02-04 11:48     ` Enrico Scholz
  2015-02-04 17:04       ` Bottazzini, Bruno
  1 sibling, 1 reply; 73+ messages in thread
From: Enrico Scholz @ 2015-02-04 11:48 UTC (permalink / raw)
  To: openembedded-core

Bruno Bottazzini <bruno.bottazzini-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> writes:

> +PACKAGES =+ "${PN}-services-ask-password"
> +SUMMARY_${PN}-services-ask-password = "systemd's service and tool to
> query the user for a system password"
> +RRECOMMENDS_${PN}-services-ask-password = "${PN}-services-base"
> +FILES_${PN}-services-ask-password = "\
> +        ${rootprefix}/bin/systemd-ask-password \
> +        ${rootprefix}/bin/systemd-tty-ask-password-agent \
> +        ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
> +        ${systemd_unitdir}/system/systemd-ask-password-console.path \
> +        ${systemd_unitdir}/system/systemd-ask-password-console.service \
> +        ${systemd_unitdir}/system/systemd-ask-password-wall.path \
> +        ${systemd_unitdir}/system/systemd-ask-password-wall.service \
> +"

I think, enumerating services in this kind becomes a maintenance
nightmare.  E.g. you have to check for every future systemd version
whether service gets listed in a new .wants.  Using wildcards can
simplify this; e.g. see systemd_elito_populate_packages() in

          https://www.cvg.de/people/ensc/systemd_216.bbappend


Enrico


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

* Re: [PATCH] systemd: update version from 216 to 218
  2015-02-04 11:48     ` Enrico Scholz
@ 2015-02-04 17:04       ` Bottazzini, Bruno
  2015-02-04 17:59         ` Enrico Scholz
  0 siblings, 1 reply; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-02-04 17:04 UTC (permalink / raw)
  To: Enrico Scholz; +Cc: openembedded-core

On Wed, 4 Feb 2015 12:48:35 +0100
Enrico Scholz <enrico.scholz@sigma-chemnitz.de> wrote:

> Bruno Bottazzini
> <bruno.bottazzini-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> writes:
> 
> > +PACKAGES =+ "${PN}-services-ask-password"
> > +SUMMARY_${PN}-services-ask-password = "systemd's service and tool
> > to query the user for a system password"
> > +RRECOMMENDS_${PN}-services-ask-password = "${PN}-services-base"
> > +FILES_${PN}-services-ask-password = "\
> > +        ${rootprefix}/bin/systemd-ask-password \
> > +        ${rootprefix}/bin/systemd-tty-ask-password-agent \
> > +
> > ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path
> > \
> > +
> > ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path
> > \
> > +
> > ${systemd_unitdir}/system/systemd-ask-password-console.path \
> > +
> > ${systemd_unitdir}/system/systemd-ask-password-console.service \
> > +        ${systemd_unitdir}/system/systemd-ask-password-wall.path \
> > +
> > ${systemd_unitdir}/system/systemd-ask-password-wall.service \ +"
> 
> I think, enumerating services in this kind becomes a maintenance
> nightmare.  E.g. you have to check for every future systemd version
> whether service gets listed in a new .wants.  Using wildcards can
> simplify this; e.g. see systemd_elito_populate_packages() in
> 
>           https://www.cvg.de/people/ensc/systemd_216.bbappend
> 
> 
> Enrico

Enrico,

On your example, wouldn't we have to enumerate the packages too ? 
But now it is on a different place.

Where did you get this file ? I looked into master branch but I
couldn't find it.

Thanks,

Bruno Bottazzini




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

* [PATCH v2 0/2] systemd: update version from 216 to 218
@ 2015-02-04 17:04 ` Bruno Bottazzini
  2015-02-04 17:04   ` [PATCH v2 1/2] systemd: update " Bruno Bottazzini
  2015-02-04 17:04   ` [PATCH v2 2/2] systemd: split modules into packages Bruno Bottazzini
  0 siblings, 2 replies; 73+ messages in thread
From: Bruno Bottazzini @ 2015-02-04 17:04 UTC (permalink / raw)
  To: openembedded-core

Differences from v1:

1- Commit split into 2 commits.
   First one is updating systemd from version 216 to 218.
   Second one is splitting it into packages.

-------------------------------------------------------
In this patchset we split systemd into packages.

Since, systemd has a lot of features, now the user can exclude them from the
final build.

Instead of carrying all systemd modules. We will be able to customize it
as our needs.

In the end we will be able to get a smaller and optimized system


Bruno Bottazzini (2):
  systemd: update from 216 to 218
  systemd: split modules into packages

 ...r-executing-scripts-under-etc-systemd-218.patch |  131 ++
 .../systemd/systemd_218-pam-fix-fallocate.patch    |   91 ++
 meta/recipes-core/systemd/systemd_218.bb           | 1251 ++++++++++++++++++++
 3 files changed, 1473 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch
 create mode 100644 meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch
 create mode 100644 meta/recipes-core/systemd/systemd_218.bb

-- 
1.9.1



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

* [PATCH v2 1/2] systemd: update from 216 to 218
  2015-02-04 17:04 ` [PATCH v2 0/2] " Bruno Bottazzini
@ 2015-02-04 17:04   ` Bruno Bottazzini
  2015-02-04 17:04   ` [PATCH v2 2/2] systemd: split modules into packages Bruno Bottazzini
  1 sibling, 0 replies; 73+ messages in thread
From: Bruno Bottazzini @ 2015-02-04 17:04 UTC (permalink / raw)
  To: openembedded-core

---
 ...r-executing-scripts-under-etc-systemd-218.patch | 131 ++++++
 .../systemd/systemd_218-pam-fix-fallocate.patch    |  91 ++++
 meta/recipes-core/systemd/systemd_218.bb           | 482 +++++++++++++++++++++
 3 files changed, 704 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch
 create mode 100644 meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch
 create mode 100644 meta/recipes-core/systemd/systemd_218.bb

diff --git a/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch
new file mode 100644
index 0000000..d50f2cb
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-systemd-218.patch
@@ -0,0 +1,131 @@
+From 0dec519c563654148d3cdd363d2598b50313de60 Mon Sep 17 00:00:00 2001
+From: Bruno Bottazzini <bruno.bottazzini@intel.com>
+Date: Mon, 2 Feb 2015 13:53:24 -0200
+Subject: [PATCH 1/1] add support for executing scripts under /etc/rcS.d/
+
+To be compatible, all services translated from scripts under /etc/rcS.d would
+run before services translated from scripts under /etc/rcN.d.
+---
+ src/sysv-generator/sysv-generator.c | 46 ++++++++++++++++++++++++++++---------
+ 1 file changed, 35 insertions(+), 11 deletions(-)
+
+diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
+index b8b77aa..9494afb 100644
+--- a/src/sysv-generator/sysv-generator.c
++++ b/src/sysv-generator/sysv-generator.c
+@@ -42,7 +42,8 @@
+ 
+ typedef enum RunlevelType {
+         RUNLEVEL_UP,
+-        RUNLEVEL_DOWN
++        RUNLEVEL_DOWN,
++        RUNLEVEL_SYSINIT
+ } RunlevelType;
+ 
+ static const struct {
+@@ -57,6 +58,9 @@ static const struct {
+         { "rc4.d",  SPECIAL_RUNLEVEL4_TARGET, RUNLEVEL_UP },
+         { "rc5.d",  SPECIAL_RUNLEVEL5_TARGET, RUNLEVEL_UP },
+ 
++        /* Debian style rcS.d, also adopted by OE */
++        { "rcS.d",  SPECIAL_SYSINIT_TARGET,   RUNLEVEL_SYSINIT},
++
+         /* Standard SysV runlevels for shutdown */
+         { "rc0.d",  SPECIAL_POWEROFF_TARGET,  RUNLEVEL_DOWN },
+         { "rc6.d",  SPECIAL_REBOOT_TARGET,    RUNLEVEL_DOWN }
+@@ -65,7 +69,7 @@ static const struct {
+            directories in this order, and we want to make sure that
+            sysv_start_priority is known when we first load the
+            unit. And that value we only know from S links. Hence
+-           UP must be read before DOWN */
++           UP/SYSINIT must be read before DOWN */
+ };
+ 
+ typedef struct SysvStub {
+@@ -81,6 +85,8 @@ typedef struct SysvStub {
+         char **conflicts;
+         bool has_lsb;
+         bool reload;
++        bool default_dependencies;
++        bool from_rcsd;
+ } SysvStub;
+ 
+ const char *arg_dest = "/tmp";
+@@ -189,6 +195,8 @@ static int generate_unit_file(SysvStub *s) {
+                 "Description=%s\n",
+                 s->path, s->description);
+ 
++        if (!s->default_dependencies)
++                fprintf(f, "DefaultDependencies=no\n");
+         if (!isempty(before))
+                 fprintf(f, "Before=%s\n", before);
+         if (!isempty(after))
+@@ -717,15 +725,26 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
+                         r = strv_extend(&s->after, other->name);
+                         if (r < 0)
+                                 return log_oom();
+-                }
+-                else if (other->sysv_start_priority > s->sysv_start_priority) {
+-                        r = strv_extend(&s->before, other->name);
++               } else if (other->from_rcsd && !s->from_rcsd) {
++                        r = strv_extend(&s->after, other->name);
+                         if (r < 0)
+                                 return log_oom();
+-                }
+-                else
+-                        continue;
+-
++        } else {
++          /* All scripts under /etc/rcS.d should execute before scripts under
++           * /etc/rcN.d */
++                 if (!other->from_rcsd && s->from_rcsd) {
++                         r = strv_extend(&s->before, other->name);
++                                if (r < 0)
++                                        return log_oom();
++                        }
++                        else if (other->sysv_start_priority > s->sysv_start_priority) {
++                                r = strv_extend(&s->before, other->name);
++                                if (r < 0)
++                                        return log_oom();
++                        }
++                        else
++                                continue;
++               }
+                 /* FIXME: Maybe we should compare the name here lexicographically? */
+         }
+ 
+@@ -784,6 +803,8 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
+                                 return log_oom();
+ 
+                         service->sysv_start_priority = -1;
++                        service->default_dependencies = true;
++                        service->from_rcsd = false;
+                         service->name = name;
+                         service->path = fpath;
+ 
+@@ -869,9 +890,11 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
+ 
+                                 if (de->d_name[0] == 'S')  {
+ 
+-                                        if (rcnd_table[i].type == RUNLEVEL_UP) {
++                                        if (rcnd_table[i].type == RUNLEVEL_UP || rcnd_table[i].type == RUNLEVEL_SYSINIT) {
+                                                 service->sysv_start_priority =
+                                                         MAX(a*10 + b, service->sysv_start_priority);
++                                                service->default_dependencies = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?false:true;
++                                                service->from_rcsd = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?true:false;
+                                         }
+ 
+                                         r = set_ensure_allocated(&runlevel_services[i], NULL);
+@@ -883,7 +906,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
+                                                 goto finish;
+ 
+                                 } else if (de->d_name[0] == 'K' &&
+-                                           (rcnd_table[i].type == RUNLEVEL_DOWN)) {
++                                        (rcnd_table[i].type == RUNLEVEL_DOWN ||
++                                         rcnd_table[i].type == RUNLEVEL_SYSINIT)) {
+ 
+                                         r = set_ensure_allocated(&shutdown_services, NULL);
+                                         if (r < 0)
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch b/meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch
new file mode 100644
index 0000000..2fbf4b4
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/systemd_218-pam-fix-fallocate.patch
@@ -0,0 +1,91 @@
+From 84c87cf474f9ffd23332a40b7e06900ff8272a69 Mon Sep 17 00:00:00 2001
+From: Bruno Bottazzini <bruno.bottazzini@intel.com>
+Date: Fri, 30 Jan 2015 18:14:42 -0200
+Subject: [PATCH 1/1] This patch is uclibc specific, thus not suitable for
+ upstream.
+
+---
+ src/journal/journal-file.c  | 15 ++++++++++++++-
+ src/journal/journald-kmsg.c | 16 ++++++++++++++--
+ 2 files changed, 28 insertions(+), 3 deletions(-)
+
+diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
+index ec12e89..3d21528 100644
+--- a/src/journal/journal-file.c
++++ b/src/journal/journal-file.c
+@@ -35,6 +35,7 @@
+ #include "lookup3.h"
+ #include "compress.h"
+ #include "fsprg.h"
++#include "config.h"
+ 
+ #define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*sizeof(HashItem))
+ #define DEFAULT_FIELD_HASH_TABLE_SIZE (333ULL*sizeof(HashItem))
+@@ -354,7 +355,7 @@ static int journal_file_fstat(JournalFile *f) {
+ 
+ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) {
+         uint64_t old_size, new_size;
+-        int r;
++        int r = 0;
+ 
+         assert(f);
+ 
+@@ -418,9 +419,21 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size)
+         /* Note that the glibc fallocate() fallback is very
+            inefficient, hence we try to minimize the allocation area
+            as we can. */
++#ifdef HAVE_POSIX_FALLOCATE
+         r = posix_fallocate(f->fd, old_size, new_size - old_size);
+         if (r != 0)
+                 return -r;
++#else
++        /* Write something every 512 bytes to make sure the block is allocated */
++        uint64_t len = new_size - old_size;
++        uint64_t offset = old_size;
++        for (offset += (len-1) % 512; len > 0; offset += 512) {
++                len -= 512;
++                if (pwrite(f->fd, "", 1, offset) != 1)
++                        return -errno;
++        }
++
++#endif /* HAVE_POSIX_FALLOCATE */
+ 
+         f->header->arena_size = htole64(new_size - le64toh(f->header->header_size));
+ 
+diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
+index aca4571..f3c2c19 100644
+--- a/src/journal/journald-kmsg.c
++++ b/src/journal/journald-kmsg.c
+@@ -437,6 +437,7 @@ fail:
+ int server_open_kernel_seqnum(Server *s) {
+         _cleanup_close_ int fd;
+         uint64_t *p;
++        int r = 0;
+ 
+         assert(s);
+ 
+@@ -449,8 +450,19 @@ int server_open_kernel_seqnum(Server *s) {
+                 log_error_errno(errno, "Failed to open /run/systemd/journal/kernel-seqnum, ignoring: %m");
+                 return 0;
+         }
+-
+-        if (posix_fallocate(fd, 0, sizeof(uint64_t)) < 0) {
++#ifdef HAVE_POSIX_FALLOCATE
++        r = posix_fallocate(fd, 0, sizeof(uint64_t));
++#else
++       /* Use good old method to write zeros into the journal file
++          perhaps very inefficient yet working. */
++       char *buf = alloca(sizeof(uint64_t));
++       off_t oldpos = lseek(fd, 0, SEEK_CUR);
++       bzero(buf, sizeof(uint64_t));
++       lseek(fd, 0, SEEK_SET);
++       r = write(fd, buf, sizeof(uint64_t));
++       lseek(fd, oldpos, SEEK_SET);
++#endif /* HAVE_POSIX_FALLOCATE */
++       if (r < 0) {
+                 log_error_errno(errno, "Failed to allocate sequential number file, ignoring: %m");
+                 return 0;
+         }
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd_218.bb b/meta/recipes-core/systemd/systemd_218.bb
new file mode 100644
index 0000000..87d9fe8
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd_218.bb
@@ -0,0 +1,482 @@
+SUMMARY = "System and service manager for Linux, replacing SysVinit"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
+
+LICENSE = "GPLv2 & LGPLv2.1 & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
+                    file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
+                    file://LICENSE.MIT;md5=544799d0b492f119fa04641d1b8868ed"
+
+PROVIDES = "udev"
+
+PE = "1"
+
+DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux"
+
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+SECTION = "base/shell"
+
+inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext
+
+SRCREV = "820aced6f6067a6b7c57b7d36e44f64378870cbf"
+
+PV = "218+git${SRCPV}"
+
+SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=git \
+           file://systemd-pam-configure-check-uclibc.patch \
+           file://systemd-pam-fix-execvpe.patch \
+           file://systemd-pam-fix-mkostemp.patch \
+           file://systemd_218-pam-fix-fallocate.patch \
+           file://optional_secure_getenv.patch \
+           file://uclibc-get-physmem.patch \
+           file://0001-add-support-for-executing-scripts-under-etc-systemd-218.patch \
+           file://0001-systemd-user-avoid-using-system-auth.patch \
+           file://touchscreen.rules \
+           file://00-create-volatile.conf \
+           file://init \
+           file://run-ptest \
+          "
+
+S = "${WORKDIR}/git"
+
+SRC_URI_append_libc-uclibc = "\
+                             file://systemd-pam-fix-getty-unit.patch \
+                            "
+LDFLAGS_append_libc-uclibc = " -lrt"
+
+GTKDOC_DOCDIR = "${S}/docs/"
+
+# regardless of PACKAGECONFIG, libgcrypt is always required to expand
+# the AM_PATH_LIBGCRYPT autoconf macro
+DEPENDS += "libgcrypt curl"
+
+PACKAGECONFIG ??= "acl blkid efi kmod gcrypt lz4 xz libidn"
+
+PACKAGECONFIG[glib] = "--enable-gudev,--disable-gudev,glib-2.0"
+
+
+########################################################################
+# Highly Recommended Section
+########################################################################
+
+# ACL (Access Control List), see http://savannah.nongnu.org/projects/acl
+# used by systemd, journald and logind to provide fine grained access to files.
+# NOTE: do not remove unless you know what you are doing.
+PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
+
+# blkid from util-linux to read block devices, see ftp://ftp.kernel.org/pub/linux/utils/util-linux
+# required to:
+#  - discover and mount GPT partitions as /, /home and /srv based on GUIDs.
+#  - nspawn to locate partitions
+#  - udev to probe and use block devices
+# NOTE: do not remove unless you know what you are doing.
+PACKAGECONFIG[blkid] = "--enable-blkid,--disable-blkid,util-linux"
+
+# EFI support in systemd and udev, includes discovery and mount of partitions and efivars.
+# NOTE: do not remove unless you know what you are doing.
+PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
+
+# kmod to load kernel modules, provides modprobe, insmod et al, see https://www.kernel.org/pub/linux/utils/kernel/kmod/
+# required to:
+#  - let systemd load required modules automatically (ipv6, unix, kdbus...)
+#  - let udev load modules for devices (hotplug and coldplug) using a built-in
+# NOTE: do not remove unless you know what you are doing.
+PACKAGECONFIG[kmod] = "--enable-kmod,--disable-kmod,kmod"
+
+# D-Bus policy and authentication framework, see http://www.freedesktop.org/wiki/Software/polkit/
+# WARN: no package "polkit" in poky
+PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,,polkit"
+
+
+########################################################################
+# Security Section
+########################################################################
+
+# SELinux (Security Enhanced Linux), see http://selinuxproject.org/page/Main_Page
+# WARN: no package "libselinux" in poky
+PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
+
+# See http://people.redhat.com/sgrubb/audit/
+# WARN: no package "libaudit" in poky
+PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,libaudit"
+
+# SMACK (Simplified Mandatory Access Control Kernel), see http://schaufler-ca.com/
+# needs Kernel CONFIG_SECURITY_SMACK and /etc/smack/accesses.d/ to be useful, otherwise is unused.
+PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
+
+# IMA (Integrity Measurement Architecture) setup, see http://linux-ima.sourceforge.net/
+# needs Kernel CONFIG_IMA and /etc/ima/ima-policy to be useful, otherwise is unused.
+PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
+
+# AppArmor, proactively protects the operating system and applications
+# from external or internal threats, even zero-day attacks, by
+# enforcing good behavior and preventing even unknown application flaws
+# from being exploited. See http://wiki.apparmor.net/index.php/Main_Page
+# needs Kernel CONFIG_SECURITY_APPARMOR to be useful, otherwise is unused.
+# WARN: no package "libapparmor" in poky
+PACKAGECONFIG[apparmor] = "--enable-apparmor,--disable-apparmor,libapparmor"
+
+# SECCOMP provides syscall filtering and sandboxing, see http://sourceforge.net/projects/libseccomp/
+# It is used by browsers to implement their plugins.
+# systemd will allow restricting the syscalls available to an application with a line like below
+# in [Service] block:
+#    SystemCallFilter=brk mmap access open fstat close read fstat mprotect arch_prctl munmap write
+# needs Kernel CONFIG_SECCOMP, CONFIG_SECCOMP_FILTER and CONFIG_HAVE_ARCH_SECCOMP_FILTER to be useful.
+# WARN: no package "libseccomp" in poky
+PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
+
+
+########################################################################
+# Journal Section
+########################################################################
+
+# extract ELF symbols and store the stack trace along the coredump
+PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils (>= 0.158)"
+
+# Sign the journal for anti-tampering
+PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
+
+# Compress the journal (and coredumps stored in the journal) using lz4
+PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
+
+# Compress the journal (and coredumps stored in the journal) using xz (lzma)
+# xz has lower priority than lz4 for compression, but having both may help to extract and decompress
+# journal entries generated in other systems.
+PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
+
+# when generating gcrypt verification keys (journalctl --setup-keys), output the secret
+# as QR code so it can be easily scanned by a phone or systems with digital camera and QR scanner.
+# WARN: no package "libqrencode" in poky
+PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,libqrencode"
+
+
+########################################################################
+# Resolve Daemon Section
+########################################################################
+
+# IDN (Internationalized Domain Name) see http://www.gnu.org/software/libidn/
+PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
+
+CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill"
+
+# Helper variables to clarify locations.  This mirrors the logic in systemd's
+# build system.
+rootprefix ?= "${base_prefix}"
+rootlibdir ?= "${base_libdir}"
+rootlibexecdir = "${rootprefix}/lib"
+
+# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
+EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
+                 --with-rootlibdir=${rootlibdir} \
+                 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
+                 --disable-manpages \
+                 --disable-introspection \
+                 --disable-kdbus \
+                 --disable-terminal \
+                 --enable-split-usr \
+                 --without-python \
+                 --enable-libcurl \
+                 --enable-coredump \
+                 --enable-ldconfig \
+                 --enable-backlight \
+                 --enable-binfmt \
+                 --enable-bootchart \
+                 --enable-firstboot \
+                 --enable-hostnamed \
+                 --enable-localed \
+                 --enable-logind \
+                 --enable-machined \
+                 --enable-networkd \
+                 --enable-quotacheck \
+                 --enable-randomseed \
+                 --enable-resolved \
+                 --enable-rfkill \
+                 --enable-sysusers \
+                 --enable-vconsole \
+                 --with-sysvrcnd-path=${sysconfdir} \
+                 ac_cv_path_KILL=${base_bindir}/kill \
+               "
+# uclibc does not have NSS
+EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
+
+do_configure_prepend() {
+        export CPP="${HOST_PREFIX}cpp ${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}"
+        export NM="${HOST_PREFIX}gcc-nm"
+        export AR="${HOST_PREFIX}gcc-ar"
+        export RANLIB="${HOST_PREFIX}gcc-ranlib"
+        export KMOD="${base_bindir}/kmod"
+        if [ -d ${S}/units.pre_sed ] ; then
+                cp -r ${S}/units.pre_sed ${S}/units
+        else
+                cp -r ${S}/units ${S}/units.pre_sed
+        fi
+        sed -i -e 's:=/root:=${ROOT_HOME}:g' ${S}/units/*.service*
+        sed -i '/ln --relative --help/d' ${S}/configure.ac
+        sed -i -e 's:\$(LN_S) --relative -f:lnr:g' ${S}/Makefile.am
+        sed -i -e 's:\$(LN_S) --relative:lnr:g' ${S}/Makefile.am
+}
+
+do_install() {
+        autotools_do_install
+        install -d ${D}/${base_sbindir}
+
+        # Provide support for initramfs
+        [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
+        [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
+
+        # Create machine-id
+        # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
+        touch ${D}${sysconfdir}/machine-id
+
+        install -m 0644 ${WORKDIR}/*.rules ${D}${rootlibexecdir}/udev/rules.d/
+
+        install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${exec_prefix}/lib/tmpfiles.d/
+
+        if ${@bb.utils.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
+                sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
+        fi
+
+        # Move libgudev back to ${rootlibdir} to keep backward compatibility
+        if ${@bb.utils.contains('PACKAGECONFIG','glib','true','false',d)}; then
+                if [ ${rootlibdir} != ${exec_prefix}/lib ]; then
+                        mv -t ${D}${rootlibdir} ${D}${exec_prefix}/lib/libgudev*
+                fi
+        fi
+
+        # Delete journal README, as log can be symlinked inside volatile.
+        rm -f ${D}/${localstatedir}/log/README
+}
+
+do_install_ptest () {
+       install -d ${D}${PTEST_PATH}/test
+       cp -rf ${S}/test/* ${D}${PTEST_PATH}/test
+       install -m 0755  ${B}/test-udev ${D}${PTEST_PATH}/
+       install -d ${D}${PTEST_PATH}/build-aux
+       cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
+       cp -rf ${B}/rules ${D}${PTEST_PATH}/
+       # This directory needs to be there for udev-test.pl to work.
+       install -d ${D}${libdir}/udev/rules.d
+       cp ${B}/Makefile ${D}${PTEST_PATH}/
+       cp ${S}/test/sys.tar.xz ${D}${PTEST_PATH}/test
+       sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/test/udev-test.pl
+       sed -i 's#${S}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile
+       sed -i 's#${B}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile
+}
+
+python populate_packages_prepend (){
+    systemdlibdir = d.getVar("rootlibdir", True)
+    do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
+}
+PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd|nss).*"
+
+PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \
+             ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh libgudev"
+
+SYSTEMD_PACKAGES = "${PN}-binfmt"
+SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} += "--system systemd-journal-gateway"
+GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
+
+FILES_${PN}-analyze = "${bindir}/systemd-analyze"
+
+FILES_${PN}-initramfs = "/init"
+RDEPENDS_${PN}-initramfs = "${PN}"
+
+FILES_libgudev = "${libdir}/libgudev*${SOLIBS}"
+
+# The test cases need perl and bash to run correctly.
+RDEPENDS_${PN}-ptest += "perl bash"
+FILES_${PN}-ptest += "${libdir}/udev/rules.d"
+
+FILES_${PN}-dbg += "${libdir}/systemd/ptest/.debug"
+
+FILES_${PN}-gui = "${bindir}/systemadm"
+
+FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
+                              ${systemd_unitdir}/system/systemd-vconsole-setup.service \
+                              ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
+
+FILES_${PN}-kernel-install = "${bindir}/kernel-install \
+                              ${sysconfdir}/kernel/ \
+                              ${exec_prefix}/lib/kernel \
+                             "
+FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
+                         "
+
+FILES_${PN}-zsh = "${datadir}/zsh/site-functions"
+
+FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
+                      ${exec_prefix}/lib/binfmt.d \
+                      ${rootlibexecdir}/systemd/systemd-binfmt \
+                      ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
+                      ${systemd_unitdir}/system/systemd-binfmt.service"
+RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
+
+RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
+
+CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
+                ${sysconfdir}/systemd/logind.conf \
+                ${sysconfdir}/systemd/system.conf \
+                ${sysconfdir}/systemd/user.conf"
+
+FILES_${PN} = " ${base_bindir}/* \
+                ${datadir}/bash-completion \
+                ${datadir}/dbus-1/services \
+                ${datadir}/dbus-1/system-services \
+                ${datadir}/polkit-1 \
+                ${datadir}/${BPN} \
+                ${datadir}/factory \
+                ${sysconfdir}/bash_completion.d/ \
+                ${sysconfdir}/dbus-1/ \
+                ${sysconfdir}/machine-id \
+                ${sysconfdir}/modules-load.d/ \
+                ${sysconfdir}/sysctl.d/ \
+                ${sysconfdir}/systemd/ \
+                ${sysconfdir}/tmpfiles.d/ \
+                ${sysconfdir}/xdg/ \
+                ${sysconfdir}/init.d/README \
+                ${rootlibexecdir}/systemd/* \
+                ${systemd_unitdir}/* \
+                ${base_libdir}/security/*.so \
+                ${libdir}/libnss_* \
+                /cgroup \
+                ${bindir}/systemd* \
+                ${bindir}/coredumpctl \
+                ${bindir}/busctl \
+                ${bindir}/localectl \
+                ${bindir}/hostnamectl \
+                ${bindir}/timedatectl \
+                ${bindir}/bootctl \
+                ${bindir}/kernel-install \
+                ${exec_prefix}/lib/tmpfiles.d/*.conf \
+                ${exec_prefix}/lib/systemd \
+                ${exec_prefix}/lib/modules-load.d \
+                ${exec_prefix}/lib/sysctl.d \
+                ${exec_prefix}/lib/sysusers.d \
+                ${localstatedir} \
+                /lib/udev/rules.d/70-uaccess.rules \
+                /lib/udev/rules.d/71-seat.rules \
+                /lib/udev/rules.d/73-seat-late.rules \
+                /lib/udev/rules.d/99-systemd.rules \
+                ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d', '', d)} \
+               "
+
+FILES_${PN}-dbg += "${rootlibdir}/.debug ${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} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
+RDEPENDS_${PN} += "volatile-binds"
+
+RRECOMMENDS_${PN} += "systemd-compat-units udev-hwdb\
+                      util-linux-agetty \
+                      util-linux-fsck e2fsprogs-e2fsck \
+                      kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 os-release \
+"
+
+PACKAGES =+ "udev-dbg udev udev-hwdb"
+
+FILES_udev-dbg += "/lib/udev/.debug"
+
+RPROVIDES_udev = "hotplug"
+
+RDEPENDS_udev-hwdb += "udev"
+
+FILES_udev += "${base_sbindir}/udevd \
+               ${rootlibexecdir}/systemd/systemd-udevd \
+               ${rootlibexecdir}/udev/accelerometer \
+               ${rootlibexecdir}/udev/ata_id \
+               ${rootlibexecdir}/udev/cdrom_id \
+               ${rootlibexecdir}/udev/collect \
+               ${rootlibexecdir}/udev/findkeyboards \
+               ${rootlibexecdir}/udev/keyboard-force-release.sh \
+               ${rootlibexecdir}/udev/keymap \
+               ${rootlibexecdir}/udev/mtd_probe \
+               ${rootlibexecdir}/udev/scsi_id \
+               ${rootlibexecdir}/udev/v4l_id \
+               ${rootlibexecdir}/udev/keymaps \
+               ${rootlibexecdir}/udev/rules.d/4*.rules \
+               ${rootlibexecdir}/udev/rules.d/5*.rules \
+               ${rootlibexecdir}/udev/rules.d/6*.rules \
+               ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
+               ${rootlibexecdir}/udev/rules.d/75*.rules \
+               ${rootlibexecdir}/udev/rules.d/78*.rules \
+               ${rootlibexecdir}/udev/rules.d/8*.rules \
+               ${rootlibexecdir}/udev/rules.d/95*.rules \
+               ${rootlibexecdir}/udev/rules.d/70-mouse.rules \
+               ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
+               ${rootlibexecdir}/udev/rules.d/touchscreen.rules \
+               ${sysconfdir}/udev \
+               ${sysconfdir}/init.d/systemd-udevd \
+               ${systemd_unitdir}/system/*udev* \
+               ${systemd_unitdir}/system/*.wants/*udev* \
+               ${base_bindir}/udevadm \
+               ${datadir}/bash-completion/completions/udevadm \
+              "
+
+FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
+
+INITSCRIPT_PACKAGES = "udev"
+INITSCRIPT_NAME_udev = "systemd-udevd"
+INITSCRIPT_PARAMS_udev = "start 03 S ."
+
+python __anonymous() {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+# TODO:
+# u-a for runlevel and telinit
+
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
+
+ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
+ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
+ALTERNATIVE_PRIORITY[init] ?= "300"
+
+ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
+ALTERNATIVE_PRIORITY[halt] ?= "300"
+
+ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
+ALTERNATIVE_PRIORITY[reboot] ?= "300"
+
+ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
+ALTERNATIVE_PRIORITY[shutdown] ?= "300"
+
+ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
+ALTERNATIVE_PRIORITY[poweroff] ?= "300"
+
+ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
+ALTERNATIVE_PRIORITY[runlevel] ?= "300"
+
+pkg_postinst_udev-hwdb () {
+	if test -n "$D"; then
+		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
+			--root $D
+	else
+		udevadm hwdb --update
+	fi
+}
+
+pkg_prerm_udev-hwdb () {
+	if test -n "$D"; then
+		exit 1
+	fi
+
+	rm -f ${sysconfdir}/udev/hwdb.bin
+}
+
+# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
+# that we don't build both udev and systemd in world builds.
+python () {
+    if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
+        raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
+}
-- 
1.9.1



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

* [PATCH v2 2/2] systemd: split modules into packages
  2015-02-04 17:04 ` [PATCH v2 0/2] " Bruno Bottazzini
  2015-02-04 17:04   ` [PATCH v2 1/2] systemd: update " Bruno Bottazzini
@ 2015-02-04 17:04   ` Bruno Bottazzini
  2015-02-06 18:45     ` Randy Witt
  1 sibling, 1 reply; 73+ messages in thread
From: Bruno Bottazzini @ 2015-02-04 17:04 UTC (permalink / raw)
  To: openembedded-core

It wil be able to choose what systemd module to be installed.
The final result may get smaller, if the user wanted to.
By default it will install the whole systemd which may be big.
---
 meta/recipes-core/systemd/systemd_218.bb | 1059 ++++++++++++++++++++++++++----
 1 file changed, 914 insertions(+), 145 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_218.bb b/meta/recipes-core/systemd/systemd_218.bb
index 87d9fe8..ef8de44 100644
--- a/meta/recipes-core/systemd/systemd_218.bb
+++ b/meta/recipes-core/systemd/systemd_218.bb
@@ -6,8 +6,6 @@ LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
                     file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
                     file://LICENSE.MIT;md5=544799d0b492f119fa04641d1b8868ed"
 
-PROVIDES = "udev"
-
 PE = "1"
 
 DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux"
@@ -16,7 +14,7 @@ DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
 SECTION = "base/shell"
 
-inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext
+inherit gtk-doc pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext
 
 SRCREV = "820aced6f6067a6b7c57b7d36e44f64378870cbf"
 
@@ -165,7 +163,6 @@ rootprefix ?= "${base_prefix}"
 rootlibdir ?= "${base_libdir}"
 rootlibexecdir = "${rootprefix}/lib"
 
-# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
 EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
                  --with-rootlibdir=${rootlibdir} \
                  ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
@@ -267,169 +264,789 @@ do_install_ptest () {
 
 python populate_packages_prepend (){
     systemdlibdir = d.getVar("rootlibdir", True)
-    do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
+    do_split_packages(d, systemdlibdir, '^lib(udev|gudev|systemd|nss)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
 }
 PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd|nss).*"
 
-PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \
-             ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh libgudev"
+########################################################################
+# Base Packages
+########################################################################
+
+PACKAGES =+ "${PN}-generators-filesystems"
+SUMMARY_${PN}-generators-filesystems = "systemd's generator for filesystem services based on fstab and GPT"
+RDEPENDS_${PN}-generators-filesystems = "${PN}-services-fsck"
+FILES_${PN}-generators-filesystems = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-fstab-generator \
+        ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
+        ${rootlibexecdir}/systemd/systemd-remount-fs \
+        ${systemd_unitdir}/system/local-fs.target.wants/systemd-remount-fs.service \
+        ${systemd_unitdir}/system/systemd-remount-fs.service \
+"
 
-SYSTEMD_PACKAGES = "${PN}-binfmt"
-SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
+PACKAGES =+ "${PN}-generators-getty"
+SUMMARY_${PN}-generators-getty = "systemd's generator TTY services"
+RDEPENDS_${PN}-generators-getty = "${PN}-services-getty"
+FILES_${PN}-generators-getty = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-getty-generator \
+"
 
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} += "--system systemd-journal-gateway"
-GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
+PACKAGES =+ "${PN}-tools"
+SUMMARY_${PN}-tools = "systemd command line tools (cgls, delta, run, analyze...)"
+RRECOMMENDS_${PN}-tools = "${PN}-services-base"
+FILES_${PN}-tools = "\
+        ${base_bindir}/systemd-machine-id-setup \
+        ${bindir}/busctl \
+        ${bindir}/coredumpctl \
+        ${bindir}/systemd-analyze \
+        ${bindir}/systemd-cat \
+        ${bindir}/systemd-cgls \
+        ${bindir}/systemd-cgtop \
+        ${bindir}/systemd-delta \
+        ${bindir}/systemd-detect-virt \
+        ${bindir}/systemd-path \
+        ${bindir}/systemd-run \
+        ${rootlibexecdir}/systemd/systemd-ac-power \
+        ${rootlibexecdir}/systemd/systemd-activate \
+        ${rootlibexecdir}/systemd/systemd-reply-password \
+        ${rootprefix}/bin/systemd-escape \
+        ${rootprefix}/bin/systemd-notify \
+"
 
-FILES_${PN}-analyze = "${bindir}/systemd-analyze"
+########################################################################
+# Services Packages
+########################################################################
 
-FILES_${PN}-initramfs = "/init"
-RDEPENDS_${PN}-initramfs = "${PN}"
+PACKAGES =+ "${PN}-services-ask-password"
+SUMMARY_${PN}-services-ask-password = "systemd's service and tool to query the user for a system password"
+RRECOMMENDS_${PN}-services-ask-password = "${PN}-services-base"
+FILES_${PN}-services-ask-password = "\
+        ${rootprefix}/bin/systemd-ask-password \
+        ${rootprefix}/bin/systemd-tty-ask-password-agent \
+        ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
+        ${systemd_unitdir}/system/systemd-ask-password-console.path \
+        ${systemd_unitdir}/system/systemd-ask-password-console.service \
+        ${systemd_unitdir}/system/systemd-ask-password-wall.path \
+        ${systemd_unitdir}/system/systemd-ask-password-wall.service \
+"
+
+PACKAGES =+ "${PN}-services-backlight"
+SUMMARY_${PN}-services-backlight = "systemd's backlight state save/restore service"
+FILES_${PN}-services-backlight = "\
+        ${systemd_unitdir}/system/systemd-backlight@.service \
+        ${rootlibexecdir}/systemd/systemd-backlight \
+"
+
+PACKAGES =+ "${PN}-services-binfmt"
+SUMMARY_${PN}-services-binfmt = "systemd's service to configure additional binary formats for executables"
+RRECOMMENDS_${PN}-services-binfmt = "kernel-module-binfmt-misc"
+FILES_${PN}-services-binfmt = "\
+        ${sysconfdir}/binfmt.d/ \
+        ${exec_prefix}/lib/binfmt.d/ \
+        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.automount \
+        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.mount \
+        ${systemd_unitdir}/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-binfmt.service \
+        ${systemd_unitdir}/system/systemd-binfmt.service \
+        ${rootlibexecdir}/systemd/systemd-binfmt \
+"
+
+PACKAGES =+ "${PN}-services-bootchart"
+SUMMARY_${PN}-services-bootchart = "systemd's boot performance service and graphing tool"
+CONFFILES_${PN}-services-bootchart = "${sysconfdir}/systemd/bootchart.conf"
+FILES_${PN}-services-bootchart = "\
+        ${sysconfdir}/systemd/bootchart.conf \
+        ${rootlibexecdir}/systemd/systemd-bootchart \
+"
+
+PACKAGES =+ "${PN}-services-coredump"
+SUMMARY_${PN}-services-coredump = "systemd's coredump log hook and service"
+RDEPENDS_${PN}-services-coredump = "${PN}-services-sysctl"
+CONFFILES_${PN}-services-coredump = "${sysconfdir}/systemd/coredump.conf"
+FILES_${PN}-services-coredump = "\
+        ${exec_prefix}/lib/sysctl.d/50-coredump.conf \
+        ${sysconfdir}/systemd/coredump.conf \
+        ${rootlibexecdir}/systemd/systemd-coredump \
+"
+
+PACKAGES =+ "${PN}-services-cryptsetup"
+SUMMARY_${PN}-services-cryptsetup = "systemd's disk decryption service"
+ALLOW_EMPTY_${PN}-services-cryptsetup = "1"
+FILES_${PN}-services-cryptsetup = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-cryptsetup-generator \
+        ${systemd_unitdir}/system/cryptsetup-pre.target \
+        ${systemd_unitdir}/system/cryptsetup.target \
+        ${systemd_unitdir}/system/sysinit.target.wants/cryptsetup.target \
+        ${rootlibexecdir}/systemd/systemd-cryptsetup \
+"
+
+PACKAGES =+ "${PN}-services-dbus"
+SUMMARY_${PN}-services-dbus = "systemd's DBus daemon system service"
+# NOTE: dbus dependency will go away when kdbus is in use
+RDEPENDS_${PN}-services-dbus = "dbus"
+FILES_${PN}-services-dbus = "\
+        ${datadir}/dbus-1/services/org.freedesktop.systemd1.service \
+        ${datadir}/dbus-1/system-services/org.freedesktop.systemd1.service \
+        ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
+        ${systemd_unitdir}/system/sockets.target.wants/dbus.socket \
+        ${systemd_unitdir}/system/dbus.target.wants/dbus.socket \
+        ${systemd_unitdir}/system/multi-user.target.wants/dbus.service \
+        ${systemd_unitdir}/system/dbus.socket \
+        ${systemd_unitdir}/system/dbus.service \
+"
+
+PACKAGES =+ "${PN}-services-debug"
+SUMMARY_${PN}-services-debug = "systemd's debug service"
+RRECOMMENDS_${PN}-services-debug = "${PN}-services-base ${PN}-tools"
+FILES_${PN}-services-debug = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-debug-generator \
+        ${systemd_unitdir}/system/debug-shell.service \
+        ${systemd_unitdir}/system/sys-kernel-config.mount \
+        ${systemd_unitdir}/system/sys-kernel-debug.mount \
+        ${systemd_unitdir}/system/sysinit.target.wants/sys-kernel-config.mount \
+        ${systemd_unitdir}/system/sysinit.target.wants/sys-kernel-debug.mount \
+"
+
+PACKAGES =+ "${PN}-services-firstboot"
+SUMMARY_${PN}-services-firstboot = "systemd's service to initialize basic system settings"
+FILES_${PN}-services-firstboot = "\
+        ${base_bindir}/systemd-firstboot \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-firstboot.service \
+        ${systemd_unitdir}/system/systemd-firstboot.service \
+"
+
+PACKAGES =+ "${PN}-services-fsck"
+SUMMARY_${PN}-services-fsck = "systemd's filesystem check service"
+RRECOMMENDS_${PN}-services-fsck = "util-linux-fsck e2fsprogs-e2fsck"
+FILES_${PN}-services-fsck = "\
+        ${systemd_unitdir}/system/systemd-fsck-root.service \
+        ${systemd_unitdir}/system/systemd-fsck@.service \
+        ${rootlibexecdir}/systemd/systemd-fsck \
+"
+
+PACKAGES =+ "${PN}-services-fuse"
+SUMMARY_${PN}-services-fuse = "systemd's FUSE (filesystem in userspace) service"
+FILES_${PN}-services-fuse = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/sys-fs-fuse-connections.mount \
+        ${systemd_unitdir}/system/sys-fs-fuse-connections.mount \
+"
+
+PACKAGES =+ "${PN}-services-getty"
+SUMMARY_${PN}-services-getty = "systemd's getty service"
+RRECOMMENDS_${PN}-services-getty = "util-linux-agetty ${PN}-generators-getty"
+FILES_${PN}-services-getty = "\
+        ${systemd_unitdir}/system/autovt@.service \
+        ${systemd_unitdir}/system/console-getty.service \
+        ${systemd_unitdir}/system/container-getty@.service \
+        ${systemd_unitdir}/system/getty@.service \
+        ${systemd_unitdir}/system/serial-getty@.service \
+        ${sysconfdir}/systemd/system/getty.target.wants/ \
+"
+
+PACKAGES =+ "${PN}-services-hostnamed"
+SUMMARY_${PN}-services-hostnamed = "systemd's hostname management service"
+RDEPENDS_${PN}-services-hostnamed = "${PN}-services-dbus"
+CONFFILES_${PN}-services-hostnamed = "${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf"
+FILES_${PN}-services-hostnamed = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
+        ${bindir}/hostnamectl \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.hostname1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.hostname1.service \
+        ${systemd_unitdir}/system/org.freedesktop.hostname1.busname \
+        ${systemd_unitdir}/system/systemd-hostnamed.service \
+        ${rootlibexecdir}/systemd/systemd-hostnamed \
+        ${datadir}/dbus-1/system-services/org.freedesktop.hostname1.service \
+        ${datadir}/polkit-1/actions/org.freedesktop.hostname1.policy \
+"
+
+PACKAGES =+ "${PN}-services-journal"
+SUMMARY_${PN}-services-journal = "systemd's journal (logging) service"
+CONFFILES_${PN}-services-journal = "${sysconfdir}/systemd/journald.conf"
+FILES_${PN}-services-journal = "\
+        ${base_bindir}/journalctl \
+        ${rootlibexecdir}/systemd/systemd-journald \
+        ${sysconfdir}/systemd/journald.conf \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-journald-dev-log.socket \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-journald.socket \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journal-catalog-update.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journal-flush.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journald.service \
+        ${systemd_unitdir}/system/systemd-journal-catalog-update.service \
+        ${systemd_unitdir}/system/systemd-journal-flush.service \
+        ${systemd_unitdir}/system/systemd-journald-dev-log.socket \
+        ${systemd_unitdir}/system/systemd-journald.service \
+        ${systemd_unitdir}/system/systemd-journald.socket \
+        ${exec_prefix}/lib/systemd/catalog/ \
+"
+
+
+PACKAGES =+ "${PN}-services-journal-remote"
+SUMMARY_${PN}-services-journal-remote = "systemd's service and tools to receive journal messages over the network"
+RDEPENDS_${PN}-services-journal-remote = "${PN}-services-journal"
+# NOTE: if no sysusers or tmpfiles, then users/groups and FS structure must be setup
+RRECOMMENDS_${PN}-services-journal-remote = "${PN}-services-sysusers ${PN}-services-tmpfiles"
+CONFFILES_${PN}-services-journal-remote = "${sysconfdir}/systemd/journald-remote.conf"
+FILES_${PN}-services-journal-remote = "\
+        ${exec_prefix}/lib/sysusers.d/systemd-remote.conf \
+        ${exec_prefix}/lib/tmpfiles.d/systemd-remote.conf \
+        ${rootlibexecdir}/systemd/systemd-journal-remote \
+        ${sysconfdir}/systemd/journal-remote.conf \
+"
+
+PACKAGES =+ "${PN}-services-journal-upload"
+SUMMARY_${PN}-services-journal-upload = "systemd's service and tools to send journal messages over the network"
+RDEPENDS_${PN}-services-journal-upload = "${PN}-services-journal"
+# NOTE: if no sysusers, then users/groups must be setup
+RRECOMMENDS_${PN}-services-journal-upload = "${PN}-services-sysusers"
+CONFFILES_${PN}-services-journal-upload = "${sysconfdir}/systemd/journald-upload.conf"
+FILES_${PN}-services-journal-upload = "\
+        ${rootlibexecdir}/systemd/systemd-journal-upload \
+        ${sysconfdir}/systemd/journal-upload.conf \
+        ${systemd_unitdir}/system/systemd-journal-upload.service \
+"
+
+PACKAGES =+ "${PN}-services-ldconfig"
+SUMMARY_${PN}-services-ldconfig = "systemd's service to run ldconfig after updates"
+FILES_${PN}-services-ldconfig = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/ldconfig.service \
+        ${systemd_unitdir}/system/ldconfig.service \
+"
+
+PACKAGES =+ "${PN}-services-localed"
+SUMMARY_${PN}-services-localed = "systemd's locale management service"
+RDEPENDS_${PN}-services-localed = "${PN}-services-dbus"
+CONFFILES_${PN}-services-localed = "${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf"
+FILES_${PN}-services-localed = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf \
+        ${bindir}/localectl \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.locale1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.locale1.service \
+        ${systemd_unitdir}/system/org.freedesktop.locale1.busname \
+        ${systemd_unitdir}/system/systemd-localed.service \
+        ${rootlibexecdir}/systemd/systemd-localed \
+        ${datadir}/dbus-1/system-services/org.freedesktop.locale1.service \
+        ${datadir}/polkit-1/actions/org.freedesktop.locale1.policy \
+        ${datadir}/systemd/kbd-model-map \
+"
+
+PACKAGES =+ "${PN}-services-logind"
+SUMMARY_${PN}-services-logind = "systemd's login management service"
+RDEPENDS_${PN}-services-logind = "${PN}-services-dbus ${PN}-services-tmpfiles"
+RRECOMMENDS_${PN}-services-logind = "udev"
+CONFFILES_${PN}-services-logind = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf \
+        ${sysconfdir}/systemd/logind.conf \
+"
+FILES_${PN}-services-logind = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf \
+        ${sysconfdir}/systemd/logind.conf \
+        ${base_bindir}/loginctl \
+        ${base_bindir}/systemd-inhibit \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.login1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.login1.service \
+        ${systemd_unitdir}/system/multi-user.target.wants/systemd-logind.service \
+        ${systemd_unitdir}/system/multi-user.target.wants/systemd-user-sessions.service \
+        ${systemd_unitdir}/system/org.freedesktop.login1.busname \
+        ${systemd_unitdir}/system/systemd-logind.service \
+        ${systemd_unitdir}/system/systemd-user-sessions.service \
+        ${systemd_unitdir}/system/user@.service \
+        ${rootlibexecdir}/systemd/systemd-logind \
+        ${rootlibexecdir}/systemd/systemd-user-sessions \
+        ${datadir}/dbus-1/system-services/org.freedesktop.login1.service \
+        ${datadir}/polkit-1/actions/org.freedesktop.login1.policy \
+        ${rootlibexecdir}/udev/rules.d/70-uaccess.rules \
+        ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
+        ${rootlibexecdir}/udev/rules.d/71-seat.rules \
+        ${rootlibexecdir}/udev/rules.d/73-seat-late.rules \
+"
+
+PACKAGES =+ "${PN}-services-machined"
+SUMMARY_${PN}-services-machined = "systemd's virtual machine and container management service"
+RDEPENDS_${PN}-services-machined = "${PN}-services-dbus"
+CONFFILES_${PN}-services-machined = "${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf"
+FILES_${PN}-services-machined = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
+        ${base_bindir}/machinectl \
+        ${exec_prefix}/lib/libnss_mymachines.so.2 \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.machine1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.machine1.service \
+        ${systemd_unitdir}/system/machine.slice \
+        ${systemd_unitdir}/system/org.freedesktop.machine1.busname \
+        ${systemd_unitdir}/system/systemd-machined.service \
+        ${rootlibexecdir}/systemd/systemd-machined \
+        ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
+"
+
+PACKAGES =+ "${PN}-services-modules-load"
+SUMMARY_${PN}-services-modules-load = "systemd's kernel module loading service"
+FILES_${PN}-services-modules-load = "\
+        ${sysconfdir}/modules-load.d/ \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-modules-load.service \
+        ${systemd_unitdir}/system/systemd-modules-load.service \
+        ${rootlibexecdir}/systemd/systemd-modules-load \
+        ${exec_prefix}/lib/modules-load.d \
+"
+
+PACKAGES =+ "${PN}-services-modules-static-nodes"
+SUMMARY_${PN}-services-modules-static-nodes = "systemd's kernel module static nodes creation service"
+RDEPENDS_${PN}-services-modules-static-nodes = "kmod ${PN}-services-tmpfiles"
+FILES_${PN}-services-modules-static-nodes = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/kmod-static-nodes.service \
+        ${systemd_unitdir}/system/kmod-static-nodes.service \
+"
+
+
+PACKAGES =+ "${PN}-services-multi-seat-x"
+SUMMARY_${PN}-services-multi-seat-x = "systemd's X11 multi-seat support service"
+RDEPENDS_${PN}-services-multi-seat-x = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/xserver', '', d)}"
+FILES_${PN}-services-multi-seat-x = "\
+        ${rootlibexecdir}/systemd/systemd-multi-seat-x \
+"
+
+PACKAGES =+ "${PN}-services-networkd"
+SUMMARY_${PN}-services-networkd = "systemd's network management (static, DHCP, bridge...) service"
+# NOTE: if no sysusers, then users/groups must be setup
+RRECOMMENDS_${PN}-services-networkd = "${PN}-services-sysusers"
+FILES_${PN}-services-networkd = "\
+        ${sysconfdir}/systemd/network/ \
+        ${sysconfdir}/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service \
+        ${sysconfdir}/systemd/system/multi-user.target.wants/systemd-networkd.service \
+        ${base_bindir}/networkctl \
+        ${rootlibexecdir}/systemd/network/80-container-host0.network \
+        ${rootlibexecdir}/systemd/network/80-container-ve.network \
+        ${rootlibexecdir}/systemd/network/99-default.link \
+        ${systemd_unitdir}/system/systemd-networkd-wait-online.service \
+        ${systemd_unitdir}/system/systemd-networkd.service \
+        ${rootlibexecdir}/systemd/systemd-networkd \
+        ${rootlibexecdir}/systemd/systemd-networkd-wait-online \
+        ${exec_prefix}/lib/systemd/network \
+"
+
+PACKAGES =+ "${PN}-services-nspawn"
+SUMMARY_${PN}-services-nspawn = "systemd's namespace spawing service and tool"
+FILES_${PN}-services-nspawn = "\
+        ${systemd_unitdir}/system/systemd-nspawn@.service \
+        ${bindir}/systemd-nspawn \
+"
+
+PACKAGES =+ "${PN}-services-quota"
+SUMMARY_${PN}-services-quota = "systemd's file system quota enable and check service"
+RDEPENDS_${PN}-services-quota = "quota"
+FILES_${PN}-services-quota = "\
+        ${systemd_unitdir}/system/quotaon.service \
+        ${systemd_unitdir}/system/systemd-quotacheck.service \
+        ${rootlibexecdir}/systemd/systemd-quotacheck \
+"
+
+PACKAGES =+ "${PN}-services-randomseed"
+SUMMARY_${PN}-services-randomseed = "systemd's random seed save/restore service"
+FILES_${PN}-services-randomseed = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-random-seed.service \
+        ${systemd_unitdir}/system/systemd-random-seed.service \
+        ${rootlibexecdir}/systemd/systemd-random-seed \
+"
 
-FILES_libgudev = "${libdir}/libgudev*${SOLIBS}"
+PACKAGES =+ "${PN}-services-readahead"
+SUMMARY_${PN}-services-readahead = "systemd's disk read ahead service"
+FILES_${PN}-services-readahead = "\
+        ${systemd_unitdir}/system/systemd-readahead-collect.service \
+        ${systemd_unitdir}/system/systemd-readahead-done.service \
+        ${systemd_unitdir}/system/systemd-readahead-done.timer \
+        ${systemd_unitdir}/system/systemd-readahead-drop.service \
+        ${systemd_unitdir}/system/systemd-readahead-replay.service \
+        ${rootlibexecdir}/systemd/systemd-readahead \
+"
+
+PACKAGES =+ "${PN}-services-resolved"
+SUMMARY_${PN}-services-resolved = "systemd's network name resolution management service"
+# NOTE: if no sysusers or tmpfiles, then users/groups and FS structure must be setup
+RRECOMMENDS_${PN}-services-resolved = "${PN}-services-dbus ${PN}-services-sysusers ${PN}-services-tmpfiles"
+CONFFILES_${PN}-services-resolved = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
+        ${sysconfdir}/systemd/resolved.conf \
+"
+FILES_${PN}-services-resolved = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
+        ${sysconfdir}/systemd/resolved.conf \
+        ${sysconfdir}/systemd/system/multi-user.target.wants/systemd-resolved.service \
+        ${exec_prefix}/lib/libnss_resolve.so.2 \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.resolve1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.resolve1.service \
+        ${systemd_unitdir}/system/org.freedesktop.resolve1.busname \
+        ${systemd_unitdir}/system/systemd-resolved.service \
+        ${rootlibexecdir}/systemd/systemd-resolve-host \
+        ${rootlibexecdir}/systemd/systemd-resolved \
+        ${datadir}/dbus-1/system-services/org.freedesktop.resolve1.service \
+"
+
+PACKAGES =+ "${PN}-services-rfkill"
+SUMMARY_${PN}-services-rfkill = "systemd's rfkill state save/restore service"
+FILES_${PN}-services-rfkill = "\
+        ${systemd_unitdir}/system/systemd-rfkill@.service \
+        ${rootlibexecdir}/systemd/systemd-rfkill \
+"
+
+PACKAGES =+ "${PN}-services-sleep"
+SUMMARY_${PN}-services-sleep = "systemd's sleep, suspend and hiberate services"
+FILES_${PN}-services-sleep = "\
+        ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
+        ${systemd_unitdir}/system/systemd-suspend.service \
+        ${systemd_unitdir}/system/systemd-hibernate.service \
+        ${systemd_unitdir}/system-sleep/ \
+        ${rootlibexecdir}/systemd/systemd-sleep \
+"
+
+PACKAGES =+ "${PN}-services-sysctl"
+SUMMARY_${PN}-services-sysctl = "systemd's kernel parameters configuration service"
+FILES_${PN}-services-sysctl = "\
+        ${sysconfdir}/sysctl.d/ \
+        ${exec_prefix}/lib/sysctl.d/ \
+        ${exec_prefix}/lib/sysctl.d/50-default.conf \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-sysctl.service \
+        ${systemd_unitdir}/system/systemd-sysctl.service \
+        ${rootlibexecdir}/systemd/systemd-sysctl \
+"
+
+PACKAGES =+ "${PN}-services-sysusers"
+SUMMARY_${PN}-services-sysusers = "systemd's service and tool to allocate system users and groups"
+FILES_${PN}-services-sysusers = "\
+        ${base_bindir}/systemd-sysusers \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-sysusers.service \
+        ${systemd_unitdir}/system/systemd-sysusers.service \
+        ${exec_prefix}/lib/sysusers.d/basic.conf \
+        ${exec_prefix}/lib/sysusers.d/systemd.conf \
+"
+
+PACKAGES =+ "${PN}-services-sysvcompat"
+SUMMARY_${PN}-services-sysvcompat = "systemd's SYSV legacy and compatibility service"
+# NOTE: if no sysusers or tmpfiles, then users/groups and FS structure must be setup
+RRECOMMENDS_${PN}-services-sysvcompat = "${PN}-services-sysusers ${PN}-services-tmpfiles"
+FILES_${PN}-services-sysvcompat = "\
+        ${rootlibexecdir}/systemd/systemd-bus-proxyd \
+        ${rootlibexecdir}/systemd/systemd-socket-proxyd \
+        ${bindir}/systemd-stdio-bridge \
+        ${rootlibexecdir}/systemd/system-generators/systemd-rc-local-generator \
+        ${rootlibexecdir}/systemd/system-generators/systemd-sysv-generator \
+        ${rootlibexecdir}/systemd/systemd-initctl \
+        ${rootlibexecdir}/systemd/systemd-update-utmp \
+        ${systemd_unitdir}/system/halt-local.service \
+        ${systemd_unitdir}/system/rc-local.service \
+        ${systemd_unitdir}/system/runlevel1.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/runlevel2.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/runlevel3.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/runlevel4.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/runlevel5.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-update-utmp.service \
+        ${systemd_unitdir}/system/systemd-initctl.service \
+        ${systemd_unitdir}/system/systemd-initctl.socket \
+        ${systemd_unitdir}/system/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/systemd-update-utmp.service \
+        ${exec_prefix}/lib/tmpfiles.d/legacy.conf \
+"
+
+PACKAGES =+ "${PN}-services-timedated"
+SUMMARY_${PN}-services-timedated = "systemd's time and date management service"
+RDEPENDS_${PN}-services-timedated = "${PN}-services-dbus"
+CONFFILES_${PN}-services-timedated = "${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf"
+FILES_${PN}-services-timedated = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
+        ${bindir}/timedatectl \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.timedate1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.timedate1.service \
+        ${systemd_unitdir}/system/org.freedesktop.timedate1.busname \
+        ${systemd_unitdir}/system/systemd-timedated.service \
+        ${rootlibexecdir}/systemd/systemd-timedated \
+        ${datadir}/dbus-1/system-services/org.freedesktop.timedate1.service \
+        ${datadir}/polkit-1/actions/org.freedesktop.timedate1.policy \
+"
+
+PACKAGES =+ "${PN}-services-timesyncd"
+SUMMARY_${PN}-services-timesyncd = "systemd's NTP sync service"
+# NOTE: if no sysusers, then users/groups must be setup
+RRECOMMENDS_${PN}-services-timesyncd = "${PN}-services-sysusers"
+CONFFILES_${PN}-services-timesyncd = "${sysconfdir}/systemd/timesyncd.conf"
+FILES_${PN}-services-timesyncd = "\
+        ${sysconfdir}/systemd/system/sysinit.target.wants/systemd-timesyncd.service \
+        ${sysconfdir}/systemd/timesyncd.conf \
+        ${systemd_unitdir}/system/systemd-timesyncd.service \
+        ${rootlibexecdir}/systemd/systemd-timesyncd \
+"
+
+PACKAGES =+ "${PN}-services-tmpfiles"
+SUMMARY_${PN}-services-tmpfiles = "systemd's service to create, delete and clean up volatile/tmp files/dirs"
+FILES_${PN}-services-tmpfiles = "\
+        ${sysconfdir}/tmpfiles.d/ \
+        ${base_bindir}/systemd-tmpfiles \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-tmpfiles-setup.service \
+        ${systemd_unitdir}/system/systemd-tmpfiles-clean.service \
+        ${systemd_unitdir}/system/systemd-tmpfiles-clean.timer \
+        ${systemd_unitdir}/system/systemd-tmpfiles-setup-dev.service \
+        ${systemd_unitdir}/system/systemd-tmpfiles-setup.service \
+        ${systemd_unitdir}/system/timers.target.wants/systemd-tmpfiles-clean.timer \
+        ${exec_prefix}/lib/tmpfiles.d/etc.conf \
+        ${exec_prefix}/lib/tmpfiles.d/systemd-nologin.conf \
+        ${exec_prefix}/lib/tmpfiles.d/systemd.conf \
+        ${exec_prefix}/lib/tmpfiles.d/tmp.conf \
+        ${exec_prefix}/lib/tmpfiles.d/var.conf \
+        ${exec_prefix}/lib/tmpfiles.d/00-create-volatile.conf \
+        ${exec_prefix}/lib/tmpfiles.d/x11.conf \
+"
+
+PACKAGES =+ "${PN}-services-udev"
+SUMMARY_${PN}-services-udev = "systemd's udev services"
+RDEPENDS_${PN}-services-udev = "udev"
+FILES_${PN}-services-udev = "\
+        ${systemd_unitdir}/system/initrd-udevadm-cleanup-db.service \
+        ${systemd_unitdir}/system/systemd-udev-hwdb-update.service \
+        ${systemd_unitdir}/system/systemd-udev-settle.service \
+        ${systemd_unitdir}/system/systemd-udev-trigger.service \
+        ${systemd_unitdir}/system/systemd-udevd-control.socket \
+        ${systemd_unitdir}/system/systemd-udevd-kernel.socket \
+        ${systemd_unitdir}/system/systemd-udevd.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udevd.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udev-trigger.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udev-hwdb-update.service \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-udevd-kernel.socket \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-udevd-control.socket \
+"
+
+PACKAGES =+ "${PN}-services-update"
+SUMMARY_${PN}-services-update = "systemd's post update service"
+FILES_${PN}-services-update = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-system-update-generator \
+        ${rootlibexecdir}/systemd/systemd-update-done \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-update-done.service \
+        ${systemd_unitdir}/system/systemd-update-done.service \
+"
+
+PACKAGES =+ "${PN}-services-vconsole"
+SUMMARY_${PN}-services-vconsole = "systemd's service to configure the virtual console (keyboard/font)"
+RDEPENDS_${PN}-services-vconsole = "kbd kbd-consolefonts kbd-keymaps"
+FILES_${PN}-services-vconsole = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service \
+        ${systemd_unitdir}/system/systemd-vconsole-setup.service \
+        ${rootlibexecdir}/systemd/systemd-vconsole-setup \
+"
+
+########################################################################
+# Standard BitBake Packages
+########################################################################
+
+FILES_${PN}-dbg += "\
+        ${base_libdir}/security/.debug/ \
+        ${libdir}/systemd/ptest/.debug \
+        ${rootlibdir}/.debug \
+        ${systemd_unitdir}/*/.debug \
+        ${systemd_unitdir}/.debug \
+"
+
+FILES_${PN}-dev += "\
+        ${base_libdir}/security/*.la \
+        ${datadir}/dbus-1/interfaces/ \
+"
 
 # The test cases need perl and bash to run correctly.
 RDEPENDS_${PN}-ptest += "perl bash"
-FILES_${PN}-ptest += "${libdir}/udev/rules.d"
-
-FILES_${PN}-dbg += "${libdir}/systemd/ptest/.debug"
-
-FILES_${PN}-gui = "${bindir}/systemadm"
-
-FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
-                              ${systemd_unitdir}/system/systemd-vconsole-setup.service \
-                              ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
-
-FILES_${PN}-kernel-install = "${bindir}/kernel-install \
-                              ${sysconfdir}/kernel/ \
-                              ${exec_prefix}/lib/kernel \
-                             "
-FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
-                         "
-
-FILES_${PN}-zsh = "${datadir}/zsh/site-functions"
-
-FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
-                      ${exec_prefix}/lib/binfmt.d \
-                      ${rootlibexecdir}/systemd/systemd-binfmt \
-                      ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
-                      ${systemd_unitdir}/system/systemd-binfmt.service"
-RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
-
-RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
-
-CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
-                ${sysconfdir}/systemd/logind.conf \
-                ${sysconfdir}/systemd/system.conf \
-                ${sysconfdir}/systemd/user.conf"
-
-FILES_${PN} = " ${base_bindir}/* \
-                ${datadir}/bash-completion \
-                ${datadir}/dbus-1/services \
-                ${datadir}/dbus-1/system-services \
-                ${datadir}/polkit-1 \
-                ${datadir}/${BPN} \
-                ${datadir}/factory \
-                ${sysconfdir}/bash_completion.d/ \
-                ${sysconfdir}/dbus-1/ \
-                ${sysconfdir}/machine-id \
-                ${sysconfdir}/modules-load.d/ \
-                ${sysconfdir}/sysctl.d/ \
-                ${sysconfdir}/systemd/ \
-                ${sysconfdir}/tmpfiles.d/ \
-                ${sysconfdir}/xdg/ \
-                ${sysconfdir}/init.d/README \
-                ${rootlibexecdir}/systemd/* \
-                ${systemd_unitdir}/* \
-                ${base_libdir}/security/*.so \
-                ${libdir}/libnss_* \
-                /cgroup \
-                ${bindir}/systemd* \
-                ${bindir}/coredumpctl \
-                ${bindir}/busctl \
-                ${bindir}/localectl \
-                ${bindir}/hostnamectl \
-                ${bindir}/timedatectl \
-                ${bindir}/bootctl \
-                ${bindir}/kernel-install \
-                ${exec_prefix}/lib/tmpfiles.d/*.conf \
-                ${exec_prefix}/lib/systemd \
-                ${exec_prefix}/lib/modules-load.d \
-                ${exec_prefix}/lib/sysctl.d \
-                ${exec_prefix}/lib/sysusers.d \
-                ${localstatedir} \
-                /lib/udev/rules.d/70-uaccess.rules \
-                /lib/udev/rules.d/71-seat.rules \
-                /lib/udev/rules.d/73-seat-late.rules \
-                /lib/udev/rules.d/99-systemd.rules \
-                ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d', '', d)} \
-               "
+FILES_${PN}-ptest += "\
+        ${libdir}/udev/rules.d \
+"
 
-FILES_${PN}-dbg += "${rootlibdir}/.debug ${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"
+########################################################################
+# Misc Packages
+########################################################################
 
-RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
-RDEPENDS_${PN} += "volatile-binds"
+PACKAGES =+ "${PN}-bash"
+SUMMARY_${PN}-bash = "systemd bash shell commands completion"
+FILES_${PN}-bash = "\
+        ${datadir}/bash-completion/completions/bootctl \
+        ${datadir}/bash-completion/completions/busctl \
+        ${datadir}/bash-completion/completions/coredumpctl \
+        ${datadir}/bash-completion/completions/hostnamectl \
+        ${datadir}/bash-completion/completions/journalctl \
+        ${datadir}/bash-completion/completions/kernel-install \
+        ${datadir}/bash-completion/completions/localectl \
+        ${datadir}/bash-completion/completions/loginctl \
+        ${datadir}/bash-completion/completions/machinectl \
+        ${datadir}/bash-completion/completions/systemctl \
+        ${datadir}/bash-completion/completions/systemd-* \
+        ${datadir}/bash-completion/completions/timedatectl \
+"
 
-RRECOMMENDS_${PN} += "systemd-compat-units udev-hwdb\
-                      util-linux-agetty \
-                      util-linux-fsck e2fsprogs-e2fsck \
-                      kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 os-release \
+PACKAGES =+ "${PN}-initramfs"
+SUMMARY_${PN}-initramfs = "systemd's initramfs support"
+FILES_${PN}-initramfs = "/init"
+RDEPENDS_${PN}-initramfs = "${PN}"
+
+PACKAGES =+ "${PN}-kernel-install"
+SUMMARY_${PN}-kernel-install = "systemd tool to add/remove kernel and initramfs images to/from /boot"
+RDEPENDS_${PN}-kernel-install = "bash kmod"
+FILES_${PN}-kernel-install = "\
+        ${bindir}/kernel-install \
+        ${sysconfdir}/kernel/install.d/ \
+        ${exec_prefix}/lib/kernel/install.d/ \
 "
 
-PACKAGES =+ "udev-dbg udev udev-hwdb"
+PACKAGES =+ "${PN}-pam"
+SUMMARY_${PN}-pam = "systemd PAM modules and configuration"
+FILES_${PN}-pam = "\
+        ${sysconfdir}/pam.d \
+        ${base_libdir}/security/pam_systemd.so \
+"
 
-FILES_udev-dbg += "/lib/udev/.debug"
+PACKAGES =+ "${PN}-preset"
+SUMMARY_${PN}-preset = "systemd's service enablement presets"
+FILES_${PN}-preset = "${systemd_unitdir}/system-preset/90-systemd.preset"
+
+PACKAGES =+ "${PN}-rpm-macros"
+SUMMARY_${PN}-rpm-macros = "systemd RPM macros"
+FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm/macros.d/macros.systemd"
+
+PACKAGES =+ "${PN}-zsh"
+SUMMARY_${PN}-zsh = "systemd zsh shell commands completion"
+FILES_${PN}-zsh = "\
+        ${datadir}/zsh/site-functions/_bootctl \
+        ${datadir}/zsh/site-functions/_busctl \
+        ${datadir}/zsh/site-functions/_coredumpctl \
+        ${datadir}/zsh/site-functions/_hostnamectl \
+        ${datadir}/zsh/site-functions/_journalctl \
+        ${datadir}/zsh/site-functions/_kernel-install \
+        ${datadir}/zsh/site-functions/_localectl \
+        ${datadir}/zsh/site-functions/_loginctl \
+        ${datadir}/zsh/site-functions/_machinectl \
+        ${datadir}/zsh/site-functions/_sd_* \
+        ${datadir}/zsh/site-functions/_systemctl \
+        ${datadir}/zsh/site-functions/_systemd \
+        ${datadir}/zsh/site-functions/_systemd-* \
+        ${datadir}/zsh/site-functions/_timedatectl \
+"
 
-RPROVIDES_udev = "hotplug"
 
-RDEPENDS_udev-hwdb += "udev"
-
-FILES_udev += "${base_sbindir}/udevd \
-               ${rootlibexecdir}/systemd/systemd-udevd \
-               ${rootlibexecdir}/udev/accelerometer \
-               ${rootlibexecdir}/udev/ata_id \
-               ${rootlibexecdir}/udev/cdrom_id \
-               ${rootlibexecdir}/udev/collect \
-               ${rootlibexecdir}/udev/findkeyboards \
-               ${rootlibexecdir}/udev/keyboard-force-release.sh \
-               ${rootlibexecdir}/udev/keymap \
-               ${rootlibexecdir}/udev/mtd_probe \
-               ${rootlibexecdir}/udev/scsi_id \
-               ${rootlibexecdir}/udev/v4l_id \
-               ${rootlibexecdir}/udev/keymaps \
-               ${rootlibexecdir}/udev/rules.d/4*.rules \
-               ${rootlibexecdir}/udev/rules.d/5*.rules \
-               ${rootlibexecdir}/udev/rules.d/6*.rules \
-               ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
-               ${rootlibexecdir}/udev/rules.d/75*.rules \
-               ${rootlibexecdir}/udev/rules.d/78*.rules \
-               ${rootlibexecdir}/udev/rules.d/8*.rules \
-               ${rootlibexecdir}/udev/rules.d/95*.rules \
-               ${rootlibexecdir}/udev/rules.d/70-mouse.rules \
-               ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
-               ${rootlibexecdir}/udev/rules.d/touchscreen.rules \
-               ${sysconfdir}/udev \
-               ${sysconfdir}/init.d/systemd-udevd \
-               ${systemd_unitdir}/system/*udev* \
-               ${systemd_unitdir}/system/*.wants/*udev* \
-               ${base_bindir}/udevadm \
-               ${datadir}/bash-completion/completions/udevadm \
-              "
-
-FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
+########################################################################
+# Aggregation of Split Packages
+########################################################################
 
-INITSCRIPT_PACKAGES = "udev"
-INITSCRIPT_NAME_udev = "systemd-udevd"
-INITSCRIPT_PARAMS_udev = "start 03 S ."
+PACKAGES =+ "${PN}-services-essential"
+SUMMARY_${PN}-services-essential = "systemd's essential services aggregation"
+ALLOW_EMPTY_${PN}-services-essential = "1"
+RDEPENDS_${PN}-services-essential = "\
+        ${PN}-generators-filesystems \
+        ${PN}-preset \
+        ${PN}-services-fsck \
+        ${PN}-services-journal \
+        ${PN}-services-modules-load \
+        ${PN}-services-randomseed \
+        ${PN}-services-sleep \
+        ${PN}-services-sysctl \
+        ${PN}-services-sysusers \
+        ${PN}-services-tmpfiles \
+        ${PN}-services-udev \
+        udev-rules-systemd \
+"
 
-python __anonymous() {
-    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
-        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
-}
+PACKAGES =+ "${PN}-services-base"
+SUMMARY_${PN}-services-base = "systemd's base services aggregation"
+ALLOW_EMPTY_${PN}-services-base = "1"
+RDEPENDS_${PN}-services-base = "${PN}-services-essential \
+        ${PN}-services-ask-password \
+        ${PN}-services-backlight \
+        ${PN}-services-binfmt \
+        ${PN}-services-coredump \
+        ${PN}-services-dbus \
+        ${PN}-services-firstboot \
+        ${PN}-services-fuse \
+        ${PN}-services-hostnamed \
+        ${PN}-services-ldconfig \
+        ${PN}-services-localed \
+        ${PN}-services-logind \
+        ${PN}-services-networkd \
+        ${PN}-services-quota \
+        ${PN}-services-resolved \
+        ${PN}-services-rfkill \
+        ${PN}-services-timedated \
+        ${PN}-services-timesyncd \
+        ${PN}-services-update \
+        ${PN}-services-vconsole \
+"
+
+PACKAGES =+ "${PN}-services-all"
+SUMMARY_${PN}-services-all = "systemd's all services and tools aggregation"
+ALLOW_EMPTY_${PN}-services-all = "1"
+RDEPENDS_${PN}-services-all = "${PN}-services-base \
+        ${PN}-services-bootchart \
+        ${PN}-services-cryptsetup \
+        ${PN}-services-debug \
+        ${PN}-services-journal-remote \
+        ${PN}-services-journal-upload \
+        ${PN}-services-machined \
+        ${PN}-services-nspawn \
+        ${PN}-services-sysvcompat \
+        ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${PN}-services-multi-seat-x', '', d)} \
+        ${PN}-tools \
+"
+
+
+########################################################################
+# Core Package
+########################################################################
 
-# TODO:
-# u-a for runlevel and telinit
+CONFFILES_${PN} = "\
+        ${sysconfdir}/machine-id \
+        ${sysconfdir}/systemd/system.conf \
+        ${sysconfdir}/systemd/user.conf \
+"
+
+FILES_${PN} = "\
+        ${base_bindir}/systemctl \
+        ${base_bindir}/systemd-hwdb \
+        ${bindir}/bootctl \
+        ${datadir}/${BPN} \
+        ${datadir}/factory \
+        ${exec_prefix}/lib/libnss_myhostname* \
+        ${libdir}/systemd/user-generators/ \
+        ${libdir}/systemd/user/ \
+        ${localstatedir} \
+        ${rootlibexecdir}/systemd/systemd \
+        ${rootlibexecdir}/systemd/systemd-cgroups-agent \
+        ${rootlibexecdir}/systemd/systemd-shutdown \
+        ${rootlibexecdir}/systemd/systemd-shutdownd \
+        ${rootlibexecdir}/systemd/systemd-machine-id-commit \
+        ${rootlibexecdir}/systemd/systemd-hibernate-resume \
+        ${rootlibexecdir}/systemd/systemd-importd \
+        ${rootlibexecdir}/systemd/import-pubring.gpg \
+        ${rootlibexecdir}/systemd/systemd-pull \
+        ${sysconfdir}/init.d/README \
+        ${sysconfdir}/machine-id \
+        ${sysconfdir}/systemd/system.conf \
+        ${sysconfdir}/systemd/system/ \
+        ${sysconfdir}/systemd/user.conf \
+        ${sysconfdir}/systemd/user/ \
+        ${sysconfdir}/xdg/systemd/ \
+        ${systemd_unitdir}/system-generators/ \
+        ${systemd_unitdir}/system-preset/ \
+        ${systemd_unitdir}/system-shutdown/ \
+        ${systemd_unitdir}/system/ \
+"
+
+#RDEPENDS_${PN} += "volatile-binds"
+
+RRECOMMENDS_${PN} += "\
+        ${PN}-services-base \
+        ${PN}-services-essential \
+        ${PN}-generators-getty \
+        ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PN}-pam', '', d)} \
+        ${PN}-services-getty \
+        ${PN}-tools \
+        kernel-module-autofs4 \
+        kernel-module-ipv6 \
+        kernel-module-unix \
+        os-release \
+        udev (= ${EXTENDPKGV}) \
+        udev-hwdb \
+"
 
 ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
 
@@ -457,6 +1074,41 @@ ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
 ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
 ALTERNATIVE_PRIORITY[runlevel] ?= "300"
 
+
+########################################################################
+# UDEV Section
+########################################################################
+
+PACKAGES =+ "udev-dbg"
+SUMMARY_udev-dbg = "Dynamic device management - Debugging files"
+RRECOMMENDS_udev-dbg += "${PN}-dbg"
+FILES_udev-dbg = "\
+        ${rootlibexecdir}/udev/.debug \
+        ${base_sbindir}/.debug/udevd \
+        ${base_bindir}/.debug/udevadm \
+        ${rootlibexecdir}/systemd/.debug/systemd-udevd \
+        ${base_libdir}/.debug/libudev* \
+        ${base_libdir}/.debug/libgudev* \
+        ${exec_prefix}/lib/.debug/libgudev* \
+"
+
+PACKAGES =+ "udev-dev"
+SUMMARY_udev-dev = "Dynamic device management - Development files"
+RRECOMMENDS_udev-dev += "${PN}-dev"
+FILES_udev-dev = "\
+        ${datadir}/pkgconfig/*udev* \
+        ${libdir}/pkgconfig/*udev* \
+        ${libdir}/lib*udev*.la \
+        ${includedir}/*udev* \
+"
+
+PACKAGES =+ "udev-hwdb"
+SUMMARY_udev-hwdb = "Dynamic device management - Hardware database"
+RDEPENDS_udev-hwdb = "udev"
+FILES_udev-hwdb = "\
+        ${rootlibexecdir}/udev/hwdb.d/ \
+"
+
 pkg_postinst_udev-hwdb () {
 	if test -n "$D"; then
 		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
@@ -474,6 +1126,123 @@ pkg_prerm_udev-hwdb () {
 	rm -f ${sysconfdir}/udev/hwdb.bin
 }
 
+PACKAGES =+ "udev-bash"
+SUMMARY_udev-bash = "Dynamic device management - Bash shell commands completion"
+FILES_udev-bash = "${datadir}/bash-completion/completions/udevadm"
+
+PACKAGES =+ "udev-zsh"
+SUMMARY_udev-zsh = "Dynamic device management - zsh shell commands completion"
+FILES_udev-zsh = "${datadir}/zsh/site-functions/_udevadm"
+
+
+########################################################################
+# UDEV Rules Packages
+# split rules that require external programs or dependencies.
+# those that use only builtins are not split
+########################################################################
+
+PACKAGES =+ "udev-rules-accelerometer"
+SUMMARY_udev-rules-accelerometer = "Dynamic device management - accelerometer rules"
+FILES_udev-rules-accelerometer = "\
+        ${rootlibexecdir}/udev/accelerometer \
+        ${rootlibexecdir}/udev/rules.d/61-accelerometer.rules \
+"
+
+PACKAGES =+ "udev-rules-cdrom"
+SUMMARY_udev-rules-cdrom = "Dynamic device management - cdrom rules"
+FILES_udev-rules-cdrom = "\
+        ${rootlibexecdir}/udev/cdrom_id \
+        ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \
+"
+
+PACKAGES =+ "udev-rules-mtd"
+SUMMARY_udev-rules-mtd = "Dynamic device management - mtd rules"
+FILES_udev-rules-mtd = "\
+        ${rootlibexecdir}/udev/mtd_probe \
+        ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \
+"
+
+PACKAGES =+ "udev-rules-persistent-storage"
+SUMMARY_udev-rules-persistent-storage = "Dynamic device management - persistent storage rules"
+FILES_udev-rules-persistent-storage = "\
+        ${rootlibexecdir}/udev/ata_id \
+        ${rootlibexecdir}/udev/scsi_id \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \
+"
+
+PACKAGES =+ "udev-rules-systemd"
+SUMMARY_udev-rules-systemd = "Dynamic device management - systemd rules"
+RDEPENDS_udev-rules-systemd = "${PN} ${PN}-services-sysctl"
+FILES_udev-rules-systemd = "\
+        ${rootlibexecdir}/udev/rules.d/99-systemd.rules \
+"
+
+PACKAGES =+ "udev-rules-v4l"
+SUMMARY_udev-rules-v4l = "Dynamic device management - v4l rules"
+FILES_udev-rules-v4l = "\
+        ${rootlibexecdir}/udev/v4l_id \
+        ${rootlibexecdir}/udev/rules.d/*-persistent-v4l.rules \
+"
+
+PACKAGES =+ "udev-rules-all"
+SUMMARY_udev-rules-all = "Dynamic device management - all rules aggregation"
+ALLOW_EMPTY_udev-rules-all = "1"
+RDEPENDS_udev-rules-all = "\
+        udev-rules-accelerometer \
+        udev-rules-cdrom \
+        udev-rules-mtd \
+        udev-rules-persistent-storage \
+        udev-rules-systemd \
+        udev-rules-v4l \
+"
+
+PACKAGES =+ "udev"
+SUMMARY_udev = "Dynamic device management"
+RPROVIDES_udev = "hotplug"
+PROVIDES = "udev"
+CONFFILES_udev = "${sysconfdir}/udev/udev.conf"
+FILES_udev = "\
+        ${base_bindir}/udevadm \
+        ${base_sbindir}/udevd \
+        ${rootlibexecdir}/systemd/systemd-udevd \
+        ${rootlibexecdir}/udev/collect \
+        ${rootlibexecdir}/udev/rules.d/42-usb-hid-pm.rules \
+        ${rootlibexecdir}/udev/rules.d/50-firmware.rules \
+        ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \
+        ${rootlibexecdir}/udev/rules.d/60-drm.rules \
+        ${rootlibexecdir}/udev/rules.d/60-keyboard.rules \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-serial.rules \
+        ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \
+        ${rootlibexecdir}/udev/rules.d/75-net-description.rules \
+        ${rootlibexecdir}/udev/rules.d/75-tty-description.rules \
+        ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \
+        ${rootlibexecdir}/udev/rules.d/80-drivers.rules \
+        ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \
+        ${rootlibexecdir}/udev/rules.d/95-udev-late.rules \
+        ${rootlibexecdir}/udev/rules.d/70-mouse.rules \
+        ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
+        ${rootlibexecdir}/udev/rules.d/touchscreen.rules \
+        ${sysconfdir}/init.d/systemd-udevd \
+        ${sysconfdir}/udev \
+"
+
+RRECOMMENDS_udev = "\
+        udev-hwdb \
+        udev-rules-all \
+"
+
+INITSCRIPT_PACKAGES = "udev"
+INITSCRIPT_NAME_udev = "systemd-udevd"
+INITSCRIPT_PARAMS_udev = "start 03 S ."
+
+python __anonymous() {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
 # As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
 # that we don't build both udev and systemd in world builds.
 python () {
-- 
1.9.1



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

* Re: [PATCH] systemd: update version from 216 to 218
  2015-02-04 17:04       ` Bottazzini, Bruno
@ 2015-02-04 17:59         ` Enrico Scholz
  0 siblings, 0 replies; 73+ messages in thread
From: Enrico Scholz @ 2015-02-04 17:59 UTC (permalink / raw)
  To: Bottazzini, Bruno; +Cc: openembedded-core

"Bottazzini, Bruno" <bruno.bottazzini@intel.com> writes:

>> > +FILES_${PN}-services-ask-password = "\
>> > +        ${rootprefix}/bin/systemd-ask-password \
>> > +        ${rootprefix}/bin/systemd-tty-ask-password-agent \
>> > +
>> ...
>> I think, enumerating services in this kind becomes a maintenance
>> nightmare.  E.g. you have to check for every future systemd version
>> whether service gets listed in a new .wants.  Using wildcards can
>> simplify this; e.g. see systemd_elito_populate_packages() in
>> 
>>           https://www.cvg.de/people/ensc/systemd_216.bbappend
>
> On your example, wouldn't we have to enumerate the packages too ?

I do not have a catch-all package (like your '${PN}-services-essential');
the subpackages are announced by

| PACKAGES_DYNAMIC += "${@systemd_elito_populate_packages(d, True)}"

and I add manual RRECOMMENDS in the toplevel machine task recipe.


But it should be trivial to add dependencies within the
systemd_elito_populate_packages() function; e.g.

|  d.setVar("RRECOMMENDS_something", ' '.join(map(lambda x: '${PN}-' + x, pkg_info.keys())));


> Where did you get this file ?

It is used in our distribution and its roots are before 2012...  I never
had time to clean it up, especially because it is very controversial
(upstream systemd is against splitting units[1])



Enrico

Footnotes: 
[1] http://comments.gmane.org/gmane.linux.redhat.fedora.devel.announce/1450


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

* Re: [PATCH v2 2/2] systemd: split modules into packages
  2015-02-04 17:04   ` [PATCH v2 2/2] systemd: split modules into packages Bruno Bottazzini
@ 2015-02-06 18:45     ` Randy Witt
  2015-03-02 20:21       ` Bottazzini, Bruno
  0 siblings, 1 reply; 73+ messages in thread
From: Randy Witt @ 2015-02-06 18:45 UTC (permalink / raw)
  To: Bruno Bottazzini, openembedded-core

On 02/04/2015 09:04 AM, Bruno Bottazzini wrote:
> It wil be able to choose what systemd module to be installed.
> The final result may get smaller, if the user wanted to.
> By default it will install the whole systemd which may be big.
> ---
>   meta/recipes-core/systemd/systemd_218.bb | 1059 ++++++++++++++++++++++++++----
>   1 file changed, 914 insertions(+), 145 deletions(-)

This patch will push a lot of maintenance work onto the Yocto systemd maintainer 
every time there is an upgrade. It's also easy to miss dependencies because of 
the inter-dependencies that can exist between services.

For items such as systemd-cgls and the tools, a change like this would be 
maintainable since those items are self-contained. But yanking out the services 
into separate packages means the maintainer will have to inspect them on each 
upgrade to make sure they still work.

Would it be sufficient to use PACKAGECONFIG for each of the items that can be 
disabled via configure? That way the granularity configuration is done by the 
systemd maintainers rather than the Yocto maintainer.





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

* [PATCH] mkefidisk: change filesystem to be writeable on grub
@ 2015-02-26 19:29 ` Bruno Bottazzini
  2015-02-26 21:44   ` Randy Witt
  0 siblings, 1 reply; 73+ messages in thread
From: Bruno Bottazzini @ 2015-02-26 19:29 UTC (permalink / raw)
  To: openembedded-core

This patch changes grub configuration so the filesystem will be writeable
instead, just read only when running the script.
---
 scripts/contrib/mkefidisk.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
index b96b7d4..9b84831 100755
--- a/scripts/contrib/mkefidisk.sh
+++ b/scripts/contrib/mkefidisk.sh
@@ -342,7 +342,7 @@ if [ -e "$GRUB_CFG" ]; then
 	sed -i "s/ LABEL=[^ ]*/ /" $GRUB_CFG
 
 	sed -i "s@ root=[^ ]*@ @" $GRUB_CFG
-	sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS ro rootwait quiet @" $GRUB_CFG
+	sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS rw rootwait quiet @" $GRUB_CFG
 fi
 
 # Look for a gummiboot installation
-- 
1.9.1



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

* Re: [PATCH] mkefidisk: change filesystem to be writeable on grub
  2015-02-26 19:29 ` [PATCH] mkefidisk: change filesystem to be writeable on grub Bruno Bottazzini
@ 2015-02-26 21:44   ` Randy Witt
  2015-02-26 22:21     ` Bottazzini, Bruno
  0 siblings, 1 reply; 73+ messages in thread
From: Randy Witt @ 2015-02-26 21:44 UTC (permalink / raw)
  To: Bruno Bottazzini, openembedded-core; +Cc: Darren Hart

On 02/26/2015 11:29 AM, Bruno Bottazzini wrote:
> This patch changes grub configuration so the filesystem will be writeable
> instead, just read only when running the script.
> ---
>   scripts/contrib/mkefidisk.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
> index b96b7d4..9b84831 100755
> --- a/scripts/contrib/mkefidisk.sh
> +++ b/scripts/contrib/mkefidisk.sh
> @@ -342,7 +342,7 @@ if [ -e "$GRUB_CFG" ]; then
>   	sed -i "s/ LABEL=[^ ]*/ /" $GRUB_CFG
>
>   	sed -i "s@ root=[^ ]*@ @" $GRUB_CFG
> -	sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS ro rootwait quiet @" $GRUB_CFG
> +	sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS rw rootwait quiet @" $GRUB_CFG
>   fi
>
>   # Look for a gummiboot installation
>

This change basically reverts 
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=24cd3ddeb70a3d3f2985ec71c87ae0108f3d2777 
by Darren. It also doesn't change the ro option when using gummiboot instead.

What is this change trying to fix?


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

* Re: [PATCH] mkefidisk: change filesystem to be writeable on grub
  2015-02-26 21:44   ` Randy Witt
@ 2015-02-26 22:21     ` Bottazzini, Bruno
  2015-02-27  1:05       ` randy.e.witt
  0 siblings, 1 reply; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-02-26 22:21 UTC (permalink / raw)
  To: Randy Witt; +Cc: Darren Hart, openembedded-core


On Qui, 2015-02-26 at 13:44 -0800, Randy Witt wrote:
> On 02/26/2015 11:29 AM, Bruno Bottazzini wrote:
> > This patch changes grub configuration so the filesystem will be writeable
> > instead, just read only when running the script.
> > ---
> >   scripts/contrib/mkefidisk.sh | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
> > index b96b7d4..9b84831 100755
> > --- a/scripts/contrib/mkefidisk.sh
> > +++ b/scripts/contrib/mkefidisk.sh
> > @@ -342,7 +342,7 @@ if [ -e "$GRUB_CFG" ]; then
> >   	sed -i "s/ LABEL=[^ ]*/ /" $GRUB_CFG
> >
> >   	sed -i "s@ root=[^ ]*@ @" $GRUB_CFG
> > -	sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS ro rootwait quiet @" $GRUB_CFG
> > +	sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS rw rootwait quiet @" $GRUB_CFG
> >   fi
> >
> >   # Look for a gummiboot installation
> >
> 
> This change basically reverts 
> http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=24cd3ddeb70a3d3f2985ec71c87ae0108f3d2777 
> by Darren. It also doesn't change the ro option when using gummiboot instead.
> 
> What is this change trying to fix?

Hello Randy,

I got the following message:
 "file system is read-only" 

if I try to touch a file that is not on /tmp, or when I start a systemd
service that tries to write on the file system.

After some research, I go it fixed by changing to read/write on the
script that was with read only.

I thought this would be useful for someone else.

Reading the patch you sent me, Darren says that a proper fstab will ensure
the rootfs is rw. 
Maybe I'm missing this. I will look for this to make sure that my fstab OK.

Thanks






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

* Re: [PATCH] mkefidisk: change filesystem to be writeable on grub
  2015-02-26 22:21     ` Bottazzini, Bruno
@ 2015-02-27  1:05       ` randy.e.witt
  2015-03-03 10:26         ` Patrick Ohly
  0 siblings, 1 reply; 73+ messages in thread
From: randy.e.witt @ 2015-02-27  1:05 UTC (permalink / raw)
  To: Bottazzini, Bruno; +Cc: Darren Hart, openembedded-core

>
> On Qui, 2015-02-26 at 13:44 -0800, Randy Witt wrote:
>> On 02/26/2015 11:29 AM, Bruno Bottazzini wrote:
>> > This patch changes grub configuration so the filesystem will be
>> writeable
>> > instead, just read only when running the script.
>> > ---
>> >   scripts/contrib/mkefidisk.sh | 2 +-
>> >   1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/scripts/contrib/mkefidisk.sh
>> b/scripts/contrib/mkefidisk.sh
>> > index b96b7d4..9b84831 100755
>> > --- a/scripts/contrib/mkefidisk.sh
>> > +++ b/scripts/contrib/mkefidisk.sh
>> > @@ -342,7 +342,7 @@ if [ -e "$GRUB_CFG" ]; then
>> >   	sed -i "s/ LABEL=[^ ]*/ /" $GRUB_CFG
>> >
>> >   	sed -i "s@ root=[^ ]*@ @" $GRUB_CFG
>> > -	sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS ro rootwait quiet @"
>> $GRUB_CFG
>> > +	sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS rw rootwait quiet @"
>> $GRUB_CFG
>> >   fi
>> >
>> >   # Look for a gummiboot installation
>> >
>>
>> This change basically reverts
>> http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=24cd3ddeb70a3d3f2985ec71c87ae0108f3d2777
>> by Darren. It also doesn't change the ro option when using gummiboot
>> instead.
>>
>> What is this change trying to fix?
>
> Hello Randy,
>
> I got the following message:
>  "file system is read-only"
>
> if I try to touch a file that is not on /tmp, or when I start a systemd
> service that tries to write on the file system.
>
> After some research, I go it fixed by changing to read/write on the
> script that was with read only.
>
> I thought this would be useful for someone else.

Thank you for taking the time to do this. If things still don't work after
checking /etc/fstab, let us know.

> Reading the patch you sent me, Darren says that a proper fstab will ensure
> the rootfs is rw.
> Maybe I'm missing this. I will look for this to make sure that my fstab
> OK.
>
> Thanks
>
>
>
>
>



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

* Re: [PATCH v2 2/2] systemd: split modules into packages
  2015-02-06 18:45     ` Randy Witt
@ 2015-03-02 20:21       ` Bottazzini, Bruno
  2015-03-04  9:22         ` Anders Darander
  0 siblings, 1 reply; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-03-02 20:21 UTC (permalink / raw)
  To: Randy Witt; +Cc: openembedded-core

Hello Randy,

On Sex, 2015-02-06 at 10:45 -0800, Randy Witt wrote:
> On 02/04/2015 09:04 AM, Bruno Bottazzini wrote:
> > It wil be able to choose what systemd module to be installed.
> > The final result may get smaller, if the user wanted to.
> > By default it will install the whole systemd which may be big.
> > ---
> >   meta/recipes-core/systemd/systemd_218.bb | 1059 ++++++++++++++++++++++++++----
> >   1 file changed, 914 insertions(+), 145 deletions(-)
> 
> This patch will push a lot of maintenance work onto the Yocto systemd maintainer 
> every time there is an upgrade. It's also easy to miss dependencies because of 
> the inter-dependencies that can exist between services.

This is not a problem, we can give this maintenance.

> 
> For items such as systemd-cgls and the tools, a change like this would be 
> maintainable since those items are self-contained. But yanking out the services 
> into separate packages means the maintainer will have to inspect them on each 
> upgrade to make sure they still work.
> 
> Would it be sufficient to use PACKAGECONFIG for each of the items that can be 
> disabled via configure? That way the granularity configuration is done by the 
> systemd maintainers rather than the Yocto maintainer.

With PACKAGECONFIG, we may not get everything "for free" as some data files 
will be installed regardless as well as some components from systemd cannot 
be disabled by their build system but we can run without them, for instance 
we can run without journald.

The problem is understanding that although systemd is a single repository 
it contains multiple services and daemons in it that can run even without the 
core PID1, udev or the many helpers used to configure the system such as resolved, 
timedated, localed... 

All of these components are runtime independent, we can install or remove them and 
they should not create problems.

Even Ubuntu is shipping with some of these daemons even if systemd is not used (yet).
If they were different GIT repos then it would be clear that they are separate daemons, 
but as they are all in a single repository people can make a confusion about it.

I see that in the master branch it has already the version 219.

I will make a split packages for the newest version that was just released.

Best Regards,

Bruno Bottazzini

> 
> 
> 





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

* Re: [PATCH] mkefidisk: change filesystem to be writeable on grub
  2015-02-27  1:05       ` randy.e.witt
@ 2015-03-03 10:26         ` Patrick Ohly
  0 siblings, 0 replies; 73+ messages in thread
From: Patrick Ohly @ 2015-03-03 10:26 UTC (permalink / raw)
  To: randy.e.witt; +Cc: Darren Hart, openembedded-core

On Thu, 2015-02-26 at 17:05 -0800, randy.e.witt@linux.intel.com wrote:
> >
> > On Qui, 2015-02-26 at 13:44 -0800, Randy Witt wrote:
> >> On 02/26/2015 11:29 AM, Bruno Bottazzini wrote:
> >> > This patch changes grub configuration so the filesystem will be
> >> writeable
> >> > instead, just read only when running the script.
> >> > ---
> >> >   scripts/contrib/mkefidisk.sh | 2 +-
> >> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >> >
> >> > diff --git a/scripts/contrib/mkefidisk.sh
> >> b/scripts/contrib/mkefidisk.sh
> >> > index b96b7d4..9b84831 100755
> >> > --- a/scripts/contrib/mkefidisk.sh
> >> > +++ b/scripts/contrib/mkefidisk.sh
> >> > @@ -342,7 +342,7 @@ if [ -e "$GRUB_CFG" ]; then
> >> >   	sed -i "s/ LABEL=[^ ]*/ /" $GRUB_CFG
> >> >
> >> >   	sed -i "s@ root=[^ ]*@ @" $GRUB_CFG
> >> > -	sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS ro rootwait quiet @"
> >> $GRUB_CFG
> >> > +	sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS rw rootwait quiet @"
> >> $GRUB_CFG
> >> >   fi
> >> >
> >> >   # Look for a gummiboot installation
> >> >
> >>
> >> This change basically reverts
> >> http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=24cd3ddeb70a3d3f2985ec71c87ae0108f3d2777
> >> by Darren. It also doesn't change the ro option when using gummiboot
> >> instead.
> >>
> >> What is this change trying to fix?
> >
> > Hello Randy,
> >
> > I got the following message:
> >  "file system is read-only"
> >
> > if I try to touch a file that is not on /tmp, or when I start a systemd
> > service that tries to write on the file system.
> >
> > After some research, I go it fixed by changing to read/write on the
> > script that was with read only.
> >
> > I thought this would be useful for someone else.
> 
> Thank you for taking the time to do this. If things still don't work after
> checking /etc/fstab, let us know.

I ran into the same issue, albeit not with a genuine Poky image, so I
didn't report it here. In my experience, even with a proper fstab
("defaults" for the rootfs or even "rw"), systemd-remount-fs never
remounted / as rw. When googling, I found references to the kernel boot
parameter, but as far as I remember, they said that this parameter had
been already obsoleted. It indeed did not seem to help to change it into
"rw" (but I'm no longer absolutely sure whether I tried that).

Sorry for being so vague :-/ Just wanted to confirm that there is indeed
something fishy and that running further experiments is needed.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





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

* Re: [PATCH v2 2/2] systemd: split modules into packages
  2015-03-02 20:21       ` Bottazzini, Bruno
@ 2015-03-04  9:22         ` Anders Darander
  0 siblings, 0 replies; 73+ messages in thread
From: Anders Darander @ 2015-03-04  9:22 UTC (permalink / raw)
  To: openembedded-core

* Bottazzini, Bruno <bruno.bottazzini@intel.com> [150302 21:22]:

> The problem is understanding that although systemd is a single repository 
> it contains multiple services and daemons in it that can run even without the 
> core PID1, udev or the many helpers used to configure the system such as resolved, 
> timedated, localed... 

> All of these components are runtime independent, we can install or remove them and 
> they should not create problems.

> Even Ubuntu is shipping with some of these daemons even if systemd is not used (yet).
> If they were different GIT repos then it would be clear that they are separate daemons, 
> but as they are all in a single repository people can make a confusion about it.

> I see that in the master branch it has already the version 219.

I look forward to your updated patch.

This is something I've been thinking about doing for a while, and it
feels more and more necessary, as the systemd repo grows with more
tools.

Cheers,
Anders

-- 
Anders Darander
ChargeStorm AB / eStorm AB


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

* [PATCH 0/3] systemd and dbus split into packages
@ 2015-03-04 21:27 ` Bruno Bottazzini
  2015-03-04 21:27   ` [PATCH 1/3] dbus: split tools package Bruno Bottazzini
                     ` (2 more replies)
  0 siblings, 3 replies; 73+ messages in thread
From: Bruno Bottazzini @ 2015-03-04 21:27 UTC (permalink / raw)
  To: openembedded-core

In this patchset we include the following:

1- dbus: split tools package
   Most tools are not required if one is launching a simple daemon.
   So, we split it into two packages dbus and dbus-tools which the user
   will be to exclude it from the image if he wants to.

2- systemd: verify if files test-udev and systemd-journal-flush exists
   If the user put --disable-tests on EXTRA_OECONF for systemd, some files will
   not be created and systemd do_install phase
   will fail.
   This patch will give this flexibility for the user

3- systemd: split modules into packages
   Since systemd repo grows with more and more tools, the recipe will provide
   a customizable layer and he will be able to choose what he wants to ship
   to the final image.
   He will be able to save space and exclude unwanted packages from the
   final image.

Bruno Bottazzini (2):
  systemd: verify if files test-udev and systemd-journal-flush exists
  systemd: split modules into packages

Gustavo Sverzut Barbieri (1):
  dbus: split tools package.

 meta/recipes-core/dbus/dbus.inc          |   10 +-
 meta/recipes-core/systemd/systemd_219.bb | 1079 ++++++++++++++++++++++++++----
 2 files changed, 956 insertions(+), 133 deletions(-)

--
1.9.1



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

* [PATCH 1/3] dbus: split tools package.
  2015-03-04 21:27 ` [PATCH 0/3] systemd and dbus split into packages Bruno Bottazzini
@ 2015-03-04 21:27   ` Bruno Bottazzini
  2015-03-05 11:01     ` Andreas Oberritter
  2015-03-04 21:27   ` [PATCH 2/3] systemd: verify if files test-udev and systemd-journal-flush exists Bruno Bottazzini
  2015-03-04 21:27   ` [PATCH 3/3] systemd: split modules into packages Bruno Bottazzini
  2 siblings, 1 reply; 73+ messages in thread
From: Bruno Bottazzini @ 2015-03-04 21:27 UTC (permalink / raw)
  To: openembedded-core

From: Gustavo Sverzut Barbieri <gustavo.barbieri@intel.com>

Most tools are not required if one is launching a simple daemon.
The user will be able to exclude dbus-tool and save some space in his
build

Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com>
---
 meta/recipes-core/dbus/dbus.inc | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index fb5d017..f975dc9 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -39,13 +39,13 @@ CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
 
 DEBIANNAME_${PN} = "dbus-1"
 
-PACKAGES =+ "${PN}-lib"
+PACKAGES =+ "${PN}-lib ${PN}-tools"
 
 OLDPKGNAME = "dbus-x11"
 OLDPKGNAME_class-nativesdk = ""
 
 # for compatibility
-RPROVIDES_${PN} = "${OLDPKGNAME}"
+RPROVIDES_${PN} = "${OLDPKGNAME} ${PN}-native-tools-native"
 RREPLACES_${PN} += "${OLDPKGNAME}"
 
 FILES_${PN} = "${bindir}/dbus-daemon* \
@@ -64,6 +64,12 @@ FILES_${PN} = "${bindir}/dbus-daemon* \
 FILES_${PN}-lib = "${libdir}/lib*.so.*"
 RRECOMMENDS_${PN}-lib = "${PN}"
 FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
+FILES_${PN}-tools += "${bindir}/dbus-uuidgen \
+                      ${bindir}/dbus-cleanup-sockets \
+                      ${bindir}/dbus-monitor \
+                      ${bindir}/dbus-launch \
+                      ${bindir}/dbus-run-session"
+RRECOMMENDS_${PN} = "${PN}-tools"
 
 pkg_postinst_dbus() {
 	# If both systemd and sysvinit are enabled, mask the dbus-1 init script
-- 
1.9.1



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

* [PATCH 2/3] systemd: verify if files test-udev and systemd-journal-flush exists
  2015-03-04 21:27 ` [PATCH 0/3] systemd and dbus split into packages Bruno Bottazzini
  2015-03-04 21:27   ` [PATCH 1/3] dbus: split tools package Bruno Bottazzini
@ 2015-03-04 21:27   ` Bruno Bottazzini
  2015-03-04 21:27   ` [PATCH 3/3] systemd: split modules into packages Bruno Bottazzini
  2 siblings, 0 replies; 73+ messages in thread
From: Bruno Bottazzini @ 2015-03-04 21:27 UTC (permalink / raw)
  To: openembedded-core

If we compile using EXTRA_OECONF with '--disable-tests' option, the files
test-udev and systemd-journal-flush will not be created and the systemd
install phase will fail.
---
 meta/recipes-core/systemd/systemd_219.bb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_219.bb b/meta/recipes-core/systemd/systemd_219.bb
index 24486f1..6a8b5b8 100644
--- a/meta/recipes-core/systemd/systemd_219.bb
+++ b/meta/recipes-core/systemd/systemd_219.bb
@@ -166,7 +166,9 @@ do_install() {
 	sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
 	# its needed in 216 upstream has fixed it with 919699ec301ea507edce4a619141ed22e789ac0d
 	# don't order journal flushing afte remote-fs.target
-	sed -i -e 's/ remote-fs.target$//' ${D}${systemd_unitdir}/system/systemd-journal-flush.service
+       if [ -s ${D}${systemd_unitdir}/system/systemd-journal-flush.service ]; then
+            sed -i -e 's/ remote-fs.target$//' ${D}${systemd_unitdir}/system/systemd-journal-flush.service
+       fi
 	# this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
 	# for existence else it fails
 	if [ -s ${D}${libdir}/tmpfiles.d/systemd.conf ]; then
@@ -177,7 +179,9 @@ do_install() {
 do_install_ptest () {
        install -d ${D}${PTEST_PATH}/test
        cp -rf ${S}/test/* ${D}${PTEST_PATH}/test
-       install -m 0755  ${B}/test-udev ${D}${PTEST_PATH}/
+       if [ -s ${B}/test-udev ]; then
+         install -m 0755  ${B}/test-udev ${D}${PTEST_PATH}/
+       fi
        install -d ${D}${PTEST_PATH}/build-aux
        cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
        cp -rf ${B}/rules ${D}${PTEST_PATH}/
-- 
1.9.1



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

* [PATCH 3/3] systemd: split modules into packages
  2015-03-04 21:27 ` [PATCH 0/3] systemd and dbus split into packages Bruno Bottazzini
  2015-03-04 21:27   ` [PATCH 1/3] dbus: split tools package Bruno Bottazzini
  2015-03-04 21:27   ` [PATCH 2/3] systemd: verify if files test-udev and systemd-journal-flush exists Bruno Bottazzini
@ 2015-03-04 21:27   ` Bruno Bottazzini
  2015-03-05 14:28     ` Anders Darander
  2 siblings, 1 reply; 73+ messages in thread
From: Bruno Bottazzini @ 2015-03-04 21:27 UTC (permalink / raw)
  To: openembedded-core

if one wants to launch a simple deamon, most modules are not
required.
He will be able to save space and exclude unwanted packages
from the final image.
---
 meta/recipes-core/systemd/systemd_219.bb | 1071 ++++++++++++++++++++++++++----
 1 file changed, 942 insertions(+), 129 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_219.bb b/meta/recipes-core/systemd/systemd_219.bb
index 6a8b5b8..fd6cf57 100644
--- a/meta/recipes-core/systemd/systemd_219.bb
+++ b/meta/recipes-core/systemd/systemd_219.bb
@@ -56,10 +56,31 @@ LDFLAGS_append_libc-uclibc = " -lrt"
 
 GTKDOC_DOCDIR = "${S}/docs/"
 
-PACKAGECONFIG ??= "xz \
+DEPENDS += "curl"
+
+PACKAGECONFIG ??= "acl \
+                   blkid \
+                   efi \
+                   kmod \
+                   gcrypt \
+                   lz4 \
+                   xz \
+                   libidn \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}"
 
+PACKAGECONFIG[glib] = "--enable-gudev,--disable-gudev,glib-2.0"
+PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
+PACKAGECONFIG[blkid] = "--enable-blkid,--disable-blkid,util-linux"
+PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
+PACKAGECONFIG[kmod] = "--enable-kmod,--disable-kmod,kmod"
+PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,,polkit"
+PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
+PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
+PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
+PACKAGECONFIG[apparmor] = "--enable-apparmor,--disable-apparmor,libapparmor"
+PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
+PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
 PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
 # Sign the journal for anti-tampering
 PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
@@ -67,7 +88,10 @@ PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
 # the AM_PATH_LIBGCRYPT autoconf macro
 DEPENDS += "libgcrypt"
 # Compress the journal
+PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
 PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
+PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,libqrencode"
+PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
 PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
 PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd"
 PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
@@ -90,16 +114,35 @@ rootprefix ?= "${base_prefix}"
 rootlibdir ?= "${base_libdir}"
 rootlibexecdir = "${rootprefix}/lib"
 
-# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
 EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
                  --with-rootlibdir=${rootlibdir} \
                  --with-roothomedir=${ROOT_HOME} \
-                 --disable-coredump \
+                 --with-sysvrcnd-path=${sysconfdir} \
+                 --without-python \
+                 --disable-introspection \
+                 --disable-kdbus \
+                 --disable-manpages \
                  --disable-introspection \
                  --disable-kdbus \
                  --enable-split-usr \
-                 --without-python \
-                 --with-sysvrcnd-path=${sysconfdir} \
+                 --enable-libcurl \
+                 --enable-coredump \
+                 --enable-ldconfig \
+                 --enable-backlight \
+                 --enable-binfmt \
+                 --enable-bootchart \
+                 --enable-firstboot \
+                 --enable-hostnamed \
+                 --enable-localed \
+                 --enable-logind \
+                 --enable-machined \
+                 --enable-networkd \
+                 --enable-quotacheck \
+                 --enable-randomseed \
+                 --enable-resolved \
+                 --enable-rfkill \
+                 --enable-sysusers \
+                 --enable-vconsole \
                "
 # uclibc does not have NSS
 EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
@@ -196,158 +239,745 @@ do_install_ptest () {
 
 python populate_packages_prepend (){
     systemdlibdir = d.getVar("rootlibdir", True)
-    do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
+    do_split_packages(d, systemdlibdir, '^lib(udev|gudev|systemd|nss)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
 }
-PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
+PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd|nss).*"
+
+########################################################################
+# Base Packages
+########################################################################
+
+PACKAGES =+ "${PN}-generators-filesystems"
+SUMMARY_${PN}-generators-filesystems = "systemd's generator for filesystem services based on fstab and GPT"
+RDEPENDS_${PN}-generators-filesystems = "${PN}-services-fsck"
+FILES_${PN}-generators-filesystems = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-fstab-generator \
+        ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
+        ${rootlibexecdir}/systemd/systemd-remount-fs \
+        ${systemd_unitdir}/system/local-fs.target.wants/systemd-remount-fs.service \
+        ${systemd_unitdir}/system/systemd-remount-fs.service \
+"
 
-PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \
-             ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh libgudev"
+PACKAGES =+ "${PN}-generators-getty"
+SUMMARY_${PN}-generators-getty = "systemd's generator TTY services"
+RDEPENDS_${PN}-generators-getty = "${PN}-services-getty"
+FILES_${PN}-generators-getty = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-getty-generator \
+"
 
-SYSTEMD_PACKAGES = "${PN}-binfmt"
-SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
+PACKAGES =+ "${PN}-tools"
+SUMMARY_${PN}-tools = "systemd command line tools (cgls, delta, run, analyze...)"
+RRECOMMENDS_${PN}-tools = "${PN}-services-base"
+FILES_${PN}-tools = "\
+        ${base_bindir}/systemd-machine-id-setup \
+        ${bindir}/busctl \
+        ${bindir}/coredumpctl \
+        ${bindir}/systemd-analyze \
+        ${bindir}/systemd-cat \
+        ${bindir}/systemd-cgls \
+        ${bindir}/systemd-cgtop \
+        ${bindir}/systemd-delta \
+        ${bindir}/systemd-detect-virt \
+        ${bindir}/systemd-path \
+        ${bindir}/systemd-run \
+        ${rootlibexecdir}/systemd/systemd-ac-power \
+        ${rootlibexecdir}/systemd/systemd-activate \
+        ${rootlibexecdir}/systemd/systemd-reply-password \
+        ${rootprefix}/bin/systemd-escape \
+        ${rootprefix}/bin/systemd-notify \
+"
 
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} += "--system systemd-journal-gateway; --system systemd-timesync"
-GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
+########################################################################
+# Services Packages
+########################################################################
+
+PACKAGES =+ "${PN}-services-ask-password"
+SUMMARY_${PN}-services-ask-password = "systemd's service and tool to query the user for a system password"
+RRECOMMENDS_${PN}-services-ask-password = "${PN}-services-base"
+FILES_${PN}-services-ask-password = "\
+        ${rootprefix}/bin/systemd-ask-password \
+        ${rootprefix}/bin/systemd-tty-ask-password-agent \
+        ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
+        ${systemd_unitdir}/system/systemd-ask-password-console.path \
+        ${systemd_unitdir}/system/systemd-ask-password-console.service \
+        ${systemd_unitdir}/system/systemd-ask-password-wall.path \
+        ${systemd_unitdir}/system/systemd-ask-password-wall.service \
+"
 
-FILES_${PN}-analyze = "${bindir}/systemd-analyze"
+PACKAGES =+ "${PN}-services-backlight"
+SUMMARY_${PN}-services-backlight = "systemd's backlight state save/restore service"
+FILES_${PN}-services-backlight = "\
+        ${systemd_unitdir}/system/systemd-backlight@.service \
+        ${rootlibexecdir}/systemd/systemd-backlight \
+"
 
-FILES_${PN}-initramfs = "/init"
-RDEPENDS_${PN}-initramfs = "${PN}"
+PACKAGES =+ "${PN}-services-binfmt"
+SUMMARY_${PN}-services-binfmt = "systemd's service to configure additional binary formats for executables"
+RRECOMMENDS_${PN}-services-binfmt = "kernel-module-binfmt-misc"
+FILES_${PN}-services-binfmt = "\
+        ${sysconfdir}/binfmt.d/ \
+        ${exec_prefix}/lib/binfmt.d/ \
+        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.automount \
+        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.mount \
+        ${systemd_unitdir}/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount \
+        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-binfmt.service \
+        ${systemd_unitdir}/system/systemd-binfmt.service \
+        ${rootlibexecdir}/systemd/systemd-binfmt \
+"
 
-FILES_libgudev = "${libdir}/libgudev*${SOLIBS}"
+PACKAGES =+ "${PN}-services-bootchart"
+SUMMARY_${PN}-services-bootchart = "systemd's boot performance service and graphing tool"
+CONFFILES_${PN}-services-bootchart = "${sysconfdir}/systemd/bootchart.conf"
+FILES_${PN}-services-bootchart = "\
+        ${sysconfdir}/systemd/bootchart.conf \
+        ${rootlibexecdir}/systemd/systemd-bootchart \
+"
 
-RDEPENDS_${PN}-ptest += "perl python bash"
-FILES_${PN}-ptest += "${libdir}/udev/rules.d"
+PACKAGES =+ "${PN}-services-coredump"
+SUMMARY_${PN}-services-coredump = "systemd's coredump log hook and service"
+RDEPENDS_${PN}-services-coredump = "${PN}-services-sysctl"
+CONFFILES_${PN}-services-coredump = "${sysconfdir}/systemd/coredump.conf"
+FILES_${PN}-services-coredump = "\
+        ${exec_prefix}/lib/sysctl.d/50-coredump.conf \
+        ${sysconfdir}/systemd/coredump.conf \
+        ${rootlibexecdir}/systemd/systemd-coredump \
+"
+
+PACKAGES =+ "${PN}-services-cryptsetup"
+SUMMARY_${PN}-services-cryptsetup = "systemd's disk decryption service"
+ALLOW_EMPTY_${PN}-services-cryptsetup = "1"
+FILES_${PN}-services-cryptsetup = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-cryptsetup-generator \
+        ${systemd_unitdir}/system/cryptsetup-pre.target \
+        ${systemd_unitdir}/system/cryptsetup.target \
+        ${systemd_unitdir}/system/sysinit.target.wants/cryptsetup.target \
+        ${rootlibexecdir}/systemd/systemd-cryptsetup \
+"
+
+PACKAGES =+ "${PN}-services-dbus"
+SUMMARY_${PN}-services-dbus = "systemd's DBus daemon system service"
+# NOTE: dbus dependency will go away when kdbus is in use
+RDEPENDS_${PN}-services-dbus = "dbus"
+FILES_${PN}-services-dbus = "\
+        ${datadir}/dbus-1/services/org.freedesktop.systemd1.service \
+        ${datadir}/dbus-1/system-services/org.freedesktop.systemd1.service \
+        ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
+        ${systemd_unitdir}/system/sockets.target.wants/dbus.socket \
+        ${systemd_unitdir}/system/dbus.target.wants/dbus.socket \
+        ${systemd_unitdir}/system/multi-user.target.wants/dbus.service \
+        ${systemd_unitdir}/system/dbus.socket \
+        ${systemd_unitdir}/system/dbus.service \
+"
+
+PACKAGES =+ "${PN}-services-debug"
+SUMMARY_${PN}-services-debug = "systemd's debug service"
+RRECOMMENDS_${PN}-services-debug = "${PN}-services-base ${PN}-tools"
+FILES_${PN}-services-debug = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-debug-generator \
+        ${systemd_unitdir}/system/debug-shell.service \
+        ${systemd_unitdir}/system/sys-kernel-config.mount \
+        ${systemd_unitdir}/system/sys-kernel-debug.mount \
+        ${systemd_unitdir}/system/sysinit.target.wants/sys-kernel-config.mount \
+        ${systemd_unitdir}/system/sysinit.target.wants/sys-kernel-debug.mount \
+"
+
+PACKAGES =+ "${PN}-services-firstboot"
+SUMMARY_${PN}-services-firstboot = "systemd's service to initialize basic system settings"
+FILES_${PN}-services-firstboot = "\
+        ${base_bindir}/systemd-firstboot \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-firstboot.service \
+        ${systemd_unitdir}/system/systemd-firstboot.service \
+"
+
+PACKAGES =+ "${PN}-services-fsck"
+SUMMARY_${PN}-services-fsck = "systemd's filesystem check service"
+RRECOMMENDS_${PN}-services-fsck = "util-linux-fsck e2fsprogs-e2fsck"
+FILES_${PN}-services-fsck = "\
+        ${systemd_unitdir}/system/systemd-fsck-root.service \
+        ${systemd_unitdir}/system/systemd-fsck@.service \
+        ${rootlibexecdir}/systemd/systemd-fsck \
+"
+
+PACKAGES =+ "${PN}-services-fuse"
+SUMMARY_${PN}-services-fuse = "systemd's FUSE (filesystem in userspace) service"
+FILES_${PN}-services-fuse = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/sys-fs-fuse-connections.mount \
+        ${systemd_unitdir}/system/sys-fs-fuse-connections.mount \
+"
+
+PACKAGES =+ "${PN}-services-getty"
+SUMMARY_${PN}-services-getty = "systemd's getty service"
+RRECOMMENDS_${PN}-services-getty = "util-linux-agetty ${PN}-generators-getty"
+FILES_${PN}-services-getty = "\
+        ${systemd_unitdir}/system/autovt@.service \
+        ${systemd_unitdir}/system/console-getty.service \
+        ${systemd_unitdir}/system/container-getty@.service \
+        ${systemd_unitdir}/system/getty@.service \
+        ${systemd_unitdir}/system/serial-getty@.service \
+        ${sysconfdir}/systemd/system/getty.target.wants/ \
+"
+
+PACKAGES =+ "${PN}-services-hostnamed"
+SUMMARY_${PN}-services-hostnamed = "systemd's hostname management service"
+RDEPENDS_${PN}-services-hostnamed = "${PN}-services-dbus"
+CONFFILES_${PN}-services-hostnamed = "${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf"
+FILES_${PN}-services-hostnamed = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
+        ${bindir}/hostnamectl \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.hostname1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.hostname1.service \
+        ${systemd_unitdir}/system/org.freedesktop.hostname1.busname \
+        ${systemd_unitdir}/system/systemd-hostnamed.service \
+        ${rootlibexecdir}/systemd/systemd-hostnamed \
+        ${datadir}/dbus-1/system-services/org.freedesktop.hostname1.service \
+        ${datadir}/polkit-1/actions/org.freedesktop.hostname1.policy \
+"
+
+PACKAGES =+ "${PN}-services-journal"
+SUMMARY_${PN}-services-journal = "systemd's journal (logging) service"
+CONFFILES_${PN}-services-journal = "${sysconfdir}/systemd/journald.conf"
+FILES_${PN}-services-journal = "\
+        ${base_bindir}/journalctl \
+        ${rootlibexecdir}/systemd/systemd-journald \
+        ${sysconfdir}/systemd/journald.conf \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-journald-dev-log.socket \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-journald.socket \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journal-catalog-update.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journal-flush.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journald.service \
+        ${systemd_unitdir}/system/systemd-journal-catalog-update.service \
+        ${systemd_unitdir}/system/systemd-journal-flush.service \
+        ${systemd_unitdir}/system/systemd-journald-dev-log.socket \
+        ${systemd_unitdir}/system/systemd-journald.service \
+        ${systemd_unitdir}/system/systemd-journald.socket \
+        ${exec_prefix}/lib/systemd/catalog/ \
+"
+
+PACKAGES =+ "${PN}-services-ldconfig"
+SUMMARY_${PN}-services-ldconfig = "systemd's service to run ldconfig after updates"
+FILES_${PN}-services-ldconfig = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/ldconfig.service \
+        ${systemd_unitdir}/system/ldconfig.service \
+"
+
+PACKAGES =+ "${PN}-services-localed"
+SUMMARY_${PN}-services-localed = "systemd's locale management service"
+RDEPENDS_${PN}-services-localed = "${PN}-services-dbus"
+CONFFILES_${PN}-services-localed = "${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf"
+FILES_${PN}-services-localed = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf \
+        ${bindir}/localectl \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.locale1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.locale1.service \
+        ${systemd_unitdir}/system/org.freedesktop.locale1.busname \
+        ${systemd_unitdir}/system/systemd-localed.service \
+        ${rootlibexecdir}/systemd/systemd-localed \
+        ${datadir}/dbus-1/system-services/org.freedesktop.locale1.service \
+        ${datadir}/polkit-1/actions/org.freedesktop.locale1.policy \
+        ${datadir}/systemd/kbd-model-map \
+"
+
+PACKAGES =+ "${PN}-services-logind"
+SUMMARY_${PN}-services-logind = "systemd's login management service"
+RDEPENDS_${PN}-services-logind = "${PN}-services-dbus ${PN}-services-tmpfiles"
+RRECOMMENDS_${PN}-services-logind = "udev"
+CONFFILES_${PN}-services-logind = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf \
+        ${sysconfdir}/systemd/logind.conf \
+"
+FILES_${PN}-services-logind = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf \
+        ${sysconfdir}/systemd/logind.conf \
+        ${base_bindir}/loginctl \
+        ${base_bindir}/systemd-inhibit \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.login1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.login1.service \
+        ${systemd_unitdir}/system/multi-user.target.wants/systemd-logind.service \
+        ${systemd_unitdir}/system/multi-user.target.wants/systemd-user-sessions.service \
+        ${systemd_unitdir}/system/org.freedesktop.login1.busname \
+        ${systemd_unitdir}/system/systemd-logind.service \
+        ${systemd_unitdir}/system/systemd-user-sessions.service \
+        ${systemd_unitdir}/system/user@.service \
+        ${rootlibexecdir}/systemd/systemd-logind \
+        ${rootlibexecdir}/systemd/systemd-user-sessions \
+        ${datadir}/dbus-1/system-services/org.freedesktop.login1.service \
+        ${datadir}/polkit-1/actions/org.freedesktop.login1.policy \
+        ${rootlibexecdir}/udev/rules.d/70-uaccess.rules \
+        ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
+        ${rootlibexecdir}/udev/rules.d/71-seat.rules \
+        ${rootlibexecdir}/udev/rules.d/73-seat-late.rules \
+"
+
+PACKAGES =+ "${PN}-services-machined"
+SUMMARY_${PN}-services-machined = "systemd's virtual machine and container management service"
+RDEPENDS_${PN}-services-machined = "${PN}-services-dbus"
+CONFFILES_${PN}-services-machined = "${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf"
+FILES_${PN}-services-machined = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
+        ${base_bindir}/machinectl \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.machine1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.machine1.service \
+        ${systemd_unitdir}/system/machine.slice \
+        ${systemd_unitdir}/system/org.freedesktop.machine1.busname \
+        ${systemd_unitdir}/system/systemd-machined.service \
+        ${rootlibexecdir}/systemd/systemd-machined \
+        ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
+"
+
+PACKAGES =+ "${PN}-services-modules-load"
+SUMMARY_${PN}-services-modules-load = "systemd's kernel module loading service"
+FILES_${PN}-services-modules-load = "\
+        ${sysconfdir}/modules-load.d/ \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-modules-load.service \
+        ${systemd_unitdir}/system/systemd-modules-load.service \
+        ${rootlibexecdir}/systemd/systemd-modules-load \
+        ${exec_prefix}/lib/modules-load.d \
+"
+
+PACKAGES =+ "${PN}-services-modules-static-nodes"
+SUMMARY_${PN}-services-modules-static-nodes = "systemd's kernel module static nodes creation service"
+RDEPENDS_${PN}-services-modules-static-nodes = "kmod ${PN}-services-tmpfiles"
+FILES_${PN}-services-modules-static-nodes = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/kmod-static-nodes.service \
+        ${systemd_unitdir}/system/kmod-static-nodes.service \
+"
+
+
+PACKAGES =+ "${PN}-services-multi-seat-x"
+SUMMARY_${PN}-services-multi-seat-x = "systemd's X11 multi-seat support service"
+RDEPENDS_${PN}-services-multi-seat-x = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/xserver', '', d)}"
+FILES_${PN}-services-multi-seat-x = "\
+        ${rootlibexecdir}/systemd/systemd-multi-seat-x \
+"
+
+PACKAGES =+ "${PN}-services-networkd"
+SUMMARY_${PN}-services-networkd = "systemd's network management (static, DHCP, bridge...) service"
+# NOTE: if no sysusers, then users/groups must be setup
+RRECOMMENDS_${PN}-services-networkd = "${PN}-services-sysusers"
+FILES_${PN}-services-networkd = "\
+        ${sysconfdir}/systemd/network/ \
+        ${sysconfdir}/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service \
+        ${sysconfdir}/systemd/system/multi-user.target.wants/systemd-networkd.service \
+        ${base_bindir}/networkctl \
+        ${rootlibexecdir}/systemd/network/80-container-host0.network \
+        ${rootlibexecdir}/systemd/network/80-container-ve.network \
+        ${rootlibexecdir}/systemd/network/99-default.link \
+        ${systemd_unitdir}/system/systemd-networkd-wait-online.service \
+        ${systemd_unitdir}/system/systemd-networkd.service \
+        ${rootlibexecdir}/systemd/systemd-networkd \
+        ${rootlibexecdir}/systemd/systemd-networkd-wait-online \
+        ${exec_prefix}/lib/systemd/network \
+"
+
+PACKAGES =+ "${PN}-services-nspawn"
+SUMMARY_${PN}-services-nspawn = "systemd's namespace spawing service and tool"
+FILES_${PN}-services-nspawn = "\
+        ${systemd_unitdir}/system/systemd-nspawn@.service \
+        ${bindir}/systemd-nspawn \
+"
+
+PACKAGES =+ "${PN}-services-quota"
+SUMMARY_${PN}-services-quota = "systemd's file system quota enable and check service"
+RDEPENDS_${PN}-services-quota = "quota"
+FILES_${PN}-services-quota = "\
+        ${systemd_unitdir}/system/quotaon.service \
+        ${systemd_unitdir}/system/systemd-quotacheck.service \
+        ${rootlibexecdir}/systemd/systemd-quotacheck \
+"
+
+PACKAGES =+ "${PN}-services-randomseed"
+SUMMARY_${PN}-services-randomseed = "systemd's random seed save/restore service"
+FILES_${PN}-services-randomseed = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-random-seed.service \
+        ${systemd_unitdir}/system/systemd-random-seed.service \
+        ${rootlibexecdir}/systemd/systemd-random-seed \
+"
+
+PACKAGES =+ "${PN}-services-readahead"
+SUMMARY_${PN}-services-readahead = "systemd's disk read ahead service"
+FILES_${PN}-services-readahead = "\
+        ${systemd_unitdir}/system/systemd-readahead-collect.service \
+        ${systemd_unitdir}/system/systemd-readahead-done.service \
+        ${systemd_unitdir}/system/systemd-readahead-done.timer \
+        ${systemd_unitdir}/system/systemd-readahead-drop.service \
+        ${systemd_unitdir}/system/systemd-readahead-replay.service \
+        ${rootlibexecdir}/systemd/systemd-readahead \
+"
+
+PACKAGES =+ "${PN}-services-rfkill"
+SUMMARY_${PN}-services-rfkill = "systemd's rfkill state save/restore service"
+FILES_${PN}-services-rfkill = "\
+        ${systemd_unitdir}/system/systemd-rfkill@.service \
+        ${rootlibexecdir}/systemd/systemd-rfkill \
+"
+
+PACKAGES =+ "${PN}-services-sleep"
+SUMMARY_${PN}-services-sleep = "systemd's sleep, suspend and hiberate services"
+FILES_${PN}-services-sleep = "\
+        ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
+        ${systemd_unitdir}/system/systemd-suspend.service \
+        ${systemd_unitdir}/system/systemd-hibernate.service \
+        ${systemd_unitdir}/system-sleep/ \
+        ${rootlibexecdir}/systemd/systemd-sleep \
+"
+
+PACKAGES =+ "${PN}-services-sysctl"
+SUMMARY_${PN}-services-sysctl = "systemd's kernel parameters configuration service"
+FILES_${PN}-services-sysctl = "\
+        ${sysconfdir}/sysctl.d/ \
+        ${exec_prefix}/lib/sysctl.d/ \
+        ${exec_prefix}/lib/sysctl.d/50-default.conf \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-sysctl.service \
+        ${systemd_unitdir}/system/systemd-sysctl.service \
+        ${rootlibexecdir}/systemd/systemd-sysctl \
+"
+
+PACKAGES =+ "${PN}-services-sysusers"
+SUMMARY_${PN}-services-sysusers = "systemd's service and tool to allocate system users and groups"
+FILES_${PN}-services-sysusers = "\
+        ${base_bindir}/systemd-sysusers \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-sysusers.service \
+        ${systemd_unitdir}/system/systemd-sysusers.service \
+        ${exec_prefix}/lib/sysusers.d/basic.conf \
+        ${exec_prefix}/lib/sysusers.d/systemd.conf \
+"
+
+PACKAGES =+ "${PN}-services-sysvcompat"
+SUMMARY_${PN}-services-sysvcompat = "systemd's SYSV legacy and compatibility service"
+# NOTE: if no sysusers or tmpfiles, then users/groups and FS structure must be setup
+RRECOMMENDS_${PN}-services-sysvcompat = "${PN}-services-sysusers ${PN}-services-tmpfiles"
+FILES_${PN}-services-sysvcompat = "\
+        ${rootlibexecdir}/systemd/systemd-bus-proxyd \
+        ${rootlibexecdir}/systemd/systemd-socket-proxyd \
+        ${bindir}/systemd-stdio-bridge \
+        ${rootlibexecdir}/systemd/system-generators/systemd-rc-local-generator \
+        ${rootlibexecdir}/systemd/system-generators/systemd-sysv-generator \
+        ${rootlibexecdir}/systemd/systemd-initctl \
+        ${rootlibexecdir}/systemd/systemd-update-utmp \
+        ${systemd_unitdir}/system/halt-local.service \
+        ${systemd_unitdir}/system/rc-local.service \
+        ${systemd_unitdir}/system/runlevel1.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/runlevel2.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/runlevel3.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/runlevel4.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/runlevel5.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-update-utmp.service \
+        ${systemd_unitdir}/system/systemd-initctl.service \
+        ${systemd_unitdir}/system/systemd-initctl.socket \
+        ${systemd_unitdir}/system/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/systemd-update-utmp.service \
+        ${exec_prefix}/lib/tmpfiles.d/legacy.conf \
+"
+
+PACKAGES =+ "${PN}-services-timedated"
+SUMMARY_${PN}-services-timedated = "systemd's time and date management service"
+RDEPENDS_${PN}-services-timedated = "${PN}-services-dbus"
+CONFFILES_${PN}-services-timedated = "${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf"
+FILES_${PN}-services-timedated = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
+        ${bindir}/timedatectl \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.timedate1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.timedate1.service \
+        ${systemd_unitdir}/system/org.freedesktop.timedate1.busname \
+        ${systemd_unitdir}/system/systemd-timedated.service \
+        ${rootlibexecdir}/systemd/systemd-timedated \
+        ${datadir}/dbus-1/system-services/org.freedesktop.timedate1.service \
+        ${datadir}/polkit-1/actions/org.freedesktop.timedate1.policy \
+"
+
+PACKAGES =+ "${PN}-services-timesyncd"
+SUMMARY_${PN}-services-timesyncd = "systemd's NTP sync service"
+# NOTE: if no sysusers, then users/groups must be setup
+RRECOMMENDS_${PN}-services-timesyncd = "${PN}-services-sysusers"
+CONFFILES_${PN}-services-timesyncd = "${sysconfdir}/systemd/timesyncd.conf"
+FILES_${PN}-services-timesyncd = "\
+        ${sysconfdir}/systemd/system/sysinit.target.wants/systemd-timesyncd.service \
+        ${sysconfdir}/systemd/timesyncd.conf \
+        ${systemd_unitdir}/system/systemd-timesyncd.service \
+        ${rootlibexecdir}/systemd/systemd-timesyncd \
+"
+
+PACKAGES =+ "${PN}-services-tmpfiles"
+SUMMARY_${PN}-services-tmpfiles = "systemd's service to create, delete and clean up volatile/tmp files/dirs"
+FILES_${PN}-services-tmpfiles = "\
+        ${sysconfdir}/tmpfiles.d/ \
+        ${base_bindir}/systemd-tmpfiles \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-tmpfiles-setup.service \
+        ${systemd_unitdir}/system/systemd-tmpfiles-clean.service \
+        ${systemd_unitdir}/system/systemd-tmpfiles-clean.timer \
+        ${systemd_unitdir}/system/systemd-tmpfiles-setup-dev.service \
+        ${systemd_unitdir}/system/systemd-tmpfiles-setup.service \
+        ${systemd_unitdir}/system/timers.target.wants/systemd-tmpfiles-clean.timer \
+        ${exec_prefix}/lib/tmpfiles.d/etc.conf \
+        ${exec_prefix}/lib/tmpfiles.d/systemd-nologin.conf \
+        ${exec_prefix}/lib/tmpfiles.d/systemd.conf \
+        ${exec_prefix}/lib/tmpfiles.d/tmp.conf \
+        ${exec_prefix}/lib/tmpfiles.d/var.conf \
+        ${exec_prefix}/lib/tmpfiles.d/00-create-volatile.conf \
+        ${exec_prefix}/lib/tmpfiles.d/x11.conf \
+"
+
+PACKAGES =+ "${PN}-services-udev"
+SUMMARY_${PN}-services-udev = "systemd's udev services"
+RDEPENDS_${PN}-services-udev = "udev"
+FILES_${PN}-services-udev = "\
+        ${systemd_unitdir}/system/initrd-udevadm-cleanup-db.service \
+        ${systemd_unitdir}/system/systemd-udev-hwdb-update.service \
+        ${systemd_unitdir}/system/systemd-udev-settle.service \
+        ${systemd_unitdir}/system/systemd-udev-trigger.service \
+        ${systemd_unitdir}/system/systemd-udevd-control.socket \
+        ${systemd_unitdir}/system/systemd-udevd-kernel.socket \
+        ${systemd_unitdir}/system/systemd-udevd.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udevd.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udev-trigger.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udev-hwdb-update.service \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-udevd-kernel.socket \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-udevd-control.socket \
+"
+
+PACKAGES =+ "${PN}-services-update"
+SUMMARY_${PN}-services-update = "systemd's post update service"
+FILES_${PN}-services-update = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-system-update-generator \
+        ${rootlibexecdir}/systemd/systemd-update-done \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-update-done.service \
+        ${systemd_unitdir}/system/systemd-update-done.service \
+"
+
+PACKAGES =+ "${PN}-services-vconsole"
+SUMMARY_${PN}-services-vconsole = "systemd's service to configure the virtual console (keyboard/font)"
+RECOMMENDS_${PN}-services-vconsole = "kbd kbd-consolefonts kbd-keymaps"
+FILES_${PN}-services-vconsole = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service \
+        ${systemd_unitdir}/system/systemd-vconsole-setup.service \
+        ${rootlibexecdir}/systemd/systemd-vconsole-setup \
+"
 
-FILES_${PN}-dbg += "${libdir}/systemd/ptest/.debug"
+########################################################################
+# Standard BitBake Packages
+########################################################################
+
+FILES_${PN}-dbg += "\
+        ${base_libdir}/security/.debug/ \
+        ${libdir}/systemd/ptest/.debug \
+        ${rootlibdir}/.debug \
+        ${systemd_unitdir}/*/.debug \
+        ${systemd_unitdir}/.debug \
+"
 
 FILES_${PN}-gui = "${bindir}/systemadm"
 
-FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
-                              ${systemd_unitdir}/system/systemd-vconsole-setup.service \
-                              ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
+FILES_${PN}-dev += "\
+        ${base_libdir}/security/*.la \
+        ${datadir}/dbus-1/interfaces/ \
+        ${sysconfdir}/rpm/macros.systemd \
+"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} += "--system systemd-journal-gateway; --system systemd-timesync"
+GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
+
+# The test cases need perl and bash to run correctly.
+RDEPENDS_${PN}-ptest += "perl python bash"
+FILES_${PN}-ptest += "\
+        ${libdir}/udev/rules.d \
+"
+
+########################################################################
+# Misc Packages
+########################################################################
+
+PACKAGES =+ "${PN}-bash"
+SUMMARY_${PN}-bash = "systemd bash shell commands completion"
+FILES_${PN}-bash = "\
+        ${datadir}/bash-completion/completions/bootctl \
+        ${datadir}/bash-completion/completions/busctl \
+        ${datadir}/bash-completion/completions/coredumpctl \
+        ${datadir}/bash-completion/completions/hostnamectl \
+        ${datadir}/bash-completion/completions/journalctl \
+        ${datadir}/bash-completion/completions/kernel-install \
+        ${datadir}/bash-completion/completions/localectl \
+        ${datadir}/bash-completion/completions/loginctl \
+        ${datadir}/bash-completion/completions/machinectl \
+        ${datadir}/bash-completion/completions/systemctl \
+        ${datadir}/bash-completion/completions/systemd-* \
+        ${datadir}/bash-completion/completions/timedatectl \
+"
 
+PACKAGES =+ "${PN}-initramfs"
+SUMMARY_${PN}-initramfs = "systemd's initramfs support"
+FILES_${PN}-initramfs = "/init"
+RDEPENDS_${PN}-initramfs = "${PN}"
+
+PACKAGES =+ "${PN}-kernel-install"
+SUMMARY_${PN}-kernel-install = "systemd tool to add/remove kernel and initramfs images to/from /boot"
 RDEPENDS_${PN}-kernel-install += "bash"
-FILES_${PN}-kernel-install = "${bindir}/kernel-install \
-                              ${sysconfdir}/kernel/ \
-                              ${exec_prefix}/lib/kernel \
-                             "
-FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
-                         "
-
-FILES_${PN}-zsh = "${datadir}/zsh/site-functions"
-
-FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
-                      ${exec_prefix}/lib/binfmt.d \
-                      ${rootlibexecdir}/systemd/systemd-binfmt \
-                      ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
-                      ${systemd_unitdir}/system/systemd-binfmt.service"
-RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
-
-RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
-
-CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
-                ${sysconfdir}/systemd/logind.conf \
-                ${sysconfdir}/systemd/system.conf \
-                ${sysconfdir}/systemd/user.conf"
-
-FILES_${PN} = " ${base_bindir}/* \
-                ${datadir}/bash-completion \
-                ${datadir}/dbus-1/services \
-                ${datadir}/dbus-1/system-services \
-                ${datadir}/polkit-1 \
-                ${datadir}/${BPN} \
-                ${datadir}/factory \
-                ${sysconfdir}/bash_completion.d/ \
-                ${sysconfdir}/dbus-1/ \
-                ${sysconfdir}/machine-id \
-                ${sysconfdir}/modules-load.d/ \
-                ${sysconfdir}/pam.d/ \
-                ${sysconfdir}/sysctl.d/ \
-                ${sysconfdir}/systemd/ \
-                ${sysconfdir}/tmpfiles.d/ \
-                ${sysconfdir}/xdg/ \
-                ${sysconfdir}/init.d/README \
-                ${rootlibexecdir}/systemd/* \
-                ${systemd_unitdir}/* \
-                ${base_libdir}/security/*.so \
-                ${libdir}/libnss_* \
-                /cgroup \
-                ${bindir}/systemd* \
-                ${bindir}/busctl \
-                ${bindir}/localectl \
-                ${bindir}/hostnamectl \
-                ${bindir}/timedatectl \
-                ${bindir}/bootctl \
-                ${bindir}/kernel-install \
-                ${exec_prefix}/lib/tmpfiles.d/*.conf \
-                ${exec_prefix}/lib/systemd \
-                ${exec_prefix}/lib/modules-load.d \
-                ${exec_prefix}/lib/sysctl.d \
-                ${exec_prefix}/lib/sysusers.d \
-                ${localstatedir} \
-                /lib/udev/rules.d/70-uaccess.rules \
-                /lib/udev/rules.d/71-seat.rules \
-                /lib/udev/rules.d/73-seat-late.rules \
-                /lib/udev/rules.d/99-systemd.rules \
-               "
+FILES_${PN}-kernel-install = "\
+        ${bindir}/kernel-install \
+        ${sysconfdir}/kernel/ \
+        ${exec_prefix}/lib/kernel \
+"
 
-FILES_${PN}-dbg += "${rootlibdir}/.debug ${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"
+PACKAGES =+ "${PN}-pam"
+SUMMARY_${PN}-pam = "systemd PAM modules and configuration"
+FILES_${PN}-pam = "\
+        ${sysconfdir}/pam.d \
+        ${base_libdir}/security/pam_systemd.so \
+"
 
-RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
-RDEPENDS_${PN} += "volatile-binds"
+PACKAGES =+ "${PN}-preset"
+SUMMARY_${PN}-preset = "systemd's service enablement presets"
+FILES_${PN}-preset = "${systemd_unitdir}/system-preset/90-systemd.preset"
+
+PACKAGES =+ "${PN}-rpm-macros"
+SUMMARY_${PN}-rpm-macros = "systemd RPM macros"
+FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
+			 "
 
-RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units udev-hwdb\
-                      util-linux-agetty \
-                      util-linux-fsck e2fsprogs-e2fsck \
-                      kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 os-release \
+PACKAGES =+ "${PN}-zsh"
+SUMMARY_${PN}-zsh = "systemd zsh shell commands completion"
+FILES_${PN}-zsh = "\
+        ${datadir}/zsh/site-functions \
 "
 
-PACKAGES =+ "udev-dbg udev udev-hwdb"
 
-FILES_udev-dbg += "/lib/udev/.debug"
+########################################################################
+# Aggregation of Split Packages
+########################################################################
+
+PACKAGES =+ "${PN}-services-essential"
+SUMMARY_${PN}-services-essential = "systemd's essential services aggregation"
+ALLOW_EMPTY_${PN}-services-essential = "1"
+RDEPENDS_${PN}-services-essential = "\
+        ${PN}-generators-filesystems \
+        ${PN}-preset \
+        ${PN}-services-fsck \
+        ${PN}-services-journal \
+        ${PN}-services-modules-load \
+        ${PN}-services-randomseed \
+        ${PN}-services-sleep \
+        ${PN}-services-sysctl \
+        ${PN}-services-sysusers \
+        ${PN}-services-tmpfiles \
+        ${PN}-services-udev \
+        udev-rules-systemd \
+"
 
-RPROVIDES_udev = "hotplug"
+PACKAGES =+ "${PN}-services-base"
+SUMMARY_${PN}-services-base = "systemd's base services aggregation"
+ALLOW_EMPTY_${PN}-services-base = "1"
+RDEPENDS_${PN}-services-base = "${PN}-services-essential \
+        ${PN}-services-ask-password \
+        ${PN}-services-backlight \
+        ${PN}-services-binfmt \
+        ${PN}-services-coredump \
+        ${PN}-services-dbus \
+        ${PN}-services-firstboot \
+        ${PN}-services-fuse \
+        ${PN}-services-hostnamed \
+        ${PN}-services-ldconfig \
+        ${PN}-services-localed \
+        ${PN}-services-logind \
+        ${PN}-services-networkd \
+        ${PN}-services-quota \
+        ${PN}-services-rfkill \
+        ${PN}-services-timedated \
+        ${PN}-services-timesyncd \
+        ${PN}-services-update \
+        ${PN}-services-vconsole \
+        ${PN}-services-modules-static-nodes \
+        ${PN}-bash \
+        ${PN}-initramfs \
+        ${PN}-kernel-install \
+        ${PN}-rpm-macros \
+        ${PN}-zsh \
+"
 
-RDEPENDS_udev-hwdb += "udev"
+PACKAGES =+ "${PN}-services-all"
+SUMMARY_${PN}-services-all = "systemd's all services and tools aggregation"
+ALLOW_EMPTY_${PN}-services-all = "1"
+RDEPENDS_${PN}-services-all = "${PN}-services-base \
+        ${PN}-services-bootchart \
+        ${PN}-services-cryptsetup \
+        ${PN}-services-debug \
+        ${PN}-services-machined \
+        ${PN}-services-nspawn \
+        ${PN}-services-sysvcompat \
+        ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${PN}-services-multi-seat-x', '', d)} \
+"
 
-FILES_udev += "${base_sbindir}/udevd \
-               ${rootlibexecdir}/systemd/systemd-udevd \
-               ${rootlibexecdir}/udev/accelerometer \
-               ${rootlibexecdir}/udev/ata_id \
-               ${rootlibexecdir}/udev/cdrom_id \
-               ${rootlibexecdir}/udev/collect \
-               ${rootlibexecdir}/udev/findkeyboards \
-               ${rootlibexecdir}/udev/keyboard-force-release.sh \
-               ${rootlibexecdir}/udev/keymap \
-               ${rootlibexecdir}/udev/mtd_probe \
-               ${rootlibexecdir}/udev/scsi_id \
-               ${rootlibexecdir}/udev/v4l_id \
-               ${rootlibexecdir}/udev/keymaps \
-               ${rootlibexecdir}/udev/rules.d/*.rules \
-               ${sysconfdir}/udev \
-               ${sysconfdir}/init.d/systemd-udevd \
-               ${systemd_unitdir}/system/*udev* \
-               ${systemd_unitdir}/system/*.wants/*udev* \
-               ${base_bindir}/udevadm \
-               ${datadir}/bash-completion/completions/udevadm \
-              "
-
-FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
 
-INITSCRIPT_PACKAGES = "udev"
-INITSCRIPT_NAME_udev = "systemd-udevd"
-INITSCRIPT_PARAMS_udev = "start 03 S ."
+########################################################################
+# Core Package
+########################################################################
 
-python __anonymous() {
-    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
-        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
-}
+CONFFILES_${PN} = "\
+        ${sysconfdir}/systemd/system.conf \
+        ${sysconfdir}/systemd/user.conf \
+"
 
+FILES_${PN} = "\
+        ${base_bindir}/systemctl \
+        ${base_bindir}/systemd-hwdb \
+        ${bindir}/bootctl \
+        ${datadir}/${BPN} \
+        ${datadir}/factory \
+        ${exec_prefix}/lib/libnss_myhostname* \
+        ${exec_prefix}/lib/libnss_mymachines.so.2 \
+        ${libdir}/systemd/user-generators/ \
+        ${libdir}/systemd/user/ \
+        ${localstatedir} \
+        ${rootlibexecdir}/systemd/systemd \
+        ${rootlibexecdir}/systemd/systemd-cgroups-agent \
+        ${rootlibexecdir}/systemd/systemd-shutdown \
+        ${rootlibexecdir}/systemd/systemd-shutdownd \
+        ${rootlibexecdir}/systemd/systemd-machine-id-commit \
+        ${rootlibexecdir}/systemd/systemd-hibernate-resume \
+        ${rootlibexecdir}/systemd/systemd-importd \
+        ${rootlibexecdir}/systemd/import-pubring.gpg \
+        ${rootlibexecdir}/systemd/systemd-pull \
+        ${sysconfdir}/init.d/README \
+        ${sysconfdir}/machine-id \
+        ${sysconfdir}/systemd/system.conf \
+        ${sysconfdir}/systemd/system/ \
+        ${sysconfdir}/systemd/user.conf \
+        ${sysconfdir}/systemd/user/ \
+        ${sysconfdir}/xdg/systemd/ \
+        ${systemd_unitdir}/system-generators/ \
+        ${systemd_unitdir}/system-preset/ \
+        ${systemd_unitdir}/system-shutdown/ \
+        ${systemd_unitdir}/system/ \
+"
 # TODO:
 # u-a for runlevel and telinit
+RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
+RDEPENDS_${PN} += "volatile-binds"
+
+RRECOMMENDS_${PN} += "\
+        ${PN}-services-base \
+        ${PN}-services-essential \
+        ${PN}-services-all \
+        ${PN}-tools \
+        ${PN}-generators-getty \
+        ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PN}-pam', '', d)} \
+        ${PN}-services-getty \
+        kernel-module-autofs4 \
+        kernel-module-ipv6 \
+        kernel-module-unix \
+        util-linux-agetty \
+        util-linux-fsck \
+        e2fsprogs-e2fsck \
+        os-release \
+        udev-hwdb \
+        systemd-serialgetty \
+        systemd-compat-units \
+"
 
 ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
 
@@ -375,6 +1005,41 @@ ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
 ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
 ALTERNATIVE_PRIORITY[runlevel] ?= "300"
 
+
+########################################################################
+# UDEV Section
+########################################################################
+
+PACKAGES =+ "udev-dbg"
+SUMMARY_udev-dbg = "Dynamic device management - Debugging files"
+RRECOMMENDS_udev-dbg += "${PN}-dbg"
+FILES_udev-dbg = "\
+        ${rootlibexecdir}/udev/.debug \
+        ${base_sbindir}/.debug/udevd \
+        ${base_bindir}/.debug/udevadm \
+        ${rootlibexecdir}/systemd/.debug/systemd-udevd \
+        ${base_libdir}/.debug/libudev* \
+        ${base_libdir}/.debug/libgudev* \
+        ${exec_prefix}/lib/.debug/libgudev* \
+"
+
+PACKAGES =+ "udev-dev"
+SUMMARY_udev-dev = "Dynamic device management - Development files"
+RRECOMMENDS_udev-dev += "${PN}-dev"
+FILES_udev-dev = "\
+        ${datadir}/pkgconfig/*udev* \
+        ${libdir}/pkgconfig/*udev* \
+        ${libdir}/lib*udev*.la \
+        ${includedir}/*udev* \
+"
+
+PACKAGES =+ "udev-hwdb"
+SUMMARY_udev-hwdb = "Dynamic device management - Hardware database"
+RDEPENDS_udev-hwdb += "udev"
+FILES_udev-hwdb = "\
+        ${rootlibexecdir}/udev/hwdb.d/ \
+"
+
 pkg_postinst_udev-hwdb () {
 	if test -n "$D"; then
 		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
@@ -392,6 +1057,154 @@ pkg_prerm_udev-hwdb () {
 	rm -f ${sysconfdir}/udev/hwdb.bin
 }
 
+PACKAGES =+ "udev-bash"
+SUMMARY_udev-bash = "Dynamic device management - Bash shell commands completion"
+FILES_udev-bash = "${datadir}/bash-completion/completions/udevadm"
+
+PACKAGES =+ "udev-zsh"
+SUMMARY_udev-zsh = "Dynamic device management - zsh shell commands completion"
+FILES_udev-zsh = "${datadir}/zsh/site-functions/_udevadm"
+
+
+########################################################################
+# UDEV Rules Packages
+# split rules that require external programs or dependencies.
+# those that use only builtins are not split
+########################################################################
+
+PACKAGES =+ "udev-rules-accelerometer"
+SUMMARY_udev-rules-accelerometer = "Dynamic device management - accelerometer rules"
+FILES_udev-rules-accelerometer = "\
+        ${rootlibexecdir}/udev/accelerometer \
+        ${rootlibexecdir}/udev/rules.d/61-accelerometer.rules \
+        ${rootlibexecdir}/udev/rules.d/70-touchpad.rules \
+"
+
+PACKAGES =+ "udev-rules-cdrom"
+SUMMARY_udev-rules-cdrom = "Dynamic device management - cdrom rules"
+FILES_udev-rules-cdrom = "\
+        ${rootlibexecdir}/udev/cdrom_id \
+        ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \
+"
+
+PACKAGES =+ "udev-rules-mtd"
+SUMMARY_udev-rules-mtd = "Dynamic device management - mtd rules"
+FILES_udev-rules-mtd = "\
+        ${rootlibexecdir}/udev/mtd_probe \
+        ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \
+"
+
+PACKAGES =+ "udev-rules-persistent-storage"
+SUMMARY_udev-rules-persistent-storage = "Dynamic device management - persistent storage rules"
+FILES_udev-rules-persistent-storage = "\
+        ${rootlibexecdir}/udev/ata_id \
+        ${rootlibexecdir}/udev/scsi_id \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \
+"
+
+PACKAGES =+ "udev-rules-systemd"
+SUMMARY_udev-rules-systemd = "Dynamic device management - systemd rules"
+RDEPENDS_udev-rules-systemd = "${PN} ${PN}-services-sysctl"
+FILES_udev-rules-systemd = "\
+        ${rootlibexecdir}/udev/rules.d/99-systemd.rules \
+"
+
+PACKAGES =+ "udev-rules-v4l"
+SUMMARY_udev-rules-v4l = "Dynamic device management - v4l rules"
+FILES_udev-rules-v4l = "\
+        ${rootlibexecdir}/udev/v4l_id \
+        ${rootlibexecdir}/udev/rules.d/*-persistent-v4l.rules \
+"
+
+PACKAGES =+ "udev-rules-all"
+SUMMARY_udev-rules-all = "Dynamic device management - all rules aggregation"
+ALLOW_EMPTY_udev-rules-all = "1"
+RDEPENDS_udev-rules-all = "\
+        udev-rules-accelerometer \
+        udev-rules-cdrom \
+        udev-rules-mtd \
+        udev-rules-persistent-storage \
+        udev-rules-systemd \
+        udev-rules-v4l \
+"
+
+PACKAGES =+ "udev"
+SUMMARY_udev = "Dynamic device management"
+RPROVIDES_udev = "hotplug"
+PROVIDES = "udev"
+CONFFILES_udev = "${sysconfdir}/udev/udev.conf"
+RDEPENDS_udev += "${PN}-services-vconsole"
+FILES_udev = "\
+        ${base_bindir}/udevadm \
+        ${base_sbindir}/udevd \
+        ${rootlibexecdir}/systemd/systemd-udevd \
+        ${rootlibexecdir}/udev/collect \
+        ${rootlibexecdir}/udev/rules.d/42-usb-hid-pm.rules \
+        ${rootlibexecdir}/udev/rules.d/50-firmware.rules \
+        ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \
+        ${rootlibexecdir}/udev/rules.d/60-drm.rules \
+        ${rootlibexecdir}/udev/rules.d/60-keyboard.rules \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-serial.rules \
+        ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \
+        ${rootlibexecdir}/udev/rules.d/75-net-description.rules \
+        ${rootlibexecdir}/udev/rules.d/75-tty-description.rules \
+        ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \
+        ${rootlibexecdir}/udev/rules.d/80-drivers.rules \
+        ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \
+        ${rootlibexecdir}/udev/rules.d/95-udev-late.rules \
+        ${rootlibexecdir}/udev/rules.d/70-mouse.rules \
+        ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
+        ${rootlibexecdir}/udev/rules.d/touchscreen.rules \
+        ${sysconfdir}/init.d/systemd-udevd \
+        ${sysconfdir}/udev \
+"
+
+RRECOMMENDS_udev = "\
+        udev-hwdb \
+        udev-rules-all \
+"
+
+INITSCRIPT_PACKAGES = "udev"
+INITSCRIPT_NAME_udev = "systemd-udevd"
+INITSCRIPT_PARAMS_udev = "start 03 S ."
+
+python __anonymous() {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+# TODO:
+# u-a for runlevel and telinit
+
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
+
+ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
+ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
+ALTERNATIVE_PRIORITY[init] ?= "300"
+
+ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
+ALTERNATIVE_PRIORITY[halt] ?= "300"
+
+ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
+ALTERNATIVE_PRIORITY[reboot] ?= "300"
+
+ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
+ALTERNATIVE_PRIORITY[shutdown] ?= "300"
+
+ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
+ALTERNATIVE_PRIORITY[poweroff] ?= "300"
+
+ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
+ALTERNATIVE_PRIORITY[runlevel] ?= "300"
+
 # As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
 # that we don't build both udev and systemd in world builds.
 python () {
-- 
1.9.1



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

* Re: [PATCH 1/3] dbus: split tools package.
  2015-03-04 21:27   ` [PATCH 1/3] dbus: split tools package Bruno Bottazzini
@ 2015-03-05 11:01     ` Andreas Oberritter
  2015-03-05 13:16       ` Bottazzini, Bruno
  0 siblings, 1 reply; 73+ messages in thread
From: Andreas Oberritter @ 2015-03-05 11:01 UTC (permalink / raw)
  To: openembedded-core

Hello Gustavo,

On 04.03.2015 22:27, Bruno Bottazzini wrote:
> From: Gustavo Sverzut Barbieri <gustavo.barbieri@intel.com>
> 
> Most tools are not required if one is launching a simple daemon.
> The user will be able to exclude dbus-tool and save some space in his
> build
> 
> Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com>
> ---
>  meta/recipes-core/dbus/dbus.inc | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
> index fb5d017..f975dc9 100644
> --- a/meta/recipes-core/dbus/dbus.inc
> +++ b/meta/recipes-core/dbus/dbus.inc
> @@ -39,13 +39,13 @@ CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
>  
>  DEBIANNAME_${PN} = "dbus-1"
>  
> -PACKAGES =+ "${PN}-lib"
> +PACKAGES =+ "${PN}-lib ${PN}-tools"
>  
>  OLDPKGNAME = "dbus-x11"
>  OLDPKGNAME_class-nativesdk = ""
>  
>  # for compatibility
> -RPROVIDES_${PN} = "${OLDPKGNAME}"
> +RPROVIDES_${PN} = "${OLDPKGNAME} ${PN}-native-tools-native"

this line seems to be wrong. What are you trying to solve with it?

Regards,
Andreas

>  RREPLACES_${PN} += "${OLDPKGNAME}"
>  
>  FILES_${PN} = "${bindir}/dbus-daemon* \
> @@ -64,6 +64,12 @@ FILES_${PN} = "${bindir}/dbus-daemon* \
>  FILES_${PN}-lib = "${libdir}/lib*.so.*"
>  RRECOMMENDS_${PN}-lib = "${PN}"
>  FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
> +FILES_${PN}-tools += "${bindir}/dbus-uuidgen \
> +                      ${bindir}/dbus-cleanup-sockets \
> +                      ${bindir}/dbus-monitor \
> +                      ${bindir}/dbus-launch \
> +                      ${bindir}/dbus-run-session"
> +RRECOMMENDS_${PN} = "${PN}-tools"
>  
>  pkg_postinst_dbus() {
>  	# If both systemd and sysvinit are enabled, mask the dbus-1 init script
> 



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

* Re: [PATCH 1/3] dbus: split tools package.
  2015-03-05 11:01     ` Andreas Oberritter
@ 2015-03-05 13:16       ` Bottazzini, Bruno
  2015-03-05 14:09         ` Andreas Oberritter
  0 siblings, 1 reply; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-03-05 13:16 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: openembedded-core

On Qui, 2015-03-05 at 12:01 +0100, Andreas Oberritter wrote:
> Hello Gustavo,
> 
> On 04.03.2015 22:27, Bruno Bottazzini wrote:
> > From: Gustavo Sverzut Barbieri <gustavo.barbieri@intel.com>
> > 
> > Most tools are not required if one is launching a simple daemon.
> > The user will be able to exclude dbus-tool and save some space in his
> > build
> > 
> > Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com>
> > ---
> >  meta/recipes-core/dbus/dbus.inc | 10 ++++++++--
> >  1 file changed, 8 insertions(+), 2 deletions(-)
> > 
> > diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
> > index fb5d017..f975dc9 100644
> > --- a/meta/recipes-core/dbus/dbus.inc
> > +++ b/meta/recipes-core/dbus/dbus.inc
> > @@ -39,13 +39,13 @@ CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
> >  
> >  DEBIANNAME_${PN} = "dbus-1"
> >  
> > -PACKAGES =+ "${PN}-lib"
> > +PACKAGES =+ "${PN}-lib ${PN}-tools"
> >  
> >  OLDPKGNAME = "dbus-x11"
> >  OLDPKGNAME_class-nativesdk = ""
> >  
> >  # for compatibility
> > -RPROVIDES_${PN} = "${OLDPKGNAME}"
> > +RPROVIDES_${PN} = "${OLDPKGNAME} ${PN}-native-tools-native"
> 
> this line seems to be wrong. What are you trying to solve with it?
> 
> Regards,
> Andreas

Hello Andreas, 

Could you be more specific what is wrong with this line ?

Have you tried removing it and compile it ?

Try compiling this patch and see what it provides.

If you want to exclude the dbus-tools just add the following at your 
local conf file: 
PACKAGE_EXCLUDE = "dbus-tools".

Best Regards,

Bruno Bottazzini

> 
> >  RREPLACES_${PN} += "${OLDPKGNAME}"
> >  
> >  FILES_${PN} = "${bindir}/dbus-daemon* \
> > @@ -64,6 +64,12 @@ FILES_${PN} = "${bindir}/dbus-daemon* \
> >  FILES_${PN}-lib = "${libdir}/lib*.so.*"
> >  RRECOMMENDS_${PN}-lib = "${PN}"
> >  FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
> > +FILES_${PN}-tools += "${bindir}/dbus-uuidgen \
> > +                      ${bindir}/dbus-cleanup-sockets \
> > +                      ${bindir}/dbus-monitor \
> > +                      ${bindir}/dbus-launch \
> > +                      ${bindir}/dbus-run-session"
> > +RRECOMMENDS_${PN} = "${PN}-tools"
> >  
> >  pkg_postinst_dbus() {
> >  	# If both systemd and sysvinit are enabled, mask the dbus-1 init script
> > 
> 




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

* Re: [PATCH 1/3] dbus: split tools package.
  2015-03-05 13:16       ` Bottazzini, Bruno
@ 2015-03-05 14:09         ` Andreas Oberritter
  2015-03-05 14:29           ` Bottazzini, Bruno
  0 siblings, 1 reply; 73+ messages in thread
From: Andreas Oberritter @ 2015-03-05 14:09 UTC (permalink / raw)
  To: Bottazzini, Bruno; +Cc: openembedded-core

On 05.03.2015 14:16, Bottazzini, Bruno wrote:
> On Qui, 2015-03-05 at 12:01 +0100, Andreas Oberritter wrote:
>> Hello Gustavo,
>>
>> On 04.03.2015 22:27, Bruno Bottazzini wrote:
>>> From: Gustavo Sverzut Barbieri <gustavo.barbieri@intel.com>
>>>
>>> Most tools are not required if one is launching a simple daemon.
>>> The user will be able to exclude dbus-tool and save some space in his
>>> build
>>>
>>> Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com>
>>> ---
>>>  meta/recipes-core/dbus/dbus.inc | 10 ++++++++--
>>>  1 file changed, 8 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
>>> index fb5d017..f975dc9 100644
>>> --- a/meta/recipes-core/dbus/dbus.inc
>>> +++ b/meta/recipes-core/dbus/dbus.inc
>>> @@ -39,13 +39,13 @@ CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
>>>  
>>>  DEBIANNAME_${PN} = "dbus-1"
>>>  
>>> -PACKAGES =+ "${PN}-lib"
>>> +PACKAGES =+ "${PN}-lib ${PN}-tools"
>>>  
>>>  OLDPKGNAME = "dbus-x11"
>>>  OLDPKGNAME_class-nativesdk = ""
>>>  
>>>  # for compatibility
>>> -RPROVIDES_${PN} = "${OLDPKGNAME}"
>>> +RPROVIDES_${PN} = "${OLDPKGNAME} ${PN}-native-tools-native"
>>
>> this line seems to be wrong. What are you trying to solve with it?
>>
>> Regards,
>> Andreas
> 
> Hello Andreas, 
> 
> Could you be more specific what is wrong with this line ?
> 
> Have you tried removing it and compile it ?

No, I haven't. What kind of problem will it raise?

It looks wrong, because the package dbus doesn't provide dbus-tools, but
dbus-tools is instead provided by dbus-tools itself (with your patch
applied).

Furthermore, having "native" twice in a package name seems odd, but
there's no reason for target packages to provide anything "native" in
the first place.

Regards,
Andreas

> Try compiling this patch and see what it provides.
> 
> If you want to exclude the dbus-tools just add the following at your 
> local conf file: 
> PACKAGE_EXCLUDE = "dbus-tools".
> 
> Best Regards,
> 
> Bruno Bottazzini
> 
>>
>>>  RREPLACES_${PN} += "${OLDPKGNAME}"
>>>  
>>>  FILES_${PN} = "${bindir}/dbus-daemon* \
>>> @@ -64,6 +64,12 @@ FILES_${PN} = "${bindir}/dbus-daemon* \
>>>  FILES_${PN}-lib = "${libdir}/lib*.so.*"
>>>  RRECOMMENDS_${PN}-lib = "${PN}"
>>>  FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
>>> +FILES_${PN}-tools += "${bindir}/dbus-uuidgen \
>>> +                      ${bindir}/dbus-cleanup-sockets \
>>> +                      ${bindir}/dbus-monitor \
>>> +                      ${bindir}/dbus-launch \
>>> +                      ${bindir}/dbus-run-session"
>>> +RRECOMMENDS_${PN} = "${PN}-tools"
>>>  
>>>  pkg_postinst_dbus() {
>>>  	# If both systemd and sysvinit are enabled, mask the dbus-1 init script
>>>
>>
> 
> 



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

* Re: [PATCH 3/3] systemd: split modules into packages
  2015-03-04 21:27   ` [PATCH 3/3] systemd: split modules into packages Bruno Bottazzini
@ 2015-03-05 14:28     ` Anders Darander
  2015-03-05 16:14       ` Bottazzini, Bruno
  0 siblings, 1 reply; 73+ messages in thread
From: Anders Darander @ 2015-03-05 14:28 UTC (permalink / raw)
  To: Bruno Bottazzini; +Cc: openembedded-core

* Bruno Bottazzini <bruno.bottazzini@intel.com> [150304 22:28]:
> if one wants to launch a simple deamon, most modules are not
> required.
> He will be able to save space and exclude unwanted packages
> from the final image.
> ---
>  meta/recipes-core/systemd/systemd_219.bb | 1071 ++++++++++++++++++++++++++----
>  1 file changed, 942 insertions(+), 129 deletions(-)

> diff --git a/meta/recipes-core/systemd/systemd_219.bb b/meta/recipes-core/systemd/systemd_219.bb
> index 6a8b5b8..fd6cf57 100644
> --- a/meta/recipes-core/systemd/systemd_219.bb
> +++ b/meta/recipes-core/systemd/systemd_219.bb
> @@ -56,10 +56,31 @@ LDFLAGS_append_libc-uclibc = " -lrt"

>  GTKDOC_DOCDIR = "${S}/docs/"

> -PACKAGECONFIG ??= "xz \
> +DEPENDS += "curl"
> +
> +PACKAGECONFIG ??= "acl \
> +                   blkid \
> +                   efi \
> +                   kmod \
> +                   gcrypt \
> +                   lz4 \
> +                   xz \
> +                   libidn \
>                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
>                     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}"

Just a quick question before I look into the patch in more detail.

Is the new setting of PACKAGECONFIG consistent with how systemd was
built previously? I guess it is.

Another comment, you should remove the dependcies that gets added using
PACKAGECONFIG from DEPENDS, e.g. acl etc. (Or are they required
nevertheless?)

Cheers,
Anders

-- 
Anders Darander
ChargeStorm AB / eStorm AB


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

* Re: [PATCH 1/3] dbus: split tools package.
  2015-03-05 14:09         ` Andreas Oberritter
@ 2015-03-05 14:29           ` Bottazzini, Bruno
  2015-03-05 14:49             ` Andreas Oberritter
  0 siblings, 1 reply; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-03-05 14:29 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: openembedded-core

On Qui, 2015-03-05 at 15:09 +0100, Andreas Oberritter wrote:
> On 05.03.2015 14:16, Bottazzini, Bruno wrote:
> > On Qui, 2015-03-05 at 12:01 +0100, Andreas Oberritter wrote:
> >> Hello Gustavo,
> >>
> >> On 04.03.2015 22:27, Bruno Bottazzini wrote:
> >>> From: Gustavo Sverzut Barbieri <gustavo.barbieri@intel.com>
> >>>
> >>> Most tools are not required if one is launching a simple daemon.
> >>> The user will be able to exclude dbus-tool and save some space in his
> >>> build
> >>>
> >>> Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com>
> >>> ---
> >>>  meta/recipes-core/dbus/dbus.inc | 10 ++++++++--
> >>>  1 file changed, 8 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
> >>> index fb5d017..f975dc9 100644
> >>> --- a/meta/recipes-core/dbus/dbus.inc
> >>> +++ b/meta/recipes-core/dbus/dbus.inc
> >>> @@ -39,13 +39,13 @@ CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
> >>>  
> >>>  DEBIANNAME_${PN} = "dbus-1"
> >>>  
> >>> -PACKAGES =+ "${PN}-lib"
> >>> +PACKAGES =+ "${PN}-lib ${PN}-tools"
> >>>  
> >>>  OLDPKGNAME = "dbus-x11"
> >>>  OLDPKGNAME_class-nativesdk = ""
> >>>  
> >>>  # for compatibility
> >>> -RPROVIDES_${PN} = "${OLDPKGNAME}"
> >>> +RPROVIDES_${PN} = "${OLDPKGNAME} ${PN}-native-tools-native"
> >>
> >> this line seems to be wrong. What are you trying to solve with it?
> >>
> >> Regards,
> >> Andreas
> > 
> > Hello Andreas, 
> > 
> > Could you be more specific what is wrong with this line ?
> > 
> > Have you tried removing it and compile it ?
> 
> No, I haven't. What kind of problem will it raise?

I receive the following problem:
ERROR: Nothing RPROVIDES 'dbus-native-tools-native' (but
virtual:native:PATH/poky/meta/recipes-core/dbus/dbus_1.8.10.bb RDEPENDS
on or otherwise requires it

Any suggestion of how to fix it?
> 
> It looks wrong, because the package dbus doesn't provide dbus-tools, but
> dbus-tools is instead provided by dbus-tools itself (with your patch
> applied).
> 
> Furthermore, having "native" twice in a package name seems odd, but
> there's no reason for target packages to provide anything "native" in
> the first place.
> 
> Regards,
> Andreas
> 
> > Try compiling this patch and see what it provides.
> > 
> > If you want to exclude the dbus-tools just add the following at your 
> > local conf file: 
> > PACKAGE_EXCLUDE = "dbus-tools".
> > 
> > Best Regards,
> > 
> > Bruno Bottazzini
> > 
> >>
> >>>  RREPLACES_${PN} += "${OLDPKGNAME}"
> >>>  
> >>>  FILES_${PN} = "${bindir}/dbus-daemon* \
> >>> @@ -64,6 +64,12 @@ FILES_${PN} = "${bindir}/dbus-daemon* \
> >>>  FILES_${PN}-lib = "${libdir}/lib*.so.*"
> >>>  RRECOMMENDS_${PN}-lib = "${PN}"
> >>>  FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
> >>> +FILES_${PN}-tools += "${bindir}/dbus-uuidgen \
> >>> +                      ${bindir}/dbus-cleanup-sockets \
> >>> +                      ${bindir}/dbus-monitor \
> >>> +                      ${bindir}/dbus-launch \
> >>> +                      ${bindir}/dbus-run-session"
> >>> +RRECOMMENDS_${PN} = "${PN}-tools"
> >>>  
> >>>  pkg_postinst_dbus() {
> >>>  	# If both systemd and sysvinit are enabled, mask the dbus-1 init script
> >>>
> >>
> > 
> > 
> 




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

* Re: [PATCH 1/3] dbus: split tools package.
  2015-03-05 14:29           ` Bottazzini, Bruno
@ 2015-03-05 14:49             ` Andreas Oberritter
  2015-03-05 16:05               ` Bottazzini, Bruno
  0 siblings, 1 reply; 73+ messages in thread
From: Andreas Oberritter @ 2015-03-05 14:49 UTC (permalink / raw)
  To: Bottazzini, Bruno; +Cc: openembedded-core

On 05.03.2015 15:29, Bottazzini, Bruno wrote:
> I receive the following problem:
> ERROR: Nothing RPROVIDES 'dbus-native-tools-native' (but
> virtual:native:PATH/poky/meta/recipes-core/dbus/dbus_1.8.10.bb RDEPENDS
> on or otherwise requires it
> 
> Any suggestion of how to fix it?

Try setting RRECOMMENDS_${PN}_class-native = "".

I still wonder why "-native" appears twice inside this dependency, but I
fail to spot the cause inside the dbus recipe.

Regards,
Andreas


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

* Re: [PATCH 1/3] dbus: split tools package.
  2015-03-05 14:49             ` Andreas Oberritter
@ 2015-03-05 16:05               ` Bottazzini, Bruno
  0 siblings, 0 replies; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-03-05 16:05 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: openembedded-core

On Qui, 2015-03-05 at 15:49 +0100, Andreas Oberritter wrote:
> On 05.03.2015 15:29, Bottazzini, Bruno wrote:
> > I receive the following problem:
> > ERROR: Nothing RPROVIDES 'dbus-native-tools-native' (but
> > virtual:native:PATH/poky/meta/recipes-core/dbus/dbus_1.8.10.bb RDEPENDS
> > on or otherwise requires it
> > 
> > Any suggestion of how to fix it?
> 
> Try setting RRECOMMENDS_${PN}_class-native = "".

Nice! it worked perfectly and looks better, indeed.
As soon as we review the patch set, I will send a V2 with this
correction.

> 
> I still wonder why "-native" appears twice inside this dependency, but I
> fail to spot the cause inside the dbus recipe.

You are right, it is strange.

> 
> Regards,
> Andreas




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

* Re: [PATCH 3/3] systemd: split modules into packages
  2015-03-05 14:28     ` Anders Darander
@ 2015-03-05 16:14       ` Bottazzini, Bruno
  2015-03-06  8:23         ` Anders Darander
  0 siblings, 1 reply; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-03-05 16:14 UTC (permalink / raw)
  To: Anders Darander; +Cc: openembedded-core

On Qui, 2015-03-05 at 15:28 +0100, Anders Darander wrote:
> * Bruno Bottazzini <bruno.bottazzini@intel.com> [150304 22:28]:
> > if one wants to launch a simple deamon, most modules are not
> > required.
> > He will be able to save space and exclude unwanted packages
> > from the final image.
> > ---
> >  meta/recipes-core/systemd/systemd_219.bb | 1071 ++++++++++++++++++++++++++----
> >  1 file changed, 942 insertions(+), 129 deletions(-)
> 
> > diff --git a/meta/recipes-core/systemd/systemd_219.bb b/meta/recipes-core/systemd/systemd_219.bb
> > index 6a8b5b8..fd6cf57 100644
> > --- a/meta/recipes-core/systemd/systemd_219.bb
> > +++ b/meta/recipes-core/systemd/systemd_219.bb
> > @@ -56,10 +56,31 @@ LDFLAGS_append_libc-uclibc = " -lrt"
> 
> >  GTKDOC_DOCDIR = "${S}/docs/"
> 
> > -PACKAGECONFIG ??= "xz \
> > +DEPENDS += "curl"
> > +
> > +PACKAGECONFIG ??= "acl \
> > +                   blkid \
> > +                   efi \
> > +                   kmod \
> > +                   gcrypt \
> > +                   lz4 \
> > +                   xz \
> > +                   libidn \
> >                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
> >                     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}"
> 
> Just a quick question before I look into the patch in more detail.
> 
> Is the new setting of PACKAGECONFIG consistent with how systemd was
> built previously? I guess it is.

Hi Anders,

it is consistent with how systemd was built previously. If you apply the
patch and bitbake it. Systemd will be built and shipped normally.

But now it will give some options on how to customize it by excluding
packages you don't want to be with systemd.

> 
> Another comment, you should remove the dependcies that gets added using
> PACKAGECONFIG from DEPENDS, e.g. acl etc. (Or are they required
> nevertheless?)

You mean I should do the following ?
- PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
+ PACKAGECONFIG[acl] = "--enable-acl,--disable-acl"

If I get what you said correctly, yes they are required. 

Best Regards,

> 
> Cheers,
> Anders
> 




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

* Re: [PATCH 3/3] systemd: split modules into packages
  2015-03-05 16:14       ` Bottazzini, Bruno
@ 2015-03-06  8:23         ` Anders Darander
  2015-03-06 14:03           ` Bottazzini, Bruno
  0 siblings, 1 reply; 73+ messages in thread
From: Anders Darander @ 2015-03-06  8:23 UTC (permalink / raw)
  To: Bottazzini, Bruno; +Cc: openembedded-core

* Bottazzini, Bruno <bruno.bottazzini@intel.com> [150305 17:15]:

> On Qui, 2015-03-05 at 15:28 +0100, Anders Darander wrote:

> > Just a quick question before I look into the patch in more detail.

> > Is the new setting of PACKAGECONFIG consistent with how systemd was
> > built previously? I guess it is.

> Hi Anders,

> it is consistent with how systemd was built previously. If you apply the
> patch and bitbake it. Systemd will be built and shipped normally.

> But now it will give some options on how to customize it by excluding
> packages you don't want to be with systemd.

Nice, I'm really liking this! That's something I've planned on doing
myself for a while.

> > Another comment, you should remove the dependcies that gets added using
> > PACKAGECONFIG from DEPENDS, e.g. acl etc. (Or are they required
> > nevertheless?)

> You mean I should do the following ?
> - PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
> + PACKAGECONFIG[acl] = "--enable-acl,--disable-acl"

No, I  meant to remove them from the long 
DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux"
line. (Unless I overlooked that part in your patch?)

> If I get what you said correctly, yes they are required. 

What I meant, was thas unless e.g. acl is required even when building
with --disable-acl, it's better to add the acl dependency in the
PACKAGECONFIG like you to. Though, at the same time, remove acl from the
long DEPENDS-line. (As otherwise we'll build acl anyway).

Cheers,
Anders

-- 
Anders Darander
ChargeStorm AB / eStorm AB


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

* Re: [PATCH 3/3] systemd: split modules into packages
  2015-03-06  8:23         ` Anders Darander
@ 2015-03-06 14:03           ` Bottazzini, Bruno
  2015-03-06 22:51             ` Khem Raj
  0 siblings, 1 reply; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-03-06 14:03 UTC (permalink / raw)
  To: Anders Darander; +Cc: openembedded-core

On Sex, 2015-03-06 at 09:23 +0100, Anders Darander wrote:
> * Bottazzini, Bruno <bruno.bottazzini@intel.com> [150305 17:15]:
> 
> > On Qui, 2015-03-05 at 15:28 +0100, Anders Darander wrote:
> 
> > > Just a quick question before I look into the patch in more detail.
> 
> > > Is the new setting of PACKAGECONFIG consistent with how systemd was
> > > built previously? I guess it is.
> 
> > Hi Anders,
> 
> > it is consistent with how systemd was built previously. If you apply the
> > patch and bitbake it. Systemd will be built and shipped normally.
> 
> > But now it will give some options on how to customize it by excluding
> > packages you don't want to be with systemd.
> 
> Nice, I'm really liking this! That's something I've planned on doing
> myself for a while.
> 
> > > Another comment, you should remove the dependcies that gets added using
> > > PACKAGECONFIG from DEPENDS, e.g. acl etc. (Or are they required
> > > nevertheless?)
> 
> > You mean I should do the following ?
> > - PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
> > + PACKAGECONFIG[acl] = "--enable-acl,--disable-acl"
> 
> No, I  meant to remove them from the long 
> DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux"
> line. (Unless I overlooked that part in your patch?)
> 
> > If I get what you said correctly, yes they are required. 
> 
> What I meant, was thas unless e.g. acl is required even when building
> with --disable-acl, it's better to add the acl dependency in the
> PACKAGECONFIG like you to. Though, at the same time, remove acl from the
> long DEPENDS-line. (As otherwise we'll build acl anyway).

Anders,

You are right. 

It is not needed to specify the libs on depends. 

I have removed it and as soon as we review the whole patch I will send a
new version with this corrected

Best Regards,
Bruno Bottazzini
> 
> Cheers,
> Anders
> 




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

* Re: [PATCH 3/3] systemd: split modules into packages
  2015-03-06 14:03           ` Bottazzini, Bruno
@ 2015-03-06 22:51             ` Khem Raj
  2015-03-09 13:37               ` Bottazzini, Bruno
  0 siblings, 1 reply; 73+ messages in thread
From: Khem Raj @ 2015-03-06 22:51 UTC (permalink / raw)
  To: Bottazzini, Bruno
  Cc: Anders Darander, Patches and discussions about the oe-core layer

On Fri, Mar 6, 2015 at 6:03 AM, Bottazzini, Bruno
<bruno.bottazzini@intel.com> wrote:
> On Sex, 2015-03-06 at 09:23 +0100, Anders Darander wrote:
>> * Bottazzini, Bruno <bruno.bottazzini@intel.com> [150305 17:15]:
>>
>> > On Qui, 2015-03-05 at 15:28 +0100, Anders Darander wrote:
>>
>> > > Just a quick question before I look into the patch in more detail.
>>
>> > > Is the new setting of PACKAGECONFIG consistent with how systemd was
>> > > built previously? I guess it is.
>>
>> > Hi Anders,
>>
>> > it is consistent with how systemd was built previously. If you apply the
>> > patch and bitbake it. Systemd will be built and shipped normally.
>>
>> > But now it will give some options on how to customize it by excluding
>> > packages you don't want to be with systemd.
>>
>> Nice, I'm really liking this! That's something I've planned on doing
>> myself for a while.
>>
>> > > Another comment, you should remove the dependcies that gets added using
>> > > PACKAGECONFIG from DEPENDS, e.g. acl etc. (Or are they required
>> > > nevertheless?)
>>
>> > You mean I should do the following ?
>> > - PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
>> > + PACKAGECONFIG[acl] = "--enable-acl,--disable-acl"
>>
>> No, I  meant to remove them from the long
>> DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux"
>> line. (Unless I overlooked that part in your patch?)
>>
>> > If I get what you said correctly, yes they are required.
>>
>> What I meant, was thas unless e.g. acl is required even when building
>> with --disable-acl, it's better to add the acl dependency in the
>> PACKAGECONFIG like you to. Though, at the same time, remove acl from the
>> long DEPENDS-line. (As otherwise we'll build acl anyway).
>
> Anders,
>
> You are right.
>
> It is not needed to specify the libs on depends.
>
> I have removed it and as soon as we review the whole patch I will send a
> new version with this corrected
>

On top of all this 'acl' is a distro feature so that should be
accounted for too.


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

* Re: [PATCH 3/3] systemd: split modules into packages
  2015-03-06 22:51             ` Khem Raj
@ 2015-03-09 13:37               ` Bottazzini, Bruno
  2015-03-09 15:32                 ` Khem Raj
  0 siblings, 1 reply; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-03-09 13:37 UTC (permalink / raw)
  To: Khem Raj; +Cc: Anders Darander, Patches and discussions about the oe-core layer

On Sex, 2015-03-06 at 14:51 -0800, Khem Raj wrote:
> On Fri, Mar 6, 2015 at 6:03 AM, Bottazzini, Bruno
> <bruno.bottazzini@intel.com> wrote:
> > On Sex, 2015-03-06 at 09:23 +0100, Anders Darander wrote:
> >> * Bottazzini, Bruno <bruno.bottazzini@intel.com> [150305 17:15]:
> >>
> >> > On Qui, 2015-03-05 at 15:28 +0100, Anders Darander wrote:
> >>
> >> > > Just a quick question before I look into the patch in more detail.
> >>
> >> > > Is the new setting of PACKAGECONFIG consistent with how systemd was
> >> > > built previously? I guess it is.
> >>
> >> > Hi Anders,
> >>
> >> > it is consistent with how systemd was built previously. If you apply the
> >> > patch and bitbake it. Systemd will be built and shipped normally.
> >>
> >> > But now it will give some options on how to customize it by excluding
> >> > packages you don't want to be with systemd.
> >>
> >> Nice, I'm really liking this! That's something I've planned on doing
> >> myself for a while.
> >>
> >> > > Another comment, you should remove the dependcies that gets added using
> >> > > PACKAGECONFIG from DEPENDS, e.g. acl etc. (Or are they required
> >> > > nevertheless?)
> >>
> >> > You mean I should do the following ?
> >> > - PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
> >> > + PACKAGECONFIG[acl] = "--enable-acl,--disable-acl"
> >>
> >> No, I  meant to remove them from the long
> >> DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux"
> >> line. (Unless I overlooked that part in your patch?)
> >>
> >> > If I get what you said correctly, yes they are required.
> >>
> >> What I meant, was thas unless e.g. acl is required even when building
> >> with --disable-acl, it's better to add the acl dependency in the
> >> PACKAGECONFIG like you to. Though, at the same time, remove acl from the
> >> long DEPENDS-line. (As otherwise we'll build acl anyway).
> >
> > Anders,
> >
> > You are right.
> >
> > It is not needed to specify the libs on depends.
> >
> > I have removed it and as soon as we review the whole patch I will send a
> > new version with this corrected
> >
> 
> On top of all this 'acl' is a distro feature so that should be
> accounted for too.

Hello Khem,

It will be accounted when acl flag is enabled on systemd.

Best Regards,







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

* Re: [PATCH 3/3] systemd: split modules into packages
  2015-03-09 13:37               ` Bottazzini, Bruno
@ 2015-03-09 15:32                 ` Khem Raj
  2015-03-09 16:08                   ` Bottazzini, Bruno
  0 siblings, 1 reply; 73+ messages in thread
From: Khem Raj @ 2015-03-09 15:32 UTC (permalink / raw)
  To: Bottazzini, Bruno
  Cc: Anders Darander, Patches and discussions about the oe-core layer


> On Mar 9, 2015, at 6:37 AM, Bottazzini, Bruno <bruno.bottazzini@intel.com> wrote:
> 
> On Sex, 2015-03-06 at 14:51 -0800, Khem Raj wrote:
>> On Fri, Mar 6, 2015 at 6:03 AM, Bottazzini, Bruno
>> <bruno.bottazzini@intel.com> wrote:
>>> On Sex, 2015-03-06 at 09:23 +0100, Anders Darander wrote:
>>>> * Bottazzini, Bruno <bruno.bottazzini@intel.com> [150305 17:15]:
>>>> 
>>>>> On Qui, 2015-03-05 at 15:28 +0100, Anders Darander wrote:
>>>> 
>>>>>> Just a quick question before I look into the patch in more detail.
>>>> 
>>>>>> Is the new setting of PACKAGECONFIG consistent with how systemd was
>>>>>> built previously? I guess it is.
>>>> 
>>>>> Hi Anders,
>>>> 
>>>>> it is consistent with how systemd was built previously. If you apply the
>>>>> patch and bitbake it. Systemd will be built and shipped normally.
>>>> 
>>>>> But now it will give some options on how to customize it by excluding
>>>>> packages you don't want to be with systemd.
>>>> 
>>>> Nice, I'm really liking this! That's something I've planned on doing
>>>> myself for a while.
>>>> 
>>>>>> Another comment, you should remove the dependcies that gets added using
>>>>>> PACKAGECONFIG from DEPENDS, e.g. acl etc. (Or are they required
>>>>>> nevertheless?)
>>>> 
>>>>> You mean I should do the following ?
>>>>> - PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
>>>>> + PACKAGECONFIG[acl] = "--enable-acl,--disable-acl"
>>>> 
>>>> No, I  meant to remove them from the long
>>>> DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux"
>>>> line. (Unless I overlooked that part in your patch?)
>>>> 
>>>>> If I get what you said correctly, yes they are required.
>>>> 
>>>> What I meant, was thas unless e.g. acl is required even when building
>>>> with --disable-acl, it's better to add the acl dependency in the
>>>> PACKAGECONFIG like you to. Though, at the same time, remove acl from the
>>>> long DEPENDS-line. (As otherwise we'll build acl anyway).
>>> 
>>> Anders,
>>> 
>>> You are right.
>>> 
>>> It is not needed to specify the libs on depends.
>>> 
>>> I have removed it and as soon as we review the whole patch I will send a
>>> new version with this corrected
>>> 
>> 
>> On top of all this 'acl' is a distro feature so that should be
>> accounted for too.
> 
> Hello Khem,
> 
> It will be accounted when acl flag is enabled on systemd.
> 


I am saying enabling this packagconfig should depend upon distro features something like
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', ‘acl', ‘acl', '', d)}

> Best Regards,
> 
> 
> 
> 
> 



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

* Re: [PATCH 3/3] systemd: split modules into packages
  2015-03-09 15:32                 ` Khem Raj
@ 2015-03-09 16:08                   ` Bottazzini, Bruno
  0 siblings, 0 replies; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-03-09 16:08 UTC (permalink / raw)
  To: Khem Raj; +Cc: Anders Darander, Patches and discussions about the oe-core layer

On Seg, 2015-03-09 at 08:32 -0700, Khem Raj wrote:
> > On Mar 9, 2015, at 6:37 AM, Bottazzini, Bruno <bruno.bottazzini@intel.com> wrote:
> > 
> > On Sex, 2015-03-06 at 14:51 -0800, Khem Raj wrote:
> >> On Fri, Mar 6, 2015 at 6:03 AM, Bottazzini, Bruno
> >> <bruno.bottazzini@intel.com> wrote:
> >>> On Sex, 2015-03-06 at 09:23 +0100, Anders Darander wrote:
> >>>> * Bottazzini, Bruno <bruno.bottazzini@intel.com> [150305 17:15]:
> >>>> 
> >>>>> On Qui, 2015-03-05 at 15:28 +0100, Anders Darander wrote:
> >>>> 
> >>>>>> Just a quick question before I look into the patch in more detail.
> >>>> 
> >>>>>> Is the new setting of PACKAGECONFIG consistent with how systemd was
> >>>>>> built previously? I guess it is.
> >>>> 
> >>>>> Hi Anders,
> >>>> 
> >>>>> it is consistent with how systemd was built previously. If you apply the
> >>>>> patch and bitbake it. Systemd will be built and shipped normally.
> >>>> 
> >>>>> But now it will give some options on how to customize it by excluding
> >>>>> packages you don't want to be with systemd.
> >>>> 
> >>>> Nice, I'm really liking this! That's something I've planned on doing
> >>>> myself for a while.
> >>>> 
> >>>>>> Another comment, you should remove the dependcies that gets added using
> >>>>>> PACKAGECONFIG from DEPENDS, e.g. acl etc. (Or are they required
> >>>>>> nevertheless?)
> >>>> 
> >>>>> You mean I should do the following ?
> >>>>> - PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
> >>>>> + PACKAGECONFIG[acl] = "--enable-acl,--disable-acl"
> >>>> 
> >>>> No, I  meant to remove them from the long
> >>>> DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux"
> >>>> line. (Unless I overlooked that part in your patch?)
> >>>> 
> >>>>> If I get what you said correctly, yes they are required.
> >>>> 
> >>>> What I meant, was thas unless e.g. acl is required even when building
> >>>> with --disable-acl, it's better to add the acl dependency in the
> >>>> PACKAGECONFIG like you to. Though, at the same time, remove acl from the
> >>>> long DEPENDS-line. (As otherwise we'll build acl anyway).
> >>> 
> >>> Anders,
> >>> 
> >>> You are right.
> >>> 
> >>> It is not needed to specify the libs on depends.
> >>> 
> >>> I have removed it and as soon as we review the whole patch I will send a
> >>> new version with this corrected
> >>> 
> >> 
> >> On top of all this 'acl' is a distro feature so that should be
> >> accounted for too.
> > 
> > Hello Khem,
> > 
> > It will be accounted when acl flag is enabled on systemd.
> > 
> 
> 
> I am saying enabling this packagconfig should depend upon distro features something like
> PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', ‘acl', ‘acl', '', d)}

Alright, I got what you said and it looks good to me.

Next version will have it.

> 
> > Best Regards,
> > 
> > 
> > 
> > 
> > 
> 




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

* [PATCH v3 0/4] systemd and dbus split into packages
@ 2015-03-25 21:49 ` Bruno Bottazzini
  2015-03-25 21:49   ` [PATCH 1/4] dbus: split tools package Bruno Bottazzini
                     ` (3 more replies)
  0 siblings, 4 replies; 73+ messages in thread
From: Bruno Bottazzini @ 2015-03-25 21:49 UTC (permalink / raw)
  To: openembedded-core

Differences from v2:
- Rebasing patch with version with 1.8 ( Head of the branch) as
  Khem Raj suggested 

Differences from v1:

dbus: Adding change that Andreas Oberritter recommended.
-Setting RRECOMMENDS_${PN}_class-native instead RPROVIDES 
 dbus-native-tools-native.

systemd: Adding change that Anders Darander and Khem Raj recommended
-Modifying PACKAGECONFIG as requested to use it with bbutils.

systemd: Adding change that Khem Raj requested:
-Porting patches that was used on the release of the 219 stable version
 instead of changing the repository.


-------------------------------------------------------------------------------
In this patchset we include the following:

1- dbus: split tools package
   Most tools are not required if one is launching a simple daemon.
   So, we split it into two packages dbus and dbus-tools which the user
   will be able to exclude it from the image if he wants to.

2- systemd: verify if files test-udev and systemd-journal-flush exists
   If the user put --disable-tests on EXTRA_OECONF for systemd, some files will
   not be created and systemd do_install phase
   will fail.
   This patch will give this flexibility for the user

3- systemd: split modules into packages
   Since systemd repo grows with more and more tools, the recipe will provide
   a customizable layer and he will be able to choose what he wants to ship
   to the final image.
   He will be able to save space and exclude unwanted packages from the
   final image.

4- systemd: add patches from systemd 219 - stable
   Adding patches that fix bugs for 219 version.
   This will get the same consistency of the stable systemd 219 version.

Bruno Bottazzini (3):
  systemd: verify if files test-udev and systemd-journal-flush exists
  systemd: split modules into packages
  systemd: v219 with stable fixes

Gustavo Sverzut Barbieri (1):
  dbus: split tools package.

 meta/recipes-core/dbus/dbus.inc                    |    9 +-
 ...remote-fix-certificate-status-memory-leak.patch |   31 +
 ...ournal-remote-fix-client_cert-memory-leak.patch |   35 +
 ...0003-tmpfiles-Fix-parse_acl-error-message.patch |   28 +
 ...-test-utf8-fix-utf16-tests-on-BE-machines.patch |   26 +
 ...iles-avoid-creating-duplicate-acl-entries.patch |  131 +++
 .../0006-shared-time-util-fix-gcc5-warning.patch   |   32 +
 ...time-test-infinity-parsing-in-nanoseconds.patch |   36 +
 .../0008-bootchart-fix-default-init-path.patch     |   44 +
 ...emctl-bump-NOFILE-only-for-systemctl_main.patch |   44 +
 ...0-Make-root-s-home-directory-configurable.patch |   89 +-
 ...-util-avoid-freeing-uninitialized-pointer.patch |   37 +
 ...11-bootchart-svg-fix-checking-of-list-end.patch |   28 +
 ...md-add-getrandom-syscall-numbers-for-MIPS.patch |   38 +
 ...aker-dependencies-between-mount-and-devic.patch |   33 +
 ...topping-due-to-BindsTo-log-which-unit-cau.patch |   43 +
 ...grade-message-about-sysctl-overrides-to-d.patch |   30 +
 ...l-add-some-hints-how-to-override-settings.patch |   39 +
 .../0017-core-rework-device-state-logic.patch      |  912 ++++++++++++++++
 .../0018-core-fix-return-value-on-OOM.patch        |   26 +
 ...e-x-machine-unix-prefix-for-the-container.patch |   33 +
 ...0-shared-AFS-is-also-a-network-filesystem.patch |   25 +
 ...downgrade-unit-type-not-supported-message.patch |   31 +
 ...ournal-remote-fix-saving-of-binary-fields.patch |   97 ++
 ...ix-Inappropriate-ioctl-for-device-on-ext4.patch |   37 +
 ...eplace-VLA-with-alloca-to-make-llvm-happy.patch |   53 +
 ...ietly-ignore-ACLs-on-unsupported-filesyst.patch |   84 ++
 ...-assume-ac-when-sys-class-power_supply-is.patch |   30 +
 meta/recipes-core/systemd/systemd_219.bb           | 1112 +++++++++++++++++---
 meta/recipes-core/util-linux/util-linux.inc        |    2 +-
 30 files changed, 3006 insertions(+), 189 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-journal-remote-fix-certificate-status-memory-leak.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0002-journal-remote-fix-client_cert-memory-leak.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0003-tmpfiles-Fix-parse_acl-error-message.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0004-test-utf8-fix-utf16-tests-on-BE-machines.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0005-tmpfiles-avoid-creating-duplicate-acl-entries.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0006-shared-time-util-fix-gcc5-warning.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0007-test-time-test-infinity-parsing-in-nanoseconds.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0008-bootchart-fix-default-init-path.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0009-systemctl-bump-NOFILE-only-for-systemctl_main.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0010-acl-util-avoid-freeing-uninitialized-pointer.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0011-bootchart-svg-fix-checking-of-list-end.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0012-systemd-add-getrandom-syscall-numbers-for-MIPS.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0013-unit-use-weaker-dependencies-between-mount-and-devic.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0014-unit-When-stopping-due-to-BindsTo-log-which-unit-cau.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0015-sysctl-downgrade-message-about-sysctl-overrides-to-d.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0016-sysctl-add-some-hints-how-to-override-settings.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0017-core-rework-device-state-logic.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0018-core-fix-return-value-on-OOM.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0019-machined-use-x-machine-unix-prefix-for-the-container.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0020-shared-AFS-is-also-a-network-filesystem.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0021-core-downgrade-unit-type-not-supported-message.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0022-journal-remote-fix-saving-of-binary-fields.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0023-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0024-sd-daemon-replace-VLA-with-alloca-to-make-llvm-happy.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0025-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0026-shared-util-assume-ac-when-sys-class-power_supply-is.patch

-- 
1.9.1



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

* [PATCH 1/4] dbus: split tools package.
  2015-03-25 21:49 ` [PATCH v3 0/4] systemd and dbus split " Bruno Bottazzini
@ 2015-03-25 21:49   ` Bruno Bottazzini
  2015-03-25 21:49   ` [PATCH 2/4] systemd: verify if files test-udev and systemd-journal-flush exists Bruno Bottazzini
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 73+ messages in thread
From: Bruno Bottazzini @ 2015-03-25 21:49 UTC (permalink / raw)
  To: openembedded-core

From: Gustavo Sverzut Barbieri <gustavo.barbieri@intel.com>

Most tools are not required if one is launching a simple daemon.
The user will be able to exclude dbus-tool and save some space in his
build

Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com>
---
 meta/recipes-core/dbus/dbus.inc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index fb5d017..58dd728 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -39,7 +39,7 @@ CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
 
 DEBIANNAME_${PN} = "dbus-1"
 
-PACKAGES =+ "${PN}-lib"
+PACKAGES =+ "${PN}-lib ${PN}-tools"
 
 OLDPKGNAME = "dbus-x11"
 OLDPKGNAME_class-nativesdk = ""
@@ -47,6 +47,7 @@ OLDPKGNAME_class-nativesdk = ""
 # for compatibility
 RPROVIDES_${PN} = "${OLDPKGNAME}"
 RREPLACES_${PN} += "${OLDPKGNAME}"
+RRECOMMENDS_${PN}_class-native = ""
 
 FILES_${PN} = "${bindir}/dbus-daemon* \
                ${bindir}/dbus-uuidgen \
@@ -64,6 +65,12 @@ FILES_${PN} = "${bindir}/dbus-daemon* \
 FILES_${PN}-lib = "${libdir}/lib*.so.*"
 RRECOMMENDS_${PN}-lib = "${PN}"
 FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
+FILES_${PN}-tools += "${bindir}/dbus-uuidgen \
+                      ${bindir}/dbus-cleanup-sockets \
+                      ${bindir}/dbus-monitor \
+                      ${bindir}/dbus-launch \
+                      ${bindir}/dbus-run-session"
+RRECOMMENDS_${PN} = "${PN}-tools"
 
 pkg_postinst_dbus() {
 	# If both systemd and sysvinit are enabled, mask the dbus-1 init script
-- 
1.9.1



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

* [PATCH 2/4] systemd: verify if files test-udev and systemd-journal-flush exists
  2015-03-25 21:49 ` [PATCH v3 0/4] systemd and dbus split " Bruno Bottazzini
  2015-03-25 21:49   ` [PATCH 1/4] dbus: split tools package Bruno Bottazzini
@ 2015-03-25 21:49   ` Bruno Bottazzini
  2015-03-25 21:49   ` [PATCH 3/4] systemd: split modules into packages Bruno Bottazzini
  2015-03-25 21:49   ` [PATCH 4/4] systemd: v219 with stable fixes Bruno Bottazzini
  3 siblings, 0 replies; 73+ messages in thread
From: Bruno Bottazzini @ 2015-03-25 21:49 UTC (permalink / raw)
  To: openembedded-core

If we compile using EXTRA_OECONF with '--disable-tests' option, the files
test-udev and systemd-journal-flush will not be created and the systemd
install phase will fail.
---
 meta/recipes-core/systemd/systemd_219.bb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_219.bb b/meta/recipes-core/systemd/systemd_219.bb
index 43c4f95..e2ea81e 100644
--- a/meta/recipes-core/systemd/systemd_219.bb
+++ b/meta/recipes-core/systemd/systemd_219.bb
@@ -180,7 +180,9 @@ do_install() {
 	sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
 	# its needed in 216 upstream has fixed it with 919699ec301ea507edce4a619141ed22e789ac0d
 	# don't order journal flushing afte remote-fs.target
-	sed -i -e 's/ remote-fs.target$//' ${D}${systemd_unitdir}/system/systemd-journal-flush.service
+       if [ -s ${D}${systemd_unitdir}/system/systemd-journal-flush.service ]; then
+            sed -i -e 's/ remote-fs.target$//' ${D}${systemd_unitdir}/system/systemd-journal-flush.service
+       fi
 	# this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
 	# for existence else it fails
 	if [ -s ${D}${libdir}/tmpfiles.d/systemd.conf ]; then
@@ -191,7 +193,9 @@ do_install() {
 do_install_ptest () {
        install -d ${D}${PTEST_PATH}/test
        cp -rf ${S}/test/* ${D}${PTEST_PATH}/test
-       install -m 0755  ${B}/test-udev ${D}${PTEST_PATH}/
+       if [ -s ${B}/test-udev ]; then
+         install -m 0755  ${B}/test-udev ${D}${PTEST_PATH}/
+       fi
        install -d ${D}${PTEST_PATH}/build-aux
        cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
        cp -rf ${B}/rules ${D}${PTEST_PATH}/
-- 
1.9.1



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

* [PATCH 3/4] systemd: split modules into packages
  2015-03-25 21:49 ` [PATCH v3 0/4] systemd and dbus split " Bruno Bottazzini
  2015-03-25 21:49   ` [PATCH 1/4] dbus: split tools package Bruno Bottazzini
  2015-03-25 21:49   ` [PATCH 2/4] systemd: verify if files test-udev and systemd-journal-flush exists Bruno Bottazzini
@ 2015-03-25 21:49   ` Bruno Bottazzini
  2015-03-26  8:29     ` Anders Darander
  2015-03-26  8:52     ` Andreas Oberritter
  2015-03-25 21:49   ` [PATCH 4/4] systemd: v219 with stable fixes Bruno Bottazzini
  3 siblings, 2 replies; 73+ messages in thread
From: Bruno Bottazzini @ 2015-03-25 21:49 UTC (permalink / raw)
  To: openembedded-core

if one wants to launch a simple deamon, most modules are not
required.
He will be able to save space and exclude unwanted packages
from the final image.
---
 meta/recipes-core/systemd/systemd_219.bb | 1073 ++++++++++++++++++++++++++----
 1 file changed, 943 insertions(+), 130 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_219.bb b/meta/recipes-core/systemd/systemd_219.bb
index e2ea81e..9bb104f 100644
--- a/meta/recipes-core/systemd/systemd_219.bb
+++ b/meta/recipes-core/systemd/systemd_219.bb
@@ -19,7 +19,7 @@ PROVIDES = "udev"
 
 PE = "1"
 
-DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux"
+DEPENDS = "intltool-native gperf-native readline libcap libcgroup qemu-native"
 
 SECTION = "base/shell"
 
@@ -62,23 +62,45 @@ LDFLAGS_append_libc-uclibc = " -lrt"
 
 GTKDOC_DOCDIR = "${S}/docs/"
 
-PACKAGECONFIG ??= "xz ldconfig \
+PACKAGECONFIG ??= " \
+                   gcrypt \
+                   kmod \
+                   ldconfig \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'blkid', 'blkid', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'efi', 'efi', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'lz4', 'lz4', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'xz', 'xz', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'libidn', 'libidn', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}"
 
+PACKAGECONFIG[glib] = "--enable-gudev,--disable-gudev,glib-2.0"
+PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
+PACKAGECONFIG[blkid] = "--enable-blkid,--disable-blkid,util-linux"
+PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
+PACKAGECONFIG[kmod] = "--enable-kmod,--disable-kmod,kmod"
+PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,,polkit"
+PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
+PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
+PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
+PACKAGECONFIG[apparmor] = "--enable-apparmor,--disable-apparmor,libapparmor"
+PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
+PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
 PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
 # Sign the journal for anti-tampering
 PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
 # regardless of PACKAGECONFIG, libgcrypt is always required to expand
 # the AM_PATH_LIBGCRYPT autoconf macro
-DEPENDS += "libgcrypt"
 # Compress the journal
+PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
 PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
+PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,libqrencode"
+PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
 PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
 PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd"
 PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
 PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
-PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
 PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
 PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
 PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
@@ -101,17 +123,36 @@ rootprefix ?= "${base_prefix}"
 rootlibdir ?= "${base_libdir}"
 rootlibexecdir = "${rootprefix}/lib"
 
-# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
 EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
                  --with-rootlibdir=${rootlibdir} \
                  --with-roothomedir=${ROOT_HOME} \
-                 --disable-coredump \
+                 --enable-coredump \
+                 --disable-introspection \
+                 --disable-kdbus \
+                 --disable-manpages \
                  --disable-introspection \
                  --disable-kdbus \
                  --enable-split-usr \
                  --without-python \
                  --with-sysvrcnd-path=${sysconfdir} \
                  --with-firmware-path=/lib/firmware \
+                 --enable-libcurl \
+                 --enable-ldconfig \
+                 --enable-backlight \
+                 --enable-binfmt \
+                 --enable-bootchart \
+                 --enable-firstboot \
+                 --enable-hostnamed \
+                 --enable-localed \
+                 --enable-logind \
+                 --enable-machined \
+                 --enable-networkd \
+                 --enable-quotacheck \
+                 --enable-randomseed \
+                 --enable-resolved \
+                 --enable-rfkill \
+                 --enable-sysusers \
+                 --enable-vconsole \
                "
 # uclibc does not have NSS
 EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
@@ -210,158 +251,747 @@ do_install_ptest () {
 
 python populate_packages_prepend (){
     systemdlibdir = d.getVar("rootlibdir", True)
-    do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
+    do_split_packages(d, systemdlibdir, '^lib(udev|gudev|systemd|nss)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
 }
-PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
+PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd|nss).*"
+
+########################################################################
+# Base Packages
+########################################################################
+
+PACKAGES =+ "${PN}-generators-filesystems"
+SUMMARY_${PN}-generators-filesystems = "systemd's generator for filesystem services based on fstab and GPT"
+RDEPENDS_${PN}-generators-filesystems = "${PN}-services-fsck"
+FILES_${PN}-generators-filesystems = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-fstab-generator \
+        ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
+        ${rootlibexecdir}/systemd/systemd-remount-fs \
+        ${systemd_unitdir}/system/local-fs.target.wants/systemd-remount-fs.service \
+        ${systemd_unitdir}/system/systemd-remount-fs.service \
+"
 
-PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \
-             ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh libgudev"
+PACKAGES =+ "${PN}-generators-getty"
+SUMMARY_${PN}-generators-getty = "systemd's generator TTY services"
+RDEPENDS_${PN}-generators-getty = "${PN}-services-getty"
+FILES_${PN}-generators-getty = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-getty-generator \
+"
 
-SYSTEMD_PACKAGES = "${PN}-binfmt"
-SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
+PACKAGES =+ "${PN}-tools"
+SUMMARY_${PN}-tools = "systemd command line tools (cgls, delta, run, analyze...)"
+RRECOMMENDS_${PN}-tools = "${PN}-services-base"
+FILES_${PN}-tools = "\
+        ${base_bindir}/systemd-machine-id-setup \
+        ${bindir}/busctl \
+        ${bindir}/coredumpctl \
+        ${bindir}/systemd-analyze \
+        ${bindir}/systemd-cat \
+        ${bindir}/systemd-cgls \
+        ${bindir}/systemd-cgtop \
+        ${bindir}/systemd-delta \
+        ${bindir}/systemd-detect-virt \
+        ${bindir}/systemd-path \
+        ${bindir}/systemd-run \
+        ${rootlibexecdir}/systemd/systemd-ac-power \
+        ${rootlibexecdir}/systemd/systemd-activate \
+        ${rootlibexecdir}/systemd/systemd-reply-password \
+        ${rootprefix}/bin/systemd-escape \
+        ${rootprefix}/bin/systemd-notify \
+"
 
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} += "--system systemd-journal-gateway; --system systemd-timesync"
-GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
+########################################################################
+# Services Packages
+########################################################################
+
+PACKAGES =+ "${PN}-services-ask-password"
+SUMMARY_${PN}-services-ask-password = "systemd's service and tool to query the user for a system password"
+RRECOMMENDS_${PN}-services-ask-password = "${PN}-services-base"
+FILES_${PN}-services-ask-password = "\
+        ${rootprefix}/bin/systemd-ask-password \
+        ${rootprefix}/bin/systemd-tty-ask-password-agent \
+        ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
+        ${systemd_unitdir}/system/systemd-ask-password-console.path \
+        ${systemd_unitdir}/system/systemd-ask-password-console.service \
+        ${systemd_unitdir}/system/systemd-ask-password-wall.path \
+        ${systemd_unitdir}/system/systemd-ask-password-wall.service \
+"
 
-FILES_${PN}-analyze = "${bindir}/systemd-analyze"
+PACKAGES =+ "${PN}-services-backlight"
+SUMMARY_${PN}-services-backlight = "systemd's backlight state save/restore service"
+FILES_${PN}-services-backlight = "\
+        ${systemd_unitdir}/system/systemd-backlight@.service \
+        ${rootlibexecdir}/systemd/systemd-backlight \
+"
 
-FILES_${PN}-initramfs = "/init"
-RDEPENDS_${PN}-initramfs = "${PN}"
+PACKAGES =+ "${PN}-services-binfmt"
+SUMMARY_${PN}-services-binfmt = "systemd's service to configure additional binary formats for executables"
+RRECOMMENDS_${PN}-services-binfmt = "kernel-module-binfmt-misc"
+FILES_${PN}-services-binfmt = "\
+        ${sysconfdir}/binfmt.d/ \
+        ${exec_prefix}/lib/binfmt.d/ \
+        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.automount \
+        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.mount \
+        ${systemd_unitdir}/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount \
+        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-binfmt.service \
+        ${systemd_unitdir}/system/systemd-binfmt.service \
+        ${rootlibexecdir}/systemd/systemd-binfmt \
+"
+
+PACKAGES =+ "${PN}-services-bootchart"
+SUMMARY_${PN}-services-bootchart = "systemd's boot performance service and graphing tool"
+CONFFILES_${PN}-services-bootchart = "${sysconfdir}/systemd/bootchart.conf"
+FILES_${PN}-services-bootchart = "\
+        ${sysconfdir}/systemd/bootchart.conf \
+        ${rootlibexecdir}/systemd/systemd-bootchart \
+"
 
-FILES_libgudev = "${libdir}/libgudev*${SOLIBS}"
+PACKAGES =+ "${PN}-services-coredump"
+SUMMARY_${PN}-services-coredump = "systemd's coredump log hook and service"
+RDEPENDS_${PN}-services-coredump = "${PN}-services-sysctl"
+CONFFILES_${PN}-services-coredump = "${sysconfdir}/systemd/coredump.conf"
+FILES_${PN}-services-coredump = "\
+        ${exec_prefix}/lib/sysctl.d/50-coredump.conf \
+        ${sysconfdir}/systemd/coredump.conf \
+        ${rootlibexecdir}/systemd/systemd-coredump \
+"
 
-RDEPENDS_${PN}-ptest += "perl python bash"
-FILES_${PN}-ptest += "${libdir}/udev/rules.d"
+PACKAGES =+ "${PN}-services-cryptsetup"
+SUMMARY_${PN}-services-cryptsetup = "systemd's disk decryption service"
+ALLOW_EMPTY_${PN}-services-cryptsetup = "1"
+FILES_${PN}-services-cryptsetup = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-cryptsetup-generator \
+        ${systemd_unitdir}/system/cryptsetup-pre.target \
+        ${systemd_unitdir}/system/cryptsetup.target \
+        ${systemd_unitdir}/system/sysinit.target.wants/cryptsetup.target \
+        ${rootlibexecdir}/systemd/systemd-cryptsetup \
+"
+
+PACKAGES =+ "${PN}-services-dbus"
+SUMMARY_${PN}-services-dbus = "systemd's DBus daemon system service"
+# NOTE: dbus dependency will go away when kdbus is in use
+RDEPENDS_${PN}-services-dbus = "dbus"
+FILES_${PN}-services-dbus = "\
+        ${datadir}/dbus-1/services/org.freedesktop.systemd1.service \
+        ${datadir}/dbus-1/system-services/org.freedesktop.systemd1.service \
+        ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
+        ${systemd_unitdir}/system/sockets.target.wants/dbus.socket \
+        ${systemd_unitdir}/system/dbus.target.wants/dbus.socket \
+        ${systemd_unitdir}/system/multi-user.target.wants/dbus.service \
+        ${systemd_unitdir}/system/dbus.socket \
+        ${systemd_unitdir}/system/dbus.service \
+"
+
+PACKAGES =+ "${PN}-services-debug"
+SUMMARY_${PN}-services-debug = "systemd's debug service"
+RRECOMMENDS_${PN}-services-debug = "${PN}-services-base ${PN}-tools"
+FILES_${PN}-services-debug = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-debug-generator \
+        ${systemd_unitdir}/system/debug-shell.service \
+        ${systemd_unitdir}/system/sys-kernel-config.mount \
+        ${systemd_unitdir}/system/sys-kernel-debug.mount \
+        ${systemd_unitdir}/system/sysinit.target.wants/sys-kernel-config.mount \
+        ${systemd_unitdir}/system/sysinit.target.wants/sys-kernel-debug.mount \
+"
+
+PACKAGES =+ "${PN}-services-firstboot"
+SUMMARY_${PN}-services-firstboot = "systemd's service to initialize basic system settings"
+FILES_${PN}-services-firstboot = "\
+        ${base_bindir}/systemd-firstboot \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-firstboot.service \
+        ${systemd_unitdir}/system/systemd-firstboot.service \
+"
+
+PACKAGES =+ "${PN}-services-fsck"
+SUMMARY_${PN}-services-fsck = "systemd's filesystem check service"
+RRECOMMENDS_${PN}-services-fsck = "util-linux-fsck e2fsprogs-e2fsck"
+FILES_${PN}-services-fsck = "\
+        ${systemd_unitdir}/system/systemd-fsck-root.service \
+        ${systemd_unitdir}/system/systemd-fsck@.service \
+        ${rootlibexecdir}/systemd/systemd-fsck \
+"
+
+PACKAGES =+ "${PN}-services-fuse"
+SUMMARY_${PN}-services-fuse = "systemd's FUSE (filesystem in userspace) service"
+FILES_${PN}-services-fuse = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/sys-fs-fuse-connections.mount \
+        ${systemd_unitdir}/system/sys-fs-fuse-connections.mount \
+"
+
+PACKAGES =+ "${PN}-services-getty"
+SUMMARY_${PN}-services-getty = "systemd's getty service"
+RRECOMMENDS_${PN}-services-getty = "util-linux-agetty ${PN}-generators-getty"
+FILES_${PN}-services-getty = "\
+        ${systemd_unitdir}/system/autovt@.service \
+        ${systemd_unitdir}/system/console-getty.service \
+        ${systemd_unitdir}/system/container-getty@.service \
+        ${systemd_unitdir}/system/getty@.service \
+        ${systemd_unitdir}/system/serial-getty@.service \
+        ${sysconfdir}/systemd/system/getty.target.wants/ \
+"
+
+PACKAGES =+ "${PN}-services-hostnamed"
+SUMMARY_${PN}-services-hostnamed = "systemd's hostname management service"
+RDEPENDS_${PN}-services-hostnamed = "${PN}-services-dbus"
+CONFFILES_${PN}-services-hostnamed = "${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf"
+FILES_${PN}-services-hostnamed = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
+        ${bindir}/hostnamectl \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.hostname1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.hostname1.service \
+        ${systemd_unitdir}/system/org.freedesktop.hostname1.busname \
+        ${systemd_unitdir}/system/systemd-hostnamed.service \
+        ${rootlibexecdir}/systemd/systemd-hostnamed \
+        ${datadir}/dbus-1/system-services/org.freedesktop.hostname1.service \
+        ${datadir}/polkit-1/actions/org.freedesktop.hostname1.policy \
+"
+
+PACKAGES =+ "${PN}-services-journal"
+SUMMARY_${PN}-services-journal = "systemd's journal (logging) service"
+CONFFILES_${PN}-services-journal = "${sysconfdir}/systemd/journald.conf"
+FILES_${PN}-services-journal = "\
+        ${base_bindir}/journalctl \
+        ${rootlibexecdir}/systemd/systemd-journald \
+        ${sysconfdir}/systemd/journald.conf \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-journald-dev-log.socket \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-journald.socket \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journal-catalog-update.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journal-flush.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journald.service \
+        ${systemd_unitdir}/system/systemd-journal-catalog-update.service \
+        ${systemd_unitdir}/system/systemd-journal-flush.service \
+        ${systemd_unitdir}/system/systemd-journald-dev-log.socket \
+        ${systemd_unitdir}/system/systemd-journald.service \
+        ${systemd_unitdir}/system/systemd-journald.socket \
+        ${exec_prefix}/lib/systemd/catalog/ \
+"
+
+PACKAGES =+ "${PN}-services-ldconfig"
+SUMMARY_${PN}-services-ldconfig = "systemd's service to run ldconfig after updates"
+FILES_${PN}-services-ldconfig = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/ldconfig.service \
+        ${systemd_unitdir}/system/ldconfig.service \
+"
+
+PACKAGES =+ "${PN}-services-localed"
+SUMMARY_${PN}-services-localed = "systemd's locale management service"
+RDEPENDS_${PN}-services-localed = "${PN}-services-dbus"
+CONFFILES_${PN}-services-localed = "${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf"
+FILES_${PN}-services-localed = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf \
+        ${bindir}/localectl \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.locale1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.locale1.service \
+        ${systemd_unitdir}/system/org.freedesktop.locale1.busname \
+        ${systemd_unitdir}/system/systemd-localed.service \
+        ${rootlibexecdir}/systemd/systemd-localed \
+        ${datadir}/dbus-1/system-services/org.freedesktop.locale1.service \
+        ${datadir}/polkit-1/actions/org.freedesktop.locale1.policy \
+        ${datadir}/systemd/kbd-model-map \
+"
+
+PACKAGES =+ "${PN}-services-logind"
+SUMMARY_${PN}-services-logind = "systemd's login management service"
+RDEPENDS_${PN}-services-logind = "${PN}-services-dbus ${PN}-services-tmpfiles"
+RRECOMMENDS_${PN}-services-logind = "udev"
+CONFFILES_${PN}-services-logind = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf \
+        ${sysconfdir}/systemd/logind.conf \
+"
+FILES_${PN}-services-logind = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf \
+        ${sysconfdir}/systemd/logind.conf \
+        ${base_bindir}/loginctl \
+        ${base_bindir}/systemd-inhibit \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.login1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.login1.service \
+        ${systemd_unitdir}/system/multi-user.target.wants/systemd-logind.service \
+        ${systemd_unitdir}/system/multi-user.target.wants/systemd-user-sessions.service \
+        ${systemd_unitdir}/system/org.freedesktop.login1.busname \
+        ${systemd_unitdir}/system/systemd-logind.service \
+        ${systemd_unitdir}/system/systemd-user-sessions.service \
+        ${systemd_unitdir}/system/user@.service \
+        ${rootlibexecdir}/systemd/systemd-logind \
+        ${rootlibexecdir}/systemd/systemd-user-sessions \
+        ${datadir}/dbus-1/system-services/org.freedesktop.login1.service \
+        ${datadir}/polkit-1/actions/org.freedesktop.login1.policy \
+        ${rootlibexecdir}/udev/rules.d/70-uaccess.rules \
+        ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
+        ${rootlibexecdir}/udev/rules.d/71-seat.rules \
+        ${rootlibexecdir}/udev/rules.d/73-seat-late.rules \
+"
+
+PACKAGES =+ "${PN}-services-machined"
+SUMMARY_${PN}-services-machined = "systemd's virtual machine and container management service"
+RDEPENDS_${PN}-services-machined = "${PN}-services-dbus"
+CONFFILES_${PN}-services-machined = "${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf"
+FILES_${PN}-services-machined = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
+        ${base_bindir}/machinectl \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.machine1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.machine1.service \
+        ${systemd_unitdir}/system/machine.slice \
+        ${systemd_unitdir}/system/org.freedesktop.machine1.busname \
+        ${systemd_unitdir}/system/systemd-machined.service \
+        ${rootlibexecdir}/systemd/systemd-machined \
+        ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
+"
+
+PACKAGES =+ "${PN}-services-modules-load"
+SUMMARY_${PN}-services-modules-load = "systemd's kernel module loading service"
+FILES_${PN}-services-modules-load = "\
+        ${sysconfdir}/modules-load.d/ \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-modules-load.service \
+        ${systemd_unitdir}/system/systemd-modules-load.service \
+        ${rootlibexecdir}/systemd/systemd-modules-load \
+        ${exec_prefix}/lib/modules-load.d \
+"
+
+PACKAGES =+ "${PN}-services-modules-static-nodes"
+SUMMARY_${PN}-services-modules-static-nodes = "systemd's kernel module static nodes creation service"
+RDEPENDS_${PN}-services-modules-static-nodes = "kmod ${PN}-services-tmpfiles"
+FILES_${PN}-services-modules-static-nodes = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/kmod-static-nodes.service \
+        ${systemd_unitdir}/system/kmod-static-nodes.service \
+"
 
-FILES_${PN}-dbg += "${libdir}/systemd/ptest/.debug"
+
+PACKAGES =+ "${PN}-services-multi-seat-x"
+SUMMARY_${PN}-services-multi-seat-x = "systemd's X11 multi-seat support service"
+RDEPENDS_${PN}-services-multi-seat-x = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/xserver', '', d)}"
+FILES_${PN}-services-multi-seat-x = "\
+        ${rootlibexecdir}/systemd/systemd-multi-seat-x \
+"
+
+PACKAGES =+ "${PN}-services-networkd"
+SUMMARY_${PN}-services-networkd = "systemd's network management (static, DHCP, bridge...) service"
+# NOTE: if no sysusers, then users/groups must be setup
+RRECOMMENDS_${PN}-services-networkd = "${PN}-services-sysusers"
+FILES_${PN}-services-networkd = "\
+        ${sysconfdir}/systemd/network/ \
+        ${sysconfdir}/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service \
+        ${sysconfdir}/systemd/system/multi-user.target.wants/systemd-networkd.service \
+        ${base_bindir}/networkctl \
+        ${rootlibexecdir}/systemd/network/80-container-host0.network \
+        ${rootlibexecdir}/systemd/network/80-container-ve.network \
+        ${rootlibexecdir}/systemd/network/99-default.link \
+        ${systemd_unitdir}/system/systemd-networkd-wait-online.service \
+        ${systemd_unitdir}/system/systemd-networkd.service \
+        ${rootlibexecdir}/systemd/systemd-networkd \
+        ${rootlibexecdir}/systemd/systemd-networkd-wait-online \
+        ${exec_prefix}/lib/systemd/network \
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.network1.conf \
+        ${datadir}/dbus-1/system-services/org.freedesktop.network1.service \
+"
+
+PACKAGES =+ "${PN}-services-nspawn"
+SUMMARY_${PN}-services-nspawn = "systemd's namespace spawing service and tool"
+FILES_${PN}-services-nspawn = "\
+        ${systemd_unitdir}/system/systemd-nspawn@.service \
+        ${bindir}/systemd-nspawn \
+"
+
+PACKAGES =+ "${PN}-services-quota"
+SUMMARY_${PN}-services-quota = "systemd's file system quota enable and check service"
+RDEPENDS_${PN}-services-quota = "quota"
+FILES_${PN}-services-quota = "\
+        ${systemd_unitdir}/system/quotaon.service \
+        ${systemd_unitdir}/system/systemd-quotacheck.service \
+        ${rootlibexecdir}/systemd/systemd-quotacheck \
+"
+
+PACKAGES =+ "${PN}-services-randomseed"
+SUMMARY_${PN}-services-randomseed = "systemd's random seed save/restore service"
+FILES_${PN}-services-randomseed = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-random-seed.service \
+        ${systemd_unitdir}/system/systemd-random-seed.service \
+        ${rootlibexecdir}/systemd/systemd-random-seed \
+"
+
+PACKAGES =+ "${PN}-services-readahead"
+SUMMARY_${PN}-services-readahead = "systemd's disk read ahead service"
+FILES_${PN}-services-readahead = "\
+        ${systemd_unitdir}/system/systemd-readahead-collect.service \
+        ${systemd_unitdir}/system/systemd-readahead-done.service \
+        ${systemd_unitdir}/system/systemd-readahead-done.timer \
+        ${systemd_unitdir}/system/systemd-readahead-drop.service \
+        ${systemd_unitdir}/system/systemd-readahead-replay.service \
+        ${rootlibexecdir}/systemd/systemd-readahead \
+"
+
+PACKAGES =+ "${PN}-services-rfkill"
+SUMMARY_${PN}-services-rfkill = "systemd's rfkill state save/restore service"
+FILES_${PN}-services-rfkill = "\
+        ${systemd_unitdir}/system/systemd-rfkill@.service \
+        ${rootlibexecdir}/systemd/systemd-rfkill \
+"
+
+PACKAGES =+ "${PN}-services-sleep"
+SUMMARY_${PN}-services-sleep = "systemd's sleep, suspend and hiberate services"
+FILES_${PN}-services-sleep = "\
+        ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
+        ${systemd_unitdir}/system/systemd-suspend.service \
+        ${systemd_unitdir}/system/systemd-hibernate.service \
+        ${systemd_unitdir}/system-sleep/ \
+        ${rootlibexecdir}/systemd/systemd-sleep \
+"
+
+PACKAGES =+ "${PN}-services-sysctl"
+SUMMARY_${PN}-services-sysctl = "systemd's kernel parameters configuration service"
+FILES_${PN}-services-sysctl = "\
+        ${sysconfdir}/sysctl.d/ \
+        ${exec_prefix}/lib/sysctl.d/ \
+        ${exec_prefix}/lib/sysctl.d/50-default.conf \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-sysctl.service \
+        ${systemd_unitdir}/system/systemd-sysctl.service \
+        ${rootlibexecdir}/systemd/systemd-sysctl \
+"
+
+PACKAGES =+ "${PN}-services-sysusers"
+SUMMARY_${PN}-services-sysusers = "systemd's service and tool to allocate system users and groups"
+FILES_${PN}-services-sysusers = "\
+        ${base_bindir}/systemd-sysusers \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-sysusers.service \
+        ${systemd_unitdir}/system/systemd-sysusers.service \
+        ${exec_prefix}/lib/sysusers.d/basic.conf \
+        ${exec_prefix}/lib/sysusers.d/systemd.conf \
+"
+
+PACKAGES =+ "${PN}-services-sysvcompat"
+SUMMARY_${PN}-services-sysvcompat = "systemd's SYSV legacy and compatibility service"
+# NOTE: if no sysusers or tmpfiles, then users/groups and FS structure must be setup
+RRECOMMENDS_${PN}-services-sysvcompat = "${PN}-services-sysusers ${PN}-services-tmpfiles"
+FILES_${PN}-services-sysvcompat = "\
+        ${rootlibexecdir}/systemd/systemd-bus-proxyd \
+        ${rootlibexecdir}/systemd/systemd-socket-proxyd \
+        ${bindir}/systemd-stdio-bridge \
+        ${rootlibexecdir}/systemd/system-generators/systemd-rc-local-generator \
+        ${rootlibexecdir}/systemd/system-generators/systemd-sysv-generator \
+        ${rootlibexecdir}/systemd/systemd-initctl \
+        ${rootlibexecdir}/systemd/systemd-update-utmp \
+        ${systemd_unitdir}/system/halt-local.service \
+        ${systemd_unitdir}/system/rc-local.service \
+        ${systemd_unitdir}/system/runlevel1.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/runlevel2.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/runlevel3.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/runlevel4.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/runlevel5.target.wants/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-update-utmp.service \
+        ${systemd_unitdir}/system/systemd-initctl.service \
+        ${systemd_unitdir}/system/systemd-initctl.socket \
+        ${systemd_unitdir}/system/systemd-update-utmp-runlevel.service \
+        ${systemd_unitdir}/system/systemd-update-utmp.service \
+        ${exec_prefix}/lib/tmpfiles.d/legacy.conf \
+"
+
+PACKAGES =+ "${PN}-services-timedated"
+SUMMARY_${PN}-services-timedated = "systemd's time and date management service"
+RDEPENDS_${PN}-services-timedated = "${PN}-services-dbus"
+CONFFILES_${PN}-services-timedated = "${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf"
+FILES_${PN}-services-timedated = "\
+        ${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
+        ${bindir}/timedatectl \
+        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.timedate1.busname \
+        ${systemd_unitdir}/system/dbus-org.freedesktop.timedate1.service \
+        ${systemd_unitdir}/system/org.freedesktop.timedate1.busname \
+        ${systemd_unitdir}/system/systemd-timedated.service \
+        ${rootlibexecdir}/systemd/systemd-timedated \
+        ${datadir}/dbus-1/system-services/org.freedesktop.timedate1.service \
+        ${datadir}/polkit-1/actions/org.freedesktop.timedate1.policy \
+"
+
+PACKAGES =+ "${PN}-services-timesyncd"
+SUMMARY_${PN}-services-timesyncd = "systemd's NTP sync service"
+# NOTE: if no sysusers, then users/groups must be setup
+RRECOMMENDS_${PN}-services-timesyncd = "${PN}-services-sysusers"
+CONFFILES_${PN}-services-timesyncd = "${sysconfdir}/systemd/timesyncd.conf"
+FILES_${PN}-services-timesyncd = "\
+        ${sysconfdir}/systemd/system/sysinit.target.wants/systemd-timesyncd.service \
+        ${sysconfdir}/systemd/timesyncd.conf \
+        ${systemd_unitdir}/system/systemd-timesyncd.service \
+        ${rootlibexecdir}/systemd/systemd-timesyncd \
+"
+
+PACKAGES =+ "${PN}-services-tmpfiles"
+SUMMARY_${PN}-services-tmpfiles = "systemd's service to create, delete and clean up volatile/tmp files/dirs"
+FILES_${PN}-services-tmpfiles = "\
+        ${sysconfdir}/tmpfiles.d/ \
+        ${base_bindir}/systemd-tmpfiles \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-tmpfiles-setup.service \
+        ${systemd_unitdir}/system/systemd-tmpfiles-clean.service \
+        ${systemd_unitdir}/system/systemd-tmpfiles-clean.timer \
+        ${systemd_unitdir}/system/systemd-tmpfiles-setup-dev.service \
+        ${systemd_unitdir}/system/systemd-tmpfiles-setup.service \
+        ${systemd_unitdir}/system/timers.target.wants/systemd-tmpfiles-clean.timer \
+        ${exec_prefix}/lib/tmpfiles.d/etc.conf \
+        ${exec_prefix}/lib/tmpfiles.d/systemd-nologin.conf \
+        ${exec_prefix}/lib/tmpfiles.d/systemd.conf \
+        ${exec_prefix}/lib/tmpfiles.d/tmp.conf \
+        ${exec_prefix}/lib/tmpfiles.d/var.conf \
+        ${exec_prefix}/lib/tmpfiles.d/00-create-volatile.conf \
+        ${exec_prefix}/lib/tmpfiles.d/x11.conf \
+"
+
+PACKAGES =+ "${PN}-services-udev"
+SUMMARY_${PN}-services-udev = "systemd's udev services"
+RDEPENDS_${PN}-services-udev = "udev"
+FILES_${PN}-services-udev = "\
+        ${systemd_unitdir}/system/initrd-udevadm-cleanup-db.service \
+        ${systemd_unitdir}/system/systemd-udev-hwdb-update.service \
+        ${systemd_unitdir}/system/systemd-udev-settle.service \
+        ${systemd_unitdir}/system/systemd-udev-trigger.service \
+        ${systemd_unitdir}/system/systemd-udevd-control.socket \
+        ${systemd_unitdir}/system/systemd-udevd-kernel.socket \
+        ${systemd_unitdir}/system/systemd-udevd.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udevd.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udev-trigger.service \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udev-hwdb-update.service \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-udevd-kernel.socket \
+        ${systemd_unitdir}/system/sockets.target.wants/systemd-udevd-control.socket \
+"
+
+PACKAGES =+ "${PN}-services-update"
+SUMMARY_${PN}-services-update = "systemd's post update service"
+FILES_${PN}-services-update = "\
+        ${rootlibexecdir}/systemd/system-generators/systemd-system-update-generator \
+        ${rootlibexecdir}/systemd/systemd-update-done \
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-update-done.service \
+        ${systemd_unitdir}/system/systemd-update-done.service \
+"
+
+PACKAGES =+ "${PN}-services-vconsole"
+SUMMARY_${PN}-services-vconsole = "systemd's service to configure the virtual console (keyboard/font)"
+RECOMMENDS_${PN}-services-vconsole = "kbd kbd-consolefonts kbd-keymaps"
+FILES_${PN}-services-vconsole = "\
+        ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service \
+        ${systemd_unitdir}/system/systemd-vconsole-setup.service \
+        ${rootlibexecdir}/systemd/systemd-vconsole-setup \
+"
+
+########################################################################
+# Standard BitBake Packages
+########################################################################
+
+FILES_${PN}-dbg += "\
+        ${base_libdir}/security/.debug/ \
+        ${libdir}/systemd/ptest/.debug \
+        ${rootlibdir}/.debug \
+        ${systemd_unitdir}/*/.debug \
+        ${systemd_unitdir}/.debug \
+"
 
 FILES_${PN}-gui = "${bindir}/systemadm"
 
-FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
-                              ${systemd_unitdir}/system/systemd-vconsole-setup.service \
-                              ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
+FILES_${PN}-dev += "\
+        ${base_libdir}/security/*.la \
+        ${datadir}/dbus-1/interfaces/ \
+        ${sysconfdir}/rpm/macros.systemd \
+"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} += "--system systemd-journal-gateway; --system systemd-timesync"
+GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
+
+# The test cases need perl and bash to run correctly.
+RDEPENDS_${PN}-ptest += "perl python bash"
+FILES_${PN}-ptest += "\
+        ${libdir}/udev/rules.d \
+"
+
+########################################################################
+# Misc Packages
+########################################################################
+
+PACKAGES =+ "${PN}-bash"
+SUMMARY_${PN}-bash = "systemd bash shell commands completion"
+FILES_${PN}-bash = "\
+        ${datadir}/bash-completion/completions/bootctl \
+        ${datadir}/bash-completion/completions/busctl \
+        ${datadir}/bash-completion/completions/coredumpctl \
+        ${datadir}/bash-completion/completions/hostnamectl \
+        ${datadir}/bash-completion/completions/journalctl \
+        ${datadir}/bash-completion/completions/kernel-install \
+        ${datadir}/bash-completion/completions/localectl \
+        ${datadir}/bash-completion/completions/loginctl \
+        ${datadir}/bash-completion/completions/machinectl \
+        ${datadir}/bash-completion/completions/systemctl \
+        ${datadir}/bash-completion/completions/systemd-* \
+        ${datadir}/bash-completion/completions/timedatectl \
+"
 
+PACKAGES =+ "${PN}-initramfs"
+SUMMARY_${PN}-initramfs = "systemd's initramfs support"
+FILES_${PN}-initramfs = "/init"
+RDEPENDS_${PN}-initramfs = "${PN}"
+
+PACKAGES =+ "${PN}-kernel-install"
+SUMMARY_${PN}-kernel-install = "systemd tool to add/remove kernel and initramfs images to/from /boot"
 RDEPENDS_${PN}-kernel-install += "bash"
-FILES_${PN}-kernel-install = "${bindir}/kernel-install \
-                              ${sysconfdir}/kernel/ \
-                              ${exec_prefix}/lib/kernel \
-                             "
-FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
-                         "
-
-FILES_${PN}-zsh = "${datadir}/zsh/site-functions"
-
-FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
-                      ${exec_prefix}/lib/binfmt.d \
-                      ${rootlibexecdir}/systemd/systemd-binfmt \
-                      ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
-                      ${systemd_unitdir}/system/systemd-binfmt.service"
-RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
-
-RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
-
-CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
-                ${sysconfdir}/systemd/logind.conf \
-                ${sysconfdir}/systemd/system.conf \
-                ${sysconfdir}/systemd/user.conf"
-
-FILES_${PN} = " ${base_bindir}/* \
-                ${datadir}/bash-completion \
-                ${datadir}/dbus-1/services \
-                ${datadir}/dbus-1/system-services \
-                ${datadir}/polkit-1 \
-                ${datadir}/${BPN} \
-                ${datadir}/factory \
-                ${sysconfdir}/bash_completion.d/ \
-                ${sysconfdir}/dbus-1/ \
-                ${sysconfdir}/machine-id \
-                ${sysconfdir}/modules-load.d/ \
-                ${sysconfdir}/pam.d/ \
-                ${sysconfdir}/sysctl.d/ \
-                ${sysconfdir}/systemd/ \
-                ${sysconfdir}/tmpfiles.d/ \
-                ${sysconfdir}/xdg/ \
-                ${sysconfdir}/init.d/README \
-                ${rootlibexecdir}/systemd/* \
-                ${systemd_unitdir}/* \
-                ${base_libdir}/security/*.so \
-                ${libdir}/libnss_* \
-                /cgroup \
-                ${bindir}/systemd* \
-                ${bindir}/busctl \
-                ${bindir}/localectl \
-                ${bindir}/hostnamectl \
-                ${bindir}/timedatectl \
-                ${bindir}/bootctl \
-                ${bindir}/kernel-install \
-                ${exec_prefix}/lib/tmpfiles.d/*.conf \
-                ${exec_prefix}/lib/systemd \
-                ${exec_prefix}/lib/modules-load.d \
-                ${exec_prefix}/lib/sysctl.d \
-                ${exec_prefix}/lib/sysusers.d \
-                ${localstatedir} \
-                /lib/udev/rules.d/70-uaccess.rules \
-                /lib/udev/rules.d/71-seat.rules \
-                /lib/udev/rules.d/73-seat-late.rules \
-                /lib/udev/rules.d/99-systemd.rules \
-               "
+FILES_${PN}-kernel-install = "\
+        ${bindir}/kernel-install \
+        ${sysconfdir}/kernel/ \
+        ${exec_prefix}/lib/kernel \
+"
 
-FILES_${PN}-dbg += "${rootlibdir}/.debug ${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"
+PACKAGES =+ "${PN}-pam"
+SUMMARY_${PN}-pam = "systemd PAM modules and configuration"
+FILES_${PN}-pam = "\
+        ${sysconfdir}/pam.d \
+        ${base_libdir}/security/pam_systemd.so \
+"
 
-RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
-RDEPENDS_${PN} += "volatile-binds"
+PACKAGES =+ "${PN}-preset"
+SUMMARY_${PN}-preset = "systemd's service enablement presets"
+FILES_${PN}-preset = "${systemd_unitdir}/system-preset/90-systemd.preset"
 
-RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units udev-hwdb\
-                      util-linux-agetty \
-                      util-linux-fsck e2fsprogs-e2fsck \
-                      kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 os-release \
+PACKAGES =+ "${PN}-rpm-macros"
+SUMMARY_${PN}-rpm-macros = "systemd RPM macros"
+FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
+			 "
+
+PACKAGES =+ "${PN}-zsh"
+SUMMARY_${PN}-zsh = "systemd zsh shell commands completion"
+FILES_${PN}-zsh = "\
+        ${datadir}/zsh/site-functions \
 "
 
-PACKAGES =+ "udev-dbg udev udev-hwdb"
 
-FILES_udev-dbg += "/lib/udev/.debug"
+########################################################################
+# Aggregation of Split Packages
+########################################################################
+
+PACKAGES =+ "${PN}-services-essential"
+SUMMARY_${PN}-services-essential = "systemd's essential services aggregation"
+ALLOW_EMPTY_${PN}-services-essential = "1"
+RDEPENDS_${PN}-services-essential = "\
+        ${PN}-generators-filesystems \
+        ${PN}-preset \
+        ${PN}-services-fsck \
+        ${PN}-services-journal \
+        ${PN}-services-modules-load \
+        ${PN}-services-randomseed \
+        ${PN}-services-sleep \
+        ${PN}-services-sysctl \
+        ${PN}-services-sysusers \
+        ${PN}-services-tmpfiles \
+        ${PN}-services-udev \
+        udev-rules-systemd \
+"
 
-RPROVIDES_udev = "hotplug"
+PACKAGES =+ "${PN}-services-base"
+SUMMARY_${PN}-services-base = "systemd's base services aggregation"
+ALLOW_EMPTY_${PN}-services-base = "1"
+RDEPENDS_${PN}-services-base = "${PN}-services-essential \
+        ${PN}-services-ask-password \
+        ${PN}-services-backlight \
+        ${PN}-services-binfmt \
+        ${PN}-services-coredump \
+        ${PN}-services-dbus \
+        ${PN}-services-firstboot \
+        ${PN}-services-fuse \
+        ${PN}-services-hostnamed \
+        ${PN}-services-ldconfig \
+        ${PN}-services-localed \
+        ${PN}-services-logind \
+        ${PN}-services-networkd \
+        ${PN}-services-quota \
+        ${PN}-services-rfkill \
+        ${PN}-services-timedated \
+        ${PN}-services-timesyncd \
+        ${PN}-services-update \
+        ${PN}-services-vconsole \
+        ${PN}-services-modules-static-nodes \
+        ${PN}-bash \
+        ${PN}-initramfs \
+        ${PN}-kernel-install \
+        ${PN}-rpm-macros \
+        ${PN}-zsh \
+"
 
-RDEPENDS_udev-hwdb += "udev"
+PACKAGES =+ "${PN}-services-all"
+SUMMARY_${PN}-services-all = "systemd's all services and tools aggregation"
+ALLOW_EMPTY_${PN}-services-all = "1"
+RDEPENDS_${PN}-services-all = "${PN}-services-base \
+        ${PN}-services-bootchart \
+        ${PN}-services-cryptsetup \
+        ${PN}-services-debug \
+        ${PN}-services-machined \
+        ${PN}-services-nspawn \
+        ${PN}-services-sysvcompat \
+        ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${PN}-services-multi-seat-x', '', d)} \
+"
 
-FILES_udev += "${base_sbindir}/udevd \
-               ${rootlibexecdir}/systemd/systemd-udevd \
-               ${rootlibexecdir}/udev/accelerometer \
-               ${rootlibexecdir}/udev/ata_id \
-               ${rootlibexecdir}/udev/cdrom_id \
-               ${rootlibexecdir}/udev/collect \
-               ${rootlibexecdir}/udev/findkeyboards \
-               ${rootlibexecdir}/udev/keyboard-force-release.sh \
-               ${rootlibexecdir}/udev/keymap \
-               ${rootlibexecdir}/udev/mtd_probe \
-               ${rootlibexecdir}/udev/scsi_id \
-               ${rootlibexecdir}/udev/v4l_id \
-               ${rootlibexecdir}/udev/keymaps \
-               ${rootlibexecdir}/udev/rules.d/*.rules \
-               ${sysconfdir}/udev \
-               ${sysconfdir}/init.d/systemd-udevd \
-               ${systemd_unitdir}/system/*udev* \
-               ${systemd_unitdir}/system/*.wants/*udev* \
-               ${base_bindir}/udevadm \
-               ${datadir}/bash-completion/completions/udevadm \
-              "
-
-FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
 
-INITSCRIPT_PACKAGES = "udev"
-INITSCRIPT_NAME_udev = "systemd-udevd"
-INITSCRIPT_PARAMS_udev = "start 03 S ."
+########################################################################
+# Core Package
+########################################################################
 
-python __anonymous() {
-    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
-        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
-}
+CONFFILES_${PN} = "\
+        ${sysconfdir}/systemd/system.conf \
+        ${sysconfdir}/systemd/user.conf \
+"
 
+FILES_${PN} = "\
+        ${base_bindir}/systemctl \
+        ${base_bindir}/systemd-hwdb \
+        ${bindir}/bootctl \
+        ${datadir}/${BPN} \
+        ${datadir}/factory \
+        ${exec_prefix}/lib/libnss_myhostname* \
+        ${exec_prefix}/lib/libnss_mymachines.so.2 \
+        ${libdir}/systemd/user-generators/ \
+        ${libdir}/systemd/user/ \
+        ${localstatedir} \
+        ${rootlibexecdir}/systemd/systemd \
+        ${rootlibexecdir}/systemd/systemd-cgroups-agent \
+        ${rootlibexecdir}/systemd/systemd-shutdown \
+        ${rootlibexecdir}/systemd/systemd-shutdownd \
+        ${rootlibexecdir}/systemd/systemd-machine-id-commit \
+        ${rootlibexecdir}/systemd/systemd-hibernate-resume \
+        ${rootlibexecdir}/systemd/systemd-importd \
+        ${rootlibexecdir}/systemd/import-pubring.gpg \
+        ${rootlibexecdir}/systemd/systemd-pull \
+        ${sysconfdir}/init.d/README \
+        ${sysconfdir}/machine-id \
+        ${sysconfdir}/systemd/system.conf \
+        ${sysconfdir}/systemd/system/ \
+        ${sysconfdir}/systemd/user.conf \
+        ${sysconfdir}/systemd/user/ \
+        ${sysconfdir}/xdg/systemd/ \
+        ${systemd_unitdir}/system-generators/ \
+        ${systemd_unitdir}/system-preset/ \
+        ${systemd_unitdir}/system-shutdown/ \
+        ${systemd_unitdir}/system/ \
+"
 # TODO:
 # u-a for runlevel and telinit
+RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
+RDEPENDS_${PN} += "volatile-binds"
+
+RRECOMMENDS_${PN} += "\
+        ${PN}-services-base \
+        ${PN}-services-essential \
+        ${PN}-services-all \
+        ${PN}-tools \
+        ${PN}-generators-getty \
+        ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PN}-pam', '', d)} \
+        ${PN}-services-getty \
+        kernel-module-autofs4 \
+        kernel-module-ipv6 \
+        kernel-module-unix \
+        util-linux-agetty \
+        util-linux-fsck \
+        e2fsprogs-e2fsck \
+        os-release \
+        udev-hwdb \
+        systemd-serialgetty \
+        systemd-compat-units \
+"
 
 ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
 
@@ -389,6 +1019,41 @@ ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
 ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
 ALTERNATIVE_PRIORITY[runlevel] ?= "300"
 
+
+########################################################################
+# UDEV Section
+########################################################################
+
+PACKAGES =+ "udev-dbg"
+SUMMARY_udev-dbg = "Dynamic device management - Debugging files"
+RRECOMMENDS_udev-dbg += "${PN}-dbg"
+FILES_udev-dbg = "\
+        ${rootlibexecdir}/udev/.debug \
+        ${base_sbindir}/.debug/udevd \
+        ${base_bindir}/.debug/udevadm \
+        ${rootlibexecdir}/systemd/.debug/systemd-udevd \
+        ${base_libdir}/.debug/libudev* \
+        ${base_libdir}/.debug/libgudev* \
+        ${exec_prefix}/lib/.debug/libgudev* \
+"
+
+PACKAGES =+ "udev-dev"
+SUMMARY_udev-dev = "Dynamic device management - Development files"
+RRECOMMENDS_udev-dev += "${PN}-dev"
+FILES_udev-dev = "\
+        ${datadir}/pkgconfig/*udev* \
+        ${libdir}/pkgconfig/*udev* \
+        ${libdir}/lib*udev*.la \
+        ${includedir}/*udev* \
+"
+
+PACKAGES =+ "udev-hwdb"
+SUMMARY_udev-hwdb = "Dynamic device management - Hardware database"
+RDEPENDS_udev-hwdb += "udev"
+FILES_udev-hwdb = "\
+        ${rootlibexecdir}/udev/hwdb.d/ \
+"
+
 pkg_postinst_udev-hwdb () {
 	if test -n "$D"; then
 		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
@@ -406,6 +1071,154 @@ pkg_prerm_udev-hwdb () {
 	rm -f ${sysconfdir}/udev/hwdb.bin
 }
 
+PACKAGES =+ "udev-bash"
+SUMMARY_udev-bash = "Dynamic device management - Bash shell commands completion"
+FILES_udev-bash = "${datadir}/bash-completion/completions/udevadm"
+
+PACKAGES =+ "udev-zsh"
+SUMMARY_udev-zsh = "Dynamic device management - zsh shell commands completion"
+FILES_udev-zsh = "${datadir}/zsh/site-functions/_udevadm"
+
+
+########################################################################
+# UDEV Rules Packages
+# split rules that require external programs or dependencies.
+# those that use only builtins are not split
+########################################################################
+
+PACKAGES =+ "udev-rules-accelerometer"
+SUMMARY_udev-rules-accelerometer = "Dynamic device management - accelerometer rules"
+FILES_udev-rules-accelerometer = "\
+        ${rootlibexecdir}/udev/accelerometer \
+        ${rootlibexecdir}/udev/rules.d/61-accelerometer.rules \
+        ${rootlibexecdir}/udev/rules.d/70-touchpad.rules \
+"
+
+PACKAGES =+ "udev-rules-cdrom"
+SUMMARY_udev-rules-cdrom = "Dynamic device management - cdrom rules"
+FILES_udev-rules-cdrom = "\
+        ${rootlibexecdir}/udev/cdrom_id \
+        ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \
+"
+
+PACKAGES =+ "udev-rules-mtd"
+SUMMARY_udev-rules-mtd = "Dynamic device management - mtd rules"
+FILES_udev-rules-mtd = "\
+        ${rootlibexecdir}/udev/mtd_probe \
+        ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \
+"
+
+PACKAGES =+ "udev-rules-persistent-storage"
+SUMMARY_udev-rules-persistent-storage = "Dynamic device management - persistent storage rules"
+FILES_udev-rules-persistent-storage = "\
+        ${rootlibexecdir}/udev/ata_id \
+        ${rootlibexecdir}/udev/scsi_id \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \
+"
+
+PACKAGES =+ "udev-rules-systemd"
+SUMMARY_udev-rules-systemd = "Dynamic device management - systemd rules"
+RDEPENDS_udev-rules-systemd = "${PN} ${PN}-services-sysctl"
+FILES_udev-rules-systemd = "\
+        ${rootlibexecdir}/udev/rules.d/99-systemd.rules \
+"
+
+PACKAGES =+ "udev-rules-v4l"
+SUMMARY_udev-rules-v4l = "Dynamic device management - v4l rules"
+FILES_udev-rules-v4l = "\
+        ${rootlibexecdir}/udev/v4l_id \
+        ${rootlibexecdir}/udev/rules.d/*-persistent-v4l.rules \
+"
+
+PACKAGES =+ "udev-rules-all"
+SUMMARY_udev-rules-all = "Dynamic device management - all rules aggregation"
+ALLOW_EMPTY_udev-rules-all = "1"
+RDEPENDS_udev-rules-all = "\
+        udev-rules-accelerometer \
+        udev-rules-cdrom \
+        udev-rules-mtd \
+        udev-rules-persistent-storage \
+        udev-rules-systemd \
+        udev-rules-v4l \
+"
+
+PACKAGES =+ "udev"
+SUMMARY_udev = "Dynamic device management"
+RPROVIDES_udev = "hotplug"
+PROVIDES = "udev"
+CONFFILES_udev = "${sysconfdir}/udev/udev.conf"
+RDEPENDS_udev += "${PN}-services-vconsole"
+FILES_udev = "\
+        ${base_bindir}/udevadm \
+        ${base_sbindir}/udevd \
+        ${rootlibexecdir}/systemd/systemd-udevd \
+        ${rootlibexecdir}/udev/collect \
+        ${rootlibexecdir}/udev/rules.d/42-usb-hid-pm.rules \
+        ${rootlibexecdir}/udev/rules.d/50-firmware.rules \
+        ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \
+        ${rootlibexecdir}/udev/rules.d/60-drm.rules \
+        ${rootlibexecdir}/udev/rules.d/60-keyboard.rules \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \
+        ${rootlibexecdir}/udev/rules.d/60-persistent-serial.rules \
+        ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \
+        ${rootlibexecdir}/udev/rules.d/75-net-description.rules \
+        ${rootlibexecdir}/udev/rules.d/75-tty-description.rules \
+        ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \
+        ${rootlibexecdir}/udev/rules.d/80-drivers.rules \
+        ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \
+        ${rootlibexecdir}/udev/rules.d/95-udev-late.rules \
+        ${rootlibexecdir}/udev/rules.d/70-mouse.rules \
+        ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
+        ${rootlibexecdir}/udev/rules.d/touchscreen.rules \
+        ${sysconfdir}/init.d/systemd-udevd \
+        ${sysconfdir}/udev \
+"
+
+RRECOMMENDS_udev = "\
+        udev-hwdb \
+        udev-rules-all \
+"
+
+INITSCRIPT_PACKAGES = "udev"
+INITSCRIPT_NAME_udev = "systemd-udevd"
+INITSCRIPT_PARAMS_udev = "start 03 S ."
+
+python __anonymous() {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+# TODO:
+# u-a for runlevel and telinit
+
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
+
+ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
+ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
+ALTERNATIVE_PRIORITY[init] ?= "300"
+
+ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
+ALTERNATIVE_PRIORITY[halt] ?= "300"
+
+ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
+ALTERNATIVE_PRIORITY[reboot] ?= "300"
+
+ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
+ALTERNATIVE_PRIORITY[shutdown] ?= "300"
+
+ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
+ALTERNATIVE_PRIORITY[poweroff] ?= "300"
+
+ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
+ALTERNATIVE_PRIORITY[runlevel] ?= "300"
+
 # As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
 # that we don't build both udev and systemd in world builds.
 python () {
-- 
1.9.1



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

* [PATCH 4/4] systemd: v219 with stable fixes
  2015-03-25 21:49 ` [PATCH v3 0/4] systemd and dbus split " Bruno Bottazzini
                     ` (2 preceding siblings ...)
  2015-03-25 21:49   ` [PATCH 3/4] systemd: split modules into packages Bruno Bottazzini
@ 2015-03-25 21:49   ` Bruno Bottazzini
  2015-03-30 13:05     ` Bottazzini, Bruno
  2015-04-01 10:16     ` Jussi Kukkonen
  3 siblings, 2 replies; 73+ messages in thread
From: Bruno Bottazzini @ 2015-03-25 21:49 UTC (permalink / raw)
  To: openembedded-core

Adding patches that fix bugs for 219 version.
This will get the same consistency of the stable systemd 219 version.

More details:
http://cgit.freedesktop.org/systemd/systemd-stable/log/?h=v219-stable
---
 ...remote-fix-certificate-status-memory-leak.patch |  31 +
 ...ournal-remote-fix-client_cert-memory-leak.patch |  35 +
 ...0003-tmpfiles-Fix-parse_acl-error-message.patch |  28 +
 ...-test-utf8-fix-utf16-tests-on-BE-machines.patch |  26 +
 ...iles-avoid-creating-duplicate-acl-entries.patch | 131 +++
 .../0006-shared-time-util-fix-gcc5-warning.patch   |  32 +
 ...time-test-infinity-parsing-in-nanoseconds.patch |  36 +
 .../0008-bootchart-fix-default-init-path.patch     |  44 +
 ...emctl-bump-NOFILE-only-for-systemctl_main.patch |  44 +
 ...0-Make-root-s-home-directory-configurable.patch |  89 +-
 ...-util-avoid-freeing-uninitialized-pointer.patch |  37 +
 ...11-bootchart-svg-fix-checking-of-list-end.patch |  28 +
 ...md-add-getrandom-syscall-numbers-for-MIPS.patch |  38 +
 ...aker-dependencies-between-mount-and-devic.patch |  33 +
 ...topping-due-to-BindsTo-log-which-unit-cau.patch |  43 +
 ...grade-message-about-sysctl-overrides-to-d.patch |  30 +
 ...l-add-some-hints-how-to-override-settings.patch |  39 +
 .../0017-core-rework-device-state-logic.patch      | 912 +++++++++++++++++++++
 .../0018-core-fix-return-value-on-OOM.patch        |  26 +
 ...e-x-machine-unix-prefix-for-the-container.patch |  33 +
 ...0-shared-AFS-is-also-a-network-filesystem.patch |  25 +
 ...downgrade-unit-type-not-supported-message.patch |  31 +
 ...ournal-remote-fix-saving-of-binary-fields.patch |  97 +++
 ...ix-Inappropriate-ioctl-for-device-on-ext4.patch |  37 +
 ...eplace-VLA-with-alloca-to-make-llvm-happy.patch |  53 ++
 ...ietly-ignore-ACLs-on-unsupported-filesyst.patch |  84 ++
 ...-assume-ac-when-sys-class-power_supply-is.patch |  30 +
 meta/recipes-core/systemd/systemd_219.bb           |  37 +-
 meta/recipes-core/util-linux/util-linux.inc        |   2 +-
 29 files changed, 2052 insertions(+), 59 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-journal-remote-fix-certificate-status-memory-leak.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0002-journal-remote-fix-client_cert-memory-leak.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0003-tmpfiles-Fix-parse_acl-error-message.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0004-test-utf8-fix-utf16-tests-on-BE-machines.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0005-tmpfiles-avoid-creating-duplicate-acl-entries.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0006-shared-time-util-fix-gcc5-warning.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0007-test-time-test-infinity-parsing-in-nanoseconds.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0008-bootchart-fix-default-init-path.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0009-systemctl-bump-NOFILE-only-for-systemctl_main.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0010-acl-util-avoid-freeing-uninitialized-pointer.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0011-bootchart-svg-fix-checking-of-list-end.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0012-systemd-add-getrandom-syscall-numbers-for-MIPS.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0013-unit-use-weaker-dependencies-between-mount-and-devic.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0014-unit-When-stopping-due-to-BindsTo-log-which-unit-cau.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0015-sysctl-downgrade-message-about-sysctl-overrides-to-d.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0016-sysctl-add-some-hints-how-to-override-settings.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0017-core-rework-device-state-logic.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0018-core-fix-return-value-on-OOM.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0019-machined-use-x-machine-unix-prefix-for-the-container.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0020-shared-AFS-is-also-a-network-filesystem.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0021-core-downgrade-unit-type-not-supported-message.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0022-journal-remote-fix-saving-of-binary-fields.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0023-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0024-sd-daemon-replace-VLA-with-alloca-to-make-llvm-happy.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0025-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0026-shared-util-assume-ac-when-sys-class-power_supply-is.patch

diff --git a/meta/recipes-core/systemd/systemd/0001-journal-remote-fix-certificate-status-memory-leak.patch b/meta/recipes-core/systemd/systemd/0001-journal-remote-fix-certificate-status-memory-leak.patch
new file mode 100644
index 0000000..172bea2
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-journal-remote-fix-certificate-status-memory-leak.patch
@@ -0,0 +1,31 @@
+From 7057db8b36594bb03c611cab711cd992ad4de31e Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt@redhat.com>
+Date: Tue, 17 Feb 2015 10:33:01 +0100
+Subject: [PATCH 01/26] journal-remote: fix certificate status memory leak
+
+The output of gnutls_certificate_verification_status_print() needs to be
+freed.
+
+Noticed this while staring at verify_cert_authorized() to see what could
+possibly confuse gcc5 on armv7hl to segfault during compilation.
+
+(cherry picked from commit 9c3cf9693ac5c0a332ba376f99e6adea28b1bb0d)
+---
+ src/journal-remote/microhttpd-util.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/journal-remote/microhttpd-util.c b/src/journal-remote/microhttpd-util.c
+index 34d9337..de9c6ab 100644
+--- a/src/journal-remote/microhttpd-util.c
++++ b/src/journal-remote/microhttpd-util.c
+@@ -179,6 +179,7 @@ static int verify_cert_authorized(gnutls_session_t session) {
+                 return log_error_errno(r, "gnutls_certificate_verification_status_print failed: %m");
+ 
+         log_info("Certificate status: %s", out.data);
++        gnutls_free(out.data);
+ 
+         return status == 0 ? 0 : -EPERM;
+ }
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0002-journal-remote-fix-client_cert-memory-leak.patch b/meta/recipes-core/systemd/systemd/0002-journal-remote-fix-client_cert-memory-leak.patch
new file mode 100644
index 0000000..f615876
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0002-journal-remote-fix-client_cert-memory-leak.patch
@@ -0,0 +1,35 @@
+From 5852d2efbfb888dfb0adddb25afac0814d3ebcbb Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt@redhat.com>
+Date: Tue, 17 Feb 2015 10:36:57 +0100
+Subject: [PATCH 02/26] journal-remote: fix client_cert memory leak
+
+Found by Valgrind while testing the previous memory leak fix.
+
+(cherry picked from commit 32c3d7144cf9a5c8c03761d7f198142ca0f5f7b8)
+---
+ src/journal-remote/microhttpd-util.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/journal-remote/microhttpd-util.c b/src/journal-remote/microhttpd-util.c
+index de9c6ab..a95fff1 100644
+--- a/src/journal-remote/microhttpd-util.c
++++ b/src/journal-remote/microhttpd-util.c
+@@ -239,10 +239,14 @@ static int get_auth_dn(gnutls_x509_crt_t client_cert, char **buf) {
+         return 0;
+ }
+ 
++static inline void gnutls_x509_crt_deinitp(gnutls_x509_crt_t *p) {
++        gnutls_x509_crt_deinit(*p);
++}
++
+ int check_permissions(struct MHD_Connection *connection, int *code, char **hostname) {
+         const union MHD_ConnectionInfo *ci;
+         gnutls_session_t session;
+-        gnutls_x509_crt_t client_cert;
++        _cleanup_(gnutls_x509_crt_deinitp) gnutls_x509_crt_t client_cert = NULL;
+         _cleanup_free_ char *buf = NULL;
+         int r;
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0003-tmpfiles-Fix-parse_acl-error-message.patch b/meta/recipes-core/systemd/systemd/0003-tmpfiles-Fix-parse_acl-error-message.patch
new file mode 100644
index 0000000..15fa98c
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0003-tmpfiles-Fix-parse_acl-error-message.patch
@@ -0,0 +1,28 @@
+From ea960d3fc09c1e3745791d3433094678fd7ccd50 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Tue, 17 Feb 2015 12:47:51 +0100
+Subject: [PATCH 03/26] tmpfiles: Fix parse_acl error message
+
+parse_acl() returns the error instead of setting errno.
+
+(cherry picked from commit 484adfd914504cd7e95867cea20ca7af71b888f2)
+---
+ src/tmpfiles/tmpfiles.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
+index c948d4d..88ba7e4 100644
+--- a/src/tmpfiles/tmpfiles.c
++++ b/src/tmpfiles/tmpfiles.c
+@@ -689,7 +689,7 @@ static int get_acls_from_arg(Item *item) {
+          * afterwards, so the mask can be added now if necessary. */
+         r = parse_acl(item->argument, &item->acl_access, &item->acl_default, !item->force);
+         if (r < 0)
+-                log_warning_errno(errno, "Failed to parse ACL \"%s\": %m. Ignoring",
++                log_warning_errno(r, "Failed to parse ACL \"%s\": %m. Ignoring",
+                                   item->argument);
+ #else
+         log_warning_errno(ENOSYS, "ACLs are not supported. Ignoring");
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0004-test-utf8-fix-utf16-tests-on-BE-machines.patch b/meta/recipes-core/systemd/systemd/0004-test-utf8-fix-utf16-tests-on-BE-machines.patch
new file mode 100644
index 0000000..f43068d
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0004-test-utf8-fix-utf16-tests-on-BE-machines.patch
@@ -0,0 +1,26 @@
+From 8df2bb91718bf2ccc89c41f0dd19cd0bc8da1357 Mon Sep 17 00:00:00 2001
+From: Tom Gundersen <teg@jklm.no>
+Date: Wed, 18 Feb 2015 14:33:50 +0100
+Subject: [PATCH 04/26] test: utf8 - fix utf16 tests on BE machines
+
+(cherry picked from commit 502184de0f95d3a124d4d4c77ae7a88747a0fac2)
+---
+ src/test/test-utf8.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/test/test-utf8.c b/src/test/test-utf8.c
+index befa385..346f852 100644
+--- a/src/test/test-utf8.c
++++ b/src/test/test-utf8.c
+@@ -95,7 +95,7 @@ static void test_utf8_escaping_printable(void) {
+ 
+ static void test_utf16_to_utf8(void) {
+         char *a = NULL;
+-        const uint16_t utf16[] = { 'a', 0xd800, 'b', 0xdc00, 'c', 0xd801, 0xdc37 };
++        const uint16_t utf16[] = { htole16('a'), htole16(0xd800), htole16('b'), htole16(0xdc00), htole16('c'), htole16(0xd801), htole16(0xdc37) };
+         const char utf8[] = { 'a', 'b', 'c', 0xf0, 0x90, 0x90, 0xb7, 0 };
+ 
+         a = utf16_to_utf8(utf16, 14);
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0005-tmpfiles-avoid-creating-duplicate-acl-entries.patch b/meta/recipes-core/systemd/systemd/0005-tmpfiles-avoid-creating-duplicate-acl-entries.patch
new file mode 100644
index 0000000..35fe913
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0005-tmpfiles-avoid-creating-duplicate-acl-entries.patch
@@ -0,0 +1,131 @@
+From c429758054ee77383ca6d7323ecdd4163d3a3718 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Mon, 23 Feb 2015 23:19:54 -0500
+Subject: [PATCH 05/26] tmpfiles: avoid creating duplicate acl entries
+
+https://bugs.freedesktop.org/show_bug.cgi?id=89202
+https://bugs.debian.org/778656
+
+Status quo ante can be restored with:
+  getfacl -p /var/log/journal/`cat /etc/machine-id`|grep -v '^#'|sort -u|sudo setfacl --set-file=- /var/log/journal/`cat /etc/machine-id`
+
+(cherry picked from commit 1c73f3bc29111a00738569c9d40a989b161a0624)
+---
+ src/shared/acl-util.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++--
+ src/shared/acl-util.h |  4 +++
+ 2 files changed, 81 insertions(+), 2 deletions(-)
+
+diff --git a/src/shared/acl-util.c b/src/shared/acl-util.c
+index a4ff1ab..cbe09d7 100644
+--- a/src/shared/acl-util.c
++++ b/src/shared/acl-util.c
+@@ -282,6 +282,77 @@ int parse_acl(char *text, acl_t *acl_access, acl_t *acl_default, bool want_mask)
+         return 0;
+ }
+ 
++static int acl_entry_equal(acl_entry_t a, acl_entry_t b) {
++        acl_tag_t tag_a, tag_b;
++
++        if (acl_get_tag_type(a, &tag_a) < 0)
++                return -errno;
++
++        if (acl_get_tag_type(b, &tag_b) < 0)
++                return -errno;
++
++        if (tag_a != tag_b)
++                return false;
++
++        switch (tag_a) {
++        case ACL_USER_OBJ:
++        case ACL_GROUP_OBJ:
++        case ACL_MASK:
++        case ACL_OTHER:
++                /* can have only one of those */
++                return true;
++        case ACL_USER: {
++                _cleanup_(acl_free_uid_tpp) uid_t *uid_a, *uid_b;
++
++                uid_a = acl_get_qualifier(a);
++                if (!uid_a)
++                        return -errno;
++
++                uid_b = acl_get_qualifier(b);
++                if (!uid_b)
++                        return -errno;
++
++                return *uid_a == *uid_b;
++        }
++        case ACL_GROUP: {
++                _cleanup_(acl_free_gid_tpp) gid_t *gid_a, *gid_b;
++
++                gid_a = acl_get_qualifier(a);
++                if (!gid_a)
++                        return -errno;
++
++                gid_b = acl_get_qualifier(b);
++                if (!gid_b)
++                        return -errno;
++
++                return *gid_a == *gid_b;
++        }
++        default:
++                assert_not_reached("Unknown acl tag type");
++        }
++}
++
++static int find_acl_entry(acl_t acl, acl_entry_t entry, acl_entry_t *out) {
++        acl_entry_t i;
++        int r;
++
++        for (r = acl_get_entry(acl, ACL_FIRST_ENTRY, &i);
++             r > 0;
++             r = acl_get_entry(acl, ACL_NEXT_ENTRY, &i)) {
++
++                r = acl_entry_equal(i, entry);
++                if (r < 0)
++                        return r;
++                if (r > 0) {
++                        *out = i;
++                        return 1;
++                }
++        }
++        if (r < 0)
++                return -errno;
++        return 0;
++}
++
+ int acls_for_file(const char *path, acl_type_t type, acl_t new, acl_t *acl) {
+         _cleanup_(acl_freep) acl_t old;
+         acl_entry_t i;
+@@ -297,8 +368,12 @@ int acls_for_file(const char *path, acl_type_t type, acl_t new, acl_t *acl) {
+ 
+                 acl_entry_t j;
+ 
+-                if (acl_create_entry(&old, &j) < 0)
+-                        return -errno;
++                r = find_acl_entry(old, i, &j);
++                if (r < 0)
++                        return r;
++                if (r == 0)
++                        if (acl_create_entry(&old, &j) < 0)
++                                return -errno;
+ 
+                 if (acl_copy_entry(j, i) < 0)
+                         return -errno;
+diff --git a/src/shared/acl-util.h b/src/shared/acl-util.h
+index 90e88ff..fdb9006 100644
+--- a/src/shared/acl-util.h
++++ b/src/shared/acl-util.h
+@@ -41,5 +41,9 @@ int acls_for_file(const char *path, acl_type_t type, acl_t new, acl_t *acl);
+ DEFINE_TRIVIAL_CLEANUP_FUNC(acl_t, acl_free);
+ #define acl_free_charp acl_free
+ DEFINE_TRIVIAL_CLEANUP_FUNC(char*, acl_free_charp);
++#define acl_free_uid_tp acl_free
++DEFINE_TRIVIAL_CLEANUP_FUNC(uid_t*, acl_free_uid_tp);
++#define acl_free_gid_tp acl_free
++DEFINE_TRIVIAL_CLEANUP_FUNC(gid_t*, acl_free_gid_tp);
+ 
+ #endif
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0006-shared-time-util-fix-gcc5-warning.patch b/meta/recipes-core/systemd/systemd/0006-shared-time-util-fix-gcc5-warning.patch
new file mode 100644
index 0000000..fc707bb
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0006-shared-time-util-fix-gcc5-warning.patch
@@ -0,0 +1,32 @@
+From 57da343cebcd77d168d5648825698e4edbb56d2c Mon Sep 17 00:00:00 2001
+From: Daniel Mack <daniel@zonque.org>
+Date: Tue, 24 Feb 2015 13:26:09 +0100
+Subject: [PATCH 06/26] shared/time-util: fix gcc5 warning
+
+  CC       src/shared/libsystemd_shared_la-time-util.lo
+src/shared/time-util.c: In function 'parse_nsec':
+src/shared/time-util.c:789:25: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
+                 if (!*s != 0)
+                         ^
+
+(cherry picked from commit 8e8933ca0f06bae19cb6db601e83b33f8ac80f2a)
+---
+ src/shared/time-util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/shared/time-util.c b/src/shared/time-util.c
+index 947ac1f..1c36c57 100644
+--- a/src/shared/time-util.c
++++ b/src/shared/time-util.c
+@@ -786,7 +786,7 @@ int parse_nsec(const char *t, nsec_t *nsec) {
+         s = startswith(p, "infinity");
+         if (s) {
+                 s += strspn(s, WHITESPACE);
+-                if (!*s != 0)
++                if (*s != 0)
+                         return -EINVAL;
+ 
+                 *nsec = NSEC_INFINITY;
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0007-test-time-test-infinity-parsing-in-nanoseconds.patch b/meta/recipes-core/systemd/systemd/0007-test-time-test-infinity-parsing-in-nanoseconds.patch
new file mode 100644
index 0000000..161b7b5
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0007-test-time-test-infinity-parsing-in-nanoseconds.patch
@@ -0,0 +1,36 @@
+From 5248b6bbaf09c74cd152257132cba9358549446a Mon Sep 17 00:00:00 2001
+From: Daniel Mack <daniel@zonque.org>
+Date: Tue, 24 Feb 2015 13:27:10 +0100
+Subject: [PATCH 07/26] test-time: test "infinity" parsing in nanoseconds
+
+(cherry picked from commit fdd30a1530810b659345c565e97beef06b7af2fd)
+---
+ src/test/test-time.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/test/test-time.c b/src/test/test-time.c
+index 8cfc4cc..3840fff 100644
+--- a/src/test/test-time.c
++++ b/src/test/test-time.c
+@@ -78,12 +78,18 @@ static void test_parse_nsec(void) {
+         assert_se(u == 2);
+         assert_se(parse_nsec(".7", &u) >= 0);
+         assert_se(u == 0);
++        assert_se(parse_nsec("infinity", &u) >= 0);
++        assert_se(u == NSEC_INFINITY);
++        assert_se(parse_nsec(" infinity ", &u) >= 0);
++        assert_se(u == NSEC_INFINITY);
+ 
+         assert_se(parse_nsec(" xyz ", &u) < 0);
+         assert_se(parse_nsec("", &u) < 0);
+         assert_se(parse_nsec(" . ", &u) < 0);
+         assert_se(parse_nsec(" 5. ", &u) < 0);
+         assert_se(parse_nsec(".s ", &u) < 0);
++        assert_se(parse_nsec(" infinity .7", &u) < 0);
++        assert_se(parse_nsec(".3 infinity", &u) < 0);
+ }
+ 
+ static void test_format_timespan_one(usec_t x, usec_t accuracy) {
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0008-bootchart-fix-default-init-path.patch b/meta/recipes-core/systemd/systemd/0008-bootchart-fix-default-init-path.patch
new file mode 100644
index 0000000..7eaad1e
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0008-bootchart-fix-default-init-path.patch
@@ -0,0 +1,44 @@
+From 588e3fe64330854d44f09b376a132c6384ac2499 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Tue, 24 Feb 2015 14:30:10 +0100
+Subject: [PATCH 08/26] bootchart: fix default init path
+
+Commit 6e1bf7ab99 used the wrong directory; we need rootlibexecdir, not
+rootlibdir, as the latter is something like /lib/x86_64-linux-gnu/ on
+multi-arch systems.
+
+https://launchpad.net/bugs/1423867
+(cherry picked from commit a804d849b3c2199bc25d1d4e65fc119fa4d7d0e2)
+---
+ Makefile.am               | 1 +
+ src/bootchart/bootchart.c | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index bf04d31..cc577ce 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -198,6 +198,7 @@ AM_CPPFLAGS = \
+ 	-DKEXEC=\"$(KEXEC)\" \
+ 	-DLIBDIR=\"$(libdir)\" \
+ 	-DROOTLIBDIR=\"$(rootlibdir)\" \
++	-DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
+ 	-DTEST_DIR=\"$(abs_top_srcdir)/test\" \
+ 	-I $(top_srcdir)/src \
+ 	-I $(top_builddir)/src/shared \
+diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c
+index 64a384b..175be68 100644
+--- a/src/bootchart/bootchart.c
++++ b/src/bootchart/bootchart.c
+@@ -76,7 +76,7 @@ int sysfd=-1;
+ #define DEFAULT_HZ 25.0
+ #define DEFAULT_SCALE_X 100.0 /* 100px = 1sec */
+ #define DEFAULT_SCALE_Y 20.0  /* 16px = 1 process bar */
+-#define DEFAULT_INIT ROOTLIBDIR "/systemd/systemd"
++#define DEFAULT_INIT ROOTLIBEXECDIR "/systemd"
+ #define DEFAULT_OUTPUT "/run/log"
+ 
+ /* graph defaults */
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0009-systemctl-bump-NOFILE-only-for-systemctl_main.patch b/meta/recipes-core/systemd/systemd/0009-systemctl-bump-NOFILE-only-for-systemctl_main.patch
new file mode 100644
index 0000000..dbffa5b
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0009-systemctl-bump-NOFILE-only-for-systemctl_main.patch
@@ -0,0 +1,44 @@
+From 1df0ddca3ae405537ceb87eccdb76324f276706f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Tue, 24 Feb 2015 10:10:04 -0500
+Subject: [PATCH 09/26] systemctl: bump NOFILE only for systemctl_main
+
+It is not necessary when running as telinit, etc.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1184712
+(cherry picked from commit 95d383ee47db488f182048cfd6846f2e6b859f2b)
+---
+ src/systemctl/systemctl.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
+index 21cb898..6b93ec8 100644
+--- a/src/systemctl/systemctl.c
++++ b/src/systemctl/systemctl.c
+@@ -7204,6 +7204,11 @@ found:
+                 }
+         }
+ 
++        /* Increase max number of open files to 16K if we can, we
++         * might needs this when browsing journal files, which might
++         * be split up into many files. */
++        setrlimit_closest(RLIMIT_NOFILE, &RLIMIT_MAKE_CONST(16384));
++
+         return verb->dispatch(bus, argv + optind);
+ }
+ 
+@@ -7453,11 +7458,6 @@ int main(int argc, char*argv[]) {
+                 goto finish;
+         }
+ 
+-        /* Increase max number of open files to 16K if we can, we
+-         * might needs this when browsing journal files, which might
+-         * be split up into many files. */
+-        setrlimit_closest(RLIMIT_NOFILE, &RLIMIT_MAKE_CONST(16384));
+-
+         if (!avoid_bus())
+                 r = bus_open_transport_systemd(arg_transport, arg_host, arg_scope != UNIT_FILE_SYSTEM, &bus);
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch b/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch
index 41b9039..ff2871b 100644
--- a/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch
+++ b/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch
@@ -1,7 +1,7 @@
-From 3dc731c1d270e2e143de621db9bd898299fd849d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:24:49 +0000
-Subject: [PATCH 10/11] Make root's home directory configurable
+From dd843247b6c769a3983462f7e616dc43226974a0 Mon Sep 17 00:00:00 2001
+From: Bruno Bottazzini <bruno.bottazzini@intel.com>
+Date: Thu, 5 Mar 2015 17:38:12 -0300
+Subject: [PATCH] Make root's home directory configurable
 
 OpenEmbedded has a configurable home directory for root. Allow
 systemd to be built using its idea of what root's home directory
@@ -9,32 +9,31 @@ should be.
 
 Upstream-Status: Pending
 
-Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Patch made by Khem Raj <raj.khem@gmail.com> updated to be
+compatbile with systemd 219-stable
 ---
- Makefile.am                       | 2 ++
- configure.ac                      | 7 +++++++
- src/core/unit-printf.c            | 2 +-
- src/nspawn/nspawn.c               | 4 ++--
- src/shared/util.c                 | 4 ++--
- units/console-shell.service.m4.in | 4 ++--
- units/emergency.service.in        | 4 ++--
- units/rescue.service.in           | 4 ++--
- 8 files changed, 20 insertions(+), 11 deletions(-)
+ Makefile.am                | 2 ++
+ configure.ac               | 7 +++++++
+ src/core/unit-printf.c     | 2 +-
+ src/nspawn/nspawn.c        | 5 ++---
+ src/shared/util.c          | 4 ++--
+ units/emergency.service.in | 4 ++--
+ units/rescue.service.in    | 4 ++--
+ 7 files changed, 18 insertions(+), 10 deletions(-)
 
 diff --git a/Makefile.am b/Makefile.am
-index 0fb3f9f..4623963 100644
+index 93c0509..31ea94d 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -199,6 +199,7 @@ AM_CPPFLAGS = \
- 	-DKEXEC=\"$(KEXEC)\" \
- 	-DLIBDIR=\"$(libdir)\" \
+@@ -201,6 +201,7 @@ AM_CPPFLAGS = \
  	-DROOTLIBDIR=\"$(rootlibdir)\" \
-+	-DROOTHOMEDIR=\"$(roothomedir)\" \
+ 	-DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
  	-DTEST_DIR=\"$(abs_top_srcdir)/test\" \
++	-DROOTHOMEDIR=\"$(roothomedir)\" \
  	-I $(top_srcdir)/src \
  	-I $(top_builddir)/src/shared \
-@@ -6342,6 +6343,7 @@ EXTRA_DIST += \
+ 	-I $(top_srcdir)/src/shared \
+@@ -6350,6 +6351,7 @@ EXTRA_DIST += \
  substitutions = \
         '|rootlibexecdir=$(rootlibexecdir)|' \
         '|rootbindir=$(rootbindir)|' \
@@ -43,10 +42,10 @@ index 0fb3f9f..4623963 100644
         '|SYSTEMCTL=$(rootbindir)/systemctl|' \
         '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
 diff --git a/configure.ac b/configure.ac
-index a5b2e6e..55bb7d8 100644
+index 01ee8dc..800a587 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1428,6 +1428,11 @@ AC_ARG_WITH([rootlibdir],
+@@ -1410,6 +1410,11 @@ AC_ARG_WITH([rootlibdir],
          [],
          [with_rootlibdir=${libdir}])
  
@@ -58,7 +57,7 @@ index a5b2e6e..55bb7d8 100644
  AC_ARG_WITH([pamlibdir],
          AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
          [],
-@@ -1518,6 +1523,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
+@@ -1500,6 +1505,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
  AC_SUBST([pamconfdir], [$with_pamconfdir])
  AC_SUBST([rootprefix], [$with_rootprefix])
  AC_SUBST([rootlibdir], [$with_rootlibdir])
@@ -66,7 +65,7 @@ index a5b2e6e..55bb7d8 100644
  
  AC_CONFIG_FILES([
          Makefile po/Makefile.in
-@@ -1617,6 +1623,7 @@ AC_MSG_RESULT([
+@@ -1599,6 +1605,7 @@ AC_MSG_RESULT([
          include_prefix:          ${INCLUDE_PREFIX}
          lib dir:                 ${libdir}
          rootlib dir:             ${with_rootlibdir}
@@ -75,10 +74,10 @@ index a5b2e6e..55bb7d8 100644
          SysV rc?.d directories:  ${SYSTEM_SYSVRCND_PATH}
          Build Python:            ${PYTHON}
 diff --git a/src/core/unit-printf.c b/src/core/unit-printf.c
-index 97135db..14d12f1 100644
+index 7736899..ac5f008 100644
 --- a/src/core/unit-printf.c
 +++ b/src/core/unit-printf.c
-@@ -259,7 +259,7 @@ static int specifier_user_home(char specifier, void *data, void *userdata, char
+@@ -256,7 +256,7 @@ static int specifier_user_home(char specifier, void *data, void *userdata, char
                   * best of it if we can, but fail if we can't */
  
                  if (!c->user || streq(c->user, "root") || streq(c->user, "0"))
@@ -88,21 +87,22 @@ index 97135db..14d12f1 100644
                          return -ENOTSUP;
  
 diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index b597edb..0b32673 100644
+index 08bfdcf..b44b4cd 100644
 --- a/src/nspawn/nspawn.c
 +++ b/src/nspawn/nspawn.c
-@@ -4192,7 +4192,7 @@ int main(int argc, char *argv[]) {
+@@ -4180,8 +4180,7 @@ int main(int argc, char *argv[]) {
+                         r = change_uid_gid(&home);
                          if (r < 0)
                                  _exit(EXIT_FAILURE);
- 
+-
 -                        if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) ||
 +                        if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) ||
                              (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) ||
                              (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0)) {
                                  log_oom();
-@@ -4266,7 +4266,7 @@ int main(int argc, char *argv[]) {
-                                 execvp(argv[optind], argv + optind);
- #endif /* HAVE_EXECVPE */
+@@ -4250,7 +4249,7 @@ int main(int argc, char *argv[]) {
+                         } else if (argc > optind)
+                                 execvpe(argv[optind], argv + optind, env_use);
                          else {
 -                                chdir(home ? home : "/root");
 +                                chdir(home ? home : ROOTHOMEDIR);
@@ -110,10 +110,10 @@ index b597edb..0b32673 100644
                                  execle("/bin/sh", "-sh", NULL, env_use);
                          }
 diff --git a/src/shared/util.c b/src/shared/util.c
-index cbbe3b1..a0e3cc5 100644
+index 241e752..00adab6 100644
 --- a/src/shared/util.c
 +++ b/src/shared/util.c
-@@ -4609,7 +4609,7 @@ int get_user_creds(
+@@ -4604,7 +4604,7 @@ int get_user_creds(
                          *gid = 0;
  
                  if (home)
@@ -122,7 +122,7 @@ index cbbe3b1..a0e3cc5 100644
  
                  if (shell)
                          *shell = "/bin/sh";
-@@ -5611,7 +5611,7 @@ int get_home_dir(char **_h) {
+@@ -5606,7 +5606,7 @@ int get_home_dir(char **_h) {
          /* Hardcode home directory for root to avoid NSS */
          u = getuid();
          if (u == 0) {
@@ -131,21 +131,6 @@ index cbbe3b1..a0e3cc5 100644
                  if (!h)
                          return -ENOMEM;
  
-diff --git a/units/console-shell.service.m4.in b/units/console-shell.service.m4.in
-index 5c80722..efde5f0 100644
---- a/units/console-shell.service.m4.in
-+++ b/units/console-shell.service.m4.in
-@@ -15,8 +15,8 @@ After=rc-local.service
- Before=getty.target
- 
- [Service]
--Environment=HOME=/root
--WorkingDirectory=/root
-+Environment=HOME=@roothomedir@
-+WorkingDirectory=@roothomedir@
- ExecStart=-@SULOGIN@
- ExecStopPost=-@SYSTEMCTL@ poweroff
- Type=idle
 diff --git a/units/emergency.service.in b/units/emergency.service.in
 index 2695d7b..7f47b73 100644
 --- a/units/emergency.service.in
@@ -177,5 +162,5 @@ index de73fee..47f3593 100644
  ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.'
  ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --fail --no-block default"
 -- 
-2.1.4
+1.9.1
 
diff --git a/meta/recipes-core/systemd/systemd/0010-acl-util-avoid-freeing-uninitialized-pointer.patch b/meta/recipes-core/systemd/systemd/0010-acl-util-avoid-freeing-uninitialized-pointer.patch
new file mode 100644
index 0000000..1e4a69d
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0010-acl-util-avoid-freeing-uninitialized-pointer.patch
@@ -0,0 +1,37 @@
+From f17b6474aaca077482a68aedc1de9d654ab21bad Mon Sep 17 00:00:00 2001
+From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
+Date: Tue, 24 Feb 2015 20:40:07 +0100
+Subject: [PATCH 10/26] acl-util: avoid freeing uninitialized pointer
+
+CID#1271344/1271345
+
+(cherry picked from commit 76dcbc4992e895a377aad26f8c4a0dcd71002396)
+---
+ src/shared/acl-util.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/shared/acl-util.c b/src/shared/acl-util.c
+index cbe09d7..e67e9ac 100644
+--- a/src/shared/acl-util.c
++++ b/src/shared/acl-util.c
+@@ -302,7 +302,7 @@ static int acl_entry_equal(acl_entry_t a, acl_entry_t b) {
+                 /* can have only one of those */
+                 return true;
+         case ACL_USER: {
+-                _cleanup_(acl_free_uid_tpp) uid_t *uid_a, *uid_b;
++                _cleanup_(acl_free_uid_tpp) uid_t *uid_a = NULL, *uid_b = NULL;
+ 
+                 uid_a = acl_get_qualifier(a);
+                 if (!uid_a)
+@@ -315,7 +315,7 @@ static int acl_entry_equal(acl_entry_t a, acl_entry_t b) {
+                 return *uid_a == *uid_b;
+         }
+         case ACL_GROUP: {
+-                _cleanup_(acl_free_gid_tpp) gid_t *gid_a, *gid_b;
++                _cleanup_(acl_free_gid_tpp) gid_t *gid_a = NULL, *gid_b = NULL;
+ 
+                 gid_a = acl_get_qualifier(a);
+                 if (!gid_a)
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0011-bootchart-svg-fix-checking-of-list-end.patch b/meta/recipes-core/systemd/systemd/0011-bootchart-svg-fix-checking-of-list-end.patch
new file mode 100644
index 0000000..dca5e20
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0011-bootchart-svg-fix-checking-of-list-end.patch
@@ -0,0 +1,28 @@
+From 668529dde3ecf35e24f39eaf3a3044099e4d5273 Mon Sep 17 00:00:00 2001
+From: Aaro Koskinen <aaro.koskinen@nokia.com>
+Date: Tue, 24 Feb 2015 18:32:31 +0200
+Subject: [PATCH 11/26] bootchart: svg: fix checking of list end
+
+If we have less samples than expected, systemd-bootchart will crash.
+
+(cherry picked from commit c1682f17a0c966988e865c649e565dae41abf32d)
+---
+ src/bootchart/svg.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
+index e111fa9..144177c 100644
+--- a/src/bootchart/svg.c
++++ b/src/bootchart/svg.c
+@@ -1170,7 +1170,7 @@ static void svg_ps_bars(void) {
+ 
+                 ps->sample = ps->sample->next;
+                 sample_hz = ps->sample;
+-                for (ii=0;((ii<(int)arg_hz/2)&&(ps->sample->next));ii++)
++                for (ii=0;((ii<(int)arg_hz/2)&&(sample_hz->next));ii++)
+                         sample_hz = sample_hz->next;
+ 
+                 /* subtract bootchart cpu utilization from total */
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0012-systemd-add-getrandom-syscall-numbers-for-MIPS.patch b/meta/recipes-core/systemd/systemd/0012-systemd-add-getrandom-syscall-numbers-for-MIPS.patch
new file mode 100644
index 0000000..e0cb193
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0012-systemd-add-getrandom-syscall-numbers-for-MIPS.patch
@@ -0,0 +1,38 @@
+From 5b49f6072e901336680708267c3d48a54c5410ae Mon Sep 17 00:00:00 2001
+From: Aaro Koskinen <aaro.koskinen@nokia.com>
+Date: Mon, 23 Feb 2015 16:01:31 +0200
+Subject: [PATCH 12/26] systemd: add getrandom syscall numbers for MIPS
+
+Add getrandom syscall numbers for MIPS. Based on Linux 3.17 kernel
+(commit 42944521af97a3b25516f15f3149aec3779656dc, "MIPS: Wire up new
+syscalls getrandom and memfd_create").
+
+(cherry picked from commit 3bec6d4690d2a7f08dc27b8221299c1db94978c4)
+---
+ src/shared/missing.h | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/shared/missing.h b/src/shared/missing.h
+index b33a70c..e72631e 100644
+--- a/src/shared/missing.h
++++ b/src/shared/missing.h
+@@ -179,6 +179,16 @@ static inline int memfd_create(const char *name, unsigned int flags) {
+ #    define __NR_getrandom 349
+ #  elif defined(__powerpc__)
+ #    define __NR_getrandom 359
++#  elif defined _MIPS_SIM
++#    if _MIPS_SIM == _MIPS_SIM_ABI32
++#      define __NR_getrandom 4353
++#    endif
++#    if _MIPS_SIM == _MIPS_SIM_NABI32
++#      define __NR_getrandom 6317
++#    endif
++#    if _MIPS_SIM == _MIPS_SIM_ABI64
++#      define __NR_getrandom 5313
++#    endif
+ #  else
+ #    warning "__NR_getrandom unknown for your architecture"
+ #    define __NR_getrandom 0xffffffff
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0013-unit-use-weaker-dependencies-between-mount-and-devic.patch b/meta/recipes-core/systemd/systemd/0013-unit-use-weaker-dependencies-between-mount-and-devic.patch
new file mode 100644
index 0000000..1b842a2
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0013-unit-use-weaker-dependencies-between-mount-and-devic.patch
@@ -0,0 +1,33 @@
+From fc9805756d5c0088a3a67705bbf6bea30d0d35e5 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart@poettering.net>
+Date: Wed, 25 Feb 2015 22:05:14 +0100
+Subject: [PATCH 13/26] unit: use weaker dependencies between mount and device
+ units in --user mode
+
+When running in user mode unmounting of mount units when a device
+vanishes is unlikely to work, and even if it would work is already done
+by PID 1 anyway. HEnce, when creating implicit dependencies between
+mount units and their backing devices, created a Wants= type dependency
+in --user mode, but leave a BindsTo= dependency in --system mode.
+
+(cherry picked from commit 5bd4b173605142c7be493aa4d958ebaef21f421d)
+---
+ src/core/unit.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/unit.c b/src/core/unit.c
+index ee8e607..9f1e55e 100644
+--- a/src/core/unit.c
++++ b/src/core/unit.c
+@@ -2845,7 +2845,7 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) {
+         if (r < 0)
+                 return r;
+ 
+-        r = unit_add_two_dependencies(u, UNIT_AFTER, UNIT_BINDS_TO, device, true);
++        r = unit_add_two_dependencies(u, UNIT_AFTER, u->manager->running_as == SYSTEMD_SYSTEM ? UNIT_BINDS_TO : UNIT_WANTS, device, true);
+         if (r < 0)
+                 return r;
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0014-unit-When-stopping-due-to-BindsTo-log-which-unit-cau.patch b/meta/recipes-core/systemd/systemd/0014-unit-When-stopping-due-to-BindsTo-log-which-unit-cau.patch
new file mode 100644
index 0000000..92c4b8f
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0014-unit-When-stopping-due-to-BindsTo-log-which-unit-cau.patch
@@ -0,0 +1,43 @@
+From ca0cf2741ef9db81141f4444ab58dd3552c8fb1f Mon Sep 17 00:00:00 2001
+From: Colin Walters <walters@verbum.org>
+Date: Tue, 17 Feb 2015 13:47:34 -0500
+Subject: [PATCH 14/26] unit: When stopping due to BindsTo=, log which unit
+ caused it
+
+I'm trying to track down a relatively recent change in systemd
+which broke OSTree; see https://bugzilla.gnome.org/show_bug.cgi?id=743891
+
+Systemd started to stop sysroot.mount, and this patch should help
+me debug why at least.
+
+While we're here, "break" on the first unit we find that will
+deactivate, as there's no point in further iteration.
+
+(cherry picked from commit 98f738b62047229af4a929d7996e2ab04253b02c)
+---
+ src/core/unit.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/unit.c b/src/core/unit.c
+index 9f1e55e..563f6fe 100644
+--- a/src/core/unit.c
++++ b/src/core/unit.c
+@@ -1648,12 +1648,14 @@ static void unit_check_binds_to(Unit *u) {
+                         continue;
+ 
+                 stop = true;
++                break;
+         }
+ 
+         if (!stop)
+                 return;
+ 
+-        log_unit_info(u->id, "Unit %s is bound to inactive unit. Stopping, too.", u->id);
++        assert(other);
++        log_unit_info(u->id, "Unit %s is bound to inactive unit %s. Stopping, too.", u->id, other->id);
+ 
+         /* A unit we need to run is gone. Sniff. Let's stop this. */
+         manager_add_job(u->manager, JOB_STOP, u, JOB_FAIL, true, NULL, NULL);
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0015-sysctl-downgrade-message-about-sysctl-overrides-to-d.patch b/meta/recipes-core/systemd/systemd/0015-sysctl-downgrade-message-about-sysctl-overrides-to-d.patch
new file mode 100644
index 0000000..46c25bd
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0015-sysctl-downgrade-message-about-sysctl-overrides-to-d.patch
@@ -0,0 +1,30 @@
+From 2439dc6083d27271ee942559f0f73c99fa9e2b4e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Thu, 26 Feb 2015 19:00:11 -0500
+Subject: [PATCH 15/26] sysctl: downgrade message about sysctl overrides to
+ debug
+
+Printing it at info level was tedious. We don't do that for any other
+overrides.
+
+(cherry picked from commit 7933e4266f8124e3fca71f67757abd44155fa1cb)
+---
+ src/sysctl/sysctl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
+index 275a5b7..2415d84 100644
+--- a/src/sysctl/sysctl.c
++++ b/src/sysctl/sysctl.c
+@@ -176,7 +176,7 @@ found:
+                         if (streq(value, existing))
+                                 continue;
+ 
+-                        log_info("Overwriting earlier assignment of %s in file '%s'.", p, path);
++                        log_debug("Overwriting earlier assignment of %s in file '%s'.", p, path);
+                         free(hashmap_remove(sysctl_options, p));
+                         free(v);
+                 }
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0016-sysctl-add-some-hints-how-to-override-settings.patch b/meta/recipes-core/systemd/systemd/0016-sysctl-add-some-hints-how-to-override-settings.patch
new file mode 100644
index 0000000..87dce1f
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0016-sysctl-add-some-hints-how-to-override-settings.patch
@@ -0,0 +1,39 @@
+From af6a96a36415400482ad504392ea93c6a0e2ed43 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Thu, 26 Feb 2015 19:05:51 -0500
+Subject: [PATCH 16/26] sysctl: add some hints how to override settings
+
+Also a link to decent documentation for sysrq keys. It is surprising
+hard to find.
+
+https://lists.fedoraproject.org/pipermail/devel/2015-February/208412.html
+(cherry picked from commit 16b65d7f463e91f6299dfa7b83d4b5fbeb109d1c)
+---
+ sysctl.d/50-default.conf | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/sysctl.d/50-default.conf b/sysctl.d/50-default.conf
+index f189233..def151b 100644
+--- a/sysctl.d/50-default.conf
++++ b/sysctl.d/50-default.conf
+@@ -5,9 +5,16 @@
+ #  the Free Software Foundation; either version 2.1 of the License, or
+ #  (at your option) any later version.
+ 
+-# See sysctl.d(5) and core(5) for for details.
++# See sysctl.d(5) and core(5) for for documentation.
++
++# To override settings in this file, create a local file in /etc
++# (e.g. /etc/sysctl.d/90-override.conf), and put any assignments
++# there.
+ 
+ # System Request functionality of the kernel (SYNC)
++#
++# Use kernel.sysrq = 1 to allow all keys.
++# See http://fedoraproject.org/wiki/QA/Sysrq for a list of values and keys.
+ kernel.sysrq = 16
+ 
+ # Append the PID to the core filename
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0017-core-rework-device-state-logic.patch b/meta/recipes-core/systemd/systemd/0017-core-rework-device-state-logic.patch
new file mode 100644
index 0000000..a3ab3e4
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0017-core-rework-device-state-logic.patch
@@ -0,0 +1,912 @@
+From 5b788e932fe918fb022bc20c3a15eb59e0fad53a Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart@poettering.net>
+Date: Fri, 27 Feb 2015 21:55:08 +0100
+Subject: [PATCH 17/26] core: rework device state logic
+
+This change introduces a new state "tentative" for device units. Device
+units are considered "plugged" when udev announced them, "dead" when
+they are not available in the kernel, and "tentative" when they are
+referenced in /proc/self/mountinfo or /proc/swaps but not (yet)
+announced via udev.
+
+This should fix a race when device nodes (like loop devices) are created
+and immediately mounted. Previously, systemd might end up seeing the
+mount unit before the device, and would thus pull down the mount because
+its BindTo dependency on the device would not be fulfilled.
+
+(cherry picked from commit 628c89cc68ab96fce2de7ebba5933725d147aecc)
+---
+ src/core/device.c | 368 +++++++++++++++++++++++++++++++++---------------------
+ src/core/device.h |  14 ++-
+ src/core/mount.c  |  46 ++++---
+ src/core/swap.c   |  32 +++--
+ src/core/swap.h   |   4 +-
+ src/core/unit.c   |   1 -
+ 6 files changed, 285 insertions(+), 180 deletions(-)
+
+diff --git a/src/core/device.c b/src/core/device.c
+index d3deac3..75b9a46 100644
+--- a/src/core/device.c
++++ b/src/core/device.c
+@@ -36,7 +36,8 @@
+ 
+ static const UnitActiveState state_translation_table[_DEVICE_STATE_MAX] = {
+         [DEVICE_DEAD] = UNIT_INACTIVE,
+-        [DEVICE_PLUGGED] = UNIT_ACTIVE
++        [DEVICE_TENTATIVE] = UNIT_ACTIVATING,
++        [DEVICE_PLUGGED] = UNIT_ACTIVE,
+ };
+ 
+ static int device_dispatch_io(sd_event_source *source, int fd, uint32_t revents, void *userdata);
+@@ -65,6 +66,41 @@ static void device_unset_sysfs(Device *d) {
+         d->sysfs = NULL;
+ }
+ 
++static int device_set_sysfs(Device *d, const char *sysfs) {
++        Device *first;
++        char *copy;
++        int r;
++
++        assert(d);
++
++        if (streq_ptr(d->sysfs, sysfs))
++                return 0;
++
++        r = hashmap_ensure_allocated(&UNIT(d)->manager->devices_by_sysfs, &string_hash_ops);
++        if (r < 0)
++                return r;
++
++        copy = strdup(sysfs);
++        if (!copy)
++                return -ENOMEM;
++
++        device_unset_sysfs(d);
++
++        first = hashmap_get(UNIT(d)->manager->devices_by_sysfs, sysfs);
++        LIST_PREPEND(same_sysfs, first, d);
++
++        r = hashmap_replace(UNIT(d)->manager->devices_by_sysfs, copy, first);
++        if (r < 0) {
++                LIST_REMOVE(same_sysfs, first, d);
++                free(copy);
++                return r;
++        }
++
++        d->sysfs = copy;
++
++        return 0;
++}
++
+ static void device_init(Unit *u) {
+         Device *d = DEVICE(u);
+ 
+@@ -112,8 +148,13 @@ static int device_coldplug(Unit *u) {
+         assert(d);
+         assert(d->state == DEVICE_DEAD);
+ 
+-        if (d->sysfs)
++        if (d->found & DEVICE_FOUND_UDEV)
++                /* If udev says the device is around, it's around */
+                 device_set_state(d, DEVICE_PLUGGED);
++        else if (d->found != DEVICE_NOT_FOUND)
++                /* If a device is found in /proc/self/mountinfo or
++                 * /proc/swaps, it's "tentatively" around. */
++                device_set_state(d, DEVICE_TENTATIVE);
+ 
+         return 0;
+ }
+@@ -142,49 +183,9 @@ _pure_ static const char *device_sub_state_to_string(Unit *u) {
+         return device_state_to_string(DEVICE(u)->state);
+ }
+ 
+-static int device_add_escaped_name(Unit *u, const char *dn) {
+-        _cleanup_free_ char *e = NULL;
+-        int r;
+-
+-        assert(u);
+-        assert(dn);
+-        assert(dn[0] == '/');
+-
+-        e = unit_name_from_path(dn, ".device");
+-        if (!e)
+-                return -ENOMEM;
+-
+-        r = unit_add_name(u, e);
+-        if (r < 0 && r != -EEXIST)
+-                return r;
+-
+-        return 0;
+-}
+-
+-static int device_find_escape_name(Manager *m, const char *dn, Unit **_u) {
+-        _cleanup_free_ char *e = NULL;
+-        Unit *u;
+-
+-        assert(m);
+-        assert(dn);
+-        assert(dn[0] == '/');
+-        assert(_u);
+-
+-        e = unit_name_from_path(dn, ".device");
+-        if (!e)
+-                return -ENOMEM;
+-
+-        u = manager_get_unit(m, e);
+-        if (u) {
+-                *_u = u;
+-                return 1;
+-        }
+-
+-        return 0;
+-}
+-
+-static int device_make_description(Unit *u, struct udev_device *dev, const char *path) {
++static int device_update_description(Unit *u, struct udev_device *dev, const char *path) {
+         const char *model;
++        int r;
+ 
+         assert(u);
+         assert(dev);
+@@ -209,13 +210,16 @@ static int device_make_description(Unit *u, struct udev_device *dev, const char
+ 
+                         j = strjoin(model, " ", label, NULL);
+                         if (j)
+-                                return unit_set_description(u, j);
+-                }
++                                r = unit_set_description(u, j);
++                } else
++                        r = unit_set_description(u, model);
++        } else
++                r = unit_set_description(u, path);
+ 
+-                return unit_set_description(u, model);
+-        }
++        if (r < 0)
++                log_unit_error_errno(u->id, r, "Failed to set device description: %m");
+ 
+-        return unit_set_description(u, path);
++        return r;
+ }
+ 
+ static int device_add_udev_wants(Unit *u, struct udev_device *dev) {
+@@ -242,20 +246,20 @@ static int device_add_udev_wants(Unit *u, struct udev_device *dev) {
+ 
+                 n = unit_name_mangle(e, MANGLE_NOGLOB);
+                 if (!n)
+-                        return -ENOMEM;
++                        return log_oom();
+ 
+                 r = unit_add_dependency_by_name(u, UNIT_WANTS, n, NULL, true);
+                 if (r < 0)
+-                        return r;
++                        return log_unit_error_errno(u->id, r, "Failed to add wants dependency: %m");
+         }
+         if (!isempty(state))
+-                log_unit_warning(u->id, "Property %s on %s has trailing garbage, ignoring.",
+-                                 property, strna(udev_device_get_syspath(dev)));
++                log_unit_warning(u->id, "Property %s on %s has trailing garbage, ignoring.", property, strna(udev_device_get_syspath(dev)));
+ 
+         return 0;
+ }
+ 
+-static int device_update_unit(Manager *m, struct udev_device *dev, const char *path, bool main) {
++static int device_setup_unit(Manager *m, struct udev_device *dev, const char *path, bool main) {
++        _cleanup_free_ char *e = NULL;
+         const char *sysfs;
+         Unit *u = NULL;
+         bool delete;
+@@ -269,12 +273,18 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
+         if (!sysfs)
+                 return 0;
+ 
+-        r = device_find_escape_name(m, path, &u);
+-        if (r < 0)
+-                return r;
++        e = unit_name_from_path(path, ".device");
++        if (!e)
++                return log_oom();
++
++        u = manager_get_unit(m, e);
+ 
+-        if (u && DEVICE(u)->sysfs && !path_equal(DEVICE(u)->sysfs, sysfs))
++        if (u &&
++            DEVICE(u)->sysfs &&
++            !path_equal(DEVICE(u)->sysfs, sysfs)) {
++                log_unit_error(u->id, "Device %s appeared twice with different sysfs paths %s and %s", e, DEVICE(u)->sysfs, sysfs);
+                 return -EEXIST;
++        }
+ 
+         if (!u) {
+                 delete = true;
+@@ -283,7 +293,7 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
+                 if (!u)
+                         return log_oom();
+ 
+-                r = device_add_escaped_name(u, path);
++                r = unit_add_name(u, e);
+                 if (r < 0)
+                         goto fail;
+ 
+@@ -295,37 +305,16 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
+          * actually been seen yet ->sysfs will not be
+          * initialized. Hence initialize it if necessary. */
+ 
+-        if (!DEVICE(u)->sysfs) {
+-                Device *first;
+-
+-                DEVICE(u)->sysfs = strdup(sysfs);
+-                if (!DEVICE(u)->sysfs) {
+-                        r = -ENOMEM;
+-                        goto fail;
+-                }
+-
+-                r = hashmap_ensure_allocated(&m->devices_by_sysfs, &string_hash_ops);
+-                if (r < 0)
+-                        goto fail;
+-
+-                first = hashmap_get(m->devices_by_sysfs, sysfs);
+-                LIST_PREPEND(same_sysfs, first, DEVICE(u));
+-
+-                r = hashmap_replace(m->devices_by_sysfs, DEVICE(u)->sysfs, first);
+-                if (r < 0)
+-                        goto fail;
+-        }
+-
+-        device_make_description(u, dev, path);
++        r = device_set_sysfs(DEVICE(u), sysfs);
++        if (r < 0)
++                goto fail;
+ 
+-        if (main) {
+-                /* The additional systemd udev properties we only
+-                 * interpret for the main object */
++        (void) device_update_description(u, dev, path);
+ 
+-                r = device_add_udev_wants(u, dev);
+-                if (r < 0)
+-                        goto fail;
+-        }
++        /* The additional systemd udev properties we only interpret
++         * for the main object */
++        if (main)
++                (void) device_add_udev_wants(u, dev);
+ 
+         /* Note that this won't dispatch the load queue, the caller
+          * has to do that if needed and appropriate */
+@@ -334,7 +323,7 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
+         return 0;
+ 
+ fail:
+-        log_warning_errno(r, "Failed to load device unit: %m");
++        log_unit_warning_errno(u->id, r, "Failed to set up device unit: %m");
+ 
+         if (delete && u)
+                 unit_free(u);
+@@ -342,7 +331,7 @@ fail:
+         return r;
+ }
+ 
+-static int device_process_new_device(Manager *m, struct udev_device *dev) {
++static int device_process_new(Manager *m, struct udev_device *dev) {
+         const char *sysfs, *dn, *alias;
+         struct udev_list_entry *item = NULL, *first = NULL;
+         int r;
+@@ -354,14 +343,14 @@ static int device_process_new_device(Manager *m, struct udev_device *dev) {
+                 return 0;
+ 
+         /* Add the main unit named after the sysfs path */
+-        r = device_update_unit(m, dev, sysfs, true);
++        r = device_setup_unit(m, dev, sysfs, true);
+         if (r < 0)
+                 return r;
+ 
+         /* Add an additional unit for the device node */
+         dn = udev_device_get_devnode(dev);
+         if (dn)
+-                device_update_unit(m, dev, dn, false);
++                (void) device_setup_unit(m, dev, dn, false);
+ 
+         /* Add additional units for all symlinks */
+         first = udev_device_get_devlinks_list_entry(dev);
+@@ -388,7 +377,7 @@ static int device_process_new_device(Manager *m, struct udev_device *dev) {
+                             st.st_rdev != udev_device_get_devnum(dev))
+                                 continue;
+ 
+-                device_update_unit(m, dev, p, false);
++                (void) device_setup_unit(m, dev, p, false);
+         }
+ 
+         /* Add additional units for all explicitly configured
+@@ -405,7 +394,7 @@ static int device_process_new_device(Manager *m, struct udev_device *dev) {
+                         e[l] = 0;
+ 
+                         if (path_is_absolute(e))
+-                                device_update_unit(m, dev, e, false);
++                                (void) device_setup_unit(m, dev, e, false);
+                         else
+                                 log_warning("SYSTEMD_ALIAS for %s is not an absolute path, ignoring: %s", sysfs, e);
+                 }
+@@ -416,39 +405,62 @@ static int device_process_new_device(Manager *m, struct udev_device *dev) {
+         return 0;
+ }
+ 
+-static void device_set_path_plugged(Manager *m, struct udev_device *dev) {
+-        const char *sysfs;
++static void device_update_found_one(Device *d, bool add, DeviceFound found, bool now) {
++        DeviceFound n;
++
++        assert(d);
++
++        n = add ? (d->found | found) : (d->found & ~found);
++        if (n == d->found)
++                return;
++
++        d->found = n;
++
++        if (now) {
++                if (d->found & DEVICE_FOUND_UDEV)
++                        device_set_state(d, DEVICE_PLUGGED);
++                else if (d->found != DEVICE_NOT_FOUND)
++                        device_set_state(d, DEVICE_TENTATIVE);
++                else
++                        device_set_state(d, DEVICE_DEAD);
++        }
++}
++
++static int device_update_found_by_sysfs(Manager *m, const char *sysfs, bool add, DeviceFound found, bool now) {
+         Device *d, *l;
+ 
+         assert(m);
+-        assert(dev);
++        assert(sysfs);
+ 
+-        sysfs = udev_device_get_syspath(dev);
+-        if (!sysfs)
+-                return;
++        if (found == DEVICE_NOT_FOUND)
++                return 0;
+ 
+         l = hashmap_get(m->devices_by_sysfs, sysfs);
+         LIST_FOREACH(same_sysfs, d, l)
+-                device_set_state(d, DEVICE_PLUGGED);
++                device_update_found_one(d, add, found, now);
++
++        return 0;
+ }
+ 
+-static int device_process_removed_device(Manager *m, struct udev_device *dev) {
+-        const char *sysfs;
+-        Device *d;
++static int device_update_found_by_name(Manager *m, const char *path, bool add, DeviceFound found, bool now) {
++        _cleanup_free_ char *e = NULL;
++        Unit *u;
+ 
+         assert(m);
+-        assert(dev);
++        assert(path);
+ 
+-        sysfs = udev_device_get_syspath(dev);
+-        if (!sysfs)
+-                return -ENOMEM;
++        if (found == DEVICE_NOT_FOUND)
++                return 0;
+ 
+-        /* Remove all units of this sysfs path */
+-        while ((d = hashmap_get(m->devices_by_sysfs, sysfs))) {
+-                device_unset_sysfs(d);
+-                device_set_state(d, DEVICE_DEAD);
+-        }
++        e = unit_name_from_path(path, ".device");
++        if (!e)
++                return log_oom();
+ 
++        u = manager_get_unit(m, e);
++        if (!u)
++                return 0;
++
++        device_update_found_one(DEVICE(u), add, found, now);
+         return 0;
+ }
+ 
+@@ -464,22 +476,6 @@ static bool device_is_ready(struct udev_device *dev) {
+         return parse_boolean(ready) != 0;
+ }
+ 
+-static int device_process_new_path(Manager *m, const char *path) {
+-        _cleanup_udev_device_unref_ struct udev_device *dev = NULL;
+-
+-        assert(m);
+-        assert(path);
+-
+-        dev = udev_device_new_from_syspath(m->udev, path);
+-        if (!dev)
+-                return log_oom();
+-
+-        if (!device_is_ready(dev))
+-                return 0;
+-
+-        return device_process_new_device(m, dev);
+-}
+-
+ static Unit *device_following(Unit *u) {
+         Device *d = DEVICE(u);
+         Device *other, *first = NULL;
+@@ -606,12 +602,31 @@ static int device_enumerate(Manager *m) {
+                 goto fail;
+ 
+         first = udev_enumerate_get_list_entry(e);
+-        udev_list_entry_foreach(item, first)
+-                device_process_new_path(m, udev_list_entry_get_name(item));
++        udev_list_entry_foreach(item, first) {
++                _cleanup_udev_device_unref_ struct udev_device *dev = NULL;
++                const char *sysfs;
++
++                sysfs = udev_list_entry_get_name(item);
++
++                dev = udev_device_new_from_syspath(m->udev, sysfs);
++                if (!dev) {
++                        log_oom();
++                        continue;
++                }
++
++                if (!device_is_ready(dev))
++                        continue;
++
++                (void) device_process_new(m, dev);
++
++                device_update_found_by_sysfs(m, sysfs, true, DEVICE_FOUND_UDEV, false);
++        }
+ 
+         return 0;
+ 
+ fail:
++        log_error_errno(r, "Failed to enumerate devices: %m");
++
+         device_shutdown(m);
+         return r;
+ }
+@@ -619,7 +634,7 @@ fail:
+ static int device_dispatch_io(sd_event_source *source, int fd, uint32_t revents, void *userdata) {
+         _cleanup_udev_device_unref_ struct udev_device *dev = NULL;
+         Manager *m = userdata;
+-        const char *action;
++        const char *action, *sysfs;
+         int r;
+ 
+         assert(m);
+@@ -641,33 +656,47 @@ static int device_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
+         if (!dev)
+                 return 0;
+ 
++        sysfs = udev_device_get_syspath(dev);
++        if (!sysfs) {
++                log_error("Failed to get udev sys path.");
++                return 0;
++        }
++
+         action = udev_device_get_action(dev);
+         if (!action) {
+                 log_error("Failed to get udev action string.");
+                 return 0;
+         }
+ 
+-        if (streq(action, "remove") || !device_is_ready(dev))  {
+-                r = device_process_removed_device(m, dev);
+-                if (r < 0)
+-                        log_error_errno(r, "Failed to process device remove event: %m");
+-
+-                r = swap_process_removed_device(m, dev);
++        if (streq(action, "remove"))  {
++                r = swap_process_device_remove(m, dev);
+                 if (r < 0)
+                         log_error_errno(r, "Failed to process swap device remove event: %m");
+ 
+-        } else {
+-                r = device_process_new_device(m, dev);
+-                if (r < 0)
+-                        log_error_errno(r, "Failed to process device new event: %m");
++                /* If we get notified that a device was removed by
++                 * udev, then it's completely gone, hence unset all
++                 * found bits */
++                device_update_found_by_sysfs(m, sysfs, false, DEVICE_FOUND_UDEV|DEVICE_FOUND_MOUNT|DEVICE_FOUND_SWAP, true);
+ 
+-                r = swap_process_new_device(m, dev);
++        } else if (device_is_ready(dev)) {
++
++                (void) device_process_new(m, dev);
++
++                r = swap_process_device_new(m, dev);
+                 if (r < 0)
+                         log_error_errno(r, "Failed to process swap device new event: %m");
+ 
+                 manager_dispatch_load_queue(m);
+ 
+-                device_set_path_plugged(m, dev);
++                /* The device is found now, set the udev found bit */
++                device_update_found_by_sysfs(m, sysfs, true, DEVICE_FOUND_UDEV, true);
++
++        } else {
++                /* The device is nominally around, but not ready for
++                 * us. Hence unset the udev bit, but leave the rest
++                 * around. */
++
++                device_update_found_by_sysfs(m, sysfs, false, DEVICE_FOUND_UDEV, true);
+         }
+ 
+         return 0;
+@@ -686,9 +715,58 @@ static bool device_supported(Manager *m) {
+         return read_only <= 0;
+ }
+ 
++int device_found_node(Manager *m, const char *node, bool add, DeviceFound found, bool now) {
++        _cleanup_udev_device_unref_ struct udev_device *dev = NULL;
++        struct stat st;
++
++        assert(m);
++        assert(node);
++
++        /* This is called whenever we find a device referenced in
++         * /proc/swaps or /proc/self/mounts. Such a device might be
++         * mounted/enabled at a time where udev has not finished
++         * probing it yet, and we thus haven't learned about it
++         * yet. In this case we will set the device unit to
++         * "tentative" state. */
++
++        if (add) {
++                if (!path_startswith(node, "/dev"))
++                        return 0;
++
++                if (stat(node, &st) < 0) {
++                        if (errno == ENOENT)
++                                return 0;
++
++                        return log_error_errno(errno, "Failed to stat device node file %s: %m", node);
++                }
++
++                if (!S_ISBLK(st.st_mode) && !S_ISCHR(st.st_mode))
++                        return 0;
++
++                dev = udev_device_new_from_devnum(m->udev, S_ISBLK(st.st_mode) ? 'b' : 'c', st.st_rdev);
++                if (!dev) {
++                        if (errno == ENOENT)
++                                return 0;
++
++                        return log_oom();
++                }
++
++                /* If the device is known in the kernel and newly
++                 * appeared, then we'll create a device unit for it,
++                 * under the name referenced in /proc/swaps or
++                 * /proc/self/mountinfo. */
++
++                (void) device_setup_unit(m, dev, node, false);
++        }
++
++        /* Update the device unit's state, should it exist */
++        return device_update_found_by_name(m, node, add, found, now);
++}
++
+ static const char* const device_state_table[_DEVICE_STATE_MAX] = {
+         [DEVICE_DEAD] = "dead",
+-        [DEVICE_PLUGGED] = "plugged"
++        [DEVICE_TENTATIVE] = "tentative",
++        [DEVICE_PLUGGED] = "plugged",
+ };
+ 
+ DEFINE_STRING_TABLE_LOOKUP(device_state, DeviceState);
+diff --git a/src/core/device.h b/src/core/device.h
+index bb7ae07..0609b20 100644
+--- a/src/core/device.h
++++ b/src/core/device.h
+@@ -29,20 +29,28 @@ typedef struct Device Device;
+  * simplifies the state engine greatly */
+ typedef enum DeviceState {
+         DEVICE_DEAD,
+-        DEVICE_PLUGGED,
++        DEVICE_TENTATIVE, /* mounted or swapped, but not (yet) announced by udev */
++        DEVICE_PLUGGED,   /* announced by udev */
+         _DEVICE_STATE_MAX,
+         _DEVICE_STATE_INVALID = -1
+ } DeviceState;
+ 
++typedef enum DeviceFound {
++        DEVICE_NOT_FOUND = 0,
++        DEVICE_FOUND_UDEV = 1,
++        DEVICE_FOUND_MOUNT = 2,
++        DEVICE_FOUND_SWAP = 4,
++} DeviceFound;
++
+ struct Device {
+         Unit meta;
+ 
+         char *sysfs;
++        DeviceFound found;
+ 
+         /* In order to be able to distinguish dependencies on
+         different device nodes we might end up creating multiple
+         devices for the same sysfs path. We chain them up here. */
+-
+         LIST_FIELDS(struct Device, same_sysfs);
+ 
+         DeviceState state;
+@@ -52,3 +60,5 @@ extern const UnitVTable device_vtable;
+ 
+ const char* device_state_to_string(DeviceState i) _const_;
+ DeviceState device_state_from_string(const char *s) _pure_;
++
++int device_found_node(Manager *m, const char *node, bool add, DeviceFound found, bool now);
+diff --git a/src/core/mount.c b/src/core/mount.c
+index f3977e6..c971330 100644
+--- a/src/core/mount.c
++++ b/src/core/mount.c
+@@ -1391,7 +1391,7 @@ static int mount_dispatch_timer(sd_event_source *source, usec_t usec, void *user
+         return 0;
+ }
+ 
+-static int mount_add_one(
++static int mount_setup_unit(
+                 Manager *m,
+                 const char *what,
+                 const char *where,
+@@ -1434,7 +1434,7 @@ static int mount_add_one(
+ 
+                 u = unit_new(m, sizeof(Mount));
+                 if (!u)
+-                        return -ENOMEM;
++                        return log_oom();
+ 
+                 r = unit_add_name(u, e);
+                 if (r < 0)
+@@ -1547,6 +1547,8 @@ static int mount_add_one(
+         return 0;
+ 
+ fail:
++        log_warning_errno(r, "Failed to set up mount unit: %m");
++
+         if (delete && u)
+                 unit_free(u);
+ 
+@@ -1554,33 +1556,36 @@ fail:
+ }
+ 
+ static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
+-        _cleanup_(mnt_free_tablep) struct libmnt_table *tb = NULL;
+-        _cleanup_(mnt_free_iterp) struct libmnt_iter *itr = NULL;
+-        struct libmnt_fs *fs;
++        _cleanup_(mnt_free_tablep) struct libmnt_table *t = NULL;
++        _cleanup_(mnt_free_iterp) struct libmnt_iter *i = NULL;
+         int r = 0;
+ 
+         assert(m);
+ 
+-        tb = mnt_new_table();
+-        itr = mnt_new_iter(MNT_ITER_FORWARD);
+-        if (!tb || !itr)
++        t = mnt_new_table();
++        if (!t)
+                 return log_oom();
+ 
+-        r = mnt_table_parse_mtab(tb, NULL);
++        i = mnt_new_iter(MNT_ITER_FORWARD);
++        if (!i)
++                return log_oom();
++
++        r = mnt_table_parse_mtab(t, NULL);
+         if (r < 0)
+-                return r;
++                return log_error_errno(r, "Failed to parse /proc/self/mountinfo: %m");
+ 
+         r = 0;
+         for (;;) {
+                 const char *device, *path, *options, *fstype;
+                 _cleanup_free_ const char *d = NULL, *p = NULL;
++                struct libmnt_fs *fs;
+                 int k;
+ 
+-                k = mnt_table_next_fs(tb, itr, &fs);
++                k = mnt_table_next_fs(t, i, &fs);
+                 if (k == 1)
+                         break;
+-                else if (k < 0)
+-                        return log_error_errno(k, "Failed to get next entry from /etc/fstab: %m");
++                if (k < 0)
++                        return log_error_errno(k, "Failed to get next entry from /proc/self/mountinfo: %m");
+ 
+                 device = mnt_fs_get_source(fs);
+                 path = mnt_fs_get_target(fs);
+@@ -1588,11 +1593,16 @@ static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
+                 fstype = mnt_fs_get_fstype(fs);
+ 
+                 d = cunescape(device);
++                if (!d)
++                        return log_oom();
++
+                 p = cunescape(path);
+-                if (!d || !p)
++                if (!p)
+                         return log_oom();
+ 
+-                k = mount_add_one(m, d, p, options, fstype, set_flags);
++                (void) device_found_node(m, d, true, DEVICE_FOUND_MOUNT, set_flags);
++
++                k = mount_setup_unit(m, d, p, options, fstype, set_flags);
+                 if (r == 0 && k < 0)
+                         r = k;
+         }
+@@ -1736,8 +1746,6 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
+ 
+         r = mount_load_proc_self_mountinfo(m, true);
+         if (r < 0) {
+-                log_error_errno(r, "Failed to reread /proc/self/mountinfo: %m");
+-
+                 /* Reset flags, just in case, for later calls */
+                 LIST_FOREACH(units_by_type, u, m->units_by_type[UNIT_MOUNT]) {
+                         Mount *mount = MOUNT(u);
+@@ -1770,6 +1778,10 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
+                                 break;
+                         }
+ 
++                        if (mount->parameters_proc_self_mountinfo.what)
++                                (void) device_found_node(m, mount->parameters_proc_self_mountinfo.what, false, DEVICE_FOUND_MOUNT, true);
++
++
+                 } else if (mount->just_mounted || mount->just_changed) {
+ 
+                         /* New or changed mount entry */
+diff --git a/src/core/swap.c b/src/core/swap.c
+index 6997921..5c19af5 100644
+--- a/src/core/swap.c
++++ b/src/core/swap.c
+@@ -338,7 +338,7 @@ static int swap_load(Unit *u) {
+         return swap_verify(s);
+ }
+ 
+-static int swap_add_one(
++static int swap_setup_unit(
+                 Manager *m,
+                 const char *what,
+                 const char *what_proc_swaps,
+@@ -363,8 +363,10 @@ static int swap_add_one(
+ 
+         if (u &&
+             SWAP(u)->from_proc_swaps &&
+-            !path_equal(SWAP(u)->parameters_proc_swaps.what, what_proc_swaps))
++            !path_equal(SWAP(u)->parameters_proc_swaps.what, what_proc_swaps)) {
++                log_error("Swap %s appeared twice with different device paths %s and %s", e, SWAP(u)->parameters_proc_swaps.what, what_proc_swaps);
+                 return -EEXIST;
++        }
+ 
+         if (!u) {
+                 delete = true;
+@@ -379,7 +381,7 @@ static int swap_add_one(
+ 
+                 SWAP(u)->what = strdup(what);
+                 if (!SWAP(u)->what) {
+-                        r = log_oom();
++                        r = -ENOMEM;
+                         goto fail;
+                 }
+ 
+@@ -407,7 +409,6 @@ static int swap_add_one(
+         p->priority = priority;
+ 
+         unit_add_to_dbus_queue(u);
+-
+         return 0;
+ 
+ fail:
+@@ -419,7 +420,7 @@ fail:
+         return r;
+ }
+ 
+-static int swap_process_new_swap(Manager *m, const char *device, int prio, bool set_flags) {
++static int swap_process_new(Manager *m, const char *device, int prio, bool set_flags) {
+         _cleanup_udev_device_unref_ struct udev_device *d = NULL;
+         struct udev_list_entry *item = NULL, *first = NULL;
+         const char *dn;
+@@ -428,7 +429,7 @@ static int swap_process_new_swap(Manager *m, const char *device, int prio, bool
+ 
+         assert(m);
+ 
+-        r = swap_add_one(m, device, device, prio, set_flags);
++        r = swap_setup_unit(m, device, device, prio, set_flags);
+         if (r < 0)
+                 return r;
+ 
+@@ -444,7 +445,7 @@ static int swap_process_new_swap(Manager *m, const char *device, int prio, bool
+         /* Add the main device node */
+         dn = udev_device_get_devnode(d);
+         if (dn && !streq(dn, device))
+-                swap_add_one(m, dn, device, prio, set_flags);
++                swap_setup_unit(m, dn, device, prio, set_flags);
+ 
+         /* Add additional units for all symlinks */
+         first = udev_device_get_devlinks_list_entry(d);
+@@ -465,7 +466,7 @@ static int swap_process_new_swap(Manager *m, const char *device, int prio, bool
+                             st.st_rdev != udev_device_get_devnum(d))
+                                 continue;
+ 
+-                swap_add_one(m, p, device, prio, set_flags);
++                swap_setup_unit(m, p, device, prio, set_flags);
+         }
+ 
+         return r;
+@@ -1091,15 +1092,17 @@ static int swap_load_proc_swaps(Manager *m, bool set_flags) {
+                         if (k == EOF)
+                                 break;
+ 
+-                        log_warning("Failed to parse /proc/swaps:%u", i);
++                        log_warning("Failed to parse /proc/swaps:%u.", i);
+                         continue;
+                 }
+ 
+                 d = cunescape(dev);
+                 if (!d)
+-                        return -ENOMEM;
++                        return log_oom();
++
++                device_found_node(m, d, true, DEVICE_FOUND_SWAP, set_flags);
+ 
+-                k = swap_process_new_swap(m, d, prio, set_flags);
++                k = swap_process_new(m, d, prio, set_flags);
+                 if (k < 0)
+                         r = k;
+         }
+@@ -1151,6 +1154,9 @@ static int swap_dispatch_io(sd_event_source *source, int fd, uint32_t revents, v
+                                 break;
+                         }
+ 
++                        if (swap->what)
++                                device_found_node(m, swap->what, false, DEVICE_FOUND_SWAP, true);
++
+                 } else if (swap->just_activated) {
+ 
+                         /* New swap entry */
+@@ -1298,7 +1304,7 @@ fail:
+         return r;
+ }
+ 
+-int swap_process_new_device(Manager *m, struct udev_device *dev) {
++int swap_process_device_new(Manager *m, struct udev_device *dev) {
+         struct udev_list_entry *item = NULL, *first = NULL;
+         _cleanup_free_ char *e = NULL;
+         const char *dn;
+@@ -1341,7 +1347,7 @@ int swap_process_new_device(Manager *m, struct udev_device *dev) {
+         return r;
+ }
+ 
+-int swap_process_removed_device(Manager *m, struct udev_device *dev) {
++int swap_process_device_remove(Manager *m, struct udev_device *dev) {
+         const char *dn;
+         int r = 0;
+         Swap *s;
+diff --git a/src/core/swap.h b/src/core/swap.h
+index 73e64d8..914a2db 100644
+--- a/src/core/swap.h
++++ b/src/core/swap.h
+@@ -116,8 +116,8 @@ struct Swap {
+ 
+ extern const UnitVTable swap_vtable;
+ 
+-int swap_process_new_device(Manager *m, struct udev_device *dev);
+-int swap_process_removed_device(Manager *m, struct udev_device *dev);
++int swap_process_device_new(Manager *m, struct udev_device *dev);
++int swap_process_device_remove(Manager *m, struct udev_device *dev);
+ 
+ const char* swap_state_to_string(SwapState i) _const_;
+ SwapState swap_state_from_string(const char *s) _pure_;
+diff --git a/src/core/unit.c b/src/core/unit.c
+index 563f6fe..a6558ee 100644
+--- a/src/core/unit.c
++++ b/src/core/unit.c
+@@ -2843,7 +2843,6 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) {
+                 return -ENOMEM;
+ 
+         r = manager_load_unit(u->manager, e, NULL, NULL, &device);
+-
+         if (r < 0)
+                 return r;
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0018-core-fix-return-value-on-OOM.patch b/meta/recipes-core/systemd/systemd/0018-core-fix-return-value-on-OOM.patch
new file mode 100644
index 0000000..d614085
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0018-core-fix-return-value-on-OOM.patch
@@ -0,0 +1,26 @@
+From 3d3a67138c63b47f2a5723577f886bc3c7995748 Mon Sep 17 00:00:00 2001
+From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
+Date: Sat, 28 Feb 2015 23:39:55 +0100
+Subject: [PATCH 18/26] core: fix return value on OOM
+
+(cherry picked from commit c43b2132f37264600cc26e07c8d85dfdd6c969f0)
+---
+ src/core/device.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/core/device.c b/src/core/device.c
+index 75b9a46..1cc103c 100644
+--- a/src/core/device.c
++++ b/src/core/device.c
+@@ -211,6 +211,8 @@ static int device_update_description(Unit *u, struct udev_device *dev, const cha
+                         j = strjoin(model, " ", label, NULL);
+                         if (j)
+                                 r = unit_set_description(u, j);
++                        else
++                                r = -ENOMEM;
+                 } else
+                         r = unit_set_description(u, model);
+         } else
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0019-machined-use-x-machine-unix-prefix-for-the-container.patch b/meta/recipes-core/systemd/systemd/0019-machined-use-x-machine-unix-prefix-for-the-container.patch
new file mode 100644
index 0000000..d94da60
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0019-machined-use-x-machine-unix-prefix-for-the-container.patch
@@ -0,0 +1,33 @@
+From 9a46fe3127eea552cd76d4b549f8d8ba70ea01b3 Mon Sep 17 00:00:00 2001
+From: Benjamin Franzke <benjaminfranzke@googlemail.com>
+Date: Thu, 19 Feb 2015 20:47:28 +0100
+Subject: [PATCH 19/26] machined: use x-machine-unix prefix for the container
+ bus on dbus1
+
+This fixes "machinectl login" on systems configured with --disable-kdbus.
+
+The error was:
+machinectl login foo
+Failed to get machine PTY: Input/output error
+
+(cherry picked from commit f2273101c21bc59a390379e182e53cd4f07a7e71)
+---
+ src/machine/machine-dbus.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
+index b46f0a8..b0f0f66 100644
+--- a/src/machine/machine-dbus.c
++++ b/src/machine/machine-dbus.c
+@@ -477,7 +477,7 @@ int bus_machine_method_open_login(sd_bus *bus, sd_bus_message *message, void *us
+ #ifdef ENABLE_KDBUS
+         asprintf(&container_bus->address, "x-machine-kernel:pid=" PID_FMT ";x-machine-unix:pid=" PID_FMT, m->leader, m->leader);
+ #else
+-        asprintf(&container_bus->address, "x-machine-kernel:pid=" PID_FMT, m->leader);
++        asprintf(&container_bus->address, "x-machine-unix:pid=" PID_FMT, m->leader);
+ #endif
+         if (!container_bus->address)
+                 return -ENOMEM;
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0020-shared-AFS-is-also-a-network-filesystem.patch b/meta/recipes-core/systemd/systemd/0020-shared-AFS-is-also-a-network-filesystem.patch
new file mode 100644
index 0000000..fcc2adf
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0020-shared-AFS-is-also-a-network-filesystem.patch
@@ -0,0 +1,25 @@
+From 3c350019fe9e4be16bf110988c324cfa3a21c61b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org>
+Date: Fri, 20 Feb 2015 15:35:11 -0300
+Subject: [PATCH 20/26] shared: AFS is also a network filesystem
+
+(cherry picked from commit ba89821c104d959082aad6f3f0e05a8afd575023)
+---
+ src/shared/util.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/shared/util.c b/src/shared/util.c
+index ba035ca..f24b5b4 100644
+--- a/src/shared/util.c
++++ b/src/shared/util.c
+@@ -1689,6 +1689,7 @@ bool chars_intersect(const char *a, const char *b) {
+ 
+ bool fstype_is_network(const char *fstype) {
+         static const char table[] =
++                "afs\0"
+                 "cifs\0"
+                 "smbfs\0"
+                 "sshfs\0"
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0021-core-downgrade-unit-type-not-supported-message.patch b/meta/recipes-core/systemd/systemd/0021-core-downgrade-unit-type-not-supported-message.patch
new file mode 100644
index 0000000..02e279d
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0021-core-downgrade-unit-type-not-supported-message.patch
@@ -0,0 +1,31 @@
+From 4e2d4dd757c6faa4d5a471c10cf6f45978524845 Mon Sep 17 00:00:00 2001
+From: Umut Tezduyar Lindskog <umut.tezduyar@axis.com>
+Date: Fri, 20 Feb 2015 10:53:28 +0100
+Subject: [PATCH 21/26] core: downgrade unit type not supported message
+
+Otherwise every daemon reload prints out warnings like:
+
+systemd[1]: Unit type .busname is not supported on this system.
+systemd[1]: Unit type .swap is not supported on this system.
+
+(cherry picked from commit 03afec3c9aa849ba13161c253b129b834298fd40)
+---
+ src/core/manager.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/manager.c b/src/core/manager.c
+index 4775219..bc9b7ec 100644
+--- a/src/core/manager.c
++++ b/src/core/manager.c
+@@ -961,7 +961,7 @@ int manager_enumerate(Manager *m) {
+                 int q;
+ 
+                 if (unit_vtable[c]->supported && !unit_vtable[c]->supported(m)) {
+-                        log_info("Unit type .%s is not supported on this system.", unit_type_to_string(c));
++                        log_debug("Unit type .%s is not supported on this system.", unit_type_to_string(c));
+                         continue;
+                 }
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0022-journal-remote-fix-saving-of-binary-fields.patch b/meta/recipes-core/systemd/systemd/0022-journal-remote-fix-saving-of-binary-fields.patch
new file mode 100644
index 0000000..f5afd09
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0022-journal-remote-fix-saving-of-binary-fields.patch
@@ -0,0 +1,97 @@
+From 91a3ba906422127bb12095d1c7d0c7f0cb385588 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Mon, 2 Mar 2015 10:34:51 -0500
+Subject: [PATCH 22/26] journal-remote: fix saving of binary fields
+
+Binary fields were not processed properly, and resulting journal files
+were non-conforming, resulting in an error ("Invalid field.") when reading.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=89391
+(cherry picked from commit 09d801a82a46df518dd752e40bf13ac404daa2ce)
+---
+ src/journal-remote/journal-remote-parse.c | 31 ++++++++++++++++++-------------
+ src/journal-remote/journal-remote-parse.h |  4 +++-
+ 2 files changed, 21 insertions(+), 14 deletions(-)
+
+diff --git a/src/journal-remote/journal-remote-parse.c b/src/journal-remote/journal-remote-parse.c
+index d9dea8d..afded7e 100644
+--- a/src/journal-remote/journal-remote-parse.c
++++ b/src/journal-remote/journal-remote-parse.c
+@@ -344,22 +344,25 @@ int process_data(RemoteSource *source) {
+                    LLLLLLLL0011223344...\n
+                 */
+                 sep = memchr(line, '=', n);
+-                if (sep)
++                if (sep) {
+                         /* chomp newline */
+                         n--;
+-                else
++
++                        r = iovw_put(&source->iovw, line, n);
++                        if (r < 0)
++                                return r;
++                } else {
+                         /* replace \n with = */
+                         line[n-1] = '=';
+-                log_trace("Received: %.*s", (int) n, line);
+ 
+-                r = iovw_put(&source->iovw, line, n);
+-                if (r < 0) {
+-                        log_error("Failed to put line in iovect");
+-                        return r;
++                        source->field_len = n;
++                        source->state = STATE_DATA_START;
++
++                        /* we cannot put the field in iovec until we have all data */
+                 }
+ 
+-                if (!sep)
+-                        source->state = STATE_DATA_START;
++                log_trace("Received: %.*s (%s)", (int) n, line, sep ? "text" : "binary");
++
+                 return 0; /* continue */
+         }
+ 
+@@ -382,6 +385,7 @@ int process_data(RemoteSource *source) {
+ 
+         case STATE_DATA: {
+                 void *data;
++                char *field;
+ 
+                 assert(source->data_size > 0);
+ 
+@@ -396,11 +400,12 @@ int process_data(RemoteSource *source) {
+ 
+                 assert(data);
+ 
+-                r = iovw_put(&source->iovw, data, source->data_size);
+-                if (r < 0) {
+-                        log_error("failed to put binary buffer in iovect");
++                field = (char*) data - sizeof(uint64_t) - source->field_len;
++                memmove(field + sizeof(uint64_t), field, source->field_len);
++
++                r = iovw_put(&source->iovw, field + sizeof(uint64_t), source->field_len + source->data_size);
++                if (r < 0)
+                         return r;
+-                }
+ 
+                 source->state = STATE_DATA_FINISH;
+ 
+diff --git a/src/journal-remote/journal-remote-parse.h b/src/journal-remote/journal-remote-parse.h
+index 8499f4e..22db550 100644
+--- a/src/journal-remote/journal-remote-parse.h
++++ b/src/journal-remote/journal-remote-parse.h
+@@ -42,7 +42,9 @@ typedef struct RemoteSource {
+         size_t offset;     /* offset to the beginning of live data in the buffer */
+         size_t scanned;    /* number of bytes since the beginning of data without a newline */
+         size_t filled;     /* total number of bytes in the buffer */
+-        size_t data_size;  /* size of the binary data chunk being processed */
++
++        size_t field_len;  /* used for binary fields: the field name length */
++        size_t data_size;  /* and the size of the binary data chunk being processed */
+ 
+         struct iovec_wrapper iovw;
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0023-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch b/meta/recipes-core/systemd/systemd/0023-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch
new file mode 100644
index 0000000..79e565b
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0023-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch
@@ -0,0 +1,37 @@
+From 983c520982b548c9bb8f2689a93f2fb35c54c392 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org>
+Date: Sun, 1 Mar 2015 21:13:10 -0300
+Subject: [PATCH 23/26] journal: fix Inappropriate ioctl for device on ext4
+
+Logs constantly show
+
+systemd-journald[395]: Failed to set file attributes: Inappropriate ioctl for device
+
+This is because ext4 does not support FS_NOCOW_FL.
+
+[zj: fold into one conditional as suggested on the ML and
+     fix (preexisting) r/errno confusion in error message.]
+
+(cherry picked from commit 65eae3b76243d2dfd869f8c43b787575f7b4b994)
+---
+ src/journal/journal-file.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
+index 2845e05..0f28718 100644
+--- a/src/journal/journal-file.c
++++ b/src/journal/journal-file.c
+@@ -2611,8 +2611,8 @@ int journal_file_open(
+                  * shouldn't be too bad, given that we do our own
+                  * checksumming). */
+                 r = chattr_fd(f->fd, true, FS_NOCOW_FL);
+-                if (r < 0)
+-                        log_warning_errno(errno, "Failed to set file attributes: %m");
++                if (r < 0 && r != -ENOTTY)
++                        log_warning_errno(r, "Failed to set file attributes: %m");
+ 
+                 /* Let's attach the creation time to the journal file,
+                  * so that the vacuuming code knows the age of this
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0024-sd-daemon-replace-VLA-with-alloca-to-make-llvm-happy.patch b/meta/recipes-core/systemd/systemd/0024-sd-daemon-replace-VLA-with-alloca-to-make-llvm-happy.patch
new file mode 100644
index 0000000..0cf9a0a
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0024-sd-daemon-replace-VLA-with-alloca-to-make-llvm-happy.patch
@@ -0,0 +1,53 @@
+From 3f0c8096f3d5e3b37d6e0e26f0562c1a8669f0d8 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart@poettering.net>
+Date: Mon, 2 Mar 2015 20:55:38 +0100
+Subject: [PATCH 24/26] sd-daemon: replace VLA with alloca(), to make llvm
+ happy
+
+https://bugs.freedesktop.org/show_bug.cgi?id=89379
+(cherry picked from commit d4a144fadf89bca681724c6c9a65b4a165fa0f90)
+---
+ src/libsystemd/sd-daemon/sd-daemon.c | 12 +++++-------
+ 1 file changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/src/libsystemd/sd-daemon/sd-daemon.c b/src/libsystemd/sd-daemon/sd-daemon.c
+index 028c2a7..22a3a53 100644
+--- a/src/libsystemd/sd-daemon/sd-daemon.c
++++ b/src/libsystemd/sd-daemon/sd-daemon.c
+@@ -352,11 +352,7 @@ _public_ int sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char
+                 .msg_iovlen = 1,
+                 .msg_name = &sockaddr,
+         };
+-        union {
+-                struct cmsghdr cmsghdr;
+-                uint8_t buf[CMSG_SPACE(sizeof(struct ucred)) +
+-                            CMSG_SPACE(sizeof(int) * n_fds)];
+-        } control;
++        struct cmsghdr *control;
+         _cleanup_close_ int fd = -1;
+         struct cmsghdr *cmsg = NULL;
+         const char *e;
+@@ -400,8 +396,10 @@ _public_ int sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char
+         if (msghdr.msg_namelen > sizeof(struct sockaddr_un))
+                 msghdr.msg_namelen = sizeof(struct sockaddr_un);
+ 
++        control = alloca(CMSG_SPACE(sizeof(struct ucred)) + CMSG_SPACE(sizeof(int) * n_fds));
++
+         if (n_fds > 0) {
+-                msghdr.msg_control = &control;
++                msghdr.msg_control = control;
+                 msghdr.msg_controllen = CMSG_LEN(sizeof(int) * n_fds);
+ 
+                 cmsg = CMSG_FIRSTHDR(&msghdr);
+@@ -418,7 +416,7 @@ _public_ int sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char
+                 try_without_ucred = true;
+                 controllen_without_ucred = msghdr.msg_controllen;
+ 
+-                msghdr.msg_control = &control;
++                msghdr.msg_control = control;
+                 msghdr.msg_controllen += CMSG_LEN(sizeof(struct ucred));
+ 
+                 if (cmsg)
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0025-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch b/meta/recipes-core/systemd/systemd/0025-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch
new file mode 100644
index 0000000..6912489
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0025-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch
@@ -0,0 +1,84 @@
+From 5fb87c4b6582ddb0a0ab1f31300eae69ab963afb Mon Sep 17 00:00:00 2001
+From: Hans-Peter Deifel <hpd@hpdeifel.de>
+Date: Tue, 3 Mar 2015 00:35:08 +0100
+Subject: [PATCH 25/26] tmpfiles: quietly ignore ACLs on unsupported
+ filesystems
+
+A warning is printed if ACLs cannot be retrieved for any reason other
+than -ENOSYS. For -ENOSYS, debug log is printed.
+
+(cherry picked from commit d873e8778c92014c02a9122852758b436fa95c0e)
+---
+ src/tmpfiles/tmpfiles.c | 36 ++++++++++++++++++++----------------
+ 1 file changed, 20 insertions(+), 16 deletions(-)
+
+diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
+index 88ba7e4..187997e 100644
+--- a/src/tmpfiles/tmpfiles.c
++++ b/src/tmpfiles/tmpfiles.c
+@@ -704,6 +704,9 @@ static int path_set_acl(const char *path, acl_type_t type, acl_t acl, bool modif
+         int r;
+         _cleanup_(acl_free_charpp) char *t = NULL;
+ 
++        /* Returns 0 for success, positive error if already warned,
++         * negative error otherwise. */
++
+         if (modify) {
+                 r = acls_for_file(path, type, acl, &dup);
+                 if (r < 0)
+@@ -731,35 +734,36 @@ static int path_set_acl(const char *path, acl_type_t type, acl_t acl, bool modif
+ 
+         r = acl_set_file(path, type, dup);
+         if (r < 0)
+-                return log_error_errno(-errno,
+-                                       "Setting %s ACL \"%s\" on %s failed: %m",
+-                                       type == ACL_TYPE_ACCESS ? "access" : "default",
+-                                       strna(t), path);
++                return -log_error_errno(errno,
++                                        "Setting %s ACL \"%s\" on %s failed: %m",
++                                        type == ACL_TYPE_ACCESS ? "access" : "default",
++                                        strna(t), path);
++
+         return 0;
+ }
+ #endif
+ 
+ static int path_set_acls(Item *item, const char *path) {
++        int r = 0;
+ #ifdef HAVE_ACL
+-        int r;
+-
+         assert(item);
+         assert(path);
+ 
+-        if (item->acl_access) {
++        if (item->acl_access)
+                 r = path_set_acl(path, ACL_TYPE_ACCESS, item->acl_access, item->force);
+-                if (r < 0)
+-                        return r;
+-        }
+ 
+-        if (item->acl_default) {
++        if (r == 0 && item->acl_default)
+                 r = path_set_acl(path, ACL_TYPE_DEFAULT, item->acl_default, item->force);
+-                if (r < 0)
+-                        return r;
+-        }
+-#endif
+ 
+-        return 0;
++        if (r > 0)
++                return -r; /* already warned */
++        else if (r == -ENOTSUP) {
++                log_debug_errno(r, "ACLs not supported by file system at %s", path);
++                return 0;
++        } else if (r < 0)
++                log_error_errno(r, "ACL operation on \"%s\" failed: %m", path);
++#endif
++        return r;
+ }
+ 
+ static int write_one_file(Item *i, const char *path) {
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0026-shared-util-assume-ac-when-sys-class-power_supply-is.patch b/meta/recipes-core/systemd/systemd/0026-shared-util-assume-ac-when-sys-class-power_supply-is.patch
new file mode 100644
index 0000000..a49a369
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0026-shared-util-assume-ac-when-sys-class-power_supply-is.patch
@@ -0,0 +1,30 @@
+From 0436d5c5f4b39ba8177437fa92f082f8ef1830fb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Tue, 3 Mar 2015 19:07:28 -0500
+Subject: [PATCH 26/26] shared/util: assume ac when /sys/class/power_supply is
+ missing
+
+On s390 (at least) /sys/class/power_supply is not present. We should
+treat this like if this directory was empty, and not an error.
+
+(cherry picked from commit 6d89003462484c8656b698e07b9cf0a337e3818e)
+---
+ src/shared/util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/shared/util.c b/src/shared/util.c
+index f24b5b4..8548723 100644
+--- a/src/shared/util.c
++++ b/src/shared/util.c
+@@ -5994,7 +5994,7 @@ int on_ac_power(void) {
+ 
+         d = opendir("/sys/class/power_supply");
+         if (!d)
+-                return -errno;
++                return errno == ENOENT ? true : -errno;
+ 
+         for (;;) {
+                 struct dirent *de;
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd_219.bb b/meta/recipes-core/systemd/systemd_219.bb
index 9bb104f..9c20b11 100644
--- a/meta/recipes-core/systemd/systemd_219.bb
+++ b/meta/recipes-core/systemd/systemd_219.bb
@@ -19,7 +19,7 @@ PROVIDES = "udev"
 
 PE = "1"
 
-DEPENDS = "intltool-native gperf-native readline libcap libcgroup qemu-native"
+DEPENDS = "intltool-native gperf-native readline libcap libcgroup qemu-native util-linux"
 
 SECTION = "base/shell"
 
@@ -40,10 +40,7 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master \
            file://0009-sysv-generator-add-support-for-executing-scripts-und.patch \
            file://0010-Make-root-s-home-directory-configurable.patch \
            file://0011-systemd-user-avoid-using-system-auth.patch \
-           file://0001-tmpfiles-avoid-creating-duplicate-acl-entries.patch \
-           file://0002-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch \
            file://0012-systemd-tmpfiles.c-Honor-ordering-within-files-as-th.patch \
-           file://0013-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch \
            file://0014-Revert-rules-remove-firmware-loading-rules.patch \
            file://0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch \
            file://tmpfiles-pam.patch \
@@ -55,6 +52,36 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master \
 
 S = "${WORKDIR}/git"
 
+# Appending backport fixes released for version 219-stable
+SRC_URI_append = "\
+           file://0001-journal-remote-fix-certificate-status-memory-leak.patch \
+           file://0002-journal-remote-fix-client_cert-memory-leak.patch \
+           file://0003-tmpfiles-Fix-parse_acl-error-message.patch \
+           file://0004-test-utf8-fix-utf16-tests-on-BE-machines.patch \
+           file://0005-tmpfiles-avoid-creating-duplicate-acl-entries.patch \
+           file://0006-shared-time-util-fix-gcc5-warning.patch \
+           file://0007-test-time-test-infinity-parsing-in-nanoseconds.patch \
+           file://0008-bootchart-fix-default-init-path.patch \
+           file://0009-systemctl-bump-NOFILE-only-for-systemctl_main.patch \
+           file://0010-acl-util-avoid-freeing-uninitialized-pointer.patch \
+           file://0011-bootchart-svg-fix-checking-of-list-end.patch \
+           file://0012-systemd-add-getrandom-syscall-numbers-for-MIPS.patch \
+           file://0013-unit-use-weaker-dependencies-between-mount-and-devic.patch \
+           file://0014-unit-When-stopping-due-to-BindsTo-log-which-unit-cau.patch \
+           file://0015-sysctl-downgrade-message-about-sysctl-overrides-to-d.patch \
+           file://0016-sysctl-add-some-hints-how-to-override-settings.patch \
+           file://0017-core-rework-device-state-logic.patch \
+           file://0018-core-fix-return-value-on-OOM.patch \
+           file://0019-machined-use-x-machine-unix-prefix-for-the-container.patch \
+           file://0020-shared-AFS-is-also-a-network-filesystem.patch \
+           file://0021-core-downgrade-unit-type-not-supported-message.patch \
+           file://0022-journal-remote-fix-saving-of-binary-fields.patch \
+           file://0023-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch \
+           file://0024-sd-daemon-replace-VLA-with-alloca-to-make-llvm-happy.patch \
+           file://0025-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch \
+           file://0026-shared-util-assume-ac-when-sys-class-power_supply-is.patch \
+           "
+
 SRC_URI_append_libc-uclibc = "\
             file://0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch \
            "
@@ -130,8 +157,6 @@ EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
                  --disable-introspection \
                  --disable-kdbus \
                  --disable-manpages \
-                 --disable-introspection \
-                 --disable-kdbus \
                  --enable-split-usr \
                  --without-python \
                  --with-sysvrcnd-path=${sysconfdir} \
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 10b14b3..ac6162a 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -43,7 +43,7 @@ SHARED_EXTRA_OECONF = "--disable-use-tty-group \
                        --enable-raw --enable-reset --disable-login \
                        --disable-vipw --disable-newgrp --disable-chfn-chsh \
                        --enable-write --enable-mount \
-                       --enable-libuuid --enable-libblkid --enable-fsck --without-udev \
+                       --enable-libuuid --enable-fsck --without-udev \
                        usrsbin_execdir='${sbindir}' \
 "
 
-- 
1.9.1



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

* Re: [PATCH 3/4] systemd: split modules into packages
  2015-03-25 21:49   ` [PATCH 3/4] systemd: split modules into packages Bruno Bottazzini
@ 2015-03-26  8:29     ` Anders Darander
  2015-03-26 11:56       ` Otavio Salvador
  2015-03-26  8:52     ` Andreas Oberritter
  1 sibling, 1 reply; 73+ messages in thread
From: Anders Darander @ 2015-03-26  8:29 UTC (permalink / raw)
  To: Bruno Bottazzini; +Cc: openembedded-core

* Bruno Bottazzini <bruno.bottazzini@intel.com> [150325 22:50]:

> if one wants to launch a simple deamon, most modules are not
> required.
> He will be able to save space and exclude unwanted packages
> from the final image.

I like this, though I've got a few questions that I just noticed.

> -PACKAGECONFIG ??= "xz ldconfig \
> +PACKAGECONFIG ??= " \
> +                   gcrypt \
> +                   kmod \
> +                   ldconfig \
> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'blkid', 'blkid', '', d)} \
> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'efi', 'efi', '', d)} \
> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'lz4', 'lz4', '', d)} \
> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'xz', 'xz', '', d)} \
> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'libidn', 'libidn', '', d)} \
> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
>                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
>                     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}"

It might be worth noting that xz has gone from being explicitly enabled,
to depend on a DISTRO_FEATURES.

>  # Sign the journal for anti-tampering
>  PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
>  # regardless of PACKAGECONFIG, libgcrypt is always required to expand
>  # the AM_PATH_LIBGCRYPT autoconf macro
> -DEPENDS += "libgcrypt"

Just to double-check, as this been fixed upstream or patched locally?
If you're removing that explicit DEPENDS, the comment above should also
be removed.

>  PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
> -PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"

Why do you remove networkd as a PACKAGECONFIG?

>  PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
>  PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
>  PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
> @@ -101,17 +123,36 @@ rootprefix ?= "${base_prefix}"
>  rootlibdir ?= "${base_libdir}"
>  rootlibexecdir = "${rootprefix}/lib"

> -# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
>  EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
>                   --with-rootlibdir=${rootlibdir} \
>                   --with-roothomedir=${ROOT_HOME} \
> -                 --disable-coredump \
> +                 --enable-coredump \
> +                 --disable-introspection \
> +                 --disable-kdbus \
> +                 --disable-manpages \
>                   --disable-introspection \
>                   --disable-kdbus \
>                   --enable-split-usr \
>                   --without-python \
>                   --with-sysvrcnd-path=${sysconfdir} \
>                   --with-firmware-path=/lib/firmware \
> +                 --enable-libcurl \
> +                 --enable-ldconfig \
> +                 --enable-backlight \
> +                 --enable-binfmt \
> +                 --enable-bootchart \
> +                 --enable-firstboot \
> +                 --enable-hostnamed \
> +                 --enable-localed \
> +                 --enable-logind \
> +                 --enable-machined \
> +                 --enable-networkd \

Why is networkd always enabled?

> +                 --enable-quotacheck \
> +                 --enable-randomseed \
> +                 --enable-resolved \

Why are you enabling resolved here? We have a PACKAGECONFIG taking care
of enabling/disabling this.

> +                 --enable-rfkill \
> +                 --enable-sysusers \
> +                 --enable-vconsole \
>                 "

Regarding EXTA_OECONF in general, it seems that we're enabling lots of
stuff that we have PACKAGECONFIG's for.

There's also a number of other things here that probably should be
PACKAGECONFIG's.

>

I'll try to take a closer look at the actual splitting if I can get some
time for that.

Cheers,
Anders

-- 
Anders Darander
ChargeStorm AB / eStorm AB


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

* Re: [PATCH 3/4] systemd: split modules into packages
  2015-03-25 21:49   ` [PATCH 3/4] systemd: split modules into packages Bruno Bottazzini
  2015-03-26  8:29     ` Anders Darander
@ 2015-03-26  8:52     ` Andreas Oberritter
  2015-03-26 13:33       ` Bottazzini, Bruno
  1 sibling, 1 reply; 73+ messages in thread
From: Andreas Oberritter @ 2015-03-26  8:52 UTC (permalink / raw)
  To: openembedded-core

Hi Bruno,

On 25.03.2015 22:49, Bruno Bottazzini wrote:
> if one wants to launch a simple deamon, most modules are not
> required.
> He will be able to save space and exclude unwanted packages
> from the final image.
> ---
>  meta/recipes-core/systemd/systemd_219.bb | 1073 ++++++++++++++++++++++++++----
>  1 file changed, 943 insertions(+), 130 deletions(-)
> 
> diff --git a/meta/recipes-core/systemd/systemd_219.bb b/meta/recipes-core/systemd/systemd_219.bb
> index e2ea81e..9bb104f 100644
> --- a/meta/recipes-core/systemd/systemd_219.bb
> +++ b/meta/recipes-core/systemd/systemd_219.bb
> @@ -19,7 +19,7 @@ PROVIDES = "udev"
>  
>  PE = "1"
>  
> -DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux"
> +DEPENDS = "intltool-native gperf-native readline libcap libcgroup qemu-native"
>  
>  SECTION = "base/shell"
>  
> @@ -62,23 +62,45 @@ LDFLAGS_append_libc-uclibc = " -lrt"
>  
>  GTKDOC_DOCDIR = "${S}/docs/"
>  
> -PACKAGECONFIG ??= "xz ldconfig \
> +PACKAGECONFIG ??= " \
> +                   gcrypt \
> +                   kmod \
> +                   ldconfig \
> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'blkid', 'blkid', '', d)} \
> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'efi', 'efi', '', d)} \
> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'lz4', 'lz4', '', d)} \
> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'xz', 'xz', '', d)} \
> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'libidn', 'libidn', '', d)} \

please don't invent new distro features for packageconfig of a single
recipe.

Regards,
Andreas

> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
>                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
>                     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}"
>  
> +PACKAGECONFIG[glib] = "--enable-gudev,--disable-gudev,glib-2.0"
> +PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
> +PACKAGECONFIG[blkid] = "--enable-blkid,--disable-blkid,util-linux"
> +PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
> +PACKAGECONFIG[kmod] = "--enable-kmod,--disable-kmod,kmod"
> +PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,,polkit"
> +PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
> +PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
> +PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
> +PACKAGECONFIG[apparmor] = "--enable-apparmor,--disable-apparmor,libapparmor"
> +PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
> +PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
>  PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
>  # Sign the journal for anti-tampering
>  PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
>  # regardless of PACKAGECONFIG, libgcrypt is always required to expand
>  # the AM_PATH_LIBGCRYPT autoconf macro
> -DEPENDS += "libgcrypt"
>  # Compress the journal
> +PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
>  PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
> +PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,libqrencode"
> +PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
>  PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
>  PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd"
>  PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
>  PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
> -PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
>  PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
>  PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
>  PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
> @@ -101,17 +123,36 @@ rootprefix ?= "${base_prefix}"
>  rootlibdir ?= "${base_libdir}"
>  rootlibexecdir = "${rootprefix}/lib"
>  
> -# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
>  EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
>                   --with-rootlibdir=${rootlibdir} \
>                   --with-roothomedir=${ROOT_HOME} \
> -                 --disable-coredump \
> +                 --enable-coredump \
> +                 --disable-introspection \
> +                 --disable-kdbus \
> +                 --disable-manpages \
>                   --disable-introspection \
>                   --disable-kdbus \
>                   --enable-split-usr \
>                   --without-python \
>                   --with-sysvrcnd-path=${sysconfdir} \
>                   --with-firmware-path=/lib/firmware \
> +                 --enable-libcurl \
> +                 --enable-ldconfig \
> +                 --enable-backlight \
> +                 --enable-binfmt \
> +                 --enable-bootchart \
> +                 --enable-firstboot \
> +                 --enable-hostnamed \
> +                 --enable-localed \
> +                 --enable-logind \
> +                 --enable-machined \
> +                 --enable-networkd \
> +                 --enable-quotacheck \
> +                 --enable-randomseed \
> +                 --enable-resolved \
> +                 --enable-rfkill \
> +                 --enable-sysusers \
> +                 --enable-vconsole \
>                 "
>  # uclibc does not have NSS
>  EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
> @@ -210,158 +251,747 @@ do_install_ptest () {
>  
>  python populate_packages_prepend (){
>      systemdlibdir = d.getVar("rootlibdir", True)
> -    do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
> +    do_split_packages(d, systemdlibdir, '^lib(udev|gudev|systemd|nss)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
>  }
> -PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
> +PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd|nss).*"
> +
> +########################################################################
> +# Base Packages
> +########################################################################
> +
> +PACKAGES =+ "${PN}-generators-filesystems"
> +SUMMARY_${PN}-generators-filesystems = "systemd's generator for filesystem services based on fstab and GPT"
> +RDEPENDS_${PN}-generators-filesystems = "${PN}-services-fsck"
> +FILES_${PN}-generators-filesystems = "\
> +        ${rootlibexecdir}/systemd/system-generators/systemd-fstab-generator \
> +        ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
> +        ${rootlibexecdir}/systemd/systemd-remount-fs \
> +        ${systemd_unitdir}/system/local-fs.target.wants/systemd-remount-fs.service \
> +        ${systemd_unitdir}/system/systemd-remount-fs.service \
> +"
>  
> -PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \
> -             ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh libgudev"
> +PACKAGES =+ "${PN}-generators-getty"
> +SUMMARY_${PN}-generators-getty = "systemd's generator TTY services"
> +RDEPENDS_${PN}-generators-getty = "${PN}-services-getty"
> +FILES_${PN}-generators-getty = "\
> +        ${rootlibexecdir}/systemd/system-generators/systemd-getty-generator \
> +"
>  
> -SYSTEMD_PACKAGES = "${PN}-binfmt"
> -SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
> +PACKAGES =+ "${PN}-tools"
> +SUMMARY_${PN}-tools = "systemd command line tools (cgls, delta, run, analyze...)"
> +RRECOMMENDS_${PN}-tools = "${PN}-services-base"
> +FILES_${PN}-tools = "\
> +        ${base_bindir}/systemd-machine-id-setup \
> +        ${bindir}/busctl \
> +        ${bindir}/coredumpctl \
> +        ${bindir}/systemd-analyze \
> +        ${bindir}/systemd-cat \
> +        ${bindir}/systemd-cgls \
> +        ${bindir}/systemd-cgtop \
> +        ${bindir}/systemd-delta \
> +        ${bindir}/systemd-detect-virt \
> +        ${bindir}/systemd-path \
> +        ${bindir}/systemd-run \
> +        ${rootlibexecdir}/systemd/systemd-ac-power \
> +        ${rootlibexecdir}/systemd/systemd-activate \
> +        ${rootlibexecdir}/systemd/systemd-reply-password \
> +        ${rootprefix}/bin/systemd-escape \
> +        ${rootprefix}/bin/systemd-notify \
> +"
>  
> -USERADD_PACKAGES = "${PN}"
> -USERADD_PARAM_${PN} += "--system systemd-journal-gateway; --system systemd-timesync"
> -GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
> +########################################################################
> +# Services Packages
> +########################################################################
> +
> +PACKAGES =+ "${PN}-services-ask-password"
> +SUMMARY_${PN}-services-ask-password = "systemd's service and tool to query the user for a system password"
> +RRECOMMENDS_${PN}-services-ask-password = "${PN}-services-base"
> +FILES_${PN}-services-ask-password = "\
> +        ${rootprefix}/bin/systemd-ask-password \
> +        ${rootprefix}/bin/systemd-tty-ask-password-agent \
> +        ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
> +        ${systemd_unitdir}/system/systemd-ask-password-console.path \
> +        ${systemd_unitdir}/system/systemd-ask-password-console.service \
> +        ${systemd_unitdir}/system/systemd-ask-password-wall.path \
> +        ${systemd_unitdir}/system/systemd-ask-password-wall.service \
> +"
>  
> -FILES_${PN}-analyze = "${bindir}/systemd-analyze"
> +PACKAGES =+ "${PN}-services-backlight"
> +SUMMARY_${PN}-services-backlight = "systemd's backlight state save/restore service"
> +FILES_${PN}-services-backlight = "\
> +        ${systemd_unitdir}/system/systemd-backlight@.service \
> +        ${rootlibexecdir}/systemd/systemd-backlight \
> +"
>  
> -FILES_${PN}-initramfs = "/init"
> -RDEPENDS_${PN}-initramfs = "${PN}"
> +PACKAGES =+ "${PN}-services-binfmt"
> +SUMMARY_${PN}-services-binfmt = "systemd's service to configure additional binary formats for executables"
> +RRECOMMENDS_${PN}-services-binfmt = "kernel-module-binfmt-misc"
> +FILES_${PN}-services-binfmt = "\
> +        ${sysconfdir}/binfmt.d/ \
> +        ${exec_prefix}/lib/binfmt.d/ \
> +        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.automount \
> +        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.mount \
> +        ${systemd_unitdir}/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount \
> +        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-binfmt.service \
> +        ${systemd_unitdir}/system/systemd-binfmt.service \
> +        ${rootlibexecdir}/systemd/systemd-binfmt \
> +"
> +
> +PACKAGES =+ "${PN}-services-bootchart"
> +SUMMARY_${PN}-services-bootchart = "systemd's boot performance service and graphing tool"
> +CONFFILES_${PN}-services-bootchart = "${sysconfdir}/systemd/bootchart.conf"
> +FILES_${PN}-services-bootchart = "\
> +        ${sysconfdir}/systemd/bootchart.conf \
> +        ${rootlibexecdir}/systemd/systemd-bootchart \
> +"
>  
> -FILES_libgudev = "${libdir}/libgudev*${SOLIBS}"
> +PACKAGES =+ "${PN}-services-coredump"
> +SUMMARY_${PN}-services-coredump = "systemd's coredump log hook and service"
> +RDEPENDS_${PN}-services-coredump = "${PN}-services-sysctl"
> +CONFFILES_${PN}-services-coredump = "${sysconfdir}/systemd/coredump.conf"
> +FILES_${PN}-services-coredump = "\
> +        ${exec_prefix}/lib/sysctl.d/50-coredump.conf \
> +        ${sysconfdir}/systemd/coredump.conf \
> +        ${rootlibexecdir}/systemd/systemd-coredump \
> +"
>  
> -RDEPENDS_${PN}-ptest += "perl python bash"
> -FILES_${PN}-ptest += "${libdir}/udev/rules.d"
> +PACKAGES =+ "${PN}-services-cryptsetup"
> +SUMMARY_${PN}-services-cryptsetup = "systemd's disk decryption service"
> +ALLOW_EMPTY_${PN}-services-cryptsetup = "1"
> +FILES_${PN}-services-cryptsetup = "\
> +        ${rootlibexecdir}/systemd/system-generators/systemd-cryptsetup-generator \
> +        ${systemd_unitdir}/system/cryptsetup-pre.target \
> +        ${systemd_unitdir}/system/cryptsetup.target \
> +        ${systemd_unitdir}/system/sysinit.target.wants/cryptsetup.target \
> +        ${rootlibexecdir}/systemd/systemd-cryptsetup \
> +"
> +
> +PACKAGES =+ "${PN}-services-dbus"
> +SUMMARY_${PN}-services-dbus = "systemd's DBus daemon system service"
> +# NOTE: dbus dependency will go away when kdbus is in use
> +RDEPENDS_${PN}-services-dbus = "dbus"
> +FILES_${PN}-services-dbus = "\
> +        ${datadir}/dbus-1/services/org.freedesktop.systemd1.service \
> +        ${datadir}/dbus-1/system-services/org.freedesktop.systemd1.service \
> +        ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
> +        ${systemd_unitdir}/system/sockets.target.wants/dbus.socket \
> +        ${systemd_unitdir}/system/dbus.target.wants/dbus.socket \
> +        ${systemd_unitdir}/system/multi-user.target.wants/dbus.service \
> +        ${systemd_unitdir}/system/dbus.socket \
> +        ${systemd_unitdir}/system/dbus.service \
> +"
> +
> +PACKAGES =+ "${PN}-services-debug"
> +SUMMARY_${PN}-services-debug = "systemd's debug service"
> +RRECOMMENDS_${PN}-services-debug = "${PN}-services-base ${PN}-tools"
> +FILES_${PN}-services-debug = "\
> +        ${rootlibexecdir}/systemd/system-generators/systemd-debug-generator \
> +        ${systemd_unitdir}/system/debug-shell.service \
> +        ${systemd_unitdir}/system/sys-kernel-config.mount \
> +        ${systemd_unitdir}/system/sys-kernel-debug.mount \
> +        ${systemd_unitdir}/system/sysinit.target.wants/sys-kernel-config.mount \
> +        ${systemd_unitdir}/system/sysinit.target.wants/sys-kernel-debug.mount \
> +"
> +
> +PACKAGES =+ "${PN}-services-firstboot"
> +SUMMARY_${PN}-services-firstboot = "systemd's service to initialize basic system settings"
> +FILES_${PN}-services-firstboot = "\
> +        ${base_bindir}/systemd-firstboot \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-firstboot.service \
> +        ${systemd_unitdir}/system/systemd-firstboot.service \
> +"
> +
> +PACKAGES =+ "${PN}-services-fsck"
> +SUMMARY_${PN}-services-fsck = "systemd's filesystem check service"
> +RRECOMMENDS_${PN}-services-fsck = "util-linux-fsck e2fsprogs-e2fsck"
> +FILES_${PN}-services-fsck = "\
> +        ${systemd_unitdir}/system/systemd-fsck-root.service \
> +        ${systemd_unitdir}/system/systemd-fsck@.service \
> +        ${rootlibexecdir}/systemd/systemd-fsck \
> +"
> +
> +PACKAGES =+ "${PN}-services-fuse"
> +SUMMARY_${PN}-services-fuse = "systemd's FUSE (filesystem in userspace) service"
> +FILES_${PN}-services-fuse = "\
> +        ${systemd_unitdir}/system/sysinit.target.wants/sys-fs-fuse-connections.mount \
> +        ${systemd_unitdir}/system/sys-fs-fuse-connections.mount \
> +"
> +
> +PACKAGES =+ "${PN}-services-getty"
> +SUMMARY_${PN}-services-getty = "systemd's getty service"
> +RRECOMMENDS_${PN}-services-getty = "util-linux-agetty ${PN}-generators-getty"
> +FILES_${PN}-services-getty = "\
> +        ${systemd_unitdir}/system/autovt@.service \
> +        ${systemd_unitdir}/system/console-getty.service \
> +        ${systemd_unitdir}/system/container-getty@.service \
> +        ${systemd_unitdir}/system/getty@.service \
> +        ${systemd_unitdir}/system/serial-getty@.service \
> +        ${sysconfdir}/systemd/system/getty.target.wants/ \
> +"
> +
> +PACKAGES =+ "${PN}-services-hostnamed"
> +SUMMARY_${PN}-services-hostnamed = "systemd's hostname management service"
> +RDEPENDS_${PN}-services-hostnamed = "${PN}-services-dbus"
> +CONFFILES_${PN}-services-hostnamed = "${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf"
> +FILES_${PN}-services-hostnamed = "\
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
> +        ${bindir}/hostnamectl \
> +        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.hostname1.busname \
> +        ${systemd_unitdir}/system/dbus-org.freedesktop.hostname1.service \
> +        ${systemd_unitdir}/system/org.freedesktop.hostname1.busname \
> +        ${systemd_unitdir}/system/systemd-hostnamed.service \
> +        ${rootlibexecdir}/systemd/systemd-hostnamed \
> +        ${datadir}/dbus-1/system-services/org.freedesktop.hostname1.service \
> +        ${datadir}/polkit-1/actions/org.freedesktop.hostname1.policy \
> +"
> +
> +PACKAGES =+ "${PN}-services-journal"
> +SUMMARY_${PN}-services-journal = "systemd's journal (logging) service"
> +CONFFILES_${PN}-services-journal = "${sysconfdir}/systemd/journald.conf"
> +FILES_${PN}-services-journal = "\
> +        ${base_bindir}/journalctl \
> +        ${rootlibexecdir}/systemd/systemd-journald \
> +        ${sysconfdir}/systemd/journald.conf \
> +        ${systemd_unitdir}/system/sockets.target.wants/systemd-journald-dev-log.socket \
> +        ${systemd_unitdir}/system/sockets.target.wants/systemd-journald.socket \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journal-catalog-update.service \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journal-flush.service \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journald.service \
> +        ${systemd_unitdir}/system/systemd-journal-catalog-update.service \
> +        ${systemd_unitdir}/system/systemd-journal-flush.service \
> +        ${systemd_unitdir}/system/systemd-journald-dev-log.socket \
> +        ${systemd_unitdir}/system/systemd-journald.service \
> +        ${systemd_unitdir}/system/systemd-journald.socket \
> +        ${exec_prefix}/lib/systemd/catalog/ \
> +"
> +
> +PACKAGES =+ "${PN}-services-ldconfig"
> +SUMMARY_${PN}-services-ldconfig = "systemd's service to run ldconfig after updates"
> +FILES_${PN}-services-ldconfig = "\
> +        ${systemd_unitdir}/system/sysinit.target.wants/ldconfig.service \
> +        ${systemd_unitdir}/system/ldconfig.service \
> +"
> +
> +PACKAGES =+ "${PN}-services-localed"
> +SUMMARY_${PN}-services-localed = "systemd's locale management service"
> +RDEPENDS_${PN}-services-localed = "${PN}-services-dbus"
> +CONFFILES_${PN}-services-localed = "${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf"
> +FILES_${PN}-services-localed = "\
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf \
> +        ${bindir}/localectl \
> +        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.locale1.busname \
> +        ${systemd_unitdir}/system/dbus-org.freedesktop.locale1.service \
> +        ${systemd_unitdir}/system/org.freedesktop.locale1.busname \
> +        ${systemd_unitdir}/system/systemd-localed.service \
> +        ${rootlibexecdir}/systemd/systemd-localed \
> +        ${datadir}/dbus-1/system-services/org.freedesktop.locale1.service \
> +        ${datadir}/polkit-1/actions/org.freedesktop.locale1.policy \
> +        ${datadir}/systemd/kbd-model-map \
> +"
> +
> +PACKAGES =+ "${PN}-services-logind"
> +SUMMARY_${PN}-services-logind = "systemd's login management service"
> +RDEPENDS_${PN}-services-logind = "${PN}-services-dbus ${PN}-services-tmpfiles"
> +RRECOMMENDS_${PN}-services-logind = "udev"
> +CONFFILES_${PN}-services-logind = "\
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf \
> +        ${sysconfdir}/systemd/logind.conf \
> +"
> +FILES_${PN}-services-logind = "\
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf \
> +        ${sysconfdir}/systemd/logind.conf \
> +        ${base_bindir}/loginctl \
> +        ${base_bindir}/systemd-inhibit \
> +        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.login1.busname \
> +        ${systemd_unitdir}/system/dbus-org.freedesktop.login1.service \
> +        ${systemd_unitdir}/system/multi-user.target.wants/systemd-logind.service \
> +        ${systemd_unitdir}/system/multi-user.target.wants/systemd-user-sessions.service \
> +        ${systemd_unitdir}/system/org.freedesktop.login1.busname \
> +        ${systemd_unitdir}/system/systemd-logind.service \
> +        ${systemd_unitdir}/system/systemd-user-sessions.service \
> +        ${systemd_unitdir}/system/user@.service \
> +        ${rootlibexecdir}/systemd/systemd-logind \
> +        ${rootlibexecdir}/systemd/systemd-user-sessions \
> +        ${datadir}/dbus-1/system-services/org.freedesktop.login1.service \
> +        ${datadir}/polkit-1/actions/org.freedesktop.login1.policy \
> +        ${rootlibexecdir}/udev/rules.d/70-uaccess.rules \
> +        ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
> +        ${rootlibexecdir}/udev/rules.d/71-seat.rules \
> +        ${rootlibexecdir}/udev/rules.d/73-seat-late.rules \
> +"
> +
> +PACKAGES =+ "${PN}-services-machined"
> +SUMMARY_${PN}-services-machined = "systemd's virtual machine and container management service"
> +RDEPENDS_${PN}-services-machined = "${PN}-services-dbus"
> +CONFFILES_${PN}-services-machined = "${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf"
> +FILES_${PN}-services-machined = "\
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
> +        ${base_bindir}/machinectl \
> +        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.machine1.busname \
> +        ${systemd_unitdir}/system/dbus-org.freedesktop.machine1.service \
> +        ${systemd_unitdir}/system/machine.slice \
> +        ${systemd_unitdir}/system/org.freedesktop.machine1.busname \
> +        ${systemd_unitdir}/system/systemd-machined.service \
> +        ${rootlibexecdir}/systemd/systemd-machined \
> +        ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
> +"
> +
> +PACKAGES =+ "${PN}-services-modules-load"
> +SUMMARY_${PN}-services-modules-load = "systemd's kernel module loading service"
> +FILES_${PN}-services-modules-load = "\
> +        ${sysconfdir}/modules-load.d/ \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-modules-load.service \
> +        ${systemd_unitdir}/system/systemd-modules-load.service \
> +        ${rootlibexecdir}/systemd/systemd-modules-load \
> +        ${exec_prefix}/lib/modules-load.d \
> +"
> +
> +PACKAGES =+ "${PN}-services-modules-static-nodes"
> +SUMMARY_${PN}-services-modules-static-nodes = "systemd's kernel module static nodes creation service"
> +RDEPENDS_${PN}-services-modules-static-nodes = "kmod ${PN}-services-tmpfiles"
> +FILES_${PN}-services-modules-static-nodes = "\
> +        ${systemd_unitdir}/system/sysinit.target.wants/kmod-static-nodes.service \
> +        ${systemd_unitdir}/system/kmod-static-nodes.service \
> +"
>  
> -FILES_${PN}-dbg += "${libdir}/systemd/ptest/.debug"
> +
> +PACKAGES =+ "${PN}-services-multi-seat-x"
> +SUMMARY_${PN}-services-multi-seat-x = "systemd's X11 multi-seat support service"
> +RDEPENDS_${PN}-services-multi-seat-x = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/xserver', '', d)}"
> +FILES_${PN}-services-multi-seat-x = "\
> +        ${rootlibexecdir}/systemd/systemd-multi-seat-x \
> +"
> +
> +PACKAGES =+ "${PN}-services-networkd"
> +SUMMARY_${PN}-services-networkd = "systemd's network management (static, DHCP, bridge...) service"
> +# NOTE: if no sysusers, then users/groups must be setup
> +RRECOMMENDS_${PN}-services-networkd = "${PN}-services-sysusers"
> +FILES_${PN}-services-networkd = "\
> +        ${sysconfdir}/systemd/network/ \
> +        ${sysconfdir}/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service \
> +        ${sysconfdir}/systemd/system/multi-user.target.wants/systemd-networkd.service \
> +        ${base_bindir}/networkctl \
> +        ${rootlibexecdir}/systemd/network/80-container-host0.network \
> +        ${rootlibexecdir}/systemd/network/80-container-ve.network \
> +        ${rootlibexecdir}/systemd/network/99-default.link \
> +        ${systemd_unitdir}/system/systemd-networkd-wait-online.service \
> +        ${systemd_unitdir}/system/systemd-networkd.service \
> +        ${rootlibexecdir}/systemd/systemd-networkd \
> +        ${rootlibexecdir}/systemd/systemd-networkd-wait-online \
> +        ${exec_prefix}/lib/systemd/network \
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.network1.conf \
> +        ${datadir}/dbus-1/system-services/org.freedesktop.network1.service \
> +"
> +
> +PACKAGES =+ "${PN}-services-nspawn"
> +SUMMARY_${PN}-services-nspawn = "systemd's namespace spawing service and tool"
> +FILES_${PN}-services-nspawn = "\
> +        ${systemd_unitdir}/system/systemd-nspawn@.service \
> +        ${bindir}/systemd-nspawn \
> +"
> +
> +PACKAGES =+ "${PN}-services-quota"
> +SUMMARY_${PN}-services-quota = "systemd's file system quota enable and check service"
> +RDEPENDS_${PN}-services-quota = "quota"
> +FILES_${PN}-services-quota = "\
> +        ${systemd_unitdir}/system/quotaon.service \
> +        ${systemd_unitdir}/system/systemd-quotacheck.service \
> +        ${rootlibexecdir}/systemd/systemd-quotacheck \
> +"
> +
> +PACKAGES =+ "${PN}-services-randomseed"
> +SUMMARY_${PN}-services-randomseed = "systemd's random seed save/restore service"
> +FILES_${PN}-services-randomseed = "\
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-random-seed.service \
> +        ${systemd_unitdir}/system/systemd-random-seed.service \
> +        ${rootlibexecdir}/systemd/systemd-random-seed \
> +"
> +
> +PACKAGES =+ "${PN}-services-readahead"
> +SUMMARY_${PN}-services-readahead = "systemd's disk read ahead service"
> +FILES_${PN}-services-readahead = "\
> +        ${systemd_unitdir}/system/systemd-readahead-collect.service \
> +        ${systemd_unitdir}/system/systemd-readahead-done.service \
> +        ${systemd_unitdir}/system/systemd-readahead-done.timer \
> +        ${systemd_unitdir}/system/systemd-readahead-drop.service \
> +        ${systemd_unitdir}/system/systemd-readahead-replay.service \
> +        ${rootlibexecdir}/systemd/systemd-readahead \
> +"
> +
> +PACKAGES =+ "${PN}-services-rfkill"
> +SUMMARY_${PN}-services-rfkill = "systemd's rfkill state save/restore service"
> +FILES_${PN}-services-rfkill = "\
> +        ${systemd_unitdir}/system/systemd-rfkill@.service \
> +        ${rootlibexecdir}/systemd/systemd-rfkill \
> +"
> +
> +PACKAGES =+ "${PN}-services-sleep"
> +SUMMARY_${PN}-services-sleep = "systemd's sleep, suspend and hiberate services"
> +FILES_${PN}-services-sleep = "\
> +        ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
> +        ${systemd_unitdir}/system/systemd-suspend.service \
> +        ${systemd_unitdir}/system/systemd-hibernate.service \
> +        ${systemd_unitdir}/system-sleep/ \
> +        ${rootlibexecdir}/systemd/systemd-sleep \
> +"
> +
> +PACKAGES =+ "${PN}-services-sysctl"
> +SUMMARY_${PN}-services-sysctl = "systemd's kernel parameters configuration service"
> +FILES_${PN}-services-sysctl = "\
> +        ${sysconfdir}/sysctl.d/ \
> +        ${exec_prefix}/lib/sysctl.d/ \
> +        ${exec_prefix}/lib/sysctl.d/50-default.conf \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-sysctl.service \
> +        ${systemd_unitdir}/system/systemd-sysctl.service \
> +        ${rootlibexecdir}/systemd/systemd-sysctl \
> +"
> +
> +PACKAGES =+ "${PN}-services-sysusers"
> +SUMMARY_${PN}-services-sysusers = "systemd's service and tool to allocate system users and groups"
> +FILES_${PN}-services-sysusers = "\
> +        ${base_bindir}/systemd-sysusers \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-sysusers.service \
> +        ${systemd_unitdir}/system/systemd-sysusers.service \
> +        ${exec_prefix}/lib/sysusers.d/basic.conf \
> +        ${exec_prefix}/lib/sysusers.d/systemd.conf \
> +"
> +
> +PACKAGES =+ "${PN}-services-sysvcompat"
> +SUMMARY_${PN}-services-sysvcompat = "systemd's SYSV legacy and compatibility service"
> +# NOTE: if no sysusers or tmpfiles, then users/groups and FS structure must be setup
> +RRECOMMENDS_${PN}-services-sysvcompat = "${PN}-services-sysusers ${PN}-services-tmpfiles"
> +FILES_${PN}-services-sysvcompat = "\
> +        ${rootlibexecdir}/systemd/systemd-bus-proxyd \
> +        ${rootlibexecdir}/systemd/systemd-socket-proxyd \
> +        ${bindir}/systemd-stdio-bridge \
> +        ${rootlibexecdir}/systemd/system-generators/systemd-rc-local-generator \
> +        ${rootlibexecdir}/systemd/system-generators/systemd-sysv-generator \
> +        ${rootlibexecdir}/systemd/systemd-initctl \
> +        ${rootlibexecdir}/systemd/systemd-update-utmp \
> +        ${systemd_unitdir}/system/halt-local.service \
> +        ${systemd_unitdir}/system/rc-local.service \
> +        ${systemd_unitdir}/system/runlevel1.target.wants/systemd-update-utmp-runlevel.service \
> +        ${systemd_unitdir}/system/runlevel2.target.wants/systemd-update-utmp-runlevel.service \
> +        ${systemd_unitdir}/system/runlevel3.target.wants/systemd-update-utmp-runlevel.service \
> +        ${systemd_unitdir}/system/runlevel4.target.wants/systemd-update-utmp-runlevel.service \
> +        ${systemd_unitdir}/system/runlevel5.target.wants/systemd-update-utmp-runlevel.service \
> +        ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-update-utmp.service \
> +        ${systemd_unitdir}/system/systemd-initctl.service \
> +        ${systemd_unitdir}/system/systemd-initctl.socket \
> +        ${systemd_unitdir}/system/systemd-update-utmp-runlevel.service \
> +        ${systemd_unitdir}/system/systemd-update-utmp.service \
> +        ${exec_prefix}/lib/tmpfiles.d/legacy.conf \
> +"
> +
> +PACKAGES =+ "${PN}-services-timedated"
> +SUMMARY_${PN}-services-timedated = "systemd's time and date management service"
> +RDEPENDS_${PN}-services-timedated = "${PN}-services-dbus"
> +CONFFILES_${PN}-services-timedated = "${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf"
> +FILES_${PN}-services-timedated = "\
> +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
> +        ${bindir}/timedatectl \
> +        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.timedate1.busname \
> +        ${systemd_unitdir}/system/dbus-org.freedesktop.timedate1.service \
> +        ${systemd_unitdir}/system/org.freedesktop.timedate1.busname \
> +        ${systemd_unitdir}/system/systemd-timedated.service \
> +        ${rootlibexecdir}/systemd/systemd-timedated \
> +        ${datadir}/dbus-1/system-services/org.freedesktop.timedate1.service \
> +        ${datadir}/polkit-1/actions/org.freedesktop.timedate1.policy \
> +"
> +
> +PACKAGES =+ "${PN}-services-timesyncd"
> +SUMMARY_${PN}-services-timesyncd = "systemd's NTP sync service"
> +# NOTE: if no sysusers, then users/groups must be setup
> +RRECOMMENDS_${PN}-services-timesyncd = "${PN}-services-sysusers"
> +CONFFILES_${PN}-services-timesyncd = "${sysconfdir}/systemd/timesyncd.conf"
> +FILES_${PN}-services-timesyncd = "\
> +        ${sysconfdir}/systemd/system/sysinit.target.wants/systemd-timesyncd.service \
> +        ${sysconfdir}/systemd/timesyncd.conf \
> +        ${systemd_unitdir}/system/systemd-timesyncd.service \
> +        ${rootlibexecdir}/systemd/systemd-timesyncd \
> +"
> +
> +PACKAGES =+ "${PN}-services-tmpfiles"
> +SUMMARY_${PN}-services-tmpfiles = "systemd's service to create, delete and clean up volatile/tmp files/dirs"
> +FILES_${PN}-services-tmpfiles = "\
> +        ${sysconfdir}/tmpfiles.d/ \
> +        ${base_bindir}/systemd-tmpfiles \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-tmpfiles-setup.service \
> +        ${systemd_unitdir}/system/systemd-tmpfiles-clean.service \
> +        ${systemd_unitdir}/system/systemd-tmpfiles-clean.timer \
> +        ${systemd_unitdir}/system/systemd-tmpfiles-setup-dev.service \
> +        ${systemd_unitdir}/system/systemd-tmpfiles-setup.service \
> +        ${systemd_unitdir}/system/timers.target.wants/systemd-tmpfiles-clean.timer \
> +        ${exec_prefix}/lib/tmpfiles.d/etc.conf \
> +        ${exec_prefix}/lib/tmpfiles.d/systemd-nologin.conf \
> +        ${exec_prefix}/lib/tmpfiles.d/systemd.conf \
> +        ${exec_prefix}/lib/tmpfiles.d/tmp.conf \
> +        ${exec_prefix}/lib/tmpfiles.d/var.conf \
> +        ${exec_prefix}/lib/tmpfiles.d/00-create-volatile.conf \
> +        ${exec_prefix}/lib/tmpfiles.d/x11.conf \
> +"
> +
> +PACKAGES =+ "${PN}-services-udev"
> +SUMMARY_${PN}-services-udev = "systemd's udev services"
> +RDEPENDS_${PN}-services-udev = "udev"
> +FILES_${PN}-services-udev = "\
> +        ${systemd_unitdir}/system/initrd-udevadm-cleanup-db.service \
> +        ${systemd_unitdir}/system/systemd-udev-hwdb-update.service \
> +        ${systemd_unitdir}/system/systemd-udev-settle.service \
> +        ${systemd_unitdir}/system/systemd-udev-trigger.service \
> +        ${systemd_unitdir}/system/systemd-udevd-control.socket \
> +        ${systemd_unitdir}/system/systemd-udevd-kernel.socket \
> +        ${systemd_unitdir}/system/systemd-udevd.service \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udevd.service \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udev-trigger.service \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udev-hwdb-update.service \
> +        ${systemd_unitdir}/system/sockets.target.wants/systemd-udevd-kernel.socket \
> +        ${systemd_unitdir}/system/sockets.target.wants/systemd-udevd-control.socket \
> +"
> +
> +PACKAGES =+ "${PN}-services-update"
> +SUMMARY_${PN}-services-update = "systemd's post update service"
> +FILES_${PN}-services-update = "\
> +        ${rootlibexecdir}/systemd/system-generators/systemd-system-update-generator \
> +        ${rootlibexecdir}/systemd/systemd-update-done \
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-update-done.service \
> +        ${systemd_unitdir}/system/systemd-update-done.service \
> +"
> +
> +PACKAGES =+ "${PN}-services-vconsole"
> +SUMMARY_${PN}-services-vconsole = "systemd's service to configure the virtual console (keyboard/font)"
> +RECOMMENDS_${PN}-services-vconsole = "kbd kbd-consolefonts kbd-keymaps"
> +FILES_${PN}-services-vconsole = "\
> +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service \
> +        ${systemd_unitdir}/system/systemd-vconsole-setup.service \
> +        ${rootlibexecdir}/systemd/systemd-vconsole-setup \
> +"
> +
> +########################################################################
> +# Standard BitBake Packages
> +########################################################################
> +
> +FILES_${PN}-dbg += "\
> +        ${base_libdir}/security/.debug/ \
> +        ${libdir}/systemd/ptest/.debug \
> +        ${rootlibdir}/.debug \
> +        ${systemd_unitdir}/*/.debug \
> +        ${systemd_unitdir}/.debug \
> +"
>  
>  FILES_${PN}-gui = "${bindir}/systemadm"
>  
> -FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
> -                              ${systemd_unitdir}/system/systemd-vconsole-setup.service \
> -                              ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
> +FILES_${PN}-dev += "\
> +        ${base_libdir}/security/*.la \
> +        ${datadir}/dbus-1/interfaces/ \
> +        ${sysconfdir}/rpm/macros.systemd \
> +"
> +
> +USERADD_PACKAGES = "${PN}"
> +USERADD_PARAM_${PN} += "--system systemd-journal-gateway; --system systemd-timesync"
> +GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
> +
> +# The test cases need perl and bash to run correctly.
> +RDEPENDS_${PN}-ptest += "perl python bash"
> +FILES_${PN}-ptest += "\
> +        ${libdir}/udev/rules.d \
> +"
> +
> +########################################################################
> +# Misc Packages
> +########################################################################
> +
> +PACKAGES =+ "${PN}-bash"
> +SUMMARY_${PN}-bash = "systemd bash shell commands completion"
> +FILES_${PN}-bash = "\
> +        ${datadir}/bash-completion/completions/bootctl \
> +        ${datadir}/bash-completion/completions/busctl \
> +        ${datadir}/bash-completion/completions/coredumpctl \
> +        ${datadir}/bash-completion/completions/hostnamectl \
> +        ${datadir}/bash-completion/completions/journalctl \
> +        ${datadir}/bash-completion/completions/kernel-install \
> +        ${datadir}/bash-completion/completions/localectl \
> +        ${datadir}/bash-completion/completions/loginctl \
> +        ${datadir}/bash-completion/completions/machinectl \
> +        ${datadir}/bash-completion/completions/systemctl \
> +        ${datadir}/bash-completion/completions/systemd-* \
> +        ${datadir}/bash-completion/completions/timedatectl \
> +"
>  
> +PACKAGES =+ "${PN}-initramfs"
> +SUMMARY_${PN}-initramfs = "systemd's initramfs support"
> +FILES_${PN}-initramfs = "/init"
> +RDEPENDS_${PN}-initramfs = "${PN}"
> +
> +PACKAGES =+ "${PN}-kernel-install"
> +SUMMARY_${PN}-kernel-install = "systemd tool to add/remove kernel and initramfs images to/from /boot"
>  RDEPENDS_${PN}-kernel-install += "bash"
> -FILES_${PN}-kernel-install = "${bindir}/kernel-install \
> -                              ${sysconfdir}/kernel/ \
> -                              ${exec_prefix}/lib/kernel \
> -                             "
> -FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
> -                         "
> -
> -FILES_${PN}-zsh = "${datadir}/zsh/site-functions"
> -
> -FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
> -                      ${exec_prefix}/lib/binfmt.d \
> -                      ${rootlibexecdir}/systemd/systemd-binfmt \
> -                      ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
> -                      ${systemd_unitdir}/system/systemd-binfmt.service"
> -RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
> -
> -RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
> -
> -CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
> -                ${sysconfdir}/systemd/logind.conf \
> -                ${sysconfdir}/systemd/system.conf \
> -                ${sysconfdir}/systemd/user.conf"
> -
> -FILES_${PN} = " ${base_bindir}/* \
> -                ${datadir}/bash-completion \
> -                ${datadir}/dbus-1/services \
> -                ${datadir}/dbus-1/system-services \
> -                ${datadir}/polkit-1 \
> -                ${datadir}/${BPN} \
> -                ${datadir}/factory \
> -                ${sysconfdir}/bash_completion.d/ \
> -                ${sysconfdir}/dbus-1/ \
> -                ${sysconfdir}/machine-id \
> -                ${sysconfdir}/modules-load.d/ \
> -                ${sysconfdir}/pam.d/ \
> -                ${sysconfdir}/sysctl.d/ \
> -                ${sysconfdir}/systemd/ \
> -                ${sysconfdir}/tmpfiles.d/ \
> -                ${sysconfdir}/xdg/ \
> -                ${sysconfdir}/init.d/README \
> -                ${rootlibexecdir}/systemd/* \
> -                ${systemd_unitdir}/* \
> -                ${base_libdir}/security/*.so \
> -                ${libdir}/libnss_* \
> -                /cgroup \
> -                ${bindir}/systemd* \
> -                ${bindir}/busctl \
> -                ${bindir}/localectl \
> -                ${bindir}/hostnamectl \
> -                ${bindir}/timedatectl \
> -                ${bindir}/bootctl \
> -                ${bindir}/kernel-install \
> -                ${exec_prefix}/lib/tmpfiles.d/*.conf \
> -                ${exec_prefix}/lib/systemd \
> -                ${exec_prefix}/lib/modules-load.d \
> -                ${exec_prefix}/lib/sysctl.d \
> -                ${exec_prefix}/lib/sysusers.d \
> -                ${localstatedir} \
> -                /lib/udev/rules.d/70-uaccess.rules \
> -                /lib/udev/rules.d/71-seat.rules \
> -                /lib/udev/rules.d/73-seat-late.rules \
> -                /lib/udev/rules.d/99-systemd.rules \
> -               "
> +FILES_${PN}-kernel-install = "\
> +        ${bindir}/kernel-install \
> +        ${sysconfdir}/kernel/ \
> +        ${exec_prefix}/lib/kernel \
> +"
>  
> -FILES_${PN}-dbg += "${rootlibdir}/.debug ${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"
> +PACKAGES =+ "${PN}-pam"
> +SUMMARY_${PN}-pam = "systemd PAM modules and configuration"
> +FILES_${PN}-pam = "\
> +        ${sysconfdir}/pam.d \
> +        ${base_libdir}/security/pam_systemd.so \
> +"
>  
> -RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
> -RDEPENDS_${PN} += "volatile-binds"
> +PACKAGES =+ "${PN}-preset"
> +SUMMARY_${PN}-preset = "systemd's service enablement presets"
> +FILES_${PN}-preset = "${systemd_unitdir}/system-preset/90-systemd.preset"
>  
> -RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units udev-hwdb\
> -                      util-linux-agetty \
> -                      util-linux-fsck e2fsprogs-e2fsck \
> -                      kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 os-release \
> +PACKAGES =+ "${PN}-rpm-macros"
> +SUMMARY_${PN}-rpm-macros = "systemd RPM macros"
> +FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
> +			 "
> +
> +PACKAGES =+ "${PN}-zsh"
> +SUMMARY_${PN}-zsh = "systemd zsh shell commands completion"
> +FILES_${PN}-zsh = "\
> +        ${datadir}/zsh/site-functions \
>  "
>  
> -PACKAGES =+ "udev-dbg udev udev-hwdb"
>  
> -FILES_udev-dbg += "/lib/udev/.debug"
> +########################################################################
> +# Aggregation of Split Packages
> +########################################################################
> +
> +PACKAGES =+ "${PN}-services-essential"
> +SUMMARY_${PN}-services-essential = "systemd's essential services aggregation"
> +ALLOW_EMPTY_${PN}-services-essential = "1"
> +RDEPENDS_${PN}-services-essential = "\
> +        ${PN}-generators-filesystems \
> +        ${PN}-preset \
> +        ${PN}-services-fsck \
> +        ${PN}-services-journal \
> +        ${PN}-services-modules-load \
> +        ${PN}-services-randomseed \
> +        ${PN}-services-sleep \
> +        ${PN}-services-sysctl \
> +        ${PN}-services-sysusers \
> +        ${PN}-services-tmpfiles \
> +        ${PN}-services-udev \
> +        udev-rules-systemd \
> +"
>  
> -RPROVIDES_udev = "hotplug"
> +PACKAGES =+ "${PN}-services-base"
> +SUMMARY_${PN}-services-base = "systemd's base services aggregation"
> +ALLOW_EMPTY_${PN}-services-base = "1"
> +RDEPENDS_${PN}-services-base = "${PN}-services-essential \
> +        ${PN}-services-ask-password \
> +        ${PN}-services-backlight \
> +        ${PN}-services-binfmt \
> +        ${PN}-services-coredump \
> +        ${PN}-services-dbus \
> +        ${PN}-services-firstboot \
> +        ${PN}-services-fuse \
> +        ${PN}-services-hostnamed \
> +        ${PN}-services-ldconfig \
> +        ${PN}-services-localed \
> +        ${PN}-services-logind \
> +        ${PN}-services-networkd \
> +        ${PN}-services-quota \
> +        ${PN}-services-rfkill \
> +        ${PN}-services-timedated \
> +        ${PN}-services-timesyncd \
> +        ${PN}-services-update \
> +        ${PN}-services-vconsole \
> +        ${PN}-services-modules-static-nodes \
> +        ${PN}-bash \
> +        ${PN}-initramfs \
> +        ${PN}-kernel-install \
> +        ${PN}-rpm-macros \
> +        ${PN}-zsh \
> +"
>  
> -RDEPENDS_udev-hwdb += "udev"
> +PACKAGES =+ "${PN}-services-all"
> +SUMMARY_${PN}-services-all = "systemd's all services and tools aggregation"
> +ALLOW_EMPTY_${PN}-services-all = "1"
> +RDEPENDS_${PN}-services-all = "${PN}-services-base \
> +        ${PN}-services-bootchart \
> +        ${PN}-services-cryptsetup \
> +        ${PN}-services-debug \
> +        ${PN}-services-machined \
> +        ${PN}-services-nspawn \
> +        ${PN}-services-sysvcompat \
> +        ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${PN}-services-multi-seat-x', '', d)} \
> +"
>  
> -FILES_udev += "${base_sbindir}/udevd \
> -               ${rootlibexecdir}/systemd/systemd-udevd \
> -               ${rootlibexecdir}/udev/accelerometer \
> -               ${rootlibexecdir}/udev/ata_id \
> -               ${rootlibexecdir}/udev/cdrom_id \
> -               ${rootlibexecdir}/udev/collect \
> -               ${rootlibexecdir}/udev/findkeyboards \
> -               ${rootlibexecdir}/udev/keyboard-force-release.sh \
> -               ${rootlibexecdir}/udev/keymap \
> -               ${rootlibexecdir}/udev/mtd_probe \
> -               ${rootlibexecdir}/udev/scsi_id \
> -               ${rootlibexecdir}/udev/v4l_id \
> -               ${rootlibexecdir}/udev/keymaps \
> -               ${rootlibexecdir}/udev/rules.d/*.rules \
> -               ${sysconfdir}/udev \
> -               ${sysconfdir}/init.d/systemd-udevd \
> -               ${systemd_unitdir}/system/*udev* \
> -               ${systemd_unitdir}/system/*.wants/*udev* \
> -               ${base_bindir}/udevadm \
> -               ${datadir}/bash-completion/completions/udevadm \
> -              "
> -
> -FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
>  
> -INITSCRIPT_PACKAGES = "udev"
> -INITSCRIPT_NAME_udev = "systemd-udevd"
> -INITSCRIPT_PARAMS_udev = "start 03 S ."
> +########################################################################
> +# Core Package
> +########################################################################
>  
> -python __anonymous() {
> -    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
> -        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
> -}
> +CONFFILES_${PN} = "\
> +        ${sysconfdir}/systemd/system.conf \
> +        ${sysconfdir}/systemd/user.conf \
> +"
>  
> +FILES_${PN} = "\
> +        ${base_bindir}/systemctl \
> +        ${base_bindir}/systemd-hwdb \
> +        ${bindir}/bootctl \
> +        ${datadir}/${BPN} \
> +        ${datadir}/factory \
> +        ${exec_prefix}/lib/libnss_myhostname* \
> +        ${exec_prefix}/lib/libnss_mymachines.so.2 \
> +        ${libdir}/systemd/user-generators/ \
> +        ${libdir}/systemd/user/ \
> +        ${localstatedir} \
> +        ${rootlibexecdir}/systemd/systemd \
> +        ${rootlibexecdir}/systemd/systemd-cgroups-agent \
> +        ${rootlibexecdir}/systemd/systemd-shutdown \
> +        ${rootlibexecdir}/systemd/systemd-shutdownd \
> +        ${rootlibexecdir}/systemd/systemd-machine-id-commit \
> +        ${rootlibexecdir}/systemd/systemd-hibernate-resume \
> +        ${rootlibexecdir}/systemd/systemd-importd \
> +        ${rootlibexecdir}/systemd/import-pubring.gpg \
> +        ${rootlibexecdir}/systemd/systemd-pull \
> +        ${sysconfdir}/init.d/README \
> +        ${sysconfdir}/machine-id \
> +        ${sysconfdir}/systemd/system.conf \
> +        ${sysconfdir}/systemd/system/ \
> +        ${sysconfdir}/systemd/user.conf \
> +        ${sysconfdir}/systemd/user/ \
> +        ${sysconfdir}/xdg/systemd/ \
> +        ${systemd_unitdir}/system-generators/ \
> +        ${systemd_unitdir}/system-preset/ \
> +        ${systemd_unitdir}/system-shutdown/ \
> +        ${systemd_unitdir}/system/ \
> +"
>  # TODO:
>  # u-a for runlevel and telinit
> +RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
> +RDEPENDS_${PN} += "volatile-binds"
> +
> +RRECOMMENDS_${PN} += "\
> +        ${PN}-services-base \
> +        ${PN}-services-essential \
> +        ${PN}-services-all \
> +        ${PN}-tools \
> +        ${PN}-generators-getty \
> +        ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PN}-pam', '', d)} \
> +        ${PN}-services-getty \
> +        kernel-module-autofs4 \
> +        kernel-module-ipv6 \
> +        kernel-module-unix \
> +        util-linux-agetty \
> +        util-linux-fsck \
> +        e2fsprogs-e2fsck \
> +        os-release \
> +        udev-hwdb \
> +        systemd-serialgetty \
> +        systemd-compat-units \
> +"
>  
>  ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
>  
> @@ -389,6 +1019,41 @@ ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
>  ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
>  ALTERNATIVE_PRIORITY[runlevel] ?= "300"
>  
> +
> +########################################################################
> +# UDEV Section
> +########################################################################
> +
> +PACKAGES =+ "udev-dbg"
> +SUMMARY_udev-dbg = "Dynamic device management - Debugging files"
> +RRECOMMENDS_udev-dbg += "${PN}-dbg"
> +FILES_udev-dbg = "\
> +        ${rootlibexecdir}/udev/.debug \
> +        ${base_sbindir}/.debug/udevd \
> +        ${base_bindir}/.debug/udevadm \
> +        ${rootlibexecdir}/systemd/.debug/systemd-udevd \
> +        ${base_libdir}/.debug/libudev* \
> +        ${base_libdir}/.debug/libgudev* \
> +        ${exec_prefix}/lib/.debug/libgudev* \
> +"
> +
> +PACKAGES =+ "udev-dev"
> +SUMMARY_udev-dev = "Dynamic device management - Development files"
> +RRECOMMENDS_udev-dev += "${PN}-dev"
> +FILES_udev-dev = "\
> +        ${datadir}/pkgconfig/*udev* \
> +        ${libdir}/pkgconfig/*udev* \
> +        ${libdir}/lib*udev*.la \
> +        ${includedir}/*udev* \
> +"
> +
> +PACKAGES =+ "udev-hwdb"
> +SUMMARY_udev-hwdb = "Dynamic device management - Hardware database"
> +RDEPENDS_udev-hwdb += "udev"
> +FILES_udev-hwdb = "\
> +        ${rootlibexecdir}/udev/hwdb.d/ \
> +"
> +
>  pkg_postinst_udev-hwdb () {
>  	if test -n "$D"; then
>  		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
> @@ -406,6 +1071,154 @@ pkg_prerm_udev-hwdb () {
>  	rm -f ${sysconfdir}/udev/hwdb.bin
>  }
>  
> +PACKAGES =+ "udev-bash"
> +SUMMARY_udev-bash = "Dynamic device management - Bash shell commands completion"
> +FILES_udev-bash = "${datadir}/bash-completion/completions/udevadm"
> +
> +PACKAGES =+ "udev-zsh"
> +SUMMARY_udev-zsh = "Dynamic device management - zsh shell commands completion"
> +FILES_udev-zsh = "${datadir}/zsh/site-functions/_udevadm"
> +
> +
> +########################################################################
> +# UDEV Rules Packages
> +# split rules that require external programs or dependencies.
> +# those that use only builtins are not split
> +########################################################################
> +
> +PACKAGES =+ "udev-rules-accelerometer"
> +SUMMARY_udev-rules-accelerometer = "Dynamic device management - accelerometer rules"
> +FILES_udev-rules-accelerometer = "\
> +        ${rootlibexecdir}/udev/accelerometer \
> +        ${rootlibexecdir}/udev/rules.d/61-accelerometer.rules \
> +        ${rootlibexecdir}/udev/rules.d/70-touchpad.rules \
> +"
> +
> +PACKAGES =+ "udev-rules-cdrom"
> +SUMMARY_udev-rules-cdrom = "Dynamic device management - cdrom rules"
> +FILES_udev-rules-cdrom = "\
> +        ${rootlibexecdir}/udev/cdrom_id \
> +        ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \
> +"
> +
> +PACKAGES =+ "udev-rules-mtd"
> +SUMMARY_udev-rules-mtd = "Dynamic device management - mtd rules"
> +FILES_udev-rules-mtd = "\
> +        ${rootlibexecdir}/udev/mtd_probe \
> +        ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \
> +"
> +
> +PACKAGES =+ "udev-rules-persistent-storage"
> +SUMMARY_udev-rules-persistent-storage = "Dynamic device management - persistent storage rules"
> +FILES_udev-rules-persistent-storage = "\
> +        ${rootlibexecdir}/udev/ata_id \
> +        ${rootlibexecdir}/udev/scsi_id \
> +        ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \
> +        ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \
> +"
> +
> +PACKAGES =+ "udev-rules-systemd"
> +SUMMARY_udev-rules-systemd = "Dynamic device management - systemd rules"
> +RDEPENDS_udev-rules-systemd = "${PN} ${PN}-services-sysctl"
> +FILES_udev-rules-systemd = "\
> +        ${rootlibexecdir}/udev/rules.d/99-systemd.rules \
> +"
> +
> +PACKAGES =+ "udev-rules-v4l"
> +SUMMARY_udev-rules-v4l = "Dynamic device management - v4l rules"
> +FILES_udev-rules-v4l = "\
> +        ${rootlibexecdir}/udev/v4l_id \
> +        ${rootlibexecdir}/udev/rules.d/*-persistent-v4l.rules \
> +"
> +
> +PACKAGES =+ "udev-rules-all"
> +SUMMARY_udev-rules-all = "Dynamic device management - all rules aggregation"
> +ALLOW_EMPTY_udev-rules-all = "1"
> +RDEPENDS_udev-rules-all = "\
> +        udev-rules-accelerometer \
> +        udev-rules-cdrom \
> +        udev-rules-mtd \
> +        udev-rules-persistent-storage \
> +        udev-rules-systemd \
> +        udev-rules-v4l \
> +"
> +
> +PACKAGES =+ "udev"
> +SUMMARY_udev = "Dynamic device management"
> +RPROVIDES_udev = "hotplug"
> +PROVIDES = "udev"
> +CONFFILES_udev = "${sysconfdir}/udev/udev.conf"
> +RDEPENDS_udev += "${PN}-services-vconsole"
> +FILES_udev = "\
> +        ${base_bindir}/udevadm \
> +        ${base_sbindir}/udevd \
> +        ${rootlibexecdir}/systemd/systemd-udevd \
> +        ${rootlibexecdir}/udev/collect \
> +        ${rootlibexecdir}/udev/rules.d/42-usb-hid-pm.rules \
> +        ${rootlibexecdir}/udev/rules.d/50-firmware.rules \
> +        ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \
> +        ${rootlibexecdir}/udev/rules.d/60-drm.rules \
> +        ${rootlibexecdir}/udev/rules.d/60-keyboard.rules \
> +        ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \
> +        ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \
> +        ${rootlibexecdir}/udev/rules.d/60-persistent-serial.rules \
> +        ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \
> +        ${rootlibexecdir}/udev/rules.d/75-net-description.rules \
> +        ${rootlibexecdir}/udev/rules.d/75-tty-description.rules \
> +        ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \
> +        ${rootlibexecdir}/udev/rules.d/80-drivers.rules \
> +        ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \
> +        ${rootlibexecdir}/udev/rules.d/95-udev-late.rules \
> +        ${rootlibexecdir}/udev/rules.d/70-mouse.rules \
> +        ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
> +        ${rootlibexecdir}/udev/rules.d/touchscreen.rules \
> +        ${sysconfdir}/init.d/systemd-udevd \
> +        ${sysconfdir}/udev \
> +"
> +
> +RRECOMMENDS_udev = "\
> +        udev-hwdb \
> +        udev-rules-all \
> +"
> +
> +INITSCRIPT_PACKAGES = "udev"
> +INITSCRIPT_NAME_udev = "systemd-udevd"
> +INITSCRIPT_PARAMS_udev = "start 03 S ."
> +
> +python __anonymous() {
> +    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
> +        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
> +}
> +
> +# TODO:
> +# u-a for runlevel and telinit
> +
> +ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
> +
> +ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
> +ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
> +ALTERNATIVE_PRIORITY[init] ?= "300"
> +
> +ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
> +ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
> +ALTERNATIVE_PRIORITY[halt] ?= "300"
> +
> +ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
> +ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
> +ALTERNATIVE_PRIORITY[reboot] ?= "300"
> +
> +ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
> +ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
> +ALTERNATIVE_PRIORITY[shutdown] ?= "300"
> +
> +ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
> +ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
> +ALTERNATIVE_PRIORITY[poweroff] ?= "300"
> +
> +ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
> +ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
> +ALTERNATIVE_PRIORITY[runlevel] ?= "300"
> +
>  # As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
>  # that we don't build both udev and systemd in world builds.
>  python () {
> 



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

* Re: [PATCH 3/4] systemd: split modules into packages
  2015-03-26  8:29     ` Anders Darander
@ 2015-03-26 11:56       ` Otavio Salvador
  2015-03-26 13:40         ` Bottazzini, Bruno
  2015-03-26 17:25         ` Khem Raj
  0 siblings, 2 replies; 73+ messages in thread
From: Otavio Salvador @ 2015-03-26 11:56 UTC (permalink / raw)
  To: Bruno Bottazzini, Patches and discussions about the oe-core layer

On Thu, Mar 26, 2015 at 5:29 AM, Anders Darander <anders@chargestorm.se> wrote:
> * Bruno Bottazzini <bruno.bottazzini@intel.com> [150325 22:50]:
>
>> if one wants to launch a simple deamon, most modules are not
>> required.
>> He will be able to save space and exclude unwanted packages
>> from the final image.
>
> I like this, though I've got a few questions that I just noticed.
>
>> -PACKAGECONFIG ??= "xz ldconfig \
>> +PACKAGECONFIG ??= " \
>> +                   gcrypt \
>> +                   kmod \
>> +                   ldconfig \
>> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'blkid', 'blkid', '', d)} \
>> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'efi', 'efi', '', d)} \
>> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'lz4', 'lz4', '', d)} \
>> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'xz', 'xz', '', d)} \
>> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'libidn', 'libidn', '', d)} \
>> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
>>                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
>>                     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}"
>
> It might be worth noting that xz has gone from being explicitly enabled,
> to depend on a DISTRO_FEATURES.

Agreed and we shouldn't explode the number of possible dsitro
features. I'd also prefer if xz were kept enable by default so we
don't make a behavior change under the hood.

...
>>  PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
>> -PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
>
> Why do you remove networkd as a PACKAGECONFIG?

If there is a real reason for this, it must be recorded in commit log as well.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH 3/4] systemd: split modules into packages
  2015-03-26  8:52     ` Andreas Oberritter
@ 2015-03-26 13:33       ` Bottazzini, Bruno
  2015-03-26 13:38         ` Otavio Salvador
  0 siblings, 1 reply; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-03-26 13:33 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: openembedded-core

On Qui, 2015-03-26 at 09:52 +0100, Andreas Oberritter wrote:
> Hi Bruno,
> 
> On 25.03.2015 22:49, Bruno Bottazzini wrote:
> > if one wants to launch a simple deamon, most modules are not
> > required.
> > He will be able to save space and exclude unwanted packages
> > from the final image.
> > ---
> >  meta/recipes-core/systemd/systemd_219.bb | 1073 ++++++++++++++++++++++++++----
> >  1 file changed, 943 insertions(+), 130 deletions(-)
> > 
> > diff --git a/meta/recipes-core/systemd/systemd_219.bb b/meta/recipes-core/systemd/systemd_219.bb
> > index e2ea81e..9bb104f 100644
> > --- a/meta/recipes-core/systemd/systemd_219.bb
> > +++ b/meta/recipes-core/systemd/systemd_219.bb
> > @@ -19,7 +19,7 @@ PROVIDES = "udev"
> >  
> >  PE = "1"
> >  
> > -DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux"
> > +DEPENDS = "intltool-native gperf-native readline libcap libcgroup qemu-native"
> >  
> >  SECTION = "base/shell"
> >  
> > @@ -62,23 +62,45 @@ LDFLAGS_append_libc-uclibc = " -lrt"
> >  
> >  GTKDOC_DOCDIR = "${S}/docs/"
> >  
> > -PACKAGECONFIG ??= "xz ldconfig \
> > +PACKAGECONFIG ??= " \
> > +                   gcrypt \
> > +                   kmod \
> > +                   ldconfig \
> > +                   ${@bb.utils.contains('DISTRO_FEATURES', 'blkid', 'blkid', '', d)} \
> > +                   ${@bb.utils.contains('DISTRO_FEATURES', 'efi', 'efi', '', d)} \
> > +                   ${@bb.utils.contains('DISTRO_FEATURES', 'lz4', 'lz4', '', d)} \
> > +                   ${@bb.utils.contains('DISTRO_FEATURES', 'xz', 'xz', '', d)} \
> > +                   ${@bb.utils.contains('DISTRO_FEATURES', 'libidn', 'libidn', '', d)} \
> 
> please don't invent new distro features for packageconfig of a single
> recipe.
> 
> Regards,
> Andreas

Andreas,

Firstly, thank you a lot, for reviewing this patch


How would you suggest to change this code ?

Should I do the following ?

PACKAGECONFIG ??= " \
                   gcrypt \
                   kmod \
                   ldconfig \
                   blkid \
                   efi \
                   ... \
an so on ?

Best Regards,

Bruno Bottazzini


> 
> > +                   ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
> >                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
> >                     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}"
> >  
> > +PACKAGECONFIG[glib] = "--enable-gudev,--disable-gudev,glib-2.0"
> > +PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
> > +PACKAGECONFIG[blkid] = "--enable-blkid,--disable-blkid,util-linux"
> > +PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
> > +PACKAGECONFIG[kmod] = "--enable-kmod,--disable-kmod,kmod"
> > +PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,,polkit"
> > +PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
> > +PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
> > +PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
> > +PACKAGECONFIG[apparmor] = "--enable-apparmor,--disable-apparmor,libapparmor"
> > +PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
> > +PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
> >  PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
> >  # Sign the journal for anti-tampering
> >  PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
> >  # regardless of PACKAGECONFIG, libgcrypt is always required to expand
> >  # the AM_PATH_LIBGCRYPT autoconf macro
> > -DEPENDS += "libgcrypt"
> >  # Compress the journal
> > +PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
> >  PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
> > +PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,libqrencode"
> > +PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
> >  PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
> >  PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd"
> >  PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
> >  PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
> > -PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
> >  PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
> >  PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
> >  PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
> > @@ -101,17 +123,36 @@ rootprefix ?= "${base_prefix}"
> >  rootlibdir ?= "${base_libdir}"
> >  rootlibexecdir = "${rootprefix}/lib"
> >  
> > -# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
> >  EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
> >                   --with-rootlibdir=${rootlibdir} \
> >                   --with-roothomedir=${ROOT_HOME} \
> > -                 --disable-coredump \
> > +                 --enable-coredump \
> > +                 --disable-introspection \
> > +                 --disable-kdbus \
> > +                 --disable-manpages \
> >                   --disable-introspection \
> >                   --disable-kdbus \
> >                   --enable-split-usr \
> >                   --without-python \
> >                   --with-sysvrcnd-path=${sysconfdir} \
> >                   --with-firmware-path=/lib/firmware \
> > +                 --enable-libcurl \
> > +                 --enable-ldconfig \
> > +                 --enable-backlight \
> > +                 --enable-binfmt \
> > +                 --enable-bootchart \
> > +                 --enable-firstboot \
> > +                 --enable-hostnamed \
> > +                 --enable-localed \
> > +                 --enable-logind \
> > +                 --enable-machined \
> > +                 --enable-networkd \
> > +                 --enable-quotacheck \
> > +                 --enable-randomseed \
> > +                 --enable-resolved \
> > +                 --enable-rfkill \
> > +                 --enable-sysusers \
> > +                 --enable-vconsole \
> >                 "
> >  # uclibc does not have NSS
> >  EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
> > @@ -210,158 +251,747 @@ do_install_ptest () {
> >  
> >  python populate_packages_prepend (){
> >      systemdlibdir = d.getVar("rootlibdir", True)
> > -    do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
> > +    do_split_packages(d, systemdlibdir, '^lib(udev|gudev|systemd|nss)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
> >  }
> > -PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
> > +PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd|nss).*"
> > +
> > +########################################################################
> > +# Base Packages
> > +########################################################################
> > +
> > +PACKAGES =+ "${PN}-generators-filesystems"
> > +SUMMARY_${PN}-generators-filesystems = "systemd's generator for filesystem services based on fstab and GPT"
> > +RDEPENDS_${PN}-generators-filesystems = "${PN}-services-fsck"
> > +FILES_${PN}-generators-filesystems = "\
> > +        ${rootlibexecdir}/systemd/system-generators/systemd-fstab-generator \
> > +        ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
> > +        ${rootlibexecdir}/systemd/systemd-remount-fs \
> > +        ${systemd_unitdir}/system/local-fs.target.wants/systemd-remount-fs.service \
> > +        ${systemd_unitdir}/system/systemd-remount-fs.service \
> > +"
> >  
> > -PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \
> > -             ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh libgudev"
> > +PACKAGES =+ "${PN}-generators-getty"
> > +SUMMARY_${PN}-generators-getty = "systemd's generator TTY services"
> > +RDEPENDS_${PN}-generators-getty = "${PN}-services-getty"
> > +FILES_${PN}-generators-getty = "\
> > +        ${rootlibexecdir}/systemd/system-generators/systemd-getty-generator \
> > +"
> >  
> > -SYSTEMD_PACKAGES = "${PN}-binfmt"
> > -SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
> > +PACKAGES =+ "${PN}-tools"
> > +SUMMARY_${PN}-tools = "systemd command line tools (cgls, delta, run, analyze...)"
> > +RRECOMMENDS_${PN}-tools = "${PN}-services-base"
> > +FILES_${PN}-tools = "\
> > +        ${base_bindir}/systemd-machine-id-setup \
> > +        ${bindir}/busctl \
> > +        ${bindir}/coredumpctl \
> > +        ${bindir}/systemd-analyze \
> > +        ${bindir}/systemd-cat \
> > +        ${bindir}/systemd-cgls \
> > +        ${bindir}/systemd-cgtop \
> > +        ${bindir}/systemd-delta \
> > +        ${bindir}/systemd-detect-virt \
> > +        ${bindir}/systemd-path \
> > +        ${bindir}/systemd-run \
> > +        ${rootlibexecdir}/systemd/systemd-ac-power \
> > +        ${rootlibexecdir}/systemd/systemd-activate \
> > +        ${rootlibexecdir}/systemd/systemd-reply-password \
> > +        ${rootprefix}/bin/systemd-escape \
> > +        ${rootprefix}/bin/systemd-notify \
> > +"
> >  
> > -USERADD_PACKAGES = "${PN}"
> > -USERADD_PARAM_${PN} += "--system systemd-journal-gateway; --system systemd-timesync"
> > -GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
> > +########################################################################
> > +# Services Packages
> > +########################################################################
> > +
> > +PACKAGES =+ "${PN}-services-ask-password"
> > +SUMMARY_${PN}-services-ask-password = "systemd's service and tool to query the user for a system password"
> > +RRECOMMENDS_${PN}-services-ask-password = "${PN}-services-base"
> > +FILES_${PN}-services-ask-password = "\
> > +        ${rootprefix}/bin/systemd-ask-password \
> > +        ${rootprefix}/bin/systemd-tty-ask-password-agent \
> > +        ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
> > +        ${systemd_unitdir}/system/systemd-ask-password-console.path \
> > +        ${systemd_unitdir}/system/systemd-ask-password-console.service \
> > +        ${systemd_unitdir}/system/systemd-ask-password-wall.path \
> > +        ${systemd_unitdir}/system/systemd-ask-password-wall.service \
> > +"
> >  
> > -FILES_${PN}-analyze = "${bindir}/systemd-analyze"
> > +PACKAGES =+ "${PN}-services-backlight"
> > +SUMMARY_${PN}-services-backlight = "systemd's backlight state save/restore service"
> > +FILES_${PN}-services-backlight = "\
> > +        ${systemd_unitdir}/system/systemd-backlight@.service \
> > +        ${rootlibexecdir}/systemd/systemd-backlight \
> > +"
> >  
> > -FILES_${PN}-initramfs = "/init"
> > -RDEPENDS_${PN}-initramfs = "${PN}"
> > +PACKAGES =+ "${PN}-services-binfmt"
> > +SUMMARY_${PN}-services-binfmt = "systemd's service to configure additional binary formats for executables"
> > +RRECOMMENDS_${PN}-services-binfmt = "kernel-module-binfmt-misc"
> > +FILES_${PN}-services-binfmt = "\
> > +        ${sysconfdir}/binfmt.d/ \
> > +        ${exec_prefix}/lib/binfmt.d/ \
> > +        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.automount \
> > +        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.mount \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount \
> > +        ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-binfmt.service \
> > +        ${systemd_unitdir}/system/systemd-binfmt.service \
> > +        ${rootlibexecdir}/systemd/systemd-binfmt \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-bootchart"
> > +SUMMARY_${PN}-services-bootchart = "systemd's boot performance service and graphing tool"
> > +CONFFILES_${PN}-services-bootchart = "${sysconfdir}/systemd/bootchart.conf"
> > +FILES_${PN}-services-bootchart = "\
> > +        ${sysconfdir}/systemd/bootchart.conf \
> > +        ${rootlibexecdir}/systemd/systemd-bootchart \
> > +"
> >  
> > -FILES_libgudev = "${libdir}/libgudev*${SOLIBS}"
> > +PACKAGES =+ "${PN}-services-coredump"
> > +SUMMARY_${PN}-services-coredump = "systemd's coredump log hook and service"
> > +RDEPENDS_${PN}-services-coredump = "${PN}-services-sysctl"
> > +CONFFILES_${PN}-services-coredump = "${sysconfdir}/systemd/coredump.conf"
> > +FILES_${PN}-services-coredump = "\
> > +        ${exec_prefix}/lib/sysctl.d/50-coredump.conf \
> > +        ${sysconfdir}/systemd/coredump.conf \
> > +        ${rootlibexecdir}/systemd/systemd-coredump \
> > +"
> >  
> > -RDEPENDS_${PN}-ptest += "perl python bash"
> > -FILES_${PN}-ptest += "${libdir}/udev/rules.d"
> > +PACKAGES =+ "${PN}-services-cryptsetup"
> > +SUMMARY_${PN}-services-cryptsetup = "systemd's disk decryption service"
> > +ALLOW_EMPTY_${PN}-services-cryptsetup = "1"
> > +FILES_${PN}-services-cryptsetup = "\
> > +        ${rootlibexecdir}/systemd/system-generators/systemd-cryptsetup-generator \
> > +        ${systemd_unitdir}/system/cryptsetup-pre.target \
> > +        ${systemd_unitdir}/system/cryptsetup.target \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/cryptsetup.target \
> > +        ${rootlibexecdir}/systemd/systemd-cryptsetup \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-dbus"
> > +SUMMARY_${PN}-services-dbus = "systemd's DBus daemon system service"
> > +# NOTE: dbus dependency will go away when kdbus is in use
> > +RDEPENDS_${PN}-services-dbus = "dbus"
> > +FILES_${PN}-services-dbus = "\
> > +        ${datadir}/dbus-1/services/org.freedesktop.systemd1.service \
> > +        ${datadir}/dbus-1/system-services/org.freedesktop.systemd1.service \
> > +        ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
> > +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
> > +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
> > +        ${systemd_unitdir}/system/sockets.target.wants/dbus.socket \
> > +        ${systemd_unitdir}/system/dbus.target.wants/dbus.socket \
> > +        ${systemd_unitdir}/system/multi-user.target.wants/dbus.service \
> > +        ${systemd_unitdir}/system/dbus.socket \
> > +        ${systemd_unitdir}/system/dbus.service \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-debug"
> > +SUMMARY_${PN}-services-debug = "systemd's debug service"
> > +RRECOMMENDS_${PN}-services-debug = "${PN}-services-base ${PN}-tools"
> > +FILES_${PN}-services-debug = "\
> > +        ${rootlibexecdir}/systemd/system-generators/systemd-debug-generator \
> > +        ${systemd_unitdir}/system/debug-shell.service \
> > +        ${systemd_unitdir}/system/sys-kernel-config.mount \
> > +        ${systemd_unitdir}/system/sys-kernel-debug.mount \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/sys-kernel-config.mount \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/sys-kernel-debug.mount \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-firstboot"
> > +SUMMARY_${PN}-services-firstboot = "systemd's service to initialize basic system settings"
> > +FILES_${PN}-services-firstboot = "\
> > +        ${base_bindir}/systemd-firstboot \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-firstboot.service \
> > +        ${systemd_unitdir}/system/systemd-firstboot.service \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-fsck"
> > +SUMMARY_${PN}-services-fsck = "systemd's filesystem check service"
> > +RRECOMMENDS_${PN}-services-fsck = "util-linux-fsck e2fsprogs-e2fsck"
> > +FILES_${PN}-services-fsck = "\
> > +        ${systemd_unitdir}/system/systemd-fsck-root.service \
> > +        ${systemd_unitdir}/system/systemd-fsck@.service \
> > +        ${rootlibexecdir}/systemd/systemd-fsck \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-fuse"
> > +SUMMARY_${PN}-services-fuse = "systemd's FUSE (filesystem in userspace) service"
> > +FILES_${PN}-services-fuse = "\
> > +        ${systemd_unitdir}/system/sysinit.target.wants/sys-fs-fuse-connections.mount \
> > +        ${systemd_unitdir}/system/sys-fs-fuse-connections.mount \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-getty"
> > +SUMMARY_${PN}-services-getty = "systemd's getty service"
> > +RRECOMMENDS_${PN}-services-getty = "util-linux-agetty ${PN}-generators-getty"
> > +FILES_${PN}-services-getty = "\
> > +        ${systemd_unitdir}/system/autovt@.service \
> > +        ${systemd_unitdir}/system/console-getty.service \
> > +        ${systemd_unitdir}/system/container-getty@.service \
> > +        ${systemd_unitdir}/system/getty@.service \
> > +        ${systemd_unitdir}/system/serial-getty@.service \
> > +        ${sysconfdir}/systemd/system/getty.target.wants/ \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-hostnamed"
> > +SUMMARY_${PN}-services-hostnamed = "systemd's hostname management service"
> > +RDEPENDS_${PN}-services-hostnamed = "${PN}-services-dbus"
> > +CONFFILES_${PN}-services-hostnamed = "${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf"
> > +FILES_${PN}-services-hostnamed = "\
> > +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
> > +        ${bindir}/hostnamectl \
> > +        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.hostname1.busname \
> > +        ${systemd_unitdir}/system/dbus-org.freedesktop.hostname1.service \
> > +        ${systemd_unitdir}/system/org.freedesktop.hostname1.busname \
> > +        ${systemd_unitdir}/system/systemd-hostnamed.service \
> > +        ${rootlibexecdir}/systemd/systemd-hostnamed \
> > +        ${datadir}/dbus-1/system-services/org.freedesktop.hostname1.service \
> > +        ${datadir}/polkit-1/actions/org.freedesktop.hostname1.policy \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-journal"
> > +SUMMARY_${PN}-services-journal = "systemd's journal (logging) service"
> > +CONFFILES_${PN}-services-journal = "${sysconfdir}/systemd/journald.conf"
> > +FILES_${PN}-services-journal = "\
> > +        ${base_bindir}/journalctl \
> > +        ${rootlibexecdir}/systemd/systemd-journald \
> > +        ${sysconfdir}/systemd/journald.conf \
> > +        ${systemd_unitdir}/system/sockets.target.wants/systemd-journald-dev-log.socket \
> > +        ${systemd_unitdir}/system/sockets.target.wants/systemd-journald.socket \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journal-catalog-update.service \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journal-flush.service \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-journald.service \
> > +        ${systemd_unitdir}/system/systemd-journal-catalog-update.service \
> > +        ${systemd_unitdir}/system/systemd-journal-flush.service \
> > +        ${systemd_unitdir}/system/systemd-journald-dev-log.socket \
> > +        ${systemd_unitdir}/system/systemd-journald.service \
> > +        ${systemd_unitdir}/system/systemd-journald.socket \
> > +        ${exec_prefix}/lib/systemd/catalog/ \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-ldconfig"
> > +SUMMARY_${PN}-services-ldconfig = "systemd's service to run ldconfig after updates"
> > +FILES_${PN}-services-ldconfig = "\
> > +        ${systemd_unitdir}/system/sysinit.target.wants/ldconfig.service \
> > +        ${systemd_unitdir}/system/ldconfig.service \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-localed"
> > +SUMMARY_${PN}-services-localed = "systemd's locale management service"
> > +RDEPENDS_${PN}-services-localed = "${PN}-services-dbus"
> > +CONFFILES_${PN}-services-localed = "${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf"
> > +FILES_${PN}-services-localed = "\
> > +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf \
> > +        ${bindir}/localectl \
> > +        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.locale1.busname \
> > +        ${systemd_unitdir}/system/dbus-org.freedesktop.locale1.service \
> > +        ${systemd_unitdir}/system/org.freedesktop.locale1.busname \
> > +        ${systemd_unitdir}/system/systemd-localed.service \
> > +        ${rootlibexecdir}/systemd/systemd-localed \
> > +        ${datadir}/dbus-1/system-services/org.freedesktop.locale1.service \
> > +        ${datadir}/polkit-1/actions/org.freedesktop.locale1.policy \
> > +        ${datadir}/systemd/kbd-model-map \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-logind"
> > +SUMMARY_${PN}-services-logind = "systemd's login management service"
> > +RDEPENDS_${PN}-services-logind = "${PN}-services-dbus ${PN}-services-tmpfiles"
> > +RRECOMMENDS_${PN}-services-logind = "udev"
> > +CONFFILES_${PN}-services-logind = "\
> > +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf \
> > +        ${sysconfdir}/systemd/logind.conf \
> > +"
> > +FILES_${PN}-services-logind = "\
> > +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf \
> > +        ${sysconfdir}/systemd/logind.conf \
> > +        ${base_bindir}/loginctl \
> > +        ${base_bindir}/systemd-inhibit \
> > +        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.login1.busname \
> > +        ${systemd_unitdir}/system/dbus-org.freedesktop.login1.service \
> > +        ${systemd_unitdir}/system/multi-user.target.wants/systemd-logind.service \
> > +        ${systemd_unitdir}/system/multi-user.target.wants/systemd-user-sessions.service \
> > +        ${systemd_unitdir}/system/org.freedesktop.login1.busname \
> > +        ${systemd_unitdir}/system/systemd-logind.service \
> > +        ${systemd_unitdir}/system/systemd-user-sessions.service \
> > +        ${systemd_unitdir}/system/user@.service \
> > +        ${rootlibexecdir}/systemd/systemd-logind \
> > +        ${rootlibexecdir}/systemd/systemd-user-sessions \
> > +        ${datadir}/dbus-1/system-services/org.freedesktop.login1.service \
> > +        ${datadir}/polkit-1/actions/org.freedesktop.login1.policy \
> > +        ${rootlibexecdir}/udev/rules.d/70-uaccess.rules \
> > +        ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
> > +        ${rootlibexecdir}/udev/rules.d/71-seat.rules \
> > +        ${rootlibexecdir}/udev/rules.d/73-seat-late.rules \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-machined"
> > +SUMMARY_${PN}-services-machined = "systemd's virtual machine and container management service"
> > +RDEPENDS_${PN}-services-machined = "${PN}-services-dbus"
> > +CONFFILES_${PN}-services-machined = "${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf"
> > +FILES_${PN}-services-machined = "\
> > +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
> > +        ${base_bindir}/machinectl \
> > +        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.machine1.busname \
> > +        ${systemd_unitdir}/system/dbus-org.freedesktop.machine1.service \
> > +        ${systemd_unitdir}/system/machine.slice \
> > +        ${systemd_unitdir}/system/org.freedesktop.machine1.busname \
> > +        ${systemd_unitdir}/system/systemd-machined.service \
> > +        ${rootlibexecdir}/systemd/systemd-machined \
> > +        ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-modules-load"
> > +SUMMARY_${PN}-services-modules-load = "systemd's kernel module loading service"
> > +FILES_${PN}-services-modules-load = "\
> > +        ${sysconfdir}/modules-load.d/ \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-modules-load.service \
> > +        ${systemd_unitdir}/system/systemd-modules-load.service \
> > +        ${rootlibexecdir}/systemd/systemd-modules-load \
> > +        ${exec_prefix}/lib/modules-load.d \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-modules-static-nodes"
> > +SUMMARY_${PN}-services-modules-static-nodes = "systemd's kernel module static nodes creation service"
> > +RDEPENDS_${PN}-services-modules-static-nodes = "kmod ${PN}-services-tmpfiles"
> > +FILES_${PN}-services-modules-static-nodes = "\
> > +        ${systemd_unitdir}/system/sysinit.target.wants/kmod-static-nodes.service \
> > +        ${systemd_unitdir}/system/kmod-static-nodes.service \
> > +"
> >  
> > -FILES_${PN}-dbg += "${libdir}/systemd/ptest/.debug"
> > +
> > +PACKAGES =+ "${PN}-services-multi-seat-x"
> > +SUMMARY_${PN}-services-multi-seat-x = "systemd's X11 multi-seat support service"
> > +RDEPENDS_${PN}-services-multi-seat-x = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/xserver', '', d)}"
> > +FILES_${PN}-services-multi-seat-x = "\
> > +        ${rootlibexecdir}/systemd/systemd-multi-seat-x \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-networkd"
> > +SUMMARY_${PN}-services-networkd = "systemd's network management (static, DHCP, bridge...) service"
> > +# NOTE: if no sysusers, then users/groups must be setup
> > +RRECOMMENDS_${PN}-services-networkd = "${PN}-services-sysusers"
> > +FILES_${PN}-services-networkd = "\
> > +        ${sysconfdir}/systemd/network/ \
> > +        ${sysconfdir}/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service \
> > +        ${sysconfdir}/systemd/system/multi-user.target.wants/systemd-networkd.service \
> > +        ${base_bindir}/networkctl \
> > +        ${rootlibexecdir}/systemd/network/80-container-host0.network \
> > +        ${rootlibexecdir}/systemd/network/80-container-ve.network \
> > +        ${rootlibexecdir}/systemd/network/99-default.link \
> > +        ${systemd_unitdir}/system/systemd-networkd-wait-online.service \
> > +        ${systemd_unitdir}/system/systemd-networkd.service \
> > +        ${rootlibexecdir}/systemd/systemd-networkd \
> > +        ${rootlibexecdir}/systemd/systemd-networkd-wait-online \
> > +        ${exec_prefix}/lib/systemd/network \
> > +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.network1.conf \
> > +        ${datadir}/dbus-1/system-services/org.freedesktop.network1.service \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-nspawn"
> > +SUMMARY_${PN}-services-nspawn = "systemd's namespace spawing service and tool"
> > +FILES_${PN}-services-nspawn = "\
> > +        ${systemd_unitdir}/system/systemd-nspawn@.service \
> > +        ${bindir}/systemd-nspawn \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-quota"
> > +SUMMARY_${PN}-services-quota = "systemd's file system quota enable and check service"
> > +RDEPENDS_${PN}-services-quota = "quota"
> > +FILES_${PN}-services-quota = "\
> > +        ${systemd_unitdir}/system/quotaon.service \
> > +        ${systemd_unitdir}/system/systemd-quotacheck.service \
> > +        ${rootlibexecdir}/systemd/systemd-quotacheck \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-randomseed"
> > +SUMMARY_${PN}-services-randomseed = "systemd's random seed save/restore service"
> > +FILES_${PN}-services-randomseed = "\
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-random-seed.service \
> > +        ${systemd_unitdir}/system/systemd-random-seed.service \
> > +        ${rootlibexecdir}/systemd/systemd-random-seed \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-readahead"
> > +SUMMARY_${PN}-services-readahead = "systemd's disk read ahead service"
> > +FILES_${PN}-services-readahead = "\
> > +        ${systemd_unitdir}/system/systemd-readahead-collect.service \
> > +        ${systemd_unitdir}/system/systemd-readahead-done.service \
> > +        ${systemd_unitdir}/system/systemd-readahead-done.timer \
> > +        ${systemd_unitdir}/system/systemd-readahead-drop.service \
> > +        ${systemd_unitdir}/system/systemd-readahead-replay.service \
> > +        ${rootlibexecdir}/systemd/systemd-readahead \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-rfkill"
> > +SUMMARY_${PN}-services-rfkill = "systemd's rfkill state save/restore service"
> > +FILES_${PN}-services-rfkill = "\
> > +        ${systemd_unitdir}/system/systemd-rfkill@.service \
> > +        ${rootlibexecdir}/systemd/systemd-rfkill \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-sleep"
> > +SUMMARY_${PN}-services-sleep = "systemd's sleep, suspend and hiberate services"
> > +FILES_${PN}-services-sleep = "\
> > +        ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
> > +        ${systemd_unitdir}/system/systemd-suspend.service \
> > +        ${systemd_unitdir}/system/systemd-hibernate.service \
> > +        ${systemd_unitdir}/system-sleep/ \
> > +        ${rootlibexecdir}/systemd/systemd-sleep \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-sysctl"
> > +SUMMARY_${PN}-services-sysctl = "systemd's kernel parameters configuration service"
> > +FILES_${PN}-services-sysctl = "\
> > +        ${sysconfdir}/sysctl.d/ \
> > +        ${exec_prefix}/lib/sysctl.d/ \
> > +        ${exec_prefix}/lib/sysctl.d/50-default.conf \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-sysctl.service \
> > +        ${systemd_unitdir}/system/systemd-sysctl.service \
> > +        ${rootlibexecdir}/systemd/systemd-sysctl \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-sysusers"
> > +SUMMARY_${PN}-services-sysusers = "systemd's service and tool to allocate system users and groups"
> > +FILES_${PN}-services-sysusers = "\
> > +        ${base_bindir}/systemd-sysusers \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-sysusers.service \
> > +        ${systemd_unitdir}/system/systemd-sysusers.service \
> > +        ${exec_prefix}/lib/sysusers.d/basic.conf \
> > +        ${exec_prefix}/lib/sysusers.d/systemd.conf \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-sysvcompat"
> > +SUMMARY_${PN}-services-sysvcompat = "systemd's SYSV legacy and compatibility service"
> > +# NOTE: if no sysusers or tmpfiles, then users/groups and FS structure must be setup
> > +RRECOMMENDS_${PN}-services-sysvcompat = "${PN}-services-sysusers ${PN}-services-tmpfiles"
> > +FILES_${PN}-services-sysvcompat = "\
> > +        ${rootlibexecdir}/systemd/systemd-bus-proxyd \
> > +        ${rootlibexecdir}/systemd/systemd-socket-proxyd \
> > +        ${bindir}/systemd-stdio-bridge \
> > +        ${rootlibexecdir}/systemd/system-generators/systemd-rc-local-generator \
> > +        ${rootlibexecdir}/systemd/system-generators/systemd-sysv-generator \
> > +        ${rootlibexecdir}/systemd/systemd-initctl \
> > +        ${rootlibexecdir}/systemd/systemd-update-utmp \
> > +        ${systemd_unitdir}/system/halt-local.service \
> > +        ${systemd_unitdir}/system/rc-local.service \
> > +        ${systemd_unitdir}/system/runlevel1.target.wants/systemd-update-utmp-runlevel.service \
> > +        ${systemd_unitdir}/system/runlevel2.target.wants/systemd-update-utmp-runlevel.service \
> > +        ${systemd_unitdir}/system/runlevel3.target.wants/systemd-update-utmp-runlevel.service \
> > +        ${systemd_unitdir}/system/runlevel4.target.wants/systemd-update-utmp-runlevel.service \
> > +        ${systemd_unitdir}/system/runlevel5.target.wants/systemd-update-utmp-runlevel.service \
> > +        ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-update-utmp.service \
> > +        ${systemd_unitdir}/system/systemd-initctl.service \
> > +        ${systemd_unitdir}/system/systemd-initctl.socket \
> > +        ${systemd_unitdir}/system/systemd-update-utmp-runlevel.service \
> > +        ${systemd_unitdir}/system/systemd-update-utmp.service \
> > +        ${exec_prefix}/lib/tmpfiles.d/legacy.conf \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-timedated"
> > +SUMMARY_${PN}-services-timedated = "systemd's time and date management service"
> > +RDEPENDS_${PN}-services-timedated = "${PN}-services-dbus"
> > +CONFFILES_${PN}-services-timedated = "${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf"
> > +FILES_${PN}-services-timedated = "\
> > +        ${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
> > +        ${bindir}/timedatectl \
> > +        ${systemd_unitdir}/system/busnames.target.wants/org.freedesktop.timedate1.busname \
> > +        ${systemd_unitdir}/system/dbus-org.freedesktop.timedate1.service \
> > +        ${systemd_unitdir}/system/org.freedesktop.timedate1.busname \
> > +        ${systemd_unitdir}/system/systemd-timedated.service \
> > +        ${rootlibexecdir}/systemd/systemd-timedated \
> > +        ${datadir}/dbus-1/system-services/org.freedesktop.timedate1.service \
> > +        ${datadir}/polkit-1/actions/org.freedesktop.timedate1.policy \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-timesyncd"
> > +SUMMARY_${PN}-services-timesyncd = "systemd's NTP sync service"
> > +# NOTE: if no sysusers, then users/groups must be setup
> > +RRECOMMENDS_${PN}-services-timesyncd = "${PN}-services-sysusers"
> > +CONFFILES_${PN}-services-timesyncd = "${sysconfdir}/systemd/timesyncd.conf"
> > +FILES_${PN}-services-timesyncd = "\
> > +        ${sysconfdir}/systemd/system/sysinit.target.wants/systemd-timesyncd.service \
> > +        ${sysconfdir}/systemd/timesyncd.conf \
> > +        ${systemd_unitdir}/system/systemd-timesyncd.service \
> > +        ${rootlibexecdir}/systemd/systemd-timesyncd \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-tmpfiles"
> > +SUMMARY_${PN}-services-tmpfiles = "systemd's service to create, delete and clean up volatile/tmp files/dirs"
> > +FILES_${PN}-services-tmpfiles = "\
> > +        ${sysconfdir}/tmpfiles.d/ \
> > +        ${base_bindir}/systemd-tmpfiles \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-tmpfiles-setup.service \
> > +        ${systemd_unitdir}/system/systemd-tmpfiles-clean.service \
> > +        ${systemd_unitdir}/system/systemd-tmpfiles-clean.timer \
> > +        ${systemd_unitdir}/system/systemd-tmpfiles-setup-dev.service \
> > +        ${systemd_unitdir}/system/systemd-tmpfiles-setup.service \
> > +        ${systemd_unitdir}/system/timers.target.wants/systemd-tmpfiles-clean.timer \
> > +        ${exec_prefix}/lib/tmpfiles.d/etc.conf \
> > +        ${exec_prefix}/lib/tmpfiles.d/systemd-nologin.conf \
> > +        ${exec_prefix}/lib/tmpfiles.d/systemd.conf \
> > +        ${exec_prefix}/lib/tmpfiles.d/tmp.conf \
> > +        ${exec_prefix}/lib/tmpfiles.d/var.conf \
> > +        ${exec_prefix}/lib/tmpfiles.d/00-create-volatile.conf \
> > +        ${exec_prefix}/lib/tmpfiles.d/x11.conf \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-udev"
> > +SUMMARY_${PN}-services-udev = "systemd's udev services"
> > +RDEPENDS_${PN}-services-udev = "udev"
> > +FILES_${PN}-services-udev = "\
> > +        ${systemd_unitdir}/system/initrd-udevadm-cleanup-db.service \
> > +        ${systemd_unitdir}/system/systemd-udev-hwdb-update.service \
> > +        ${systemd_unitdir}/system/systemd-udev-settle.service \
> > +        ${systemd_unitdir}/system/systemd-udev-trigger.service \
> > +        ${systemd_unitdir}/system/systemd-udevd-control.socket \
> > +        ${systemd_unitdir}/system/systemd-udevd-kernel.socket \
> > +        ${systemd_unitdir}/system/systemd-udevd.service \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udevd.service \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udev-trigger.service \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-udev-hwdb-update.service \
> > +        ${systemd_unitdir}/system/sockets.target.wants/systemd-udevd-kernel.socket \
> > +        ${systemd_unitdir}/system/sockets.target.wants/systemd-udevd-control.socket \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-update"
> > +SUMMARY_${PN}-services-update = "systemd's post update service"
> > +FILES_${PN}-services-update = "\
> > +        ${rootlibexecdir}/systemd/system-generators/systemd-system-update-generator \
> > +        ${rootlibexecdir}/systemd/systemd-update-done \
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-update-done.service \
> > +        ${systemd_unitdir}/system/systemd-update-done.service \
> > +"
> > +
> > +PACKAGES =+ "${PN}-services-vconsole"
> > +SUMMARY_${PN}-services-vconsole = "systemd's service to configure the virtual console (keyboard/font)"
> > +RECOMMENDS_${PN}-services-vconsole = "kbd kbd-consolefonts kbd-keymaps"
> > +FILES_${PN}-services-vconsole = "\
> > +        ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service \
> > +        ${systemd_unitdir}/system/systemd-vconsole-setup.service \
> > +        ${rootlibexecdir}/systemd/systemd-vconsole-setup \
> > +"
> > +
> > +########################################################################
> > +# Standard BitBake Packages
> > +########################################################################
> > +
> > +FILES_${PN}-dbg += "\
> > +        ${base_libdir}/security/.debug/ \
> > +        ${libdir}/systemd/ptest/.debug \
> > +        ${rootlibdir}/.debug \
> > +        ${systemd_unitdir}/*/.debug \
> > +        ${systemd_unitdir}/.debug \
> > +"
> >  
> >  FILES_${PN}-gui = "${bindir}/systemadm"
> >  
> > -FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
> > -                              ${systemd_unitdir}/system/systemd-vconsole-setup.service \
> > -                              ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
> > +FILES_${PN}-dev += "\
> > +        ${base_libdir}/security/*.la \
> > +        ${datadir}/dbus-1/interfaces/ \
> > +        ${sysconfdir}/rpm/macros.systemd \
> > +"
> > +
> > +USERADD_PACKAGES = "${PN}"
> > +USERADD_PARAM_${PN} += "--system systemd-journal-gateway; --system systemd-timesync"
> > +GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
> > +
> > +# The test cases need perl and bash to run correctly.
> > +RDEPENDS_${PN}-ptest += "perl python bash"
> > +FILES_${PN}-ptest += "\
> > +        ${libdir}/udev/rules.d \
> > +"
> > +
> > +########################################################################
> > +# Misc Packages
> > +########################################################################
> > +
> > +PACKAGES =+ "${PN}-bash"
> > +SUMMARY_${PN}-bash = "systemd bash shell commands completion"
> > +FILES_${PN}-bash = "\
> > +        ${datadir}/bash-completion/completions/bootctl \
> > +        ${datadir}/bash-completion/completions/busctl \
> > +        ${datadir}/bash-completion/completions/coredumpctl \
> > +        ${datadir}/bash-completion/completions/hostnamectl \
> > +        ${datadir}/bash-completion/completions/journalctl \
> > +        ${datadir}/bash-completion/completions/kernel-install \
> > +        ${datadir}/bash-completion/completions/localectl \
> > +        ${datadir}/bash-completion/completions/loginctl \
> > +        ${datadir}/bash-completion/completions/machinectl \
> > +        ${datadir}/bash-completion/completions/systemctl \
> > +        ${datadir}/bash-completion/completions/systemd-* \
> > +        ${datadir}/bash-completion/completions/timedatectl \
> > +"
> >  
> > +PACKAGES =+ "${PN}-initramfs"
> > +SUMMARY_${PN}-initramfs = "systemd's initramfs support"
> > +FILES_${PN}-initramfs = "/init"
> > +RDEPENDS_${PN}-initramfs = "${PN}"
> > +
> > +PACKAGES =+ "${PN}-kernel-install"
> > +SUMMARY_${PN}-kernel-install = "systemd tool to add/remove kernel and initramfs images to/from /boot"
> >  RDEPENDS_${PN}-kernel-install += "bash"
> > -FILES_${PN}-kernel-install = "${bindir}/kernel-install \
> > -                              ${sysconfdir}/kernel/ \
> > -                              ${exec_prefix}/lib/kernel \
> > -                             "
> > -FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
> > -                         "
> > -
> > -FILES_${PN}-zsh = "${datadir}/zsh/site-functions"
> > -
> > -FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
> > -                      ${exec_prefix}/lib/binfmt.d \
> > -                      ${rootlibexecdir}/systemd/systemd-binfmt \
> > -                      ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
> > -                      ${systemd_unitdir}/system/systemd-binfmt.service"
> > -RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
> > -
> > -RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
> > -
> > -CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
> > -                ${sysconfdir}/systemd/logind.conf \
> > -                ${sysconfdir}/systemd/system.conf \
> > -                ${sysconfdir}/systemd/user.conf"
> > -
> > -FILES_${PN} = " ${base_bindir}/* \
> > -                ${datadir}/bash-completion \
> > -                ${datadir}/dbus-1/services \
> > -                ${datadir}/dbus-1/system-services \
> > -                ${datadir}/polkit-1 \
> > -                ${datadir}/${BPN} \
> > -                ${datadir}/factory \
> > -                ${sysconfdir}/bash_completion.d/ \
> > -                ${sysconfdir}/dbus-1/ \
> > -                ${sysconfdir}/machine-id \
> > -                ${sysconfdir}/modules-load.d/ \
> > -                ${sysconfdir}/pam.d/ \
> > -                ${sysconfdir}/sysctl.d/ \
> > -                ${sysconfdir}/systemd/ \
> > -                ${sysconfdir}/tmpfiles.d/ \
> > -                ${sysconfdir}/xdg/ \
> > -                ${sysconfdir}/init.d/README \
> > -                ${rootlibexecdir}/systemd/* \
> > -                ${systemd_unitdir}/* \
> > -                ${base_libdir}/security/*.so \
> > -                ${libdir}/libnss_* \
> > -                /cgroup \
> > -                ${bindir}/systemd* \
> > -                ${bindir}/busctl \
> > -                ${bindir}/localectl \
> > -                ${bindir}/hostnamectl \
> > -                ${bindir}/timedatectl \
> > -                ${bindir}/bootctl \
> > -                ${bindir}/kernel-install \
> > -                ${exec_prefix}/lib/tmpfiles.d/*.conf \
> > -                ${exec_prefix}/lib/systemd \
> > -                ${exec_prefix}/lib/modules-load.d \
> > -                ${exec_prefix}/lib/sysctl.d \
> > -                ${exec_prefix}/lib/sysusers.d \
> > -                ${localstatedir} \
> > -                /lib/udev/rules.d/70-uaccess.rules \
> > -                /lib/udev/rules.d/71-seat.rules \
> > -                /lib/udev/rules.d/73-seat-late.rules \
> > -                /lib/udev/rules.d/99-systemd.rules \
> > -               "
> > +FILES_${PN}-kernel-install = "\
> > +        ${bindir}/kernel-install \
> > +        ${sysconfdir}/kernel/ \
> > +        ${exec_prefix}/lib/kernel \
> > +"
> >  
> > -FILES_${PN}-dbg += "${rootlibdir}/.debug ${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"
> > +PACKAGES =+ "${PN}-pam"
> > +SUMMARY_${PN}-pam = "systemd PAM modules and configuration"
> > +FILES_${PN}-pam = "\
> > +        ${sysconfdir}/pam.d \
> > +        ${base_libdir}/security/pam_systemd.so \
> > +"
> >  
> > -RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
> > -RDEPENDS_${PN} += "volatile-binds"
> > +PACKAGES =+ "${PN}-preset"
> > +SUMMARY_${PN}-preset = "systemd's service enablement presets"
> > +FILES_${PN}-preset = "${systemd_unitdir}/system-preset/90-systemd.preset"
> >  
> > -RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units udev-hwdb\
> > -                      util-linux-agetty \
> > -                      util-linux-fsck e2fsprogs-e2fsck \
> > -                      kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 os-release \
> > +PACKAGES =+ "${PN}-rpm-macros"
> > +SUMMARY_${PN}-rpm-macros = "systemd RPM macros"
> > +FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
> > +			 "
> > +
> > +PACKAGES =+ "${PN}-zsh"
> > +SUMMARY_${PN}-zsh = "systemd zsh shell commands completion"
> > +FILES_${PN}-zsh = "\
> > +        ${datadir}/zsh/site-functions \
> >  "
> >  
> > -PACKAGES =+ "udev-dbg udev udev-hwdb"
> >  
> > -FILES_udev-dbg += "/lib/udev/.debug"
> > +########################################################################
> > +# Aggregation of Split Packages
> > +########################################################################
> > +
> > +PACKAGES =+ "${PN}-services-essential"
> > +SUMMARY_${PN}-services-essential = "systemd's essential services aggregation"
> > +ALLOW_EMPTY_${PN}-services-essential = "1"
> > +RDEPENDS_${PN}-services-essential = "\
> > +        ${PN}-generators-filesystems \
> > +        ${PN}-preset \
> > +        ${PN}-services-fsck \
> > +        ${PN}-services-journal \
> > +        ${PN}-services-modules-load \
> > +        ${PN}-services-randomseed \
> > +        ${PN}-services-sleep \
> > +        ${PN}-services-sysctl \
> > +        ${PN}-services-sysusers \
> > +        ${PN}-services-tmpfiles \
> > +        ${PN}-services-udev \
> > +        udev-rules-systemd \
> > +"
> >  
> > -RPROVIDES_udev = "hotplug"
> > +PACKAGES =+ "${PN}-services-base"
> > +SUMMARY_${PN}-services-base = "systemd's base services aggregation"
> > +ALLOW_EMPTY_${PN}-services-base = "1"
> > +RDEPENDS_${PN}-services-base = "${PN}-services-essential \
> > +        ${PN}-services-ask-password \
> > +        ${PN}-services-backlight \
> > +        ${PN}-services-binfmt \
> > +        ${PN}-services-coredump \
> > +        ${PN}-services-dbus \
> > +        ${PN}-services-firstboot \
> > +        ${PN}-services-fuse \
> > +        ${PN}-services-hostnamed \
> > +        ${PN}-services-ldconfig \
> > +        ${PN}-services-localed \
> > +        ${PN}-services-logind \
> > +        ${PN}-services-networkd \
> > +        ${PN}-services-quota \
> > +        ${PN}-services-rfkill \
> > +        ${PN}-services-timedated \
> > +        ${PN}-services-timesyncd \
> > +        ${PN}-services-update \
> > +        ${PN}-services-vconsole \
> > +        ${PN}-services-modules-static-nodes \
> > +        ${PN}-bash \
> > +        ${PN}-initramfs \
> > +        ${PN}-kernel-install \
> > +        ${PN}-rpm-macros \
> > +        ${PN}-zsh \
> > +"
> >  
> > -RDEPENDS_udev-hwdb += "udev"
> > +PACKAGES =+ "${PN}-services-all"
> > +SUMMARY_${PN}-services-all = "systemd's all services and tools aggregation"
> > +ALLOW_EMPTY_${PN}-services-all = "1"
> > +RDEPENDS_${PN}-services-all = "${PN}-services-base \
> > +        ${PN}-services-bootchart \
> > +        ${PN}-services-cryptsetup \
> > +        ${PN}-services-debug \
> > +        ${PN}-services-machined \
> > +        ${PN}-services-nspawn \
> > +        ${PN}-services-sysvcompat \
> > +        ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${PN}-services-multi-seat-x', '', d)} \
> > +"
> >  
> > -FILES_udev += "${base_sbindir}/udevd \
> > -               ${rootlibexecdir}/systemd/systemd-udevd \
> > -               ${rootlibexecdir}/udev/accelerometer \
> > -               ${rootlibexecdir}/udev/ata_id \
> > -               ${rootlibexecdir}/udev/cdrom_id \
> > -               ${rootlibexecdir}/udev/collect \
> > -               ${rootlibexecdir}/udev/findkeyboards \
> > -               ${rootlibexecdir}/udev/keyboard-force-release.sh \
> > -               ${rootlibexecdir}/udev/keymap \
> > -               ${rootlibexecdir}/udev/mtd_probe \
> > -               ${rootlibexecdir}/udev/scsi_id \
> > -               ${rootlibexecdir}/udev/v4l_id \
> > -               ${rootlibexecdir}/udev/keymaps \
> > -               ${rootlibexecdir}/udev/rules.d/*.rules \
> > -               ${sysconfdir}/udev \
> > -               ${sysconfdir}/init.d/systemd-udevd \
> > -               ${systemd_unitdir}/system/*udev* \
> > -               ${systemd_unitdir}/system/*.wants/*udev* \
> > -               ${base_bindir}/udevadm \
> > -               ${datadir}/bash-completion/completions/udevadm \
> > -              "
> > -
> > -FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
> >  
> > -INITSCRIPT_PACKAGES = "udev"
> > -INITSCRIPT_NAME_udev = "systemd-udevd"
> > -INITSCRIPT_PARAMS_udev = "start 03 S ."
> > +########################################################################
> > +# Core Package
> > +########################################################################
> >  
> > -python __anonymous() {
> > -    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
> > -        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
> > -}
> > +CONFFILES_${PN} = "\
> > +        ${sysconfdir}/systemd/system.conf \
> > +        ${sysconfdir}/systemd/user.conf \
> > +"
> >  
> > +FILES_${PN} = "\
> > +        ${base_bindir}/systemctl \
> > +        ${base_bindir}/systemd-hwdb \
> > +        ${bindir}/bootctl \
> > +        ${datadir}/${BPN} \
> > +        ${datadir}/factory \
> > +        ${exec_prefix}/lib/libnss_myhostname* \
> > +        ${exec_prefix}/lib/libnss_mymachines.so.2 \
> > +        ${libdir}/systemd/user-generators/ \
> > +        ${libdir}/systemd/user/ \
> > +        ${localstatedir} \
> > +        ${rootlibexecdir}/systemd/systemd \
> > +        ${rootlibexecdir}/systemd/systemd-cgroups-agent \
> > +        ${rootlibexecdir}/systemd/systemd-shutdown \
> > +        ${rootlibexecdir}/systemd/systemd-shutdownd \
> > +        ${rootlibexecdir}/systemd/systemd-machine-id-commit \
> > +        ${rootlibexecdir}/systemd/systemd-hibernate-resume \
> > +        ${rootlibexecdir}/systemd/systemd-importd \
> > +        ${rootlibexecdir}/systemd/import-pubring.gpg \
> > +        ${rootlibexecdir}/systemd/systemd-pull \
> > +        ${sysconfdir}/init.d/README \
> > +        ${sysconfdir}/machine-id \
> > +        ${sysconfdir}/systemd/system.conf \
> > +        ${sysconfdir}/systemd/system/ \
> > +        ${sysconfdir}/systemd/user.conf \
> > +        ${sysconfdir}/systemd/user/ \
> > +        ${sysconfdir}/xdg/systemd/ \
> > +        ${systemd_unitdir}/system-generators/ \
> > +        ${systemd_unitdir}/system-preset/ \
> > +        ${systemd_unitdir}/system-shutdown/ \
> > +        ${systemd_unitdir}/system/ \
> > +"
> >  # TODO:
> >  # u-a for runlevel and telinit
> > +RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
> > +RDEPENDS_${PN} += "volatile-binds"
> > +
> > +RRECOMMENDS_${PN} += "\
> > +        ${PN}-services-base \
> > +        ${PN}-services-essential \
> > +        ${PN}-services-all \
> > +        ${PN}-tools \
> > +        ${PN}-generators-getty \
> > +        ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PN}-pam', '', d)} \
> > +        ${PN}-services-getty \
> > +        kernel-module-autofs4 \
> > +        kernel-module-ipv6 \
> > +        kernel-module-unix \
> > +        util-linux-agetty \
> > +        util-linux-fsck \
> > +        e2fsprogs-e2fsck \
> > +        os-release \
> > +        udev-hwdb \
> > +        systemd-serialgetty \
> > +        systemd-compat-units \
> > +"
> >  
> >  ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
> >  
> > @@ -389,6 +1019,41 @@ ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
> >  ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
> >  ALTERNATIVE_PRIORITY[runlevel] ?= "300"
> >  
> > +
> > +########################################################################
> > +# UDEV Section
> > +########################################################################
> > +
> > +PACKAGES =+ "udev-dbg"
> > +SUMMARY_udev-dbg = "Dynamic device management - Debugging files"
> > +RRECOMMENDS_udev-dbg += "${PN}-dbg"
> > +FILES_udev-dbg = "\
> > +        ${rootlibexecdir}/udev/.debug \
> > +        ${base_sbindir}/.debug/udevd \
> > +        ${base_bindir}/.debug/udevadm \
> > +        ${rootlibexecdir}/systemd/.debug/systemd-udevd \
> > +        ${base_libdir}/.debug/libudev* \
> > +        ${base_libdir}/.debug/libgudev* \
> > +        ${exec_prefix}/lib/.debug/libgudev* \
> > +"
> > +
> > +PACKAGES =+ "udev-dev"
> > +SUMMARY_udev-dev = "Dynamic device management - Development files"
> > +RRECOMMENDS_udev-dev += "${PN}-dev"
> > +FILES_udev-dev = "\
> > +        ${datadir}/pkgconfig/*udev* \
> > +        ${libdir}/pkgconfig/*udev* \
> > +        ${libdir}/lib*udev*.la \
> > +        ${includedir}/*udev* \
> > +"
> > +
> > +PACKAGES =+ "udev-hwdb"
> > +SUMMARY_udev-hwdb = "Dynamic device management - Hardware database"
> > +RDEPENDS_udev-hwdb += "udev"
> > +FILES_udev-hwdb = "\
> > +        ${rootlibexecdir}/udev/hwdb.d/ \
> > +"
> > +
> >  pkg_postinst_udev-hwdb () {
> >  	if test -n "$D"; then
> >  		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
> > @@ -406,6 +1071,154 @@ pkg_prerm_udev-hwdb () {
> >  	rm -f ${sysconfdir}/udev/hwdb.bin
> >  }
> >  
> > +PACKAGES =+ "udev-bash"
> > +SUMMARY_udev-bash = "Dynamic device management - Bash shell commands completion"
> > +FILES_udev-bash = "${datadir}/bash-completion/completions/udevadm"
> > +
> > +PACKAGES =+ "udev-zsh"
> > +SUMMARY_udev-zsh = "Dynamic device management - zsh shell commands completion"
> > +FILES_udev-zsh = "${datadir}/zsh/site-functions/_udevadm"
> > +
> > +
> > +########################################################################
> > +# UDEV Rules Packages
> > +# split rules that require external programs or dependencies.
> > +# those that use only builtins are not split
> > +########################################################################
> > +
> > +PACKAGES =+ "udev-rules-accelerometer"
> > +SUMMARY_udev-rules-accelerometer = "Dynamic device management - accelerometer rules"
> > +FILES_udev-rules-accelerometer = "\
> > +        ${rootlibexecdir}/udev/accelerometer \
> > +        ${rootlibexecdir}/udev/rules.d/61-accelerometer.rules \
> > +        ${rootlibexecdir}/udev/rules.d/70-touchpad.rules \
> > +"
> > +
> > +PACKAGES =+ "udev-rules-cdrom"
> > +SUMMARY_udev-rules-cdrom = "Dynamic device management - cdrom rules"
> > +FILES_udev-rules-cdrom = "\
> > +        ${rootlibexecdir}/udev/cdrom_id \
> > +        ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \
> > +"
> > +
> > +PACKAGES =+ "udev-rules-mtd"
> > +SUMMARY_udev-rules-mtd = "Dynamic device management - mtd rules"
> > +FILES_udev-rules-mtd = "\
> > +        ${rootlibexecdir}/udev/mtd_probe \
> > +        ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \
> > +"
> > +
> > +PACKAGES =+ "udev-rules-persistent-storage"
> > +SUMMARY_udev-rules-persistent-storage = "Dynamic device management - persistent storage rules"
> > +FILES_udev-rules-persistent-storage = "\
> > +        ${rootlibexecdir}/udev/ata_id \
> > +        ${rootlibexecdir}/udev/scsi_id \
> > +        ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \
> > +        ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \
> > +"
> > +
> > +PACKAGES =+ "udev-rules-systemd"
> > +SUMMARY_udev-rules-systemd = "Dynamic device management - systemd rules"
> > +RDEPENDS_udev-rules-systemd = "${PN} ${PN}-services-sysctl"
> > +FILES_udev-rules-systemd = "\
> > +        ${rootlibexecdir}/udev/rules.d/99-systemd.rules \
> > +"
> > +
> > +PACKAGES =+ "udev-rules-v4l"
> > +SUMMARY_udev-rules-v4l = "Dynamic device management - v4l rules"
> > +FILES_udev-rules-v4l = "\
> > +        ${rootlibexecdir}/udev/v4l_id \
> > +        ${rootlibexecdir}/udev/rules.d/*-persistent-v4l.rules \
> > +"
> > +
> > +PACKAGES =+ "udev-rules-all"
> > +SUMMARY_udev-rules-all = "Dynamic device management - all rules aggregation"
> > +ALLOW_EMPTY_udev-rules-all = "1"
> > +RDEPENDS_udev-rules-all = "\
> > +        udev-rules-accelerometer \
> > +        udev-rules-cdrom \
> > +        udev-rules-mtd \
> > +        udev-rules-persistent-storage \
> > +        udev-rules-systemd \
> > +        udev-rules-v4l \
> > +"
> > +
> > +PACKAGES =+ "udev"
> > +SUMMARY_udev = "Dynamic device management"
> > +RPROVIDES_udev = "hotplug"
> > +PROVIDES = "udev"
> > +CONFFILES_udev = "${sysconfdir}/udev/udev.conf"
> > +RDEPENDS_udev += "${PN}-services-vconsole"
> > +FILES_udev = "\
> > +        ${base_bindir}/udevadm \
> > +        ${base_sbindir}/udevd \
> > +        ${rootlibexecdir}/systemd/systemd-udevd \
> > +        ${rootlibexecdir}/udev/collect \
> > +        ${rootlibexecdir}/udev/rules.d/42-usb-hid-pm.rules \
> > +        ${rootlibexecdir}/udev/rules.d/50-firmware.rules \
> > +        ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \
> > +        ${rootlibexecdir}/udev/rules.d/60-drm.rules \
> > +        ${rootlibexecdir}/udev/rules.d/60-keyboard.rules \
> > +        ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \
> > +        ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \
> > +        ${rootlibexecdir}/udev/rules.d/60-persistent-serial.rules \
> > +        ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \
> > +        ${rootlibexecdir}/udev/rules.d/75-net-description.rules \
> > +        ${rootlibexecdir}/udev/rules.d/75-tty-description.rules \
> > +        ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \
> > +        ${rootlibexecdir}/udev/rules.d/80-drivers.rules \
> > +        ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \
> > +        ${rootlibexecdir}/udev/rules.d/95-udev-late.rules \
> > +        ${rootlibexecdir}/udev/rules.d/70-mouse.rules \
> > +        ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
> > +        ${rootlibexecdir}/udev/rules.d/touchscreen.rules \
> > +        ${sysconfdir}/init.d/systemd-udevd \
> > +        ${sysconfdir}/udev \
> > +"
> > +
> > +RRECOMMENDS_udev = "\
> > +        udev-hwdb \
> > +        udev-rules-all \
> > +"
> > +
> > +INITSCRIPT_PACKAGES = "udev"
> > +INITSCRIPT_NAME_udev = "systemd-udevd"
> > +INITSCRIPT_PARAMS_udev = "start 03 S ."
> > +
> > +python __anonymous() {
> > +    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
> > +        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
> > +}
> > +
> > +# TODO:
> > +# u-a for runlevel and telinit
> > +
> > +ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
> > +
> > +ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
> > +ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
> > +ALTERNATIVE_PRIORITY[init] ?= "300"
> > +
> > +ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
> > +ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
> > +ALTERNATIVE_PRIORITY[halt] ?= "300"
> > +
> > +ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
> > +ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
> > +ALTERNATIVE_PRIORITY[reboot] ?= "300"
> > +
> > +ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
> > +ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
> > +ALTERNATIVE_PRIORITY[shutdown] ?= "300"
> > +
> > +ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
> > +ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
> > +ALTERNATIVE_PRIORITY[poweroff] ?= "300"
> > +
> > +ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
> > +ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
> > +ALTERNATIVE_PRIORITY[runlevel] ?= "300"
> > +
> >  # As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
> >  # that we don't build both udev and systemd in world builds.
> >  python () {
> > 
> 




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

* Re: [PATCH 3/4] systemd: split modules into packages
  2015-03-26 13:33       ` Bottazzini, Bruno
@ 2015-03-26 13:38         ` Otavio Salvador
  0 siblings, 0 replies; 73+ messages in thread
From: Otavio Salvador @ 2015-03-26 13:38 UTC (permalink / raw)
  To: Bottazzini, Bruno; +Cc: Patches and discussions about the oe-core layer

On Thu, Mar 26, 2015 at 10:33 AM, Bottazzini, Bruno
<bruno.bottazzini@intel.com> wrote:
> On Qui, 2015-03-26 at 09:52 +0100, Andreas Oberritter wrote:
>> Hi Bruno,
>>
>> On 25.03.2015 22:49, Bruno Bottazzini wrote:
>> > if one wants to launch a simple deamon, most modules are not
>> > required.
>> > He will be able to save space and exclude unwanted packages
>> > from the final image.
>> > ---
>> >  meta/recipes-core/systemd/systemd_219.bb | 1073 ++++++++++++++++++++++++++----
>> >  1 file changed, 943 insertions(+), 130 deletions(-)
>> >
>> > diff --git a/meta/recipes-core/systemd/systemd_219.bb b/meta/recipes-core/systemd/systemd_219.bb
>> > index e2ea81e..9bb104f 100644
>> > --- a/meta/recipes-core/systemd/systemd_219.bb
>> > +++ b/meta/recipes-core/systemd/systemd_219.bb
>> > @@ -19,7 +19,7 @@ PROVIDES = "udev"
>> >
>> >  PE = "1"
>> >
>> > -DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux"
>> > +DEPENDS = "intltool-native gperf-native readline libcap libcgroup qemu-native"
>> >
>> >  SECTION = "base/shell"
>> >
>> > @@ -62,23 +62,45 @@ LDFLAGS_append_libc-uclibc = " -lrt"
>> >
>> >  GTKDOC_DOCDIR = "${S}/docs/"
>> >
>> > -PACKAGECONFIG ??= "xz ldconfig \
>> > +PACKAGECONFIG ??= " \
>> > +                   gcrypt \
>> > +                   kmod \
>> > +                   ldconfig \
>> > +                   ${@bb.utils.contains('DISTRO_FEATURES', 'blkid', 'blkid', '', d)} \
>> > +                   ${@bb.utils.contains('DISTRO_FEATURES', 'efi', 'efi', '', d)} \
>> > +                   ${@bb.utils.contains('DISTRO_FEATURES', 'lz4', 'lz4', '', d)} \
>> > +                   ${@bb.utils.contains('DISTRO_FEATURES', 'xz', 'xz', '', d)} \
>> > +                   ${@bb.utils.contains('DISTRO_FEATURES', 'libidn', 'libidn', '', d)} \
>>
>> please don't invent new distro features for packageconfig of a single
>> recipe.
>>
>> Regards,
>> Andreas
>
> Andreas,
>
> Firstly, thank you a lot, for reviewing this patch
>
>
> How would you suggest to change this code ?
>
> Should I do the following ?
>
> PACKAGECONFIG ??= " \
>                    gcrypt \
>                    kmod \
>                    ldconfig \
>                    blkid \
>                    efi \
>                    ... \
> an so on ?

Yes.

Virtually all options which can be enabled/disabled should have a
PACKAGECONFIG entry and you shouldn't change the features which are
enabled/disabled in this commit. This can potentially be done in
another next commit but will be unlikely to be ported for fido as it
may impose bad surprises for users.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH 3/4] systemd: split modules into packages
  2015-03-26 11:56       ` Otavio Salvador
@ 2015-03-26 13:40         ` Bottazzini, Bruno
  2015-03-26 13:43           ` Otavio Salvador
  2015-03-27 14:57           ` Anders Darander
  2015-03-26 17:25         ` Khem Raj
  1 sibling, 2 replies; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-03-26 13:40 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

On Qui, 2015-03-26 at 08:56 -0300, Otavio Salvador wrote:
> On Thu, Mar 26, 2015 at 5:29 AM, Anders Darander <anders@chargestorm.se> wrote:
> > * Bruno Bottazzini <bruno.bottazzini@intel.com> [150325 22:50]:
> >
> >> if one wants to launch a simple deamon, most modules are not
> >> required.
> >> He will be able to save space and exclude unwanted packages
> >> from the final image.
> >
> > I like this, though I've got a few questions that I just noticed.
> >
> >> -PACKAGECONFIG ??= "xz ldconfig \
> >> +PACKAGECONFIG ??= " \
> >> +                   gcrypt \
> >> +                   kmod \
> >> +                   ldconfig \
> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'blkid', 'blkid', '', d)} \
> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'efi', 'efi', '', d)} \
> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'lz4', 'lz4', '', d)} \
> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'xz', 'xz', '', d)} \
> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'libidn', 'libidn', '', d)} \
> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
> >>                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
> >>                     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}"
> >
> > It might be worth noting that xz has gone from being explicitly enabled,
> > to depend on a DISTRO_FEATURES.
> 
> Agreed and we shouldn't explode the number of possible dsitro
> features. I'd also prefer if xz were kept enable by default so we
> don't make a behavior change under the hood.
> 
> ...
> >>  PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
> >> -PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
> >
> > Why do you remove networkd as a PACKAGECONFIG?
> 
> If there is a real reason for this, it must be recorded in commit log as well.

Firstly, 

Thank you a lot for reviewing this Patch. I'd like to ask you guys to
review the others patches too.
I know this on will be the more complicated but there others will be
faster to review.


Now:

Guys, if you continue this patch you will see that networkd will always
be enabled. Systemd will always configure/make it however, the package
will not be installed if the user wants to.

With PACKAGECONFIG, we may not get everything "for free" as some data
files will be installed regardless as well as some components from
systemd cannot be disabled by their build system but we can run without
them, for instance we can run without journald.

The problem is understanding that although systemd is a single
repository it contains multiple services and daemons in it that can run
even without the core PID1, udev or the many helpers used to configure
the system such as resolved, 
timedated, localed... 

All of these components are runtime independent, we can install or
remove them and they should not create problems.

> 




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

* Re: [PATCH 3/4] systemd: split modules into packages
  2015-03-26 13:40         ` Bottazzini, Bruno
@ 2015-03-26 13:43           ` Otavio Salvador
  2015-03-26 13:53             ` Bottazzini, Bruno
  2015-03-27 14:57           ` Anders Darander
  1 sibling, 1 reply; 73+ messages in thread
From: Otavio Salvador @ 2015-03-26 13:43 UTC (permalink / raw)
  To: Bottazzini, Bruno; +Cc: Patches and discussions about the oe-core layer

On Thu, Mar 26, 2015 at 10:40 AM, Bottazzini, Bruno
<bruno.bottazzini@intel.com> wrote:
> On Qui, 2015-03-26 at 08:56 -0300, Otavio Salvador wrote:
>> On Thu, Mar 26, 2015 at 5:29 AM, Anders Darander <anders@chargestorm.se> wrote:
>> > * Bruno Bottazzini <bruno.bottazzini@intel.com> [150325 22:50]:
>> >
>> >> if one wants to launch a simple deamon, most modules are not
>> >> required.
>> >> He will be able to save space and exclude unwanted packages
>> >> from the final image.
>> >
>> > I like this, though I've got a few questions that I just noticed.
>> >
>> >> -PACKAGECONFIG ??= "xz ldconfig \
>> >> +PACKAGECONFIG ??= " \
>> >> +                   gcrypt \
>> >> +                   kmod \
>> >> +                   ldconfig \
>> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'blkid', 'blkid', '', d)} \
>> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'efi', 'efi', '', d)} \
>> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'lz4', 'lz4', '', d)} \
>> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'xz', 'xz', '', d)} \
>> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'libidn', 'libidn', '', d)} \
>> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
>> >>                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
>> >>                     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}"
>> >
>> > It might be worth noting that xz has gone from being explicitly enabled,
>> > to depend on a DISTRO_FEATURES.
>>
>> Agreed and we shouldn't explode the number of possible dsitro
>> features. I'd also prefer if xz were kept enable by default so we
>> don't make a behavior change under the hood.
>>
>> ...
>> >>  PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
>> >> -PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
>> >
>> > Why do you remove networkd as a PACKAGECONFIG?
>>
>> If there is a real reason for this, it must be recorded in commit log as well.
>
> Firstly,
>
> Thank you a lot for reviewing this Patch. I'd like to ask you guys to
> review the others patches too.
> I know this on will be the more complicated but there others will be
> faster to review.
>
>
> Now:
>
> Guys, if you continue this patch you will see that networkd will always
> be enabled. Systemd will always configure/make it however, the package
> will not be installed if the user wants to.
>
> With PACKAGECONFIG, we may not get everything "for free" as some data
> files will be installed regardless as well as some components from
> systemd cannot be disabled by their build system but we can run without
> them, for instance we can run without journald.
>
> The problem is understanding that although systemd is a single
> repository it contains multiple services and daemons in it that can run
> even without the core PID1, udev or the many helpers used to configure
> the system such as resolved,
> timedated, localed...
>
> All of these components are runtime independent, we can install or
> remove them and they should not create problems.

I understand however you can remove the files if networkd, for
example, is not in PACKAGECONFIG.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH 3/4] systemd: split modules into packages
  2015-03-26 13:43           ` Otavio Salvador
@ 2015-03-26 13:53             ` Bottazzini, Bruno
  2015-03-26 13:59               ` Otavio Salvador
  0 siblings, 1 reply; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-03-26 13:53 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

On Qui, 2015-03-26 at 10:43 -0300, Otavio Salvador wrote:
> On Thu, Mar 26, 2015 at 10:40 AM, Bottazzini, Bruno
> <bruno.bottazzini@intel.com> wrote:
> > On Qui, 2015-03-26 at 08:56 -0300, Otavio Salvador wrote:
> >> On Thu, Mar 26, 2015 at 5:29 AM, Anders Darander <anders@chargestorm.se> wrote:
> >> > * Bruno Bottazzini <bruno.bottazzini@intel.com> [150325 22:50]:
> >> >
> >> >> if one wants to launch a simple deamon, most modules are not
> >> >> required.
> >> >> He will be able to save space and exclude unwanted packages
> >> >> from the final image.
> >> >
> >> > I like this, though I've got a few questions that I just noticed.
> >> >
> >> >> -PACKAGECONFIG ??= "xz ldconfig \
> >> >> +PACKAGECONFIG ??= " \
> >> >> +                   gcrypt \
> >> >> +                   kmod \
> >> >> +                   ldconfig \
> >> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'blkid', 'blkid', '', d)} \
> >> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'efi', 'efi', '', d)} \
> >> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'lz4', 'lz4', '', d)} \
> >> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'xz', 'xz', '', d)} \
> >> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'libidn', 'libidn', '', d)} \
> >> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
> >> >>                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
> >> >>                     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}"
> >> >
> >> > It might be worth noting that xz has gone from being explicitly enabled,
> >> > to depend on a DISTRO_FEATURES.
> >>
> >> Agreed and we shouldn't explode the number of possible dsitro
> >> features. I'd also prefer if xz were kept enable by default so we
> >> don't make a behavior change under the hood.
> >>
> >> ...
> >> >>  PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
> >> >> -PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
> >> >
> >> > Why do you remove networkd as a PACKAGECONFIG?
> >>
> >> If there is a real reason for this, it must be recorded in commit log as well.
> >
> > Firstly,
> >
> > Thank you a lot for reviewing this Patch. I'd like to ask you guys to
> > review the others patches too.
> > I know this on will be the more complicated but there others will be
> > faster to review.
> >
> >
> > Now:
> >
> > Guys, if you continue this patch you will see that networkd will always
> > be enabled. Systemd will always configure/make it however, the package
> > will not be installed if the user wants to.
> >
> > With PACKAGECONFIG, we may not get everything "for free" as some data
> > files will be installed regardless as well as some components from
> > systemd cannot be disabled by their build system but we can run without
> > them, for instance we can run without journald.
> >
> > The problem is understanding that although systemd is a single
> > repository it contains multiple services and daemons in it that can run
> > even without the core PID1, udev or the many helpers used to configure
> > the system such as resolved,
> > timedated, localed...
> >
> > All of these components are runtime independent, we can install or
> > remove them and they should not create problems.
> 
> I understand however you can remove the files if networkd, for
> example, is not in PACKAGECONFIG.

Nice! I can adapt the recipe.

How would I do this ?

> 




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

* Re: [PATCH 3/4] systemd: split modules into packages
  2015-03-26 13:53             ` Bottazzini, Bruno
@ 2015-03-26 13:59               ` Otavio Salvador
  0 siblings, 0 replies; 73+ messages in thread
From: Otavio Salvador @ 2015-03-26 13:59 UTC (permalink / raw)
  To: Bottazzini, Bruno; +Cc: Patches and discussions about the oe-core layer

On Thu, Mar 26, 2015 at 10:53 AM, Bottazzini, Bruno
<bruno.bottazzini@intel.com> wrote:
> On Qui, 2015-03-26 at 10:43 -0300, Otavio Salvador wrote:
>> On Thu, Mar 26, 2015 at 10:40 AM, Bottazzini, Bruno
>> <bruno.bottazzini@intel.com> wrote:
>> > On Qui, 2015-03-26 at 08:56 -0300, Otavio Salvador wrote:
>> >> On Thu, Mar 26, 2015 at 5:29 AM, Anders Darander <anders@chargestorm.se> wrote:
>> >> > * Bruno Bottazzini <bruno.bottazzini@intel.com> [150325 22:50]:
>> >> >
>> >> >> if one wants to launch a simple deamon, most modules are not
>> >> >> required.
>> >> >> He will be able to save space and exclude unwanted packages
>> >> >> from the final image.
>> >> >
>> >> > I like this, though I've got a few questions that I just noticed.
>> >> >
>> >> >> -PACKAGECONFIG ??= "xz ldconfig \
>> >> >> +PACKAGECONFIG ??= " \
>> >> >> +                   gcrypt \
>> >> >> +                   kmod \
>> >> >> +                   ldconfig \
>> >> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'blkid', 'blkid', '', d)} \
>> >> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'efi', 'efi', '', d)} \
>> >> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'lz4', 'lz4', '', d)} \
>> >> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'xz', 'xz', '', d)} \
>> >> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'libidn', 'libidn', '', d)} \
>> >> >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
>> >> >>                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
>> >> >>                     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}"
>> >> >
>> >> > It might be worth noting that xz has gone from being explicitly enabled,
>> >> > to depend on a DISTRO_FEATURES.
>> >>
>> >> Agreed and we shouldn't explode the number of possible dsitro
>> >> features. I'd also prefer if xz were kept enable by default so we
>> >> don't make a behavior change under the hood.
>> >>
>> >> ...
>> >> >>  PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
>> >> >> -PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
>> >> >
>> >> > Why do you remove networkd as a PACKAGECONFIG?
>> >>
>> >> If there is a real reason for this, it must be recorded in commit log as well.
>> >
>> > Firstly,
>> >
>> > Thank you a lot for reviewing this Patch. I'd like to ask you guys to
>> > review the others patches too.
>> > I know this on will be the more complicated but there others will be
>> > faster to review.
>> >
>> >
>> > Now:
>> >
>> > Guys, if you continue this patch you will see that networkd will always
>> > be enabled. Systemd will always configure/make it however, the package
>> > will not be installed if the user wants to.
>> >
>> > With PACKAGECONFIG, we may not get everything "for free" as some data
>> > files will be installed regardless as well as some components from
>> > systemd cannot be disabled by their build system but we can run without
>> > them, for instance we can run without journald.
>> >
>> > The problem is understanding that although systemd is a single
>> > repository it contains multiple services and daemons in it that can run
>> > even without the core PID1, udev or the many helpers used to configure
>> > the system such as resolved,
>> > timedated, localed...
>> >
>> > All of these components are runtime independent, we can install or
>> > remove them and they should not create problems.
>>
>> I understand however you can remove the files if networkd, for
>> example, is not in PACKAGECONFIG.
>
> Nice! I can adapt the recipe.
>
> How would I do this ?

Take a look at recipes using bb.utils.contains and bb.utils.contains_any

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH 3/4] systemd: split modules into packages
  2015-03-26 11:56       ` Otavio Salvador
  2015-03-26 13:40         ` Bottazzini, Bruno
@ 2015-03-26 17:25         ` Khem Raj
  1 sibling, 0 replies; 73+ messages in thread
From: Khem Raj @ 2015-03-26 17:25 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

On Thu, Mar 26, 2015 at 4:56 AM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
>>>  PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
>>> -PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
>>
>> Why do you remove networkd as a PACKAGECONFIG?
>
> If there is a real reason for this, it must be recorded in commit log as well.

you just need udevd, systemd and journald as minimum for systemd to
work, so our approach should be to get to that point
and everything else could be a packageconfig. Does that answer your doubt ?


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

* Re: [PATCH 3/4] systemd: split modules into packages
  2015-03-26 13:40         ` Bottazzini, Bruno
  2015-03-26 13:43           ` Otavio Salvador
@ 2015-03-27 14:57           ` Anders Darander
  2015-03-27 17:09             ` Bottazzini, Bruno
  1 sibling, 1 reply; 73+ messages in thread
From: Anders Darander @ 2015-03-27 14:57 UTC (permalink / raw)
  To: Bottazzini, Bruno
  Cc: Otavio Salvador, Patches and discussions about the oe-core layer

* Bottazzini, Bruno <bruno.bottazzini@intel.com> [150326 14:40]:

> On Qui, 2015-03-26 at 08:56 -0300, Otavio Salvador wrote:
> > On Thu, Mar 26, 2015 at 5:29 AM, Anders Darander <anders@chargestorm.se> wrote:
> > > * Bruno Bottazzini <bruno.bottazzini@intel.com> [150325 22:50]:

> > >> if one wants to launch a simple deamon, most modules are not
> > >> required.
> > >> He will be able to save space and exclude unwanted packages
> > >> from the final image.

> > > I like this, though I've got a few questions that I just noticed.

> > >> -PACKAGECONFIG ??= "xz ldconfig \
> > >> +PACKAGECONFIG ??= " \
> > >> +                   gcrypt \
> > >> +                   kmod \
> > >> +                   ldconfig \
> > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'blkid', 'blkid', '', d)} \
> > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'efi', 'efi', '', d)} \
> > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'lz4', 'lz4', '', d)} \
> > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'xz', 'xz', '', d)} \
> > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'libidn', 'libidn', '', d)} \
> > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
> > >>                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
> > >>                     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}"

> > > It might be worth noting that xz has gone from being explicitly enabled,
> > > to depend on a DISTRO_FEATURES.

> > Agreed and we shouldn't explode the number of possible dsitro
> > features. I'd also prefer if xz were kept enable by default so we
> > don't make a behavior change under the hood.

> > ...
> > >>  PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
> > >> -PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"

> > > Why do you remove networkd as a PACKAGECONFIG?

> > If there is a real reason for this, it must be recorded in commit log as well.

> Guys, if you continue this patch you will see that networkd will always
> be enabled. Systemd will always configure/make it however, the package
> will not be installed if the user wants to.

> With PACKAGECONFIG, we may not get everything "for free" as some data
> files will be installed regardless as well as some components from
> systemd cannot be disabled by their build system but we can run without
> them, for instance we can run without journald.

The advantage of also keeping the PACKAGECONFIG for e.g. networkd (and
as much other things as possible) is that we're also reducing the build
time and size. Sure, it might not be by much, but all small bits are
valuable.

> The problem is understanding that although systemd is a single
> repository it contains multiple services and daemons in it that can run
> even without the core PID1, udev or the many helpers used to configure
> the system such as resolved, 
> timedated, localed... 

Yes, and as systemd have configure options for quite a lot of those
things, we should make use of those options, as long as possible.

> All of these components are runtime independent, we can install or
> remove them and they should not create problems.


That's right, but still, if we even can avoid to build them, it's
better...

Cheers,
Anders

-- 
Anders Darander
ChargeStorm AB / eStorm AB


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

* Re: [PATCH 3/4] systemd: split modules into packages
  2015-03-27 14:57           ` Anders Darander
@ 2015-03-27 17:09             ` Bottazzini, Bruno
  2015-03-27 17:11               ` Otavio Salvador
  0 siblings, 1 reply; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-03-27 17:09 UTC (permalink / raw)
  To: Anders Darander
  Cc: Otavio Salvador, Patches and discussions about the oe-core layer

On Sex, 2015-03-27 at 15:57 +0100, Anders Darander wrote:
> * Bottazzini, Bruno <bruno.bottazzini@intel.com> [150326 14:40]:
> 
> > On Qui, 2015-03-26 at 08:56 -0300, Otavio Salvador wrote:
> > > On Thu, Mar 26, 2015 at 5:29 AM, Anders Darander <anders@chargestorm.se> wrote:
> > > > * Bruno Bottazzini <bruno.bottazzini@intel.com> [150325 22:50]:
> 
> > > >> if one wants to launch a simple deamon, most modules are not
> > > >> required.
> > > >> He will be able to save space and exclude unwanted packages
> > > >> from the final image.
> 
> > > > I like this, though I've got a few questions that I just noticed.
> 
> > > >> -PACKAGECONFIG ??= "xz ldconfig \
> > > >> +PACKAGECONFIG ??= " \
> > > >> +                   gcrypt \
> > > >> +                   kmod \
> > > >> +                   ldconfig \
> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'blkid', 'blkid', '', d)} \
> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'efi', 'efi', '', d)} \
> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'lz4', 'lz4', '', d)} \
> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'xz', 'xz', '', d)} \
> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'libidn', 'libidn', '', d)} \
> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
> > > >>                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
> > > >>                     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}"
> 
> > > > It might be worth noting that xz has gone from being explicitly enabled,
> > > > to depend on a DISTRO_FEATURES.
> 
> > > Agreed and we shouldn't explode the number of possible dsitro
> > > features. I'd also prefer if xz were kept enable by default so we
> > > don't make a behavior change under the hood.
> 
> > > ...
> > > >>  PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
> > > >> -PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
> 
> > > > Why do you remove networkd as a PACKAGECONFIG?
> 
> > > If there is a real reason for this, it must be recorded in commit log as well.
> 
> > Guys, if you continue this patch you will see that networkd will always
> > be enabled. Systemd will always configure/make it however, the package
> > will not be installed if the user wants to.
> 
> > With PACKAGECONFIG, we may not get everything "for free" as some data
> > files will be installed regardless as well as some components from
> > systemd cannot be disabled by their build system but we can run without
> > them, for instance we can run without journald.
> 
> The advantage of also keeping the PACKAGECONFIG for e.g. networkd (and
> as much other things as possible) is that we're also reducing the build
> time and size. Sure, it might not be by much, but all small bits are
> valuable.
> 

You are right! Maybe we should mix them ? 

e.g. if PACKAGECONFIG networkd is disabled then the package
systemd-services-networkd will not be included.

What do you think?

> > The problem is understanding that although systemd is a single
> > repository it contains multiple services and daemons in it that can run
> > even without the core PID1, udev or the many helpers used to configure
> > the system such as resolved, 
> > timedated, localed... 
> 
> Yes, and as systemd have configure options for quite a lot of those
> things, we should make use of those options, as long as possible.
> 
> > All of these components are runtime independent, we can install or
> > remove them and they should not create problems.
> 
> 
> That's right, but still, if we even can avoid to build them, it's
> better...
> 
> Cheers,
> Anders
> 




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

* Re: [PATCH 3/4] systemd: split modules into packages
  2015-03-27 17:09             ` Bottazzini, Bruno
@ 2015-03-27 17:11               ` Otavio Salvador
  2015-03-27 17:13                 ` Bottazzini, Bruno
  0 siblings, 1 reply; 73+ messages in thread
From: Otavio Salvador @ 2015-03-27 17:11 UTC (permalink / raw)
  To: Bottazzini, Bruno
  Cc: Anders Darander, Patches and discussions about the oe-core layer

On Fri, Mar 27, 2015 at 2:09 PM, Bottazzini, Bruno
<bruno.bottazzini@intel.com> wrote:
> On Sex, 2015-03-27 at 15:57 +0100, Anders Darander wrote:
>> * Bottazzini, Bruno <bruno.bottazzini@intel.com> [150326 14:40]:
>>
>> > On Qui, 2015-03-26 at 08:56 -0300, Otavio Salvador wrote:
>> > > On Thu, Mar 26, 2015 at 5:29 AM, Anders Darander <anders@chargestorm.se> wrote:
>> > > > * Bruno Bottazzini <bruno.bottazzini@intel.com> [150325 22:50]:
>>
>> > > >> if one wants to launch a simple deamon, most modules are not
>> > > >> required.
>> > > >> He will be able to save space and exclude unwanted packages
>> > > >> from the final image.
>>
>> > > > I like this, though I've got a few questions that I just noticed.
>>
>> > > >> -PACKAGECONFIG ??= "xz ldconfig \
>> > > >> +PACKAGECONFIG ??= " \
>> > > >> +                   gcrypt \
>> > > >> +                   kmod \
>> > > >> +                   ldconfig \
>> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'blkid', 'blkid', '', d)} \
>> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'efi', 'efi', '', d)} \
>> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'lz4', 'lz4', '', d)} \
>> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'xz', 'xz', '', d)} \
>> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'libidn', 'libidn', '', d)} \
>> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
>> > > >>                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
>> > > >>                     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}"
>>
>> > > > It might be worth noting that xz has gone from being explicitly enabled,
>> > > > to depend on a DISTRO_FEATURES.
>>
>> > > Agreed and we shouldn't explode the number of possible dsitro
>> > > features. I'd also prefer if xz were kept enable by default so we
>> > > don't make a behavior change under the hood.
>>
>> > > ...
>> > > >>  PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
>> > > >> -PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
>>
>> > > > Why do you remove networkd as a PACKAGECONFIG?
>>
>> > > If there is a real reason for this, it must be recorded in commit log as well.
>>
>> > Guys, if you continue this patch you will see that networkd will always
>> > be enabled. Systemd will always configure/make it however, the package
>> > will not be installed if the user wants to.
>>
>> > With PACKAGECONFIG, we may not get everything "for free" as some data
>> > files will be installed regardless as well as some components from
>> > systemd cannot be disabled by their build system but we can run without
>> > them, for instance we can run without journald.
>>
>> The advantage of also keeping the PACKAGECONFIG for e.g. networkd (and
>> as much other things as possible) is that we're also reducing the build
>> time and size. Sure, it might not be by much, but all small bits are
>> valuable.
>>
>
> You are right! Maybe we should mix them ?
>
> e.g. if PACKAGECONFIG networkd is disabled then the package
> systemd-services-networkd will not be included.
>
> What do you think?

You can add the files conditionally so these empty packages won't be generated.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH 3/4] systemd: split modules into packages
  2015-03-27 17:11               ` Otavio Salvador
@ 2015-03-27 17:13                 ` Bottazzini, Bruno
  0 siblings, 0 replies; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-03-27 17:13 UTC (permalink / raw)
  To: Otavio Salvador
  Cc: Anders Darander, Patches and discussions about the oe-core layer

On Sex, 2015-03-27 at 14:11 -0300, Otavio Salvador wrote:
> On Fri, Mar 27, 2015 at 2:09 PM, Bottazzini, Bruno
> <bruno.bottazzini@intel.com> wrote:
> > On Sex, 2015-03-27 at 15:57 +0100, Anders Darander wrote:
> >> * Bottazzini, Bruno <bruno.bottazzini@intel.com> [150326 14:40]:
> >>
> >> > On Qui, 2015-03-26 at 08:56 -0300, Otavio Salvador wrote:
> >> > > On Thu, Mar 26, 2015 at 5:29 AM, Anders Darander <anders@chargestorm.se> wrote:
> >> > > > * Bruno Bottazzini <bruno.bottazzini@intel.com> [150325 22:50]:
> >>
> >> > > >> if one wants to launch a simple deamon, most modules are not
> >> > > >> required.
> >> > > >> He will be able to save space and exclude unwanted packages
> >> > > >> from the final image.
> >>
> >> > > > I like this, though I've got a few questions that I just noticed.
> >>
> >> > > >> -PACKAGECONFIG ??= "xz ldconfig \
> >> > > >> +PACKAGECONFIG ??= " \
> >> > > >> +                   gcrypt \
> >> > > >> +                   kmod \
> >> > > >> +                   ldconfig \
> >> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'blkid', 'blkid', '', d)} \
> >> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'efi', 'efi', '', d)} \
> >> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'lz4', 'lz4', '', d)} \
> >> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'xz', 'xz', '', d)} \
> >> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'libidn', 'libidn', '', d)} \
> >> > > >> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
> >> > > >>                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
> >> > > >>                     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}"
> >>
> >> > > > It might be worth noting that xz has gone from being explicitly enabled,
> >> > > > to depend on a DISTRO_FEATURES.
> >>
> >> > > Agreed and we shouldn't explode the number of possible dsitro
> >> > > features. I'd also prefer if xz were kept enable by default so we
> >> > > don't make a behavior change under the hood.
> >>
> >> > > ...
> >> > > >>  PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
> >> > > >> -PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
> >>
> >> > > > Why do you remove networkd as a PACKAGECONFIG?
> >>
> >> > > If there is a real reason for this, it must be recorded in commit log as well.
> >>
> >> > Guys, if you continue this patch you will see that networkd will always
> >> > be enabled. Systemd will always configure/make it however, the package
> >> > will not be installed if the user wants to.
> >>
> >> > With PACKAGECONFIG, we may not get everything "for free" as some data
> >> > files will be installed regardless as well as some components from
> >> > systemd cannot be disabled by their build system but we can run without
> >> > them, for instance we can run without journald.
> >>
> >> The advantage of also keeping the PACKAGECONFIG for e.g. networkd (and
> >> as much other things as possible) is that we're also reducing the build
> >> time and size. Sure, it might not be by much, but all small bits are
> >> valuable.
> >>
> >
> > You are right! Maybe we should mix them ?
> >
> > e.g. if PACKAGECONFIG networkd is disabled then the package
> > systemd-services-networkd will not be included.
> >
> > What do you think?
> 
> You can add the files conditionally so these empty packages won't be generated.

Indeed, do you know how to do this condition or have you got any
example?

> 




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

* Re: [PATCH 4/4] systemd: v219 with stable fixes
  2015-03-25 21:49   ` [PATCH 4/4] systemd: v219 with stable fixes Bruno Bottazzini
@ 2015-03-30 13:05     ` Bottazzini, Bruno
  2015-03-30 13:40       ` Otavio Salvador
  2015-04-01 10:16     ` Jussi Kukkonen
  1 sibling, 1 reply; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-03-30 13:05 UTC (permalink / raw)
  To: openembedded-core

Hello,

What about this patch ?

Did you guys check this out ?

Best Regards,

On Qua, 2015-03-25 at 18:49 -0300, Bruno Bottazzini wrote:
> Adding patches that fix bugs for 219 version.
> This will get the same consistency of the stable systemd 219 version.
> 
> More details:
> http://cgit.freedesktop.org/systemd/systemd-stable/log/?h=v219-stable
> ---
>  ...remote-fix-certificate-status-memory-leak.patch |  31 +
>  ...ournal-remote-fix-client_cert-memory-leak.patch |  35 +
>  ...0003-tmpfiles-Fix-parse_acl-error-message.patch |  28 +
>  ...-test-utf8-fix-utf16-tests-on-BE-machines.patch |  26 +
>  ...iles-avoid-creating-duplicate-acl-entries.patch | 131 +++
>  .../0006-shared-time-util-fix-gcc5-warning.patch   |  32 +
>  ...time-test-infinity-parsing-in-nanoseconds.patch |  36 +
>  .../0008-bootchart-fix-default-init-path.patch     |  44 +
>  ...emctl-bump-NOFILE-only-for-systemctl_main.patch |  44 +
>  ...0-Make-root-s-home-directory-configurable.patch |  89 +-
>  ...-util-avoid-freeing-uninitialized-pointer.patch |  37 +
>  ...11-bootchart-svg-fix-checking-of-list-end.patch |  28 +
>  ...md-add-getrandom-syscall-numbers-for-MIPS.patch |  38 +
>  ...aker-dependencies-between-mount-and-devic.patch |  33 +
>  ...topping-due-to-BindsTo-log-which-unit-cau.patch |  43 +
>  ...grade-message-about-sysctl-overrides-to-d.patch |  30 +
>  ...l-add-some-hints-how-to-override-settings.patch |  39 +
>  .../0017-core-rework-device-state-logic.patch      | 912 +++++++++++++++++++++
>  .../0018-core-fix-return-value-on-OOM.patch        |  26 +
>  ...e-x-machine-unix-prefix-for-the-container.patch |  33 +
>  ...0-shared-AFS-is-also-a-network-filesystem.patch |  25 +
>  ...downgrade-unit-type-not-supported-message.patch |  31 +
>  ...ournal-remote-fix-saving-of-binary-fields.patch |  97 +++
>  ...ix-Inappropriate-ioctl-for-device-on-ext4.patch |  37 +
>  ...eplace-VLA-with-alloca-to-make-llvm-happy.patch |  53 ++
>  ...ietly-ignore-ACLs-on-unsupported-filesyst.patch |  84 ++
>  ...-assume-ac-when-sys-class-power_supply-is.patch |  30 +
>  meta/recipes-core/systemd/systemd_219.bb           |  37 +-
>  meta/recipes-core/util-linux/util-linux.inc        |   2 +-
>  29 files changed, 2052 insertions(+), 59 deletions(-)
>  create mode 100644 meta/recipes-core/systemd/systemd/0001-journal-remote-fix-certificate-status-memory-leak.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0002-journal-remote-fix-client_cert-memory-leak.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0003-tmpfiles-Fix-parse_acl-error-message.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0004-test-utf8-fix-utf16-tests-on-BE-machines.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0005-tmpfiles-avoid-creating-duplicate-acl-entries.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0006-shared-time-util-fix-gcc5-warning.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0007-test-time-test-infinity-parsing-in-nanoseconds.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0008-bootchart-fix-default-init-path.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0009-systemctl-bump-NOFILE-only-for-systemctl_main.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0010-acl-util-avoid-freeing-uninitialized-pointer.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0011-bootchart-svg-fix-checking-of-list-end.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0012-systemd-add-getrandom-syscall-numbers-for-MIPS.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0013-unit-use-weaker-dependencies-between-mount-and-devic.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0014-unit-When-stopping-due-to-BindsTo-log-which-unit-cau.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0015-sysctl-downgrade-message-about-sysctl-overrides-to-d.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0016-sysctl-add-some-hints-how-to-override-settings.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0017-core-rework-device-state-logic.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0018-core-fix-return-value-on-OOM.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0019-machined-use-x-machine-unix-prefix-for-the-container.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0020-shared-AFS-is-also-a-network-filesystem.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0021-core-downgrade-unit-type-not-supported-message.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0022-journal-remote-fix-saving-of-binary-fields.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0023-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0024-sd-daemon-replace-VLA-with-alloca-to-make-llvm-happy.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0025-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0026-shared-util-assume-ac-when-sys-class-power_supply-is.patch
> 
> diff --git a/meta/recipes-core/systemd/systemd/0001-journal-remote-fix-certificate-status-memory-leak.patch b/meta/recipes-core/systemd/systemd/0001-journal-remote-fix-certificate-status-memory-leak.patch
> new file mode 100644
> index 0000000..172bea2
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0001-journal-remote-fix-certificate-status-memory-leak.patch
> @@ -0,0 +1,31 @@
> +From 7057db8b36594bb03c611cab711cd992ad4de31e Mon Sep 17 00:00:00 2001
> +From: Michal Schmidt <mschmidt@redhat.com>
> +Date: Tue, 17 Feb 2015 10:33:01 +0100
> +Subject: [PATCH 01/26] journal-remote: fix certificate status memory leak
> +
> +The output of gnutls_certificate_verification_status_print() needs to be
> +freed.
> +
> +Noticed this while staring at verify_cert_authorized() to see what could
> +possibly confuse gcc5 on armv7hl to segfault during compilation.
> +
> +(cherry picked from commit 9c3cf9693ac5c0a332ba376f99e6adea28b1bb0d)
> +---
> + src/journal-remote/microhttpd-util.c | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/src/journal-remote/microhttpd-util.c b/src/journal-remote/microhttpd-util.c
> +index 34d9337..de9c6ab 100644
> +--- a/src/journal-remote/microhttpd-util.c
> ++++ b/src/journal-remote/microhttpd-util.c
> +@@ -179,6 +179,7 @@ static int verify_cert_authorized(gnutls_session_t session) {
> +                 return log_error_errno(r, "gnutls_certificate_verification_status_print failed: %m");
> + 
> +         log_info("Certificate status: %s", out.data);
> ++        gnutls_free(out.data);
> + 
> +         return status == 0 ? 0 : -EPERM;
> + }
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0002-journal-remote-fix-client_cert-memory-leak.patch b/meta/recipes-core/systemd/systemd/0002-journal-remote-fix-client_cert-memory-leak.patch
> new file mode 100644
> index 0000000..f615876
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0002-journal-remote-fix-client_cert-memory-leak.patch
> @@ -0,0 +1,35 @@
> +From 5852d2efbfb888dfb0adddb25afac0814d3ebcbb Mon Sep 17 00:00:00 2001
> +From: Michal Schmidt <mschmidt@redhat.com>
> +Date: Tue, 17 Feb 2015 10:36:57 +0100
> +Subject: [PATCH 02/26] journal-remote: fix client_cert memory leak
> +
> +Found by Valgrind while testing the previous memory leak fix.
> +
> +(cherry picked from commit 32c3d7144cf9a5c8c03761d7f198142ca0f5f7b8)
> +---
> + src/journal-remote/microhttpd-util.c | 6 +++++-
> + 1 file changed, 5 insertions(+), 1 deletion(-)
> +
> +diff --git a/src/journal-remote/microhttpd-util.c b/src/journal-remote/microhttpd-util.c
> +index de9c6ab..a95fff1 100644
> +--- a/src/journal-remote/microhttpd-util.c
> ++++ b/src/journal-remote/microhttpd-util.c
> +@@ -239,10 +239,14 @@ static int get_auth_dn(gnutls_x509_crt_t client_cert, char **buf) {
> +         return 0;
> + }
> + 
> ++static inline void gnutls_x509_crt_deinitp(gnutls_x509_crt_t *p) {
> ++        gnutls_x509_crt_deinit(*p);
> ++}
> ++
> + int check_permissions(struct MHD_Connection *connection, int *code, char **hostname) {
> +         const union MHD_ConnectionInfo *ci;
> +         gnutls_session_t session;
> +-        gnutls_x509_crt_t client_cert;
> ++        _cleanup_(gnutls_x509_crt_deinitp) gnutls_x509_crt_t client_cert = NULL;
> +         _cleanup_free_ char *buf = NULL;
> +         int r;
> + 
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0003-tmpfiles-Fix-parse_acl-error-message.patch b/meta/recipes-core/systemd/systemd/0003-tmpfiles-Fix-parse_acl-error-message.patch
> new file mode 100644
> index 0000000..15fa98c
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0003-tmpfiles-Fix-parse_acl-error-message.patch
> @@ -0,0 +1,28 @@
> +From ea960d3fc09c1e3745791d3433094678fd7ccd50 Mon Sep 17 00:00:00 2001
> +From: Martin Pitt <martin.pitt@ubuntu.com>
> +Date: Tue, 17 Feb 2015 12:47:51 +0100
> +Subject: [PATCH 03/26] tmpfiles: Fix parse_acl error message
> +
> +parse_acl() returns the error instead of setting errno.
> +
> +(cherry picked from commit 484adfd914504cd7e95867cea20ca7af71b888f2)
> +---
> + src/tmpfiles/tmpfiles.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
> +index c948d4d..88ba7e4 100644
> +--- a/src/tmpfiles/tmpfiles.c
> ++++ b/src/tmpfiles/tmpfiles.c
> +@@ -689,7 +689,7 @@ static int get_acls_from_arg(Item *item) {
> +          * afterwards, so the mask can be added now if necessary. */
> +         r = parse_acl(item->argument, &item->acl_access, &item->acl_default, !item->force);
> +         if (r < 0)
> +-                log_warning_errno(errno, "Failed to parse ACL \"%s\": %m. Ignoring",
> ++                log_warning_errno(r, "Failed to parse ACL \"%s\": %m. Ignoring",
> +                                   item->argument);
> + #else
> +         log_warning_errno(ENOSYS, "ACLs are not supported. Ignoring");
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0004-test-utf8-fix-utf16-tests-on-BE-machines.patch b/meta/recipes-core/systemd/systemd/0004-test-utf8-fix-utf16-tests-on-BE-machines.patch
> new file mode 100644
> index 0000000..f43068d
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0004-test-utf8-fix-utf16-tests-on-BE-machines.patch
> @@ -0,0 +1,26 @@
> +From 8df2bb91718bf2ccc89c41f0dd19cd0bc8da1357 Mon Sep 17 00:00:00 2001
> +From: Tom Gundersen <teg@jklm.no>
> +Date: Wed, 18 Feb 2015 14:33:50 +0100
> +Subject: [PATCH 04/26] test: utf8 - fix utf16 tests on BE machines
> +
> +(cherry picked from commit 502184de0f95d3a124d4d4c77ae7a88747a0fac2)
> +---
> + src/test/test-utf8.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/test/test-utf8.c b/src/test/test-utf8.c
> +index befa385..346f852 100644
> +--- a/src/test/test-utf8.c
> ++++ b/src/test/test-utf8.c
> +@@ -95,7 +95,7 @@ static void test_utf8_escaping_printable(void) {
> + 
> + static void test_utf16_to_utf8(void) {
> +         char *a = NULL;
> +-        const uint16_t utf16[] = { 'a', 0xd800, 'b', 0xdc00, 'c', 0xd801, 0xdc37 };
> ++        const uint16_t utf16[] = { htole16('a'), htole16(0xd800), htole16('b'), htole16(0xdc00), htole16('c'), htole16(0xd801), htole16(0xdc37) };
> +         const char utf8[] = { 'a', 'b', 'c', 0xf0, 0x90, 0x90, 0xb7, 0 };
> + 
> +         a = utf16_to_utf8(utf16, 14);
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0005-tmpfiles-avoid-creating-duplicate-acl-entries.patch b/meta/recipes-core/systemd/systemd/0005-tmpfiles-avoid-creating-duplicate-acl-entries.patch
> new file mode 100644
> index 0000000..35fe913
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0005-tmpfiles-avoid-creating-duplicate-acl-entries.patch
> @@ -0,0 +1,131 @@
> +From c429758054ee77383ca6d7323ecdd4163d3a3718 Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
> +Date: Mon, 23 Feb 2015 23:19:54 -0500
> +Subject: [PATCH 05/26] tmpfiles: avoid creating duplicate acl entries
> +
> +https://bugs.freedesktop.org/show_bug.cgi?id=89202
> +https://bugs.debian.org/778656
> +
> +Status quo ante can be restored with:
> +  getfacl -p /var/log/journal/`cat /etc/machine-id`|grep -v '^#'|sort -u|sudo setfacl --set-file=- /var/log/journal/`cat /etc/machine-id`
> +
> +(cherry picked from commit 1c73f3bc29111a00738569c9d40a989b161a0624)
> +---
> + src/shared/acl-util.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++--
> + src/shared/acl-util.h |  4 +++
> + 2 files changed, 81 insertions(+), 2 deletions(-)
> +
> +diff --git a/src/shared/acl-util.c b/src/shared/acl-util.c
> +index a4ff1ab..cbe09d7 100644
> +--- a/src/shared/acl-util.c
> ++++ b/src/shared/acl-util.c
> +@@ -282,6 +282,77 @@ int parse_acl(char *text, acl_t *acl_access, acl_t *acl_default, bool want_mask)
> +         return 0;
> + }
> + 
> ++static int acl_entry_equal(acl_entry_t a, acl_entry_t b) {
> ++        acl_tag_t tag_a, tag_b;
> ++
> ++        if (acl_get_tag_type(a, &tag_a) < 0)
> ++                return -errno;
> ++
> ++        if (acl_get_tag_type(b, &tag_b) < 0)
> ++                return -errno;
> ++
> ++        if (tag_a != tag_b)
> ++                return false;
> ++
> ++        switch (tag_a) {
> ++        case ACL_USER_OBJ:
> ++        case ACL_GROUP_OBJ:
> ++        case ACL_MASK:
> ++        case ACL_OTHER:
> ++                /* can have only one of those */
> ++                return true;
> ++        case ACL_USER: {
> ++                _cleanup_(acl_free_uid_tpp) uid_t *uid_a, *uid_b;
> ++
> ++                uid_a = acl_get_qualifier(a);
> ++                if (!uid_a)
> ++                        return -errno;
> ++
> ++                uid_b = acl_get_qualifier(b);
> ++                if (!uid_b)
> ++                        return -errno;
> ++
> ++                return *uid_a == *uid_b;
> ++        }
> ++        case ACL_GROUP: {
> ++                _cleanup_(acl_free_gid_tpp) gid_t *gid_a, *gid_b;
> ++
> ++                gid_a = acl_get_qualifier(a);
> ++                if (!gid_a)
> ++                        return -errno;
> ++
> ++                gid_b = acl_get_qualifier(b);
> ++                if (!gid_b)
> ++                        return -errno;
> ++
> ++                return *gid_a == *gid_b;
> ++        }
> ++        default:
> ++                assert_not_reached("Unknown acl tag type");
> ++        }
> ++}
> ++
> ++static int find_acl_entry(acl_t acl, acl_entry_t entry, acl_entry_t *out) {
> ++        acl_entry_t i;
> ++        int r;
> ++
> ++        for (r = acl_get_entry(acl, ACL_FIRST_ENTRY, &i);
> ++             r > 0;
> ++             r = acl_get_entry(acl, ACL_NEXT_ENTRY, &i)) {
> ++
> ++                r = acl_entry_equal(i, entry);
> ++                if (r < 0)
> ++                        return r;
> ++                if (r > 0) {
> ++                        *out = i;
> ++                        return 1;
> ++                }
> ++        }
> ++        if (r < 0)
> ++                return -errno;
> ++        return 0;
> ++}
> ++
> + int acls_for_file(const char *path, acl_type_t type, acl_t new, acl_t *acl) {
> +         _cleanup_(acl_freep) acl_t old;
> +         acl_entry_t i;
> +@@ -297,8 +368,12 @@ int acls_for_file(const char *path, acl_type_t type, acl_t new, acl_t *acl) {
> + 
> +                 acl_entry_t j;
> + 
> +-                if (acl_create_entry(&old, &j) < 0)
> +-                        return -errno;
> ++                r = find_acl_entry(old, i, &j);
> ++                if (r < 0)
> ++                        return r;
> ++                if (r == 0)
> ++                        if (acl_create_entry(&old, &j) < 0)
> ++                                return -errno;
> + 
> +                 if (acl_copy_entry(j, i) < 0)
> +                         return -errno;
> +diff --git a/src/shared/acl-util.h b/src/shared/acl-util.h
> +index 90e88ff..fdb9006 100644
> +--- a/src/shared/acl-util.h
> ++++ b/src/shared/acl-util.h
> +@@ -41,5 +41,9 @@ int acls_for_file(const char *path, acl_type_t type, acl_t new, acl_t *acl);
> + DEFINE_TRIVIAL_CLEANUP_FUNC(acl_t, acl_free);
> + #define acl_free_charp acl_free
> + DEFINE_TRIVIAL_CLEANUP_FUNC(char*, acl_free_charp);
> ++#define acl_free_uid_tp acl_free
> ++DEFINE_TRIVIAL_CLEANUP_FUNC(uid_t*, acl_free_uid_tp);
> ++#define acl_free_gid_tp acl_free
> ++DEFINE_TRIVIAL_CLEANUP_FUNC(gid_t*, acl_free_gid_tp);
> + 
> + #endif
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0006-shared-time-util-fix-gcc5-warning.patch b/meta/recipes-core/systemd/systemd/0006-shared-time-util-fix-gcc5-warning.patch
> new file mode 100644
> index 0000000..fc707bb
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0006-shared-time-util-fix-gcc5-warning.patch
> @@ -0,0 +1,32 @@
> +From 57da343cebcd77d168d5648825698e4edbb56d2c Mon Sep 17 00:00:00 2001
> +From: Daniel Mack <daniel@zonque.org>
> +Date: Tue, 24 Feb 2015 13:26:09 +0100
> +Subject: [PATCH 06/26] shared/time-util: fix gcc5 warning
> +
> +  CC       src/shared/libsystemd_shared_la-time-util.lo
> +src/shared/time-util.c: In function 'parse_nsec':
> +src/shared/time-util.c:789:25: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
> +                 if (!*s != 0)
> +                         ^
> +
> +(cherry picked from commit 8e8933ca0f06bae19cb6db601e83b33f8ac80f2a)
> +---
> + src/shared/time-util.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/shared/time-util.c b/src/shared/time-util.c
> +index 947ac1f..1c36c57 100644
> +--- a/src/shared/time-util.c
> ++++ b/src/shared/time-util.c
> +@@ -786,7 +786,7 @@ int parse_nsec(const char *t, nsec_t *nsec) {
> +         s = startswith(p, "infinity");
> +         if (s) {
> +                 s += strspn(s, WHITESPACE);
> +-                if (!*s != 0)
> ++                if (*s != 0)
> +                         return -EINVAL;
> + 
> +                 *nsec = NSEC_INFINITY;
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0007-test-time-test-infinity-parsing-in-nanoseconds.patch b/meta/recipes-core/systemd/systemd/0007-test-time-test-infinity-parsing-in-nanoseconds.patch
> new file mode 100644
> index 0000000..161b7b5
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0007-test-time-test-infinity-parsing-in-nanoseconds.patch
> @@ -0,0 +1,36 @@
> +From 5248b6bbaf09c74cd152257132cba9358549446a Mon Sep 17 00:00:00 2001
> +From: Daniel Mack <daniel@zonque.org>
> +Date: Tue, 24 Feb 2015 13:27:10 +0100
> +Subject: [PATCH 07/26] test-time: test "infinity" parsing in nanoseconds
> +
> +(cherry picked from commit fdd30a1530810b659345c565e97beef06b7af2fd)
> +---
> + src/test/test-time.c | 6 ++++++
> + 1 file changed, 6 insertions(+)
> +
> +diff --git a/src/test/test-time.c b/src/test/test-time.c
> +index 8cfc4cc..3840fff 100644
> +--- a/src/test/test-time.c
> ++++ b/src/test/test-time.c
> +@@ -78,12 +78,18 @@ static void test_parse_nsec(void) {
> +         assert_se(u == 2);
> +         assert_se(parse_nsec(".7", &u) >= 0);
> +         assert_se(u == 0);
> ++        assert_se(parse_nsec("infinity", &u) >= 0);
> ++        assert_se(u == NSEC_INFINITY);
> ++        assert_se(parse_nsec(" infinity ", &u) >= 0);
> ++        assert_se(u == NSEC_INFINITY);
> + 
> +         assert_se(parse_nsec(" xyz ", &u) < 0);
> +         assert_se(parse_nsec("", &u) < 0);
> +         assert_se(parse_nsec(" . ", &u) < 0);
> +         assert_se(parse_nsec(" 5. ", &u) < 0);
> +         assert_se(parse_nsec(".s ", &u) < 0);
> ++        assert_se(parse_nsec(" infinity .7", &u) < 0);
> ++        assert_se(parse_nsec(".3 infinity", &u) < 0);
> + }
> + 
> + static void test_format_timespan_one(usec_t x, usec_t accuracy) {
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0008-bootchart-fix-default-init-path.patch b/meta/recipes-core/systemd/systemd/0008-bootchart-fix-default-init-path.patch
> new file mode 100644
> index 0000000..7eaad1e
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0008-bootchart-fix-default-init-path.patch
> @@ -0,0 +1,44 @@
> +From 588e3fe64330854d44f09b376a132c6384ac2499 Mon Sep 17 00:00:00 2001
> +From: Martin Pitt <martin.pitt@ubuntu.com>
> +Date: Tue, 24 Feb 2015 14:30:10 +0100
> +Subject: [PATCH 08/26] bootchart: fix default init path
> +
> +Commit 6e1bf7ab99 used the wrong directory; we need rootlibexecdir, not
> +rootlibdir, as the latter is something like /lib/x86_64-linux-gnu/ on
> +multi-arch systems.
> +
> +https://launchpad.net/bugs/1423867
> +(cherry picked from commit a804d849b3c2199bc25d1d4e65fc119fa4d7d0e2)
> +---
> + Makefile.am               | 1 +
> + src/bootchart/bootchart.c | 2 +-
> + 2 files changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/Makefile.am b/Makefile.am
> +index bf04d31..cc577ce 100644
> +--- a/Makefile.am
> ++++ b/Makefile.am
> +@@ -198,6 +198,7 @@ AM_CPPFLAGS = \
> + 	-DKEXEC=\"$(KEXEC)\" \
> + 	-DLIBDIR=\"$(libdir)\" \
> + 	-DROOTLIBDIR=\"$(rootlibdir)\" \
> ++	-DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
> + 	-DTEST_DIR=\"$(abs_top_srcdir)/test\" \
> + 	-I $(top_srcdir)/src \
> + 	-I $(top_builddir)/src/shared \
> +diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c
> +index 64a384b..175be68 100644
> +--- a/src/bootchart/bootchart.c
> ++++ b/src/bootchart/bootchart.c
> +@@ -76,7 +76,7 @@ int sysfd=-1;
> + #define DEFAULT_HZ 25.0
> + #define DEFAULT_SCALE_X 100.0 /* 100px = 1sec */
> + #define DEFAULT_SCALE_Y 20.0  /* 16px = 1 process bar */
> +-#define DEFAULT_INIT ROOTLIBDIR "/systemd/systemd"
> ++#define DEFAULT_INIT ROOTLIBEXECDIR "/systemd"
> + #define DEFAULT_OUTPUT "/run/log"
> + 
> + /* graph defaults */
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0009-systemctl-bump-NOFILE-only-for-systemctl_main.patch b/meta/recipes-core/systemd/systemd/0009-systemctl-bump-NOFILE-only-for-systemctl_main.patch
> new file mode 100644
> index 0000000..dbffa5b
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0009-systemctl-bump-NOFILE-only-for-systemctl_main.patch
> @@ -0,0 +1,44 @@
> +From 1df0ddca3ae405537ceb87eccdb76324f276706f Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
> +Date: Tue, 24 Feb 2015 10:10:04 -0500
> +Subject: [PATCH 09/26] systemctl: bump NOFILE only for systemctl_main
> +
> +It is not necessary when running as telinit, etc.
> +
> +https://bugzilla.redhat.com/show_bug.cgi?id=1184712
> +(cherry picked from commit 95d383ee47db488f182048cfd6846f2e6b859f2b)
> +---
> + src/systemctl/systemctl.c | 10 +++++-----
> + 1 file changed, 5 insertions(+), 5 deletions(-)
> +
> +diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
> +index 21cb898..6b93ec8 100644
> +--- a/src/systemctl/systemctl.c
> ++++ b/src/systemctl/systemctl.c
> +@@ -7204,6 +7204,11 @@ found:
> +                 }
> +         }
> + 
> ++        /* Increase max number of open files to 16K if we can, we
> ++         * might needs this when browsing journal files, which might
> ++         * be split up into many files. */
> ++        setrlimit_closest(RLIMIT_NOFILE, &RLIMIT_MAKE_CONST(16384));
> ++
> +         return verb->dispatch(bus, argv + optind);
> + }
> + 
> +@@ -7453,11 +7458,6 @@ int main(int argc, char*argv[]) {
> +                 goto finish;
> +         }
> + 
> +-        /* Increase max number of open files to 16K if we can, we
> +-         * might needs this when browsing journal files, which might
> +-         * be split up into many files. */
> +-        setrlimit_closest(RLIMIT_NOFILE, &RLIMIT_MAKE_CONST(16384));
> +-
> +         if (!avoid_bus())
> +                 r = bus_open_transport_systemd(arg_transport, arg_host, arg_scope != UNIT_FILE_SYSTEM, &bus);
> + 
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch b/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch
> index 41b9039..ff2871b 100644
> --- a/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch
> +++ b/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch
> @@ -1,7 +1,7 @@
> -From 3dc731c1d270e2e143de621db9bd898299fd849d Mon Sep 17 00:00:00 2001
> -From: Khem Raj <raj.khem@gmail.com>
> -Date: Fri, 20 Feb 2015 05:24:49 +0000
> -Subject: [PATCH 10/11] Make root's home directory configurable
> +From dd843247b6c769a3983462f7e616dc43226974a0 Mon Sep 17 00:00:00 2001
> +From: Bruno Bottazzini <bruno.bottazzini@intel.com>
> +Date: Thu, 5 Mar 2015 17:38:12 -0300
> +Subject: [PATCH] Make root's home directory configurable
>  
>  OpenEmbedded has a configurable home directory for root. Allow
>  systemd to be built using its idea of what root's home directory
> @@ -9,32 +9,31 @@ should be.
>  
>  Upstream-Status: Pending
>  
> -Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
> -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +Patch made by Khem Raj <raj.khem@gmail.com> updated to be
> +compatbile with systemd 219-stable
>  ---
> - Makefile.am                       | 2 ++
> - configure.ac                      | 7 +++++++
> - src/core/unit-printf.c            | 2 +-
> - src/nspawn/nspawn.c               | 4 ++--
> - src/shared/util.c                 | 4 ++--
> - units/console-shell.service.m4.in | 4 ++--
> - units/emergency.service.in        | 4 ++--
> - units/rescue.service.in           | 4 ++--
> - 8 files changed, 20 insertions(+), 11 deletions(-)
> + Makefile.am                | 2 ++
> + configure.ac               | 7 +++++++
> + src/core/unit-printf.c     | 2 +-
> + src/nspawn/nspawn.c        | 5 ++---
> + src/shared/util.c          | 4 ++--
> + units/emergency.service.in | 4 ++--
> + units/rescue.service.in    | 4 ++--
> + 7 files changed, 18 insertions(+), 10 deletions(-)
>  
>  diff --git a/Makefile.am b/Makefile.am
> -index 0fb3f9f..4623963 100644
> +index 93c0509..31ea94d 100644
>  --- a/Makefile.am
>  +++ b/Makefile.am
> -@@ -199,6 +199,7 @@ AM_CPPFLAGS = \
> - 	-DKEXEC=\"$(KEXEC)\" \
> - 	-DLIBDIR=\"$(libdir)\" \
> +@@ -201,6 +201,7 @@ AM_CPPFLAGS = \
>   	-DROOTLIBDIR=\"$(rootlibdir)\" \
> -+	-DROOTHOMEDIR=\"$(roothomedir)\" \
> + 	-DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
>   	-DTEST_DIR=\"$(abs_top_srcdir)/test\" \
> ++	-DROOTHOMEDIR=\"$(roothomedir)\" \
>   	-I $(top_srcdir)/src \
>   	-I $(top_builddir)/src/shared \
> -@@ -6342,6 +6343,7 @@ EXTRA_DIST += \
> + 	-I $(top_srcdir)/src/shared \
> +@@ -6350,6 +6351,7 @@ EXTRA_DIST += \
>   substitutions = \
>          '|rootlibexecdir=$(rootlibexecdir)|' \
>          '|rootbindir=$(rootbindir)|' \
> @@ -43,10 +42,10 @@ index 0fb3f9f..4623963 100644
>          '|SYSTEMCTL=$(rootbindir)/systemctl|' \
>          '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
>  diff --git a/configure.ac b/configure.ac
> -index a5b2e6e..55bb7d8 100644
> +index 01ee8dc..800a587 100644
>  --- a/configure.ac
>  +++ b/configure.ac
> -@@ -1428,6 +1428,11 @@ AC_ARG_WITH([rootlibdir],
> +@@ -1410,6 +1410,11 @@ AC_ARG_WITH([rootlibdir],
>           [],
>           [with_rootlibdir=${libdir}])
>   
> @@ -58,7 +57,7 @@ index a5b2e6e..55bb7d8 100644
>   AC_ARG_WITH([pamlibdir],
>           AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
>           [],
> -@@ -1518,6 +1523,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
> +@@ -1500,6 +1505,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
>   AC_SUBST([pamconfdir], [$with_pamconfdir])
>   AC_SUBST([rootprefix], [$with_rootprefix])
>   AC_SUBST([rootlibdir], [$with_rootlibdir])
> @@ -66,7 +65,7 @@ index a5b2e6e..55bb7d8 100644
>   
>   AC_CONFIG_FILES([
>           Makefile po/Makefile.in
> -@@ -1617,6 +1623,7 @@ AC_MSG_RESULT([
> +@@ -1599,6 +1605,7 @@ AC_MSG_RESULT([
>           include_prefix:          ${INCLUDE_PREFIX}
>           lib dir:                 ${libdir}
>           rootlib dir:             ${with_rootlibdir}
> @@ -75,10 +74,10 @@ index a5b2e6e..55bb7d8 100644
>           SysV rc?.d directories:  ${SYSTEM_SYSVRCND_PATH}
>           Build Python:            ${PYTHON}
>  diff --git a/src/core/unit-printf.c b/src/core/unit-printf.c
> -index 97135db..14d12f1 100644
> +index 7736899..ac5f008 100644
>  --- a/src/core/unit-printf.c
>  +++ b/src/core/unit-printf.c
> -@@ -259,7 +259,7 @@ static int specifier_user_home(char specifier, void *data, void *userdata, char
> +@@ -256,7 +256,7 @@ static int specifier_user_home(char specifier, void *data, void *userdata, char
>                    * best of it if we can, but fail if we can't */
>   
>                   if (!c->user || streq(c->user, "root") || streq(c->user, "0"))
> @@ -88,21 +87,22 @@ index 97135db..14d12f1 100644
>                           return -ENOTSUP;
>   
>  diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
> -index b597edb..0b32673 100644
> +index 08bfdcf..b44b4cd 100644
>  --- a/src/nspawn/nspawn.c
>  +++ b/src/nspawn/nspawn.c
> -@@ -4192,7 +4192,7 @@ int main(int argc, char *argv[]) {
> +@@ -4180,8 +4180,7 @@ int main(int argc, char *argv[]) {
> +                         r = change_uid_gid(&home);
>                           if (r < 0)
>                                   _exit(EXIT_FAILURE);
> - 
> +-
>  -                        if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) ||
>  +                        if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) ||
>                               (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) ||
>                               (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0)) {
>                                   log_oom();
> -@@ -4266,7 +4266,7 @@ int main(int argc, char *argv[]) {
> -                                 execvp(argv[optind], argv + optind);
> - #endif /* HAVE_EXECVPE */
> +@@ -4250,7 +4249,7 @@ int main(int argc, char *argv[]) {
> +                         } else if (argc > optind)
> +                                 execvpe(argv[optind], argv + optind, env_use);
>                           else {
>  -                                chdir(home ? home : "/root");
>  +                                chdir(home ? home : ROOTHOMEDIR);
> @@ -110,10 +110,10 @@ index b597edb..0b32673 100644
>                                   execle("/bin/sh", "-sh", NULL, env_use);
>                           }
>  diff --git a/src/shared/util.c b/src/shared/util.c
> -index cbbe3b1..a0e3cc5 100644
> +index 241e752..00adab6 100644
>  --- a/src/shared/util.c
>  +++ b/src/shared/util.c
> -@@ -4609,7 +4609,7 @@ int get_user_creds(
> +@@ -4604,7 +4604,7 @@ int get_user_creds(
>                           *gid = 0;
>   
>                   if (home)
> @@ -122,7 +122,7 @@ index cbbe3b1..a0e3cc5 100644
>   
>                   if (shell)
>                           *shell = "/bin/sh";
> -@@ -5611,7 +5611,7 @@ int get_home_dir(char **_h) {
> +@@ -5606,7 +5606,7 @@ int get_home_dir(char **_h) {
>           /* Hardcode home directory for root to avoid NSS */
>           u = getuid();
>           if (u == 0) {
> @@ -131,21 +131,6 @@ index cbbe3b1..a0e3cc5 100644
>                   if (!h)
>                           return -ENOMEM;
>   
> -diff --git a/units/console-shell.service.m4.in b/units/console-shell.service.m4.in
> -index 5c80722..efde5f0 100644
> ---- a/units/console-shell.service.m4.in
> -+++ b/units/console-shell.service.m4.in
> -@@ -15,8 +15,8 @@ After=rc-local.service
> - Before=getty.target
> - 
> - [Service]
> --Environment=HOME=/root
> --WorkingDirectory=/root
> -+Environment=HOME=@roothomedir@
> -+WorkingDirectory=@roothomedir@
> - ExecStart=-@SULOGIN@
> - ExecStopPost=-@SYSTEMCTL@ poweroff
> - Type=idle
>  diff --git a/units/emergency.service.in b/units/emergency.service.in
>  index 2695d7b..7f47b73 100644
>  --- a/units/emergency.service.in
> @@ -177,5 +162,5 @@ index de73fee..47f3593 100644
>   ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.'
>   ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --fail --no-block default"
>  -- 
> -2.1.4
> +1.9.1
>  
> diff --git a/meta/recipes-core/systemd/systemd/0010-acl-util-avoid-freeing-uninitialized-pointer.patch b/meta/recipes-core/systemd/systemd/0010-acl-util-avoid-freeing-uninitialized-pointer.patch
> new file mode 100644
> index 0000000..1e4a69d
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0010-acl-util-avoid-freeing-uninitialized-pointer.patch
> @@ -0,0 +1,37 @@
> +From f17b6474aaca077482a68aedc1de9d654ab21bad Mon Sep 17 00:00:00 2001
> +From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
> +Date: Tue, 24 Feb 2015 20:40:07 +0100
> +Subject: [PATCH 10/26] acl-util: avoid freeing uninitialized pointer
> +
> +CID#1271344/1271345
> +
> +(cherry picked from commit 76dcbc4992e895a377aad26f8c4a0dcd71002396)
> +---
> + src/shared/acl-util.c | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/src/shared/acl-util.c b/src/shared/acl-util.c
> +index cbe09d7..e67e9ac 100644
> +--- a/src/shared/acl-util.c
> ++++ b/src/shared/acl-util.c
> +@@ -302,7 +302,7 @@ static int acl_entry_equal(acl_entry_t a, acl_entry_t b) {
> +                 /* can have only one of those */
> +                 return true;
> +         case ACL_USER: {
> +-                _cleanup_(acl_free_uid_tpp) uid_t *uid_a, *uid_b;
> ++                _cleanup_(acl_free_uid_tpp) uid_t *uid_a = NULL, *uid_b = NULL;
> + 
> +                 uid_a = acl_get_qualifier(a);
> +                 if (!uid_a)
> +@@ -315,7 +315,7 @@ static int acl_entry_equal(acl_entry_t a, acl_entry_t b) {
> +                 return *uid_a == *uid_b;
> +         }
> +         case ACL_GROUP: {
> +-                _cleanup_(acl_free_gid_tpp) gid_t *gid_a, *gid_b;
> ++                _cleanup_(acl_free_gid_tpp) gid_t *gid_a = NULL, *gid_b = NULL;
> + 
> +                 gid_a = acl_get_qualifier(a);
> +                 if (!gid_a)
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0011-bootchart-svg-fix-checking-of-list-end.patch b/meta/recipes-core/systemd/systemd/0011-bootchart-svg-fix-checking-of-list-end.patch
> new file mode 100644
> index 0000000..dca5e20
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0011-bootchart-svg-fix-checking-of-list-end.patch
> @@ -0,0 +1,28 @@
> +From 668529dde3ecf35e24f39eaf3a3044099e4d5273 Mon Sep 17 00:00:00 2001
> +From: Aaro Koskinen <aaro.koskinen@nokia.com>
> +Date: Tue, 24 Feb 2015 18:32:31 +0200
> +Subject: [PATCH 11/26] bootchart: svg: fix checking of list end
> +
> +If we have less samples than expected, systemd-bootchart will crash.
> +
> +(cherry picked from commit c1682f17a0c966988e865c649e565dae41abf32d)
> +---
> + src/bootchart/svg.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
> +index e111fa9..144177c 100644
> +--- a/src/bootchart/svg.c
> ++++ b/src/bootchart/svg.c
> +@@ -1170,7 +1170,7 @@ static void svg_ps_bars(void) {
> + 
> +                 ps->sample = ps->sample->next;
> +                 sample_hz = ps->sample;
> +-                for (ii=0;((ii<(int)arg_hz/2)&&(ps->sample->next));ii++)
> ++                for (ii=0;((ii<(int)arg_hz/2)&&(sample_hz->next));ii++)
> +                         sample_hz = sample_hz->next;
> + 
> +                 /* subtract bootchart cpu utilization from total */
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0012-systemd-add-getrandom-syscall-numbers-for-MIPS.patch b/meta/recipes-core/systemd/systemd/0012-systemd-add-getrandom-syscall-numbers-for-MIPS.patch
> new file mode 100644
> index 0000000..e0cb193
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0012-systemd-add-getrandom-syscall-numbers-for-MIPS.patch
> @@ -0,0 +1,38 @@
> +From 5b49f6072e901336680708267c3d48a54c5410ae Mon Sep 17 00:00:00 2001
> +From: Aaro Koskinen <aaro.koskinen@nokia.com>
> +Date: Mon, 23 Feb 2015 16:01:31 +0200
> +Subject: [PATCH 12/26] systemd: add getrandom syscall numbers for MIPS
> +
> +Add getrandom syscall numbers for MIPS. Based on Linux 3.17 kernel
> +(commit 42944521af97a3b25516f15f3149aec3779656dc, "MIPS: Wire up new
> +syscalls getrandom and memfd_create").
> +
> +(cherry picked from commit 3bec6d4690d2a7f08dc27b8221299c1db94978c4)
> +---
> + src/shared/missing.h | 10 ++++++++++
> + 1 file changed, 10 insertions(+)
> +
> +diff --git a/src/shared/missing.h b/src/shared/missing.h
> +index b33a70c..e72631e 100644
> +--- a/src/shared/missing.h
> ++++ b/src/shared/missing.h
> +@@ -179,6 +179,16 @@ static inline int memfd_create(const char *name, unsigned int flags) {
> + #    define __NR_getrandom 349
> + #  elif defined(__powerpc__)
> + #    define __NR_getrandom 359
> ++#  elif defined _MIPS_SIM
> ++#    if _MIPS_SIM == _MIPS_SIM_ABI32
> ++#      define __NR_getrandom 4353
> ++#    endif
> ++#    if _MIPS_SIM == _MIPS_SIM_NABI32
> ++#      define __NR_getrandom 6317
> ++#    endif
> ++#    if _MIPS_SIM == _MIPS_SIM_ABI64
> ++#      define __NR_getrandom 5313
> ++#    endif
> + #  else
> + #    warning "__NR_getrandom unknown for your architecture"
> + #    define __NR_getrandom 0xffffffff
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0013-unit-use-weaker-dependencies-between-mount-and-devic.patch b/meta/recipes-core/systemd/systemd/0013-unit-use-weaker-dependencies-between-mount-and-devic.patch
> new file mode 100644
> index 0000000..1b842a2
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0013-unit-use-weaker-dependencies-between-mount-and-devic.patch
> @@ -0,0 +1,33 @@
> +From fc9805756d5c0088a3a67705bbf6bea30d0d35e5 Mon Sep 17 00:00:00 2001
> +From: Lennart Poettering <lennart@poettering.net>
> +Date: Wed, 25 Feb 2015 22:05:14 +0100
> +Subject: [PATCH 13/26] unit: use weaker dependencies between mount and device
> + units in --user mode
> +
> +When running in user mode unmounting of mount units when a device
> +vanishes is unlikely to work, and even if it would work is already done
> +by PID 1 anyway. HEnce, when creating implicit dependencies between
> +mount units and their backing devices, created a Wants= type dependency
> +in --user mode, but leave a BindsTo= dependency in --system mode.
> +
> +(cherry picked from commit 5bd4b173605142c7be493aa4d958ebaef21f421d)
> +---
> + src/core/unit.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/core/unit.c b/src/core/unit.c
> +index ee8e607..9f1e55e 100644
> +--- a/src/core/unit.c
> ++++ b/src/core/unit.c
> +@@ -2845,7 +2845,7 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) {
> +         if (r < 0)
> +                 return r;
> + 
> +-        r = unit_add_two_dependencies(u, UNIT_AFTER, UNIT_BINDS_TO, device, true);
> ++        r = unit_add_two_dependencies(u, UNIT_AFTER, u->manager->running_as == SYSTEMD_SYSTEM ? UNIT_BINDS_TO : UNIT_WANTS, device, true);
> +         if (r < 0)
> +                 return r;
> + 
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0014-unit-When-stopping-due-to-BindsTo-log-which-unit-cau.patch b/meta/recipes-core/systemd/systemd/0014-unit-When-stopping-due-to-BindsTo-log-which-unit-cau.patch
> new file mode 100644
> index 0000000..92c4b8f
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0014-unit-When-stopping-due-to-BindsTo-log-which-unit-cau.patch
> @@ -0,0 +1,43 @@
> +From ca0cf2741ef9db81141f4444ab58dd3552c8fb1f Mon Sep 17 00:00:00 2001
> +From: Colin Walters <walters@verbum.org>
> +Date: Tue, 17 Feb 2015 13:47:34 -0500
> +Subject: [PATCH 14/26] unit: When stopping due to BindsTo=, log which unit
> + caused it
> +
> +I'm trying to track down a relatively recent change in systemd
> +which broke OSTree; see https://bugzilla.gnome.org/show_bug.cgi?id=743891
> +
> +Systemd started to stop sysroot.mount, and this patch should help
> +me debug why at least.
> +
> +While we're here, "break" on the first unit we find that will
> +deactivate, as there's no point in further iteration.
> +
> +(cherry picked from commit 98f738b62047229af4a929d7996e2ab04253b02c)
> +---
> + src/core/unit.c | 4 +++-
> + 1 file changed, 3 insertions(+), 1 deletion(-)
> +
> +diff --git a/src/core/unit.c b/src/core/unit.c
> +index 9f1e55e..563f6fe 100644
> +--- a/src/core/unit.c
> ++++ b/src/core/unit.c
> +@@ -1648,12 +1648,14 @@ static void unit_check_binds_to(Unit *u) {
> +                         continue;
> + 
> +                 stop = true;
> ++                break;
> +         }
> + 
> +         if (!stop)
> +                 return;
> + 
> +-        log_unit_info(u->id, "Unit %s is bound to inactive unit. Stopping, too.", u->id);
> ++        assert(other);
> ++        log_unit_info(u->id, "Unit %s is bound to inactive unit %s. Stopping, too.", u->id, other->id);
> + 
> +         /* A unit we need to run is gone. Sniff. Let's stop this. */
> +         manager_add_job(u->manager, JOB_STOP, u, JOB_FAIL, true, NULL, NULL);
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0015-sysctl-downgrade-message-about-sysctl-overrides-to-d.patch b/meta/recipes-core/systemd/systemd/0015-sysctl-downgrade-message-about-sysctl-overrides-to-d.patch
> new file mode 100644
> index 0000000..46c25bd
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0015-sysctl-downgrade-message-about-sysctl-overrides-to-d.patch
> @@ -0,0 +1,30 @@
> +From 2439dc6083d27271ee942559f0f73c99fa9e2b4e Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
> +Date: Thu, 26 Feb 2015 19:00:11 -0500
> +Subject: [PATCH 15/26] sysctl: downgrade message about sysctl overrides to
> + debug
> +
> +Printing it at info level was tedious. We don't do that for any other
> +overrides.
> +
> +(cherry picked from commit 7933e4266f8124e3fca71f67757abd44155fa1cb)
> +---
> + src/sysctl/sysctl.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
> +index 275a5b7..2415d84 100644
> +--- a/src/sysctl/sysctl.c
> ++++ b/src/sysctl/sysctl.c
> +@@ -176,7 +176,7 @@ found:
> +                         if (streq(value, existing))
> +                                 continue;
> + 
> +-                        log_info("Overwriting earlier assignment of %s in file '%s'.", p, path);
> ++                        log_debug("Overwriting earlier assignment of %s in file '%s'.", p, path);
> +                         free(hashmap_remove(sysctl_options, p));
> +                         free(v);
> +                 }
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0016-sysctl-add-some-hints-how-to-override-settings.patch b/meta/recipes-core/systemd/systemd/0016-sysctl-add-some-hints-how-to-override-settings.patch
> new file mode 100644
> index 0000000..87dce1f
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0016-sysctl-add-some-hints-how-to-override-settings.patch
> @@ -0,0 +1,39 @@
> +From af6a96a36415400482ad504392ea93c6a0e2ed43 Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
> +Date: Thu, 26 Feb 2015 19:05:51 -0500
> +Subject: [PATCH 16/26] sysctl: add some hints how to override settings
> +
> +Also a link to decent documentation for sysrq keys. It is surprising
> +hard to find.
> +
> +https://lists.fedoraproject.org/pipermail/devel/2015-February/208412.html
> +(cherry picked from commit 16b65d7f463e91f6299dfa7b83d4b5fbeb109d1c)
> +---
> + sysctl.d/50-default.conf | 9 ++++++++-
> + 1 file changed, 8 insertions(+), 1 deletion(-)
> +
> +diff --git a/sysctl.d/50-default.conf b/sysctl.d/50-default.conf
> +index f189233..def151b 100644
> +--- a/sysctl.d/50-default.conf
> ++++ b/sysctl.d/50-default.conf
> +@@ -5,9 +5,16 @@
> + #  the Free Software Foundation; either version 2.1 of the License, or
> + #  (at your option) any later version.
> + 
> +-# See sysctl.d(5) and core(5) for for details.
> ++# See sysctl.d(5) and core(5) for for documentation.
> ++
> ++# To override settings in this file, create a local file in /etc
> ++# (e.g. /etc/sysctl.d/90-override.conf), and put any assignments
> ++# there.
> + 
> + # System Request functionality of the kernel (SYNC)
> ++#
> ++# Use kernel.sysrq = 1 to allow all keys.
> ++# See http://fedoraproject.org/wiki/QA/Sysrq for a list of values and keys.
> + kernel.sysrq = 16
> + 
> + # Append the PID to the core filename
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0017-core-rework-device-state-logic.patch b/meta/recipes-core/systemd/systemd/0017-core-rework-device-state-logic.patch
> new file mode 100644
> index 0000000..a3ab3e4
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0017-core-rework-device-state-logic.patch
> @@ -0,0 +1,912 @@
> +From 5b788e932fe918fb022bc20c3a15eb59e0fad53a Mon Sep 17 00:00:00 2001
> +From: Lennart Poettering <lennart@poettering.net>
> +Date: Fri, 27 Feb 2015 21:55:08 +0100
> +Subject: [PATCH 17/26] core: rework device state logic
> +
> +This change introduces a new state "tentative" for device units. Device
> +units are considered "plugged" when udev announced them, "dead" when
> +they are not available in the kernel, and "tentative" when they are
> +referenced in /proc/self/mountinfo or /proc/swaps but not (yet)
> +announced via udev.
> +
> +This should fix a race when device nodes (like loop devices) are created
> +and immediately mounted. Previously, systemd might end up seeing the
> +mount unit before the device, and would thus pull down the mount because
> +its BindTo dependency on the device would not be fulfilled.
> +
> +(cherry picked from commit 628c89cc68ab96fce2de7ebba5933725d147aecc)
> +---
> + src/core/device.c | 368 +++++++++++++++++++++++++++++++++---------------------
> + src/core/device.h |  14 ++-
> + src/core/mount.c  |  46 ++++---
> + src/core/swap.c   |  32 +++--
> + src/core/swap.h   |   4 +-
> + src/core/unit.c   |   1 -
> + 6 files changed, 285 insertions(+), 180 deletions(-)
> +
> +diff --git a/src/core/device.c b/src/core/device.c
> +index d3deac3..75b9a46 100644
> +--- a/src/core/device.c
> ++++ b/src/core/device.c
> +@@ -36,7 +36,8 @@
> + 
> + static const UnitActiveState state_translation_table[_DEVICE_STATE_MAX] = {
> +         [DEVICE_DEAD] = UNIT_INACTIVE,
> +-        [DEVICE_PLUGGED] = UNIT_ACTIVE
> ++        [DEVICE_TENTATIVE] = UNIT_ACTIVATING,
> ++        [DEVICE_PLUGGED] = UNIT_ACTIVE,
> + };
> + 
> + static int device_dispatch_io(sd_event_source *source, int fd, uint32_t revents, void *userdata);
> +@@ -65,6 +66,41 @@ static void device_unset_sysfs(Device *d) {
> +         d->sysfs = NULL;
> + }
> + 
> ++static int device_set_sysfs(Device *d, const char *sysfs) {
> ++        Device *first;
> ++        char *copy;
> ++        int r;
> ++
> ++        assert(d);
> ++
> ++        if (streq_ptr(d->sysfs, sysfs))
> ++                return 0;
> ++
> ++        r = hashmap_ensure_allocated(&UNIT(d)->manager->devices_by_sysfs, &string_hash_ops);
> ++        if (r < 0)
> ++                return r;
> ++
> ++        copy = strdup(sysfs);
> ++        if (!copy)
> ++                return -ENOMEM;
> ++
> ++        device_unset_sysfs(d);
> ++
> ++        first = hashmap_get(UNIT(d)->manager->devices_by_sysfs, sysfs);
> ++        LIST_PREPEND(same_sysfs, first, d);
> ++
> ++        r = hashmap_replace(UNIT(d)->manager->devices_by_sysfs, copy, first);
> ++        if (r < 0) {
> ++                LIST_REMOVE(same_sysfs, first, d);
> ++                free(copy);
> ++                return r;
> ++        }
> ++
> ++        d->sysfs = copy;
> ++
> ++        return 0;
> ++}
> ++
> + static void device_init(Unit *u) {
> +         Device *d = DEVICE(u);
> + 
> +@@ -112,8 +148,13 @@ static int device_coldplug(Unit *u) {
> +         assert(d);
> +         assert(d->state == DEVICE_DEAD);
> + 
> +-        if (d->sysfs)
> ++        if (d->found & DEVICE_FOUND_UDEV)
> ++                /* If udev says the device is around, it's around */
> +                 device_set_state(d, DEVICE_PLUGGED);
> ++        else if (d->found != DEVICE_NOT_FOUND)
> ++                /* If a device is found in /proc/self/mountinfo or
> ++                 * /proc/swaps, it's "tentatively" around. */
> ++                device_set_state(d, DEVICE_TENTATIVE);
> + 
> +         return 0;
> + }
> +@@ -142,49 +183,9 @@ _pure_ static const char *device_sub_state_to_string(Unit *u) {
> +         return device_state_to_string(DEVICE(u)->state);
> + }
> + 
> +-static int device_add_escaped_name(Unit *u, const char *dn) {
> +-        _cleanup_free_ char *e = NULL;
> +-        int r;
> +-
> +-        assert(u);
> +-        assert(dn);
> +-        assert(dn[0] == '/');
> +-
> +-        e = unit_name_from_path(dn, ".device");
> +-        if (!e)
> +-                return -ENOMEM;
> +-
> +-        r = unit_add_name(u, e);
> +-        if (r < 0 && r != -EEXIST)
> +-                return r;
> +-
> +-        return 0;
> +-}
> +-
> +-static int device_find_escape_name(Manager *m, const char *dn, Unit **_u) {
> +-        _cleanup_free_ char *e = NULL;
> +-        Unit *u;
> +-
> +-        assert(m);
> +-        assert(dn);
> +-        assert(dn[0] == '/');
> +-        assert(_u);
> +-
> +-        e = unit_name_from_path(dn, ".device");
> +-        if (!e)
> +-                return -ENOMEM;
> +-
> +-        u = manager_get_unit(m, e);
> +-        if (u) {
> +-                *_u = u;
> +-                return 1;
> +-        }
> +-
> +-        return 0;
> +-}
> +-
> +-static int device_make_description(Unit *u, struct udev_device *dev, const char *path) {
> ++static int device_update_description(Unit *u, struct udev_device *dev, const char *path) {
> +         const char *model;
> ++        int r;
> + 
> +         assert(u);
> +         assert(dev);
> +@@ -209,13 +210,16 @@ static int device_make_description(Unit *u, struct udev_device *dev, const char
> + 
> +                         j = strjoin(model, " ", label, NULL);
> +                         if (j)
> +-                                return unit_set_description(u, j);
> +-                }
> ++                                r = unit_set_description(u, j);
> ++                } else
> ++                        r = unit_set_description(u, model);
> ++        } else
> ++                r = unit_set_description(u, path);
> + 
> +-                return unit_set_description(u, model);
> +-        }
> ++        if (r < 0)
> ++                log_unit_error_errno(u->id, r, "Failed to set device description: %m");
> + 
> +-        return unit_set_description(u, path);
> ++        return r;
> + }
> + 
> + static int device_add_udev_wants(Unit *u, struct udev_device *dev) {
> +@@ -242,20 +246,20 @@ static int device_add_udev_wants(Unit *u, struct udev_device *dev) {
> + 
> +                 n = unit_name_mangle(e, MANGLE_NOGLOB);
> +                 if (!n)
> +-                        return -ENOMEM;
> ++                        return log_oom();
> + 
> +                 r = unit_add_dependency_by_name(u, UNIT_WANTS, n, NULL, true);
> +                 if (r < 0)
> +-                        return r;
> ++                        return log_unit_error_errno(u->id, r, "Failed to add wants dependency: %m");
> +         }
> +         if (!isempty(state))
> +-                log_unit_warning(u->id, "Property %s on %s has trailing garbage, ignoring.",
> +-                                 property, strna(udev_device_get_syspath(dev)));
> ++                log_unit_warning(u->id, "Property %s on %s has trailing garbage, ignoring.", property, strna(udev_device_get_syspath(dev)));
> + 
> +         return 0;
> + }
> + 
> +-static int device_update_unit(Manager *m, struct udev_device *dev, const char *path, bool main) {
> ++static int device_setup_unit(Manager *m, struct udev_device *dev, const char *path, bool main) {
> ++        _cleanup_free_ char *e = NULL;
> +         const char *sysfs;
> +         Unit *u = NULL;
> +         bool delete;
> +@@ -269,12 +273,18 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
> +         if (!sysfs)
> +                 return 0;
> + 
> +-        r = device_find_escape_name(m, path, &u);
> +-        if (r < 0)
> +-                return r;
> ++        e = unit_name_from_path(path, ".device");
> ++        if (!e)
> ++                return log_oom();
> ++
> ++        u = manager_get_unit(m, e);
> + 
> +-        if (u && DEVICE(u)->sysfs && !path_equal(DEVICE(u)->sysfs, sysfs))
> ++        if (u &&
> ++            DEVICE(u)->sysfs &&
> ++            !path_equal(DEVICE(u)->sysfs, sysfs)) {
> ++                log_unit_error(u->id, "Device %s appeared twice with different sysfs paths %s and %s", e, DEVICE(u)->sysfs, sysfs);
> +                 return -EEXIST;
> ++        }
> + 
> +         if (!u) {
> +                 delete = true;
> +@@ -283,7 +293,7 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
> +                 if (!u)
> +                         return log_oom();
> + 
> +-                r = device_add_escaped_name(u, path);
> ++                r = unit_add_name(u, e);
> +                 if (r < 0)
> +                         goto fail;
> + 
> +@@ -295,37 +305,16 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
> +          * actually been seen yet ->sysfs will not be
> +          * initialized. Hence initialize it if necessary. */
> + 
> +-        if (!DEVICE(u)->sysfs) {
> +-                Device *first;
> +-
> +-                DEVICE(u)->sysfs = strdup(sysfs);
> +-                if (!DEVICE(u)->sysfs) {
> +-                        r = -ENOMEM;
> +-                        goto fail;
> +-                }
> +-
> +-                r = hashmap_ensure_allocated(&m->devices_by_sysfs, &string_hash_ops);
> +-                if (r < 0)
> +-                        goto fail;
> +-
> +-                first = hashmap_get(m->devices_by_sysfs, sysfs);
> +-                LIST_PREPEND(same_sysfs, first, DEVICE(u));
> +-
> +-                r = hashmap_replace(m->devices_by_sysfs, DEVICE(u)->sysfs, first);
> +-                if (r < 0)
> +-                        goto fail;
> +-        }
> +-
> +-        device_make_description(u, dev, path);
> ++        r = device_set_sysfs(DEVICE(u), sysfs);
> ++        if (r < 0)
> ++                goto fail;
> + 
> +-        if (main) {
> +-                /* The additional systemd udev properties we only
> +-                 * interpret for the main object */
> ++        (void) device_update_description(u, dev, path);
> + 
> +-                r = device_add_udev_wants(u, dev);
> +-                if (r < 0)
> +-                        goto fail;
> +-        }
> ++        /* The additional systemd udev properties we only interpret
> ++         * for the main object */
> ++        if (main)
> ++                (void) device_add_udev_wants(u, dev);
> + 
> +         /* Note that this won't dispatch the load queue, the caller
> +          * has to do that if needed and appropriate */
> +@@ -334,7 +323,7 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
> +         return 0;
> + 
> + fail:
> +-        log_warning_errno(r, "Failed to load device unit: %m");
> ++        log_unit_warning_errno(u->id, r, "Failed to set up device unit: %m");
> + 
> +         if (delete && u)
> +                 unit_free(u);
> +@@ -342,7 +331,7 @@ fail:
> +         return r;
> + }
> + 
> +-static int device_process_new_device(Manager *m, struct udev_device *dev) {
> ++static int device_process_new(Manager *m, struct udev_device *dev) {
> +         const char *sysfs, *dn, *alias;
> +         struct udev_list_entry *item = NULL, *first = NULL;
> +         int r;
> +@@ -354,14 +343,14 @@ static int device_process_new_device(Manager *m, struct udev_device *dev) {
> +                 return 0;
> + 
> +         /* Add the main unit named after the sysfs path */
> +-        r = device_update_unit(m, dev, sysfs, true);
> ++        r = device_setup_unit(m, dev, sysfs, true);
> +         if (r < 0)
> +                 return r;
> + 
> +         /* Add an additional unit for the device node */
> +         dn = udev_device_get_devnode(dev);
> +         if (dn)
> +-                device_update_unit(m, dev, dn, false);
> ++                (void) device_setup_unit(m, dev, dn, false);
> + 
> +         /* Add additional units for all symlinks */
> +         first = udev_device_get_devlinks_list_entry(dev);
> +@@ -388,7 +377,7 @@ static int device_process_new_device(Manager *m, struct udev_device *dev) {
> +                             st.st_rdev != udev_device_get_devnum(dev))
> +                                 continue;
> + 
> +-                device_update_unit(m, dev, p, false);
> ++                (void) device_setup_unit(m, dev, p, false);
> +         }
> + 
> +         /* Add additional units for all explicitly configured
> +@@ -405,7 +394,7 @@ static int device_process_new_device(Manager *m, struct udev_device *dev) {
> +                         e[l] = 0;
> + 
> +                         if (path_is_absolute(e))
> +-                                device_update_unit(m, dev, e, false);
> ++                                (void) device_setup_unit(m, dev, e, false);
> +                         else
> +                                 log_warning("SYSTEMD_ALIAS for %s is not an absolute path, ignoring: %s", sysfs, e);
> +                 }
> +@@ -416,39 +405,62 @@ static int device_process_new_device(Manager *m, struct udev_device *dev) {
> +         return 0;
> + }
> + 
> +-static void device_set_path_plugged(Manager *m, struct udev_device *dev) {
> +-        const char *sysfs;
> ++static void device_update_found_one(Device *d, bool add, DeviceFound found, bool now) {
> ++        DeviceFound n;
> ++
> ++        assert(d);
> ++
> ++        n = add ? (d->found | found) : (d->found & ~found);
> ++        if (n == d->found)
> ++                return;
> ++
> ++        d->found = n;
> ++
> ++        if (now) {
> ++                if (d->found & DEVICE_FOUND_UDEV)
> ++                        device_set_state(d, DEVICE_PLUGGED);
> ++                else if (d->found != DEVICE_NOT_FOUND)
> ++                        device_set_state(d, DEVICE_TENTATIVE);
> ++                else
> ++                        device_set_state(d, DEVICE_DEAD);
> ++        }
> ++}
> ++
> ++static int device_update_found_by_sysfs(Manager *m, const char *sysfs, bool add, DeviceFound found, bool now) {
> +         Device *d, *l;
> + 
> +         assert(m);
> +-        assert(dev);
> ++        assert(sysfs);
> + 
> +-        sysfs = udev_device_get_syspath(dev);
> +-        if (!sysfs)
> +-                return;
> ++        if (found == DEVICE_NOT_FOUND)
> ++                return 0;
> + 
> +         l = hashmap_get(m->devices_by_sysfs, sysfs);
> +         LIST_FOREACH(same_sysfs, d, l)
> +-                device_set_state(d, DEVICE_PLUGGED);
> ++                device_update_found_one(d, add, found, now);
> ++
> ++        return 0;
> + }
> + 
> +-static int device_process_removed_device(Manager *m, struct udev_device *dev) {
> +-        const char *sysfs;
> +-        Device *d;
> ++static int device_update_found_by_name(Manager *m, const char *path, bool add, DeviceFound found, bool now) {
> ++        _cleanup_free_ char *e = NULL;
> ++        Unit *u;
> + 
> +         assert(m);
> +-        assert(dev);
> ++        assert(path);
> + 
> +-        sysfs = udev_device_get_syspath(dev);
> +-        if (!sysfs)
> +-                return -ENOMEM;
> ++        if (found == DEVICE_NOT_FOUND)
> ++                return 0;
> + 
> +-        /* Remove all units of this sysfs path */
> +-        while ((d = hashmap_get(m->devices_by_sysfs, sysfs))) {
> +-                device_unset_sysfs(d);
> +-                device_set_state(d, DEVICE_DEAD);
> +-        }
> ++        e = unit_name_from_path(path, ".device");
> ++        if (!e)
> ++                return log_oom();
> + 
> ++        u = manager_get_unit(m, e);
> ++        if (!u)
> ++                return 0;
> ++
> ++        device_update_found_one(DEVICE(u), add, found, now);
> +         return 0;
> + }
> + 
> +@@ -464,22 +476,6 @@ static bool device_is_ready(struct udev_device *dev) {
> +         return parse_boolean(ready) != 0;
> + }
> + 
> +-static int device_process_new_path(Manager *m, const char *path) {
> +-        _cleanup_udev_device_unref_ struct udev_device *dev = NULL;
> +-
> +-        assert(m);
> +-        assert(path);
> +-
> +-        dev = udev_device_new_from_syspath(m->udev, path);
> +-        if (!dev)
> +-                return log_oom();
> +-
> +-        if (!device_is_ready(dev))
> +-                return 0;
> +-
> +-        return device_process_new_device(m, dev);
> +-}
> +-
> + static Unit *device_following(Unit *u) {
> +         Device *d = DEVICE(u);
> +         Device *other, *first = NULL;
> +@@ -606,12 +602,31 @@ static int device_enumerate(Manager *m) {
> +                 goto fail;
> + 
> +         first = udev_enumerate_get_list_entry(e);
> +-        udev_list_entry_foreach(item, first)
> +-                device_process_new_path(m, udev_list_entry_get_name(item));
> ++        udev_list_entry_foreach(item, first) {
> ++                _cleanup_udev_device_unref_ struct udev_device *dev = NULL;
> ++                const char *sysfs;
> ++
> ++                sysfs = udev_list_entry_get_name(item);
> ++
> ++                dev = udev_device_new_from_syspath(m->udev, sysfs);
> ++                if (!dev) {
> ++                        log_oom();
> ++                        continue;
> ++                }
> ++
> ++                if (!device_is_ready(dev))
> ++                        continue;
> ++
> ++                (void) device_process_new(m, dev);
> ++
> ++                device_update_found_by_sysfs(m, sysfs, true, DEVICE_FOUND_UDEV, false);
> ++        }
> + 
> +         return 0;
> + 
> + fail:
> ++        log_error_errno(r, "Failed to enumerate devices: %m");
> ++
> +         device_shutdown(m);
> +         return r;
> + }
> +@@ -619,7 +634,7 @@ fail:
> + static int device_dispatch_io(sd_event_source *source, int fd, uint32_t revents, void *userdata) {
> +         _cleanup_udev_device_unref_ struct udev_device *dev = NULL;
> +         Manager *m = userdata;
> +-        const char *action;
> ++        const char *action, *sysfs;
> +         int r;
> + 
> +         assert(m);
> +@@ -641,33 +656,47 @@ static int device_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
> +         if (!dev)
> +                 return 0;
> + 
> ++        sysfs = udev_device_get_syspath(dev);
> ++        if (!sysfs) {
> ++                log_error("Failed to get udev sys path.");
> ++                return 0;
> ++        }
> ++
> +         action = udev_device_get_action(dev);
> +         if (!action) {
> +                 log_error("Failed to get udev action string.");
> +                 return 0;
> +         }
> + 
> +-        if (streq(action, "remove") || !device_is_ready(dev))  {
> +-                r = device_process_removed_device(m, dev);
> +-                if (r < 0)
> +-                        log_error_errno(r, "Failed to process device remove event: %m");
> +-
> +-                r = swap_process_removed_device(m, dev);
> ++        if (streq(action, "remove"))  {
> ++                r = swap_process_device_remove(m, dev);
> +                 if (r < 0)
> +                         log_error_errno(r, "Failed to process swap device remove event: %m");
> + 
> +-        } else {
> +-                r = device_process_new_device(m, dev);
> +-                if (r < 0)
> +-                        log_error_errno(r, "Failed to process device new event: %m");
> ++                /* If we get notified that a device was removed by
> ++                 * udev, then it's completely gone, hence unset all
> ++                 * found bits */
> ++                device_update_found_by_sysfs(m, sysfs, false, DEVICE_FOUND_UDEV|DEVICE_FOUND_MOUNT|DEVICE_FOUND_SWAP, true);
> + 
> +-                r = swap_process_new_device(m, dev);
> ++        } else if (device_is_ready(dev)) {
> ++
> ++                (void) device_process_new(m, dev);
> ++
> ++                r = swap_process_device_new(m, dev);
> +                 if (r < 0)
> +                         log_error_errno(r, "Failed to process swap device new event: %m");
> + 
> +                 manager_dispatch_load_queue(m);
> + 
> +-                device_set_path_plugged(m, dev);
> ++                /* The device is found now, set the udev found bit */
> ++                device_update_found_by_sysfs(m, sysfs, true, DEVICE_FOUND_UDEV, true);
> ++
> ++        } else {
> ++                /* The device is nominally around, but not ready for
> ++                 * us. Hence unset the udev bit, but leave the rest
> ++                 * around. */
> ++
> ++                device_update_found_by_sysfs(m, sysfs, false, DEVICE_FOUND_UDEV, true);
> +         }
> + 
> +         return 0;
> +@@ -686,9 +715,58 @@ static bool device_supported(Manager *m) {
> +         return read_only <= 0;
> + }
> + 
> ++int device_found_node(Manager *m, const char *node, bool add, DeviceFound found, bool now) {
> ++        _cleanup_udev_device_unref_ struct udev_device *dev = NULL;
> ++        struct stat st;
> ++
> ++        assert(m);
> ++        assert(node);
> ++
> ++        /* This is called whenever we find a device referenced in
> ++         * /proc/swaps or /proc/self/mounts. Such a device might be
> ++         * mounted/enabled at a time where udev has not finished
> ++         * probing it yet, and we thus haven't learned about it
> ++         * yet. In this case we will set the device unit to
> ++         * "tentative" state. */
> ++
> ++        if (add) {
> ++                if (!path_startswith(node, "/dev"))
> ++                        return 0;
> ++
> ++                if (stat(node, &st) < 0) {
> ++                        if (errno == ENOENT)
> ++                                return 0;
> ++
> ++                        return log_error_errno(errno, "Failed to stat device node file %s: %m", node);
> ++                }
> ++
> ++                if (!S_ISBLK(st.st_mode) && !S_ISCHR(st.st_mode))
> ++                        return 0;
> ++
> ++                dev = udev_device_new_from_devnum(m->udev, S_ISBLK(st.st_mode) ? 'b' : 'c', st.st_rdev);
> ++                if (!dev) {
> ++                        if (errno == ENOENT)
> ++                                return 0;
> ++
> ++                        return log_oom();
> ++                }
> ++
> ++                /* If the device is known in the kernel and newly
> ++                 * appeared, then we'll create a device unit for it,
> ++                 * under the name referenced in /proc/swaps or
> ++                 * /proc/self/mountinfo. */
> ++
> ++                (void) device_setup_unit(m, dev, node, false);
> ++        }
> ++
> ++        /* Update the device unit's state, should it exist */
> ++        return device_update_found_by_name(m, node, add, found, now);
> ++}
> ++
> + static const char* const device_state_table[_DEVICE_STATE_MAX] = {
> +         [DEVICE_DEAD] = "dead",
> +-        [DEVICE_PLUGGED] = "plugged"
> ++        [DEVICE_TENTATIVE] = "tentative",
> ++        [DEVICE_PLUGGED] = "plugged",
> + };
> + 
> + DEFINE_STRING_TABLE_LOOKUP(device_state, DeviceState);
> +diff --git a/src/core/device.h b/src/core/device.h
> +index bb7ae07..0609b20 100644
> +--- a/src/core/device.h
> ++++ b/src/core/device.h
> +@@ -29,20 +29,28 @@ typedef struct Device Device;
> +  * simplifies the state engine greatly */
> + typedef enum DeviceState {
> +         DEVICE_DEAD,
> +-        DEVICE_PLUGGED,
> ++        DEVICE_TENTATIVE, /* mounted or swapped, but not (yet) announced by udev */
> ++        DEVICE_PLUGGED,   /* announced by udev */
> +         _DEVICE_STATE_MAX,
> +         _DEVICE_STATE_INVALID = -1
> + } DeviceState;
> + 
> ++typedef enum DeviceFound {
> ++        DEVICE_NOT_FOUND = 0,
> ++        DEVICE_FOUND_UDEV = 1,
> ++        DEVICE_FOUND_MOUNT = 2,
> ++        DEVICE_FOUND_SWAP = 4,
> ++} DeviceFound;
> ++
> + struct Device {
> +         Unit meta;
> + 
> +         char *sysfs;
> ++        DeviceFound found;
> + 
> +         /* In order to be able to distinguish dependencies on
> +         different device nodes we might end up creating multiple
> +         devices for the same sysfs path. We chain them up here. */
> +-
> +         LIST_FIELDS(struct Device, same_sysfs);
> + 
> +         DeviceState state;
> +@@ -52,3 +60,5 @@ extern const UnitVTable device_vtable;
> + 
> + const char* device_state_to_string(DeviceState i) _const_;
> + DeviceState device_state_from_string(const char *s) _pure_;
> ++
> ++int device_found_node(Manager *m, const char *node, bool add, DeviceFound found, bool now);
> +diff --git a/src/core/mount.c b/src/core/mount.c
> +index f3977e6..c971330 100644
> +--- a/src/core/mount.c
> ++++ b/src/core/mount.c
> +@@ -1391,7 +1391,7 @@ static int mount_dispatch_timer(sd_event_source *source, usec_t usec, void *user
> +         return 0;
> + }
> + 
> +-static int mount_add_one(
> ++static int mount_setup_unit(
> +                 Manager *m,
> +                 const char *what,
> +                 const char *where,
> +@@ -1434,7 +1434,7 @@ static int mount_add_one(
> + 
> +                 u = unit_new(m, sizeof(Mount));
> +                 if (!u)
> +-                        return -ENOMEM;
> ++                        return log_oom();
> + 
> +                 r = unit_add_name(u, e);
> +                 if (r < 0)
> +@@ -1547,6 +1547,8 @@ static int mount_add_one(
> +         return 0;
> + 
> + fail:
> ++        log_warning_errno(r, "Failed to set up mount unit: %m");
> ++
> +         if (delete && u)
> +                 unit_free(u);
> + 
> +@@ -1554,33 +1556,36 @@ fail:
> + }
> + 
> + static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
> +-        _cleanup_(mnt_free_tablep) struct libmnt_table *tb = NULL;
> +-        _cleanup_(mnt_free_iterp) struct libmnt_iter *itr = NULL;
> +-        struct libmnt_fs *fs;
> ++        _cleanup_(mnt_free_tablep) struct libmnt_table *t = NULL;
> ++        _cleanup_(mnt_free_iterp) struct libmnt_iter *i = NULL;
> +         int r = 0;
> + 
> +         assert(m);
> + 
> +-        tb = mnt_new_table();
> +-        itr = mnt_new_iter(MNT_ITER_FORWARD);
> +-        if (!tb || !itr)
> ++        t = mnt_new_table();
> ++        if (!t)
> +                 return log_oom();
> + 
> +-        r = mnt_table_parse_mtab(tb, NULL);
> ++        i = mnt_new_iter(MNT_ITER_FORWARD);
> ++        if (!i)
> ++                return log_oom();
> ++
> ++        r = mnt_table_parse_mtab(t, NULL);
> +         if (r < 0)
> +-                return r;
> ++                return log_error_errno(r, "Failed to parse /proc/self/mountinfo: %m");
> + 
> +         r = 0;
> +         for (;;) {
> +                 const char *device, *path, *options, *fstype;
> +                 _cleanup_free_ const char *d = NULL, *p = NULL;
> ++                struct libmnt_fs *fs;
> +                 int k;
> + 
> +-                k = mnt_table_next_fs(tb, itr, &fs);
> ++                k = mnt_table_next_fs(t, i, &fs);
> +                 if (k == 1)
> +                         break;
> +-                else if (k < 0)
> +-                        return log_error_errno(k, "Failed to get next entry from /etc/fstab: %m");
> ++                if (k < 0)
> ++                        return log_error_errno(k, "Failed to get next entry from /proc/self/mountinfo: %m");
> + 
> +                 device = mnt_fs_get_source(fs);
> +                 path = mnt_fs_get_target(fs);
> +@@ -1588,11 +1593,16 @@ static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
> +                 fstype = mnt_fs_get_fstype(fs);
> + 
> +                 d = cunescape(device);
> ++                if (!d)
> ++                        return log_oom();
> ++
> +                 p = cunescape(path);
> +-                if (!d || !p)
> ++                if (!p)
> +                         return log_oom();
> + 
> +-                k = mount_add_one(m, d, p, options, fstype, set_flags);
> ++                (void) device_found_node(m, d, true, DEVICE_FOUND_MOUNT, set_flags);
> ++
> ++                k = mount_setup_unit(m, d, p, options, fstype, set_flags);
> +                 if (r == 0 && k < 0)
> +                         r = k;
> +         }
> +@@ -1736,8 +1746,6 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
> + 
> +         r = mount_load_proc_self_mountinfo(m, true);
> +         if (r < 0) {
> +-                log_error_errno(r, "Failed to reread /proc/self/mountinfo: %m");
> +-
> +                 /* Reset flags, just in case, for later calls */
> +                 LIST_FOREACH(units_by_type, u, m->units_by_type[UNIT_MOUNT]) {
> +                         Mount *mount = MOUNT(u);
> +@@ -1770,6 +1778,10 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
> +                                 break;
> +                         }
> + 
> ++                        if (mount->parameters_proc_self_mountinfo.what)
> ++                                (void) device_found_node(m, mount->parameters_proc_self_mountinfo.what, false, DEVICE_FOUND_MOUNT, true);
> ++
> ++
> +                 } else if (mount->just_mounted || mount->just_changed) {
> + 
> +                         /* New or changed mount entry */
> +diff --git a/src/core/swap.c b/src/core/swap.c
> +index 6997921..5c19af5 100644
> +--- a/src/core/swap.c
> ++++ b/src/core/swap.c
> +@@ -338,7 +338,7 @@ static int swap_load(Unit *u) {
> +         return swap_verify(s);
> + }
> + 
> +-static int swap_add_one(
> ++static int swap_setup_unit(
> +                 Manager *m,
> +                 const char *what,
> +                 const char *what_proc_swaps,
> +@@ -363,8 +363,10 @@ static int swap_add_one(
> + 
> +         if (u &&
> +             SWAP(u)->from_proc_swaps &&
> +-            !path_equal(SWAP(u)->parameters_proc_swaps.what, what_proc_swaps))
> ++            !path_equal(SWAP(u)->parameters_proc_swaps.what, what_proc_swaps)) {
> ++                log_error("Swap %s appeared twice with different device paths %s and %s", e, SWAP(u)->parameters_proc_swaps.what, what_proc_swaps);
> +                 return -EEXIST;
> ++        }
> + 
> +         if (!u) {
> +                 delete = true;
> +@@ -379,7 +381,7 @@ static int swap_add_one(
> + 
> +                 SWAP(u)->what = strdup(what);
> +                 if (!SWAP(u)->what) {
> +-                        r = log_oom();
> ++                        r = -ENOMEM;
> +                         goto fail;
> +                 }
> + 
> +@@ -407,7 +409,6 @@ static int swap_add_one(
> +         p->priority = priority;
> + 
> +         unit_add_to_dbus_queue(u);
> +-
> +         return 0;
> + 
> + fail:
> +@@ -419,7 +420,7 @@ fail:
> +         return r;
> + }
> + 
> +-static int swap_process_new_swap(Manager *m, const char *device, int prio, bool set_flags) {
> ++static int swap_process_new(Manager *m, const char *device, int prio, bool set_flags) {
> +         _cleanup_udev_device_unref_ struct udev_device *d = NULL;
> +         struct udev_list_entry *item = NULL, *first = NULL;
> +         const char *dn;
> +@@ -428,7 +429,7 @@ static int swap_process_new_swap(Manager *m, const char *device, int prio, bool
> + 
> +         assert(m);
> + 
> +-        r = swap_add_one(m, device, device, prio, set_flags);
> ++        r = swap_setup_unit(m, device, device, prio, set_flags);
> +         if (r < 0)
> +                 return r;
> + 
> +@@ -444,7 +445,7 @@ static int swap_process_new_swap(Manager *m, const char *device, int prio, bool
> +         /* Add the main device node */
> +         dn = udev_device_get_devnode(d);
> +         if (dn && !streq(dn, device))
> +-                swap_add_one(m, dn, device, prio, set_flags);
> ++                swap_setup_unit(m, dn, device, prio, set_flags);
> + 
> +         /* Add additional units for all symlinks */
> +         first = udev_device_get_devlinks_list_entry(d);
> +@@ -465,7 +466,7 @@ static int swap_process_new_swap(Manager *m, const char *device, int prio, bool
> +                             st.st_rdev != udev_device_get_devnum(d))
> +                                 continue;
> + 
> +-                swap_add_one(m, p, device, prio, set_flags);
> ++                swap_setup_unit(m, p, device, prio, set_flags);
> +         }
> + 
> +         return r;
> +@@ -1091,15 +1092,17 @@ static int swap_load_proc_swaps(Manager *m, bool set_flags) {
> +                         if (k == EOF)
> +                                 break;
> + 
> +-                        log_warning("Failed to parse /proc/swaps:%u", i);
> ++                        log_warning("Failed to parse /proc/swaps:%u.", i);
> +                         continue;
> +                 }
> + 
> +                 d = cunescape(dev);
> +                 if (!d)
> +-                        return -ENOMEM;
> ++                        return log_oom();
> ++
> ++                device_found_node(m, d, true, DEVICE_FOUND_SWAP, set_flags);
> + 
> +-                k = swap_process_new_swap(m, d, prio, set_flags);
> ++                k = swap_process_new(m, d, prio, set_flags);
> +                 if (k < 0)
> +                         r = k;
> +         }
> +@@ -1151,6 +1154,9 @@ static int swap_dispatch_io(sd_event_source *source, int fd, uint32_t revents, v
> +                                 break;
> +                         }
> + 
> ++                        if (swap->what)
> ++                                device_found_node(m, swap->what, false, DEVICE_FOUND_SWAP, true);
> ++
> +                 } else if (swap->just_activated) {
> + 
> +                         /* New swap entry */
> +@@ -1298,7 +1304,7 @@ fail:
> +         return r;
> + }
> + 
> +-int swap_process_new_device(Manager *m, struct udev_device *dev) {
> ++int swap_process_device_new(Manager *m, struct udev_device *dev) {
> +         struct udev_list_entry *item = NULL, *first = NULL;
> +         _cleanup_free_ char *e = NULL;
> +         const char *dn;
> +@@ -1341,7 +1347,7 @@ int swap_process_new_device(Manager *m, struct udev_device *dev) {
> +         return r;
> + }
> + 
> +-int swap_process_removed_device(Manager *m, struct udev_device *dev) {
> ++int swap_process_device_remove(Manager *m, struct udev_device *dev) {
> +         const char *dn;
> +         int r = 0;
> +         Swap *s;
> +diff --git a/src/core/swap.h b/src/core/swap.h
> +index 73e64d8..914a2db 100644
> +--- a/src/core/swap.h
> ++++ b/src/core/swap.h
> +@@ -116,8 +116,8 @@ struct Swap {
> + 
> + extern const UnitVTable swap_vtable;
> + 
> +-int swap_process_new_device(Manager *m, struct udev_device *dev);
> +-int swap_process_removed_device(Manager *m, struct udev_device *dev);
> ++int swap_process_device_new(Manager *m, struct udev_device *dev);
> ++int swap_process_device_remove(Manager *m, struct udev_device *dev);
> + 
> + const char* swap_state_to_string(SwapState i) _const_;
> + SwapState swap_state_from_string(const char *s) _pure_;
> +diff --git a/src/core/unit.c b/src/core/unit.c
> +index 563f6fe..a6558ee 100644
> +--- a/src/core/unit.c
> ++++ b/src/core/unit.c
> +@@ -2843,7 +2843,6 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) {
> +                 return -ENOMEM;
> + 
> +         r = manager_load_unit(u->manager, e, NULL, NULL, &device);
> +-
> +         if (r < 0)
> +                 return r;
> + 
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0018-core-fix-return-value-on-OOM.patch b/meta/recipes-core/systemd/systemd/0018-core-fix-return-value-on-OOM.patch
> new file mode 100644
> index 0000000..d614085
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0018-core-fix-return-value-on-OOM.patch
> @@ -0,0 +1,26 @@
> +From 3d3a67138c63b47f2a5723577f886bc3c7995748 Mon Sep 17 00:00:00 2001
> +From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
> +Date: Sat, 28 Feb 2015 23:39:55 +0100
> +Subject: [PATCH 18/26] core: fix return value on OOM
> +
> +(cherry picked from commit c43b2132f37264600cc26e07c8d85dfdd6c969f0)
> +---
> + src/core/device.c | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/src/core/device.c b/src/core/device.c
> +index 75b9a46..1cc103c 100644
> +--- a/src/core/device.c
> ++++ b/src/core/device.c
> +@@ -211,6 +211,8 @@ static int device_update_description(Unit *u, struct udev_device *dev, const cha
> +                         j = strjoin(model, " ", label, NULL);
> +                         if (j)
> +                                 r = unit_set_description(u, j);
> ++                        else
> ++                                r = -ENOMEM;
> +                 } else
> +                         r = unit_set_description(u, model);
> +         } else
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0019-machined-use-x-machine-unix-prefix-for-the-container.patch b/meta/recipes-core/systemd/systemd/0019-machined-use-x-machine-unix-prefix-for-the-container.patch
> new file mode 100644
> index 0000000..d94da60
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0019-machined-use-x-machine-unix-prefix-for-the-container.patch
> @@ -0,0 +1,33 @@
> +From 9a46fe3127eea552cd76d4b549f8d8ba70ea01b3 Mon Sep 17 00:00:00 2001
> +From: Benjamin Franzke <benjaminfranzke@googlemail.com>
> +Date: Thu, 19 Feb 2015 20:47:28 +0100
> +Subject: [PATCH 19/26] machined: use x-machine-unix prefix for the container
> + bus on dbus1
> +
> +This fixes "machinectl login" on systems configured with --disable-kdbus.
> +
> +The error was:
> +machinectl login foo
> +Failed to get machine PTY: Input/output error
> +
> +(cherry picked from commit f2273101c21bc59a390379e182e53cd4f07a7e71)
> +---
> + src/machine/machine-dbus.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
> +index b46f0a8..b0f0f66 100644
> +--- a/src/machine/machine-dbus.c
> ++++ b/src/machine/machine-dbus.c
> +@@ -477,7 +477,7 @@ int bus_machine_method_open_login(sd_bus *bus, sd_bus_message *message, void *us
> + #ifdef ENABLE_KDBUS
> +         asprintf(&container_bus->address, "x-machine-kernel:pid=" PID_FMT ";x-machine-unix:pid=" PID_FMT, m->leader, m->leader);
> + #else
> +-        asprintf(&container_bus->address, "x-machine-kernel:pid=" PID_FMT, m->leader);
> ++        asprintf(&container_bus->address, "x-machine-unix:pid=" PID_FMT, m->leader);
> + #endif
> +         if (!container_bus->address)
> +                 return -ENOMEM;
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0020-shared-AFS-is-also-a-network-filesystem.patch b/meta/recipes-core/systemd/systemd/0020-shared-AFS-is-also-a-network-filesystem.patch
> new file mode 100644
> index 0000000..fcc2adf
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0020-shared-AFS-is-also-a-network-filesystem.patch
> @@ -0,0 +1,25 @@
> +From 3c350019fe9e4be16bf110988c324cfa3a21c61b Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org>
> +Date: Fri, 20 Feb 2015 15:35:11 -0300
> +Subject: [PATCH 20/26] shared: AFS is also a network filesystem
> +
> +(cherry picked from commit ba89821c104d959082aad6f3f0e05a8afd575023)
> +---
> + src/shared/util.c | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/src/shared/util.c b/src/shared/util.c
> +index ba035ca..f24b5b4 100644
> +--- a/src/shared/util.c
> ++++ b/src/shared/util.c
> +@@ -1689,6 +1689,7 @@ bool chars_intersect(const char *a, const char *b) {
> + 
> + bool fstype_is_network(const char *fstype) {
> +         static const char table[] =
> ++                "afs\0"
> +                 "cifs\0"
> +                 "smbfs\0"
> +                 "sshfs\0"
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0021-core-downgrade-unit-type-not-supported-message.patch b/meta/recipes-core/systemd/systemd/0021-core-downgrade-unit-type-not-supported-message.patch
> new file mode 100644
> index 0000000..02e279d
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0021-core-downgrade-unit-type-not-supported-message.patch
> @@ -0,0 +1,31 @@
> +From 4e2d4dd757c6faa4d5a471c10cf6f45978524845 Mon Sep 17 00:00:00 2001
> +From: Umut Tezduyar Lindskog <umut.tezduyar@axis.com>
> +Date: Fri, 20 Feb 2015 10:53:28 +0100
> +Subject: [PATCH 21/26] core: downgrade unit type not supported message
> +
> +Otherwise every daemon reload prints out warnings like:
> +
> +systemd[1]: Unit type .busname is not supported on this system.
> +systemd[1]: Unit type .swap is not supported on this system.
> +
> +(cherry picked from commit 03afec3c9aa849ba13161c253b129b834298fd40)
> +---
> + src/core/manager.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/core/manager.c b/src/core/manager.c
> +index 4775219..bc9b7ec 100644
> +--- a/src/core/manager.c
> ++++ b/src/core/manager.c
> +@@ -961,7 +961,7 @@ int manager_enumerate(Manager *m) {
> +                 int q;
> + 
> +                 if (unit_vtable[c]->supported && !unit_vtable[c]->supported(m)) {
> +-                        log_info("Unit type .%s is not supported on this system.", unit_type_to_string(c));
> ++                        log_debug("Unit type .%s is not supported on this system.", unit_type_to_string(c));
> +                         continue;
> +                 }
> + 
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0022-journal-remote-fix-saving-of-binary-fields.patch b/meta/recipes-core/systemd/systemd/0022-journal-remote-fix-saving-of-binary-fields.patch
> new file mode 100644
> index 0000000..f5afd09
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0022-journal-remote-fix-saving-of-binary-fields.patch
> @@ -0,0 +1,97 @@
> +From 91a3ba906422127bb12095d1c7d0c7f0cb385588 Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
> +Date: Mon, 2 Mar 2015 10:34:51 -0500
> +Subject: [PATCH 22/26] journal-remote: fix saving of binary fields
> +
> +Binary fields were not processed properly, and resulting journal files
> +were non-conforming, resulting in an error ("Invalid field.") when reading.
> +
> +https://bugs.freedesktop.org/show_bug.cgi?id=89391
> +(cherry picked from commit 09d801a82a46df518dd752e40bf13ac404daa2ce)
> +---
> + src/journal-remote/journal-remote-parse.c | 31 ++++++++++++++++++-------------
> + src/journal-remote/journal-remote-parse.h |  4 +++-
> + 2 files changed, 21 insertions(+), 14 deletions(-)
> +
> +diff --git a/src/journal-remote/journal-remote-parse.c b/src/journal-remote/journal-remote-parse.c
> +index d9dea8d..afded7e 100644
> +--- a/src/journal-remote/journal-remote-parse.c
> ++++ b/src/journal-remote/journal-remote-parse.c
> +@@ -344,22 +344,25 @@ int process_data(RemoteSource *source) {
> +                    LLLLLLLL0011223344...\n
> +                 */
> +                 sep = memchr(line, '=', n);
> +-                if (sep)
> ++                if (sep) {
> +                         /* chomp newline */
> +                         n--;
> +-                else
> ++
> ++                        r = iovw_put(&source->iovw, line, n);
> ++                        if (r < 0)
> ++                                return r;
> ++                } else {
> +                         /* replace \n with = */
> +                         line[n-1] = '=';
> +-                log_trace("Received: %.*s", (int) n, line);
> + 
> +-                r = iovw_put(&source->iovw, line, n);
> +-                if (r < 0) {
> +-                        log_error("Failed to put line in iovect");
> +-                        return r;
> ++                        source->field_len = n;
> ++                        source->state = STATE_DATA_START;
> ++
> ++                        /* we cannot put the field in iovec until we have all data */
> +                 }
> + 
> +-                if (!sep)
> +-                        source->state = STATE_DATA_START;
> ++                log_trace("Received: %.*s (%s)", (int) n, line, sep ? "text" : "binary");
> ++
> +                 return 0; /* continue */
> +         }
> + 
> +@@ -382,6 +385,7 @@ int process_data(RemoteSource *source) {
> + 
> +         case STATE_DATA: {
> +                 void *data;
> ++                char *field;
> + 
> +                 assert(source->data_size > 0);
> + 
> +@@ -396,11 +400,12 @@ int process_data(RemoteSource *source) {
> + 
> +                 assert(data);
> + 
> +-                r = iovw_put(&source->iovw, data, source->data_size);
> +-                if (r < 0) {
> +-                        log_error("failed to put binary buffer in iovect");
> ++                field = (char*) data - sizeof(uint64_t) - source->field_len;
> ++                memmove(field + sizeof(uint64_t), field, source->field_len);
> ++
> ++                r = iovw_put(&source->iovw, field + sizeof(uint64_t), source->field_len + source->data_size);
> ++                if (r < 0)
> +                         return r;
> +-                }
> + 
> +                 source->state = STATE_DATA_FINISH;
> + 
> +diff --git a/src/journal-remote/journal-remote-parse.h b/src/journal-remote/journal-remote-parse.h
> +index 8499f4e..22db550 100644
> +--- a/src/journal-remote/journal-remote-parse.h
> ++++ b/src/journal-remote/journal-remote-parse.h
> +@@ -42,7 +42,9 @@ typedef struct RemoteSource {
> +         size_t offset;     /* offset to the beginning of live data in the buffer */
> +         size_t scanned;    /* number of bytes since the beginning of data without a newline */
> +         size_t filled;     /* total number of bytes in the buffer */
> +-        size_t data_size;  /* size of the binary data chunk being processed */
> ++
> ++        size_t field_len;  /* used for binary fields: the field name length */
> ++        size_t data_size;  /* and the size of the binary data chunk being processed */
> + 
> +         struct iovec_wrapper iovw;
> + 
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0023-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch b/meta/recipes-core/systemd/systemd/0023-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch
> new file mode 100644
> index 0000000..79e565b
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0023-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch
> @@ -0,0 +1,37 @@
> +From 983c520982b548c9bb8f2689a93f2fb35c54c392 Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org>
> +Date: Sun, 1 Mar 2015 21:13:10 -0300
> +Subject: [PATCH 23/26] journal: fix Inappropriate ioctl for device on ext4
> +
> +Logs constantly show
> +
> +systemd-journald[395]: Failed to set file attributes: Inappropriate ioctl for device
> +
> +This is because ext4 does not support FS_NOCOW_FL.
> +
> +[zj: fold into one conditional as suggested on the ML and
> +     fix (preexisting) r/errno confusion in error message.]
> +
> +(cherry picked from commit 65eae3b76243d2dfd869f8c43b787575f7b4b994)
> +---
> + src/journal/journal-file.c | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
> +index 2845e05..0f28718 100644
> +--- a/src/journal/journal-file.c
> ++++ b/src/journal/journal-file.c
> +@@ -2611,8 +2611,8 @@ int journal_file_open(
> +                  * shouldn't be too bad, given that we do our own
> +                  * checksumming). */
> +                 r = chattr_fd(f->fd, true, FS_NOCOW_FL);
> +-                if (r < 0)
> +-                        log_warning_errno(errno, "Failed to set file attributes: %m");
> ++                if (r < 0 && r != -ENOTTY)
> ++                        log_warning_errno(r, "Failed to set file attributes: %m");
> + 
> +                 /* Let's attach the creation time to the journal file,
> +                  * so that the vacuuming code knows the age of this
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0024-sd-daemon-replace-VLA-with-alloca-to-make-llvm-happy.patch b/meta/recipes-core/systemd/systemd/0024-sd-daemon-replace-VLA-with-alloca-to-make-llvm-happy.patch
> new file mode 100644
> index 0000000..0cf9a0a
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0024-sd-daemon-replace-VLA-with-alloca-to-make-llvm-happy.patch
> @@ -0,0 +1,53 @@
> +From 3f0c8096f3d5e3b37d6e0e26f0562c1a8669f0d8 Mon Sep 17 00:00:00 2001
> +From: Lennart Poettering <lennart@poettering.net>
> +Date: Mon, 2 Mar 2015 20:55:38 +0100
> +Subject: [PATCH 24/26] sd-daemon: replace VLA with alloca(), to make llvm
> + happy
> +
> +https://bugs.freedesktop.org/show_bug.cgi?id=89379
> +(cherry picked from commit d4a144fadf89bca681724c6c9a65b4a165fa0f90)
> +---
> + src/libsystemd/sd-daemon/sd-daemon.c | 12 +++++-------
> + 1 file changed, 5 insertions(+), 7 deletions(-)
> +
> +diff --git a/src/libsystemd/sd-daemon/sd-daemon.c b/src/libsystemd/sd-daemon/sd-daemon.c
> +index 028c2a7..22a3a53 100644
> +--- a/src/libsystemd/sd-daemon/sd-daemon.c
> ++++ b/src/libsystemd/sd-daemon/sd-daemon.c
> +@@ -352,11 +352,7 @@ _public_ int sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char
> +                 .msg_iovlen = 1,
> +                 .msg_name = &sockaddr,
> +         };
> +-        union {
> +-                struct cmsghdr cmsghdr;
> +-                uint8_t buf[CMSG_SPACE(sizeof(struct ucred)) +
> +-                            CMSG_SPACE(sizeof(int) * n_fds)];
> +-        } control;
> ++        struct cmsghdr *control;
> +         _cleanup_close_ int fd = -1;
> +         struct cmsghdr *cmsg = NULL;
> +         const char *e;
> +@@ -400,8 +396,10 @@ _public_ int sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char
> +         if (msghdr.msg_namelen > sizeof(struct sockaddr_un))
> +                 msghdr.msg_namelen = sizeof(struct sockaddr_un);
> + 
> ++        control = alloca(CMSG_SPACE(sizeof(struct ucred)) + CMSG_SPACE(sizeof(int) * n_fds));
> ++
> +         if (n_fds > 0) {
> +-                msghdr.msg_control = &control;
> ++                msghdr.msg_control = control;
> +                 msghdr.msg_controllen = CMSG_LEN(sizeof(int) * n_fds);
> + 
> +                 cmsg = CMSG_FIRSTHDR(&msghdr);
> +@@ -418,7 +416,7 @@ _public_ int sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char
> +                 try_without_ucred = true;
> +                 controllen_without_ucred = msghdr.msg_controllen;
> + 
> +-                msghdr.msg_control = &control;
> ++                msghdr.msg_control = control;
> +                 msghdr.msg_controllen += CMSG_LEN(sizeof(struct ucred));
> + 
> +                 if (cmsg)
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0025-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch b/meta/recipes-core/systemd/systemd/0025-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch
> new file mode 100644
> index 0000000..6912489
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0025-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch
> @@ -0,0 +1,84 @@
> +From 5fb87c4b6582ddb0a0ab1f31300eae69ab963afb Mon Sep 17 00:00:00 2001
> +From: Hans-Peter Deifel <hpd@hpdeifel.de>
> +Date: Tue, 3 Mar 2015 00:35:08 +0100
> +Subject: [PATCH 25/26] tmpfiles: quietly ignore ACLs on unsupported
> + filesystems
> +
> +A warning is printed if ACLs cannot be retrieved for any reason other
> +than -ENOSYS. For -ENOSYS, debug log is printed.
> +
> +(cherry picked from commit d873e8778c92014c02a9122852758b436fa95c0e)
> +---
> + src/tmpfiles/tmpfiles.c | 36 ++++++++++++++++++++----------------
> + 1 file changed, 20 insertions(+), 16 deletions(-)
> +
> +diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
> +index 88ba7e4..187997e 100644
> +--- a/src/tmpfiles/tmpfiles.c
> ++++ b/src/tmpfiles/tmpfiles.c
> +@@ -704,6 +704,9 @@ static int path_set_acl(const char *path, acl_type_t type, acl_t acl, bool modif
> +         int r;
> +         _cleanup_(acl_free_charpp) char *t = NULL;
> + 
> ++        /* Returns 0 for success, positive error if already warned,
> ++         * negative error otherwise. */
> ++
> +         if (modify) {
> +                 r = acls_for_file(path, type, acl, &dup);
> +                 if (r < 0)
> +@@ -731,35 +734,36 @@ static int path_set_acl(const char *path, acl_type_t type, acl_t acl, bool modif
> + 
> +         r = acl_set_file(path, type, dup);
> +         if (r < 0)
> +-                return log_error_errno(-errno,
> +-                                       "Setting %s ACL \"%s\" on %s failed: %m",
> +-                                       type == ACL_TYPE_ACCESS ? "access" : "default",
> +-                                       strna(t), path);
> ++                return -log_error_errno(errno,
> ++                                        "Setting %s ACL \"%s\" on %s failed: %m",
> ++                                        type == ACL_TYPE_ACCESS ? "access" : "default",
> ++                                        strna(t), path);
> ++
> +         return 0;
> + }
> + #endif
> + 
> + static int path_set_acls(Item *item, const char *path) {
> ++        int r = 0;
> + #ifdef HAVE_ACL
> +-        int r;
> +-
> +         assert(item);
> +         assert(path);
> + 
> +-        if (item->acl_access) {
> ++        if (item->acl_access)
> +                 r = path_set_acl(path, ACL_TYPE_ACCESS, item->acl_access, item->force);
> +-                if (r < 0)
> +-                        return r;
> +-        }
> + 
> +-        if (item->acl_default) {
> ++        if (r == 0 && item->acl_default)
> +                 r = path_set_acl(path, ACL_TYPE_DEFAULT, item->acl_default, item->force);
> +-                if (r < 0)
> +-                        return r;
> +-        }
> +-#endif
> + 
> +-        return 0;
> ++        if (r > 0)
> ++                return -r; /* already warned */
> ++        else if (r == -ENOTSUP) {
> ++                log_debug_errno(r, "ACLs not supported by file system at %s", path);
> ++                return 0;
> ++        } else if (r < 0)
> ++                log_error_errno(r, "ACL operation on \"%s\" failed: %m", path);
> ++#endif
> ++        return r;
> + }
> + 
> + static int write_one_file(Item *i, const char *path) {
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd/0026-shared-util-assume-ac-when-sys-class-power_supply-is.patch b/meta/recipes-core/systemd/systemd/0026-shared-util-assume-ac-when-sys-class-power_supply-is.patch
> new file mode 100644
> index 0000000..a49a369
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0026-shared-util-assume-ac-when-sys-class-power_supply-is.patch
> @@ -0,0 +1,30 @@
> +From 0436d5c5f4b39ba8177437fa92f082f8ef1830fb Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
> +Date: Tue, 3 Mar 2015 19:07:28 -0500
> +Subject: [PATCH 26/26] shared/util: assume ac when /sys/class/power_supply is
> + missing
> +
> +On s390 (at least) /sys/class/power_supply is not present. We should
> +treat this like if this directory was empty, and not an error.
> +
> +(cherry picked from commit 6d89003462484c8656b698e07b9cf0a337e3818e)
> +---
> + src/shared/util.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/shared/util.c b/src/shared/util.c
> +index f24b5b4..8548723 100644
> +--- a/src/shared/util.c
> ++++ b/src/shared/util.c
> +@@ -5994,7 +5994,7 @@ int on_ac_power(void) {
> + 
> +         d = opendir("/sys/class/power_supply");
> +         if (!d)
> +-                return -errno;
> ++                return errno == ENOENT ? true : -errno;
> + 
> +         for (;;) {
> +                 struct dirent *de;
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-core/systemd/systemd_219.bb b/meta/recipes-core/systemd/systemd_219.bb
> index 9bb104f..9c20b11 100644
> --- a/meta/recipes-core/systemd/systemd_219.bb
> +++ b/meta/recipes-core/systemd/systemd_219.bb
> @@ -19,7 +19,7 @@ PROVIDES = "udev"
>  
>  PE = "1"
>  
> -DEPENDS = "intltool-native gperf-native readline libcap libcgroup qemu-native"
> +DEPENDS = "intltool-native gperf-native readline libcap libcgroup qemu-native util-linux"
>  
>  SECTION = "base/shell"
>  
> @@ -40,10 +40,7 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master \
>             file://0009-sysv-generator-add-support-for-executing-scripts-und.patch \
>             file://0010-Make-root-s-home-directory-configurable.patch \
>             file://0011-systemd-user-avoid-using-system-auth.patch \
> -           file://0001-tmpfiles-avoid-creating-duplicate-acl-entries.patch \
> -           file://0002-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch \
>             file://0012-systemd-tmpfiles.c-Honor-ordering-within-files-as-th.patch \
> -           file://0013-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch \
>             file://0014-Revert-rules-remove-firmware-loading-rules.patch \
>             file://0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch \
>             file://tmpfiles-pam.patch \
> @@ -55,6 +52,36 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master \
>  
>  S = "${WORKDIR}/git"
>  
> +# Appending backport fixes released for version 219-stable
> +SRC_URI_append = "\
> +           file://0001-journal-remote-fix-certificate-status-memory-leak.patch \
> +           file://0002-journal-remote-fix-client_cert-memory-leak.patch \
> +           file://0003-tmpfiles-Fix-parse_acl-error-message.patch \
> +           file://0004-test-utf8-fix-utf16-tests-on-BE-machines.patch \
> +           file://0005-tmpfiles-avoid-creating-duplicate-acl-entries.patch \
> +           file://0006-shared-time-util-fix-gcc5-warning.patch \
> +           file://0007-test-time-test-infinity-parsing-in-nanoseconds.patch \
> +           file://0008-bootchart-fix-default-init-path.patch \
> +           file://0009-systemctl-bump-NOFILE-only-for-systemctl_main.patch \
> +           file://0010-acl-util-avoid-freeing-uninitialized-pointer.patch \
> +           file://0011-bootchart-svg-fix-checking-of-list-end.patch \
> +           file://0012-systemd-add-getrandom-syscall-numbers-for-MIPS.patch \
> +           file://0013-unit-use-weaker-dependencies-between-mount-and-devic.patch \
> +           file://0014-unit-When-stopping-due-to-BindsTo-log-which-unit-cau.patch \
> +           file://0015-sysctl-downgrade-message-about-sysctl-overrides-to-d.patch \
> +           file://0016-sysctl-add-some-hints-how-to-override-settings.patch \
> +           file://0017-core-rework-device-state-logic.patch \
> +           file://0018-core-fix-return-value-on-OOM.patch \
> +           file://0019-machined-use-x-machine-unix-prefix-for-the-container.patch \
> +           file://0020-shared-AFS-is-also-a-network-filesystem.patch \
> +           file://0021-core-downgrade-unit-type-not-supported-message.patch \
> +           file://0022-journal-remote-fix-saving-of-binary-fields.patch \
> +           file://0023-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch \
> +           file://0024-sd-daemon-replace-VLA-with-alloca-to-make-llvm-happy.patch \
> +           file://0025-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch \
> +           file://0026-shared-util-assume-ac-when-sys-class-power_supply-is.patch \
> +           "
> +
>  SRC_URI_append_libc-uclibc = "\
>              file://0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch \
>             "
> @@ -130,8 +157,6 @@ EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
>                   --disable-introspection \
>                   --disable-kdbus \
>                   --disable-manpages \
> -                 --disable-introspection \
> -                 --disable-kdbus \
>                   --enable-split-usr \
>                   --without-python \
>                   --with-sysvrcnd-path=${sysconfdir} \
> diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
> index 10b14b3..ac6162a 100644
> --- a/meta/recipes-core/util-linux/util-linux.inc
> +++ b/meta/recipes-core/util-linux/util-linux.inc
> @@ -43,7 +43,7 @@ SHARED_EXTRA_OECONF = "--disable-use-tty-group \
>                         --enable-raw --enable-reset --disable-login \
>                         --disable-vipw --disable-newgrp --disable-chfn-chsh \
>                         --enable-write --enable-mount \
> -                       --enable-libuuid --enable-libblkid --enable-fsck --without-udev \
> +                       --enable-libuuid --enable-fsck --without-udev \
>                         usrsbin_execdir='${sbindir}' \
>  "
>  
> -- 
> 1.9.1
> 





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

* Re: [PATCH 4/4] systemd: v219 with stable fixes
  2015-03-30 13:05     ` Bottazzini, Bruno
@ 2015-03-30 13:40       ` Otavio Salvador
  2015-03-30 17:42         ` Bottazzini, Bruno
  0 siblings, 1 reply; 73+ messages in thread
From: Otavio Salvador @ 2015-03-30 13:40 UTC (permalink / raw)
  To: Bottazzini, Bruno; +Cc: Patches and discussions about the oe-core layer

On Mon, Mar 30, 2015 at 10:05 AM, Bottazzini, Bruno
<bruno.bottazzini@intel.com> wrote:
> Hello,
>
> What about this patch ?

What is this change in util-linux? Why this is necessary?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH 4/4] systemd: v219 with stable fixes
  2015-03-30 13:40       ` Otavio Salvador
@ 2015-03-30 17:42         ` Bottazzini, Bruno
  0 siblings, 0 replies; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-03-30 17:42 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

On Seg, 2015-03-30 at 10:40 -0300, Otavio Salvador wrote:
> On Mon, Mar 30, 2015 at 10:05 AM, Bottazzini, Bruno
> <bruno.bottazzini@intel.com> wrote:
> > Hello,
> >
> > What about this patch ?
> 
> What is this change in util-linux? Why this is necessary?

It is not. 

This is some garbage that it shouldn't have been in the patch.

Sorry for this, I will remake and send it separately soon.







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

* Re: [PATCH 4/4] systemd: v219 with stable fixes
  2015-03-25 21:49   ` [PATCH 4/4] systemd: v219 with stable fixes Bruno Bottazzini
  2015-03-30 13:05     ` Bottazzini, Bruno
@ 2015-04-01 10:16     ` Jussi Kukkonen
  2015-04-01 11:21       ` Anders Darander
  2015-04-01 12:52       ` Bottazzini, Bruno
  1 sibling, 2 replies; 73+ messages in thread
From: Jussi Kukkonen @ 2015-04-01 10:16 UTC (permalink / raw)
  To: Bruno Bottazzini; +Cc: openembedded-core

Hi,

On 25 March 2015 at 23:49, Bruno Bottazzini <bruno.bottazzini@intel.com> wrote:
> Adding patches that fix bugs for 219 version.
> This will get the same consistency of the stable systemd 219 version.
>
> More details:
> http://cgit.freedesktop.org/systemd/systemd-stable/log/?h=v219-stable

Is the idea of these patches to reproduce 219-stable in oe-core? If
yes, wouldn't it be easier to use systemd-stable repo and just update
the SRCREV instead of error prone patching? Or maybe I'm missing
something here...

 - Jussi


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

* Re: [PATCH 4/4] systemd: v219 with stable fixes
  2015-04-01 10:16     ` Jussi Kukkonen
@ 2015-04-01 11:21       ` Anders Darander
  2015-04-01 12:52       ` Bottazzini, Bruno
  1 sibling, 0 replies; 73+ messages in thread
From: Anders Darander @ 2015-04-01 11:21 UTC (permalink / raw)
  To: Jussi Kukkonen; +Cc: openembedded-core

* Jussi Kukkonen <jussi.kukkonen@intel.com> [150401 12:17]:

> On 25 March 2015 at 23:49, Bruno Bottazzini <bruno.bottazzini@intel.com> wrote:
> > Adding patches that fix bugs for 219 version.
> > This will get the same consistency of the stable systemd 219 version.

> > More details:
> > http://cgit.freedesktop.org/systemd/systemd-stable/log/?h=v219-stable

> Is the idea of these patches to reproduce 219-stable in oe-core? If
> yes, wouldn't it be easier to use systemd-stable repo and just update
> the SRCREV instead of error prone patching? Or maybe I'm missing
> something here...

I was just wondering the same thing myself...

Sure, it might be slightly more obvious which fixes are applied; on the
other hand, unless we plan to only add a subset of the stable fixes in
219-stable, there's no real reason to avoid 219-stable in my opinion.

Cheers,
Anders

-- 
Anders Darander
ChargeStorm AB / eStorm AB


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

* Re: [PATCH 4/4] systemd: v219 with stable fixes
  2015-04-01 10:16     ` Jussi Kukkonen
  2015-04-01 11:21       ` Anders Darander
@ 2015-04-01 12:52       ` Bottazzini, Bruno
  2015-04-15 15:01         ` Burton, Ross
  1 sibling, 1 reply; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-04-01 12:52 UTC (permalink / raw)
  To: Jussi Kukkonen; +Cc: openembedded-core

On Qua, 2015-04-01 at 13:16 +0300, Jussi Kukkonen wrote:
> Hi,
> 
> On 25 March 2015 at 23:49, Bruno Bottazzini <bruno.bottazzini@intel.com> wrote:
> > Adding patches that fix bugs for 219 version.
> > This will get the same consistency of the stable systemd 219 version.
> >
> > More details:
> > http://cgit.freedesktop.org/systemd/systemd-stable/log/?h=v219-stable
> 
> Is the idea of these patches to reproduce 219-stable in oe-core? If
> yes, wouldn't it be easier to use systemd-stable repo and just update
> the SRCREV instead of error prone patching? Or maybe I'm missing
> something here...
> 
>  - Jussi

Hello Jussi, 

The previous patch was done in the way you said but, Khem Raj suggested
that we should use it as patches.

Copying and Pasting what he said:
"Thats good, although we have to be open on stable branch to do SRCREV
 updates which we hardly do. We only backport fixed via master
 so I see this as pointless from that angle."

Best Regards,




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

* Re: [PATCH 4/4] systemd: v219 with stable fixes
  2015-04-01 12:52       ` Bottazzini, Bruno
@ 2015-04-15 15:01         ` Burton, Ross
  2015-04-15 15:37           ` Bottazzini, Bruno
  0 siblings, 1 reply; 73+ messages in thread
From: Burton, Ross @ 2015-04-15 15:01 UTC (permalink / raw)
  To: Bottazzini, Bruno; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 1148 bytes --]

Hi,

On 1 April 2015 at 13:52, Bottazzini, Bruno <bruno.bottazzini@intel.com>
wrote:

> The previous patch was done in the way you said but, Khem Raj suggested
> that we should use it as patches.
>
> Copying and Pasting what he said:
> "Thats good, although we have to be open on stable branch to do SRCREV
>  updates which we hardly do. We only backport fixed via master
>  so I see this as pointless from that angle."
>

At the time - when master was frozen - that was true.  But unfortunately
this didn't get applied in time for Fido, as a non-trivial patch that
doesn't fix existing bugs there's a large barrier to pass.  Now that master
is open the systemd recipe can in fact track the stable git branch instead,
and insert the git hash into the PV so it's obvious that it's taken from
git.

Assuming that patch gets merged and doesn't cause problems, then it would
be up to the Fido maintainer (that's Joshua Lock) to decide whether to
merge a backport, which could well end up being this patch.

Sorry about this, the final stage of the release was quite busy and this
slipped straight through my fingers.

Ross

[-- Attachment #2: Type: text/html, Size: 1782 bytes --]

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

* Re: [PATCH 4/4] systemd: v219 with stable fixes
  2015-04-15 15:01         ` Burton, Ross
@ 2015-04-15 15:37           ` Bottazzini, Bruno
  2015-04-15 15:53             ` Burton, Ross
  0 siblings, 1 reply; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-04-15 15:37 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

Hello Ross,

No problem, I will change the patch to use it the stable branch which I
think it will be better.

I will send this asap...

Thanks a lot for the reply! 

Best Regards,

On Qua, 2015-04-15 at 16:01 +0100, Burton, Ross wrote:
> Hi,
> 
> On 1 April 2015 at 13:52, Bottazzini, Bruno
> <bruno.bottazzini@intel.com> wrote:
>         The previous patch was done in the way you said but, Khem Raj
>         suggested
>         that we should use it as patches.
>         
>         Copying and Pasting what he said:
>         "Thats good, although we have to be open on stable branch to
>         do SRCREV
>          updates which we hardly do. We only backport fixed via master
>          so I see this as pointless from that angle."
>         
> 
> At the time - when master was frozen - that was true.  But
> unfortunately this didn't get applied in time for Fido, as a
> non-trivial patch that doesn't fix existing bugs there's a large
> barrier to pass.  Now that master is open the systemd recipe can in
> fact track the stable git branch instead, and insert the git hash into
> the PV so it's obvious that it's taken from git.
> 
> 
> Assuming that patch gets merged and doesn't cause problems, then it
> would be up to the Fido maintainer (that's Joshua Lock) to decide
> whether to merge a backport, which could well end up being this patch.
> 
> 
> Sorry about this, the final stage of the release was quite busy and
> this slipped straight through my fingers.
> 
> 
> Ross




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

* Re: [PATCH 4/4] systemd: v219 with stable fixes
  2015-04-15 15:37           ` Bottazzini, Bruno
@ 2015-04-15 15:53             ` Burton, Ross
  2015-04-15 16:29               ` Bottazzini, Bruno
  0 siblings, 1 reply; 73+ messages in thread
From: Burton, Ross @ 2015-04-15 15:53 UTC (permalink / raw)
  To: Bottazzini, Bruno; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 446 bytes --]

On 15 April 2015 at 16:37, Bottazzini, Bruno <bruno.bottazzini@intel.com>
wrote:

> No problem, I will change the patch to use it the stable branch which I
> think it will be better.
>
> I will send this asap...
>

Patches for the stable branch are generally only accepted once they've been
proven in master, so a patch changing the master systemd to use the git
branch to verify they don't break something is the first step.

Ross

[-- Attachment #2: Type: text/html, Size: 871 bytes --]

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

* Re: [PATCH 4/4] systemd: v219 with stable fixes
  2015-04-15 15:53             ` Burton, Ross
@ 2015-04-15 16:29               ` Bottazzini, Bruno
  0 siblings, 0 replies; 73+ messages in thread
From: Bottazzini, Bruno @ 2015-04-15 16:29 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On Qua, 2015-04-15 at 16:53 +0100, Burton, Ross wrote:
> 
> On 15 April 2015 at 16:37, Bottazzini, Bruno
> <bruno.bottazzini@intel.com> wrote:
>         No problem, I will change the patch to use it the stable
>         branch which I
>         think it will be better.
>         
>         I will send this asap...
>         
> 
> Patches for the stable branch are generally only accepted once they've
> been proven in master, so a patch changing the master systemd to use
> the git branch to verify they don't break something is the first step.

Yes, the master will also add new features and since it is not a
official release may contain bugs. 

So the main proposal is to use the official version of systemd with
backport fixes (stable branch).

In the end we will get the release 219 version with the fixes which is
really good and it'll be more secure.

When the version 220 is released we can change the branch to master with
SRCREV pointing for the release and later we can do the same thing that
I'm trying to do. To add backport fixes for the current version by using
the branch stable or patch files.

> 
> 
> Ross




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

end of thread, other threads:[~2015-04-15 16:29 UTC | newest]

Thread overview: 73+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bruno.bottazzini@intel.com>
2015-01-21 20:00 ` [PATCH 0/2] kmod new packageconfig and dbus split package Bruno Bottazzini
2015-01-21 20:00   ` [PATCH 1/2] kmod: new PACKAGECONFIG debug and logging to help reduce binary size Bruno Bottazzini
2015-01-21 20:00   ` [PATCH 2/2] dbus: split tools package Bruno Bottazzini
2015-01-28 15:47   ` [PATCH 0/2] kmod new packageconfig and dbus split package Bottazzini, Bruno
2015-01-28 16:00     ` Burton, Ross
2015-01-28 18:55       ` Dan McGregor
2015-01-28 19:57         ` Burton, Ross
2015-02-02 12:39           ` Bottazzini, Bruno
2015-02-03 18:21 ` [PATCH] systemd: update version from 216 to 218 Bruno Bottazzini
2015-02-03 18:21   ` Bruno Bottazzini
2015-02-03 21:23     ` Randy Witt
2015-02-03 21:33       ` Bottazzini, Bruno
2015-02-04 11:48     ` Enrico Scholz
2015-02-04 17:04       ` Bottazzini, Bruno
2015-02-04 17:59         ` Enrico Scholz
2015-02-04 17:04 ` [PATCH v2 0/2] " Bruno Bottazzini
2015-02-04 17:04   ` [PATCH v2 1/2] systemd: update " Bruno Bottazzini
2015-02-04 17:04   ` [PATCH v2 2/2] systemd: split modules into packages Bruno Bottazzini
2015-02-06 18:45     ` Randy Witt
2015-03-02 20:21       ` Bottazzini, Bruno
2015-03-04  9:22         ` Anders Darander
2015-02-26 19:29 ` [PATCH] mkefidisk: change filesystem to be writeable on grub Bruno Bottazzini
2015-02-26 21:44   ` Randy Witt
2015-02-26 22:21     ` Bottazzini, Bruno
2015-02-27  1:05       ` randy.e.witt
2015-03-03 10:26         ` Patrick Ohly
2015-03-04 21:27 ` [PATCH 0/3] systemd and dbus split into packages Bruno Bottazzini
2015-03-04 21:27   ` [PATCH 1/3] dbus: split tools package Bruno Bottazzini
2015-03-05 11:01     ` Andreas Oberritter
2015-03-05 13:16       ` Bottazzini, Bruno
2015-03-05 14:09         ` Andreas Oberritter
2015-03-05 14:29           ` Bottazzini, Bruno
2015-03-05 14:49             ` Andreas Oberritter
2015-03-05 16:05               ` Bottazzini, Bruno
2015-03-04 21:27   ` [PATCH 2/3] systemd: verify if files test-udev and systemd-journal-flush exists Bruno Bottazzini
2015-03-04 21:27   ` [PATCH 3/3] systemd: split modules into packages Bruno Bottazzini
2015-03-05 14:28     ` Anders Darander
2015-03-05 16:14       ` Bottazzini, Bruno
2015-03-06  8:23         ` Anders Darander
2015-03-06 14:03           ` Bottazzini, Bruno
2015-03-06 22:51             ` Khem Raj
2015-03-09 13:37               ` Bottazzini, Bruno
2015-03-09 15:32                 ` Khem Raj
2015-03-09 16:08                   ` Bottazzini, Bruno
2015-03-25 21:49 ` [PATCH v3 0/4] systemd and dbus split " Bruno Bottazzini
2015-03-25 21:49   ` [PATCH 1/4] dbus: split tools package Bruno Bottazzini
2015-03-25 21:49   ` [PATCH 2/4] systemd: verify if files test-udev and systemd-journal-flush exists Bruno Bottazzini
2015-03-25 21:49   ` [PATCH 3/4] systemd: split modules into packages Bruno Bottazzini
2015-03-26  8:29     ` Anders Darander
2015-03-26 11:56       ` Otavio Salvador
2015-03-26 13:40         ` Bottazzini, Bruno
2015-03-26 13:43           ` Otavio Salvador
2015-03-26 13:53             ` Bottazzini, Bruno
2015-03-26 13:59               ` Otavio Salvador
2015-03-27 14:57           ` Anders Darander
2015-03-27 17:09             ` Bottazzini, Bruno
2015-03-27 17:11               ` Otavio Salvador
2015-03-27 17:13                 ` Bottazzini, Bruno
2015-03-26 17:25         ` Khem Raj
2015-03-26  8:52     ` Andreas Oberritter
2015-03-26 13:33       ` Bottazzini, Bruno
2015-03-26 13:38         ` Otavio Salvador
2015-03-25 21:49   ` [PATCH 4/4] systemd: v219 with stable fixes Bruno Bottazzini
2015-03-30 13:05     ` Bottazzini, Bruno
2015-03-30 13:40       ` Otavio Salvador
2015-03-30 17:42         ` Bottazzini, Bruno
2015-04-01 10:16     ` Jussi Kukkonen
2015-04-01 11:21       ` Anders Darander
2015-04-01 12:52       ` Bottazzini, Bruno
2015-04-15 15:01         ` Burton, Ross
2015-04-15 15:37           ` Bottazzini, Bruno
2015-04-15 15:53             ` Burton, Ross
2015-04-15 16:29               ` Bottazzini, Bruno

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.