[gentoo-commits] proj/musl:master commit in: net-misc/networkmanager/files/1.28.0/, net-misc/networkmanager/files/, ...
commit: d1dd81b40c23b1b6451a95e269394adccfbd81cc Author: Jory Pratt gentoo org> AuthorDate: Sun May 30 16:14:09 2021 + Commit: Jory Pratt gentoo org> CommitDate: Sun May 30 16:14:09 2021 + URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=d1dd81b4 net-misc/networkmanager: supported via ::gentoo with 1.30.x Signed-off-by: Jory Pratt gentoo.org> net-misc/networkmanager/Manifest | 2 - ...top.NetworkManager.settings.modify.system.rules | 7 - ...0001-uncouple-glibc-functions-and-headers.patch | 60 .../files/1.28.0/0002-network-support.patch| 62 .../1.28.0/0003-Fix-includes-to-support-musl.patch | 110 --- ...4-Fix-pthread-support-for-non-glibc-users.patch | 54 .../0005-define-compare-for-non-glibc-users.patch | 30 -- ...support-for-reallocarray-0-but-the-functi.patch | 43 --- net-misc/networkmanager/files/10-openrc-status-r4 | 35 -- .../networkmanager/files/conf.d.NetworkManager | 4 - .../networkmanager/files/init.d.NetworkManager-r2 | 62 net-misc/networkmanager/files/musl-basic.patch | 46 --- net-misc/networkmanager/files/musl-compar.patch| 18 -- .../networkmanager/files/musl-fix-includes.patch | 90 -- .../files/musl-network-support.patch | 42 --- net-misc/networkmanager/files/musl-no-drand.patch | 58 .../networkmanager/files/musl-process-util.patch | 40 --- .../networkmanager-1.26.4-iwd-fixes-pr640.patch| 169 -- .../files/networkmanager-1.28.0-dhcpcd9.patch | 265 --- net-misc/networkmanager/files/reallocarray-1.patch | 43 --- net-misc/networkmanager/metadata.xml | 37 --- .../networkmanager/networkmanager-1.26.4.ebuild| 357 - .../networkmanager/networkmanager-1.28.0-r1.ebuild | 356 23 files changed, 1990 deletions(-) diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest deleted file mode 100644 index e16febc..000 --- a/net-misc/networkmanager/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST NetworkManager-1.26.4.tar.xz 5051424 BLAKE2B 53a8fd9f9a061b9ac6b117f431e72b1967cfd2fffb539e0dc9335c37a3a59dc33562e81f7887019c3460f403a95b96e8105b1ae41b00c8488ae12a370a3d82ff SHA512 91e865c83a6ae694c9f6aa50e7f938dfa55bfddac32a6dfb73e6edb34b2539068ff9f83bf662bb2d689bd3c66cf53d7fa015930940cf7bda2d4a16561cf02328 -DIST NetworkManager-1.28.0.tar.xz 5129848 BLAKE2B 37dc9cda283dad29a70c85ed41a77844b4f60a9815be4b6780fbefecfeffb644fd67ea65373a1895fd2102f2beec9ad141b6e9a92a1a32de646d64acd4250b62 SHA512 ab0bc39626dc55df4e122ad6e1a8086e1467f44bdd41c4491c752dca3ffb549796e0ac888041f12f661f2f6cf4142d0fce59b5135549e48a0076fafcdc45ca06 diff --git a/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules deleted file mode 100644 index d00b268..000 --- a/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules +++ /dev/null @@ -1,7 +0,0 @@ -// Let users in plugdev group modify NetworkManager -polkit.addRule(function(action, subject) { -if (action.id == "org.freedesktop.NetworkManager.settings.modify.system" && -subject.isInGroup("plugdev") && subject.active) { -return "yes"; -} -}); diff --git a/net-misc/networkmanager/files/1.28.0/0001-uncouple-glibc-functions-and-headers.patch b/net-misc/networkmanager/files/1.28.0/0001-uncouple-glibc-functions-and-headers.patch deleted file mode 100644 index 59f524f..000 --- a/net-misc/networkmanager/files/1.28.0/0001-uncouple-glibc-functions-and-headers.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 839343b02e59cb36e58f7e3def8bb39bf4ee3d5b Mon Sep 17 00:00:00 2001 -From: Jory Pratt -Date: Thu, 11 Mar 2021 07:59:56 -0600 -Subject: [PATCH] uncouple glibc functions and headers - - shared/nm-glib-aux/nm-json-aux.c | 4 - shared/systemd/src/basic/stdio-util.h | 2 ++ - shared/systemd/src/basic/util.h | 6 ++ - 3 files changed, 12 insertions(+) - -diff --git a/shared/nm-glib-aux/nm-json-aux.c b/shared/nm-glib-aux/nm-json-aux.c -index 4212e62..83114c7 100644 a/shared/nm-glib-aux/nm-json-aux.c -+++ b/shared/nm-glib-aux/nm-json-aux.c -@@ -9,6 +9,10 @@ - - #include - -+#ifndef RTLD_DEEPBIND -+#define RTLD_DEEPBIND 0 -+#endif -+ - /*/ - - static void -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 -+#endif - #include - #include - #include -diff --git a/shared/systemd/src/basic/util.h b/shared/systemd/src/basic/util.h -index 6fc7480..f
[gentoo-commits] proj/musl:master commit in: net-misc/networkmanager/files/, net-misc/networkmanager/files/1.28.0/, ...
commit: 2e9c9f696f9b4f5ad271c7423976a1c543e3d84a Author: Jory Pratt gentoo org> AuthorDate: Thu Mar 11 14:59:41 2021 + Commit: Jory Pratt gentoo org> CommitDate: Thu Mar 11 14:59:41 2021 + URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=2e9c9f69 net-misc/networkmanager: sync with ::gentoo, adjust patches Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Jory Pratt gentoo.org> net-misc/networkmanager/Manifest | 1 + ...0001-uncouple-glibc-functions-and-headers.patch | 60 .../files/1.28.0/0002-network-support.patch| 62 .../1.28.0/0003-Fix-includes-to-support-musl.patch | 110 +++ ...4-Fix-pthread-support-for-non-glibc-users.patch | 54 .../0005-define-compare-for-non-glibc-users.patch | 30 ++ ...support-for-reallocarray-0-but-the-functi.patch | 43 +++ .../files/networkmanager-1.28.0-dhcpcd9.patch | 265 +++ .../networkmanager/networkmanager-1.28.0-r1.ebuild | 356 + 9 files changed, 981 insertions(+) diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest index a11544c..e16febc 100644 --- a/net-misc/networkmanager/Manifest +++ b/net-misc/networkmanager/Manifest @@ -1 +1,2 @@ DIST NetworkManager-1.26.4.tar.xz 5051424 BLAKE2B 53a8fd9f9a061b9ac6b117f431e72b1967cfd2fffb539e0dc9335c37a3a59dc33562e81f7887019c3460f403a95b96e8105b1ae41b00c8488ae12a370a3d82ff SHA512 91e865c83a6ae694c9f6aa50e7f938dfa55bfddac32a6dfb73e6edb34b2539068ff9f83bf662bb2d689bd3c66cf53d7fa015930940cf7bda2d4a16561cf02328 +DIST NetworkManager-1.28.0.tar.xz 5129848 BLAKE2B 37dc9cda283dad29a70c85ed41a77844b4f60a9815be4b6780fbefecfeffb644fd67ea65373a1895fd2102f2beec9ad141b6e9a92a1a32de646d64acd4250b62 SHA512 ab0bc39626dc55df4e122ad6e1a8086e1467f44bdd41c4491c752dca3ffb549796e0ac888041f12f661f2f6cf4142d0fce59b5135549e48a0076fafcdc45ca06 diff --git a/net-misc/networkmanager/files/1.28.0/0001-uncouple-glibc-functions-and-headers.patch b/net-misc/networkmanager/files/1.28.0/0001-uncouple-glibc-functions-and-headers.patch new file mode 100644 index 000..59f524f --- /dev/null +++ b/net-misc/networkmanager/files/1.28.0/0001-uncouple-glibc-functions-and-headers.patch @@ -0,0 +1,60 @@ +From 839343b02e59cb36e58f7e3def8bb39bf4ee3d5b Mon Sep 17 00:00:00 2001 +From: Jory Pratt +Date: Thu, 11 Mar 2021 07:59:56 -0600 +Subject: [PATCH] uncouple glibc functions and headers + +--- + shared/nm-glib-aux/nm-json-aux.c | 4 + shared/systemd/src/basic/stdio-util.h | 2 ++ + shared/systemd/src/basic/util.h | 6 ++ + 3 files changed, 12 insertions(+) + +diff --git a/shared/nm-glib-aux/nm-json-aux.c b/shared/nm-glib-aux/nm-json-aux.c +index 4212e62..83114c7 100644 +--- a/shared/nm-glib-aux/nm-json-aux.c b/shared/nm-glib-aux/nm-json-aux.c +@@ -9,6 +9,10 @@ + + #include + ++#ifndef RTLD_DEEPBIND ++#define RTLD_DEEPBIND 0 ++#endif ++ + /*/ + + static void +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 ++#endif + #include + #include + #include +diff --git a/shared/systemd/src/basic/util.h b/shared/systemd/src/basic/util.h +index 6fc7480..fab72e5 100644 +--- a/shared/systemd/src/basic/util.h b/shared/systemd/src/basic/util.h +@@ -30,6 +30,12 @@ static inline unsigned u64log2(uint64_t n) { + #endif + } + ++#if !defined(__GLIBC__) ++typedef int (*__compar_fn_t) (const void*, const void*); ++typedef __compar_fn_t comparison_fn_t; ++typedef int (*__compar_d_fn_t) (const void *, const void *, void *); ++#endif ++ + static inline unsigned u32ctz(uint32_t n) { + #if __SIZEOF_INT__ == 4 + return n != 0 ? __builtin_ctz(n) : 32; +-- +2.26.2 + diff --git a/net-misc/networkmanager/files/1.28.0/0002-network-support.patch b/net-misc/networkmanager/files/1.28.0/0002-network-support.patch new file mode 100644 index 000..4915ffb --- /dev/null +++ b/net-misc/networkmanager/files/1.28.0/0002-network-support.patch @@ -0,0 +1,62 @@ +From 08d889a2bcaaad17a92303277b331a515bf40fb8 Mon Sep 17 00:00:00 2001 +From: +Date: Thu, 11 Mar 2021 07:42:39 -0600 +Subject: [PATCH 2/6] network support + +--- + libnm-core/nm-utils.h | 4 + shared/systemd/src/basic/socket-util.h | 5 + + src/platform/wifi/nm-wifi-utils.h | 4 + 3 files changed, 13 insertions(+) + +diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h +index 9589c51..6b42883 100644 +--- a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h +@@ -15,7 +15,11 @@ + #include + + /* For ETH_ALEN and INFINIBAND_ALEN */ ++#if defined(__GLIBC__) + #include ++#else ++#define ETH_ALEN 6 /* Octets in one ethernet ad
[gentoo-commits] proj/musl:master commit in: net-misc/networkmanager/files/, net-misc/networkmanager/
commit: 424c11684631ac417069214602b73a064524898d Author: Jory Pratt gentoo org> AuthorDate: Wed Feb 3 15:40:11 2021 + Commit: Jory Pratt gentoo org> CommitDate: Wed Feb 3 15:40:11 2021 + URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=424c1168 net-misc/networkmanager: Fix reallocarray error Closes: https://github.com/gentoo/musl/issues/372 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Jory Pratt gentoo.org> net-misc/networkmanager/files/reallocarray.patch | 22 ++ .../networkmanager/networkmanager-1.26.4.ebuild| 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/net-misc/networkmanager/files/reallocarray.patch b/net-misc/networkmanager/files/reallocarray.patch new file mode 100644 index 000..98722f0 --- /dev/null +++ b/net-misc/networkmanager/files/reallocarray.patch @@ -0,0 +1,22 @@ +musl [added support for reallocarray](0), but the function prototype is +declared in `stdlib.h` instead of `malloc.h`. + +Update the check for reallocarray to check both in `malloc.h` and +`stdlib.h`. + +[0]:https://git.musl-libc.org/cgit/musl/commit/?id=821083ac7b54eaa040d5a8ddc67c6206a175e0ca + +diff --git a/meson.build b/meson.build +index 22a3c4c..12a10c5 100644 +--- a/meson.build b/meson.build +@@ -126,7 +126,8 @@ config_h.set10('HAVE_RT_SIGQUEUEINFO', cc.has_function('rt_sigqueueinfo', prefix + #include ''')) + config_h.set('HAVE_SECURE_GETENV', cc.has_function('secure_getenv')) + config_h.set('HAVE___SECURE_GETENV', cc.has_function('__secure_getenv')) +-config_h.set10('HAVE_DECL_REALLOCARRAY', cc.has_function('reallocarray', prefix: '#include ')) ++config_h.set10('HAVE_DECL_REALLOCARRAY', cc.has_function('reallocarray', prefix: '''#include ++ #include ''')) + config_h.set10('HAVE_DECL_EXPLICIT_BZERO', cc.has_function('explicit_bzero', prefix: '#include ')) + config_h.set10('HAVE_DECL_MEMFD_CREATE', cc.has_function('memfd_create', prefix: '#include ')) + diff --git a/net-misc/networkmanager/networkmanager-1.26.4.ebuild b/net-misc/networkmanager/networkmanager-1.26.4.ebuild index ff6099b..50d95a0 100644 --- a/net-misc/networkmanager/networkmanager-1.26.4.ebuild +++ b/net-misc/networkmanager/networkmanager-1.26.4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -108,6 +108,7 @@ PATCHES=( "${FILESDIR}"/${PN}-1.26.4-iwd-fixes-pr640.patch "${FILESDIR}"/musl-process-util.patch "${FILESDIR}"/musl-compar.patch "${FILESDIR}"/musl-no-drand.patch + "${FILESDIR}"/reallocarray.patch ) python_check_deps() {
[gentoo-commits] proj/musl:master commit in: net-misc/networkmanager/files/, net-misc/networkmanager/
commit: 5bdd61c76ea22a13918f70773406541d1c118620 Author: Jory Pratt gentoo org> AuthorDate: Sat May 9 19:10:52 2020 + Commit: Jory Pratt gentoo org> CommitDate: Sat May 9 19:10:52 2020 + URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=5bdd61c7 net-misc/networkmanager: Fix bashism in configure Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Jory Pratt gentoo.org> .../networkmanager/files/1.18.4-fix-bashisms.patch | 130 + .../networkmanager/networkmanager-1.18.4-r3.ebuild | 2 + 2 files changed, 132 insertions(+) diff --git a/net-misc/networkmanager/files/1.18.4-fix-bashisms.patch b/net-misc/networkmanager/files/1.18.4-fix-bashisms.patch new file mode 100644 index 000..4d8d6c1 --- /dev/null +++ b/net-misc/networkmanager/files/1.18.4-fix-bashisms.patch @@ -0,0 +1,130 @@ +From 03072c0039261e9980ab5e88b283e1f07b4002bb Mon Sep 17 00:00:00 2001 +From: Gilles Dartiguelongue +Date: Sun, 19 Apr 2020 00:59:33 +0200 +Subject: [PATCH] Remove subshells and fix invalid test syntax + +--- + configure.ac| 28 ++-- + m4/introspection.m4 | 4 ++-- + 2 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 33badfac0..fe43f844a 100644 +--- a/configure.ac b/configure.ac +@@ -261,7 +261,7 @@ AC_ARG_WITH(libnm-glib, + AS_HELP_STRING([--with-libnm-glib], +[build legacy libraries])) + fake_typelibs=no +-if test "$with_libnm_glib" == "yes"; then ++if test "$with_libnm_glib" = "yes"; then + PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.1 dbus-glib-1 >= 0.94, :, + [AC_MSG_FAILURE([$DBUS_PKG_ERRORS + +@@ -277,7 +277,7 @@ Configure with --without-libnm-glib if you do not need the legacy libraries]) + else + with_libnm_glib=no + fi +-AM_CONDITIONAL(WITH_LEGACY_LIBRARIES, test "$with_libnm_glib" == "yes") ++AM_CONDITIONAL(WITH_LEGACY_LIBRARIES, test "$with_libnm_glib" = "yes") + if test "$fake_typelibs" = "yes"; then + AC_DEFINE(WITH_FAKE_TYPELIBS, 1, [Define for libnm to prevent GIR from loading libnm-glib]) + else +@@ -633,7 +633,7 @@ AC_ARG_ENABLE(json-validation, + AS_HELP_STRING([--enable-json-validation], [Enable JSON validation in libnm]), + [enable_json_validation=${enableval}], + [enable_json_validation=${have_jansson}]) +-if (test "${enable_json_validation}" == "no"); then ++if (test "${enable_json_validation}" = "no"); then + AC_DEFINE(WITH_JSON_VALIDATION, 0, [Define if JSON validation in libnm is enabled]) + else + if test "$have_jansson" = "no"; then +@@ -816,8 +816,8 @@ AC_ARG_WITH([dhcpcanon], + if test "$with_dhcpcanon" != "no"; then + with_dhcpcanon_="$with_dhcpcanon" + AC_PATH_PROGS(with_dhcpcanon, dhcpcanon, no, /sbin:/usr/sbin:/usr/local/sbin:/usr/bin:/usr/local/bin) +-if test "$with_dhcpcanon" == "no"; then +-if test "$with_dhcpcanon_" == yes; then ++if test "$with_dhcpcanon" = "no"; then ++if test "$with_dhcpcanon_" = yes; then + AC_MSG_WARN([dhcpcanon not found, assume path /sbin/dhcpcanon]) + with_dhcpcanon=/sbin/dhcpcanon + fi +@@ -846,8 +846,8 @@ AC_ARG_WITH([dhclient], + if test "$with_dhclient" != "no"; then + with_dhclient_="$with_dhclient" + AC_PATH_PROGS(with_dhclient, dhclient, no, /sbin:/usr/sbin:/usr/local/sbin) +- if test "$with_dhclient" == "no"; then +- if test "$with_dhclient_" == yes; then ++ if test "$with_dhclient" = "no"; then ++ if test "$with_dhclient_" = yes; then + AC_MSG_WARN([dhclient not found, assume path /usr/sbin/dhclient]) + with_dhclient=/usr/sbin/dhclient + fi +@@ -865,8 +865,8 @@ AC_ARG_WITH([dhcpcd], + if test "$with_dhcpcd" != "no"; then + with_dhcpcd_="$with_dhcpcd" + AC_PATH_PROGS(with_dhcpcd, dhcpcd, no, /sbin:/usr/sbin:/usr/local/sbin) +- if test "$with_dhcpcd" == "no"; then +- if test "$with_dhcpcd_" == yes; then ++ if test "$with_dhcpcd" = "no"; then ++ if test "$with_dhcpcd_" = yes; then + AC_MSG_WARN([dhcpcd not found, assume path /usr/sbin/dhcpcd]) + with_dhcpcd=/usr/sbin/dhcpcd + fi +@@ -1192,17 +1192,17 @@ AS_IF([test -z "$with_valgrind"], with_valgrind="no") + # Normalize values + AS_IF([test "$enable_tests" != "yes" -a "$enable_tests" != "root"], enable_tests="no") + # Search for tools +-AS_IF([test "$with_valgrind" == "yes"], ++AS_IF([test "$with_valgrind" = "yes"], + [AC_PATH_PROGS(with_valgrind, valgrind, no)]) + # Add conditionals and substitutions + AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" != "no") +-AM_CONDITIONAL(REQUIRE_ROOT_TESTS, test "$enable_tests" == "root") ++AM_CONDITIONAL(REQUIRE_ROOT_TESTS, test "$enable_tests" = "root") + AC_ARG_WITH(valgrind-suppressions, +
[gentoo-commits] proj/musl:master commit in: net-misc/networkmanager/files/
commit: 71df601aff9104f71a0e0a2460bb4d9d69be1c66 Author: Jory Pratt gentoo org> AuthorDate: Thu Apr 30 16:38:43 2020 + Commit: Jory Pratt gentoo org> CommitDate: Thu Apr 30 16:38:43 2020 + URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=71df601a net-misc/networkmanager: add missing files Fixes: 7090fcd34877abca9b315684c949fbde160fabc8 Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Jory Pratt gentoo.org> ...top.NetworkManager.settings.modify.system.rules | 7 +++ net-misc/networkmanager/files/10-openrc-status-r4 | 35 + .../networkmanager/files/conf.d.NetworkManager | 4 ++ .../networkmanager/files/init.d.NetworkManager-r1 | 58 ++ 4 files changed, 104 insertions(+) diff --git a/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules new file mode 100644 index 000..d00b268 --- /dev/null +++ b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules @@ -0,0 +1,7 @@ +// Let users in plugdev group modify NetworkManager +polkit.addRule(function(action, subject) { +if (action.id == "org.freedesktop.NetworkManager.settings.modify.system" && +subject.isInGroup("plugdev") && subject.active) { +return "yes"; +} +}); diff --git a/net-misc/networkmanager/files/10-openrc-status-r4 b/net-misc/networkmanager/files/10-openrc-status-r4 new file mode 100644 index 000..e195ccc --- /dev/null +++ b/net-misc/networkmanager/files/10-openrc-status-r4 @@ -0,0 +1,35 @@ +#!/bin/sh +# Copyright (c) 2012 Alexandre Rostovtsev +# Released under the 2-clause BSD license. + +# Ensures that the NetworkManager OpenRC service is marked as started and +# providing net only when it has a successful connection. + +if [ ! -e "/run/openrc/softlevel" ]; then + # OpenRC is not running + exit 0 +fi + +# Ensure rc-service is in PATH +PATH="${PATH}:@EPREFIX@/sbin:@EPREFIX@/usr/sbin" + +# Exit if the NetworkManager OpenRC service is not running +rc-service NetworkManager status 2>&1 | grep -Eq "status: (starting|started|inactive|stopping)" || exit 0 + +# Call rc-service in background mode so that the start/stop functions update +# NetworkManager service status to started or inactive instead of actually +# starting or stopping the daemon +export IN_BACKGROUND=YES + +case "$2" in + up) nm-online -t 0 -x && + ! rc-service NetworkManager status 2>&1 | grep -q started && + exec rc-service NetworkManager start ;; + down) nm-online -t 0 -x || + rc-service NetworkManager status 2>&1 | grep -q stopped || + exec rc-service NetworkManager stop ;; + pre-sleep) rc-service NetworkManager status 2>&1 | grep -q stopped || + exec rc-service NetworkManager stop ;; +esac +exit 0 +# vim: set ts=4: diff --git a/net-misc/networkmanager/files/conf.d.NetworkManager b/net-misc/networkmanager/files/conf.d.NetworkManager new file mode 100644 index 000..4a99229 --- /dev/null +++ b/net-misc/networkmanager/files/conf.d.NetworkManager @@ -0,0 +1,4 @@ +# If NetworkManager does not establish a connection within $INACTIVE_TIMEOUT +# seconds after starting, the service will be marked as inactive, and it will +# continue to wait for a connection in background mode. +INACTIVE_TIMEOUT=1 diff --git a/net-misc/networkmanager/files/init.d.NetworkManager-r1 b/net-misc/networkmanager/files/init.d.NetworkManager-r1 new file mode 100644 index 000..fad772d --- /dev/null +++ b/net-misc/networkmanager/files/init.d.NetworkManager-r1 @@ -0,0 +1,58 @@ +#!/sbin/openrc-run +# Copyright (c) 2008 Saleem Abdulrasool +# Copyright 2013-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="NetworkManager daemon. The service is marked as started only \ +when a network connection is established." + +depend() { + need dbus + use consolekit + provide net +} + +start() { + # If we are re-called by a dispatcher event, we want to mark the service + # as started without starting the daemon again + yesno "${IN_BACKGROUND}" && return 0 + + [ -z "${INACTIVE_TIMEOUT}" ] && INACTIVE_TIMEOUT="1" + + ebegin "Starting NetworkManager" + start-stop-daemon --start --quiet --pidfile /run/NetworkManager/NetworkManager.pid \ + --exec /usr/sbin/NetworkManager -- --pid-file /run/NetworkManager/NetworkManager.pid + local _retval=$? + eend "${_retval}" + if [ "x${_retval}" = 'x0' ] && ! nm-online -t "${INACTIVE_TIMEOUT}"; then + einfo "Marking NetworkManager as inactive. It will automatically be marked" + einfo "as started after a network connection has been established." + mark_service_inactive + fi + return "${_retval}" +} + +sto
[gentoo-commits] proj/musl:master commit in: net-misc/networkmanager/files/, net-misc/networkmanager/
commit: 170e986d53ea7c871d624c21e2d33a2fd9b23a01 Author: Jory A. Pratt gentoo org> AuthorDate: Fri Jun 15 22:19:31 2018 + Commit: Jory Pratt gentoo org> CommitDate: Fri Jun 15 22:19:31 2018 + URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=170e986d net-misc/networkmanager: Bump to latest version in tree net-misc/networkmanager/Manifest | 3 +- .../files/0001-Support-musl-libc.patch | 108 --- net-misc/networkmanager/files/musl-basic.patch | 64 .../files/musl-dlopen-configure-ac.patch | 11 + .../files/musl-network-support.patch | 42 +++ ...r-1.8.4.ebuild => networkmanager-1.10.6.ebuild} | 24 +- .../networkmanager/networkmanager-1.8.2.ebuild | 331 - 7 files changed, 133 insertions(+), 450 deletions(-) diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest index c6b53d1..898b2df 100644 --- a/net-misc/networkmanager/Manifest +++ b/net-misc/networkmanager/Manifest @@ -1,2 +1 @@ -DIST NetworkManager-1.8.2.tar.xz 3818844 SHA256 71a5efcd9e4c237ab57b2893ccc8f91f884ace3bec0e2bd4b31a4c9677ff1bf4 SHA512 7bebea66d8f494c052313224e9d5b1b4cf665482f07ee5d93defc3543f32296545a2d1097ab1fff27dbebb58e07a4bc47fbc0101163db92953ae66ac9b95524d WHIRLPOOL 5928c3d4c1a35dc9485c303f3ce7e7b33c3949a058bd566f8b779d5d6dfa11ee8fc365e1a7954a214cabea70f2239b0f6e2079a67616f5487abbd1d6053260a3 -DIST NetworkManager-1.8.4.tar.xz 3821500 SHA256 625e2eb36386dcae599075226200140d010f213b47f7202d83b3b1a202029212 SHA512 e9aa26e2abe4537c6cbba53e281493e32be8a9f0624d5323212848f286d1279ad2ab79a39de34ad0ea188c888b1b61c4ba4d4d053c4d227e68f9236955f69bb1 WHIRLPOOL 68d5721b06a978f4fa5db496f79eb5e56a007fe8966f4e083ed9f6140893e7fcbe0aedaa6357ed6f7fb4ceeae9c8b7aa8d92dd51c3ccd46048d1e1e5f62c1656 +DIST NetworkManager-1.10.6.tar.xz 4029656 BLAKE2B 0fa99dbb54c3f51755329f229f941e408d883aeff24bbcf0f9df143544190ab59ed5742caca42ea7cced949de0891ecc148394fbff1b9cd87b26c3a84f2a728e SHA512 8406ed561efff13b63dc218babdd2ad9e2816bcc829ba3ef2ce942bb5fa027640de28660381203016fa9cddb61412d3cd5102b7cbd29d0e284b5cb8d13dd8610 diff --git a/net-misc/networkmanager/files/0001-Support-musl-libc.patch b/net-misc/networkmanager/files/0001-Support-musl-libc.patch deleted file mode 100644 index 14206d3..000 --- a/net-misc/networkmanager/files/0001-Support-musl-libc.patch +++ /dev/null @@ -1,108 +0,0 @@ -From 7c7a97f8a4cc9a3efba630dc31ca9c35592bb1b9 Mon Sep 17 00:00:00 2001 -From: "Jory A. Pratt" -Date: Tue, 23 May 2017 14:15:43 -0500 -Subject: [PATCH] Support musl libc - -Signed-off-by: Jory A. Pratt - configure.ac| 1 + - libnm-core/nm-utils.h | 4 - src/platform/wifi/wifi-utils.h | 4 - src/systemd/src/basic/socket-util.h | 5 + - src/systemd/src/basic/stdio-util.h | 2 ++ - src/systemd/src/basic/util.h| 5 + - 6 files changed, 21 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 6f190c0..ddc25f0 100644 a/configure.ac -+++ b/configure.ac -@@ -278,6 +278,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], -diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h -index 77fe18a..dcc776f 100644 a/libnm-core/nm-utils.h -+++ b/libnm-core/nm-utils.h -@@ -30,7 +30,11 @@ - #include - - /* For ETH_ALEN and INFINIBAND_ALEN */ -+#if defined(__GLIBC__) - #include -+#else -+#define ETH_ALEN 6 /* Octets in one ethernet addr */ -+#endif - #include - - #include "nm-core-enum-types.h" -diff --git a/src/platform/wifi/wifi-utils.h b/src/platform/wifi/wifi-utils.h -index 705717b..da3edc4 100644 a/src/platform/wifi/wifi-utils.h -+++ b/src/platform/wifi/wifi-utils.h -@@ -22,7 +22,11 @@ - #ifndef __WIFI_UTILS_H__ - #define __WIFI_UTILS_H__ - -+#if defined(__GLIBC__) - #include -+#else /* musl libc */ -+#define ETH_ALEN 6 /* Octets in one ethernet addr */ -+#endif - - #include "nm-dbus-interface.h" - -diff --git a/src/systemd/src/basic/socket-util.h b/src/systemd/src/basic/socket-util.h -index 19a9ddb..337b20e 100644 a/src/systemd/src/basic/socket-util.h -+++ b/src/systemd/src/basic/socket-util.h -@@ -28,6 +28,11 @@ - #include - #include - #include -+#if !defined(__GLIBC__) -+/* SIOCGSTAMPNS from linux/asm-generic.h -+ * for src/systemd/src/libsystemd-network/sd-lldp.c */ -+#include -+#endif - - #include "macro.h" - #include "missing.h" -diff --git a/src/systemd/src/basic/stdio-util.h b/src/systemd/src/basic/stdio-util.h -index bd1144b..9eafacb 100644 a/src/systemd/src/basic/stdio-util.h -+++ b/src/systemd/src/basic/stdio-util.h -@@ -19,7 +19,9 @@ - along with systemd; If not, se