* [PATCH 01/26] systemd: upgrade to 216
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
@ 2014-09-02 10:53 ` Chen Qi
2014-09-04 19:30 ` Peter A. Bigot
2014-09-02 10:53 ` [PATCH 02/26] systemd: add PACKAGECONFIG for curl Chen Qi
` (24 subsequent siblings)
25 siblings, 1 reply; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:53 UTC (permalink / raw)
To: openembedded-core
Upgrade systemd from 213 to 216.
systemd-older-kernel.patch is removed as it's fixed in 216.
0001-uClibc-doesn-t-implement-pwritev-preadv.patch is removed because
the file it patches has been removed from the project.
0001-util-Including-missing.h-to-get-MAX_HANDLE_SZ.patch is removed because
it has been merged.
0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch is backported
to fix compilation error for mips.
Below are the required kernel versions for systemd 216.
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>
---
...ing.h-add-fake-__NR_memfd_create-for-MIPS.patch | 29 +++++++++++
...1-uClibc-doesn-t-implement-pwritev-preadv.patch | 34 -------------
...-Including-missing.h-to-get-MAX_HANDLE_SZ.patch | 29 -----------
.../systemd/systemd/systemd-older-kernel.patch | 56 ----------------------
.../systemd/{systemd_213.bb => systemd_216.bb} | 15 +++---
5 files changed, 38 insertions(+), 125 deletions(-)
create mode 100644 meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch
delete mode 100644 meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch
delete mode 100644 meta/recipes-core/systemd/systemd/0001-util-Including-missing.h-to-get-MAX_HANDLE_SZ.patch
delete mode 100644 meta/recipes-core/systemd/systemd/systemd-older-kernel.patch
rename meta/recipes-core/systemd/{systemd_213.bb => systemd_216.bb} (96%)
diff --git a/meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch b/meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch
new file mode 100644
index 0000000..448ef1a
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch
@@ -0,0 +1,29 @@
+Upstream-Status: Backport
+
+Subject: missing.h: add fake __NR_memfd_create for MIPS
+
+We don't have the correct __NR_memfd_create syscall number yet, so set it to
+0xffffffff for now to prevent compile time errors.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/shared/missing.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/shared/missing.h b/src/shared/missing.h
+index 3ff1a21..3051cb5 100644
+--- a/src/shared/missing.h
++++ b/src/shared/missing.h
+@@ -167,6 +167,9 @@ static inline int pivot_root(const char *new_root, const char *put_old) {
+ # define __NR_fanotify_mark 5296
+ # endif
+ # endif
++# ifndef __NR_memfd_create
++# define __NR_memfd_create 0xffffffff /* FIXME */
++# endif
+ #else
+ # ifndef __NR_fanotify_init
+ # define __NR_fanotify_init 338
+--
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch b/meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch
deleted file mode 100644
index 9fdb3c9..0000000
--- a/meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Upstream-Status: Inappropriate [uclibc specific]
-
-From 7be9273548bcb1f57d011fc252965e45dd2a058c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 21 Aug 2013 19:09:27 -0700
-Subject: [PATCH] uClibc doesn't implement pwritev/preadv
-
-Lets stub out the testcase for building.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/libsystemd-bus/test-bus-memfd.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-Index: systemd-209/src/libsystemd/sd-bus/test-bus-memfd.c
-===================================================================
---- systemd-209.orig/src/libsystemd/sd-bus/test-bus-memfd.c 2014-02-19 15:03:09.983254602 -0800
-+++ systemd-209/src/libsystemd/sd-bus/test-bus-memfd.c 2014-02-19 23:42:10.636652864 -0800
-@@ -151,6 +151,7 @@
- /* check content */
- assert_se(memcmp(buf, "ll", 2) == 0);
-
-+#ifndef __UCLIBC__
- /* writev it out*/
- iov[0].iov_base = (char *)"ABC";
- iov[0].iov_len = 3;
-@@ -173,6 +174,7 @@
- assert_se(memcmp(bufv[0], "ABC", 3) == 0);
- assert_se(memcmp(bufv[1], "DEF", 3) == 0);
- assert_se(memcmp(bufv[2], "GHI", 3) == 0);
-+#endif /* __UCLIBC__ */
-
- sd_memfd_free(m);
-
diff --git a/meta/recipes-core/systemd/systemd/0001-util-Including-missing.h-to-get-MAX_HANDLE_SZ.patch b/meta/recipes-core/systemd/systemd/0001-util-Including-missing.h-to-get-MAX_HANDLE_SZ.patch
deleted file mode 100644
index ba4a21b..0000000
--- a/meta/recipes-core/systemd/systemd/0001-util-Including-missing.h-to-get-MAX_HANDLE_SZ.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 764ecbeda4813f33eafd45fdc3ccb9376356f475 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 25 Aug 2014 15:40:31 -0700
-Subject: [PATCH] util: Including missing.h to get MAX_HANDLE_SZ
-
-Helps compiling on uclibc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: [Backport]
----
- src/shared/util.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/shared/util.h b/src/shared/util.h
-index 62eb604..036fc59 100644
---- a/src/shared/util.h
-+++ b/src/shared/util.h
-@@ -84,6 +84,7 @@
- #endif
-
- #include "macro.h"
-+#include "missing.h"
- #include "time-util.h"
-
- /* What is interpreted as whitespace? */
---
-1.7.10.4
-
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_216.bb
similarity index 96%
rename from meta/recipes-core/systemd/systemd_213.bb
rename to meta/recipes-core/systemd/systemd_216.bb
index ca071c1..df4a217 100644
--- a/meta/recipes-core/systemd/systemd_213.bb
+++ b/meta/recipes-core/systemd/systemd_216.bb
@@ -17,9 +17,9 @@ SECTION = "base/shell"
inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext
-SRCREV = "c9679c652b3c31f2510e8805d81630680ebc7e95"
+SRCREV = "5d0ae62c665262c4c55536457e84e278c252cc0b"
-PV = "213+git${SRCPV}"
+PV = "216+git${SRCPV}"
SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=git \
file://binfmt-install.patch \
@@ -28,15 +28,13 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
file://systemd-pam-fix-fallocate.patch \
file://systemd-pam-fix-mkostemp.patch \
file://optional_secure_getenv.patch \
- file://0001-uClibc-doesn-t-implement-pwritev-preadv.patch \
file://uclibc-sysinfo_h.patch \
file://uclibc-get-physmem.patch \
- file://0001-util-Including-missing.h-to-get-MAX_HANDLE_SZ.patch \
+ file://0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch \
file://touchscreen.rules \
file://00-create-volatile.conf \
file://init \
file://run-ptest \
- file://systemd-older-kernel.patch \
"
S = "${WORKDIR}/git"
@@ -126,6 +124,9 @@ do_install() {
sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
fi
+ # Move libgudev back to ${rootlibdir} to keep backward compatibility
+ [ ${rootlibdir} != ${exec_prefix}/lib ] && mv -t ${D}${rootlibdir} ${D}${exec_prefix}/lib/libgudev*
+
# Delete journal README, as log can be symlinked inside volatile.
rm -f ${D}/${localstatedir}/log/README
}
@@ -208,6 +209,7 @@ FILES_${PN} = " ${base_bindir}/* \
${datadir}/dbus-1/system-services \
${datadir}/polkit-1 \
${datadir}/${BPN} \
+ ${datadir}/factory \
${sysconfdir}/bash_completion.d/ \
${sysconfdir}/dbus-1/ \
${sysconfdir}/machine-id \
@@ -220,7 +222,7 @@ FILES_${PN} = " ${base_bindir}/* \
${rootlibexecdir}/systemd/* \
${systemd_unitdir}/* \
${base_libdir}/security/*.so \
- ${libdir}/libnss_myhostname.so.2 \
+ ${exec_prefix}/lib/libnss_* \
/cgroup \
${bindir}/systemd* \
${bindir}/busctl \
@@ -233,6 +235,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.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 01/26] systemd: upgrade to 216
2014-09-02 10:53 ` [PATCH 01/26] systemd: upgrade to 216 Chen Qi
@ 2014-09-04 19:30 ` Peter A. Bigot
2014-09-04 19:37 ` Burton, Ross
2014-09-05 10:21 ` Enrico Scholz
0 siblings, 2 replies; 45+ messages in thread
From: Peter A. Bigot @ 2014-09-04 19:30 UTC (permalink / raw)
To: openembedded-core
On 09/02/2014 05:53 AM, Chen Qi wrote:
> Upgrade systemd from 213 to 216.
This broke me, because by 216 systemd started managing /etc/resolv.conf
which is fine except that it uses a static configuration in
/etc/systemd/resolved.conf, whereas in the 213 days I was getting
/etc/resolv.conf managed by connman which set up the nameservers based
on information it received from dhcp meaning one less per-host
configuration file I need to manage.
I was able to get working behavior again by doing systemctl disable
systemd-resolved, removing the /etc/resolv.conf symlink, and rebooting.
Further investigation suggests that systemd-networkd is intended to do
the same sort of thing as connman, though so maybe I need to shoot that
instead.
I have no answers, but just wanted to note that there now appears to be
some conflict between connman and systemd that didn't used to be there.
Maybe systemd-networkd and its constituent pieces need to be pulled out
as a separate package? Or some sort of conflict detection if both
connman and systemd-networkd are in the same image?
Peter
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 01/26] systemd: upgrade to 216
2014-09-04 19:30 ` Peter A. Bigot
@ 2014-09-04 19:37 ` Burton, Ross
2014-09-05 10:21 ` Enrico Scholz
1 sibling, 0 replies; 45+ messages in thread
From: Burton, Ross @ 2014-09-04 19:37 UTC (permalink / raw)
To: Peter A. Bigot; +Cc: OE-core
On 4 September 2014 20:30, Peter A. Bigot <pab@pabigot.com> wrote:
> Further investigation suggests that systemd-networkd is intended to do the
> same sort of thing as connman, though so maybe I need to shoot that instead.
>
> I have no answers, but just wanted to note that there now appears to be some
> conflict between connman and systemd that didn't used to be there. Maybe
> systemd-networkd and its constituent pieces need to be pulled out as a
> separate package? Or some sort of conflict detection if both connman and
> systemd-networkd are in the same image?
systemd-networkd is meant for early init or "simple" configuration and
there's meant to be handover from systemd to connman. At least that's
what I was told, and the connman authors have contributed code to
systemd...
Chen, can you look into this? I'll chase when I'm up tomorrow if
you've not managed to resolve this already.
Ross
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 01/26] systemd: upgrade to 216
2014-09-04 19:30 ` Peter A. Bigot
2014-09-04 19:37 ` Burton, Ross
@ 2014-09-05 10:21 ` Enrico Scholz
2014-09-08 17:02 ` Burton, Ross
1 sibling, 1 reply; 45+ messages in thread
From: Enrico Scholz @ 2014-09-05 10:21 UTC (permalink / raw)
To: openembedded-core
"Peter A. Bigot" <pab-VfDNNZTKYKBBDgjK7y7TUQ@public.gmane.org> writes:
> Maybe systemd-networkd and its constituent pieces need to be pulled
> out as a separate package?
Yes; I think this is necessary. systemd gets larger and larger with
each release and is providing functionality which is either not needed
(logind, the network stuff, nspawn, nss modules) or which is solved by
other parts of the system and is conflicting with them.
Enrico
--
SIGMA Chemnitz GmbH Registergericht: Amtsgericht Chemnitz HRB 1750
Am Erlenwald 13 Geschaeftsfuehrer: Grit Freitag, Frank Pyritz
09128 Chemnitz
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 01/26] systemd: upgrade to 216
2014-09-05 10:21 ` Enrico Scholz
@ 2014-09-08 17:02 ` Burton, Ross
0 siblings, 0 replies; 45+ messages in thread
From: Burton, Ross @ 2014-09-08 17:02 UTC (permalink / raw)
To: Enrico Scholz; +Cc: OE-core
On 5 September 2014 11:21, Enrico Scholz
<enrico.scholz@sigma-chemnitz.de> wrote:
>> Maybe systemd-networkd and its constituent pieces need to be pulled
>> out as a separate package?
>
> Yes; I think this is necessary. systemd gets larger and larger with
> each release and is providing functionality which is either not needed
> (logind, the network stuff, nspawn, nss modules) or which is solved by
> other parts of the system and is conflicting with them.
Considering the number of patches still landing in resolved and
networkd, I think just disabling them right now is safest. I just
sent a patch to do this.
Ross
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 02/26] systemd: add PACKAGECONFIG for curl
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
2014-09-02 10:53 ` [PATCH 01/26] systemd: upgrade to 216 Chen Qi
@ 2014-09-02 10:53 ` Chen Qi
2014-09-02 14:59 ` Burton, Ross
2014-09-02 10:53 ` [PATCH 03/26] systemd: make runlevel work in non-runlevel targets Chen Qi
` (23 subsequent siblings)
25 siblings, 1 reply; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:53 UTC (permalink / raw)
To: openembedded-core
Add PACKAGECONFIG for curl and disable it by default.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-core/systemd/systemd_216.bb | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb
index df4a217..cccecf5 100644
--- a/meta/recipes-core/systemd/systemd_216.bb
+++ b/meta/recipes-core/systemd/systemd_216.bb
@@ -47,6 +47,7 @@ LDFLAGS_append_libc-uclibc = " -lrt"
GTKDOC_DOCDIR = "${S}/docs/"
PACKAGECONFIG ??= "xz"
+PACKAGECONFIG[curl] = "--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
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 02/26] systemd: add PACKAGECONFIG for curl
2014-09-02 10:53 ` [PATCH 02/26] systemd: add PACKAGECONFIG for curl Chen Qi
@ 2014-09-02 14:59 ` Burton, Ross
2014-09-03 2:38 ` ChenQi
0 siblings, 1 reply; 45+ messages in thread
From: Burton, Ross @ 2014-09-02 14:59 UTC (permalink / raw)
To: Chen Qi; +Cc: OE-core
On 2 September 2014 11:53, Chen Qi <Qi.Chen@windriver.com> wrote:
> Add PACKAGECONFIG for curl and disable it by default.
It isn't clear what the curl dependency is for without reading the
source, so naming the option "journal-upload" would be
self-documenting.
Ross
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 02/26] systemd: add PACKAGECONFIG for curl
2014-09-02 14:59 ` Burton, Ross
@ 2014-09-03 2:38 ` ChenQi
0 siblings, 0 replies; 45+ messages in thread
From: ChenQi @ 2014-09-03 2:38 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On 09/02/2014 10:59 PM, Burton, Ross wrote:
> On 2 September 2014 11:53, Chen Qi <Qi.Chen@windriver.com> wrote:
>> Add PACKAGECONFIG for curl and disable it by default.
> It isn't clear what the curl dependency is for without reading the
> source, so naming the option "journal-upload" would be
> self-documenting.
>
> Ross
>
>
Got it!
Thanks,
Chen Qi
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 03/26] systemd: make runlevel work in non-runlevel targets
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
2014-09-02 10:53 ` [PATCH 01/26] systemd: upgrade to 216 Chen Qi
2014-09-02 10:53 ` [PATCH 02/26] systemd: add PACKAGECONFIG for curl Chen Qi
@ 2014-09-02 10:53 ` Chen Qi
2014-09-02 10:53 ` [PATCH 04/26] update-rc.d: fix logic in populate_packages_updatercd Chen Qi
` (22 subsequent siblings)
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:53 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_216.bb | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb
index cccecf5..eef1359 100644
--- a/meta/recipes-core/systemd/systemd_216.bb
+++ b/meta/recipes-core/systemd/systemd_216.bb
@@ -130,6 +130,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.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 04/26] update-rc.d: fix logic in populate_packages_updatercd
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (2 preceding siblings ...)
2014-09-02 10:53 ` [PATCH 03/26] systemd: make runlevel work in non-runlevel targets Chen Qi
@ 2014-09-02 10:53 ` Chen Qi
2014-09-02 10:53 ` [PATCH 05/26] alsa-state: fix pkg_postinst and set INHIBIT_UPDATERCD_BBCLASS Chen Qi
` (21 subsequent siblings)
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:53 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.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 05/26] alsa-state: fix pkg_postinst and set INHIBIT_UPDATERCD_BBCLASS
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (3 preceding siblings ...)
2014-09-02 10:53 ` [PATCH 04/26] update-rc.d: fix logic in populate_packages_updatercd Chen Qi
@ 2014-09-02 10:53 ` Chen Qi
2014-09-02 10:53 ` [PATCH 06/26] keymaps: fix for systemd Chen Qi
` (20 subsequent siblings)
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:53 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.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 06/26] keymaps: fix for systemd
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (4 preceding siblings ...)
2014-09-02 10:53 ` [PATCH 05/26] alsa-state: fix pkg_postinst and set INHIBIT_UPDATERCD_BBCLASS Chen Qi
@ 2014-09-02 10:53 ` Chen Qi
2014-09-02 10:53 ` [PATCH 07/26] systemd: add kbd-keymaps to RRECOMMENDS of systemd-vconsole-setup Chen Qi
` (19 subsequent siblings)
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:53 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.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 07/26] systemd: add kbd-keymaps to RRECOMMENDS of systemd-vconsole-setup
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (5 preceding siblings ...)
2014-09-02 10:53 ` [PATCH 06/26] keymaps: fix for systemd Chen Qi
@ 2014-09-02 10:53 ` Chen Qi
2014-09-02 10:53 ` [PATCH 08/26] v86d: set INHIBIT_UPDATERCD_BBCLASS if 'sysvinit' not in DISTRO_FEATURES Chen Qi
` (18 subsequent siblings)
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:53 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_216.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb
index eef1359..8fc79e4 100644
--- a/meta/recipes-core/systemd/systemd_216.bb
+++ b/meta/recipes-core/systemd/systemd_216.bb
@@ -209,7 +209,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.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 08/26] v86d: set INHIBIT_UPDATERCD_BBCLASS if 'sysvinit' not in DISTRO_FEATURES
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (6 preceding siblings ...)
2014-09-02 10:53 ` [PATCH 07/26] systemd: add kbd-keymaps to RRECOMMENDS of systemd-vconsole-setup Chen Qi
@ 2014-09-02 10:53 ` Chen Qi
2014-09-02 10:53 ` [PATCH 09/26] systemd: add support for executing scripts under /etc/rcS.d Chen Qi
` (17 subsequent siblings)
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:53 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.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 09/26] systemd: add support for executing scripts under /etc/rcS.d
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (7 preceding siblings ...)
2014-09-02 10:53 ` [PATCH 08/26] v86d: set INHIBIT_UPDATERCD_BBCLASS if 'sysvinit' not in DISTRO_FEATURES Chen Qi
@ 2014-09-02 10:53 ` Chen Qi
2014-09-02 15:00 ` Burton, Ross
2014-09-02 10:53 ` [PATCH 10/26] dhcp: add dhcpd.service Chen Qi
` (16 subsequent siblings)
25 siblings, 1 reply; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:53 UTC (permalink / raw)
To: openembedded-core
This patch adds support for systemd to execute scripts under /etc/rcS.d.
To be compitable, all services translated from /etc/rcS.d/ scripts would
run before services translated from /etc/rcN.d scripts.
[YOCTO #5159]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
...ort-for-executing-scripts-under-etc-rcS.d.patch | 138 +++++++++++++++++++++
meta/recipes-core/systemd/systemd_216.bb | 1 +
2 files changed, 139 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..9aa07c1
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch
@@ -0,0 +1,138 @@
+Upstream-Status: Inappropriate [OE specific]
+
+Subject: 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.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/sysv-generator/sysv-generator.c | 50 ++++++++++++++++++++++++++++---------
+ 1 file changed, 38 insertions(+), 12 deletions(-)
+
+diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
+index 9a869ba..10c55c0 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,8 @@ typedef struct SysvStub {
+ char **conflicts;
+ bool has_lsb;
+ bool reload;
++ bool default_dependencies;
++ bool from_rcsd;
+ } SysvStub;
+
+ const char *arg_dest = "/tmp";
+@@ -156,6 +162,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))
+@@ -661,18 +670,30 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
+ if (s->has_lsb && other->has_lsb)
+ continue;
+
+- if (other->sysv_start_priority < s->sysv_start_priority) {
+- r = strv_extend(&s->after, other->name);
++ /* 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);
++ } else if (other->from_rcsd && !s->from_rcsd) {
++ r = strv_extend(&s->after, other->name);
+ if (r < 0)
+ return log_oom();
+- }
+- else
+- continue;
++ } else {
++ if (other->sysv_start_priority < s->sysv_start_priority) {
++ 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);
++ if (r < 0)
++ return log_oom();
++ }
++ else
++ continue;
++ }
+
+ /* FIXME: Maybe we should compare the name here lexicographically? */
+ }
+@@ -725,6 +746,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;
+
+@@ -810,9 +833,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],
+@@ -825,7 +850,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.9.1
+
diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb
index 8fc79e4..776006f 100644
--- a/meta/recipes-core/systemd/systemd_216.bb
+++ b/meta/recipes-core/systemd/systemd_216.bb
@@ -30,6 +30,7 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
file://optional_secure_getenv.patch \
file://uclibc-sysinfo_h.patch \
file://uclibc-get-physmem.patch \
+ file://0001-add-support-for-executing-scripts-under-etc-rcS.d.patch \
file://0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch \
file://touchscreen.rules \
file://00-create-volatile.conf \
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 10/26] dhcp: add dhcpd.service
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (8 preceding siblings ...)
2014-09-02 10:53 ` [PATCH 09/26] systemd: add support for executing scripts under /etc/rcS.d Chen Qi
@ 2014-09-02 10:53 ` Chen Qi
2014-09-02 15:03 ` Burton, Ross
2014-09-02 10:53 ` [PATCH 11/26] dhcp: add dhcrelay.service Chen Qi
` (15 subsequent siblings)
25 siblings, 1 reply; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:53 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.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 10/26] dhcp: add dhcpd.service
2014-09-02 10:53 ` [PATCH 10/26] dhcp: add dhcpd.service Chen Qi
@ 2014-09-02 15:03 ` Burton, Ross
2014-09-03 2:39 ` ChenQi
0 siblings, 1 reply; 45+ messages in thread
From: Burton, Ross @ 2014-09-02 15:03 UTC (permalink / raw)
To: Chen Qi; +Cc: OE-core
On 2 September 2014 11:53, Chen Qi <Qi.Chen@windriver.com> wrote:
> --- /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
Hard-coded /etc, replace in $sysconfdir.
Ross
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 10/26] dhcp: add dhcpd.service
2014-09-02 15:03 ` Burton, Ross
@ 2014-09-03 2:39 ` ChenQi
0 siblings, 0 replies; 45+ messages in thread
From: ChenQi @ 2014-09-03 2:39 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On 09/02/2014 11:03 PM, Burton, Ross wrote:
> On 2 September 2014 11:53, Chen Qi <Qi.Chen@windriver.com> wrote:
>> --- /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
> Hard-coded /etc, replace in $sysconfdir.
>
> Ross
>
>
Got it!
Thanks,
Chen Qi
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 11/26] dhcp: add dhcrelay.service
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (9 preceding siblings ...)
2014-09-02 10:53 ` [PATCH 10/26] dhcp: add dhcpd.service Chen Qi
@ 2014-09-02 10:53 ` Chen Qi
2014-09-02 10:53 ` [PATCH 12/26] acpid: upgrade to 2.0.22 and add systemd support Chen Qi
` (14 subsequent siblings)
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:53 UTC (permalink / raw)
To: openembedded-core
Add dhcrelay.service to support systemd systems.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-connectivity/dhcp/dhcp.inc | 9 +++++++--
meta/recipes-connectivity/dhcp/files/dhcrelay.service | 9 +++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-connectivity/dhcp/files/dhcrelay.service
diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc b/meta/recipes-connectivity/dhcp/dhcp.inc
index b281f94..f2b25a5 100644
--- a/meta/recipes-connectivity/dhcp/dhcp.inc
+++ b/meta/recipes-connectivity/dhcp/dhcp.inc
@@ -17,14 +17,17 @@ SRC_URI = "ftp://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \
file://init-relay file://default-relay \
file://init-server file://default-server \
file://dhclient.conf file://dhcpd.conf \
- file://dhcpd.service"
+ file://dhcpd.service file://dhcrelay.service"
inherit autotools systemd
-SYSTEMD_PACKAGES = "dhcp-server"
+SYSTEMD_PACKAGES = "dhcp-server dhcp-relay"
SYSTEMD_SERVICE_dhcp-server = "dhcpd.service"
SYSTEMD_AUTO_ENABLE_dhcp-server = "disable"
+SYSTEMD_SERVICE_dhcp-relay = "dhcrelay.service"
+SYSTEMD_AUTO_ENABLE_dhcp-relay = "disable"
+
TARGET_CFLAGS += "-D_GNU_SOURCE"
EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
--with-srv6-lease-file=${localstatedir}/lib/dhcp/dhcpd6.leases \
@@ -60,7 +63,9 @@ do_install_append () {
# Install systemd unit files
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/dhcpd.service ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/dhcrelay.service ${D}${systemd_unitdir}/system
sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/dhcpd.service
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/dhcrelay.service
}
PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell"
diff --git a/meta/recipes-connectivity/dhcp/files/dhcrelay.service b/meta/recipes-connectivity/dhcp/files/dhcrelay.service
new file mode 100644
index 0000000..a2d8189
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhcrelay.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=DHCP Relay Agent Daemon
+After=network.target
+
+[Service]
+ExecStart=@SBINDIR@/dhcrelay -d --no-pid
+
+[Install]
+WantedBy=multi-user.target
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 12/26] acpid: upgrade to 2.0.22 and add systemd support
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (10 preceding siblings ...)
2014-09-02 10:53 ` [PATCH 11/26] dhcp: add dhcrelay.service Chen Qi
@ 2014-09-02 10:53 ` Chen Qi
2014-09-02 15:24 ` Burton, Ross
2014-09-02 10:53 ` [PATCH 13/26] cups: make cups daemon start correctly Chen Qi
` (13 subsequent siblings)
25 siblings, 1 reply; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:53 UTC (permalink / raw)
To: openembedded-core
For acpid needs to upgrade to work correctly with the new kernel.
Also add systemd unit file.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-bsp/acpid/acpid.inc | 24 ++++++++++------------
meta/recipes-bsp/acpid/acpid/acpid.service | 10 +++++++++
.../acpid/acpid/set_socket_noblock.patch | 10 ---------
.../acpid/{acpid_1.0.10.bb => acpid_2.0.22.bb} | 5 ++---
4 files changed, 23 insertions(+), 26 deletions(-)
create mode 100644 meta/recipes-bsp/acpid/acpid/acpid.service
delete mode 100644 meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch
rename meta/recipes-bsp/acpid/{acpid_1.0.10.bb => acpid_2.0.22.bb} (55%)
diff --git a/meta/recipes-bsp/acpid/acpid.inc b/meta/recipes-bsp/acpid/acpid.inc
index fad7afd..9b4c3a5 100644
--- a/meta/recipes-bsp/acpid/acpid.inc
+++ b/meta/recipes-bsp/acpid/acpid.inc
@@ -4,30 +4,28 @@ BUGTRACKER = "http://sourceforge.net/tracker/?group_id=33140&atid=407341"
SECTION = "base"
LICENSE = "GPLv2+"
-SRC_URI = "${SOURCEFORGE_MIRROR}/acpid/acpid-${PV}.tar.gz \
+SRC_URI = "${SOURCEFORGE_MIRROR}/acpid2/acpid-${PV}.tar.xz \
file://init \
- file://set_socket_noblock.patch "
+ file://acpid.service \
+ "
-inherit update-rc.d
+inherit autotools update-rc.d systemd
INITSCRIPT_NAME = "acpid"
INITSCRIPT_PARAMS = "defaults"
-# Makefile ignores our CFLAGS, so override it.
-#
-EXTRA_OEMAKE = "CFLAGS='-W -Wall -Werror -Wundef -Wshadow ${CFLAGS} $(DEFS)'"
+SYSTEMD_PACKAGES = "acpid"
+SYSTEMD_SERVICE_acpid = "acpid.service"
-do_compile () {
- oe_runmake 'CC=${CC} -D_GNU_SOURCE' 'CROSS=${HOST_PREFIX}'
-}
-
-do_install () {
- install -d ${D}${bindir}
- oe_runmake 'INSTPREFIX=${D}' install
+do_install_append () {
install -d ${D}${sysconfdir}/init.d
sed -e 's,/usr/sbin,${sbindir},g' ${WORKDIR}/init > ${D}${sysconfdir}/init.d/acpid
chmod 755 ${D}${sysconfdir}/init.d/acpid
install -d ${D}${sysconfdir}/acpi
install -d ${D}${sysconfdir}/acpi/events
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/acpid.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/acpid.service
}
diff --git a/meta/recipes-bsp/acpid/acpid/acpid.service b/meta/recipes-bsp/acpid/acpid/acpid.service
new file mode 100644
index 0000000..f70e740
--- /dev/null
+++ b/meta/recipes-bsp/acpid/acpid/acpid.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=ACPI Event Daemon
+After=syslog.target
+
+[Service]
+Type=forking
+ExecStart=@SBINDIR@/acpid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch b/meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch
deleted file mode 100644
index 54d6435..0000000
--- a/meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/acpid.c
-+++ b/acpid.c
-@@ -307,6 +307,7 @@ main(int argc, char **argv)
- non_root_clients++;
- }
- fcntl(cli_fd, F_SETFD, FD_CLOEXEC);
-+ fcntl(cli_fd, F_SETFL, O_NONBLOCK);
- snprintf(buf, sizeof(buf)-1, "%d[%d:%d]",
- creds.pid, creds.uid, creds.gid);
- acpid_add_client(cli_fd, buf);
diff --git a/meta/recipes-bsp/acpid/acpid_1.0.10.bb b/meta/recipes-bsp/acpid/acpid_2.0.22.bb
similarity index 55%
rename from meta/recipes-bsp/acpid/acpid_1.0.10.bb
rename to meta/recipes-bsp/acpid/acpid_2.0.22.bb
index df55bad..603fc2b 100644
--- a/meta/recipes-bsp/acpid/acpid_1.0.10.bb
+++ b/meta/recipes-bsp/acpid/acpid_2.0.22.bb
@@ -3,6 +3,5 @@ require acpid.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
file://acpid.h;endline=24;md5=324a9cf225ae69ddaad1bf9d942115b5"
-
-SRC_URI[md5sum] = "61156ef32015c56dc0f2e3317f4ae09e"
-SRC_URI[sha256sum] = "22703ce0dd7305aca01bc9ac741659c32b1593f1d6fde492df7f01067a534760"
+SRC_URI[md5sum] = "c8ba756030d1b21fc973ec3d640f27f1"
+SRC_URI[sha256sum] = "3d11454f4283c8f771d8dbd5eb6b5f2bbd9d94d9f77d68bab89e35d98b67ab31"
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 12/26] acpid: upgrade to 2.0.22 and add systemd support
2014-09-02 10:53 ` [PATCH 12/26] acpid: upgrade to 2.0.22 and add systemd support Chen Qi
@ 2014-09-02 15:24 ` Burton, Ross
2014-09-03 2:39 ` ChenQi
0 siblings, 1 reply; 45+ messages in thread
From: Burton, Ross @ 2014-09-02 15:24 UTC (permalink / raw)
To: Chen Qi; +Cc: OE-core
On 2 September 2014 11:53, Chen Qi <Qi.Chen@windriver.com> wrote:
> -inherit update-rc.d
> +inherit autotools update-rc.d systemd
>
> INITSCRIPT_NAME = "acpid"
> INITSCRIPT_PARAMS = "defaults"
>
> -# Makefile ignores our CFLAGS, so override it.
> -#
> -EXTRA_OEMAKE = "CFLAGS='-W -Wall -Werror -Wundef -Wshadow ${CFLAGS} $(DEFS)'"
> +SYSTEMD_PACKAGES = "acpid"
> +SYSTEMD_SERVICE_acpid = "acpid.service"
>
> -do_compile () {
> - oe_runmake 'CC=${CC} -D_GNU_SOURCE' 'CROSS=${HOST_PREFIX}'
> -}
In general it would be nice if the commit mentioned "upstream now uses
autotools" to make it clear that changes to the build were
intentional.
Ross
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 12/26] acpid: upgrade to 2.0.22 and add systemd support
2014-09-02 15:24 ` Burton, Ross
@ 2014-09-03 2:39 ` ChenQi
0 siblings, 0 replies; 45+ messages in thread
From: ChenQi @ 2014-09-03 2:39 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On 09/02/2014 11:24 PM, Burton, Ross wrote:
> On 2 September 2014 11:53, Chen Qi <Qi.Chen@windriver.com> wrote:
>> -inherit update-rc.d
>> +inherit autotools update-rc.d systemd
>>
>> INITSCRIPT_NAME = "acpid"
>> INITSCRIPT_PARAMS = "defaults"
>>
>> -# Makefile ignores our CFLAGS, so override it.
>> -#
>> -EXTRA_OEMAKE = "CFLAGS='-W -Wall -Werror -Wundef -Wshadow ${CFLAGS} $(DEFS)'"
>> +SYSTEMD_PACKAGES = "acpid"
>> +SYSTEMD_SERVICE_acpid = "acpid.service"
>>
>> -do_compile () {
>> - oe_runmake 'CC=${CC} -D_GNU_SOURCE' 'CROSS=${HOST_PREFIX}'
>> -}
> In general it would be nice if the commit mentioned "upstream now uses
> autotools" to make it clear that changes to the build were
> intentional.
>
> Ross
>
>
Got it!
Thanks,
Chen Qi
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 13/26] cups: make cups daemon start correctly
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (11 preceding siblings ...)
2014-09-02 10:53 ` [PATCH 12/26] acpid: upgrade to 2.0.22 and add systemd support Chen Qi
@ 2014-09-02 10:53 ` Chen Qi
2014-09-02 15:36 ` Burton, Ross
2014-09-02 10:54 ` [PATCH 14/26] cups: add systemd support Chen Qi
` (12 subsequent siblings)
25 siblings, 1 reply; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:53 UTC (permalink / raw)
To: openembedded-core
From: In Long <inlong_tec@163.com>
The cups daemon needs the lpadmin group to start correctly.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-extended/cups/cups.inc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc
index adf21eb..d29b875 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -12,7 +12,10 @@ SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
LEAD_SONAME = "libcupsdriver.so"
-inherit autotools-brokensep binconfig
+inherit autotools-brokensep binconfig useradd
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system lpadmin"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
@@ -79,6 +82,7 @@ python do_package_append() {
PACKAGES =+ "${PN}-lib ${PN}-libimage"
+RDEPENDS_${PN} += "procps"
FILES_${PN} += "${libdir}/cups/backend \
${libdir}/cups/cgi-bin \
${libdir}/cups/filter \
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 13/26] cups: make cups daemon start correctly
2014-09-02 10:53 ` [PATCH 13/26] cups: make cups daemon start correctly Chen Qi
@ 2014-09-02 15:36 ` Burton, Ross
2014-09-03 2:41 ` ChenQi
0 siblings, 1 reply; 45+ messages in thread
From: Burton, Ross @ 2014-09-02 15:36 UTC (permalink / raw)
To: Chen Qi; +Cc: OE-core
On 2 September 2014 11:53, Chen Qi <Qi.Chen@windriver.com> wrote:
> +RDEPENDS_${PN} += "procps"
Presumably the init script needs procps for some reason? Is this a
sysvinit-specific dependency, or something the daemon does itself?
Ross
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 13/26] cups: make cups daemon start correctly
2014-09-02 15:36 ` Burton, Ross
@ 2014-09-03 2:41 ` ChenQi
0 siblings, 0 replies; 45+ messages in thread
From: ChenQi @ 2014-09-03 2:41 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On 09/02/2014 11:36 PM, Burton, Ross wrote:
> On 2 September 2014 11:53, Chen Qi <Qi.Chen@windriver.com> wrote:
>> +RDEPENDS_${PN} += "procps"
> Presumably the init script needs procps for some reason? Is this a
> sysvinit-specific dependency, or something the daemon does itself?
>
> Ross
>
>
It's sysvinit-specific. Thanks for pointing it out.
I will fix it by using bb.utils.contian statement.
Best Regards,
Chen Qi
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 14/26] cups: add systemd support
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (12 preceding siblings ...)
2014-09-02 10:53 ` [PATCH 13/26] cups: make cups daemon start correctly Chen Qi
@ 2014-09-02 10:54 ` Chen Qi
2014-09-02 15:38 ` Burton, Ross
2014-09-02 10:54 ` [PATCH 15/26] rpcbind: avoid entering failed status after stopping daemon Chen Qi
` (11 subsequent siblings)
25 siblings, 1 reply; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:54 UTC (permalink / raw)
To: openembedded-core
Add systemd unit files.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-extended/cups/cups.inc | 18 +++++++++++++++++-
meta/recipes-extended/cups/cups/cups.path | 8 ++++++++
meta/recipes-extended/cups/cups/cups.service | 10 ++++++++++
meta/recipes-extended/cups/cups/cups.socket | 8 ++++++++
4 files changed, 43 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-extended/cups/cups/cups.path
create mode 100644 meta/recipes-extended/cups/cups/cups.service
create mode 100644 meta/recipes-extended/cups/cups/cups.socket
diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc
index d29b875..42a4b46 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -8,15 +8,20 @@ SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
file://0001-don-t-try-to-run-generated-binaries.patch \
file://cups_serverbin.patch \
file://cups-no-gcrypt.patch \
+ file://cups.socket \
+ file://cups.path \
+ file://cups.service \
"
LEAD_SONAME = "libcupsdriver.so"
-inherit autotools-brokensep binconfig useradd
+inherit autotools-brokensep binconfig useradd systemd
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "--system lpadmin"
+SYSTEMD_SERVICE_${PN} = "cups.socket cups.path cups.service"
+
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
@@ -71,6 +76,17 @@ fakeroot do_install () {
# Remove /var/run from package as cupsd will populate it on startup
rm -fr ${D}/${localstatedir}/run
rmdir ${D}/${libdir}/${BPN}/driver
+
+ # Remove sysinit script and symlinks
+ rm -rf ${D}${sysconfdir}/init.d/
+ rm -rf ${D}${sysconfdir}/rc*
+
+ # Install systemd unit files
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/cups.socket ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/cups.path ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/cups.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/cups.service
}
python do_package_append() {
diff --git a/meta/recipes-extended/cups/cups/cups.path b/meta/recipes-extended/cups/cups/cups.path
new file mode 100644
index 0000000..de8cc57
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups.path
@@ -0,0 +1,8 @@
+[Unit]
+Description=CUPS Printer Service Spool
+
+[Path]
+PathExistsGlob=/var/spool/cups/d*
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-extended/cups/cups/cups.service b/meta/recipes-extended/cups/cups/cups.service
new file mode 100644
index 0000000..7d3e839
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=CUPS Printing Service
+
+[Service]
+ExecStart=@SBINDIR@/cupsd -f
+PrivateTmp=true
+
+[Install]
+Also=cups.socket cups.path
+WantedBy=printer.target
diff --git a/meta/recipes-extended/cups/cups/cups.socket b/meta/recipes-extended/cups/cups/cups.socket
new file mode 100644
index 0000000..3314870
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=CUPS Printing Service Sockets
+
+[Socket]
+ListenStream=/var/run/cups/cups.sock
+
+[Install]
+WantedBy=sockets.target
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 14/26] cups: add systemd support
2014-09-02 10:54 ` [PATCH 14/26] cups: add systemd support Chen Qi
@ 2014-09-02 15:38 ` Burton, Ross
2014-09-03 3:01 ` ChenQi
0 siblings, 1 reply; 45+ messages in thread
From: Burton, Ross @ 2014-09-02 15:38 UTC (permalink / raw)
To: Chen Qi; +Cc: OE-core
On 2 September 2014 11:54, Chen Qi <Qi.Chen@windriver.com> wrote:
> + # Remove sysinit script and symlinks
> + rm -rf ${D}${sysconfdir}/init.d/
> + rm -rf ${D}${sysconfdir}/rc*
Pretty sure you don't mean to unconditionally do that.
Ross
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 14/26] cups: add systemd support
2014-09-02 15:38 ` Burton, Ross
@ 2014-09-03 3:01 ` ChenQi
0 siblings, 0 replies; 45+ messages in thread
From: ChenQi @ 2014-09-03 3:01 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On 09/02/2014 11:38 PM, Burton, Ross wrote:
> On 2 September 2014 11:54, Chen Qi <Qi.Chen@windriver.com> wrote:
>> + # Remove sysinit script and symlinks
>> + rm -rf ${D}${sysconfdir}/init.d/
>> + rm -rf ${D}${sysconfdir}/rc*
> Pretty sure you don't mean to unconditionally do that.
>
> Ross
>
>
Thanks for pointing it out.
Best Regards,
Chen Qi
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 15/26] rpcbind: avoid entering failed status after stopping daemon
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (13 preceding siblings ...)
2014-09-02 10:54 ` [PATCH 14/26] cups: add systemd support Chen Qi
@ 2014-09-02 10:54 ` Chen Qi
2014-09-02 10:54 ` [PATCH 16/26] at: remove dependency on initscripts Chen Qi
` (10 subsequent siblings)
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:54 UTC (permalink / raw)
To: openembedded-core
Exiting with '2' is actually expected with rpcbind, because it catches
SIGTERM and exits with '2' explicitly.
The related code is as follows.
(void) signal(SIGTERM, terminate);
/*
* Catch the signal and die
*/
static void
terminate(int dummy /*__unused*/)
{
close(rpcbindlockfd);
unlink(_PATH_RPCBINDSOCK);
unlink(RPCBINDDLOCK);
syslog(LOG_ERR,
"rpcbind terminating on signal. Restart with \"rpcbind -w\"");
write_warmstart(); /* Dump yourself */
exit(2);
}
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-extended/rpcbind/rpcbind/rpcbind.service | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
index 4de28d4..33ee268 100644
--- a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
@@ -9,6 +9,7 @@ Type=forking
EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf
ExecStart=@SBINDIR@/rpcbind -w $RPCBIND_OPTS
Restart=always
+SuccessExitStatus=2
[Install]
WantedBy=multi-user.target
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 16/26] at: remove dependency on initscripts
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (14 preceding siblings ...)
2014-09-02 10:54 ` [PATCH 15/26] rpcbind: avoid entering failed status after stopping daemon Chen Qi
@ 2014-09-02 10:54 ` Chen Qi
2014-09-02 10:54 ` [PATCH 17/26] at: inherit update-rc.d to handle sysv init script Chen Qi
` (9 subsequent siblings)
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:54 UTC (permalink / raw)
To: openembedded-core
The 'at' package actually doesn't have runtime dependency on
VIRTUAL-RUNTIME_initscripts, so remove this dependency.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-extended/at/at_3.1.15.bb | 2 --
1 file changed, 2 deletions(-)
diff --git a/meta/recipes-extended/at/at_3.1.15.bb b/meta/recipes-extended/at/at_3.1.15.bb
index a465a76..1080df4 100644
--- a/meta/recipes-extended/at/at_3.1.15.bb
+++ b/meta/recipes-extended/at/at_3.1.15.bb
@@ -7,9 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
DEPENDS = "flex flex-native \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-VIRTUAL-RUNTIME_initscripts ?= "initscripts"
RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \
- ${VIRTUAL-RUNTIME_initscripts} \
"
PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 17/26] at: inherit update-rc.d to handle sysv init script
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (15 preceding siblings ...)
2014-09-02 10:54 ` [PATCH 16/26] at: remove dependency on initscripts Chen Qi
@ 2014-09-02 10:54 ` Chen Qi
2014-09-02 10:54 ` [PATCH 18/26] keymaps: remove dependency on initscripts Chen Qi
` (8 subsequent siblings)
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:54 UTC (permalink / raw)
To: openembedded-core
Inherit update-rc.d.bbclass to handle sysv init script.
Also make the 'at' daemon start in runlevel 2,3,4,5 instead of S.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-extended/at/at/{S99at => atd.init} | 0
meta/recipes-extended/at/at_3.1.15.bb | 11 ++++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
rename meta/recipes-extended/at/at/{S99at => atd.init} (100%)
diff --git a/meta/recipes-extended/at/at/S99at b/meta/recipes-extended/at/at/atd.init
similarity index 100%
rename from meta/recipes-extended/at/at/S99at
rename to meta/recipes-extended/at/at/atd.init
diff --git a/meta/recipes-extended/at/at_3.1.15.bb b/meta/recipes-extended/at/at_3.1.15.bb
index 1080df4..0c37d6d 100644
--- a/meta/recipes-extended/at/at_3.1.15.bb
+++ b/meta/recipes-extended/at/at_3.1.15.bb
@@ -20,7 +20,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \
file://posixtm.c \
file://posixtm.h \
file://file_replacement_with_gplv2.patch \
- file://S99at \
+ file://atd.init \
file://atd.service \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
@@ -37,7 +37,10 @@ EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
--with-atspool=/var/spool/at/spool \
ac_cv_header_security_pam_appl_h=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} "
-inherit autotools-brokensep systemd
+inherit autotools-brokensep systemd update-rc.d
+
+INITSCRIPT_NAME = "atd"
+INITSCRIPT_PARAMS = "defaults"
SYSTEMD_SERVICE_${PN} = "atd.service"
@@ -51,9 +54,7 @@ do_install () {
oe_runmake -e "IROOT=${D}" install
install -d ${D}${sysconfdir}/init.d
- install -d ${D}${sysconfdir}/rcS.d
- install -m 0755 ${WORKDIR}/S99at ${D}${sysconfdir}/init.d/atd
- ln -sf ../init.d/atd ${D}${sysconfdir}/rcS.d/S99at
+ install -m 0755 ${WORKDIR}/atd.init ${D}${sysconfdir}/init.d/atd
# install systemd unit files
install -d ${D}${systemd_unitdir}/system
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 18/26] keymaps: remove dependency on initscripts
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (16 preceding siblings ...)
2014-09-02 10:54 ` [PATCH 17/26] at: inherit update-rc.d to handle sysv init script Chen Qi
@ 2014-09-02 10:54 ` Chen Qi
2014-09-02 10:54 ` [PATCH 19/26] packagegroup-core-boot: conditionally rdepend on VIRTUAL-RUNTIME_initscripts Chen Qi
` (7 subsequent siblings)
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:54 UTC (permalink / raw)
To: openembedded-core
The 'keymaps' package actually doesn't have runtime dependency on
VIRTUAL-RUNTIME_initscripts, thus removing this dependency.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-bsp/keymaps/keymaps_1.0.bb | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/meta/recipes-bsp/keymaps/keymaps_1.0.bb b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
index 5a3f974..a3f2d89 100644
--- a/meta/recipes-bsp/keymaps/keymaps_1.0.bb
+++ b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
@@ -2,10 +2,7 @@ SUMMARY = "Keyboard maps"
DESCRIPTION = "Keymaps and initscript to set the keymap on bootup."
SECTION = "base"
-# Distro can override initscripts provider
-VIRTUAL-RUNTIME_initscripts ?= "initscripts"
-
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_initscripts} kbd"
+RDEPENDS_${PN} = "kbd"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 19/26] packagegroup-core-boot: conditionally rdepend on VIRTUAL-RUNTIME_initscripts
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (17 preceding siblings ...)
2014-09-02 10:54 ` [PATCH 18/26] keymaps: remove dependency on initscripts Chen Qi
@ 2014-09-02 10:54 ` Chen Qi
2014-09-02 10:54 ` [PATCH 20/26] initscripts: mask several init scripts Chen Qi
` (6 subsequent siblings)
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:54 UTC (permalink / raw)
To: openembedded-core
If we are building a systemd image with 'sysvinit' not in DISTRO_FEATURES,
the initscripts should not be installed into the image, as they are useless.
What's more, we as now support executing scripts under /etc/rcS.d, the
boot time will be increased by these scripts as the systemd will try to
translate them into temporary service files.
These init scritps are actually needed only when 'sysvinit' is in
DISTRO_FEATURES.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
index 886c334..09f5373 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
@@ -27,6 +27,7 @@ VIRTUAL-RUNTIME_keymaps ?= "keymaps"
SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', 'busybox-hwclock', '', d)} \
modutils-initscripts \
init-ifupdown \
+ ${VIRTUAL-RUNTIME_initscripts} \
"
RDEPENDS_${PN} = "\
@@ -38,7 +39,6 @@ RDEPENDS_${PN} = "\
netbase \
${VIRTUAL-RUNTIME_login_manager} \
${VIRTUAL-RUNTIME_init_manager} \
- ${VIRTUAL-RUNTIME_initscripts} \
${VIRTUAL-RUNTIME_dev_manager} \
${VIRTUAL-RUNTIME_update-alternatives} \
${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 20/26] initscripts: mask several init scripts
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (18 preceding siblings ...)
2014-09-02 10:54 ` [PATCH 19/26] packagegroup-core-boot: conditionally rdepend on VIRTUAL-RUNTIME_initscripts Chen Qi
@ 2014-09-02 10:54 ` Chen Qi
2014-09-02 10:54 ` [PATCH 21/26] keymaps: mask keymap when necessary Chen Qi
` (5 subsequent siblings)
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:54 UTC (permalink / raw)
To: openembedded-core
We now support executing scripts under /etc/rcS.d. So we need to
mask several more init scripts here to prevent them from running
at boot time.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-core/initscripts/initscripts_1.0.bb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index 7273a82..a665acf 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -139,11 +139,15 @@ do_install () {
MASKED_SCRIPTS = " \
banner \
bootmisc \
+ checkfs \
checkroot \
devpts \
+ dmesg \
hostname \
mountall \
mountnfs \
+ populate-volatile \
+ read-only-rootfs-hook \
rmnologin \
sysfs \
urandom"
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 21/26] keymaps: mask keymap when necessary
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (19 preceding siblings ...)
2014-09-02 10:54 ` [PATCH 20/26] initscripts: mask several init scripts Chen Qi
@ 2014-09-02 10:54 ` Chen Qi
2014-09-02 10:54 ` [PATCH 22/26] v86d: mask fbsetup " Chen Qi
` (4 subsequent siblings)
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:54 UTC (permalink / raw)
To: openembedded-core
When 'sysvinit' and 'systemd' are both in DISTRO_FEATURES, we need
to prevent the init script from running via systemd.
This is because that the functionality of the init script has implemented
in systemd internally.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-bsp/keymaps/keymaps_1.0.bb | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/recipes-bsp/keymaps/keymaps_1.0.bb b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
index a3f2d89..925161b 100644
--- a/meta/recipes-bsp/keymaps/keymaps_1.0.bb
+++ b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
@@ -35,4 +35,14 @@ do_install () {
fi
}
+DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
+pkg_postinst_${PN} () {
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask keymap.service
+ fi
+}
+
ALLOW_EMPTY_${PN} = "1"
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 22/26] v86d: mask fbsetup when necessary
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (20 preceding siblings ...)
2014-09-02 10:54 ` [PATCH 21/26] keymaps: mask keymap when necessary Chen Qi
@ 2014-09-02 10:54 ` Chen Qi
2014-09-02 10:54 ` [PATCH 23/26] psplash: mask psplash in case of systemd Chen Qi
` (3 subsequent siblings)
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:54 UTC (permalink / raw)
To: openembedded-core
When 'sysvinit' and 'systemd' are both in DISTRO_FEATURES, we need
to prevent the init script from running via systemd.
This is because that the functionality has been implemented internally
in systemd.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-bsp/v86d/v86d_0.1.10.bb | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/recipes-bsp/v86d/v86d_0.1.10.bb b/meta/recipes-bsp/v86d/v86d_0.1.10.bb
index 7ccb4ee..f502072 100644
--- a/meta/recipes-bsp/v86d/v86d_0.1.10.bb
+++ b/meta/recipes-bsp/v86d/v86d_0.1.10.bb
@@ -57,3 +57,13 @@ python __anonymous() {
}
inherit update-rc.d
+
+DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
+pkg_postinst_${PN} () {
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask fbsetup.service
+ fi
+}
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 23/26] psplash: mask psplash in case of systemd
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (21 preceding siblings ...)
2014-09-02 10:54 ` [PATCH 22/26] v86d: mask fbsetup " Chen Qi
@ 2014-09-02 10:54 ` Chen Qi
2014-09-02 10:54 ` [PATCH 24/26] modutils-initscripts: mask modutils " Chen Qi
` (2 subsequent siblings)
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:54 UTC (permalink / raw)
To: openembedded-core
We need to prevent the psplash init script from running via systemd
because the script is supposed to be used by sysvinit system and it
doesn't have any real effect in a systemd based system.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-core/psplash/psplash_git.bb | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb
index 628ced4..4e8f071 100644
--- a/meta/recipes-core/psplash/psplash_git.bb
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -109,3 +109,13 @@ FILES_${PN} += "/mnt/.psplash"
INITSCRIPT_NAME = "psplash.sh"
INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ."
+
+DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
+pkg_postinst_${PN} () {
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask psplash.service
+ fi
+}
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 24/26] modutils-initscripts: mask modutils in case of systemd
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (22 preceding siblings ...)
2014-09-02 10:54 ` [PATCH 23/26] psplash: mask psplash in case of systemd Chen Qi
@ 2014-09-02 10:54 ` Chen Qi
2014-09-02 10:54 ` [PATCH 25/26] run-postinsts.service: remove redundant line Chen Qi
2014-09-02 10:54 ` [PATCH 26/26] systemd: enable forwarding messages to syslog daemon Chen Qi
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:54 UTC (permalink / raw)
To: openembedded-core
We need to prevent the init script from running via systemd because
its functionality has been implemented interanlly in systemd.
In a systemd system, we can add configuration files under
/etc/modules-load.d/ to make things work.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
.../modutils-initscripts/modutils-initscripts.bb | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
index 125f5fb..7031ba1 100644
--- a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
+++ b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
@@ -18,3 +18,13 @@ do_install () {
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/
}
+
+DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
+pkg_postinst_${PN} () {
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask modutils.service
+ fi
+}
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 25/26] run-postinsts.service: remove redundant line
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (23 preceding siblings ...)
2014-09-02 10:54 ` [PATCH 24/26] modutils-initscripts: mask modutils " Chen Qi
@ 2014-09-02 10:54 ` Chen Qi
2014-09-02 17:17 ` Burton, Ross
2014-09-02 10:54 ` [PATCH 26/26] systemd: enable forwarding messages to syslog daemon Chen Qi
25 siblings, 1 reply; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:54 UTC (permalink / raw)
To: openembedded-core
The basic.target itself requires sysinit.target, so there's no
need to write this redundant line in the run-postinsts unit file.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service | 1 -
1 file changed, 1 deletion(-)
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
index 822327a..85a0439 100644
--- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
@@ -13,5 +13,4 @@ RemainAfterExit=No
TimeoutSec=0
[Install]
-WantedBy=basic.target
WantedBy=sysinit.target
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 25/26] run-postinsts.service: remove redundant line
2014-09-02 10:54 ` [PATCH 25/26] run-postinsts.service: remove redundant line Chen Qi
@ 2014-09-02 17:17 ` Burton, Ross
2014-09-03 2:50 ` ChenQi
0 siblings, 1 reply; 45+ messages in thread
From: Burton, Ross @ 2014-09-02 17:17 UTC (permalink / raw)
To: Chen Qi; +Cc: OE-core
On 2 September 2014 11:54, Chen Qi <Qi.Chen@windriver.com> wrote:
> The basic.target itself requires sysinit.target, so there's no
> need to write this redundant line in the run-postinsts unit file.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
> meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
> index 822327a..85a0439 100644
> --- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
> +++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
> @@ -13,5 +13,4 @@ RemainAfterExit=No
> TimeoutSec=0
>
> [Install]
> -WantedBy=basic.target
> WantedBy=sysinit.target
From the commit message it sounds like you meant to remove
sysinit.target. What is correct?
Ross
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 25/26] run-postinsts.service: remove redundant line
2014-09-02 17:17 ` Burton, Ross
@ 2014-09-03 2:50 ` ChenQi
0 siblings, 0 replies; 45+ messages in thread
From: ChenQi @ 2014-09-03 2:50 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On 09/03/2014 01:17 AM, Burton, Ross wrote:
> On 2 September 2014 11:54, Chen Qi <Qi.Chen@windriver.com> wrote:
>> The basic.target itself requires sysinit.target, so there's no
>> need to write this redundant line in the run-postinsts unit file.
>>
>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> ---
>> meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
>> index 822327a..85a0439 100644
>> --- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
>> +++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
>> @@ -13,5 +13,4 @@ RemainAfterExit=No
>> TimeoutSec=0
>>
>> [Install]
>> -WantedBy=basic.target
>> WantedBy=sysinit.target
> >From the commit message it sounds like you meant to remove
> sysinit.target. What is correct?
>
> Ross
>
>
Removing 'WantedBy=basic.target' is correct.
As sysinit.target is required by basic.target, and run-postinsts.service
is required by sysinit.target, then
run-postinsts.service has been in the dependency chain of basic.target.
So there's no need to write 'WantedBy=basic.target'.
Best Regards,
Chen Qi
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 26/26] systemd: enable forwarding messages to syslog daemon
2014-09-02 10:53 [PATCH 00/26] systemd upgrade to 216 and other misc fixes Chen Qi
` (24 preceding siblings ...)
2014-09-02 10:54 ` [PATCH 25/26] run-postinsts.service: remove redundant line Chen Qi
@ 2014-09-02 10:54 ` Chen Qi
25 siblings, 0 replies; 45+ messages in thread
From: Chen Qi @ 2014-09-02 10:54 UTC (permalink / raw)
To: openembedded-core
In systemd_216, journald by default doesn't forward messages to
syslog daemon. This breaks the oeqa testing cases. So we enable
forwarding the messages for now.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-core/systemd/systemd_216.bb | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb
index 776006f..43bba9c 100644
--- a/meta/recipes-core/systemd/systemd_216.bb
+++ b/meta/recipes-core/systemd/systemd_216.bb
@@ -143,6 +143,9 @@ do_install() {
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
+
+ # Enable journal to forward message to syslog daemon
+ sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
}
do_install_ptest () {
--
1.9.1
^ permalink raw reply related [flat|nested] 45+ messages in thread