All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] upgrade systemd to 215 and other misc fixes
@ 2014-08-14  8:45 Chen Qi
  2014-08-14  8:46 ` [PATCH 01/10] systemd: upgrade to 215 Chen Qi
                   ` (9 more replies)
  0 siblings, 10 replies; 18+ messages in thread
From: Chen Qi @ 2014-08-14  8:45 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 4321c553d5ae816e566234e981a0815bba046d39:

  SIGGEN_EXCLUDERECIPES_ABISAFE: add initscripts (2014-08-11 17:44:09 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib ChenQi/systemd-misc-fixes
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/systemd-misc-fixes

Chen Qi (10):
  systemd: upgrade to 215
  systemd: add libdw to RDEPENDS
  systemd: make runlevel work in non-runlevel targets
  update-rc.d: fix logic in populate_packages_updatercd
  alsa-state: fix pkg_postinst and set INHIBIT_UPDATERCD_BBCLASS
  keymaps: fix for systemd
  systemd: add kbd-keymaps to RRECOMMENDS of systemd-vconsole-setup
  v86d: set INHIBIT_UPDATERCD_BBCLASS if 'sysvinit' not in
    DISTRO_FEATURES
  systemd: add support for executing scripts under /etc/rcS.d
  dhcp: add dhcpd.service

 meta/classes/update-rc.d.bbclass                   |    2 +-
 meta/recipes-bsp/alsa-state/alsa-state.bb          |   11 +-
 meta/recipes-bsp/keymaps/keymaps_1.0.bb            |   17 ++-
 meta/recipes-bsp/v86d/v86d_0.1.10.bb               |    7 ++
 meta/recipes-connectivity/dhcp/dhcp.inc            |   18 ++-
 meta/recipes-connectivity/dhcp/files/dhcpd.service |   11 ++
 ...ort-for-executing-scripts-under-etc-rcS.d.patch |   93 ++++++++++++++++
 ...k-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch |  116 ++++++++++++++++++++
 ...icitly-include-endian.h-wherever-we-want-.patch |   52 +++++++++
 .../systemd/systemd/systemd-older-kernel.patch     |   56 ----------
 .../systemd/{systemd_213.bb => systemd_215.bb}     |   27 ++++-
 11 files changed, 337 insertions(+), 73 deletions(-)
 create mode 100644 meta/recipes-connectivity/dhcp/files/dhcpd.service
 create mode 100644 meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0001-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0002-endian-explicitly-include-endian.h-wherever-we-want-.patch
 delete mode 100644 meta/recipes-core/systemd/systemd/systemd-older-kernel.patch
 rename meta/recipes-core/systemd/{systemd_213.bb => systemd_215.bb} (89%)

-- 
1.7.9.5



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

* [PATCH 01/10] systemd: upgrade to 215
  2014-08-14  8:45 [PATCH 00/10] upgrade systemd to 215 and other misc fixes Chen Qi
@ 2014-08-14  8:46 ` Chen Qi
  2014-08-14  8:46 ` [PATCH 02/10] systemd: add libdw to RDEPENDS Chen Qi
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: Chen Qi @ 2014-08-14  8:46 UTC (permalink / raw)
  To: openembedded-core

Upgrade systemd from 213 to 215.

systemd-older-kernel.patch is removed as it's fixed in 215.

Backport two patches to fix compilation problem for qemuppc.

    0001-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch
    0002-endian-explicitly-include-endian.h-wherever-we-want-.patch

Below are the required kernel versions for systemd 215.
        Linux kernel >= 3.0
        Linux kernel >= 3.3 for loop device partition support features with nspawn
        Linux kernel >= 3.8 for Smack support

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 ...k-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch |  116 ++++++++++++++++++++
 ...icitly-include-endian.h-wherever-we-want-.patch |   52 +++++++++
 .../systemd/systemd/systemd-older-kernel.patch     |   56 ----------
 .../systemd/{systemd_213.bb => systemd_215.bb}     |   10 +-
 4 files changed, 174 insertions(+), 60 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0002-endian-explicitly-include-endian.h-wherever-we-want-.patch
 delete mode 100644 meta/recipes-core/systemd/systemd/systemd-older-kernel.patch
 rename meta/recipes-core/systemd/{systemd_213.bb => systemd_215.bb} (97%)

diff --git a/meta/recipes-core/systemd/systemd/0001-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch b/meta/recipes-core/systemd/systemd/0001-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch
new file mode 100644
index 0000000..228d835
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch
@@ -0,0 +1,116 @@
+Upstream-Status: Backport
+
+Subject: always check for __BYTE_ORDER == __BIG_ENDIAN when checking for endianess
+
+Let's always stick to glibc's way to determine byte order, and not mix
+autoconf-specific checks with gcc checks.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/shared/architecture.h |   12 ++++++------
+ src/shared/gpt.h          |    4 ++--
+ src/shared/time-dst.c     |    6 +++---
+ 3 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/src/shared/architecture.h b/src/shared/architecture.h
+index 4821d5d..58e97e5 100644
+--- a/src/shared/architecture.h
++++ b/src/shared/architecture.h
+@@ -80,7 +80,7 @@ Architecture uname_architecture(void);
+ #  define native_architecture() ARCHITECTURE_X86
+ #  define LIB_ARCH_TUPLE "i386-linux-gnu"
+ #elif defined(__powerpc64__)
+-#  if defined(WORDS_BIGENDIAN)
++#  if __BYTE_ORDER == __BIG_ENDIAN
+ #    define native_architecture() ARCHITECTURE_PPC64
+ #    define LIB_ARCH_TUPLE "ppc64-linux-gnu"
+ #  else
+@@ -88,7 +88,7 @@ Architecture uname_architecture(void);
+ #    error "Missing LIB_ARCH_TUPLE for PPC64LE"
+ #  endif
+ #elif defined(__powerpc__)
+-#  if defined(WORDS_BIGENDIAN)
++#  if __BYTE_ORDER == __BIG_ENDIAN
+ #    define native_architecture() ARCHITECTURE_PPC
+ #    define LIB_ARCH_TUPLE "powerpc-linux-gnu"
+ #  else
+@@ -117,7 +117,7 @@ Architecture uname_architecture(void);
+ #  define native_architecture() ARCHITECTURE_SPARC
+ #  define LIB_ARCH_TUPLE "sparc-linux-gnu"
+ #elif defined(__mips64__)
+-#  if defined(WORDS_BIGENDIAN)
++#  if __BYTE_ORDER == __BIG_ENDIAN
+ #    define native_architecture() ARCHITECTURE_MIPS64
+ #    error "Missing LIB_ARCH_TUPLE for MIPS64"
+ #  else
+@@ -125,7 +125,7 @@ Architecture uname_architecture(void);
+ #    error "Missing LIB_ARCH_TUPLE for MIPS64_LE"
+ #  endif
+ #elif defined(__mips__)
+-#  if defined(WORDS_BIGENDIAN)
++#  if __BYTE_ORDER == __BIG_ENDIAN
+ #    define native_architecture() ARCHITECTURE_MIPS
+ #    define LIB_ARCH_TUPLE "mips-linux-gnu"
+ #  else
+@@ -136,7 +136,7 @@ Architecture uname_architecture(void);
+ #  define native_architecture() ARCHITECTURE_ALPHA
+ #  define LIB_ARCH_TUPLE "alpha-linux-gnu"
+ #elif defined(__aarch64__)
+-#  if defined(WORDS_BIGENDIAN)
++#  if __BYTE_ORDER == __BIG_ENDIAN
+ #    define native_architecture() ARCHITECTURE_ARM64_BE
+ #    define LIB_ARCH_TUPLE "aarch64_be-linux-gnu"
+ #  else
+@@ -144,7 +144,7 @@ Architecture uname_architecture(void);
+ #    define LIB_ARCH_TUPLE "aarch64-linux-gnu"
+ #  endif
+ #elif defined(__arm__)
+-#  if defined(WORDS_BIGENDIAN)
++#  if __BYTE_ORDER == __BIG_ENDIAN
+ #    define native_architecture() ARCHITECTURE_ARM_BE
+ #    if defined(__ARM_EABI__)
+ #      if defined(__ARM_PCS_VFP)
+diff --git a/src/shared/gpt.h b/src/shared/gpt.h
+index 64090e0..278940b 100644
+--- a/src/shared/gpt.h
++++ b/src/shared/gpt.h
+@@ -42,10 +42,10 @@
+ #  define GPT_ROOT_NATIVE GPT_ROOT_X86
+ #endif
+ 
+-#if defined(__aarch64__) && !defined(WORDS_BIGENDIAN)
++#if defined(__aarch64__) && (__BYTE_ORDER != __BIG_ENDIAN)
+ #  define GPT_ROOT_NATIVE GPT_ROOT_ARM_64
+ #  define GPT_ROOT_SECONDARY GPT_ROOT_ARM
+-#elif defined(__arm__) && !defined(WORDS_BIGENDIAN)
++#elif defined(__arm__) && (__BYTE_ORDER != __BIG_ENDIAN)
+ #  define GPT_ROOT_NATIVE GPT_ROOT_ARM
+ #endif
+ 
+diff --git a/src/shared/time-dst.c b/src/shared/time-dst.c
+index ceca2fa..6195b11 100644
+--- a/src/shared/time-dst.c
++++ b/src/shared/time-dst.c
+@@ -207,8 +207,8 @@ read_again:
+                 if (type_idxs[i] >= num_types)
+                         return -EINVAL;
+ 
+-        if (BYTE_ORDER == BIG_ENDIAN ? sizeof(time_t) == 8 && trans_width == 4
+-                                     : sizeof(time_t) == 4 || trans_width == 4) {
++        if (__BYTE_ORDER == __BIG_ENDIAN ? sizeof(time_t) == 8 && trans_width == 4
++                                         : sizeof(time_t) == 4 || trans_width == 4) {
+                 /* Decode the transition times, stored as 4-byte integers in
+                    network (big-endian) byte order.  We work from the end of
+                    the array so as not to clobber the next element to be
+@@ -216,7 +216,7 @@ read_again:
+                 i = num_transitions;
+                 while (i-- > 0)
+                         transitions[i] = decode((char *)transitions + i * 4);
+-        } else if (BYTE_ORDER != BIG_ENDIAN && sizeof(time_t) == 8) {
++        } else if (__BYTE_ORDER != __BIG_ENDIAN && sizeof(time_t) == 8) {
+                 /* Decode the transition times, stored as 8-byte integers in
+                    network (big-endian) byte order.  */
+                 for (i = 0; i < num_transitions; ++i)
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-core/systemd/systemd/0002-endian-explicitly-include-endian.h-wherever-we-want-.patch b/meta/recipes-core/systemd/systemd/0002-endian-explicitly-include-endian.h-wherever-we-want-.patch
new file mode 100644
index 0000000..5494192
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0002-endian-explicitly-include-endian.h-wherever-we-want-.patch
@@ -0,0 +1,52 @@
+Upstream-Status: Backport
+
+Subject: endian: explicitly include endian.h wherever we want to use __BYTE_ORDER
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/libsystemd/sd-bus/bus-protocol.h |    1 +
+ src/shared/architecture.h            |    2 ++
+ src/shared/gpt.h                     |    2 ++
+ 3 files changed, 5 insertions(+)
+
+diff --git a/src/libsystemd/sd-bus/bus-protocol.h b/src/libsystemd/sd-bus/bus-protocol.h
+index 5046d17..4f46468 100644
+--- a/src/libsystemd/sd-bus/bus-protocol.h
++++ b/src/libsystemd/sd-bus/bus-protocol.h
+@@ -21,6 +21,7 @@
+   along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+ 
++#include <endian.h>
+ 
+ /* Endianness */
+ 
+diff --git a/src/shared/architecture.h b/src/shared/architecture.h
+index 58e97e5..38780d1 100644
+--- a/src/shared/architecture.h
++++ b/src/shared/architecture.h
+@@ -21,6 +21,8 @@
+   along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+ 
++#include <endian.h>
++
+ #include "util.h"
+ 
+ /* A cleaned up architecture definition. We don't want to get lost in
+diff --git a/src/shared/gpt.h b/src/shared/gpt.h
+index 278940b..ef3444f 100644
+--- a/src/shared/gpt.h
++++ b/src/shared/gpt.h
+@@ -19,6 +19,8 @@
+   along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+ 
++#include <endian.h>
++
+ #include "sd-id128.h"
+ 
+ /* We only support root disk discovery for x86, x86-64 and ARM for
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-core/systemd/systemd/systemd-older-kernel.patch b/meta/recipes-core/systemd/systemd/systemd-older-kernel.patch
deleted file mode 100644
index 18b50e7..0000000
--- a/meta/recipes-core/systemd/systemd/systemd-older-kernel.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 6109f02dcc4f2d7a461c5772bab494f5753a2203 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 29 May 2014 08:09:07 +0000
-Subject: [PATCH] rtnl-types.c: check IFLA_VLAN_PROTOCOL
-
-The older kernel's linux/if_link.h doesn't have IFLA_VLAN_PROTOCOL, we need
-check whether it has been defined or not.
-
-The maintainer said that he would fix it:
-
-http://thread.gmane.org/gmane.comp.sysutils.systemd.devel/18200
-
-Also we need redefine IFLA_MAX from 34 to 35 when define IFLA_CARRIER,
-otherwise there would be error:
-
-| src/libsystemd/sd-rtnl/rtnl-types.c:233:9: error: array index in initializer exceeds array bounds
-|          [IFLA_CARRIER]          = { .type = NLA_U8 },
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- src/libsystemd/sd-rtnl/rtnl-types.c | 2 ++
- src/shared/missing.h                | 2 ++
- 2 files changed, 4 insertions(+)
-
-diff --git a/src/libsystemd/sd-rtnl/rtnl-types.c b/src/libsystemd/sd-rtnl/rtnl-types.c
-index 44ac5ec..ab6161f 100644
---- a/src/libsystemd/sd-rtnl/rtnl-types.c
-+++ b/src/libsystemd/sd-rtnl/rtnl-types.c
-@@ -67,7 +67,9 @@ static const NLType rtnl_link_info_data_vlan_types[IFLA_VLAN_MAX + 1] = {
-         [IFLA_VLAN_EGRESS_QOS]  = { .type = NLA_NESTED },
-         [IFLA_VLAN_INGRESS_QOS] = { .type = NLA_NESTED },
- */
-+#ifdef IFLA_VLAN_PROTOCOL
-         [IFLA_VLAN_PROTOCOL]    = { .type = NLA_U16 },
-+#endif
- };
- 
- static const NLType rtnl_link_info_data_bond_types[IFLA_BOND_MAX + 1] = {
-diff --git a/src/shared/missing.h b/src/shared/missing.h
-index d5ec2f8..732853f 100644
---- a/src/shared/missing.h
-+++ b/src/shared/missing.h
-@@ -94,6 +94,8 @@
- 
- #ifndef IFLA_CARRIER
-   #define IFLA_CARRIER 33
-+  #undef IFLA_MAX
-+  #define IFLA_MAX 35
-   #ifndef IFLA_NUM_RX_QUEUES
-     #define IFLA_NUM_RX_QUEUES 32
-     #ifndef IFLA_NUM_TX_QUEUES
--- 
-1.8.3.4
-
diff --git a/meta/recipes-core/systemd/systemd_213.bb b/meta/recipes-core/systemd/systemd_215.bb
similarity index 97%
rename from meta/recipes-core/systemd/systemd_213.bb
rename to meta/recipes-core/systemd/systemd_215.bb
index 4fb7ffc..770787b 100644
--- a/meta/recipes-core/systemd/systemd_213.bb
+++ b/meta/recipes-core/systemd/systemd_215.bb
@@ -17,9 +17,9 @@ SECTION = "base/shell"
 
 inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest
 
-SRCREV = "c9679c652b3c31f2510e8805d81630680ebc7e95"
+SRCREV = "252ff40a3827b4e8e62e03a5e2f80da3fe02bee6"
 
-PV = "213+git${SRCPV}"
+PV = "215+git${SRCPV}"
 
 SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=git \
            file://binfmt-install.patch \
@@ -31,12 +31,13 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
            file://0001-uClibc-doesn-t-implement-pwritev-preadv.patch \
            file://uclibc-sysinfo_h.patch \
            file://uclibc-get-physmem.patch \
+           file://0001-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch \
+           file://0002-endian-explicitly-include-endian.h-wherever-we-want-.patch \
            file://touchscreen.rules \
            file://00-create-volatile.conf \
            file://init \
            file://run-ptest \
-           file://systemd-older-kernel.patch \
-          "
+         "
 
 S = "${WORKDIR}/git"
 
@@ -231,6 +232,7 @@ FILES_${PN} = " ${base_bindir}/* \
                 ${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 \
-- 
1.7.9.5



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

* [PATCH 02/10] systemd: add libdw to RDEPENDS
  2014-08-14  8:45 [PATCH 00/10] upgrade systemd to 215 and other misc fixes Chen Qi
  2014-08-14  8:46 ` [PATCH 01/10] systemd: upgrade to 215 Chen Qi
@ 2014-08-14  8:46 ` Chen Qi
  2014-08-14  8:54   ` Martin Jansa
  2014-08-14  8:46 ` [PATCH 03/10] systemd: make runlevel work in non-runlevel targets Chen Qi
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 18+ messages in thread
From: Chen Qi @ 2014-08-14  8:46 UTC (permalink / raw)
  To: openembedded-core

Add libdw to RDEPENDS of systemd to avoid build-deps QA warning.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/systemd/systemd_215.bb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_215.bb b/meta/recipes-core/systemd/systemd_215.bb
index 770787b..a52a042 100644
--- a/meta/recipes-core/systemd/systemd_215.bb
+++ b/meta/recipes-core/systemd/systemd_215.bb
@@ -244,7 +244,7 @@ FILES_${PN} = " ${base_bindir}/* \
 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} += "libdw kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
 RDEPENDS_${PN} += "volatile-binds"
 
 RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units udev-hwdb\
-- 
1.7.9.5



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

* [PATCH 03/10] systemd: make runlevel work in non-runlevel targets
  2014-08-14  8:45 [PATCH 00/10] upgrade systemd to 215 and other misc fixes Chen Qi
  2014-08-14  8:46 ` [PATCH 01/10] systemd: upgrade to 215 Chen Qi
  2014-08-14  8:46 ` [PATCH 02/10] systemd: add libdw to RDEPENDS Chen Qi
@ 2014-08-14  8:46 ` Chen Qi
  2014-08-14  8:46 ` [PATCH 04/10] update-rc.d: fix logic in populate_packages_updatercd Chen Qi
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: Chen Qi @ 2014-08-14  8:46 UTC (permalink / raw)
  To: openembedded-core

Previously, after booting into the targets like multi-user.target or
graphical.target, the output of `runlevel' command is 'unknown'.

This is confusing for users. Normally, we would expect mutli-user.target
would have a `runlevel' output of 'N 3'.
This is the behaviour of Fedora20.

This patch installs symlinks for systemd-update-utmp-runlevel.service
in do_install task to fix the above problem.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/systemd/systemd_215.bb |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/meta/recipes-core/systemd/systemd_215.bb b/meta/recipes-core/systemd/systemd_215.bb
index a52a042..10dab8e 100644
--- a/meta/recipes-core/systemd/systemd_215.bb
+++ b/meta/recipes-core/systemd/systemd_215.bb
@@ -127,6 +127,18 @@ do_install() {
 
         # Delete journal README, as log can be symlinked inside volatile.
         rm -f ${D}/${localstatedir}/log/README
+
+	# Create symlinks for systemd-update-utmp-runlevel.service
+	install -d ${D}${systemd_unitdir}/system/graphical.target.wants
+	install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
+	install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
+	install -d ${D}${systemd_unitdir}/system/reboot.target.wants
+	install -d ${D}${systemd_unitdir}/system/rescue.target.wants
+	ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
+	ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
+	ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
+	ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
+	ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
 }
 
 do_install_ptest () {
-- 
1.7.9.5



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

* [PATCH 04/10] update-rc.d: fix logic in populate_packages_updatercd
  2014-08-14  8:45 [PATCH 00/10] upgrade systemd to 215 and other misc fixes Chen Qi
                   ` (2 preceding siblings ...)
  2014-08-14  8:46 ` [PATCH 03/10] systemd: make runlevel work in non-runlevel targets Chen Qi
@ 2014-08-14  8:46 ` Chen Qi
  2014-08-14  8:46 ` [PATCH 05/10] alsa-state: fix pkg_postinst and set INHIBIT_UPDATERCD_BBCLASS Chen Qi
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: Chen Qi @ 2014-08-14  8:46 UTC (permalink / raw)
  To: openembedded-core

The 'and' logic for the check is wrong. To make things clear, please
see the example below.

Say that we have a recipe A, which has a sysv-init style init script named
initA and no corresponding service file. The recipe inherits update-rc.d,
but it doesn't inherit systemd.bbclass. The DISTRO_FEATURES has 'systemd'
inside it, but it doesn't have 'sysvinit'. Now if we build an image, with
the 'and' logic in the check, the symlinks for initA would not be installed
into /etc/rc?.d directory.
This is incorrect. Because there's no corresponding service. The symlinks
in /etc/rc?.d/ should be created so that the service would be correctly
started at boot time.

The logic should really be 'or' in the check. This is actually what the code
was when it was originally written.

Several different situations are listed below to prove the correctness of the
'or' logic.

If 'sysvinit' is in DISTRO_FEATURES, the initA script would always be installed
with corresponding preisnt/postinst generated and added.

If 'sysvinit' is not in DISTRO_FEATURES, we have three situations.
1) A has initA and A.service.
   In such situation, systemd.bbclass would set INHIBIT_UPDATERCD_BBCLASS,
   so no preinst/postinst about update-rc.d would be added and the symlinks
   for initA would not be created.

2) A has initA, and the functionality of initA is not implemented internally
   in systemd.
   In such situation, symlinks for initA would be installed.

3) A has initA, and the functionality of initA is implemented internally in
   systemd or in some other recipe.
   Examples for such situation are alsa-state and keymaps in OE.
   In such situation, we need to set INHIBIT_UPDATERCD_BBCLASS in the recipe
   so that there would be no preinst/postinst scripts about update-rc.d added.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/classes/update-rc.d.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 19b081d..3c5414b 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -121,7 +121,7 @@ python populate_packages_updatercd () {
 
     # Check that this class isn't being inhibited (generally, by
     # systemd.bbclass) before doing any work.
-    if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) and \
+    if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) or \
        not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):
         pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
         if pkgs == None:
-- 
1.7.9.5



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

* [PATCH 05/10] alsa-state: fix pkg_postinst and set INHIBIT_UPDATERCD_BBCLASS
  2014-08-14  8:45 [PATCH 00/10] upgrade systemd to 215 and other misc fixes Chen Qi
                   ` (3 preceding siblings ...)
  2014-08-14  8:46 ` [PATCH 04/10] update-rc.d: fix logic in populate_packages_updatercd Chen Qi
@ 2014-08-14  8:46 ` Chen Qi
  2014-08-14  8:46 ` [PATCH 06/10] keymaps: fix for systemd Chen Qi
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: Chen Qi @ 2014-08-14  8:46 UTC (permalink / raw)
  To: openembedded-core

As alsa-state inherits update-rc.d, the update-rc.d part inpostinst script
has already been handled in update-rc.d.bbclass.

Besides, we need to set INHIBIT_UPDATERCD_BBCLASS to "1" if 'sysvinit'
is not in DISTRO_FEATURES. This is because the init script is not installed
in such situation, adding update-rc.d part in the preinst/postinst scripts
just makes no sense.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-bsp/alsa-state/alsa-state.bb |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-bsp/alsa-state/alsa-state.bb b/meta/recipes-bsp/alsa-state/alsa-state.bb
index d2f8ea2..17c2d00 100644
--- a/meta/recipes-bsp/alsa-state/alsa-state.bb
+++ b/meta/recipes-bsp/alsa-state/alsa-state.bb
@@ -18,6 +18,13 @@ SRC_URI = "\
   file://alsa-state-init \
 "
 
+# As the recipe doesn't inherit systemd.bbclass, we need to set this variable
+# manually to avoid unnecessary postinst/preinst generated.
+python __anonymous() {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
 inherit update-rc.d
 
 INITSCRIPT_NAME = "alsa-state"
@@ -54,9 +61,5 @@ pkg_postinst_${PN}() {
 		then
 			${sbindir}/alsactl -f ${localstatedir}/lib/alsa/asound.state restore
 		fi
-		# INITSCRIPT_PARAMS changed, so remove the old and
-		# install the new setting.
-		update-rc.d -f ${INITSCRIPT_NAME} remove
-		update-rc.d ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
 	fi
 }
-- 
1.7.9.5



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

* [PATCH 06/10] keymaps: fix for systemd
  2014-08-14  8:45 [PATCH 00/10] upgrade systemd to 215 and other misc fixes Chen Qi
                   ` (4 preceding siblings ...)
  2014-08-14  8:46 ` [PATCH 05/10] alsa-state: fix pkg_postinst and set INHIBIT_UPDATERCD_BBCLASS Chen Qi
@ 2014-08-14  8:46 ` Chen Qi
  2014-08-14  8:46 ` [PATCH 07/10] systemd: add kbd-keymaps to RRECOMMENDS of systemd-vconsole-setup Chen Qi
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: Chen Qi @ 2014-08-14  8:46 UTC (permalink / raw)
  To: openembedded-core

Only install 'keymap.sh' script if 'sysvinit' is in DISTRO_FEATURES.
This is because systemd internally provides a mechanism to implement
the functionality this script tries to implement. Please see
systemd-vconsole-setup.service for more details.

Also we set 'INHIBIT_UPDATERCD_BBCLASS' to "1" if 'sysvinit' is not
in DISTRO_FEATURES.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-bsp/keymaps/keymaps_1.0.bb |   17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-bsp/keymaps/keymaps_1.0.bb b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
index 123db3e..5a3f974 100644
--- a/meta/recipes-bsp/keymaps/keymaps_1.0.bb
+++ b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
@@ -14,6 +14,13 @@ PR = "r31"
 
 INHIBIT_DEFAULT_DEPS = "1"
 
+# As the recipe doesn't inherit systemd.bbclass, we need to set this variable
+# manually to avoid unnecessary postinst/preinst generated.
+python __anonymous() {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
 inherit update-rc.d
 
 SRC_URI = "file://keymap.sh \
@@ -23,6 +30,12 @@ INITSCRIPT_NAME = "keymap.sh"
 INITSCRIPT_PARAMS = "start 01 S ."
 
 do_install () {
-    install -d ${D}${sysconfdir}/init.d/
-    install -m 0755 ${WORKDIR}/keymap.sh ${D}${sysconfdir}/init.d/
+    # Only install the script if 'sysvinit' is in DISTRO_FEATURES
+    # THe ulitity this script provides could be achieved by systemd-vconsole-setup.service
+    if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+	install -d ${D}${sysconfdir}/init.d/
+	install -m 0755 ${WORKDIR}/keymap.sh ${D}${sysconfdir}/init.d/
+    fi
 }
+
+ALLOW_EMPTY_${PN} = "1"
-- 
1.7.9.5



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

* [PATCH 07/10] systemd: add kbd-keymaps to RRECOMMENDS of systemd-vconsole-setup
  2014-08-14  8:45 [PATCH 00/10] upgrade systemd to 215 and other misc fixes Chen Qi
                   ` (5 preceding siblings ...)
  2014-08-14  8:46 ` [PATCH 06/10] keymaps: fix for systemd Chen Qi
@ 2014-08-14  8:46 ` Chen Qi
  2014-08-14  8:46 ` [PATCH 08/10] v86d: set INHIBIT_UPDATERCD_BBCLASS if 'sysvinit' not in DISTRO_FEATURES Chen Qi
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: Chen Qi @ 2014-08-14  8:46 UTC (permalink / raw)
  To: openembedded-core

systemd-vconsole-setup.service not only configures font but also
keymaps.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/systemd/systemd_215.bb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_215.bb b/meta/recipes-core/systemd/systemd_215.bb
index 10dab8e..bc5592a 100644
--- a/meta/recipes-core/systemd/systemd_215.bb
+++ b/meta/recipes-core/systemd/systemd_215.bb
@@ -206,7 +206,7 @@ FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
                       ${systemd_unitdir}/system/systemd-binfmt.service"
 RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
 
-RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts"
+RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
 
 CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
                 ${sysconfdir}/systemd/logind.conf \
-- 
1.7.9.5



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

* [PATCH 08/10] v86d: set INHIBIT_UPDATERCD_BBCLASS if 'sysvinit' not in DISTRO_FEATURES
  2014-08-14  8:45 [PATCH 00/10] upgrade systemd to 215 and other misc fixes Chen Qi
                   ` (6 preceding siblings ...)
  2014-08-14  8:46 ` [PATCH 07/10] systemd: add kbd-keymaps to RRECOMMENDS of systemd-vconsole-setup Chen Qi
@ 2014-08-14  8:46 ` Chen Qi
  2014-08-14 13:07   ` Otavio Salvador
  2014-08-15  1:57   ` ChenQi
  2014-08-14  8:46 ` [PATCH 09/10] systemd: add support for executing scripts under /etc/rcS.d Chen Qi
  2014-08-14  8:46 ` [PATCH 10/10] dhcp: add dhcpd.service Chen Qi
  9 siblings, 2 replies; 18+ messages in thread
From: Chen Qi @ 2014-08-14  8:46 UTC (permalink / raw)
  To: openembedded-core

Set INHIBIT_UPDATERCD_BBCLASS to "1" if 'sysvinit' is not in DISTRO_FEATURES.

The functionality of the init script 'fbsetup' is implemented internally in
systemd. So fbsetup is not installed if 'sysvinit' is in DISTRO_FEATURES.

That's why we need to set INHIBIT_UPDATERCD_BBCLASS to "1" to avoid
generation of update-rc.d related preinst/postinst scripts.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-bsp/v86d/v86d_0.1.10.bb |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-bsp/v86d/v86d_0.1.10.bb b/meta/recipes-bsp/v86d/v86d_0.1.10.bb
index 08438be..7ccb4ee 100644
--- a/meta/recipes-bsp/v86d/v86d_0.1.10.bb
+++ b/meta/recipes-bsp/v86d/v86d_0.1.10.bb
@@ -49,4 +49,11 @@ do_install () {
         fi
 }
 
+# As the recipe doesn't inherit systemd.bbclass, we need to set this variable
+# manually to avoid unnecessary postinst/preinst generated.
+python __anonymous() {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
 inherit update-rc.d
-- 
1.7.9.5



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

* [PATCH 09/10] systemd: add support for executing scripts under /etc/rcS.d
  2014-08-14  8:45 [PATCH 00/10] upgrade systemd to 215 and other misc fixes Chen Qi
                   ` (7 preceding siblings ...)
  2014-08-14  8:46 ` [PATCH 08/10] v86d: set INHIBIT_UPDATERCD_BBCLASS if 'sysvinit' not in DISTRO_FEATURES Chen Qi
@ 2014-08-14  8:46 ` Chen Qi
  2014-08-14  8:46 ` [PATCH 10/10] dhcp: add dhcpd.service Chen Qi
  9 siblings, 0 replies; 18+ messages in thread
From: Chen Qi @ 2014-08-14  8:46 UTC (permalink / raw)
  To: openembedded-core

This patch adds support for systemd to execute scripts under /etc/rcS.d.

The patch references the patch below from Debian.
http://sources.debian.net/src/systemd/204-5/debian/patches/debian-changes/?hl=1391#L1391

[YOCTO #5159]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 ...ort-for-executing-scripts-under-etc-rcS.d.patch |   93 ++++++++++++++++++++
 meta/recipes-core/systemd/systemd_215.bb           |    1 +
 2 files changed, 94 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch

diff --git a/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch
new file mode 100644
index 0000000..c1b52f6
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch
@@ -0,0 +1,93 @@
+Upstream-Status: Inappropriate [OE specific]
+
+Subject: add support for executing scripts under /etc/rcS.d/
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/sysv-generator/sysv-generator.c |   19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
+index 9a869ba..976f58a 100644
+--- a/src/sysv-generator/sysv-generator.c
++++ b/src/sysv-generator/sysv-generator.c
+@@ -43,7 +43,8 @@
+ 
+ typedef enum RunlevelType {
+         RUNLEVEL_UP,
+-        RUNLEVEL_DOWN
++        RUNLEVEL_DOWN,
++        RUNLEVEL_SYSINIT
+ } RunlevelType;
+ 
+ static const struct {
+@@ -58,6 +59,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 }
+@@ -66,7 +70,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 {
+@@ -82,6 +86,7 @@ typedef struct SysvStub {
+         char **conflicts;
+         bool has_lsb;
+         bool reload;
++        bool default_dependencies;
+ } SysvStub;
+ 
+ const char *arg_dest = "/tmp";
+@@ -156,6 +161,9 @@ 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))
+@@ -725,6 +733,7 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
+                                 return log_oom();
+ 
+                         service->sysv_start_priority = -1;
++                        service->default_dependencies = true;
+                         service->name = name;
+                         service->path = fpath;
+ 
+@@ -810,9 +819,10 @@ 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;
+                                         }
+ 
+                                         r = set_ensure_allocated(&runlevel_services[i],
+@@ -825,7 +835,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,
+                                                                  trivial_hash_func, trivial_compare_func);
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-core/systemd/systemd_215.bb b/meta/recipes-core/systemd/systemd_215.bb
index bc5592a..738babd 100644
--- a/meta/recipes-core/systemd/systemd_215.bb
+++ b/meta/recipes-core/systemd/systemd_215.bb
@@ -33,6 +33,7 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
            file://uclibc-get-physmem.patch \
            file://0001-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch \
            file://0002-endian-explicitly-include-endian.h-wherever-we-want-.patch \
+           file://0001-add-support-for-executing-scripts-under-etc-rcS.d.patch \
            file://touchscreen.rules \
            file://00-create-volatile.conf \
            file://init \
-- 
1.7.9.5



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

* [PATCH 10/10] dhcp: add dhcpd.service
  2014-08-14  8:45 [PATCH 00/10] upgrade systemd to 215 and other misc fixes Chen Qi
                   ` (8 preceding siblings ...)
  2014-08-14  8:46 ` [PATCH 09/10] systemd: add support for executing scripts under /etc/rcS.d Chen Qi
@ 2014-08-14  8:46 ` Chen Qi
  9 siblings, 0 replies; 18+ messages in thread
From: Chen Qi @ 2014-08-14  8:46 UTC (permalink / raw)
  To: openembedded-core

Add dhcpd.service to support systemd systems.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-connectivity/dhcp/dhcp.inc            |   18 ++++++++++++++----
 meta/recipes-connectivity/dhcp/files/dhcpd.service |   11 +++++++++++
 2 files changed, 25 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-connectivity/dhcp/files/dhcpd.service

diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc b/meta/recipes-connectivity/dhcp/dhcp.inc
index 512127c..b281f94 100644
--- a/meta/recipes-connectivity/dhcp/dhcp.inc
+++ b/meta/recipes-connectivity/dhcp/dhcp.inc
@@ -14,11 +14,16 @@ DEPENDS = "openssl bind"
 
 SRC_URI = "ftp://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \
            file://site.h \
-	   file://init-relay file://default-relay \
-	   file://init-server file://default-server \
-	   file://dhclient.conf file://dhcpd.conf"
+           file://init-relay file://default-relay \
+           file://init-server file://default-server \
+           file://dhclient.conf file://dhcpd.conf \
+           file://dhcpd.service"
 
-inherit autotools
+inherit autotools systemd
+
+SYSTEMD_PACKAGES = "dhcp-server"
+SYSTEMD_SERVICE_dhcp-server = "dhcpd.service"
+SYSTEMD_AUTO_ENABLE_dhcp-server = "disable"
 
 TARGET_CFLAGS += "-D_GNU_SOURCE"
 EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
@@ -51,6 +56,11 @@ do_install_append () {
 		mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/
 	fi
 	install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script
+
+	# Install systemd unit files
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/dhcpd.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/dhcpd.service
 }
 
 PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell"
diff --git a/meta/recipes-connectivity/dhcp/files/dhcpd.service b/meta/recipes-connectivity/dhcp/files/dhcpd.service
new file mode 100644
index 0000000..5c9ef6f
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhcpd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=DHCP Server Daemon
+After=network.target
+After=time-sync.target
+
+[Service]
+EnvironmentFile=/etc/default/dhcp-server
+ExecStart=-@SBINDIR@/dhcpd -q $INTERFACES
+
+[Install]
+WantedBy=multi-user.target
-- 
1.7.9.5



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

* Re: [PATCH 02/10] systemd: add libdw to RDEPENDS
  2014-08-14  8:46 ` [PATCH 02/10] systemd: add libdw to RDEPENDS Chen Qi
@ 2014-08-14  8:54   ` Martin Jansa
  2014-08-14  9:39     ` Richard Purdie
  0 siblings, 1 reply; 18+ messages in thread
From: Martin Jansa @ 2014-08-14  8:54 UTC (permalink / raw)
  To: Chen Qi; +Cc: openembedded-core

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

On Thu, Aug 14, 2014 at 04:46:01PM +0800, Chen Qi wrote:
> Add libdw to RDEPENDS of systemd to avoid build-deps QA warning.
> 
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  meta/recipes-core/systemd/systemd_215.bb |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/systemd/systemd_215.bb b/meta/recipes-core/systemd/systemd_215.bb
> index 770787b..a52a042 100644
> --- a/meta/recipes-core/systemd/systemd_215.bb
> +++ b/meta/recipes-core/systemd/systemd_215.bb
> @@ -244,7 +244,7 @@ FILES_${PN} = " ${base_bindir}/* \
>  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} += "libdw kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"

Shouldn't it be build-time dependency?

If it's detected from sysroot in do_configure then it has to be in
DEPENDS to get deterministic results.

>  RDEPENDS_${PN} += "volatile-binds"
>  
>  RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units udev-hwdb\
> -- 
> 1.7.9.5
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [PATCH 02/10] systemd: add libdw to RDEPENDS
  2014-08-14  8:54   ` Martin Jansa
@ 2014-08-14  9:39     ` Richard Purdie
  2014-08-14 11:32       ` Martin Jansa
  2014-08-15  3:00       ` ChenQi
  0 siblings, 2 replies; 18+ messages in thread
From: Richard Purdie @ 2014-08-14  9:39 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

On Thu, 2014-08-14 at 10:54 +0200, Martin Jansa wrote:
> On Thu, Aug 14, 2014 at 04:46:01PM +0800, Chen Qi wrote:
> > Add libdw to RDEPENDS of systemd to avoid build-deps QA warning.
> > 
> > Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> > ---
> >  meta/recipes-core/systemd/systemd_215.bb |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meta/recipes-core/systemd/systemd_215.bb b/meta/recipes-core/systemd/systemd_215.bb
> > index 770787b..a52a042 100644
> > --- a/meta/recipes-core/systemd/systemd_215.bb
> > +++ b/meta/recipes-core/systemd/systemd_215.bb
> > @@ -244,7 +244,7 @@ FILES_${PN} = " ${base_bindir}/* \
> >  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} += "libdw kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
> 
> Shouldn't it be build-time dependency?
> 
> If it's detected from sysroot in do_configure then it has to be in
> DEPENDS to get deterministic results.

Right. Secondly, what benefit does this library bring us?

Cheers,

Richard



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

* Re: [PATCH 02/10] systemd: add libdw to RDEPENDS
  2014-08-14  9:39     ` Richard Purdie
@ 2014-08-14 11:32       ` Martin Jansa
  2014-08-15  3:00       ` ChenQi
  1 sibling, 0 replies; 18+ messages in thread
From: Martin Jansa @ 2014-08-14 11:32 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

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

On Thu, Aug 14, 2014 at 10:39:07AM +0100, Richard Purdie wrote:
> On Thu, 2014-08-14 at 10:54 +0200, Martin Jansa wrote:
> > On Thu, Aug 14, 2014 at 04:46:01PM +0800, Chen Qi wrote:
> > > Add libdw to RDEPENDS of systemd to avoid build-deps QA warning.
> > > 
> > > Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> > > ---
> > >  meta/recipes-core/systemd/systemd_215.bb |    2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/meta/recipes-core/systemd/systemd_215.bb b/meta/recipes-core/systemd/systemd_215.bb
> > > index 770787b..a52a042 100644
> > > --- a/meta/recipes-core/systemd/systemd_215.bb
> > > +++ b/meta/recipes-core/systemd/systemd_215.bb
> > > @@ -244,7 +244,7 @@ FILES_${PN} = " ${base_bindir}/* \
> > >  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} += "libdw kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
> > 
> > Shouldn't it be build-time dependency?
> > 
> > If it's detected from sysroot in do_configure then it has to be in
> > DEPENDS to get deterministic results.
> 
> Right. Secondly, what benefit does this library bring us?

BTW: does someone know why libdw got picked by many components recenly
(something changed in last 2 days).

today's world build failed in gst-plugins-good_0.10.31.bb because of
missing libdw and there are at least 20 components autodetecting libdw
now:
http://logs.nslu2-linux.org/buildlogs/oe/world/log.world.20140813_204024.log/qa.log

elfutils weren't changed recently, so it has to be something else

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [PATCH 08/10] v86d: set INHIBIT_UPDATERCD_BBCLASS if 'sysvinit' not in DISTRO_FEATURES
  2014-08-14  8:46 ` [PATCH 08/10] v86d: set INHIBIT_UPDATERCD_BBCLASS if 'sysvinit' not in DISTRO_FEATURES Chen Qi
@ 2014-08-14 13:07   ` Otavio Salvador
  2014-08-15  1:57   ` ChenQi
  1 sibling, 0 replies; 18+ messages in thread
From: Otavio Salvador @ 2014-08-14 13:07 UTC (permalink / raw)
  To: Chen Qi; +Cc: Patches and discussions about the oe-core layer

On Thu, Aug 14, 2014 at 5:46 AM, Chen Qi <Qi.Chen@windriver.com> wrote:
> Set INHIBIT_UPDATERCD_BBCLASS to "1" if 'sysvinit' is not in DISTRO_FEATURES.
>
> The functionality of the init script 'fbsetup' is implemented internally in
> systemd. So fbsetup is not installed if 'sysvinit' is in DISTRO_FEATURES.
>
> That's why we need to set INHIBIT_UPDATERCD_BBCLASS to "1" to avoid
> generation of update-rc.d related preinst/postinst scripts.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>

Shouldn't this be handled in systemd class?

-- 
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] 18+ messages in thread

* Re: [PATCH 08/10] v86d: set INHIBIT_UPDATERCD_BBCLASS if 'sysvinit' not in DISTRO_FEATURES
  2014-08-14  8:46 ` [PATCH 08/10] v86d: set INHIBIT_UPDATERCD_BBCLASS if 'sysvinit' not in DISTRO_FEATURES Chen Qi
  2014-08-14 13:07   ` Otavio Salvador
@ 2014-08-15  1:57   ` ChenQi
  1 sibling, 0 replies; 18+ messages in thread
From: ChenQi @ 2014-08-15  1:57 UTC (permalink / raw)
  To: openembedded-core

On 08/14/2014 04:46 PM, Chen Qi wrote:
> Set INHIBIT_UPDATERCD_BBCLASS to "1" if 'sysvinit' is not in DISTRO_FEATURES.
>
> The functionality of the init script 'fbsetup' is implemented internally in
> systemd. So fbsetup is not installed if 'sysvinit' is in DISTRO_FEATURES.
>
> That's why we need to set INHIBIT_UPDATERCD_BBCLASS to "1" to avoid
> generation of update-rc.d related preinst/postinst scripts.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>   meta/recipes-bsp/v86d/v86d_0.1.10.bb |    7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/meta/recipes-bsp/v86d/v86d_0.1.10.bb b/meta/recipes-bsp/v86d/v86d_0.1.10.bb
> index 08438be..7ccb4ee 100644
> --- a/meta/recipes-bsp/v86d/v86d_0.1.10.bb
> +++ b/meta/recipes-bsp/v86d/v86d_0.1.10.bb
> @@ -49,4 +49,11 @@ do_install () {
>           fi
>   }
>   
> +# As the recipe doesn't inherit systemd.bbclass, we need to set this variable
> +# manually to avoid unnecessary postinst/preinst generated.
> +python __anonymous() {
> +    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
> +        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
> +}
> +
>   inherit update-rc.d

This recipe doesn't inherit systemd.bbclass, it doesn't have a systemd 
unit file.

There are more related information in the commit message of the 
following patch.
[OE-core] [PATCH 04/10] update-rc.d: fix logic in 
populate_packages_updatercd

Best Regards,
Chen Qi


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

* Re: [PATCH 02/10] systemd: add libdw to RDEPENDS
  2014-08-14  9:39     ` Richard Purdie
  2014-08-14 11:32       ` Martin Jansa
@ 2014-08-15  3:00       ` ChenQi
  2014-08-15  9:09         ` Martin Jansa
  1 sibling, 1 reply; 18+ messages in thread
From: ChenQi @ 2014-08-15  3:00 UTC (permalink / raw)
  To: Richard Purdie, Martin Jansa; +Cc: openembedded-core

On 08/14/2014 05:39 PM, Richard Purdie wrote:
> On Thu, 2014-08-14 at 10:54 +0200, Martin Jansa wrote:
>> On Thu, Aug 14, 2014 at 04:46:01PM +0800, Chen Qi wrote:
>>> Add libdw to RDEPENDS of systemd to avoid build-deps QA warning.
>>>
>>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>>> ---
>>>   meta/recipes-core/systemd/systemd_215.bb |    2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/meta/recipes-core/systemd/systemd_215.bb b/meta/recipes-core/systemd/systemd_215.bb
>>> index 770787b..a52a042 100644
>>> --- a/meta/recipes-core/systemd/systemd_215.bb
>>> +++ b/meta/recipes-core/systemd/systemd_215.bb
>>> @@ -244,7 +244,7 @@ FILES_${PN} = " ${base_bindir}/* \
>>>   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} += "libdw kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
>> Shouldn't it be build-time dependency?
>>
>> If it's detected from sysroot in do_configure then it has to be in
>> DEPENDS to get deterministic results.
> Right. Secondly, what benefit does this library bring us?
>
> Cheers,
>
> Richard
>
>
>

Richard & Martin,

Thanks for reminding me about this.
I shouldn't have rushed into fixing the QA warning without looking into 
the configure.ac file.

It should really be a PACKAGECONFIG for 'elfutils'.
PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,libelf 
libdw,libelf libdw"

I will send out V2 of this patchset.

Best Regards,
Chen Qi


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

* Re: [PATCH 02/10] systemd: add libdw to RDEPENDS
  2014-08-15  3:00       ` ChenQi
@ 2014-08-15  9:09         ` Martin Jansa
  0 siblings, 0 replies; 18+ messages in thread
From: Martin Jansa @ 2014-08-15  9:09 UTC (permalink / raw)
  To: ChenQi; +Cc: openembedded-core

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

On Fri, Aug 15, 2014 at 11:00:46AM +0800, ChenQi wrote:
> On 08/14/2014 05:39 PM, Richard Purdie wrote:
> > On Thu, 2014-08-14 at 10:54 +0200, Martin Jansa wrote:
> >> On Thu, Aug 14, 2014 at 04:46:01PM +0800, Chen Qi wrote:
> >>> Add libdw to RDEPENDS of systemd to avoid build-deps QA warning.
> >>>
> >>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> >>> ---
> >>>   meta/recipes-core/systemd/systemd_215.bb |    2 +-
> >>>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/meta/recipes-core/systemd/systemd_215.bb b/meta/recipes-core/systemd/systemd_215.bb
> >>> index 770787b..a52a042 100644
> >>> --- a/meta/recipes-core/systemd/systemd_215.bb
> >>> +++ b/meta/recipes-core/systemd/systemd_215.bb
> >>> @@ -244,7 +244,7 @@ FILES_${PN} = " ${base_bindir}/* \
> >>>   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} += "libdw kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
> >> Shouldn't it be build-time dependency?
> >>
> >> If it's detected from sysroot in do_configure then it has to be in
> >> DEPENDS to get deterministic results.
> > Right. Secondly, what benefit does this library bring us?
> >
> > Cheers,
> >
> > Richard
> >
> >
> >
> 
> Richard & Martin,
> 
> Thanks for reminding me about this.
> I shouldn't have rushed into fixing the QA warning without looking into 
> the configure.ac file.
> 
> It should really be a PACKAGECONFIG for 'elfutils'.
> PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,libelf 
> libdw,libelf libdw"

I don't think there is libdw and libelf recipe, they are just packages created by
elfutils recipe, so I think it should be:

PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"

the runtime dependency is added automatically by shlibs code (as the QA
warning confirmed).

> I will send out V2 of this patchset.
> 
> Best Regards,
> Chen Qi

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

end of thread, other threads:[~2014-08-15  9:09 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-14  8:45 [PATCH 00/10] upgrade systemd to 215 and other misc fixes Chen Qi
2014-08-14  8:46 ` [PATCH 01/10] systemd: upgrade to 215 Chen Qi
2014-08-14  8:46 ` [PATCH 02/10] systemd: add libdw to RDEPENDS Chen Qi
2014-08-14  8:54   ` Martin Jansa
2014-08-14  9:39     ` Richard Purdie
2014-08-14 11:32       ` Martin Jansa
2014-08-15  3:00       ` ChenQi
2014-08-15  9:09         ` Martin Jansa
2014-08-14  8:46 ` [PATCH 03/10] systemd: make runlevel work in non-runlevel targets Chen Qi
2014-08-14  8:46 ` [PATCH 04/10] update-rc.d: fix logic in populate_packages_updatercd Chen Qi
2014-08-14  8:46 ` [PATCH 05/10] alsa-state: fix pkg_postinst and set INHIBIT_UPDATERCD_BBCLASS Chen Qi
2014-08-14  8:46 ` [PATCH 06/10] keymaps: fix for systemd Chen Qi
2014-08-14  8:46 ` [PATCH 07/10] systemd: add kbd-keymaps to RRECOMMENDS of systemd-vconsole-setup Chen Qi
2014-08-14  8:46 ` [PATCH 08/10] v86d: set INHIBIT_UPDATERCD_BBCLASS if 'sysvinit' not in DISTRO_FEATURES Chen Qi
2014-08-14 13:07   ` Otavio Salvador
2014-08-15  1:57   ` ChenQi
2014-08-14  8:46 ` [PATCH 09/10] systemd: add support for executing scripts under /etc/rcS.d Chen Qi
2014-08-14  8:46 ` [PATCH 10/10] dhcp: add dhcpd.service Chen Qi

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.