diff options
author | haarp <main.haarp@gmail.com> | 2016-06-12 14:26:56 +0200 |
---|---|---|
committer | haarp <main.haarp@gmail.com> | 2016-06-12 14:26:56 +0200 |
commit | 69ee95b5db6bd3f9f5e54bc8594efe2290329a5a (patch) | |
tree | 839ab16291316a2012cbf5820110201b3aaf648d | |
parent | Remove turbostat, portage already has it inside sys-apps/linux-misc-apps! (diff) | |
download | haarp-69ee95b5db6bd3f9f5e54bc8594efe2290329a5a.tar.gz haarp-69ee95b5db6bd3f9f5e54bc8594efe2290329a5a.tar.bz2 haarp-69ee95b5db6bd3f9f5e54bc8594efe2290329a5a.zip |
Add Network-Manager 1.2 (what could possibly go wrong?!)
14 files changed, 698 insertions, 0 deletions
diff --git a/gnome-extra/nm-applet/Manifest b/gnome-extra/nm-applet/Manifest new file mode 100644 index 0000000..b11d3a5 --- /dev/null +++ b/gnome-extra/nm-applet/Manifest @@ -0,0 +1,3 @@ +DIST network-manager-applet-1.2.0.tar.xz 1291064 SHA256 934f244fbad1753cca06f456033547023a6f6c3364cf4b97b1b219bfdb981b36 SHA512 3d02cf7434c4d5d89ddac65147937b1e810b4626bdf5421407468b783278b0527f3942db070fd38f17114da6162b6902cecc056c95a6bf61156a8221fef89f5f WHIRLPOOL 9d33517dcc1986a4a851df197f2df3f8421f3f1a3128d88965f59b8597974ef5fd39cc20d0190d90ce43d940ebdf45c1f48292f616e2199d72394bd0fbd14b0d +EBUILD nm-applet-1.2.0.ebuild 1354 SHA256 9a888efd3c39d467c490d30676ca2b5ba0a1a48ba757bdd9615d2a387c70a498 SHA512 ff4a263141e8a8f93915df95d10200a43c43ae6fc60df4c0bb712290a3a2cd4ab19c87506f5bce776b69740aab68915d7f6a99be0a8c9a973b2ac7e130903423 WHIRLPOOL 4e95822d3a0603e120bed0cac78f1f6a93c61516defdb78b7e6c6e2484049daf76d5dbe958c84a18f20a00f58d7fcb1f25aa3abfdb313c2e57a93eee4a68d2eb +MISC metadata.xml 388 SHA256 1aa15a3917a9a32048d1ea89b006a27295f927357ee1f5d5d243395b952885df SHA512 a005d470e0b592d175e31be34a7064c20062a88cb63ec219a6ae8c812b933d2425ef04bd73bf287fcef6a6eab6b2c68af21efca5df90c86f0cb0c256631601c7 WHIRLPOOL 99baceea983aa999f602430ce2d7aa5ba885973bff9da424c55ab7bfe31e696407ad1064ffccd1be3733a95c82802f0131b379926a95b55e9841ecbef40e657a diff --git a/gnome-extra/nm-applet/metadata.xml b/gnome-extra/nm-applet/metadata.xml new file mode 100644 index 0000000..dc2b82d --- /dev/null +++ b/gnome-extra/nm-applet/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>gnome@gentoo.org</email> + <name>Gentoo GNOME Desktop</name> + </maintainer> + <use> + <flag name="modemmanager">Enable support for mobile broadband devices + using <pkg>net-misc/modemmanager</pkg></flag> + </use> +</pkgmetadata> diff --git a/gnome-extra/nm-applet/nm-applet-1.2.0.ebuild b/gnome-extra/nm-applet/nm-applet-1.2.0.ebuild new file mode 100644 index 0000000..fb94855 --- /dev/null +++ b/gnome-extra/nm-applet/nm-applet-1.2.0.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +GCONF_DEBUG="no" +GNOME2_LA_PUNT="yes" +GNOME_ORG_MODULE="network-manager-applet" + +inherit gnome2 + +DESCRIPTION="GNOME applet for NetworkManager" +HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager" + +LICENSE="GPL-2+" +SLOT="0" +IUSE="bluetooth +introspection modemmanager" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" + +RDEPEND=" + app-crypt/libsecret + >=dev-libs/glib-2.32:2[dbus] + >=dev-libs/dbus-glib-0.88 + >=sys-apps/dbus-1.4.1 + >=sys-auth/polkit-0.96-r1 + >=x11-libs/gtk+-3.4:3[introspection?] + >=x11-libs/libnotify-0.7.0 + + app-text/iso-codes + >=net-misc/networkmanager-1.1.0[introspection?] + net-misc/mobile-broadband-provider-info + + bluetooth? ( >=net-wireless/gnome-bluetooth-2.27.6:= ) + introspection? ( >=dev-libs/gobject-introspection-0.9.6:= ) + modemmanager? ( >=net-misc/modemmanager-0.7.990 ) + virtual/freedesktop-icon-theme + virtual/libgudev:= +" +DEPEND="${RDEPEND} + virtual/pkgconfig + >=dev-util/intltool-0.50.1 +" + +PDEPEND="virtual/notification-daemon" #546134 + +src_configure() { + gnome2_src_configure \ + --disable-more-warnings \ + --disable-static \ + --disable-migration \ + --localstatedir=/var \ + $(use_with bluetooth) \ + $(use_enable introspection) \ + $(use_with modemmanager modem-manager-1) +} diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest new file mode 100644 index 0000000..34c7025 --- /dev/null +++ b/net-misc/networkmanager/Manifest @@ -0,0 +1,11 @@ +AUX 01-org.freedesktop.NetworkManager.settings.modify.system.rules 265 SHA256 702e1e702ec633608fd75dfd44f66437896421c9d2d7fe9966df8e4ef1d93a6c SHA512 22dfa5b071891ba16b9a8b90a1964d56e370cb640d78191934ae802e568f92c299b9d4d965f7081fb36a8c09378bfb0b33193b2332cbdc28c6799b152128c214 WHIRLPOOL b89a4069cc973cf55001a5f0028c75a90ce4ea070c4424b5a22f3e9b8e61ee34ff7b06891eb1c6f8fa24735b3e5d98e61f0bfefca7dd12eeb615b83e72225c8b +AUX 10-openrc-status-r4 1182 SHA256 f8ed424818b866a0bf882c569f4484e8b1485ce7ac8c472f060fd877f2dcfe65 SHA512 b1f0cd7eaeb13af9ab1ce192fd3f47e52d505c4ad5a0888af1ad2598701a034231c03f5346441f44443daca84f2089cb68e08c2876396be0e668c484c3d331ec WHIRLPOOL c71c923c293730894a660c8db3371fee2697666388f49947ecc2508b18a0a0d16a72643f34e8a1dadb559743ea1b56a34d3abfd95bced85dc0d753a33d661fb8 +AUX conf.d.NetworkManager 230 SHA256 4594573f01fe5e04b6dde4525796acf909158591bdcefd662ec23fe0d1c3e1bd SHA512 f8c9331834cbc66ab0e4e6f4a120fde6a08a435d680a1e1087718fdbb2b9843a313e7ec30b7008822999dafd98e152aa7d2a96f87320ba9c91c3adb63e0b7c9a WHIRLPOOL 7dbb15bf184e918369187605af91816ed11c460147066ede11f200d73103bb6f7f63ccc7abe7996d485294f44282d6bbd9520cc9e50f04ce41262c9817f7b994 +AUX init.d.NetworkManager 1773 SHA256 5ec8eb35558a8a473a0cb50ff8536364894c516e57f684c0a1319cc5d8018c6c SHA512 f1c4bb10e1f4fb15874f9d720680bcd35c46d91d91f87b18db6b71bc15d0782785fa97c3c7475aa802a9457a39abd4aa32b23a16bf6770d5bba28133443c0ebb WHIRLPOOL d21f35711fd333427037e54d3a89e927591ba008b883d8de83aec9701515b78c310976a068f8db7a3e9daff4cbee29f72ae0f8970f7cbd092bbc43755316ce4f +AUX networkmanager-1.0.10-vpn-routes.patch 2306 SHA256 34e9e27dda9ec37f0c8af5b59b13f5db482501794fcc639921b90d69b6d25d7b SHA512 4eda197790bdf1182467b643d47d495ed84121208d35c448a1b5fa877e6a5f20a80f4c2083f823530051ec62c74fcbd082f587747069251bd9b4dbf9b787fd2a WHIRLPOOL fe18d9be0d9645c6201a25e052e536469cf0e7c4857c571871a55cff00f57771e189e3823c4186bd591b4128431d6fbfef0d990db4c9f944cc570f1e68cea38b +AUX networkmanager-1.0.12-wifi-wext.patch 831 SHA256 6b913b3899abd27522203a22652a97b198788db6bd39191883c961ddac443291 SHA512 fe3197db6a8c1f0ac0df06e9ec62ec377e75ece0fb7be393be26f49462bad5c470015f7c700b1dcfbb61e9832d09250d7c0615c8353bd9d27ddb4feba3aa1af6 WHIRLPOOL ae88bbec0e99ff5cfd4f60a358d05aefe23239924b25e00285f9e352fcf83e3d964b4cafbc21c38c899b6d9a21da0d803e04a2da3aaefefeec6fe16b2447b5a1 +AUX networkmanager-1.0.6-vpn-mtu.patch 2018 SHA256 1a9b4d3674fb5d8cc9d3cbe4fd821dd6cabe757c89118f5ac4465eeacf598a77 SHA512 88309a0ab0d0c3a88d1a2259e52735d3276620c0fb12e01d5f3402549bf74d60520ee5e8b7092635e4e4bafde020393aa8aa3e1b7a16c0264af21ff43e0e3bdf WHIRLPOOL ae563ad8e5f9b7fe058df656002e48c793927fc84daa6b26f2c995677dce4d7e5c5234d034340477c763d96963e7f7a1c31dc91000ed7ba06ea87f680ebcf85e +AUX networkmanager-1.2.0-add-missing-upower-include.patch 290 SHA256 c1bc89d112f7690977797cb89b89a3f9c9af56f861be9d34d727c06dbce532d4 SHA512 3e833f6156baa8307208e4ec70dd8cafc399ff1fe6d14840b346e7311d22398e23295b526cc861aaa75212ebb378f657a46da7ea8731fbbd3f58965929042a79 WHIRLPOOL dab84dd1f33856fb64672b4a627becc2b5b062be5b35ff1f90079fdacdd85cc6164a9e3adaf5a04c92fac98f2f3530f50fa913110165afbe3fb366e32471a28e +DIST NetworkManager-1.2.0.tar.xz 3724700 SHA256 e947cf30fa3d19dce88e6f6af51f06dc282b7db7996f946aaa37b03526ef2a80 SHA512 9539e65ea5f79f97b216e312636849449967af390cc31e2ba5cc94d18ff0716dd9b4dc27d4a59e24868034438b5ff0ec9c0479d4312685e1daa00b299e95a8b4 WHIRLPOOL 1afa56eb0987cd98a8b317dbc685fa306217fbc4bd2310b848758f2a92b6eb800884e08ef01aecb349824c262f8bbdb5f67eb815880dbd6c0e5af1f891ba361b +EBUILD networkmanager-1.2.0.ebuild 12119 SHA256 96325d3b6e9f039c4df73bc64bf4421d5f4756c9da7932f0facf712fd0e2528c SHA512 c7203cc67e721f7d10cb85918124a6e4281423d5d7c4d71392f0bed6c1422ca186ecc950cce01282523695b3cfbeee851c39a399405fc2474896c0e2250c8fa6 WHIRLPOOL fba5fc40293b29029438238521bb5649dc3829949a6ec7a5f5a3e3be70747f3b68f4cca4d4418ab5950dba63e4ca0a1d5627190737d32dfb737d822258526a6d +MISC metadata.xml 1407 SHA256 84d5057bcda9a5ec5e485e3cdd84e6df88de07d3a1d151e7820fa7f5be8eaf2c SHA512 105b963c6516c91bd44b998bbbcbb1af50e9e2f01c27eaf90a84c4754502e7e9b6b1c5950c73cd64af645f7a75828b77360524945e083300c1795e599c3f68db WHIRLPOOL 31456449b93d7e20f6627bde522fe2945aa75e4bc7b3c3a6c7afff3efcd90851e6856f9864787c02584cd9ebfaed7be01707e93f6a6ed126b2d8ea9254800bcd diff --git a/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules new file mode 100644 index 0000000..d00b268 --- /dev/null +++ b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules @@ -0,0 +1,7 @@ +// 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/net-misc/networkmanager/files/10-openrc-status-r4 b/net-misc/networkmanager/files/10-openrc-status-r4 new file mode 100644 index 0000000..e195ccc --- /dev/null +++ b/net-misc/networkmanager/files/10-openrc-status-r4 @@ -0,0 +1,35 @@ +#!/bin/sh +# Copyright (c) 2012 Alexandre Rostovtsev +# Released under the 2-clause BSD license. + +# Ensures that the NetworkManager OpenRC service is marked as started and +# providing net only when it has a successful connection. + +if [ ! -e "/run/openrc/softlevel" ]; then + # OpenRC is not running + exit 0 +fi + +# Ensure rc-service is in PATH +PATH="${PATH}:@EPREFIX@/sbin:@EPREFIX@/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 + +# 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 ;; +esac +exit 0 +# vim: set ts=4: diff --git a/net-misc/networkmanager/files/conf.d.NetworkManager b/net-misc/networkmanager/files/conf.d.NetworkManager new file mode 100644 index 0000000..4a99229 --- /dev/null +++ b/net-misc/networkmanager/files/conf.d.NetworkManager @@ -0,0 +1,4 @@ +# If NetworkManager does not establish a connection within $INACTIVE_TIMEOUT +# seconds after starting, the service will be marked as inactive, and it will +# continue to wait for a connection in background mode. +INACTIVE_TIMEOUT=1 diff --git a/net-misc/networkmanager/files/init.d.NetworkManager b/net-misc/networkmanager/files/init.d.NetworkManager new file mode 100644 index 0000000..bd828b7 --- /dev/null +++ b/net-misc/networkmanager/files/init.d.NetworkManager @@ -0,0 +1,57 @@ +#!/sbin/runscript +# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org> +# Distributed under the terms of the GNU General Purpose License v2 +# $Id$ + +description="NetworkManager daemon. The service is marked as started only \ +when a network connection is established." + +depend() { + need dbus + provide net +} + +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}" +} + +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 +} + +# vim: set ft=gentoo-init-d ts=4 : diff --git a/net-misc/networkmanager/files/networkmanager-1.0.10-vpn-routes.patch b/net-misc/networkmanager/files/networkmanager-1.0.10-vpn-routes.patch new file mode 100644 index 0000000..b7c2be6 --- /dev/null +++ b/net-misc/networkmanager/files/networkmanager-1.0.10-vpn-routes.patch @@ -0,0 +1,51 @@ +From 11aa07ed939193e85516c287a57dee1837242972 Mon Sep 17 00:00:00 2001 +From: Thomas Haller <thaller@redhat.com> +Date: Mon, 4 Jan 2016 18:54:26 +0100 +Subject: core: fix failure to configure routes due to wrong device-route for + IPv4 peer-addresses + +As in the case of a OpenVPN connection, we might add an address like: + 10.8.0.58/32 ptp 10.8.0.57 + +In this case, kernel would automatically add a device-route like: + 10.8.0.57/32 via 0.0.0.0 dev 32 metric 0 mss 0 src rtprot-kernel scope link pref-src 10.8.0.58 + +nm_ip4_config_commit() checks all IP addresses to figure out +the present device-routes. Then the routes are synced by NMRouteManager. +Due to a bug, we would not consider the peer-address, but the local-address +and configure a route 10.8.0.58/32, instead of 10.8.0.57/32. + +That stays mostly unnoticed, because usually the peer and the local-address are +in the same subnet, so that there is no difference (/32 is an example of the +peer-address being in a different subnet). + +It also seems that due to a bug fixed by df4e5357521 this issue didn't surface. +Probably because we would not notice the 10.8.0.57/32 right away and thus +nm_route_manager_ip4_route_sync() would not wrongly delete it. + +https://bugzilla.gnome.org/show_bug.cgi?id=759892 + +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809195 +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809494 +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809526 +https://bugs.archlinux.org/task/47535 +https://bugzilla.redhat.com/show_bug.cgi?id=1294309 +https://mail.gnome.org/archives/networkmanager-list/2015-December/msg00059.html + +diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c +index f625d35..61e29af 100644 +--- a/src/nm-ip4-config.c ++++ b/src/nm-ip4-config.c +@@ -298,7 +298,8 @@ nm_ip4_config_commit (const NMIP4Config *config, int ifindex, gboolean routes_fu + + route.ifindex = ifindex; + route.source = NM_IP_CONFIG_SOURCE_KERNEL; +- route.network = nm_utils_ip4_address_clear_host_address (addr->address, addr->plen); ++ route.network = nm_utils_ip4_address_clear_host_address (addr->peer_address ? : addr->address, ++ addr->plen); + route.plen = addr->plen; + route.pref_src = addr->address; + route.metric = default_route_metric; +-- +cgit v0.10.2 + diff --git a/net-misc/networkmanager/files/networkmanager-1.0.12-wifi-wext.patch b/net-misc/networkmanager/files/networkmanager-1.0.12-wifi-wext.patch new file mode 100644 index 0000000..124cafe --- /dev/null +++ b/net-misc/networkmanager/files/networkmanager-1.0.12-wifi-wext.patch @@ -0,0 +1,24 @@ +From 70c0defe753bc98ac75725cc32a84b36f32258e4 Mon Sep 17 00:00:00 2001 +From: Francesco Giudici <fgiudici@redhat.com> +Date: Fri, 11 Mar 2016 09:55:39 +0100 +Subject: wifi: hack for wext devices reporting IW_MODE_AUTO configuration + mode. + +https://bugzilla.gnome.org/show_bug.cgi?id=763388 +(cherry picked from commit 0f6febc6fbeafde62e6e0a8c12f57204d94166fb) + +diff --git a/src/platform/wifi/wifi-utils-wext.c b/src/platform/wifi/wifi-utils-wext.c +index 470b73d..14a16ec 100644 +--- a/src/platform/wifi/wifi-utils-wext.c ++++ b/src/platform/wifi/wifi-utils-wext.c +@@ -122,6 +122,7 @@ wifi_wext_get_mode (WifiData *data) + case IW_MODE_MASTER: + return NM_802_11_MODE_AP; + case IW_MODE_INFRA: ++ case IW_MODE_AUTO: /* hack for WEXT devices reporting IW_MODE_AUTO */ + return NM_802_11_MODE_INFRA; + default: + break; +-- +cgit v0.10.2 + diff --git a/net-misc/networkmanager/files/networkmanager-1.0.6-vpn-mtu.patch b/net-misc/networkmanager/files/networkmanager-1.0.6-vpn-mtu.patch new file mode 100644 index 0000000..6159972 --- /dev/null +++ b/net-misc/networkmanager/files/networkmanager-1.0.6-vpn-mtu.patch @@ -0,0 +1,53 @@ +From 105e30efbaf422401902575749efdcd18706ace1 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel <lkundrak@v3.sk> +Date: Mon, 28 Sep 2015 20:57:09 +0200 +Subject: vpn-connection: set the MTU for the VPN IP interface + +The 9b79e6c73 commit moved setting of the MTU from IP4Config to NMDevice, but +VPN connections don't have a NMDevice instance (yet). Set the MTU also from the +VPN connection. Also, copying of the MTU to the IP4Config is no longer needed +as the ip4_config_commit no longer sets the MTU. + +Fixes: 9b79e6c732ffb2fb105647c1465070d36a6cc180 + +https://bugzilla.gnome.org/show_bug.cgi?id=754781 +(cherry picked from commit e0fa48f224abcb73a1a129f10050f7cd942ee629) + +diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c +index f0e6149..e2d3103 100644 +--- a/src/vpn-manager/nm-vpn-connection.c ++++ b/src/vpn-manager/nm-vpn-connection.c +@@ -980,6 +980,9 @@ nm_vpn_connection_apply_config (NMVpnConnection *connection) + TRUE)) + return FALSE; + } ++ ++ if (priv->mtu && priv->mtu != nm_platform_link_get_mtu (NM_PLATFORM_GET, priv->ip_ifindex)) ++ nm_platform_link_set_mtu (NM_PLATFORM_GET, priv->ip_ifindex, priv->mtu); + } + + apply_parent_device_config (connection); +@@ -1149,10 +1152,6 @@ process_generic_config (NMVpnConnection *connection, + } + } + +- /* MTU; this is a per-connection value, though NM's API treats it +- * like it's IP4-specific. So we store it for now and retrieve it +- * later in ip4_config_get. +- */ + priv->mtu = 0; + val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_CONFIG_MTU); + if (val) { +@@ -1328,9 +1327,6 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy, + if (val) + nm_ip4_config_set_mss (config, g_value_get_uint (val)); + +- if (priv->mtu) +- nm_ip4_config_set_mtu (config, priv->mtu, NM_IP_CONFIG_SOURCE_VPN); +- + val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_IP4_CONFIG_DOMAIN); + if (val) + nm_ip4_config_add_domain (config, g_value_get_string (val)); +-- +cgit v0.10.2 + diff --git a/net-misc/networkmanager/files/networkmanager-1.2.0-add-missing-upower-include.patch b/net-misc/networkmanager/files/networkmanager-1.2.0-add-missing-upower-include.patch new file mode 100644 index 0000000..465dd33 --- /dev/null +++ b/net-misc/networkmanager/files/networkmanager-1.2.0-add-missing-upower-include.patch @@ -0,0 +1,12 @@ +https://mail.gnome.org/archives/networkmanager-list/2016-May/msg00053.html + +--- a/src/nm-sleep-monitor-upower.c ++++ b/src/nm-sleep-monitor-upower.c +@@ -24,6 +24,7 @@ + #include <sys/stat.h> + + #include "nm-core-internal.h" ++#include "NetworkManagerUtils.h" + + #include "nm-sleep-monitor.h" + diff --git a/net-misc/networkmanager/metadata.xml b/net-misc/networkmanager/metadata.xml new file mode 100644 index 0000000..420c24a --- /dev/null +++ b/net-misc/networkmanager/metadata.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>gnome@gentoo.org</email> + <name>Gentoo GNOME Desktop</name> + </maintainer> + <use> + <flag name="connection-sharing">Use <pkg>net-dns/dnsmasq</pkg> and + <pkg>net-firewall/iptables</pkg> for connection sharing</flag> + <flag name="consolekit">Use <pkg>sys-auth/consolekit</pkg> for session + tracking</flag> + <flag name="dhclient">Use dhclient from <pkg>net-misc/dhcp</pkg> for + getting ip</flag> + <flag name="dhcpcd">Use <pkg>net-misc/dhcpcd</pkg> for getting ip</flag> + <flag name="modemmanager">Enable support for mobile broadband devices + using <pkg>net-misc/modemmanager</pkg></flag> + <flag name="nss">Use <pkg>dev-libs/nss</pkg> for cryptography</flag> + <flag name="ppp">Enable support for mobile broadband and PPPoE + connections using <pkg>net-dialup/ppp</pkg></flag> + <flag name="resolvconf">Use <pkg>net-dns/openresolv</pkg> for managing + DNS information</flag> + <flag name="teamd">Enable Teamd control support</flag> + <flag name="wifi">Enable support for wifi and 802.1x security using + <pkg>net-wireless/wpa_supplicant</pkg></flag> + <flag name="wext">Enable support for the deprecated Wext (Wireless + Extensions) API; needed for some older drivers (e.g. ipw2200, + ndiswrapper)</flag> + </use> +</pkgmetadata> diff --git a/net-misc/networkmanager/networkmanager-1.2.0.ebuild b/net-misc/networkmanager/networkmanager-1.2.0.ebuild new file mode 100644 index 0000000..0efc1cd --- /dev/null +++ b/net-misc/networkmanager/networkmanager-1.2.0.ebuild @@ -0,0 +1,344 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +GCONF_DEBUG="no" +GNOME_ORG_MODULE="NetworkManager" +GNOME2_LA_PUNT="yes" +VALA_USE_DEPEND="vapigen" +PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} ) + +inherit autotools bash-completion-r1 eutils gnome2 linux-info multilib python-any-r1 systemd \ + user readme.gentoo toolchain-funcs vala versionator virtualx udev multilib-minimal + +DESCRIPTION="A set of co-operative tools that make networking simple and straightforward" +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="bluetooth connection-sharing consolekit +dhclient dhcpcd gnutls +introspection \ +kernel_linux +nss +modemmanager ncurses +ppp resolvconf selinux systemd teamd test \ +vala +wext +wifi zeroconf" # wimax + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" + +REQUIRED_USE=" + modemmanager? ( ppp ) + wext? ( wifi ) + ^^ ( nss gnutls ) + ^^ ( dhclient dhcpcd ) +" + +# gobject-introspection-0.10.3 is needed due to gnome bug 642300 +# wpa_supplicant-0.7.3-r3 is needed due to bug 359271 +# TODO: Qt support? +COMMON_DEPEND=" + >=sys-apps/dbus-1.2[${MULTILIB_USEDEP}] + >=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}] + >=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}] + >=dev-libs/libnl-3.2.8:3= + >=sys-auth/polkit-0.106 + net-libs/libndp + >=net-libs/libsoup-2.40:2.4= + net-misc/iputils + sys-libs/readline:0 + >=virtual/libgudev-165:=[${MULTILIB_USEDEP}] + bluetooth? ( >=net-wireless/bluez-5 ) + connection-sharing? ( + net-dns/dnsmasq[dhcp] + net-firewall/iptables ) + gnutls? ( + dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}] + net-libs/gnutls:=[${MULTILIB_USEDEP}] ) + modemmanager? ( >=net-misc/modemmanager-0.7.991 ) + ncurses? ( >=dev-libs/newt-0.52.15 ) + nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] ) + dhclient? ( >=net-misc/dhcp-4[client] ) + dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 ) + introspection? ( >=dev-libs/gobject-introspection-0.10.3:= ) + ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] net-dialup/rp-pppoe ) + resolvconf? ( net-dns/openresolv ) + systemd? ( >=sys-apps/systemd-209:0= ) + !systemd? ( || ( sys-power/upower sys-power/upower-pm-utils ) ) + teamd? ( >=net-misc/libteam-1.9 ) + zeroconf? ( net-dns/avahi:=[autoipd] ) +" +RDEPEND="${COMMON_DEPEND} + consolekit? ( sys-auth/consolekit ) + wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] ) +" +DEPEND="${COMMON_DEPEND} + dev-util/gdbus-codegen + dev-util/gtk-doc-am + >=dev-util/intltool-0.40 + >=sys-devel/gettext-0.17 + >=sys-kernel/linux-headers-2.6.29 + virtual/pkgconfig + vala? ( $(vala_depend) ) + test? ( + $(python_gen_any_dep ' + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-python/pygobject:2[${PYTHON_USEDEP}]') + ) +" + +sysfs_deprecated_check() { + ebegin "Checking for SYSFS_DEPRECATED support" + + if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then + eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel" + eerror "or NetworkManager will not work correctly." + eerror "See https://bugs.gentoo.org/333639 for more info." + die "CONFIG_SYSFS_DEPRECATED_V2 support detected!" + fi + eend $? +} + +pkg_pretend() { + if use kernel_linux; then + get_version + if linux_config_exists; then + sysfs_deprecated_check + else + ewarn "Was unable to determine your kernel .config" + ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly." + ewarn "See https://bugs.gentoo.org/333639 for more info." + fi + + fi +} + +pkg_setup() { + enewgroup plugdev +} + +src_prepare() { + DOC_CONTENTS="To modify system network connections without needing to enter the + root password, add your user account to the 'plugdev' group." + + epatch "${FILESDIR}/${PN}-1.2.0-add-missing-upower-include.patch" + + # Force use of /run, avoid eautoreconf, upstream bug #737139, fixed in 'master' + sed -e 's:$localstatedir/run/:/run/:' -i configure || die + + # Don't build examples, they are not needed and can cause build failure + sed -e '/^\s*examples\s*\\/d' -i Makefile.{am,in} || die + + use vala && vala_src_prepare + epatch_user # don't remove, users often want custom patches for NM + eautoreconf + gnome2_src_prepare +} + +multilib_src_configure() { + local myconf=() + + # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986 + if use ppp; then + local PPPD_VER=`best_version net-dialup/ppp` + PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR} + PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision + myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} ) + fi + + # unit files directory needs to be passed only when systemd is enabled, + # otherwise systemd support is not disabled completely, bug #524534 + use systemd && myconf+=( "$(systemd_with_unitdir)" ) + + if multilib_is_native_abi; then + # work-around man out-of-source brokenness, must be done before configure + mkdir man || die + find "${S}"/man -name '*.?' -exec ln -s {} man/ ';' || die + else + # libnl, libndp are only used for executables, not libraries + myconf+=( LIB{NL,NDP}_{CFLAGS,LIBS}=' ' ) + fi + + # TODO: enable wimax when we have a libnl:3 compatible revision of it + # wimax will be removed, bug #522822 + # ifnet plugin always disabled until someone volunteers to actively + # maintain and fix it + ECONF_SOURCE=${S} \ + gnome2_src_configure \ + --disable-more-warnings \ + --disable-static \ + --localstatedir=/var \ + --disable-lto \ + --disable-config-plugin-ibft \ + --disable-ifnet \ + --without-netconfig \ + --with-dbus-sys-dir=/etc/dbus-1/system.d \ + --with-udev-dir="$(get_udevdir)" \ + --with-config-plugins-default=keyfile \ + --with-iptables=/sbin/iptables \ + $(multilib_native_with libsoup) \ + $(multilib_native_enable concheck) \ + --with-crypto=$(usex nss nss gnutls) \ + --with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit no)) \ + --with-suspend-resume=$(multilib_native_usex systemd systemd upower) \ + $(multilib_native_use_enable bluetooth bluez5-dun) \ + $(multilib_native_use_enable introspection) \ + $(multilib_native_use_enable ppp) \ + --disable-wimax \ + $(use_with dhclient) \ + $(use_with dhcpcd) \ + $(multilib_native_use_with modemmanager modem-manager-1) \ + $(multilib_native_use_with ncurses nmtui) \ + $(multilib_native_use_with resolvconf) \ + $(multilib_native_use_with selinux) \ + $(multilib_native_use_enable teamd teamdctl) \ + $(multilib_native_use_enable test tests) \ + $(multilib_native_use_enable vala) \ + --without-valgrind \ + $(multilib_native_use_with wext) \ + $(multilib_native_use_enable wifi) \ + "${myconf[@]}" + + # work-around gtk-doc out-of-source brokedness + if multilib_is_native_abi; then + local d + for d in api libnm libnm-util libnm-glib; do + ln -s "${S}"/docs/${d}/html docs/${d}/html || die + done + fi +} + +multilib_src_compile() { + if multilib_is_native_abi; then + emake + else + emake all-am + #emake -C include + emake -C introspection # generated headers, needed for libnm + emake -C libnm-core + emake -C libnm + emake -C libnm-util + emake -C libnm-glib + fi +} + +multilib_src_test() { + if multilib_is_native_abi; then + python_setup + Xemake check + fi +} + +multilib_src_install() { + if multilib_is_native_abi; then + # Install completions at proper place, bug #465100 + gnome2_src_install completiondir="$(get_bashcompdir)" + else + emake DESTDIR="${D}" install-am + #emake DESTDIR="${D}" install -C include + emake DESTDIR="${D}" install -C introspection + emake DESTDIR="${D}" install -C libnm-core + emake DESTDIR="${D}" install -C libnm + emake DESTDIR="${D}" install -C libnm-util + emake DESTDIR="${D}" install -C libnm-glib + fi +} + +multilib_src_install_all() { + ! use systemd && readme.gentoo_create_doc + + newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager + newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager + + # /var/run/NetworkManager is used by some distros, but not by Gentoo + rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed" + rmdir -v "${ED}/var/run" || die "rmdir failed" + + # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts + keepdir /etc/NetworkManager/dispatcher.d + + # Provide openrc net dependency only when nm is connected + exeinto /etc/NetworkManager/dispatcher.d + newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status + sed -e "s:@EPREFIX@:${EPREFIX}:g" \ + -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die + + keepdir /etc/NetworkManager/system-connections + chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594 + + # Allow users in plugdev group to modify system connections + insinto /usr/share/polkit-1/rules.d/ + doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules" +} + +pkg_postinst() { + gnome2_pkg_postinst + ! use systemd && readme.gentoo_print_elog + + if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then + ewarn "The ${PN} system configuration file has moved to a new location." + ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf" + ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf" + ewarn + ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf" + fi + + # The polkit rules file moved to /usr/share + old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules" + if [[ -f "${old_rules}" ]]; then + case "$(md5sum ${old_rules})" in + 574d0cfa7e911b1f7792077003060240* ) + # Automatically delete the old rules.d file if the user did not change it + elog + elog "Removing old ${old_rules} ..." + rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually" + ;; + * ) + elog "The ${old_rules}" + elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4" + elog "If you edited ${old_rules}" + elog "without changing its behavior, you may want to remove it." + ;; + esac + fi + + # ifnet plugin was disabled for systemd users with 0.9.8.6 version + # and for all people with 0.9.10.0-r1 (see ChangeLog for full explanations) + if use systemd; then + if ! version_is_at_least 0.9.8.6 ${REPLACING_VERSIONS}; then + ewarn "Ifnet plugin won't be used with systemd support enabled" + ewarn "as it is meant to be used with openRC and can cause collisions" + ewarn "(like bug #485658)." + ewarn "Because of this, you will likely need to reconfigure some of" + ewarn "your networks. To do this you can rely on Gnome control center," + ewarn "nm-connection-editor or nmtui tools for example once updated" + ewarn "NetworkManager version is installed." + fi + else + if ! version_is_at_least 0.9.10.0-r1 ${REPLACING_VERSIONS}; then + ewarn "Ifnet plugin is now disabled because of it being unattended" + ewarn "and unmaintained for a long time, leading to some unfixed bugs" + ewarn "and new problems appearing. We will now use upstream 'keyfile'" + ewarn "plugin." + ewarn "Because of this, you will likely need to reconfigure some of" + ewarn "your networks. To do this you can rely on Gnome control center," + ewarn "nm-connection-editor or nmtui tools for example once updated" + ewarn "NetworkManager version is installed." + fi + fi + + # NM fallbacks to plugin specified at compile time (upstream bug #738611) + # but still show a warning to remember people to have cleaner config file + if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then + if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then + ewarn + ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf" + ewarn "Since it won't be used, you will need to stop setting ifnet plugin there." + ewarn + fi + fi + + # NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457 + if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then + ewarn "You have psk-flags=1 setting in above files, you will need to" + ewarn "either reconfigure affected networks or, at least, set the flag" + ewarn "value to '0'." + fi +} |