diff options
author | Rasmus Thomsen <oss@cogitri.dev> | 2020-02-03 08:49:33 +0100 |
---|---|---|
committer | Rasmus Thomsen <oss@cogitri.dev> | 2020-02-03 12:07:41 +0100 |
commit | a2754bb6f6f152ac8e565d0b09698901a4fe4e10 (patch) | |
tree | 621f5cc81ffcde8d5674f86383208ef24eb27296 /community/networkmanager-elogind | |
parent | d419e3bf90cb1dad51fe04faa6e10207429c1a85 (diff) | |
download | aports-a2754bb6f6f152ac8e565d0b09698901a4fe4e10.tar.bz2 aports-a2754bb6f6f152ac8e565d0b09698901a4fe4e10.tar.xz |
community/networkmanager-elogind: new aport
https://wiki.gnome.org/Projects/NetworkManager
Network Management daemon
Diffstat (limited to 'community/networkmanager-elogind')
13 files changed, 798 insertions, 0 deletions
diff --git a/community/networkmanager-elogind/APKBUILD b/community/networkmanager-elogind/APKBUILD new file mode 100644 index 0000000000..37b0eff03d --- /dev/null +++ b/community/networkmanager-elogind/APKBUILD @@ -0,0 +1,148 @@ +# Contributor: Rasmus Thomsen <oss@cogitri.dev> +# Contributor: Stuart Cardall <developer@it-offshore.co.uk> +# Maintainer: Rasmus Thomsen <oss@cogitri.dev> +pkgname=networkmanager-elogind +pkgver=1.22.6 +pkgrel=0 +pkgdesc="Network Management daemon" +url="https://wiki.gnome.org/Projects/NetworkManager" +arch="all" +license="GPL-2.0-or-later" +depends="dhcpcd iptables dbus mobile-broadband-provider-info openresolv" +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 + py3-gobject3 + libpsl-dev + python3 + elogind-dev + " +subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-openrc" +source="$pkgname-$pkgver.tar.xz::https://download.gnome.org/sources/NetworkManager/${pkgver:0:4}/NetworkManager-$pkgver.tar.xz + networkmanager.conf + networkmanager.initd + networkmanager.rules + musl-basic.patch + musl-network-support.patch + musl-fix-includes.patch + musl-process-util.patch + musl-compar.patch + musl-no-drand.patch + py3.patch + " +options="!check" # fail to compile on musl +provides="networkmanager" + +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 \ + -Dpolkit_agent=true \ + -Dsession_tracking=elogind \ + -Dsuspend_resume=elogind \ + -Dresolvconf=/usr/sbin/resolvconf \ + -Dqt=false \ + -Dofono=true \ + . output + ninja -C output introspection/libnmdbus.a + 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/networkmanager.conf" "$pkgdir"/etc/NetworkManager/NetworkManager.conf + # allow plugdev users to modify connections + install -m644 -D "$srcdir/networkmanager.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 add the following to your /etc/NetworkManager/NetworkManager.conf: + +[device] +wifi.backend=iwd +EOF +} + +dev() { + provides="networkmanager-dev" + + default_dev +} + +doc() { + provides="networkmanager-doc" + + default_doc +} + +lang() { + provides="networkmanager-lang" + + default_lang +} + +openrc() { + provides="networkmanager-openrc" + + default_openrc +} +sha512sums="aa7df1c7e04731090bf2422df2a11d8da6a4a0363b12da7ea2d9c5cf783831cf655a0db2f1572cf160f12e38043657688a4b82ad3d700f131fc316113afe684d networkmanager-elogind-1.22.6.tar.xz +a6e507260e2ceffad4cacb2b49a1d4f6b933e5ae8bc50c1bd56f828298c5dc8d9d17aa4be766faeacefbe3c6c0c748e4ef499a55bb5ee40f0f04bbf766fbbc82 networkmanager.conf +5ac6d11b588c479de9c7e1fef79ed0a2c04dc159a2173636a6a77a2867c839cc1609860756109e9e794f23a02238a6d94834d8fb6fcb81a6be3ef1dbf4a34e6f networkmanager.initd +9820ed2ead0af689644842de57657bb10330a1eaff0e85b21ae9913f55e399e47d8b41b0a12956f30de80272b4424c6e55f33acbc88e156879003a260bf576f6 networkmanager.rules +9d1a9185b0b50f677a4173a8b67e808ba36971111165ae446e9a15b5c7adcc8cc6d44fa7bddac05762c50d80b04818a483756eaf2aaefe0162e1f37cd070fca4 musl-basic.patch +095c1d944f3274ba31435cd1af8e2affb4187bdd921a0cc0c185b59810b73cfab7919b5f551bab3d9e4644fbee8f9ac017b4c5d69a771fb68319cbefa37c71a3 musl-network-support.patch +693f0a60c25bdc6b07da70b4e7ffd753f6f4504964562fd8f32d2ca4ce840ec0e8036bd8f1484c50bdd7ff6c67667585c3f37d92c83a8bfbf86d9601b1c89215 musl-fix-includes.patch +b5cd94928ca3ba1fb71aec28d9ff66f319f6d23131e02c90f1dfbfaf16c537935228a9981c95f29ffb74e91752a17801c94d09ca57b7ba98028262b9e8e5d322 musl-process-util.patch +634377674691b52da80ca4c445a727d39cd40269f7deef0d3ccc1e1041cc262e8bc1423200e9a2b0cf1804e9950059ebbbc827f1200c6a97c58bc76080a6d6d2 musl-compar.patch +342fb3eef0e7057b6d8f1a00687af17dc633387d8a25d475e3e9c8de5712221eec8ada634a189e3458dcbb12b20625b99b552acda3927b5baa61b960ce5740eb musl-no-drand.patch +929add0500198f5bdeaf06daee34c116155ee7182337d5f104693263263871c108eb5278ef748834408803168636e9ece6e39047bf82160c211da47b34e8ca6b py3.patch" diff --git a/community/networkmanager-elogind/musl-basic.patch b/community/networkmanager-elogind/musl-basic.patch new file mode 100644 index 0000000000..2e0d562d5a --- /dev/null +++ b/community/networkmanager-elogind/musl-basic.patch @@ -0,0 +1,46 @@ +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; diff --git a/community/networkmanager-elogind/musl-compar.patch b/community/networkmanager-elogind/musl-compar.patch new file mode 100644 index 0000000000..1b1de2f283 --- /dev/null +++ b/community/networkmanager-elogind/musl-compar.patch @@ -0,0 +1,18 @@ +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); + diff --git a/community/networkmanager-elogind/musl-fix-includes.patch b/community/networkmanager-elogind/musl-fix-includes.patch new file mode 100644 index 0000000000..33d840e8a4 --- /dev/null +++ b/community/networkmanager-elogind/musl-fix-includes.patch @@ -0,0 +1,68 @@ +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index e7a4a05..7578abf 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -17,7 +17,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 132cf5a..0dd71dd 100644 +--- a/src/nm-manager.c ++++ b/src/nm-manager.c +@@ -15,6 +15,7 @@ + #include <sys/stat.h> + #include <sys/sendfile.h> + #include <limits.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 305ae52..10cfec6 100644 +--- a/src/platform/nm-linux-platform.c ++++ b/src/platform/nm-linux-platform.c +@@ -6,6 +6,7 @@ + #include "nm-default.h" + + #include "nm-linux-platform.h" ++#include "wpan/nm-wpan-utils.h" + + #include <arpa/inet.h> + #include <dlfcn.h> +@@ -14,7 +15,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> +diff --git a/src/systemd/src/libsystemd-network/sd-dhcp6-client.c b/src/systemd/src/libsystemd-network/sd-dhcp6-client.c +index e1150f9..3cb8390 100644 +--- a/src/systemd/src/libsystemd-network/sd-dhcp6-client.c ++++ b/src/systemd/src/libsystemd-network/sd-dhcp6-client.c +@@ -7,7 +7,11 @@ + + #include <errno.h> + #include <sys/ioctl.h> ++#if defined(__GLIBC__) + #include <linux/if_arp.h> ++#else ++#include <linux/if.h> ++#endif + #include <linux/if_infiniband.h> + + #include "sd-dhcp6-client.h" diff --git a/community/networkmanager-elogind/musl-network-support.patch b/community/networkmanager-elogind/musl-network-support.patch new file mode 100644 index 0000000000..36536df67c --- /dev/null +++ b/community/networkmanager-elogind/musl-network-support.patch @@ -0,0 +1,42 @@ +--- 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" diff --git a/community/networkmanager-elogind/musl-no-drand.patch b/community/networkmanager-elogind/musl-no-drand.patch new file mode 100644 index 0000000000..46e3a7950c --- /dev/null +++ b/community/networkmanager-elogind/musl-no-drand.patch @@ -0,0 +1,58 @@ +From ec471e66ee14d7da06d4d0a22bc3cdb5f615fd6f Mon Sep 17 00:00:00 2001 +From: Enno Boland <g@s01.de> +Date: Wed, 7 Aug 2019 16:51:16 +0200 +Subject: [PATCH] use jrand48 instead of mrand48_r on non glibc platforms + +--- + 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 308cff8307..9463528b1f 100644 +--- a/shared/n-dhcp4/src/n-dhcp4-c-probe.c ++++ b/shared/n-dhcp4/src/n-dhcp4-c-probe.c +@@ -362,8 +362,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 + } + + /** +@@ -377,10 +381,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 c38ddbfc80..fb48807712 100644 +--- a/shared/n-dhcp4/src/n-dhcp4-private.h ++++ b/shared/n-dhcp4/src/n-dhcp4-private.h +@@ -259,7 +259,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]; diff --git a/community/networkmanager-elogind/musl-process-util.patch b/community/networkmanager-elogind/musl-process-util.patch new file mode 100644 index 0000000000..0eb0057fd6 --- /dev/null +++ b/community/networkmanager-elogind/musl-process-util.patch @@ -0,0 +1,40 @@ +--- 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; diff --git a/community/networkmanager-elogind/networkmanager-elogind.pre-install b/community/networkmanager-elogind/networkmanager-elogind.pre-install new file mode 100644 index 0000000000..26811dfb09 --- /dev/null +++ b/community/networkmanager-elogind/networkmanager-elogind.pre-install @@ -0,0 +1,9 @@ +#!/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 diff --git a/community/networkmanager-elogind/networkmanager-elogind.pre-upgrade b/community/networkmanager-elogind/networkmanager-elogind.pre-upgrade new file mode 120000 index 0000000000..82d183dcc6 --- /dev/null +++ b/community/networkmanager-elogind/networkmanager-elogind.pre-upgrade @@ -0,0 +1 @@ +networkmanager-elogind.pre-install
\ No newline at end of file diff --git a/community/networkmanager-elogind/networkmanager.conf b/community/networkmanager-elogind/networkmanager.conf new file mode 100644 index 0000000000..8da4fe0487 --- /dev/null +++ b/community/networkmanager-elogind/networkmanager.conf @@ -0,0 +1,2 @@ +[main] +dhcp=dhcpcd diff --git a/community/networkmanager-elogind/networkmanager.initd b/community/networkmanager-elogind/networkmanager.initd new file mode 100644 index 0000000000..4ca6a0d54f --- /dev/null +++ b/community/networkmanager-elogind/networkmanager.initd @@ -0,0 +1,17 @@ +#!/sbin/openrc-run +# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org> +# Distributed under the terms of the GNU General Purpose License v2 +# $Header: $ + +supervisor=supervise-daemon +command=/usr/sbin/NetworkManager +command_args_foreground="-n" + +description="Network Manager Daemon" + +depend() { + need dbus + provide net +} + +# vim: set ft=gentoo-init-d ts=3 sw=3 et: diff --git a/community/networkmanager-elogind/networkmanager.rules b/community/networkmanager-elogind/networkmanager.rules new file mode 100644 index 0000000000..66d21d6bbd --- /dev/null +++ b/community/networkmanager-elogind/networkmanager.rules @@ -0,0 +1,9 @@ +// 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/community/networkmanager-elogind/py3.patch b/community/networkmanager-elogind/py3.patch new file mode 100644 index 0000000000..4efcbc1dde --- /dev/null +++ b/community/networkmanager-elogind/py3.patch @@ -0,0 +1,340 @@ +diff --git a/clients/tests/test-client.py b/clients/tests/test-client.py +index 2742824..8225818 100755 +--- a/clients/tests/test-client.py ++++ b/clients/tests/test-client.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + from __future__ import print_function + +diff --git a/examples/python/dbus/add-connection-compat.py b/examples/python/dbus/add-connection-compat.py +index 6c389f1..936586f 100755 +--- a/examples/python/dbus/add-connection-compat.py ++++ b/examples/python/dbus/add-connection-compat.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2010 - 2012 Red Hat, Inc. +diff --git a/examples/python/dbus/add-connection.py b/examples/python/dbus/add-connection.py +index fec9343..dbaf3a2 100755 +--- a/examples/python/dbus/add-connection.py ++++ b/examples/python/dbus/add-connection.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2010 - 2012 Red Hat, Inc. +diff --git a/examples/python/dbus/add-wifi-eap-connection.py b/examples/python/dbus/add-wifi-eap-connection.py +index 2611113..f9231bc 100755 +--- a/examples/python/dbus/add-wifi-eap-connection.py ++++ b/examples/python/dbus/add-wifi-eap-connection.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2011 Red Hat, Inc. +diff --git a/examples/python/dbus/add-wifi-psk-connection.py b/examples/python/dbus/add-wifi-psk-connection.py +index 8f2294f..4615085 100755 +--- a/examples/python/dbus/add-wifi-psk-connection.py ++++ b/examples/python/dbus/add-wifi-psk-connection.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2015 Red Hat, Inc. +diff --git a/examples/python/dbus/create-bond.py b/examples/python/dbus/create-bond.py +index 1ce988c..4e6f39c 100755 +--- a/examples/python/dbus/create-bond.py ++++ b/examples/python/dbus/create-bond.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2015 Red Hat, Inc. +diff --git a/examples/python/dbus/disconnect-device.py b/examples/python/dbus/disconnect-device.py +index 2387daf..13ee6c1 100755 +--- a/examples/python/dbus/disconnect-device.py ++++ b/examples/python/dbus/disconnect-device.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2010 Red Hat, Inc. +diff --git a/examples/python/dbus/get-active-connection-uuids.py b/examples/python/dbus/get-active-connection-uuids.py +index 8d0e5c1..15c1358 100755 +--- a/examples/python/dbus/get-active-connection-uuids.py ++++ b/examples/python/dbus/get-active-connection-uuids.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2010 Red Hat, Inc. +diff --git a/examples/python/dbus/is-wwan-default.py b/examples/python/dbus/is-wwan-default.py +index d6e2b12..c4ebb73 100755 +--- a/examples/python/dbus/is-wwan-default.py ++++ b/examples/python/dbus/is-wwan-default.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2011 - 2012 Red Hat, Inc. +diff --git a/examples/python/dbus/list-connections.py b/examples/python/dbus/list-connections.py +index 43a9c4e..cab312b 100755 +--- a/examples/python/dbus/list-connections.py ++++ b/examples/python/dbus/list-connections.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2010 - 2011 Red Hat, Inc. +diff --git a/examples/python/dbus/list-devices.py b/examples/python/dbus/list-devices.py +index 4a9ebe4..b27d739 100755 +--- a/examples/python/dbus/list-devices.py ++++ b/examples/python/dbus/list-devices.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2011 - 2012 Red Hat, Inc. +diff --git a/examples/python/dbus/nm-state.py b/examples/python/dbus/nm-state.py +index 38d10ae..a26bef0 100755 +--- a/examples/python/dbus/nm-state.py ++++ b/examples/python/dbus/nm-state.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2010 - 2012 Red Hat, Inc. +diff --git a/examples/python/dbus/show-bssids.py b/examples/python/dbus/show-bssids.py +index b4217a5..fa9533f 100755 +--- a/examples/python/dbus/show-bssids.py ++++ b/examples/python/dbus/show-bssids.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2010 Red Hat, Inc. +diff --git a/examples/python/dbus/update-ip4-method.py b/examples/python/dbus/update-ip4-method.py +index 2c12c2b..fdf4011 100755 +--- a/examples/python/dbus/update-ip4-method.py ++++ b/examples/python/dbus/update-ip4-method.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2014 Red Hat, Inc. +diff --git a/examples/python/dbus/update-secrets.py b/examples/python/dbus/update-secrets.py +index a0b53b7..6805d32 100755 +--- a/examples/python/dbus/update-secrets.py ++++ b/examples/python/dbus/update-secrets.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2011 - 2012 Red Hat, Inc. +diff --git a/examples/python/dbus/vpn.py b/examples/python/dbus/vpn.py +index 8939d26..d85f288 100755 +--- a/examples/python/dbus/vpn.py ++++ b/examples/python/dbus/vpn.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2009 Novell, Inc. +diff --git a/examples/python/dbus/wifi-active-ap.py b/examples/python/dbus/wifi-active-ap.py +index 78673e7..db01626 100755 +--- a/examples/python/dbus/wifi-active-ap.py ++++ b/examples/python/dbus/wifi-active-ap.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2015 Red Hat, Inc. +diff --git a/examples/python/dbus/wifi-hotspot.py b/examples/python/dbus/wifi-hotspot.py +index d4f17d0..09dcfea 100755 +--- a/examples/python/dbus/wifi-hotspot.py ++++ b/examples/python/dbus/wifi-hotspot.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2010 - 2012 Red Hat, Inc. +diff --git a/examples/python/gi/add_connection.py b/examples/python/gi/add_connection.py +index 9cf9e34..648a2e8 100755 +--- a/examples/python/gi/add_connection.py ++++ b/examples/python/gi/add_connection.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2014 Red Hat, Inc. +diff --git a/examples/python/gi/deactivate-all.py b/examples/python/gi/deactivate-all.py +index 3af350e..dce04bb 100755 +--- a/examples/python/gi/deactivate-all.py ++++ b/examples/python/gi/deactivate-all.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2015 Red Hat, Inc. +diff --git a/examples/python/gi/device-state-ip4config.py b/examples/python/gi/device-state-ip4config.py +index 18848d0..e974e46 100755 +--- a/examples/python/gi/device-state-ip4config.py ++++ b/examples/python/gi/device-state-ip4config.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2012 Red Hat, Inc. +diff --git a/examples/python/gi/firewall-zone.py b/examples/python/gi/firewall-zone.py +index 6cbd8c2..00bbe27 100755 +--- a/examples/python/gi/firewall-zone.py ++++ b/examples/python/gi/firewall-zone.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2013 - 2014 Red Hat, Inc. +diff --git a/examples/python/gi/get-active-connections.py b/examples/python/gi/get-active-connections.py +index 072f245..8f0da1c 100755 +--- a/examples/python/gi/get-active-connections.py ++++ b/examples/python/gi/get-active-connections.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2014 Red Hat, Inc. +diff --git a/examples/python/gi/get_ips.py b/examples/python/gi/get_ips.py +index 13b0a8b..54e7859 100755 +--- a/examples/python/gi/get_ips.py ++++ b/examples/python/gi/get_ips.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2014 Red Hat, Inc. +diff --git a/examples/python/gi/list-connections.py b/examples/python/gi/list-connections.py +index 7278faf..0bb4bcd 100755 +--- a/examples/python/gi/list-connections.py ++++ b/examples/python/gi/list-connections.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2012 - 2014 Red Hat, Inc. +diff --git a/examples/python/gi/nm-add-connection2.py b/examples/python/gi/nm-add-connection2.py +index 01c1ae7..7c77480 100755 +--- a/examples/python/gi/nm-add-connection2.py ++++ b/examples/python/gi/nm-add-connection2.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2019 Red Hat, Inc. +diff --git a/examples/python/gi/nm-connection-update-stable-id.py b/examples/python/gi/nm-connection-update-stable-id.py +index 3629d07..7269687 100755 +--- a/examples/python/gi/nm-connection-update-stable-id.py ++++ b/examples/python/gi/nm-connection-update-stable-id.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2017 Red Hat, Inc. +diff --git a/examples/python/gi/nm-update2.py b/examples/python/gi/nm-update2.py +index 5a65879..68189d8 100755 +--- a/examples/python/gi/nm-update2.py ++++ b/examples/python/gi/nm-update2.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2019 Red Hat, Inc. +diff --git a/examples/python/gi/setting-user-data.py b/examples/python/gi/setting-user-data.py +index fd86445..ca051d9 100755 +--- a/examples/python/gi/setting-user-data.py ++++ b/examples/python/gi/setting-user-data.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2017 Red Hat, Inc. +diff --git a/examples/python/gi/show-wifi-networks.py b/examples/python/gi/show-wifi-networks.py +index e1ee4c3..4117a36 100755 +--- a/examples/python/gi/show-wifi-networks.py ++++ b/examples/python/gi/show-wifi-networks.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # coding=utf-8 + # SPDX-License-Identifier: GPL-2.0+ + # +diff --git a/examples/python/gi/update-ip4-method.py b/examples/python/gi/update-ip4-method.py +index 9bba619..8893f10 100755 +--- a/examples/python/gi/update-ip4-method.py ++++ b/examples/python/gi/update-ip4-method.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (C) 2014 Red Hat, Inc. +diff --git a/libnm/generate-setting-docs.py b/libnm/generate-setting-docs.py +index 025689e..eb17f22 100755 +--- a/libnm/generate-setting-docs.py ++++ b/libnm/generate-setting-docs.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: LGPL-2.1+ + # + # Copyright (C) 2009 - 2017 Red Hat, Inc. +diff --git a/src/tests/test-secret-agent.py b/src/tests/test-secret-agent.py +index d8cabc6..5f0ed5e 100755 +--- a/src/tests/test-secret-agent.py ++++ b/src/tests/test-secret-agent.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + from gi.repository import GLib + import sys +diff --git a/tools/test-networkmanager-service.py b/tools/test-networkmanager-service.py +index 56a53a4..9d712fe 100755 +--- a/tools/test-networkmanager-service.py ++++ b/tools/test-networkmanager-service.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + from __future__ import print_function + |