Patchwork [2/3] systemd: spin libnss_myhostname to package of its own

login
register
mail settings
Submitter Khem Raj
Date March 9, 2013, 11:54 p.m.
Message ID <4a7f6b52607ac6dfd7651f1d740e1c8f436884c0.1362873102.git.raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/45833/
State New
Headers show

Comments

Khem Raj - March 9, 2013, 11:54 p.m.
Fix packaging warning

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-core/systemd/systemd_198.bb |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Koen Kooi - March 11, 2013, 2:02 p.m.
Op 10 mrt. 2013, om 00:54 heeft Khem Raj <raj.khem@gmail.com> het volgende geschreven:

> Fix packaging warning
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> meta/recipes-core/systemd/systemd_198.bb |    5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-core/systemd/systemd_198.bb b/meta/recipes-core/systemd/systemd_198.bb
> index c57ee52..381a67b 100644
> --- a/meta/recipes-core/systemd/systemd_198.bb
> +++ b/meta/recipes-core/systemd/systemd_198.bb
> @@ -98,7 +98,9 @@ do_install() {
> }
> 
> python populate_packages_prepend (){
> -    systemdlibdir = d.getVar("base_libdir", True)
> +    systemdbaselibdir = d.getVar("base_libdir", True)
> +    do_split_packages(d, systemdbaselibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
> +    systemdlibdir = d.getVar("libdir", True)

libnss-myhostname is not a systemd library, but a plugin for the nameservice switcher, it is the proper way to get localhost to resolve so you don't need to hack netbase like this: http://git.linaro.org/gitweb?p=openembedded/meta-linaro.git;a=commitdiff;h=d1fe025991f73b1cdc53d18af8afdf6d650b3b14


>     do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
> }
> PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
> @@ -146,7 +148,6 @@ FILES_${PN} = " ${base_bindir}/* \
>                 ${systemd_unitdir}/system/* \
>                 /lib/udev/rules.d/99-systemd.rules \
>                 ${base_libdir}/security/*.so \
> -                ${libdir}/libnss_myhostname.so.2 \
>                 /cgroup \
>                 ${bindir}/systemd* \
>                 ${bindir}/localectl \
> -- 
> 1.7.9.5
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Khem Raj - March 11, 2013, 11:01 p.m.
On Mar 11, 2013, at 7:02 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:

>> python populate_packages_prepend (){
>> -    systemdlibdir = d.getVar("base_libdir", True)
>> +    systemdbaselibdir = d.getVar("base_libdir", True)
>> +    do_split_packages(d, systemdbaselibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
>> +    systemdlibdir = d.getVar("libdir", True)
> 
> libnss-myhostname is not a systemd library, but a plugin for the nameservice switcher, it is the proper way to get localhost to resolve so you don't need to hack netbase like this:http://git.linaro.org/gitweb?p=openembedded/meta-linaro.git;a=commitdiff;h=d1fe025991f73b1cdc53d18af8afdf6d650b3b14
> 

True yes. I was lazy and saw that same mechanism from packaging pov could be used.
main intent was to package it as a separate package. I can redo it to package it differently
to make the semantics of plugins Vs. core lib clear.

> 
>

Patch

diff --git a/meta/recipes-core/systemd/systemd_198.bb b/meta/recipes-core/systemd/systemd_198.bb
index c57ee52..381a67b 100644
--- a/meta/recipes-core/systemd/systemd_198.bb
+++ b/meta/recipes-core/systemd/systemd_198.bb
@@ -98,7 +98,9 @@  do_install() {
 }
 
 python populate_packages_prepend (){
-    systemdlibdir = d.getVar("base_libdir", True)
+    systemdbaselibdir = d.getVar("base_libdir", True)
+    do_split_packages(d, systemdbaselibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
+    systemdlibdir = d.getVar("libdir", True)
     do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
 }
 PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
@@ -146,7 +148,6 @@  FILES_${PN} = " ${base_bindir}/* \
                 ${systemd_unitdir}/system/* \
                 /lib/udev/rules.d/99-systemd.rules \
                 ${base_libdir}/security/*.so \
-                ${libdir}/libnss_myhostname.so.2 \
                 /cgroup \
                 ${bindir}/systemd* \
                 ${bindir}/localectl \