summaryrefslogtreecommitdiff
path: root/net-libs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-21 00:33:06 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-21 00:33:06 +0000
commitc69dc3fc00841af7e4edacef822ceaaa2ed1b650 (patch)
tree94e5c73a6a443c5989bf0be2bd073a19b4585b8c /net-libs
parent23d90aced73fbade08c6c2ec5385f75b0b5b0bff (diff)
hmmm, wtf happened in here
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/libnm-glib/Manifest1
-rw-r--r--net-libs/libnm-glib/files/1.18.4-iwd1-compat.patch81
-rw-r--r--net-libs/libnm-glib/files/libnm-glib-data-fix-the-ID_NET_DRIVER-udev-rule.patch33
-rw-r--r--net-libs/libnm-glib/libnm-glib-1.18.8.ebuild225
4 files changed, 340 insertions, 0 deletions
diff --git a/net-libs/libnm-glib/Manifest b/net-libs/libnm-glib/Manifest
new file mode 100644
index 00000000..1e342708
--- /dev/null
+++ b/net-libs/libnm-glib/Manifest
@@ -0,0 +1 @@
+DIST NetworkManager-1.18.8.tar.xz 4887300 BLAKE2B 50c9b334ca44be7271a9d1d77e88c0be4a3073bc498d5b106c9be7e886172e2e8ff03acce5fcbc0656a5e73ced186ae0726622ab65b25539a6dff05260d675da SHA512 dcf4766cbc8a07b5c9fb358bc46dd5194e9d1ea97737fe3214bd9161c441ade0eca4bb7cbd61037611a475579b24c243c206a94b21b37a5afc18136968bc5e21
diff --git a/net-libs/libnm-glib/files/1.18.4-iwd1-compat.patch b/net-libs/libnm-glib/files/1.18.4-iwd1-compat.patch
new file mode 100644
index 00000000..12c8b873
--- /dev/null
+++ b/net-libs/libnm-glib/files/1.18.4-iwd1-compat.patch
@@ -0,0 +1,81 @@
+From 59923ad85d1a1cf2216a4f14649702d24d3f2360 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak@v3.sk>
+Date: Sat, 2 Nov 2019 06:55:54 +0100
+Subject: [PATCH 1/2] iwd: add some missing error handling
+
+g_dbus_object_manager_get_interface() can happily return NULL and we
+need to check for that.
+---
+ src/devices/wifi/nm-iwd-manager.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/devices/wifi/nm-iwd-manager.c b/src/devices/wifi/nm-iwd-manager.c
+index dd1cad480..e83f8063c 100644
+--- a/src/devices/wifi/nm-iwd-manager.c
++++ b/src/devices/wifi/nm-iwd-manager.c
+@@ -136,6 +136,11 @@ agent_dbus_method_cb (GDBusConnection *connection,
+ network = g_dbus_object_manager_get_interface (priv->object_manager,
+ network_path,
+ NM_IWD_NETWORK_INTERFACE);
++ if (!network) {
++ _LOGE ("unable to find the network object");
++ return;
++ }
++
+
+ device_path = get_property_string_or_null (G_DBUS_PROXY (network), "Device");
+ if (!device_path) {
+@@ -260,6 +265,11 @@ register_agent (NMIwdManager *self)
+ "/",
+ NM_IWD_AGENT_MANAGER_INTERFACE);
+
++ if (!agent_manager) {
++ _LOGE ("unable to register the IWD Agent: PSK/8021x Wi-Fi networks may not work");
++ return;
++ }
++
+ /* Register our agent */
+ g_dbus_proxy_call (G_DBUS_PROXY (agent_manager),
+ "RegisterAgent",
+--
+2.20.1
+
+
+From 186d22a9634e2bf94658ed6f1cf2b332ecb3a32c Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak@v3.sk>
+Date: Sat, 2 Nov 2019 07:01:28 +0100
+Subject: [PATCH 2/2] iwd: unbreak iwd-1.0
+
+The upstream apparently thought it's a great idea to change the agent
+manager path. This fixes things for those unfortunate enough to run
+IWD.
+---
+ src/devices/wifi/nm-iwd-manager.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/src/devices/wifi/nm-iwd-manager.c b/src/devices/wifi/nm-iwd-manager.c
+index e83f8063c..470cb1c90 100644
+--- a/src/devices/wifi/nm-iwd-manager.c
++++ b/src/devices/wifi/nm-iwd-manager.c
+@@ -262,9 +262,17 @@ register_agent (NMIwdManager *self)
+ GDBusInterface *agent_manager;
+
+ agent_manager = g_dbus_object_manager_get_interface (priv->object_manager,
+- "/",
++ "/net/connman/iwd",
+ NM_IWD_AGENT_MANAGER_INTERFACE);
+
++ if (!agent_manager) {
++ /* IWD prior to 1.0 dated 30 October, 2019 has the agent manager on a
++ * different path. */
++ agent_manager = g_dbus_object_manager_get_interface (priv->object_manager,
++ "/",
++ NM_IWD_AGENT_MANAGER_INTERFACE);
++ }
++
+ if (!agent_manager) {
+ _LOGE ("unable to register the IWD Agent: PSK/8021x Wi-Fi networks may not work");
+ return;
+--
+2.20.1
+
diff --git a/net-libs/libnm-glib/files/libnm-glib-data-fix-the-ID_NET_DRIVER-udev-rule.patch b/net-libs/libnm-glib/files/libnm-glib-data-fix-the-ID_NET_DRIVER-udev-rule.patch
new file mode 100644
index 00000000..1b94ab47
--- /dev/null
+++ b/net-libs/libnm-glib/files/libnm-glib-data-fix-the-ID_NET_DRIVER-udev-rule.patch
@@ -0,0 +1,33 @@
+From 27d380b70ea839c7badab420361e4e65e023e8e9 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak@v3.sk>
+Date: Fri, 16 Aug 2019 13:22:09 +0200
+Subject: [PATCH] data: fix the ID_NET_DRIVER udev rule
+
+Systemd v243 is complaining about the wrong substitution there. That is
+sort of harmless, because systemd-udevd in that version doesn't need the
+rule anyway. But still fix it, to avoid a warning.
+
+Also, newer udevd's $PATH doesn't include sbin. That is also okay,
+because we don't need the rule to actually work there. But fix it
+anyway.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1740655
+---
+ data/84-nm-drivers.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/data/84-nm-drivers.rules b/data/84-nm-drivers.rules
+index d246ef6ce..e398cb9f2 100644
+--- a/data/84-nm-drivers.rules
++++ b/data/84-nm-drivers.rules
+@@ -7,6 +7,6 @@ ACTION!="add|change", GOTO="nm_drivers_end"
+ # Determine ID_NET_DRIVER if there's no ID_NET_DRIVER or DRIVERS (old udev?)
+ ENV{ID_NET_DRIVER}=="?*", GOTO="nm_drivers_end"
+ DRIVERS=="?*", GOTO="nm_drivers_end"
+-PROGRAM="/bin/sh -c 'ethtool -i $1 | sed -n s/^driver:\ //p' -- $env{INTERFACE}", RESULT=="?*", ENV{ID_NET_DRIVER}="%c"
++PROGRAM="/bin/sh -c '/usr/sbin/ethtool -i $$1 |/usr/bin/sed -n s/^driver:\ //p' -- $env{INTERFACE}", ENV{ID_NET_DRIVER}="%c"
+
+ LABEL="nm_drivers_end"
+--
+2.21.0
+
diff --git a/net-libs/libnm-glib/libnm-glib-1.18.8.ebuild b/net-libs/libnm-glib/libnm-glib-1.18.8.ebuild
new file mode 100644
index 00000000..f7905959
--- /dev/null
+++ b/net-libs/libnm-glib/libnm-glib-1.18.8.ebuild
@@ -0,0 +1,225 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+GNOME_ORG_MODULE="NetworkManager"
+GNOME2_LA_PUNT="yes"
+VALA_USE_DEPEND="vapigen"
+PYTHON_COMPAT=( python{3_6,3_7} )
+
+inherit gnome2 meson multilib python-any-r1 vala udev multilib-minimal
+
+DESCRIPTION="NetworkManager client library (legacy)"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
+
+IUSE="elogind gnutls +introspection +minimal +nss systemd vala"
+RESTRICT="test"
+
+REQUIRED_USE="
+ vala? ( introspection )
+ || ( nss gnutls )
+ ?? ( systemd elogind )
+ minimal? ( !vala )
+"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+# gobject-introspection-0.10.3 is needed due to gnome bug 642300
+# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
+COMMON_DEPEND="
+ >=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
+ >=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
+ >=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
+ net-libs/libndp[${MULTILIB_USEDEP}]
+ sys-apps/util-linux[${MULTILIB_USEDEP}]
+ >=virtual/libudev-175:=[${MULTILIB_USEDEP}]
+ elogind? ( >=sys-auth/elogind-219 )
+ introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
+ nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
+ !nss? ( gnutls? (
+ dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
+ >=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] ) )
+ systemd? ( >=sys-apps/systemd-209:0= )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ !<=net-misc/networkmanager-1.18.6
+"
+
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig
+ introspection? (
+ $(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
+ dev-lang/perl
+ dev-libs/libxslt
+ )
+ vala? ( $(vala_depend) )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-data-fix-the-ID_NET_DRIVER-udev-rule.patch
+ "${FILESDIR}"/1.18.4-iwd1-compat.patch # included in 1.21.3+
+)
+
+python_check_deps() {
+ if use introspection; then
+ has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
+ fi
+}
+
+pkg_setup() {
+ if use introspection; then
+ python-any-r1_pkg_setup
+ fi
+}
+
+src_prepare() {
+ use vala && vala_src_prepare
+ gnome2_src_prepare
+}
+
+multilib_src_configure() {
+ local emesonargs=(
+ -Dmore_asserts="no"
+ -Dmore_logging=false
+ -Dqt=false
+ -Dnetconfig="no"
+ -Ddbus_conf_dir="/etc/dbus-1/system.d"
+ # We need --with-libnm-glib (and dbus-glib dep) as reverse deps are
+ # still not ready for removing that lib, bug #665338
+ -Dlibnm_glib=true
+ -Dnmcli=false
+ -Dudev_dir="$(get_udevdir)"
+ -Dconfig_plugins_default="keyfile"
+ -Diptables="/sbin/iptables"
+ -Debpf="true"
+ -Dconcheck=false
+ -Dcrypto="$(usex nss nss gnutls)"
+ -Dsession_tracking_consolekit=false
+ -Dsession_tracking="$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind no))"
+ # There is no off switch, use elogind be default.
+ -Dsuspend_resume="$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))"
+ -Dlibaudit="no"
+ -Dbluez5_dun=false
+ -Ddhclient="no"
+ -Ddhcpcd="no"
+ -Dintrospection=$(multilib_native_usex introspection true false)
+ -Djson_validation=false
+ -Dppp=false
+ -Dlibpsl=false
+ -Dmodem_manager=false
+ -Dnmtui=false
+ -Dofono=false
+ -Dovs=false
+ -Dpolkit=false
+ -Dpolkit_agent=false
+ -Dresolveconf="no"
+ -Dselinux=false
+ -Dsystemd_journal=false
+ -Dteamdctl=false
+ -Dtests="no"
+ -Dvapi="$(multilib_native_usex vala true false)"
+ -Dvalgrind="no"
+ -Diwd=false
+ -Dwext=false
+ -Dwifi=false
+ )
+
+ if use systemd; then
+ emesonargs+=( -Dsystemdsystemunitdir="$(systemd_get_systemunitdir)" )
+ else
+ emesonargs+=( -Dsystemdsystemunitdir="no" )
+ fi
+
+ if multilib_is_native_abi; then
+ # work-around man out-of-source brokenness, must be done before configure
+ ln -s "${S}/docs" docs || die
+ ln -s "${S}/man" man || die
+ fi
+
+ meson_src_configure
+}
+
+multilib_src_compile() {
+ # Main library targets
+ local targets=(
+ libnm-util/libnm-util.so.2.7.0
+ libnm-glib/libnm-glib.so.4.9.0
+ libnm-glib/libnm-glib-vpn.so.1.2.0
+ )
+
+ # Extra bits
+ if ! use minimal; then
+ if multilib_is_native_abi; then
+ targets+=(
+ libnm-util/NetworkManager-1.0.gir
+ libnm-util/NetworkManager-1.0.typelib
+ libnm-glib/NMClient-1.0.gir
+ libnm-glib/NMClient-1.0.typelib
+ )
+
+ if use vala; then
+ targets+=(
+ vapi/libnm-glib.vapi
+ vapi/libnm-util.vapi
+ )
+ fi
+ fi
+ fi
+
+ meson_src_compile "${targets[@]}"
+}
+
+# Since meson_src_install will try to compile everything
+# lets just manually install the files.
+multilib_src_install() {
+ # Install extra bits.
+ if ! use minimal; then
+ if multilib_is_native_abi; then
+ dodir "/usr/$(get_libdir)/girepository-1.0"
+ insinto "/usr/$(get_libdir)/girepository-1.0"
+ doins libnm-util/NetworkManager-*.typelib
+ doins libnm-glib/NMClient-*.typelib
+
+ dodir "/usr/share/gir-1.0"
+ insinto "/usr/share/gir-1.0"
+ doins libnm-util/NetworkManager-*.gir
+ doins libnm-glib/NMClient-*.gir
+
+ if use vala; then
+ dodir "/usr/share/vala/vapi"
+ insinto "/usr/share/vala/vapi"
+ doins vapi/libnm-*
+ fi
+ fi
+
+ # Install headers
+ dodir "/usr/include/libnm-glib"
+ insinto "/usr/include/libnm-glib"
+ doins libnm-glib/nm-glib-enum-types.h
+ doins "${S}"/libnm-glib/*.h
+
+ dodir "/usr/include/NetworkManager"
+ insinto "/usr/include/NetworkManager"
+ doins libnm-util/nm-utils-enum-types.h
+ doins "${S}"/libnm-util/*.h
+
+ # Install pkgconfig files
+ dodir "/usr/$(get_libdir)/pkgconfig"
+ insinto "/usr/$(get_libdir)/pkgconfig"
+ doins meson-private/NetworkManager*.pc
+ doins meson-private/libnm-*.pc
+ fi
+
+ # Remove this, or dolib won't be happy.
+ rm -rf libnm-glib/libnm-*.p
+ rm -rf libnm-util/libnm-*.p
+
+ # Install libraries
+ dolib libnm-glib/libnm-*.so*
+ dolib libnm-util/libnm-*.so*
+}