diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager')
15 files changed, 497 insertions, 467 deletions
diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch deleted file mode 100644 index 0c415bce..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 3f4b6319701834182304c4079119780f4ae5b49b Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 7 Nov 2018 11:30:44 -0800 -Subject: [PATCH] Do not include net/ethernet.h and linux/if_ether.h - -They conflict when used together especially with musl -removing them still keeps it working so it seems they are redundant - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - shared/n-acd/src/n-acd.c | 1 - - src/platform/wpan/nm-wpan-utils.h | 2 -- - src/settings/nm-settings-connection.h | 2 -- - 3 files changed, 5 deletions(-) - -diff --git a/shared/n-acd/src/n-acd.c b/shared/n-acd/src/n-acd.c -index 9164f95..9538e50 100644 ---- a/shared/n-acd/src/n-acd.c -+++ b/shared/n-acd/src/n-acd.c -@@ -23,7 +23,6 @@ - #include <errno.h> - #include <limits.h> - #include <linux/filter.h> --#include <linux/if_ether.h> - #include <linux/if_packet.h> - #include <net/ethernet.h> - #include <netinet/if_ether.h> -diff --git a/src/platform/wpan/nm-wpan-utils.h b/src/platform/wpan/nm-wpan-utils.h -index f7d0c03..e1c81f5 100644 ---- a/src/platform/wpan/nm-wpan-utils.h -+++ b/src/platform/wpan/nm-wpan-utils.h -@@ -20,8 +20,6 @@ - #ifndef __WPAN_UTILS_H__ - #define __WPAN_UTILS_H__ - --#include <net/ethernet.h> -- - #include "nm-dbus-interface.h" - #include "platform/nm-netlink.h" - -diff --git a/src/settings/nm-settings-connection.h b/src/settings/nm-settings-connection.h -index e796b71..c01fef6 100644 ---- a/src/settings/nm-settings-connection.h -+++ b/src/settings/nm-settings-connection.h -@@ -22,8 +22,6 @@ - #ifndef __NETWORKMANAGER_SETTINGS_CONNECTION_H__ - #define __NETWORKMANAGER_SETTINGS_CONNECTION_H__ - --#include <net/ethernet.h> -- - #include "nm-dbus-object.h" - #include "nm-connection.h" - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch index 351f264c..19c8c748 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch @@ -1,4 +1,4 @@ -From 583f0448fb7e9aba2b410c06eec6f420b41a6a0c Mon Sep 17 00:00:00 2001 +From 9bcf4c81a559d1e7deac47b2e510d7f1e5837a02 Mon Sep 17 00:00:00 2001 From: Pablo Saavedra <psaavedra@igalia.com> Date: Tue, 13 Mar 2018 17:36:20 +0100 Subject: [PATCH] Fixed configure.ac: Fix pkgconfig sysroot locations @@ -8,10 +8,10 @@ Subject: [PATCH] Fixed configure.ac: Fix pkgconfig sysroot locations 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 51e5eb6..c9d3e56 100644 +index 65ceffb..ad4b0fc 100644 --- a/configure.ac +++ b/configure.ac -@@ -572,7 +572,7 @@ if test "$have_jansson" = "yes"; then +@@ -561,7 +561,7 @@ if test "$have_jansson" = "yes"; then AC_DEFINE(WITH_JANSSON, 1, [Define if JANSSON is enabled]) AC_CHECK_TOOLS(READELF, [eu-readelf readelf]) @@ -20,6 +20,3 @@ index 51e5eb6..c9d3e56 100644 JANSSON_SONAME=`$READELF -d $JANSSON_LIBDIR/libjansson.so |sed -n 's/.*SONAME.*\[[\([^]]*\)]]/\1/p'` if test "$JANSSON_SONAME" = ""; then --- -2.14.1 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch deleted file mode 100644 index 49a07353..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 18f71c1b48730b8602826517f2b5b088283ae948 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 31 Mar 2017 16:48:00 -0700 -Subject: [PATCH] sd-lldp.h: Remove net/ethernet.h seems to be over specified - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/systemd/src/libsystemd-network/sd-lldp.c | 1 + - src/systemd/src/systemd/sd-lldp.h | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/systemd/src/libsystemd-network/sd-lldp.c b/src/systemd/src/libsystemd-network/sd-lldp.c -index 31e2448..7721cc2 100644 ---- a/src/systemd/src/libsystemd-network/sd-lldp.c -+++ b/src/systemd/src/libsystemd-network/sd-lldp.c -@@ -3,6 +3,7 @@ - #include "nm-sd-adapt.h" - - #include <arpa/inet.h> -+#include <net/ethernet.h> - #include <linux/sockios.h> - - #include "sd-lldp.h" -diff --git a/src/systemd/src/systemd/sd-lldp.h b/src/systemd/src/systemd/sd-lldp.h -index 3f35eeb..61b0e45 100644 ---- a/src/systemd/src/systemd/sd-lldp.h -+++ b/src/systemd/src/systemd/sd-lldp.h -@@ -18,7 +18,7 @@ - ***/ - - #include <inttypes.h> --#include <net/ethernet.h> -+//#include <net/ethernet.h> - #include <sys/types.h> - - #include "sd-event.h" --- -2.14.1 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Do-not-create-settings-settings-property-documentati.patch index c50293c0..446637b2 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Do-not-create-settings-settings-property-documentati.patch @@ -1,4 +1,4 @@ -From 4f000a4a19975d6aba71427e693cd1ed080abda9 Mon Sep 17 00:00:00 2001 +From 9eab96351a726e9ce6a15d158f743e35d73a8900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> Date: Thu, 22 Mar 2018 11:08:30 +0100 Subject: [PATCH] Do not create settings settings/property documentation @@ -6,23 +6,29 @@ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + It was tried to get this work but gi / GirRepository could not be found by python. Anyway it is not necessary for us to have the settings/property docs. Upstream-Status: Inappropriate [OE specific] Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> + --- - Makefile.am | 20 -------------------- + Makefile.am | 11 ----------- configure.ac | 5 ----- - 2 files changed, 25 deletions(-) + 2 files changed, 16 deletions(-) diff --git a/Makefile.am b/Makefile.am -index 1e100f6..d31e3c1 100644 +index d5cbcf5..2a1819a 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -1115,9 +1115,7 @@ EXTRA_DIST += \ - if HAVE_INTROSPECTION +@@ -1473,9 +1473,7 @@ libnm/libnm.typelib: libnm/libnm.gir + INTROSPECTION_GIRS += libnm/NM-1.0.gir libnm_noinst_data = \ - libnm/nm-property-docs.xml \ @@ -31,7 +37,7 @@ index 1e100f6..d31e3c1 100644 libnm/nm-settings-keyfile-docs.xml \ libnm/nm-settings-ifcfg-rh-docs.xml -@@ -3692,27 +3690,9 @@ $(clients_common_libnmc_base_la_OBJECTS): $(libnm_lib_h_pub_mkenums) +@@ -4236,18 +4234,9 @@ $(clients_common_libnmc_base_la_OBJECTS): $(libnm_lib_h_pub_mkenums) $(clients_common_libnmc_base_la_OBJECTS): clients/common/.dirstamp clients_common_settings_doc_h = clients/common/settings-docs.h @@ -40,16 +46,7 @@ index 1e100f6..d31e3c1 100644 - $(AM_V_GEN) $(XSLTPROC) --output $@ $< $(word 2,$^) -DISTCLEANFILES += $(clients_common_settings_doc_h) -check-local-settings-docs: $(clients_common_settings_doc_h) -- @if test -z "$$NMTST_NO_CHECK_SETTINGS_DOCS" ; then \ -- if ! cmp -s "$(srcdir)/$(clients_common_settings_doc_h).in" "$(builddir)/$(clients_common_settings_doc_h)" ; then \ -- if test "$$NM_TEST_REGENERATE" == 1 ; then \ -- cp -f "$(builddir)/$(clients_common_settings_doc_h)" "$(srcdir)/$(clients_common_settings_doc_h).in"; \ -- else \ -- echo "The generated file \"$(builddir)/$(clients_common_settings_doc_h)\" differs from the source file \"$(srcdir)/$(clients_common_settings_doc_h).in\". You probably should copy the generated file over to the source file. You can skip this test by setting \$$NMTST_NO_CHECK_SETTINGS_DOCS=yes". You can also automatically copy the file by rerunning the test with \$$NM_TEST_REGENERATE=1 ; \ -- false; \ -- fi; \ -- fi;\ -- fi +- $(srcdir)/tools/check-settings-docs.sh "$(srcdir)" "$(builddir)" "$(clients_common_settings_doc_h)" -check_local += check-local-settings-docs -else $(clients_common_settings_doc_h): $(clients_common_settings_doc_h).in clients/common/.dirstamp @@ -60,10 +57,10 @@ index 1e100f6..d31e3c1 100644 $(clients_common_settings_doc_h) \ $(clients_common_settings_doc_h).in diff --git a/configure.ac b/configure.ac -index 79dc3b9..23d14a6 100644 +index ad4b0fc..0092092 100644 --- a/configure.ac +++ b/configure.ac -@@ -1195,11 +1195,6 @@ GTK_DOC_CHECK(1.0) +@@ -1201,11 +1201,6 @@ GTK_DOC_CHECK(1.0) # check if we can build setting property documentation build_docs=no if test -n "$INTROSPECTION_MAKEFILE"; then @@ -75,6 +72,3 @@ index 79dc3b9..23d14a6 100644 AC_PATH_PROG(PERL, perl) if test -z "$PERL"; then AC_MSG_ERROR([--enable-introspection requires perl]) --- -2.14.5 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch new file mode 100644 index 00000000..c23fc308 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch @@ -0,0 +1,165 @@ +From e7ed91c48e1a07527a860637a7865eb67ce34cf3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Tue, 2 Apr 2019 01:34:35 +0200 +Subject: [PATCH] Fix build with musl - systemd specific +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Networkmanager imported some code from systemd. This requires some adjustments +for musl. + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> + +--- + shared/systemd/src/basic/in-addr-util.c | 1 + + shared/systemd/src/basic/process-util.c | 9 +++++++++ + shared/systemd/src/basic/socket-util.h | 6 ++++++ + shared/systemd/src/basic/sort-util.h | 27 ++++--------------------- + shared/systemd/src/basic/stdio-util.h | 2 ++ + shared/systemd/src/basic/string-util.h | 5 +++++ + 6 files changed, 27 insertions(+), 23 deletions(-) + +diff --git a/shared/systemd/src/basic/in-addr-util.c b/shared/systemd/src/basic/in-addr-util.c +index 91d687c..8388304 100644 +--- a/shared/systemd/src/basic/in-addr-util.c ++++ b/shared/systemd/src/basic/in-addr-util.c +@@ -15,6 +15,7 @@ + #include "in-addr-util.h" + #include "macro.h" + #include "parse-util.h" ++#include "string-util.h" + #include "random-util.h" + #include "strxcpyx.h" + #include "util.h" +diff --git a/shared/systemd/src/basic/process-util.c b/shared/systemd/src/basic/process-util.c +index 1456167..42f51a0 100644 +--- a/shared/systemd/src/basic/process-util.c ++++ b/shared/systemd/src/basic/process-util.c +@@ -17,6 +17,9 @@ + #include <sys/wait.h> + #include <syslog.h> + #include <unistd.h> ++#ifndef __GLIBC__ ++#include <pthread.h> ++#endif + #if 0 /* NM_IGNORED */ + #if HAVE_VALGRIND_VALGRIND_H + #include <valgrind/valgrind.h> +@@ -1123,11 +1126,13 @@ void reset_cached_pid(void) { + cached_pid = CACHED_PID_UNSET; + } + ++#ifdef __GLIBC__ + /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc + * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against + * libpthread, as it is part of glibc anyway. */ + extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void *dso_handle); + extern void* __dso_handle _weak_; ++#endif + + pid_t getpid_cached(void) { + static bool installed = false; +@@ -1156,7 +1161,11 @@ pid_t getpid_cached(void) { + * only half-documented (glibc doesn't document it but LSB does — though only superficially) + * we'll check for errors only in the most generic fashion possible. */ + ++#ifdef __GLIBC__ + if (__register_atfork(NULL, NULL, reset_cached_pid, __dso_handle) != 0) { ++#else ++ if (pthread_atfork(NULL, NULL, reset_cached_pid) != 0) { ++#endif + /* OOM? Let's try again later */ + cached_pid = CACHED_PID_UNSET; + return new_pid; +diff --git a/shared/systemd/src/basic/socket-util.h b/shared/systemd/src/basic/socket-util.h +index a0886e0..da47d14 100644 +--- a/shared/systemd/src/basic/socket-util.h ++++ b/shared/systemd/src/basic/socket-util.h +@@ -14,6 +14,12 @@ + #include <sys/types.h> + #include <sys/un.h> + ++#if !defined(__GLIBC__) ++/* SIOCGSTAMPNS from linux/asm-generic.h ++ * for src/systemd/src/libsystemd-network/sd-lldp.c */ ++#include <linux/sockios.h> ++#endif ++ + #include "macro.h" + #include "missing_socket.h" + #include "sparse-endian.h" +diff --git a/shared/systemd/src/basic/sort-util.h b/shared/systemd/src/basic/sort-util.h +index e029f86..1e8b6e1 100644 +--- a/shared/systemd/src/basic/sort-util.h ++++ b/shared/systemd/src/basic/sort-util.h +@@ -5,15 +5,10 @@ + + #include "macro.h" + +-void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size, +- __compar_d_fn_t compar, void *arg); +- +-#define typesafe_bsearch_r(k, b, n, func, userdata) \ +- ({ \ +- const typeof(b[0]) *_k = k; \ +- int (*_func_)(const typeof(b[0])*, const typeof(b[0])*, typeof(userdata)) = func; \ +- xbsearch_r((const void*) _k, (b), (n), sizeof((b)[0]), (__compar_d_fn_t) _func_, userdata); \ +- }) ++#if !defined(__GLIBC__) ++typedef int (*__compar_fn_t) (const void*, const void*); ++typedef __compar_fn_t comparison_fn_t; ++#endif + + /** + * Normal bsearch requires base to be nonnull. Here were require +@@ -54,17 +49,3 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn + int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \ + qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \ + }) +- +-static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) { +- if (nmemb <= 1) +- return; +- +- assert(base); +- qsort_r(base, nmemb, size, compar, userdata); +-} +- +-#define typesafe_qsort_r(p, n, func, userdata) \ +- ({ \ +- int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \ +- qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \ +- }) +diff --git a/shared/systemd/src/basic/stdio-util.h b/shared/systemd/src/basic/stdio-util.h +index c3b9448..e80a938 100644 +--- a/shared/systemd/src/basic/stdio-util.h ++++ b/shared/systemd/src/basic/stdio-util.h +@@ -1,7 +1,9 @@ + /* SPDX-License-Identifier: LGPL-2.1+ */ + #pragma once + ++#if defined(__GLIBC__) + #include <printf.h> ++#endif + #include <stdarg.h> + #include <stdio.h> + #include <sys/types.h> +diff --git a/shared/systemd/src/basic/string-util.h b/shared/systemd/src/basic/string-util.h +index 04cc82b..2cf589a 100644 +--- a/shared/systemd/src/basic/string-util.h ++++ b/shared/systemd/src/basic/string-util.h +@@ -26,6 +26,11 @@ + #define strcaseeq(a,b) (strcasecmp((a),(b)) == 0) + #define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0) + ++/* musl does not know strndupa */ ++#if !defined(__GLIBC__) ++#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s) ++#endif ++ + int strcmp_ptr(const char *a, const char *b) _pure_; + + static inline bool streq_ptr(const char *a, const char *b) { diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch deleted file mode 100644 index 00dda5b1..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch +++ /dev/null @@ -1,54 +0,0 @@ -From e92de7409a3e107f90d108a9c5d49bd0418296dd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> -Date: Thu, 22 Mar 2018 17:54:10 +0100 -Subject: [PATCH] Usual fix for musl libc -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Pending - -Stolen from [1] and prettyfied slightly - -[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches - -Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> - ---- - src/systemd/src/basic/stdio-util.h | 2 ++ - src/systemd/src/basic/util.h | 5 +++++ - 2 files changed, 7 insertions(+) - -diff --git a/src/systemd/src/basic/stdio-util.h b/src/systemd/src/basic/stdio-util.h -index 73c0327..e1ce64f 100644 ---- a/src/systemd/src/basic/stdio-util.h -+++ b/src/systemd/src/basic/stdio-util.h -@@ -1,7 +1,9 @@ - /* SPDX-License-Identifier: LGPL-2.1+ */ - #pragma once - -+#if defined(__GLIBC__) - #include <printf.h> -+#endif - #include <stdarg.h> - #include <stdio.h> - #include <sys/types.h> -diff --git a/src/systemd/src/basic/util.h b/src/systemd/src/basic/util.h -index b31dfd1..9b7032c 100644 ---- a/src/systemd/src/basic/util.h -+++ b/src/systemd/src/basic/util.h -@@ -28,6 +28,11 @@ - #include "missing.h" - #include "time-util.h" - -+#if !defined(__GLIBC__) -+typedef int (*__compar_fn_t) (const void*, const void*); -+typedef __compar_fn_t comparison_fn_t; -+#endif -+ - size_t page_size(void) _pure_; - #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) - --- -2.14.3 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch new file mode 100644 index 00000000..196a3358 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch @@ -0,0 +1,116 @@ +From 877fbb4e848629ff57371b5bdb0d56369abe9d81 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Mon, 8 Apr 2019 23:10:43 +0200 +Subject: [PATCH] Fix build with musl +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The build issues caused by definition conflicts musl vs linux-libc headers +(error: redefinition of ...) can be reduced to two headers: + +1. netinet/if_ether.h <-> linux/if_ether.h: linux-libc header plays well with + glibc and musl headers in case libc's variant (netinet/if_ether.h) is + included BEFORE linux variant [1]. We add include at two positions: + 1. shared/nm-default.h: This is a global which used for networkmanager and + is included at the very beginning of all c-files. + 2. libnm-core/nm-utils.h: This file makes it into installation and is used + by dependent packages as network-manager-applet +2. net/if_arp. <-> linux/if_ether.h: linux-libc: Unfortunaly these files do + not play together in harmony. Therefore the libc variant is included early in + shared/nm-default.h and occurances linux/if_arp.h are removed. + +Note: +Be aware that this is still nasty business: We have to trust that musl headers +define same signatures as linux would do - just because musl-makers consider +linux-libc headers 'notoriously broken for userspace' [2] (search for +'error: redefinition of'). + +[1] http://lists.openembedded.org/pipermail/openembedded-core/2019-March/280440.html +[2] https://wiki.musl-libc.org/faq.html + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> + +--- + clients/tui/nmt-device-entry.c | 1 - + libnm-core/nm-utils.h | 4 ++++ + shared/nm-default.h | 3 +++ + src/devices/nm-device.c | 2 +- + src/platform/nm-linux-platform.c | 1 - + 5 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/clients/tui/nmt-device-entry.c b/clients/tui/nmt-device-entry.c +index 4ab5932..915248c 100644 +--- a/clients/tui/nmt-device-entry.c ++++ b/clients/tui/nmt-device-entry.c +@@ -26,7 +26,6 @@ + #include "nmt-device-entry.h" + + #include <sys/socket.h> +-#include <linux/if_arp.h> + + #include "nmtui.h" + +diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h +index 5418a1e..f492da6 100644 +--- a/libnm-core/nm-utils.h ++++ b/libnm-core/nm-utils.h +@@ -10,6 +10,10 @@ + #error "Only <NetworkManager.h> can be included directly." + #endif + ++/* include as early as possible for musl */ ++#include <netinet/if_ether.h> ++/* #include <net/if_arp.h> - uncoment for broken dependents?? */ ++ + #include <glib.h> + + #include <netinet/in.h> +diff --git a/shared/nm-default.h b/shared/nm-default.h +index ace6ede..25357da 100644 +--- a/shared/nm-default.h ++++ b/shared/nm-default.h +@@ -182,6 +182,9 @@ + #endif + + #include <stdlib.h> ++/* include as early as possible for musl */ ++#include <netinet/if_ether.h> ++#include <net/if_arp.h> + + /*****************************************************************************/ + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index 3bbc975..4e8a3f6 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -9,6 +9,7 @@ + #include "nm-device.h" + + #include <netinet/in.h> ++#include <net/if.h> + #include <unistd.h> + #include <sys/ioctl.h> + #include <signal.h> +@@ -17,7 +18,6 @@ + #include <arpa/inet.h> + #include <fcntl.h> + #include <linux/if_addr.h> +-#include <linux/if_arp.h> + #include <linux/rtnetlink.h> + #include <linux/pkt_sched.h> + +diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c +index 7abe4df..9f53147 100644 +--- a/src/platform/nm-linux-platform.c ++++ b/src/platform/nm-linux-platform.c +@@ -14,7 +14,6 @@ + #include <libudev.h> + #include <linux/fib_rules.h> + #include <linux/ip.h> +-#include <linux/if_arp.h> + #include <linux/if_bridge.h> + #include <linux/if_link.h> + #include <linux/if_tun.h> diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch deleted file mode 100644 index c162c1df..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 57239fda56b68a8f3e413f7b6af5290ba0d86636 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> -Date: Thu, 22 Mar 2018 18:18:06 +0100 -Subject: [PATCH] musl: dlopen is included so LD_LIBS="" instead of - LD_LIBS="none required" -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Pending - -Stolen from [1] and prettyfied slightly - -[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches - -Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> ---- - configure.ac | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/configure.ac b/configure.ac -index 487a266..96ae4f7 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -235,6 +235,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], --- -2.14.3 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-Fix-build-with-musl-for-n-dhcp4.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-Fix-build-with-musl-for-n-dhcp4.patch new file mode 100644 index 00000000..62252826 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-Fix-build-with-musl-for-n-dhcp4.patch @@ -0,0 +1,61 @@ +From aff5cded8847f3eee59f5cec22afb8630d401a85 Mon Sep 17 00:00:00 2001 +From: Adrian Freihofer <adrian.freihofer@siemens.com> +Date: Sat, 7 Mar 2020 14:22:36 +0100 +Subject: [PATCH 3/4] Fix build with musl for n-dhcp4 + +--- + shared/n-dhcp4/src/n-dhcp4-c-probe.c | 8 ++++++++ + shared/n-dhcp4/src/n-dhcp4-private.h | 4 ++++ + 2 files changed, 12 insertions(+) + +diff --git a/shared/n-dhcp4/src/n-dhcp4-c-probe.c b/shared/n-dhcp4/src/n-dhcp4-c-probe.c +index e4477a7..75713c8 100644 +--- a/shared/n-dhcp4/src/n-dhcp4-c-probe.c ++++ b/shared/n-dhcp4/src/n-dhcp4-c-probe.c +@@ -360,8 +360,12 @@ static void n_dhcp4_client_probe_config_initialize_random_seed(NDhcp4ClientProbe + seed16v[1] = (u64 >> 16) ^ (u64 >> 0); + seed16v[2] = (u64 >> 32) ^ (u64 >> 16); + ++#ifdef __GLIBC__ + r = seed48_r(seed16v, &config->entropy); + c_assert(!r); ++#else ++ memcpy(config->entropy, seed16v, sizeof seed16v); ++#endif + } + + /** +@@ -375,10 +379,14 @@ static void n_dhcp4_client_probe_config_initialize_random_seed(NDhcp4ClientProbe + */ + uint32_t n_dhcp4_client_probe_config_get_random(NDhcp4ClientProbeConfig *config) { + long int result; ++#ifdef __GLIBC__ + int r; + + r = mrand48_r(&config->entropy, &result); + c_assert(!r); ++#else ++ result = jrand48(config->entropy); ++#endif + + return result; + }; +diff --git a/shared/n-dhcp4/src/n-dhcp4-private.h b/shared/n-dhcp4/src/n-dhcp4-private.h +index 436ee80..ffcb4b2 100644 +--- a/shared/n-dhcp4/src/n-dhcp4-private.h ++++ b/shared/n-dhcp4/src/n-dhcp4-private.h +@@ -267,7 +267,11 @@ struct NDhcp4ClientProbeConfig { + bool inform_only; + bool init_reboot; + struct in_addr requested_ip; ++#ifdef __GLIBC__ + struct drand48_data entropy; /* entropy pool */ ++#else ++ unsigned short entropy[3]; /* entropy pool */ ++#endif + uint64_t ms_start_delay; /* max ms to wait before starting probe */ + NDhcp4ClientProbeOption *options[UINT8_MAX + 1]; + int8_t request_parameters[UINT8_MAX + 1]; +-- +2.24.1 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch deleted file mode 100644 index 9a58c0e3..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 714b4731a238653e9c7d885c0dee10677b0a4df3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> -Date: Thu, 22 Mar 2018 18:24:07 +0100 -Subject: [PATCH] musl: network support -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Pending - -Stolen from [1] and prettyfied slightly - -[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches - -Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> ---- - libnm-core/nm-utils.h | 4 ++++ - src/platform/wifi/nm-wifi-utils.h | 4 ++++ - src/systemd/src/basic/socket-util.h | 5 +++++ - 3 files changed, 13 insertions(+) - -diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h -index df9284b..2bcf4b8 100644 ---- a/libnm-core/nm-utils.h -+++ b/libnm-core/nm-utils.h -@@ -30,7 +30,11 @@ - #include <netinet/in.h> - - /* For ETH_ALEN and INFINIBAND_ALEN */ -+#if defined(__GLIBC__) - #include <linux/if_ether.h> -+#else -+#define ETH_ALEN 6 /* Octets in one ethernet addr */ -+#endif - #include <linux/if_infiniband.h> - - #include "nm-core-enum-types.h" -diff --git a/src/platform/wifi/nm-wifi-utils.h b/src/platform/wifi/nm-wifi-utils.h -index 705717b..da3edc4 100644 ---- a/src/platform/wifi/nm-wifi-utils.h -+++ b/src/platform/wifi/nm-wifi-utils.h -@@ -22,7 +22,11 @@ - #ifndef __WIFI_UTILS_H__ - #define __WIFI_UTILS_H__ - -+#if defined(__GLIBC__) - #include <net/ethernet.h> -+#else /* musl libc */ -+#define ETH_ALEN 6 /* Octets in one ethernet addr */ -+#endif - - #include "nm-dbus-interface.h" - #include "nm-setting-wireless.h" -diff --git a/src/systemd/src/basic/socket-util.h b/src/systemd/src/basic/socket-util.h -index d7e2d85..d109c84 100644 ---- a/src/systemd/src/basic/socket-util.h -+++ b/src/systemd/src/basic/socket-util.h -@@ -11,6 +11,11 @@ - #include <linux/netlink.h> - #include <linux/if_infiniband.h> - #include <linux/if_packet.h> -+#if !defined(__GLIBC__) -+/* SIOCGSTAMPNS from linux/asm-generic.h -+ * for src/systemd/src/libsystemd-network/sd-lldp.c */ -+#include <linux/sockios.h> -+#endif - - #include "macro.h" - #include "missing.h" --- -2.14.3 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-Fix-build-with-musl-systemd-specific.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-Fix-build-with-musl-systemd-specific.patch new file mode 100644 index 00000000..55aa4d26 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-Fix-build-with-musl-systemd-specific.patch @@ -0,0 +1,26 @@ +From 80c7d3391510993cba1a7499bf33a5b2b115280d Mon Sep 17 00:00:00 2001 +From: Adrian Freihofer <adrian.freihofer@siemens.com> +Date: Sat, 7 Mar 2020 14:24:01 +0100 +Subject: [PATCH 4/4] Fix build with musl - systemd specific + +--- + src/systemd/src/libsystemd-network/sd-dhcp6-client.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/systemd/src/libsystemd-network/sd-dhcp6-client.c b/src/systemd/src/libsystemd-network/sd-dhcp6-client.c +index e1150f9..2c63bac 100644 +--- a/src/systemd/src/libsystemd-network/sd-dhcp6-client.c ++++ b/src/systemd/src/libsystemd-network/sd-dhcp6-client.c +@@ -7,7 +7,9 @@ + + #include <errno.h> + #include <sys/ioctl.h> ++#ifdef __GLIBC__ /* musl supplies full set of userspace headers */ + #include <linux/if_arp.h> ++#endif + #include <linux/if_infiniband.h> + + #include "sd-dhcp6-client.h" +-- +2.24.1 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch deleted file mode 100644 index 9e5c9433..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch +++ /dev/null @@ -1,62 +0,0 @@ -From d513c8bfc982dbd976617178b040c512c95710b6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> -Date: Thu, 25 Oct 2018 09:57:07 +0200 -Subject: [PATCH] musl: process-util -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Pending - -Stolen from [1] and prettyfied slightly - -[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches - -Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> ---- - src/systemd/src/basic/process-util.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/src/systemd/src/basic/process-util.c b/src/systemd/src/basic/process-util.c -index 1412f03..45f5049 100644 ---- a/src/systemd/src/basic/process-util.c -+++ b/src/systemd/src/basic/process-util.c -@@ -21,6 +21,9 @@ - #include <sys/wait.h> - #include <syslog.h> - #include <unistd.h> -+#ifndef __GLIBC__ -+#include <pthread.h> -+#endif - #if 0 /* NM_IGNORED */ - #if HAVE_VALGRIND_VALGRIND_H - #include <valgrind/valgrind.h> -@@ -1153,11 +1156,13 @@ void reset_cached_pid(void) { - cached_pid = CACHED_PID_UNSET; - } - -+#ifdef __GLIBC__ - /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc - * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against - * libpthread, as it is part of glibc anyway. */ - extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void *dso_handle); - extern void* __dso_handle __attribute__ ((__weak__)); -+#endif - - pid_t getpid_cached(void) { - static bool installed = false; -@@ -1186,7 +1191,11 @@ pid_t getpid_cached(void) { - * only half-documented (glibc doesn't document it but LSB does — though only superficially) - * we'll check for errors only in the most generic fashion possible. */ - -+#ifdef __GLIBC__ - if (__register_atfork(NULL, NULL, reset_cached_pid, __dso_handle) != 0) { -+#else -+ if (pthread_atfork(NULL, NULL, reset_cached_pid) != 0) { -+#endif - /* OOM? Let's try again later */ - cached_pid = CACHED_PID_UNSET; - return new_pid; --- -2.14.5 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch deleted file mode 100644 index 6bca95e1..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch +++ /dev/null @@ -1,77 +0,0 @@ -From b3b4fe35018c98ad176719b2d9ffb867974fc7c3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> -Date: Mon, 16 Apr 2018 14:45:44 +0200 -Subject: [PATCH] musl: avoid further conflicts by including net/ethernet.h -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Pending - -Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> ---- - src/systemd/src/systemd/sd-dhcp-client.h | 2 ++ - src/systemd/src/systemd/sd-dhcp-lease.h | 2 ++ - src/systemd/src/systemd/sd-dhcp6-client.h | 2 ++ - src/systemd/src/systemd/sd-ipv4ll.h | 2 ++ - 4 files changed, 8 insertions(+) - -diff --git a/src/systemd/src/systemd/sd-dhcp-client.h b/src/systemd/src/systemd/sd-dhcp-client.h -index e388552..9c4dde8 100644 ---- a/src/systemd/src/systemd/sd-dhcp-client.h -+++ b/src/systemd/src/systemd/sd-dhcp-client.h -@@ -20,7 +20,9 @@ - ***/ - - #include <inttypes.h> -+#if defined(__GLIBC__) - #include <net/ethernet.h> -+#endif - #include <netinet/in.h> - #include <sys/types.h> - -diff --git a/src/systemd/src/systemd/sd-dhcp-lease.h b/src/systemd/src/systemd/sd-dhcp-lease.h -index 2a60145..19d1814 100644 ---- a/src/systemd/src/systemd/sd-dhcp-lease.h -+++ b/src/systemd/src/systemd/sd-dhcp-lease.h -@@ -19,7 +19,9 @@ - ***/ - - #include <inttypes.h> -+#if defined(__GLIBC__) - #include <net/ethernet.h> -+#endif - #include <netinet/in.h> - #include <sys/types.h> - -diff --git a/src/systemd/src/systemd/sd-dhcp6-client.h b/src/systemd/src/systemd/sd-dhcp6-client.h -index fa36dca..2d25010 100644 ---- a/src/systemd/src/systemd/sd-dhcp6-client.h -+++ b/src/systemd/src/systemd/sd-dhcp6-client.h -@@ -20,7 +20,9 @@ - ***/ - - #include <inttypes.h> -+#if defined(__GLIBC__) - #include <net/ethernet.h> -+#endif - #include <stdbool.h> - #include <sys/types.h> - -diff --git a/src/systemd/src/systemd/sd-ipv4ll.h b/src/systemd/src/systemd/sd-ipv4ll.h -index 71bd4cf..1c667ba 100644 ---- a/src/systemd/src/systemd/sd-ipv4ll.h -+++ b/src/systemd/src/systemd/sd-ipv4ll.h -@@ -19,7 +19,9 @@ - along with systemd; If not, see <http://www.gnu.org/licenses/>. - ***/ - -+#if defined(__GLIBC__) - #include <net/ethernet.h> -+#endif - #include <netinet/in.h> - - #include "sd-event.h" --- -2.14.5 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch deleted file mode 100644 index 023a4d9a..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 6db6596e450062601d18b2ae812a4a58d2e03a53 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> -Date: Mon, 16 Apr 2018 15:07:20 +0200 -Subject: [PATCH] Add a strndupa replacement for musl -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Pending - -Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> ---- - src/systemd/src/basic/in-addr-util.c | 1 + - src/systemd/src/basic/string-util.h | 5 +++++ - 2 files changed, 6 insertions(+) - -diff --git a/src/systemd/src/basic/in-addr-util.c b/src/systemd/src/basic/in-addr-util.c -index 2a02d90..a57c360 100644 ---- a/src/systemd/src/basic/in-addr-util.c -+++ b/src/systemd/src/basic/in-addr-util.c -@@ -13,6 +13,7 @@ - #include "in-addr-util.h" - #include "macro.h" - #include "parse-util.h" -+#include "string-util.h" - #include "util.h" - - bool in4_addr_is_null(const struct in_addr *a) { -diff --git a/src/systemd/src/basic/string-util.h b/src/systemd/src/basic/string-util.h -index 4c94b18..a6dc446 100644 ---- a/src/systemd/src/basic/string-util.h -+++ b/src/systemd/src/basic/string-util.h -@@ -26,6 +26,11 @@ - #define strcaseeq(a,b) (strcasecmp((a),(b)) == 0) - #define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0) - -+/* musl does not know strndupa */ -+#if !defined(__GLIBC__) -+#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s) -+#endif -+ - int strcmp_ptr(const char *a, const char *b) _pure_; - - static inline bool streq_ptr(const char *a, const char *b) { --- -2.14.3 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/networkmanager.initd b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/networkmanager.initd new file mode 100644 index 00000000..4fdd80d4 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/networkmanager.initd @@ -0,0 +1,110 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: network-manager +# Required-Start: $remote_fs dbus udev +# Required-Stop: $remote_fs dbus udev +# Should-Start: $syslog +# Should-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: network connection manager +# Description: Daemon for automatically switching network +# connections to the best available connection. +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DESC="network connection manager" +NAME="NetworkManager" + +DAEMON=/usr/sbin/$NAME + +PIDFILE=/run/$NAME/$NAME.pid + +SCRIPTNAME=/etc/init.d/network-manager + +. /etc/init.d/functions || exit 1 + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +log_daemon_msg() { + echo -n $* +} + +log_end_msg() { + if [ $1 -eq 0 ]; then + success + else + failure + fi + echo +} + +log_progress_msg () { + if [ -z "${1:-}" ]; then + return 1 + fi + echo -n " $@" +} + +# +# Function that starts the daemon/service. +# +d_start() { + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --exec $DAEMON -- $DAEMON_OPTS +} + +# +# Function that stops the daemon/service. +# +d_stop() { + start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \ + --exec $DAEMON +} + +d_reload() { + start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE \ + --exec $DAEMON +} + +case "$1" in + start) + log_daemon_msg "Starting $DESC" "$NAME" + d_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_progress_msg "already started" + log_end_msg 0 ;; + *) log_end_msg 1 ;; + esac + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + d_stop + case "$?" in + 0) log_end_msg 0 ;; + 1) log_progress_msg "already stopped" + log_end_msg 0 ;; + *) log_end_msg 1 ;; + esac + ;; + reload|force-reload) + log_daemon_msg "Reloading $DESC" "$NAME" + d_reload + log_end_msg $? + ;; + restart) + $0 stop + $0 start + ;; + status) + status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $? + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 |