temp/networkmanager: remove (exists in upstream again)
This commit is contained in:
parent
67eb31effd
commit
85586ffbed
13 changed files with 0 additions and 386 deletions
|
@ -1,118 +0,0 @@
|
|||
# Forked from Alpine, because networkmanager is currently missing in armhf, armv7 (#244)
|
||||
pkgname=networkmanager
|
||||
pkgver=1.18.1
|
||||
pkgrel=1
|
||||
pkgdesc="Network Management daemon"
|
||||
url="https://wiki.gnome.org/Projects/NetworkManager"
|
||||
arch="all"
|
||||
license="GPL-2.0-or-later"
|
||||
depends="dhcpcd iptables dbus"
|
||||
install="$pkgname.pre-install $pkgname.pre-upgrade"
|
||||
makedepends="$depends_dev
|
||||
curl-dev
|
||||
dbus-glib-dev
|
||||
eudev-dev
|
||||
libgudev-dev
|
||||
gobject-introspection-dev
|
||||
intltool
|
||||
libndp-dev
|
||||
libnl3-dev
|
||||
libsoup-dev
|
||||
libteam-dev
|
||||
linux-headers
|
||||
modemmanager-dev
|
||||
newt-dev
|
||||
nss-dev
|
||||
polkit-dev
|
||||
ppp-dev
|
||||
readline-dev
|
||||
util-linux-dev
|
||||
jansson-dev
|
||||
vala
|
||||
meson
|
||||
py-gobject3
|
||||
libpsl-dev
|
||||
python2
|
||||
"
|
||||
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-openrc"
|
||||
source="https://download.gnome.org/sources/NetworkManager/${pkgver:0:4}/NetworkManager-$pkgver.tar.xz
|
||||
$pkgname.conf
|
||||
$pkgname.initd
|
||||
$pkgname.rules
|
||||
musl-basic.patch
|
||||
musl-network-support.patch
|
||||
musl-fix-includes.patch
|
||||
musl-process-util.patch
|
||||
musl-has-not-secure-getenv.patch
|
||||
musl-compar.patch
|
||||
fix-ppc64le-build.patch
|
||||
"
|
||||
options="!check" # fail to compile on musl
|
||||
|
||||
builddir="$srcdir"/NetworkManager-$pkgver
|
||||
|
||||
build() {
|
||||
meson \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
-Dsystemdsystemunitdir=no \
|
||||
-Dudev_dir=/lib/udev \
|
||||
-Diptables=/sbin/iptables \
|
||||
-Ddnsmasq=/usr/sbin/dnsmasq \
|
||||
-Dmodify_system=true \
|
||||
-Dselinux=false \
|
||||
-Dsystemd_journal=false \
|
||||
-Dlibaudit=no \
|
||||
-Diwd=true \
|
||||
-Dpppd=/usr/sbin/pppd \
|
||||
-Dconfig_plugins_default=ifupdown \
|
||||
-Difupdown=true \
|
||||
-Ddhcpcd=true \
|
||||
-Dconfig_dhcp_default=dhcpcd \
|
||||
-Dvapi=true \
|
||||
-Dtests=no \
|
||||
-Dlibnm_glib=true \
|
||||
-Dpolkit_agent=true \
|
||||
-Dsession_tracking=no \
|
||||
-Dqt=false \
|
||||
. output
|
||||
ninja -C output
|
||||
}
|
||||
|
||||
check() {
|
||||
ninja -C output test
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" ninja -C output install
|
||||
|
||||
install -m755 -D "$srcdir"/networkmanager.initd "$pkgdir"/etc/init.d/networkmanager
|
||||
install -m644 -D "$srcdir/$pkgname.conf" "$pkgdir"/etc/NetworkManager/NetworkManager.conf
|
||||
# allow plugdev users to modify connections
|
||||
install -m644 -D "$srcdir/$pkgname.rules" \
|
||||
"$pkgdir/usr/share/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
|
||||
mkdir -p "$pkgdir/usr/share/apk-tools/$pkgname"
|
||||
# post-install message
|
||||
mv "$pkgdir/usr/share/doc/NetworkManager" "$pkgdir/usr/share/doc/$pkgname"
|
||||
cat > $pkgdir/usr/share/doc/$pkgname/README.alpine <<EOF
|
||||
To modify system network connections without the root password: add your user account to the 'plugdev' group, or use Polkit.
|
||||
|
||||
To use iwd instead of the default wpa_supplicant install iwd, start its service and the following to your /etc/NetworkManager/NetworkManager.conf:
|
||||
|
||||
[device]
|
||||
wifi.backend=iwd
|
||||
EOF
|
||||
}
|
||||
|
||||
sha512sums="24ffd5b5802692ce392a5ce65623679014d4e476cddedf76222829118f3ab4c92e180c1814db80438f66e2ab7a4e93eb1bac1e0b77575ff7620b0bf0e27d2992 NetworkManager-1.18.1.tar.xz
|
||||
a6e507260e2ceffad4cacb2b49a1d4f6b933e5ae8bc50c1bd56f828298c5dc8d9d17aa4be766faeacefbe3c6c0c748e4ef499a55bb5ee40f0f04bbf766fbbc82 networkmanager.conf
|
||||
477c4cbb6e8c4805a61cdd9442c6a951c8f96173552d943a2f21938ba0facead455f247d65b2b79d1dcdd42abc6db8a8d06c49847bf028001c99ccfca1782bbd networkmanager.initd
|
||||
9820ed2ead0af689644842de57657bb10330a1eaff0e85b21ae9913f55e399e47d8b41b0a12956f30de80272b4424c6e55f33acbc88e156879003a260bf576f6 networkmanager.rules
|
||||
9d1a9185b0b50f677a4173a8b67e808ba36971111165ae446e9a15b5c7adcc8cc6d44fa7bddac05762c50d80b04818a483756eaf2aaefe0162e1f37cd070fca4 musl-basic.patch
|
||||
095c1d944f3274ba31435cd1af8e2affb4187bdd921a0cc0c185b59810b73cfab7919b5f551bab3d9e4644fbee8f9ac017b4c5d69a771fb68319cbefa37c71a3 musl-network-support.patch
|
||||
a3fe34eb93cb918650390ea01696a8e8489455a89721e479d6b83ab730f6608e9cf78cd0d993e7c8051708b695eea420490e36d85d400fa39ec0ff5d3882d26b musl-fix-includes.patch
|
||||
b5cd94928ca3ba1fb71aec28d9ff66f319f6d23131e02c90f1dfbfaf16c537935228a9981c95f29ffb74e91752a17801c94d09ca57b7ba98028262b9e8e5d322 musl-process-util.patch
|
||||
76b6728389686c91df6acafbbe17af7f0e01971e5f7185e164dcb39f93982ac6b73fc2cdf0ba2018e3fa80321178621fe2a5d910546de98bfc52484aa5d90d34 musl-has-not-secure-getenv.patch
|
||||
634377674691b52da80ca4c445a727d39cd40269f7deef0d3ccc1e1041cc262e8bc1423200e9a2b0cf1804e9950059ebbbc827f1200c6a97c58bc76080a6d6d2 musl-compar.patch
|
||||
c2dbdf31adb472dc6b14aad6d7a0981b2618880df7c9081ebb9bc6da8af4c5e791c36c4e997878d5e1e7f96bd65814f718e7ae23dcfea5ac5aa91acdab3775ae fix-ppc64le-build.patch"
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/libnm/meson.build b/libnm/meson.build
|
||||
index 4b3df97..31c6fa6 100644
|
||||
--- a/libnm/meson.build
|
||||
+++ b/libnm/meson.build
|
||||
@@ -162,6 +162,7 @@ libnm = shared_library(
|
||||
libnm_core_dep,
|
||||
uuid_dep,
|
||||
libnm_systemd_shared_no_logging_dep,
|
||||
+ libnmdbus_dep,
|
||||
],
|
||||
c_args: cflags,
|
||||
link_with: libnm_utils,
|
|
@ -1,46 +0,0 @@
|
|||
diff --git a/libnm-core/nm-json.c b/libnm-core/nm-json.c
|
||||
index aa181a4..98c39fc 100644
|
||||
--- a/libnm-core/nm-json.c
|
||||
+++ b/libnm-core/nm-json.c
|
||||
@@ -23,6 +23,10 @@
|
||||
|
||||
#include <dlfcn.h>
|
||||
|
||||
+#ifndef RTLD_DEEPBIND
|
||||
+#define RTLD_DEEPBIND 0
|
||||
+#endif
|
||||
+
|
||||
void *_nm_jansson_json_object_iter_value;
|
||||
void *_nm_jansson_json_object_key_to_iter;
|
||||
void *_nm_jansson_json_integer;
|
||||
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/util.h b/shared/systemd/src/basic/util.h
|
||||
index 25e6ab8..7967e8a 100644
|
||||
--- a/shared/systemd/src/basic/util.h
|
||||
+++ b/shared/systemd/src/basic/util.h
|
||||
@@ -46,6 +46,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;
|
|
@ -1,18 +0,0 @@
|
|||
diff --git a/shared/systemd/src/basic/sort-util.h b/shared/systemd/src/basic/sort-util.h
|
||||
index e029f86..935f136 100644
|
||||
--- a/shared/systemd/src/basic/sort-util.h
|
||||
+++ b/shared/systemd/src/basic/sort-util.h
|
||||
@@ -5,6 +5,13 @@
|
||||
|
||||
#include "macro.h"
|
||||
|
||||
+#ifndef __COMPAR_FN_T
|
||||
+# define __COMPAR_FN_T
|
||||
+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
|
||||
+
|
||||
void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
|
||||
__compar_d_fn_t compar, void *arg);
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
|
||||
index bd4fbcc..cb5436f 100644
|
||||
--- a/src/devices/nm-device.c
|
||||
+++ b/src/devices/nm-device.c
|
||||
@@ -32,7 +32,11 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <fcntl.h>
|
||||
#include <linux/if_addr.h>
|
||||
+#if defined(__GLIBC__)
|
||||
#include <linux/if_arp.h>
|
||||
+#else
|
||||
+#include <linux/if.h>
|
||||
+#endif
|
||||
#include <linux/rtnetlink.h>
|
||||
#include <linux/pkt_sched.h>
|
||||
|
||||
diff --git a/src/nm-manager.c b/src/nm-manager.c
|
||||
index 40e068a..aa57ce8 100644
|
||||
--- a/src/nm-manager.c
|
||||
+++ b/src/nm-manager.c
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
+#include <asm/types.h>
|
||||
|
||||
#include "nm-glib-aux/nm-c-list.h"
|
||||
|
||||
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
|
||||
index d4b0115..c934f10 100644
|
||||
--- a/src/platform/nm-linux-platform.c
|
||||
+++ b/src/platform/nm-linux-platform.c
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "nm-default.h"
|
||||
|
||||
#include "nm-linux-platform.h"
|
||||
+#include "wpan/nm-wpan-utils.h"
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <dlfcn.h>
|
||||
@@ -28,7 +29,11 @@
|
||||
#include <libudev.h>
|
||||
#include <linux/fib_rules.h>
|
||||
#include <linux/ip.h>
|
||||
+#if defined(__GLIBC__)
|
||||
#include <linux/if_arp.h>
|
||||
+#else
|
||||
+#include <linux/if.h>
|
||||
+#endif
|
||||
#include <linux/if_bridge.h>
|
||||
#include <linux/if_link.h>
|
||||
#include <linux/if_tun.h>
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/src/systemd/sd-adapt-core/nm-sd-adapt-core.h b/src/systemd/sd-adapt-core/nm-sd-adapt-core.h
|
||||
index 8c07c53..d043afc 100644
|
||||
--- a/src/systemd/sd-adapt-core/nm-sd-adapt-core.h
|
||||
+++ b/src/systemd/sd-adapt-core/nm-sd-adapt-core.h
|
||||
@@ -65,7 +65,7 @@
|
||||
# ifdef HAVE___SECURE_GETENV
|
||||
# define secure_getenv __secure_getenv
|
||||
# else
|
||||
-# error neither secure_getenv nor __secure_getenv is available
|
||||
+# define secure_getenv getenv
|
||||
# endif
|
||||
#endif
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
--- 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"
|
||||
--- 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"
|
||||
|
||||
--- a/shared/systemd/src/basic/socket-util.h 2019-03-16 15:41:33.287235649 +0100
|
||||
+++ b/shared/systemd/src/basic/socket-util.h 2019-03-16 15:42:24.273912106 +0100
|
||||
@@ -12,6 +12,11 @@
|
||||
#include <sys/socket.h>
|
||||
#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"
|
|
@ -1,40 +0,0 @@
|
|||
--- a/shared/systemd/src/basic/process-util.c
|
||||
+++ b/shared/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>
|
||||
@@ -1168,11 +1171,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;
|
||||
@@ -1201,7 +1206,12 @@ 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. */
|
||||
|
||||
- if (__register_atfork(NULL, NULL, reset_cached_pid, __dso_handle) != 0) {
|
||||
+ #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;
|
|
@ -1,2 +0,0 @@
|
|||
[main]
|
||||
dhcp=dhcpcd
|
|
@ -1,24 +0,0 @@
|
|||
#!/sbin/openrc-run
|
||||
# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org>
|
||||
# Distributed under the terms of the GNU General Purpose License v2
|
||||
# $Header: $
|
||||
|
||||
depend() {
|
||||
need dbus
|
||||
provide net
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting NetworkManager"
|
||||
start-stop-daemon --start --quiet --pidfile /var/run/NetworkManager.pid \
|
||||
--exec /usr/sbin/NetworkManager -- --pid-file /var/run/NetworkManager.pid
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping NetworkManager"
|
||||
start-stop-daemon --stop --quiet --pidfile /var/run/NetworkManager.pid
|
||||
eend $?
|
||||
}
|
||||
|
||||
# vim: set ft=gentoo-init-d ts=3 sw=3 et:
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
addgroup -S plugdev 2>/dev/null
|
||||
|
||||
printf " *\n * To setup system connections, regular users must be member of 'plugdev' group.\n *\n"
|
||||
printf " *\n * To control WiFi devices, enable wpa_supplicant service: 'rc-update add wpa_supplicant default'\n"
|
||||
printf " * then reboot the system or restart 'wpa_supplicant' and 'networkmanager' services respectively.\n *\n"
|
||||
|
||||
exit 0
|
|
@ -1 +0,0 @@
|
|||
networkmanager.pre-install
|
|
@ -1,9 +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";
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in a new issue