[oe] [meta-oe][PATCH] networkmanager upgrade to 1.10.6

Pablo Saavedra psaavedra at igalia.com
Mon Mar 19 19:16:01 UTC 2018


On 15/03/18 21:11, Khem Raj wrote:
> On Tue, Mar 13, 2018 at 3:20 PM, Pablo Saavedra <psaavedra at igalia.com> wrote:
>> * Upgraded to latest stable version [1]
>> * Forward-port of the Yocto patches
>> * Disabled 0004-Define-missing-features-to-cater-for-musl.patch
>> * This version keeps fixed 'Fixed setting 802-1x.password-raw
>>   property in nmcli' error. Fixed on 1.6.4 [2].
>>
> I see that you disabled
> 0004-Define-missing-features-to-cater-for-musl.patch but did not
> delete it, secondly it seems to be refreshed so it might be changes as
> well.
> did you build this on musl based target ?
>

No, I didn't it, TBH. ... but I completed it few moments ago and it is
more complex than I expected I must admit.

First of all, the commented up patch can be re-added again with this
simple change (I will do if you OK):

  https://pastebin.com/aFrWzZr8

In second, I made was forced to do this new adaptations required in
other parts of the code (also included in the patch attached
0008-tmp.patch):

* Replace __register_atfork by pthread_atfork in process-util.c :
https://pastebin.com/0an4inyz
* In libnm-core/nm-json.c (L103):

  --- a/NetworkManager-1.10.6/libnm-core/nm-json.c        2018-03-19
17:49:41.875543465 +0100
  +++ b/NetworkManager-1.10.6/libnm-core/nm-json.c        2018-03-19
17:49:55.519603264 +0100
  @@ -104,7 +104,7 @@
        if (!bind_symbols (RTLD_DEFAULT))
                  goto out;
 
  -       handle = dlopen (JANSSON_SONAME, RTLD_LAZY | RTLD_LOCAL |
RTLD_NODELETE | RTLD_DEEPBIND);
  +       handle = dlopen (JANSSON_SONAME, RTLD_LAZY | RTLD_LOCAL |
RTLD_NODELETE);
          if (!handle)
                goto out;

* Skipped `include <net/ethernet.h>` in other libs not GLIBC


* Finally, a hack in the configure.ac due to a compilation error which
stuck me during a big chunk of time today:

    BB_NUMBER_THREADS='1' PARALLEL_MAKE='-j 1' bitbake  networkmanager

./i586-poky-linux-musl-libtool  --tag=CC   --mode=link
i586-poky-linux-musl-gcc  -m32 -march=i586
--sysroot=/home/igalia/psaavedra/yocto/build/tmp/work/i586-poky-linux-musl/networkmanager/1.10.6-r0/recipe-sysroot 
-fdata-sections -ffunction-sections -Wl,--gc-sections  -O2 -pipe -g
-feliminate-unused-debug-types
-fdebug-prefix-map=/home/igalia/psaavedra/yocto/build/tmp/work/i586-poky-linux-musl/networkmanager/1.10.6-r0=/usr/src/debug/networkmanager/1.10.6-r0
-fdebug-prefix-map=/home/igalia/psaavedra/yocto/build/tmp/work/i586-poky-linux-musl/networkmanager/1.10.6-r0/recipe-sysroot-native=
-fdebug-prefix-map=/home/igalia/psaavedra/yocto/build/tmp/work/i586-poky-linux-musl/networkmanager/1.10.6-r0/recipe-sysroot=  
-fno-strict-aliasing
-Wl,--version-script="../NetworkManager-1.10.6/libnm/libnm.ver" 
-version-info "1:0:1" -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o
libnm/libnm.la -rpath /usr/lib   
libnm/libnm_libnm_la-nm-access-point.lo
libnm/libnm_libnm_la-nm-active-connection.lo
libnm/libnm_libnm_la-nm-client.lo
libnm/libnm_libnm_la-nm-dbus-helpers.lo
libnm/libnm_libnm_la-nm-device-adsl.lo
libnm/libnm_libnm_la-nm-device-bond.lo
libnm/libnm_libnm_la-nm-device-bridge.lo
libnm/libnm_libnm_la-nm-device-bt.lo
libnm/libnm_libnm_la-nm-device-dummy.lo
libnm/libnm_libnm_la-nm-device-ethernet.lo
libnm/libnm_libnm_la-nm-device-generic.lo
libnm/libnm_libnm_la-nm-device-infiniband.lo
libnm/libnm_libnm_la-nm-device-ip-tunnel.lo
libnm/libnm_libnm_la-nm-device-macsec.lo
libnm/libnm_libnm_la-nm-device-macvlan.lo
libnm/libnm_libnm_la-nm-device-modem.lo
libnm/libnm_libnm_la-nm-device-olpc-mesh.lo
libnm/libnm_libnm_la-nm-device-ovs-interface.lo
libnm/libnm_libnm_la-nm-device-ovs-port.lo
libnm/libnm_libnm_la-nm-device-ovs-bridge.lo
libnm/libnm_libnm_la-nm-device-ppp.lo
libnm/libnm_libnm_la-nm-device-team.lo
libnm/libnm_libnm_la-nm-device-tun.lo
libnm/libnm_libnm_la-nm-device-vlan.lo
libnm/libnm_libnm_la-nm-device-vxlan.lo
libnm/libnm_libnm_la-nm-device-wifi.lo
libnm/libnm_libnm_la-nm-device-wimax.lo
libnm/libnm_libnm_la-nm-device.lo libnm/libnm_libnm_la-nm-dhcp-config.lo
libnm/libnm_libnm_la-nm-dhcp4-config.lo
libnm/libnm_libnm_la-nm-dhcp6-config.lo
libnm/libnm_libnm_la-nm-dns-manager.lo
libnm/libnm_libnm_la-nm-ip-config.lo
libnm/libnm_libnm_la-nm-ip4-config.lo
libnm/libnm_libnm_la-nm-ip6-config.lo libnm/libnm_libnm_la-nm-manager.lo
libnm/libnm_libnm_la-nm-object.lo
libnm/libnm_libnm_la-nm-remote-connection.lo
libnm/libnm_libnm_la-nm-remote-settings.lo
libnm/libnm_libnm_la-nm-secret-agent-old.lo
libnm/libnm_libnm_la-nm-vpn-connection.lo
libnm/libnm_libnm_la-nm-vpn-plugin-old.lo
libnm/libnm_libnm_la-nm-vpn-editor.lo
libnm/libnm_libnm_la-nm-vpn-service-plugin.lo
libnm/libnm_libnm_la-nm-wimax-nsp.lo 
libnm/libnm_libnm_la-nm-enum-types.lo libnm/libnm-utils.la none required
-lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread
-lglib-2.0 -luuid -ludev
i586-poky-linux-musl-libtool: link: i586-poky-linux-musl-gcc -m32
-march=i586
--sysroot=/home/igalia/psaavedra/yocto/build/tmp/work/i586-poky-linux-musl/networkmanager/1.10.6-r0/recipe-sysroot
-fdata-sections -ffunction-sections -Wl,--gc-sections -O2 -pipe -g
-feliminate-unused-debug-types
-fdebug-prefix-map=/home/igalia/psaavedra/yocto/build/tmp/work/i586-poky-linux-musl/networkmanager/1.10.6-r0=/usr/src/debug/networkmanager/1.10.6-r0
-fdebug-prefix-map=/home/igalia/psaavedra/yocto/build/tmp/work/i586-poky-linux-musl/networkmanager/1.10.6-r0/recipe-sysroot-native=
-fdebug-prefix-map=/home/igalia/psaavedra/yocto/build/tmp/work/i586-poky-linux-musl/networkmanager/1.10.6-r0/recipe-sysroot=
-fno-strict-aliasing
-Wl,--version-script=../NetworkManager-1.10.6/linker-script-binary.ver
-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o src/nm-iface-helper
src/src_nm_iface_helper-nm-iface-helper.o -Wl,--export-dynamic -pthread
none required  src/.libs/libNetworkManagerBase.a -luuid -lssl3 -lsmime3
-lnss3 -lsoftokn3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl
src/.libs/libsystemd-nm.a -lgio-2.0 -lgobject-2.0 -lgmodule-2.0
-lglib-2.0 -ludev -lnl-3 -lnl-genl-3 -lnl-nf-3 -lnl-route-3 -lndp -pthread
i586-poky-linux-musl-gcc: error: none: No such file or directory
i586-poky-linux-musl-gcc: error: required: No such file or directory


  After a while debugging with 'bitbake -cdevshell networkmanager' I
saw, in the generated Makefile the following definition:

    DL_LIBS = none required

  which is generated in the auto configure (configure log):

    checking for library containing dlopen... none required


  to fix this, my idea, is reuse the next patch from [1] (also included
in the attached file):

    --- a/configure.ac
    +++ b/configure.ac
    @@ -306,6 +306,7 @@ dnl
    dnl Checks for libdl - on certain platforms its part of libc
    dnl
    AC_SEARCH_LIBS([dlopen], [dl dld], [], [ac_cv_search_dlopen=])
    +AS_IF([test "$ac_cv_search_dlopen" = "none
required"],[ac_cv_search_dlopen=""])
    AC_SUBST([DL_LIBS], "$ac_cv_search_dlopen")

    PKG_CHECK_MODULES(GLIB, [gio-unix-2.0 >= 2.37.6 gmodule-2.0],

  Any better idea ¿?

BTW, Thanks in advance for the review. If you OK, I'd very happy to send
a 2# version of the patch for the networkmanager package with these changes

[1]
https://github.com/voidlinux/void-packages/blob/master/srcpkgs/NetworkManager/patches/musl-dlopen-configure-ac.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-tmp.patch
Type: text/x-patch
Size: 3806 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20180319/73a04715/attachment-0002.bin>


More information about the Openembedded-devel mailing list