Complete Yocto mirror with license table for TQMa6UL (2038-compliance)

- 264 license table entries with exact download URLs (224/264 resolved)
- Complete sources/ directory with all BitBake recipes
- Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl)
- Full traceability for Softwarefreigabeantrag
- GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4
- License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
Siggi (OpenClaw Agent)
2026-03-01 20:58:18 +00:00
commit 16accb6b24
15086 changed files with 1292356 additions and 0 deletions

View File

@@ -0,0 +1,306 @@
From 084ef529c5fb816927ca54866f66b340265aa9f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <eivnaes@yahoo.com>
Date: Sat, 4 Mar 2023 21:20:43 +0000
Subject: [PATCH] Adding support for compiling against pppd-2.5.0 (or master
branch)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Backport
Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
---
Makefile.am | 5 +-
configure.ac | 37 +++++++-
src/nm-fortisslvpn-pppd-compat.h | 93 +++++++++++++++++++
src/nm-fortisslvpn-pppd-plugin.c | 24 ++---
...-status.h => nm-fortisslvpn-pppd-status.h} | 0
src/nm-fortisslvpn-service.c | 2 +-
6 files changed, 145 insertions(+), 16 deletions(-)
create mode 100644 src/nm-fortisslvpn-pppd-compat.h
rename src/{nm-ppp-status.h => nm-fortisslvpn-pppd-status.h} (100%)
diff --git a/Makefile.am b/Makefile.am
index b2e5533..e1e5ec9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -81,7 +81,7 @@ libexec_PROGRAMS += src/nm-fortisslvpn-service
src_nm_fortisslvpn_service_SOURCES = \
shared/nm-utils/nm-shared-utils.c \
shared/nm-utils/nm-shared-utils.h \
- src/nm-ppp-status.h \
+ src/nm-fortisslvpn-pppd-status.h \
src/nm-fortisslvpn-service.h \
src/nm-fortisslvpn-service.c \
shared/nm-fortissl-properties.c \
@@ -106,7 +106,8 @@ src_nm_fortisslvpn_pppd_plugin_la_SOURCES = \
shared/nm-utils/nm-shared-utils.c \
shared/nm-utils/nm-shared-utils.h \
src/nm-fortisslvpn-pppd-plugin.c \
- src/nm-ppp-status.h
+ src/nm-fortisslvpn-pppd-compat.h \
+ src/nm-fortisslvpn-pppd-status.h
nodist_src_nm_fortisslvpn_pppd_plugin_la_SOURCES = \
src/nm-fortisslvpn-pppd-service-dbus.h
src_nm_fortisslvpn_pppd_plugin_la_CPPFLAGS = $(src_cppflags)
diff --git a/configure.ac b/configure.ac
index a998707..877493e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,10 @@ AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LIBTOOL
+AC_PROG_CPP
+AC_PROG_EGREP
AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources)
+PKG_PROG_PKG_CONFIG()
AC_GNU_SOURCE
@@ -37,20 +40,50 @@ dnl
dnl Required headers
dnl
AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h paths.h sys/ioctl.h sys/time.h syslog.h unistd.h)
+AC_CHECK_HEADERS(fcntl.h paths.h stdarg.h stdbool.h sys/ioctl.h sys/time.h syslog.h unistd.h)
AC_CHECK_HEADERS(pppd/pppd.h,,
AC_MSG_ERROR(couldn't find pppd.h. pppd development headers are required.))
+dnl
+dnl Check the presense of other pppd/*.h files
+AC_CHECK_HEADERS([
+ pppd/chap.h
+ pppd/chap-new.h
+ pppd/chap_ms.h
+ ])
+
+dnl
+dnl Versions >= 2.5.0 will have pkg-config support
+PKG_CHECK_EXISTS([pppd],
+ [AS_VAR_SET([pppd_pkgconfig_support],[yes])])
+
+dnl
+dnl Get the version of pppd using pkg-config, assume 2.4.9 if not present
+PPPD_VERSION=2.4.5
+if test x"$pppd_pkgconfig_support" = xyes; then
+ PPPD_VERSION=`$PKG_CONFIG --modversion pppd`
+fi
+
+
AC_ARG_WITH([pppd-plugin-dir], AS_HELP_STRING([--with-pppd-plugin-dir=DIR], [path to the pppd plugins directory]))
if test -n "$with_pppd_plugin_dir" ; then
PPPD_PLUGIN_DIR="$with_pppd_plugin_dir"
else
- PPPD_PLUGIN_DIR="${libdir}/pppd/2.4.5"
+ PPPD_PLUGIN_DIR="${libdir}/pppd/$PPPD_VERSION"
fi
AC_SUBST(PPPD_PLUGIN_DIR)
+dnl The version of pppd dictates what code can be included, i.e. enable use of
+dnl #if WITH_PPP_VERSION >= PPP_VERSION(2,5,0) in the code
+AC_DEFINE_UNQUOTED([PPP_VERSION(x,y,z)],
+ [((x & 0xFF) << 16 | (y & 0xFF) << 8 | (z & 0xFF) << 0)],
+ [Macro to help determine the particular version of pppd])
+PPP_VERSION=$(echo $PPPD_VERSION | sed -e "s/\./\,/g")
+AC_DEFINE_UNQUOTED(WITH_PPP_VERSION, PPP_VERSION($PPP_VERSION),
+ [The real version of pppd represented as an int])
+
dnl
dnl Checks for typedefs, structures, and compiler characteristics.
dnl
diff --git a/src/nm-fortisslvpn-pppd-compat.h b/src/nm-fortisslvpn-pppd-compat.h
new file mode 100644
index 0000000..9a02908
--- /dev/null
+++ b/src/nm-fortisslvpn-pppd-compat.h
@@ -0,0 +1,93 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* nm-sstp-service - sstp (and other pppd) integration with NetworkManager
+ *
+ * Copyright (C) Eivind Næss, eivnaes@yahoo.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#ifndef __NM_FORTISSLVPN_PPPD_COMPAT_H__
+#define __NM_FORTISSLVPN_PPPD_COMPAT_H__
+
+#define INET6 1
+
+// PPP < 2.5.0 defines and exports VERSION which overlaps with current package VERSION define.
+// this silly macro magic is to work around that.
+
+#undef VERSION
+#include <pppd/pppd.h>
+
+#ifndef PPPD_VERSION
+#define PPPD_VERSION VERSION
+#endif
+
+#include <pppd/fsm.h>
+#include <pppd/ccp.h>
+#include <pppd/eui64.h>
+#include <pppd/ipcp.h>
+#include <pppd/ipv6cp.h>
+#include <pppd/eap.h>
+#include <pppd/upap.h>
+
+#ifdef HAVE_PPPD_CHAP_H
+ #include <pppd/chap.h>
+#endif
+
+#ifdef HAVE_PPPD_CHAP_NEW_H
+ #include <pppd/chap-new.h>
+#endif
+
+#ifdef HAVE_PPPD_CHAP_MS_H
+ #include <pppd/chap_ms.h>
+#endif
+
+#ifndef PPP_PROTO_CHAP
+#define PPP_PROTO_CHAP 0xc223
+#endif
+
+#ifndef PPP_PROTO_EAP
+#define PPP_PROTO_EAP 0xc227
+#endif
+
+#if WITH_PPP_VERSION < PPP_VERSION(2,5,0)
+
+static inline bool debug_on(void)
+{
+ return debug;
+}
+
+static inline const char *ppp_ipparam(void)
+{
+ return ipparam;
+}
+
+static inline int ppp_ifunit(void)
+{
+ return ifunit;
+}
+
+static inline const char *ppp_ifname(void)
+{
+ return ifname;
+}
+
+static inline int ppp_get_mtu(int idx)
+{
+ return netif_get_mtu(idx);
+}
+
+#endif // #if WITH_PPP_VERSION < PPP_VERSION(2,5,0)
+#endif // #ifdef __NM_FORTISSLVPN_PPPD_COMPAT_H__
diff --git a/src/nm-fortisslvpn-pppd-plugin.c b/src/nm-fortisslvpn-pppd-plugin.c
index f2ad262..c2efb9a 100644
--- a/src/nm-fortisslvpn-pppd-plugin.c
+++ b/src/nm-fortisslvpn-pppd-plugin.c
@@ -23,12 +23,6 @@
#define ___CONFIG_H__
#include <config.h>
-#include <pppd/pppd.h>
-#include <pppd/fsm.h>
-#include <pppd/ipcp.h>
-
-#include "nm-default.h"
-
#include <sys/types.h>
#include <string.h>
#include <sys/socket.h>
@@ -42,10 +36,12 @@
#include <grp.h>
#include <glib/gstdio.h>
+#include "nm-fortisslvpn-pppd-status.h"
+#include "nm-fortisslvpn-pppd-compat.h"
#include "nm-fortisslvpn-pppd-service-dbus.h"
-#include "nm-fortisslvpn-service.h"
-#include "nm-ppp-status.h"
+#include "nm-default.h"
+#include "nm-fortisslvpn-service.h"
#include "nm-utils/nm-shared-utils.h"
#include "nm-utils/nm-vpn-plugin-macros.h"
@@ -80,7 +76,7 @@ static struct {
int plugin_init (void);
-char pppd_version[] = VERSION;
+char pppd_version[] = PPPD_VERSION;
static void
chroot_sandbox (void)
@@ -296,7 +292,7 @@ get_ip4_routes (in_addr_t ouraddr)
static void
nm_ip_up (void *data, int arg)
{
- guint32 pppd_made_up_address = htonl (0x0a404040 + ifunit);
+ guint32 pppd_made_up_address = htonl (0x0a404040 + ppp_ifunit());
ipcp_options opts = ipcp_gotoptions[0];
ipcp_options peer_opts = ipcp_hisoptions[0];
GVariantBuilder builder;
@@ -317,7 +313,7 @@ nm_ip_up (void *data, int arg)
g_variant_builder_add (&builder, "{sv}",
NM_VPN_PLUGIN_IP4_CONFIG_TUNDEV,
- g_variant_new_string (ifname));
+ g_variant_new_string (ppp_ifname()));
str = g_getenv ("VPN_GATEWAY");
if (str) {
@@ -442,8 +438,14 @@ plugin_init (void)
return -1;
}
+#if WITH_PPP_VERSION < PPP_VERSION(2,5,0)
add_notifier (&phasechange, nm_phasechange, NULL);
add_notifier (&ip_up_notifier, nm_ip_up, NULL);
add_notifier (&exitnotify, nm_exit_notify, NULL);
+#else
+ ppp_add_notify (NF_PHASE_CHANGE, nm_phasechange, NULL);
+ ppp_add_notify (NF_IP_UP, nm_ip_up, NULL);
+ ppp_add_notify (NF_EXIT, nm_exit_notify, NULL);
+#endif
return 0;
}
diff --git a/src/nm-ppp-status.h b/src/nm-fortisslvpn-pppd-status.h
similarity index 100%
rename from src/nm-ppp-status.h
rename to src/nm-fortisslvpn-pppd-status.h
diff --git a/src/nm-fortisslvpn-service.c b/src/nm-fortisslvpn-service.c
index 6c340d0..a8483c2 100644
--- a/src/nm-fortisslvpn-service.c
+++ b/src/nm-fortisslvpn-service.c
@@ -40,7 +40,7 @@
#include <glib/gstdio.h>
#include "nm-fortissl-properties.h"
-#include "nm-ppp-status.h"
+#include "nm-fortisslvpn-pppd-status.h"
#include "nm-fortisslvpn-pppd-service-dbus.h"
#include "nm-utils/nm-shared-utils.h"
#include "nm-utils/nm-vpn-plugin-macros.h"
--
GitLab

View File

@@ -0,0 +1,34 @@
From 8773f772d39f8eee6edc1fd2e5437c754ed41e1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <eivnaes@yahoo.com>
Date: Sat, 4 Mar 2023 21:29:54 +0000
Subject: [PATCH] Fixing configure.ac from previous change
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Backport
Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
---
configure.ac | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index 877493e..a5b4abb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,11 +47,7 @@ AC_CHECK_HEADERS(pppd/pppd.h,,
dnl
dnl Check the presense of other pppd/*.h files
-AC_CHECK_HEADERS([
- pppd/chap.h
- pppd/chap-new.h
- pppd/chap_ms.h
- ])
+AC_CHECK_HEADERS(pppd/chap.h pppd/chap-new.h pppd/chap_ms.h)
dnl
dnl Versions >= 2.5.0 will have pkg-config support
--
GitLab

View File

@@ -0,0 +1,71 @@
SUMMARY = "Fortinet SSLVPN support for NetworkManager"
SECTION = "net/misc"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
DEPENDS = "glib-2.0-native libxml2-native networkmanager ppp python3-packaging-native"
GNOMEBASEBUILDCLASS = "autotools"
inherit gnomebase gettext useradd python3native
SRC_URI = " \
${GNOME_MIRROR}/NetworkManager-fortisslvpn/${@gnome_verdir("${PV}")}/NetworkManager-fortisslvpn-${PV}.tar.xz \
file://0001-fix-ppp-2.5.0-build.patch \
file://0002-fix-ppp-2.5.0-build.patch \
"
SRC_URI[sha256sum] = "b055e26349b516b23585798ab3ef57b436b014800e92a8ac732cfc8e76c5dafa"
S = "${WORKDIR}/NetworkManager-fortisslvpn-${PV}"
# meta-gnome in layers is required using gnome:
PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome,gtk+3 libnma libsecret,"
PACKAGECONFIG[gtk4] = "--with-gtk4,--without-gtk4,gtk4,"
EXTRA_OECONF = "--with-pppd-plugin-dir=${libdir}/pppd/${@get_ppp_version(d)}"
def get_ppp_version(d):
import re
pppd_plugin = d.expand('${STAGING_LIBDIR}/pppd')
if not os.path.isdir(pppd_plugin):
return None
bb.debug(1, "pppd plugin dir %s" % pppd_plugin)
r = re.compile(r"\d*\.\d*\.\d*")
for f in os.listdir(pppd_plugin):
if os.path.isdir(os.path.join(pppd_plugin, f)):
ma = r.match(f)
if ma:
bb.debug(1, "pppd version dir %s" % f)
return f
else:
bb.debug(1, "under pppd plugin dir %s" % f)
return None
# gdbus-codegen requires target directories to exist
do_configure:append() {
mkdir -p ${B}/properties
mkdir -p ${B}/src
}
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--system nm-fortisslvpn"
FILES:${PN} += " \
${libdir}/NetworkManager/*.so \
${libdir}/pppd/*/*.so \
${nonarch_libdir}/NetworkManager/VPN/nm-fortisslvpn-service.name \
"
FILES:${PN}-staticdev += " \
${libdir}/NetworkManager/*.a \
${libdir}/pppd/*/*.a \
"
RDEPENDS:${PN} = " \
networkmanager \
openfortivpn \
ppp \
"

View File

@@ -0,0 +1,47 @@
SUMMARY = "OpenConnect VPN client for NetworkManager"
SECTION = "net/misc"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=186e8b54342da4f753a62b7748c947db"
DEPENDS = "glib-2.0-native intltool-native libxml2 networkmanager openconnect"
GNOMEBASEBUILDCLASS = "autotools"
inherit gnomebase useradd
SRC_URI = "${GNOME_MIRROR}/NetworkManager-openconnect/${@gnome_verdir("${PV}")}/NetworkManager-openconnect-${PV}.tar.xz"
SRC_URI[sha256sum] = "5dedaa785d82d8e239ddd082bfac5250c691e964464be1807b6827263633cdcc"
S = "${WORKDIR}/NetworkManager-openconnect-${PV}"
# meta-gnome in layers is required using gnome:
PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome,gtk+3 gcr3 libnma libsecret,"
PACKAGECONFIG[gtk4] = "--with-gtk4,--without-gtk4,gtk4,"
do_configure:append() {
# network-manager-openconnect.metainfo.xml is created in source folder but
# compile expects it in build folder. As long as nobody comes up with a
# better solution just support build:
if [ -e ${S}/appdata/network-manager-openconnect.metainfo.xml ]; then
mkdir -p ${B}/appdata
cp -f ${S}/appdata/network-manager-openconnect.metainfo.xml ${B}/appdata/
fi
}
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--system nm-openconnect"
FILES:${PN} += " \
${libdir}/NetworkManager/*.so \
${nonarch_libdir}/NetworkManager/VPN/nm-openconnect-service.name \
"
FILES:${PN}-staticdev += " \
${libdir}/NetworkManager/*.a \
"
RDEPENDS:${PN} = " \
networkmanager \
openconnect \
"

View File

@@ -0,0 +1,30 @@
From e09ba80e342b3b24bb2a46e11dae1c30cc61c75c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 3 Sep 2023 08:48:42 -0700
Subject: [PATCH] linker-script: Do not export _IO_stdin_used
This is glibc specific toolhain issue, it should have been handled in
toolchain instead of exposing to applications. This was done to fix
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835550
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
linker-script-binary.ver | 1 -
1 file changed, 1 deletion(-)
diff --git a/linker-script-binary.ver b/linker-script-binary.ver
index a2780c0..f030d35 100644
--- a/linker-script-binary.ver
+++ b/linker-script-binary.ver
@@ -1,6 +1,5 @@
{
global:
- _IO_stdin_used;
local:
*;
};
--
2.42.0

View File

@@ -0,0 +1,55 @@
SUMMARY = "NetworkManager-openvpn-plugin"
SECTION = "net/misc"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=100d5a599bead70ddcd70dcd73f2e29c"
DEPENDS = "dbus dbus-glib networkmanager openvpn intltool-native glib-2.0-native"
GNOMEBASEBUILDCLASS = "autotools"
inherit gnomebase useradd gettext systemd
SRC_URI = "${GNOME_MIRROR}/NetworkManager-openvpn/${@gnome_verdir("${PV}")}/NetworkManager-openvpn-${PV}.tar.xz"
SRC_URI:append:libc-musl = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' file://0001-linker-scripts-Do-not-export-_IO_stdin_used.patch', '', d)}"
SRC_URI[sha256sum] = "62f0f2a8782221b923f212ac2a8ebbc1002efd6a90ee945dad4adfb56d076d21"
S = "${WORKDIR}/NetworkManager-openvpn-${PV}"
# meta-gnome in layers is required using gnome:
PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome,gtk+3 libnma libsecret"
do_configure:append() {
# network-manager-openvpn.metainfo.xml is created in source folder but
# compile expects it in build folder. As long as nobody comes up with a
# better solution just support build:
if [ -e ${S}/appdata/network-manager-openvpn.metainfo.xml ]; then
mkdir -p ${B}/appdata
cp -f ${S}/appdata/network-manager-openvpn.metainfo.xml ${B}/appdata/
fi
}
do_install:append () {
rm -rf ${D}${libdir}/NetworkManager/*.la
}
# Create user and group nm-openvpn that are needed since version 1.0.6
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--system nm-openvpn"
FILES:${PN} += " \
${datadir}/dbus-1 \
${datadir}/metainfo \
${libdir}/NetworkManager/*.so \
${nonarch_libdir}/NetworkManager/VPN/nm-openvpn-service.name \
"
FILES:${PN}-staticdev += " \
${libdir}/NetworkManager/*.a \
"
RDEPENDS:${PN} = " \
networkmanager \
openvpn \
"

View File

@@ -0,0 +1,41 @@
From 3ee6967689b3da30cc4551885d8bcdd44a7a9b52 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Aug 2023 21:16:55 -0700
Subject: [PATCH] linker-scripts: Do not export _IO_stdin_used
This is glibc specific and it is not needed with musl.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835550
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
linker-script-binary.ver | 1 -
tools/create-exports-NetworkManager.sh | 1 -
2 files changed, 2 deletions(-)
diff --git a/linker-script-binary.ver b/linker-script-binary.ver
index a2780c0..f030d35 100644
--- a/linker-script-binary.ver
+++ b/linker-script-binary.ver
@@ -1,6 +1,5 @@
{
global:
- _IO_stdin_used;
local:
*;
};
diff --git a/tools/create-exports-NetworkManager.sh b/tools/create-exports-NetworkManager.sh
index ef4b381..60865ad 100755
--- a/tools/create-exports-NetworkManager.sh
+++ b/tools/create-exports-NetworkManager.sh
@@ -54,7 +54,6 @@ get_symbols_nm () {
get_symbols_explicit() {
cat <<EOF | _sort
-_IO_stdin_used
EOF
}
--
2.42.0

View File

@@ -0,0 +1,3 @@
[device]
wifi.iwd.autoconnect=yes
wifi.backend=iwd

View File

@@ -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

View File

@@ -0,0 +1,323 @@
SUMMARY = "NetworkManager is a program for providing detection and \
configuration for systems to automatically connect to networks."
DESCRIPTION = "NetworkManager is a program for providing detection and \
configuration for systems to automatically connect to networks. \
NetworkManager's functionality can be useful for both wireless and wired \
networks. For wireless networks, NetworkManager prefers known wireless \
networks and has the ability to switch to the most reliable network. \
NetworkManager-aware applications can switch from online and offline mode. \
NetworkManager also prefers wired connections over wireless ones, has support \
for modem connections and certain types of VPN."
HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager"
SECTION = "net/misc"
LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \
"
DEPENDS = " \
python3-pygobject-native \
coreutils-native \
intltool-native \
libxslt-native \
libnl \
udev \
util-linux \
libndp \
curl \
dbus \
"
DEPENDS:append:class-target = " bash-completion"
inherit gnomebase gettext update-rc.d systemd gobject-introspection gtk-doc update-alternatives upstream-version-is-even
SRC_URI = " \
${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \
file://${BPN}.initd \
file://enable-dhcpcd.conf \
file://enable-iwd.conf \
"
SRC_URI:append:libc-musl = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' file://0001-linker-scripts-Do-not-export-_IO_stdin_used.patch', '', d)}"
SRC_URI[sha256sum] = "722649e25362693b334371473802a729b0ec9ee283375096905f868808e74068"
S = "${WORKDIR}/NetworkManager-${PV}"
# ['auto', 'symlink', 'file', 'netconfig', 'resolvconf']
NETWORKMANAGER_DNS_RC_MANAGER_DEFAULT ??= "auto"
# ['dhcpcanon', 'dhclient', 'dhcpcd', 'internal', 'nettools']
NETWORKMANAGER_DHCP_DEFAULT ??= "internal"
# The default gets detected based on whether /usr/sbin/nft or /usr/sbin/iptables is installed, with nftables preferred.
# ['', 'iptables', 'nftables']
NETWORKMANAGER_FIREWALL_DEFAULT ??= "nftables"
EXTRA_OEMESON = "\
-Difcfg_rh=false \
-Dtests=yes \
-Dnmtui=true \
-Dudev_dir=${nonarch_base_libdir}/udev \
-Dlibpsl=false \
-Dqt=false \
-Dconfig_dns_rc_manager_default=${NETWORKMANAGER_DNS_RC_MANAGER_DEFAULT} \
-Dconfig_dhcp_default=${NETWORKMANAGER_DHCP_DEFAULT} \
-Ddhcpcanon=false \
-Diptables=${sbindir}/iptables \
-Dnft=${sbindir}/nft \
"
# stolen from https://github.com/void-linux/void-packages/blob/master/srcpkgs/NetworkManager/template
# avoids:
# | ../NetworkManager-1.16.0/libnm-core/nm-json.c:106:50: error: 'RTLD_DEEPBIND' undeclared (first use in this function); did you mean 'RTLD_DEFAULT'?
CFLAGS:append:libc-musl = " \
-DRTLD_DEEPBIND=0 \
"
do_configure:prepend() {
cp -f ${STAGING_LIBDIR}/girepository-1.0/GObject*typelib ${STAGING_LIBDIR_NATIVE}/girepository-1.0/
cp -f ${STAGING_LIBDIR}/girepository-1.0/Gio*typelib ${STAGING_LIBDIR_NATIVE}/girepository-1.0/
cp -f ${STAGING_LIBDIR}/girepository-1.0/GModule*typelib ${STAGING_LIBDIR_NATIVE}/girepository-1.0/
}
PACKAGECONFIG ??= "readline nss ifupdown dnsmasq nmcli vala \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'wifi polkit ppp', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit', '', d)} \
"
inherit ${@bb.utils.contains('PACKAGECONFIG', 'vala', 'vala', '', d)}
PACKAGECONFIG[systemd] = "\
-Dsystemdsystemunitdir=${systemd_unitdir}/system -Dsession_tracking=systemd,\
-Dsystemdsystemunitdir=no -Dsystemd_journal=false -Dsession_tracking=no\
"
PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false,polkit"
PACKAGECONFIG[bluez5] = "-Dbluez5_dun=true,-Dbluez5_dun=false,bluez5"
# consolekit is not picked by shlibs, so add it to RDEPENDS too
PACKAGECONFIG[consolekit] = "-Dsession_tracking_consolekit=true,-Dsession_tracking_consolekit=false,consolekit,consolekit"
PACKAGECONFIG[modemmanager] = "-Dmodem_manager=true,-Dmodem_manager=false,modemmanager mobile-broadband-provider-info"
PACKAGECONFIG[ppp] = "-Dppp=true -Dpppd=${sbindir}/pppd,-Dppp=false,ppp"
PACKAGECONFIG[dnsmasq] = "-Ddnsmasq=${bindir}/dnsmasq"
PACKAGECONFIG[nss] = "-Dcrypto=nss,,nss"
PACKAGECONFIG[resolvconf] = "-Dresolvconf=${base_sbindir}/resolvconf,-Dresolvconf=no,,resolvconf"
PACKAGECONFIG[gnutls] = "-Dcrypto=gnutls,,gnutls"
PACKAGECONFIG[crypto-null] = "-Dcrypto=null"
PACKAGECONFIG[wifi] = "-Dwext=true -Dwifi=true,-Dwext=false -Dwifi=false"
PACKAGECONFIG[iwd] = "-Diwd=true,-Diwd=false"
PACKAGECONFIG[ifupdown] = "-Difupdown=true,-Difupdown=false"
PACKAGECONFIG[cloud-setup] = "-Dnm_cloud_setup=true,-Dnm_cloud_setup=false"
PACKAGECONFIG[nmcli] = "-Dnmcli=true,-Dnmcli=false"
PACKAGECONFIG[nmtui] = "-Dnmtui=true,-Dnmtui=false,libnewt"
PACKAGECONFIG[readline] = "-Dreadline=libreadline,,readline"
PACKAGECONFIG[libedit] = "-Dreadline=libedit,,libedit"
PACKAGECONFIG[ovs] = "-Dovs=true,-Dovs=false,jansson"
PACKAGECONFIG[audit] = "-Dlibaudit=yes,-Dlibaudit=no"
PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux"
PACKAGECONFIG[vala] = "-Dvapi=true,-Dvapi=false"
PACKAGECONFIG[dhcpcd] = "-Ddhcpcd=${base_sbindir}/dhcpcd,-Ddhcpcd=no,,dhcpcd"
PACKAGECONFIG[dhclient] = "-Ddhclient=yes,-Ddhclient=no,,dhcp"
PACKAGECONFIG[concheck] = "-Dconcheck=true,-Dconcheck=false"
PACKAGECONFIG[adsl] = ",,"
PACKAGECONFIG[wwan] = ",,"
# The following PACKAGECONFIG is used to determine whether NM is managing /etc/resolv.conf itself or not
PACKAGECONFIG[man-resolv-conf] = ",,"
PACKAGES =+ " \
libnm \
${PN}-adsl \
${PN}-bluetooth \
${PN}-cloud-setup \
${PN}-nmcli \
${PN}-nmcli-bash-completion \
${PN}-nmtui \
${PN}-wifi \
${PN}-wwan \
${PN}-ovs \
${PN}-ppp \
${PN}-daemon \
"
SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-cloud-setup"
INITSCRIPT_PACKAGES = "${PN}-daemon"
NETWORKMANAGER_PLUGINDIR = "${libdir}/NetworkManager/${PV}"
NETWORKMANAGER_DISPATCHERDIR = "${nonarch_libdir}/NetworkManager/dispatcher.d"
SUMMARY:libnm = "Libraries for adding NetworkManager support to applications"
FILES:libnm = "\
${libdir}/libnm.so.* \
${libdir}/girepository-1.0/NM-1.0.typelib \
"
SUMMARY:${PN}-adsl = "ADSL device plugin for NetworkManager"
FILES:${PN}-adsl = "${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-adsl.so"
RDEPENDS:${PN}-adsl += "${PN}-daemon"
SUMMARY:${PN}-bluetooth = "Bluetooth device plugin for NetworkManager"
FILES:${PN}-bluetooth = "${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-bluetooth.so"
RDEPENDS:${PN}-bluetooth += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG', 'bluez5', '${PN}-wwan bluez5', '', d)}"
SUMMARY:${PN}-cloud-setup = "Automatically configure NetworkManager in cloud"
FILES:${PN}-cloud-setup = " \
${libexecdir}/nm-cloud-setup \
${systemd_system_unitdir}/nm-cloud-setup.service \
${systemd_system_unitdir}/nm-cloud-setup.timer \
${libdir}/NetworkManager/dispatcher.d/90-nm-cloud-setup.sh \
${libdir}/NetworkManager/dispatcher.d/no-wait.d/90-nm-cloud-setup.sh \
"
RDEPENDS:${PN}-cloud-setup += "${PN}-daemon"
ALLOW_EMPTY:${PN}-cloud-setup = "1"
SYSTEMD_SERVICE:${PN}-cloud-setup = "${@bb.utils.contains('PACKAGECONFIG', 'cloud-setup', 'nm-cloud-setup.service nm-cloud-setup.timer', '', d)}"
SUMMARY:${PN}-nmcli = "NetworkManager command line client"
FILES:${PN}-nmcli = " \
${bindir}/nmcli \
"
RDEPENDS:${PN}-nmcli += "${PN}-daemon"
SUMMARY:${PN}-nmcli-bash-completion = "NetworkManager command line client bash completion"
FILES:${PN}-nmcli-bash-completion = "${datadir}/bash-completion/completions/nmcli"
RDEPENDS:${PN}-nmcli-bash-completion = "bash-completion"
SUMMARY:${PN}-nmtui = "NetworkManager curses-based UI"
FILES:${PN}-nmtui = " \
${bindir}/nmtui \
${bindir}/nmtui-edit \
${bindir}/nmtui-connect \
${bindir}/nmtui-hostname \
"
RDEPENDS:${PN}-nmtui += "${PN}-daemon"
SUMMARY:${PN}-wifi = "Wifi plugin for NetworkManager"
FILES:${PN}-wifi = "\
${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-wifi.so \
${libdir}/NetworkManager/conf.d/enable-iwd.conf \
"
def get_wifi_deps(d):
packageconfig = (d.getVar('PACKAGECONFIG') or "").split()
if 'wifi' in packageconfig:
if 'iwd' in packageconfig:
return 'iwd'
else:
return 'wpa-supplicant'
else:
return ''
RDEPENDS:${PN}-wifi += "${PN}-daemon ${@get_wifi_deps(d)}"
SUMMARY:${PN}-wwan = "Mobile broadband device plugin for NetworkManager"
FILES:${PN}-wwan = "\
${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-wwan.so \
${NETWORKMANAGER_PLUGINDIR}/libnm-wwan.so \
"
RDEPENDS:${PN}-wwan += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG','modemmanager','modemmanager','',d)}"
SUMMARY:${PN}-ovs = "Open vSwitch device plugin for NetworkManager"
FILES:${PN}-ovs = "\
${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-ovs.so \
${systemd_system_unitdir}/NetworkManager.service.d/NetworkManager-ovs.conf \
"
RDEPENDS:${PN}-ovs += "${PN}-daemon"
SUMMARY:${PN}-ppp = "PPP plugin for NetworkManager"
FILES:${PN}-ppp = "\
${NETWORKMANAGER_PLUGINDIR}/libnm-ppp-plugin.so \
${libdir}/pppd/*/nm-pppd-plugin.so \
"
RDEPENDS:${PN}-ppp += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG','ppp','ppp','',d)}"
FILES:${PN}-dev += " \
${libdir}/pppd/*/*.la \
${libdir}/NetworkManager/*.la \
${NETWORKMANAGER_PLUGINDIR}/*.la \
${datadir}/dbus-1/interfaces/*.xml \
"
SUMMARY:${PN}-daemon += "The NetworkManager daemon"
FILES:${PN}-daemon += " \
${bindir}/nm-online \
${datadir}/dbus-1 \
${datadir}/polkit-1 \
${libdir}/NetworkManager \
${libexecdir} \
${localstatedir}/lib/NetworkManager \
${NETWORKMANAGER_DISPATCHERDIR} \
${nonarch_base_libdir}/udev/* \
${nonarch_libdir}/firewalld \
${nonarch_libdir}/NetworkManager/conf.d \
${nonarch_libdir}/NetworkManager/dispatcher.d/no-wait.d \
${nonarch_libdir}/NetworkManager/dispatcher.d/pre-down.d \
${nonarch_libdir}/NetworkManager/dispatcher.d/pre-up.d \
${nonarch_libdir}/NetworkManager/system-connections \
${nonarch_libdir}/NetworkManager/VPN \
${sbindir}/NetworkManager \
${sysconfdir}/init.d/network-manager \
${sysconfdir}/NetworkManager \
${sysconfdir}/resolv-conf.NetworkManager \
${sysconfdir}/sysconfig/network-scripts \
${systemd_system_unitdir} \
"
RDEPENDS:${PN}-daemon += "\
${@bb.utils.contains('PACKAGECONFIG', 'ifupdown', 'bash', '', d)} \
"
RRECOMMENDS:${PN}-daemon += "\
${NETWORKMANAGER_FIREWALL_DEFAULT} \
${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \
"
INITSCRIPT_NAME:${PN}-daemon = "network-manager"
SYSTEMD_SERVICE:${PN}-daemon = "\
NetworkManager.service \
NetworkManager-dispatcher.service \
"
RCONFLICTS:${PN}-daemon += "connman"
ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE:${PN}-daemon = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','resolv-conf','',d)}"
ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','${sysconfdir}/resolv-conf.NetworkManager','',d)}"
ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','${sysconfdir}/resolv.conf','',d)}"
# The networkmanager package is an empty meta package which weakly depends on all the compiled features.
# Install this package to get all plugins and related dependencies installed. Alternatively just install
# plugins and related dependencies e.g. by installing networkmanager-wifi or networkmanager-wwan
# packages to the firmware.
ALLOW_EMPTY:${PN} = "1"
RRECOMMENDS:${PN} += "\
${@bb.utils.contains('PACKAGECONFIG','adsl','${PN}-adsl','',d)} \
${@bb.utils.contains('PACKAGECONFIG','bluez5','${PN}-bluetooth','',d)} \
${@bb.utils.contains('PACKAGECONFIG','cloud-setup','${PN}-cloud-setup','',d)} \
${@bb.utils.contains('PACKAGECONFIG','nmcli','${PN}-nmcli','',d)} \
${@bb.utils.contains('PACKAGECONFIG','nmtui','${PN}-nmtui','',d)} \
${@bb.utils.contains('PACKAGECONFIG','wifi','${PN}-wifi','',d)} \
${@bb.utils.contains('PACKAGECONFIG','wwan','${PN}-wwan','',d)} \
${@bb.utils.contains('PACKAGECONFIG','ovs','${PN}-ovs','',d)} \
${@bb.utils.contains('PACKAGECONFIG','ppp','${PN}-ppp','',d)} \
"
do_install:append() {
install -Dm 0755 ${WORKDIR}/${BPN}.initd ${D}${sysconfdir}/init.d/network-manager
rm -rf ${D}/run ${D}${localstatedir}/run
if ${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','true','false',d)}; then
# For read-only filesystem, do not create links during bootup
ln -sf ../run/NetworkManager/resolv.conf ${D}${sysconfdir}/resolv-conf.NetworkManager
# systemd v210 and newer do not need this rule file
rm ${D}/${nonarch_base_libdir}/udev/rules.d/84-nm-drivers.rules
fi
# Enable iwd if compiled
if ${@bb.utils.contains('PACKAGECONFIG','iwd','true','false',d)}; then
install -Dm 0644 ${WORKDIR}/enable-iwd.conf ${D}${nonarch_libdir}/NetworkManager/conf.d/enable-iwd.conf
fi
# Enable dhcpd if compiled
if ${@bb.utils.contains('PACKAGECONFIG','dhcpcd','true','false',d)}; then
install -Dm 0644 ${WORKDIR}/enable-dhcpcd.conf ${D}${nonarch_libdir}/NetworkManager/conf.d/enable-dhcpcd.conf
fi
}