Patchwork [1/1] systemd: upgrade to 215

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date July 25, 2014, 9:20 a.m.
Message ID <f11514aea79be9f009030d3acb5964de15a26223.1406279934.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/76657/
State New
Headers show

Comments

Qi.Chen@windriver.com - July 25, 2014, 9:20 a.m.
Upgrade systemd from 213 to 215.

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

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../systemd/systemd/systemd-older-kernel.patch     |   56 --------------------
 .../systemd/{systemd_213.bb => systemd_215.bb}     |    8 +--
 2 files changed, 4 insertions(+), 60 deletions(-)
 delete mode 100644 meta/recipes-core/systemd/systemd/systemd-older-kernel.patch
 rename meta/recipes-core/systemd/{systemd_213.bb => systemd_215.bb} (99%)
Koen Kooi - July 25, 2014, 10:56 a.m.
Op 25 jul. 2014, om 11:20 heeft Chen Qi <Qi.Chen@windriver.com> het volgende geschreven:

> Upgrade systemd from 213 to 215.
> 
> systemd-older-kernel.patch is removed as it's fixed in 215.

NAK! This will drop libraries and and leave files unpackages, you need something like this:

@@ -146,7 +146,9 @@ do_install_ptest () {
 
 python populate_packages_prepend (){
     systemdlibdir = d.getVar("rootlibdir", True)
+    prefixlibdir = d.getVar("libdir", True)
     do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
+    do_split_packages(d, prefixlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
 }
 PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
 
@@ -198,7 +200,10 @@ RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts"
 CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
                 ${sysconfdir}/systemd/logind.conf \
                 ${sysconfdir}/systemd/system.conf \
-                ${sysconfdir}/systemd/user.conf"
+                ${sysconfdir}/systemd/user.conf \
+                ${libdir}/sysusers.d/systemd.conf \
+                ${libdir}/sysusers.d/basic.conf \
+                "
 
 FILES_${PN} = " ${base_bindir}/* \
                 ${datadir}/bash-completion \
@@ -218,7 +223,8 @@ FILES_${PN} = " ${base_bindir}/* \
                 ${rootlibexecdir}/systemd/* \
                 ${systemd_unitdir}/* \
                 ${base_libdir}/security/*.so \
-                ${libdir}/libnss_myhostname.so.2 \
+                ${libdir}/libnss_*.so.* \
+                ${libdir}/sysusers.d \
                 /cgroup \
                 ${bindir}/systemd* \
                 ${bindir}/busctl \


lib*udev have moved, 2 nss plugins were added and the sysusers files should be added to CONFFILES.
Qi.Chen@windriver.com - July 28, 2014, 2:24 a.m.
On 07/25/2014 06:56 PM, Koen Kooi wrote:
> Op 25 jul. 2014, om 11:20 heeft Chen Qi <Qi.Chen@windriver.com> het volgende geschreven:
>
>> Upgrade systemd from 213 to 215.
>>
>> systemd-older-kernel.patch is removed as it's fixed in 215.
> NAK! This will drop libraries and and leave files unpackages, you need something like this:
>
> @@ -146,7 +146,9 @@ do_install_ptest () {
>   
>   python populate_packages_prepend (){
>       systemdlibdir = d.getVar("rootlibdir", True)
> +    prefixlibdir = d.getVar("libdir", True)
>       do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
> +    do_split_packages(d, prefixlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
>   }
>   PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
>   
> @@ -198,7 +200,10 @@ RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts"
>   CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
>                   ${sysconfdir}/systemd/logind.conf \
>                   ${sysconfdir}/systemd/system.conf \
> -                ${sysconfdir}/systemd/user.conf"
> +                ${sysconfdir}/systemd/user.conf \
> +                ${libdir}/sysusers.d/systemd.conf \
> +                ${libdir}/sysusers.d/basic.conf \
> +                "
>   
>   FILES_${PN} = " ${base_bindir}/* \
>                   ${datadir}/bash-completion \
> @@ -218,7 +223,8 @@ FILES_${PN} = " ${base_bindir}/* \
>                   ${rootlibexecdir}/systemd/* \
>                   ${systemd_unitdir}/* \
>                   ${base_libdir}/security/*.so \
> -                ${libdir}/libnss_myhostname.so.2 \
> +                ${libdir}/libnss_*.so.* \
> +                ${libdir}/sysusers.d \
>                   /cgroup \
>                   ${bindir}/systemd* \
>                   ${bindir}/busctl \
>
>
> lib*udev have moved, 2 nss plugins were added and the sysusers files should be added to CONFFILES.
>

Hi Koen,

Which files are not packaged? I don't see any 'installed-not-shipped' 
error after upgrading.

Note the I've added ${exec_prefix}/lib/sysusers.d to FILES_${PN}.
And I don't think files under /lib should be added to CONFFILES.

Chen Qi
Koen Kooi - July 28, 2014, 6:31 a.m.
Op 28 jul. 2014, om 04:24 heeft ChenQi <Qi.Chen@windriver.com> het volgende geschreven:

> On 07/25/2014 06:56 PM, Koen Kooi wrote:
>> Op 25 jul. 2014, om 11:20 heeft Chen Qi <Qi.Chen@windriver.com> het volgende geschreven:
>> 
>>> Upgrade systemd from 213 to 215.
>>> 
>>> systemd-older-kernel.patch is removed as it's fixed in 215.
>> NAK! This will drop libraries and and leave files unpackages, you need something like this:
>> 
>> @@ -146,7 +146,9 @@ do_install_ptest () {
>>    python populate_packages_prepend (){
>>      systemdlibdir = d.getVar("rootlibdir", True)
>> +    prefixlibdir = d.getVar("libdir", True)
>>      do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
>> +    do_split_packages(d, prefixlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
>>  }
>>  PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
>>  @@ -198,7 +200,10 @@ RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts"
>>  CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
>>                  ${sysconfdir}/systemd/logind.conf \
>>                  ${sysconfdir}/systemd/system.conf \
>> -                ${sysconfdir}/systemd/user.conf"
>> +                ${sysconfdir}/systemd/user.conf \
>> +                ${libdir}/sysusers.d/systemd.conf \
>> +                ${libdir}/sysusers.d/basic.conf \
>> +                "
>>    FILES_${PN} = " ${base_bindir}/* \
>>                  ${datadir}/bash-completion \
>> @@ -218,7 +223,8 @@ FILES_${PN} = " ${base_bindir}/* \
>>                  ${rootlibexecdir}/systemd/* \
>>                  ${systemd_unitdir}/* \
>>                  ${base_libdir}/security/*.so \
>> -                ${libdir}/libnss_myhostname.so.2 \
>> +                ${libdir}/libnss_*.so.* \
>> +                ${libdir}/sysusers.d \
>>                  /cgroup \
>>                  ${bindir}/systemd* \
>>                  ${bindir}/busctl \
>> 
>> 
>> lib*udev have moved, 2 nss plugins were added and the sysusers files should be added to CONFFILES.
>> 
> 
> Hi Koen,
> 
> Which files are not packaged? I don't see any 'installed-not-shipped' error after upgrading.
> 
> Note the I've added ${exec_prefix}/lib/sysusers.d to FILES_${PN}.
> And I don't think files under /lib should be added to CONFFILES.

System config files need to be in CONFFILES, even if they aren't placed in /etc
Qi.Chen@windriver.com - July 28, 2014, 6:40 a.m.
On 07/28/2014 02:31 PM, Koen Kooi wrote:
> Op 28 jul. 2014, om 04:24 heeft ChenQi <Qi.Chen@windriver.com> het volgende geschreven:
>
>> On 07/25/2014 06:56 PM, Koen Kooi wrote:
>>> Op 25 jul. 2014, om 11:20 heeft Chen Qi <Qi.Chen@windriver.com> het volgende geschreven:
>>>
>>>> Upgrade systemd from 213 to 215.
>>>>
>>>> systemd-older-kernel.patch is removed as it's fixed in 215.
>>> NAK! This will drop libraries and and leave files unpackages, you need something like this:
>>>
>>> @@ -146,7 +146,9 @@ do_install_ptest () {
>>>     python populate_packages_prepend (){
>>>       systemdlibdir = d.getVar("rootlibdir", True)
>>> +    prefixlibdir = d.getVar("libdir", True)
>>>       do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
>>> +    do_split_packages(d, prefixlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
>>>   }
>>>   PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
>>>   @@ -198,7 +200,10 @@ RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts"
>>>   CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
>>>                   ${sysconfdir}/systemd/logind.conf \
>>>                   ${sysconfdir}/systemd/system.conf \
>>> -                ${sysconfdir}/systemd/user.conf"
>>> +                ${sysconfdir}/systemd/user.conf \
>>> +                ${libdir}/sysusers.d/systemd.conf \
>>> +                ${libdir}/sysusers.d/basic.conf \
>>> +                "
>>>     FILES_${PN} = " ${base_bindir}/* \
>>>                   ${datadir}/bash-completion \
>>> @@ -218,7 +223,8 @@ FILES_${PN} = " ${base_bindir}/* \
>>>                   ${rootlibexecdir}/systemd/* \
>>>                   ${systemd_unitdir}/* \
>>>                   ${base_libdir}/security/*.so \
>>> -                ${libdir}/libnss_myhostname.so.2 \
>>> +                ${libdir}/libnss_*.so.* \
>>> +                ${libdir}/sysusers.d \
>>>                   /cgroup \
>>>                   ${bindir}/systemd* \
>>>                   ${bindir}/busctl \
>>>
>>>
>>> lib*udev have moved, 2 nss plugins were added and the sysusers files should be added to CONFFILES.
>>>
>> Hi Koen,
>>
>> Which files are not packaged? I don't see any 'installed-not-shipped' error after upgrading.
>>
>> Note the I've added ${exec_prefix}/lib/sysusers.d to FILES_${PN}.
>> And I don't think files under /lib should be added to CONFFILES.
> System config files need to be in CONFFILES, even if they aren't placed in /etc
>

OK.
I'll send out a V2.
Thanks for your advice.

//Chen Qi

Patch

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 99%
rename from meta/recipes-core/systemd/systemd_213.bb
rename to meta/recipes-core/systemd/systemd_215.bb
index 5de7cdc..b1ffbdd 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 \
@@ -35,8 +35,7 @@  SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
            file://00-create-volatile.conf \
            file://init \
            file://run-ptest \
-           file://systemd-older-kernel.patch \
-          "
+         "
 
 S = "${WORKDIR}/git"
 
@@ -231,6 +230,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 \