diff options
author | David P <megver83@parabola.nu> | 2021-07-06 19:26:48 -0400 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2021-07-06 19:26:48 -0400 |
commit | 19d5e1a2cd2bb2844b93b73dd09cf2fa6c4df636 (patch) | |
tree | 08c923a9802cb0f5d42e43237da5ca261f5ae107 /nonsystemd/networkmanager | |
parent | 441462c7d6194d4ca23346530962258b8acf2ca9 (diff) | |
download | abslibre-19d5e1a2cd2bb2844b93b73dd09cf2fa6c4df636.tar.gz abslibre-19d5e1a2cd2bb2844b93b73dd09cf2fa6c4df636.tar.bz2 abslibre-19d5e1a2cd2bb2844b93b73dd09cf2fa6c4df636.zip |
updpkg: nonsystemd/networkmanager 1.32.2-1.nonsystemd1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'nonsystemd/networkmanager')
-rw-r--r-- | nonsystemd/networkmanager/10-openrc-status | 23 | ||||
-rw-r--r-- | nonsystemd/networkmanager/NetworkManager.initd | 94 | ||||
-rw-r--r-- | nonsystemd/networkmanager/PKGBUILD | 119 |
3 files changed, 138 insertions, 98 deletions
diff --git a/nonsystemd/networkmanager/10-openrc-status b/nonsystemd/networkmanager/10-openrc-status index ba4a50f17..f04658621 100644 --- a/nonsystemd/networkmanager/10-openrc-status +++ b/nonsystemd/networkmanager/10-openrc-status @@ -6,12 +6,12 @@ # providing net only when it has a successful connection. if [ ! -e "/run/openrc/softlevel" ]; then - # OpenRC is not running - exit 0 + # OpenRC is not running + exit 0 fi # Ensure rc-service is in PATH -PATH="${PATH}:/usr/bin:/usr/bin" +PATH="${PATH}:/usr/bin:/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 @@ -19,17 +19,18 @@ rc-service NetworkManager status 2>&1 | grep -Eq "status: (starting|started|inac # 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 ;; + 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/nonsystemd/networkmanager/NetworkManager.initd b/nonsystemd/networkmanager/NetworkManager.initd index 3209644c5..4829618da 100644 --- a/nonsystemd/networkmanager/NetworkManager.initd +++ b/nonsystemd/networkmanager/NetworkManager.initd @@ -1,58 +1,64 @@ -#!/sbin/openrc-run +#!/usr/bin/openrc-run # Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org> -# Copyright 2013-2017 Gentoo Foundation +# 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." +# supervisor="supervise-daemon" +# command="/usr/bin/NetworkManager" +# command_args="-n" +# pidfile="/run/NetworkManager/NetworkManager.pid" depend() { - need dbus - use consolekit - provide net + need dbus + use logind + provide net +} + +start_pre() { + checkpath -q -d -m 0755 /run/NetworkManager } 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}" + # 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}" } stop() { - # If we are re-called by a dispatcher event, we want to mark the service - # as inactive without stopping the daemon - if yesno "${IN_BACKGROUND}"; then - mark_service_inactive "${SVCNAME}" - return 0 - fi - - ebegin "Stopping NetworkManager" - local pidfile=/run/NetworkManager/NetworkManager.pid - if [ ! -e "${pidfile}" ] && [ -e /var/run/NetworkManager.pid ]; then - # Try stopping the pid file used by <0.9.7 - pidfile=/var/run/NetworkManager.pid - start-stop-daemon --stop --quiet --pidfile "${pidfile}" - ret=$? - [ ${ret} = 0 ] && [ -e "${pidfile}" ] && rm "${pidfile}" - eend ${ret} - else - start-stop-daemon --stop --quiet --pidfile "${pidfile}" - eend $? - fi -} + # If we are re-called by a dispatcher event, we want to mark the service + # as inactive without stopping the daemon + if yesno "${IN_BACKGROUND}"; then + mark_service_inactive "${SVCNAME}" + return 0 + fi -# vim: set ft=gentoo-init-d ts=4 : + ebegin "Stopping NetworkManager" + local pidfile=/run/NetworkManager/NetworkManager.pid + if [ ! -e "${pidfile}" ] && [ -e /var/run/NetworkManager.pid ]; then + # Try stopping the pid file used by <0.9.7 + pidfile=/var/run/NetworkManager.pid + start-stop-daemon --stop --quiet --pidfile "${pidfile}" + ret=$? + [ ${ret} = 0 ] && [ -e "${pidfile}" ] && rm "${pidfile}" + eend ${ret} + else + start-stop-daemon --stop --quiet --pidfile "${pidfile}" + eend $? + fi +} diff --git a/nonsystemd/networkmanager/PKGBUILD b/nonsystemd/networkmanager/PKGBUILD index 8f3b7c943..dc667e65e 100644 --- a/nonsystemd/networkmanager/PKGBUILD +++ b/nonsystemd/networkmanager/PKGBUILD @@ -7,31 +7,33 @@ # Contributor (Arch): Valentine Sinitsyn <e_val@inbox.ru> pkgbase=networkmanager -pkgname=(networkmanager libnm) -pkgver=1.20.6 +pkgname=(networkmanager libnm nm-cloud-setup) +pkgver=1.32.2 pkgrel=1 pkgrel+=.nonsystemd1 pkgdesc="Network connection manager and user applications" url="https://wiki.gnome.org/Projects/NetworkManager" -arch=(x86_64 i686 armv7h) -license=(GPL2 LGPL2.1) -_pppver=2.4.7 -makedepends=(intltool dhclient iptables gobject-introspection gtk-doc "ppp=$_pppver" modemmanager - iproute2 nss polkit wpa_supplicant curl elogind libmm-glib - libnewt libndp libteam vala perl-yaml python-gobject git vala jansson bluez-libs - glib2-docs dhcpcd iwd dnsmasq openresolv libpsl audit meson) +arch=(x86_64) +arch+=(i686 armv7h) +license=(GPL2) +_pppver=2.4.9 +makedepends=(intltool dhclient dhcpcd iptables-nft gobject-introspection gtk-doc + "ppp=$_pppver" modemmanager iproute2 nss polkit wpa_supplicant curl + logind libmm-glib libnewt libndp libteam nftables vala perl-yaml + python-gobject git vala jansson bluez-libs glib2-docs iwd dnsmasq + openresolv libpsl audit meson) checkdepends=(libx11 python-dbus) -_commit=7910cdfe5a9ffe02cd0780d56fcc66500e292d09 # tags/1.20.6^0 +_commit=bf1b09702ed442a3efe426c8ceba4ef1e6bb1902 # tags/1.20.6^0 source=("git+https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git#commit=$_commit" NetworkManager.{confd,initd} 10-openrc-status) sha256sums=('SKIP' '4594573f01fe5e04b6dde4525796acf909158591bdcefd662ec23fe0d1c3e1bd' - '861445d46e8863dca26a91018da3dd9fee6a64467a93e7512774dfd88914539d' - '1535237db113a76261d6f1ce0b24a55e956934b0c1c59e9fd624f621961327b6') + 'eaf7d210540ed9f4c6b4ba81ddbb30a2aa5ce8b528057f7d64ce3478981f88e4' + 'd32a21c0683cf7a09370b35b7e3d3b3f28f5d4d242ecde2c866cfb400b94bcbe') pkgver() { cd NetworkManager - git describe | sed 's/-dev/dev/;s/-rc/rc/;s/-/+/g' + git describe --abbrev=10 | sed 's/-dev/dev/;s/-rc/rc/;s/-/+/g' } prepare() { @@ -40,37 +42,49 @@ prepare() { build() { local meson_args=( + # system paths -D dbus_conf_dir=/usr/share/dbus-1/system.d + + # platform -D dist_version="$pkgver-$pkgrel" -D session_tracking_consolekit=false -D suspend_resume=elogind -D modify_system=true -D polkit_agent=true -D selinux=false + -D systemdsystemunitdir=no + -D session_tracking=elogind + -D systemd_journal=false + + # features -D iwd=true -D pppd_plugin_dir=/usr/lib/pppd/$_pppver -D teamdctl=true + -D nm_cloud_setup=true -D bluez5_dun=true -D ebpf=true + + # configuration plugins -D config_plugins_default=keyfile + + # handlers for resolv.conf + -D netconfig=no + -D config_dns_rc_manager_default=symlink + + # miscellaneous -D vapi=true -D docs=true -D more_asserts=no -D more_logging=false -D qt=false - -D systemdsystemunitdir=no - -D session_tracking=elogind - -D systemd_journal=false ) arch-meson NetworkManager build "${meson_args[@]}" - ninja -C build + meson compile -C build } check() { - # iproute2 bug - # https://gitlab.freedesktop.org/NetworkManager/NetworkManager/commit/be76d8b624fab99cbd76092ff511e6adc305279c - meson test -C build --print-errorlogs || : + meson test -C build --print-errorlogs } _pick() { @@ -85,58 +99,77 @@ _pick() { package_networkmanager() { depends=(libnm iproute2 polkit wpa_supplicant libmm-glib libnewt libndp libteam curl - bluez-libs libpsl audit elogind) + bluez-libs libpsl audit mobile-broadband-provider-info elogind) optdepends=('dnsmasq: connection sharing' + 'nftables: connection sharing' + 'iptables: connection sharing' 'bluez: Bluetooth support' 'ppp: dialup connection support' 'modemmanager: cellular network support' - 'iwd: wpa_supplicant alternative') + 'iwd: wpa_supplicant alternative' + 'dhclient: alternative DHCP client' + 'dhcpcd: alternative DHCP client' + 'openresolv: alternative resolv.conf manager' + 'firewalld: firewall support') provides=($pkgname-{elogind,openrc}) replaces=($pkgname-{elogind,openrc}) backup=(etc/NetworkManager/NetworkManager.conf) - groups=(gnome) - DESTDIR="$pkgdir" meson install -C build + meson install -C build --destdir "$pkgdir" + + cd "$pkgdir" # /etc/NetworkManager - install -d "$pkgdir"/etc/NetworkManager/{conf,dnsmasq}.d - install -dm700 "$pkgdir/etc/NetworkManager/system-connections" - install -m644 /dev/stdin "$pkgdir/etc/NetworkManager/NetworkManager.conf" <<END + install -d etc/NetworkManager/{conf,dnsmasq}.d + install -dm700 etc/NetworkManager/system-connections + install -m644 /dev/stdin etc/NetworkManager/NetworkManager.conf <<END # Configuration file for NetworkManager. # See "man 5 NetworkManager.conf" for details. END # packaged configuration - install -Dm644 /dev/stdin "$pkgdir/usr/lib/NetworkManager/conf.d/20-connectivity.conf" <<END + install -Dm644 /dev/stdin usr/lib/NetworkManager/conf.d/20-connectivity.conf <<END [connectivity] -uri=http://www.archlinux.org/check_network_status.txt +uri=http://ping.archlinux.org/nm-check.txt END -### Split libnm - _pick libnm "$pkgdir"/usr/include/libnm - _pick libnm "$pkgdir"/usr/lib/girepository-1.0/NM-* - _pick libnm "$pkgdir"/usr/lib/libnm.* - _pick libnm "$pkgdir"/usr/lib/pkgconfig/libnm.pc - _pick libnm "$pkgdir"/usr/share/gir-1.0/NM-* - _pick libnm "$pkgdir"/usr/share/gtk-doc/html/libnm - _pick libnm "$pkgdir"/usr/share/vala/vapi/libnm.* + shopt -s globstar + + _pick libnm usr/include/libnm + _pick libnm usr/lib/girepository-1.0/NM-* + _pick libnm usr/lib/libnm.* + _pick libnm usr/lib/pkgconfig/libnm.pc + _pick libnm usr/share/gir-1.0/NM-* + _pick libnm usr/share/gtk-doc/html/libnm + _pick libnm usr/share/vala/vapi/libnm.* + + _pick nm-cloud-setup "$pkgdir"/usr/lib/**/*nm-cloud-setup* +# _pick nm-cloud-setup "$pkgdir"/usr/share/man/*/nm-cloud-setup* (Parabola) + + # Restore empty dir +# mkdir "$pkgdir/usr/lib/NetworkManager/dispatcher.d/no-wait.d" (Parabola) # Init script install -Dm755 ${srcdir}/NetworkManager.confd ${pkgdir}/etc/conf.d/NetworkManager install -Dm755 ${srcdir}/NetworkManager.initd ${pkgdir}/etc/init.d/NetworkManager install -Dm755 "${srcdir}/10-openrc-status" "${pkgdir}/etc/NetworkManager/dispatcher.d/10-openrc-status" - sed -e 's|#!/sbin/openrc-run|#!/usr/bin/openrc-run|g' \ - -e 's|/var/run|/run|g' \ - -e 's|/usr/sbin|/usr/bin|g' \ - -e 's|use consolekit|use consolekit elogind|' \ - -i ${pkgdir}/etc/init.d/NetworkManager } package_libnm() { pkgdesc="NetworkManager client library" - depends=(glib2 nss libutil-linux jansson libelogind) + depends=(glib2 nss util-linux-libs jansson libelogind) + license=(LGPL) + provides=(libnm.so) + mv libnm/* "$pkgdir" } +package_nm-cloud-setup() { + pkgdesc="Automatically configure NetworkManager in cloud" + depends=(networkmanager) + + mv nm-cloud-setup/* "$pkgdir" +} + # vim:set sw=2 et: |