Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

FL-364: networkmanager object-api.h fix

  • Loading branch information...
commit 93deba3674819448811a799b515eb17830138677 1 parent ddb6d08
Oleg angryvincent authored
28 net-misc/networkmanager/files/networkmanager-0.9.6.4-object-api.h.patch
... ... @@ -0,0 +1,28 @@
  1 +From 527f55420fb16c5525e12178ddd8b7568dceb0e2 Mon Sep 17 00:00:00 2001
  2 +From: Alexandre Rostovtsev <tetromino@gentoo.org>
  3 +Date: Wed, 23 Jan 2013 23:00:37 -0500
  4 +Subject: [PATCH] netlink: do not include object-api.h
  5 +
  6 +It's no longer installed by libnl-3.0 >= 3.2.20
  7 +
  8 +https://bugzilla.gnome.org/show_bug.cgi?id=692423
  9 +---
  10 + src/nm-netlink-monitor.c | 2 +-
  11 + 1 file changed, 1 insertion(+), 1 deletion(-)
  12 +
  13 +diff --git a/src/nm-netlink-monitor.c b/src/nm-netlink-monitor.c
  14 +index 29a21e3..84f9386 100644
  15 +--- a/src/nm-netlink-monitor.c
  16 ++++ b/src/nm-netlink-monitor.c
  17 +@@ -38,7 +38,7 @@
  18 + #include <linux/if.h>
  19 + #include <linux/unistd.h>
  20 + #include <unistd.h>
  21 +-#include <netlink/object-api.h>
  22 ++#include <netlink/object.h>
  23 + #include <netlink/route/addr.h>
  24 + #include <netlink/route/rtnl.h>
  25 +
  26 +--
  27 +1.8.1.1
  28 +
228 net-misc/networkmanager/networkmanager-0.9.6.4-r5.ebuild
... ... @@ -0,0 +1,228 @@
  1 +# Distributed under the terms of the GNU General Public License v2
  2 +
  3 +EAPI="4"
  4 +GNOME_ORG_MODULE="NetworkManager"
  5 +VALA_MIN_API_VERSION="0.18"
  6 +VALA_USE_DEPEND="vapigen"
  7 +
  8 +inherit autotools eutils gnome.org linux-info systemd user toolchain-funcs vala
  9 +
  10 +DESCRIPTION="Network configuration and management in an easy way. Desktop environment independent."
  11 +HOMEPAGE="http://www.gnome.org/projects/NetworkManager/"
  12 +
  13 +LICENSE="GPL-2+"
  14 +SLOT="0"
  15 +IUSE="avahi bluetooth connection-sharing consolekit dhclient +dhcpcd doc gnutls +introspection kernel_linux +nss modemmanager policykit ppp resolvconf systemd vala +wext wimax"
  16 +KEYWORDS="*"
  17 +
  18 +REQUIRED_USE="
  19 + modemmanager? ( ppp )
  20 + ^^ ( nss gnutls )
  21 + ^^ ( dhclient dhcpcd )
  22 + consolekit? ( !systemd )
  23 + systemd? ( !consolekit )"
  24 +
  25 +# gobject-introspection-0.10.3 is needed due to gnome bug 642300
  26 +# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
  27 +# libnl:1.1 is needed for linking to net-wireless/wimax libraries
  28 +# XXX: on bump, check that net-wireless/wimax is still using libnl:1.1 !
  29 +# TODO: Qt support?
  30 +COMMON_DEPEND=">=sys-apps/dbus-1.2
  31 + >=dev-libs/dbus-glib-0.94
  32 + virtual/udev[gudev]
  33 + >=dev-libs/glib-2.26
  34 + policykit? ( >=sys-auth/polkit-0.97 )
  35 + >=net-libs/libsoup-2.26:2.4
  36 + >=net-wireless/wpa_supplicant-0.7.3-r3[dbus]
  37 + bluetooth? ( >=net-wireless/bluez-4.82 )
  38 + avahi? ( net-dns/avahi[autoipd] )
  39 + gnutls? (
  40 + dev-libs/libgcrypt
  41 + net-libs/gnutls )
  42 + nss? ( >=dev-libs/nss-3.11 )
  43 + dhclient? ( net-misc/dhcp[client] )
  44 + dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
  45 + introspection? ( >=dev-libs/gobject-introspection-0.10.3 )
  46 + ppp? ( >=net-dialup/ppp-2.4.5 )
  47 + resolvconf? ( net-dns/openresolv )
  48 + connection-sharing? (
  49 + net-dns/dnsmasq
  50 + net-firewall/iptables )
  51 + wimax? (
  52 + dev-libs/libnl:1.1
  53 + >=net-wireless/wimax-1.5.1 )
  54 + !wimax? ( dev-libs/libnl:3 )"
  55 +
  56 +RDEPEND="${COMMON_DEPEND}
  57 + modemmanager? ( >=net-misc/modemmanager-0.4 )
  58 + systemd? ( >=sys-apps/systemd-31 )
  59 + consolekit? ( sys-auth/consolekit )
  60 + net-wireless/rfkill
  61 + =dev-lang/python-3*"
  62 +
  63 +# addwifi script requires rfkill and python ^^^
  64 +
  65 +DEPEND="${COMMON_DEPEND}
  66 + virtual/pkgconfig
  67 + >=dev-util/intltool-0.40
  68 + >=sys-devel/gettext-0.17
  69 + >=sys-kernel/linux-headers-2.6.29
  70 + doc? ( >=dev-util/gtk-doc-1.8 )
  71 + vala? ( $(vala_depend) )"
  72 +
  73 +sysfs_deprecated_check() {
  74 + ebegin "Checking for SYSFS_DEPRECATED support"
  75 +
  76 + if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
  77 + eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
  78 + eerror "or NetworkManager will not work correctly."
  79 + eerror "See http://bugs.gentoo.org/333639 for more info."
  80 + die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
  81 + fi
  82 + eend $?
  83 +}
  84 +
  85 +pkg_pretend() {
  86 + if use kernel_linux; then
  87 + get_version
  88 + if linux_config_exists; then
  89 + sysfs_deprecated_check
  90 + else
  91 + ewarn "Was unable to determine your kernel .config"
  92 + ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
  93 + ewarn "See http://bugs.gentoo.org/333639 for more info."
  94 + fi
  95 +
  96 + fi
  97 +}
  98 +
  99 +pkg_setup() {
  100 + enewgroup plugdev
  101 +}
  102 +
  103 +src_prepare() {
  104 + # Don't build tests
  105 + epatch "${FILESDIR}/${PN}-0.9_rc3-fix-tests.patch"
  106 + # Build against libnl:1.1 for net-wireless/wimax-1.5.2 compatibility
  107 + epatch "${FILESDIR}/${PN}-0.9.4.0-force-libnl1.1-r1.patch"
  108 + # Bug #402085, https://bugzilla.gnome.org/show_bug.cgi?id=387832
  109 + epatch "${FILESDIR}/${PN}-0.9.2.0-pre-sleep.patch"
  110 + # Bug #335147, https://bugzilla.gnome.org/show_bug.cgi?id=679428
  111 + epatch "${FILESDIR}/${PN}-0.9.4.0-dhclient-ipv6.patch"
  112 + # https://bugzilla.gnome.org/show_bug.cgi?id=683932
  113 + epatch "${FILESDIR}/${PN}-0.9.6.0-daemon-signals.patch"
  114 + # FL-364, #453736
  115 + epatch "${FILESDIR}/${PN}-0.9.6.4-object-api.h.patch"
  116 +
  117 + epatch_user
  118 +
  119 + use vala && vala_src_prepare
  120 + eautoreconf
  121 + default
  122 +}
  123 +
  124 +src_configure() {
  125 + local udevdir=/lib/udev
  126 + has_version sys-fs/udev && udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
  127 +
  128 + ECONF="--disable-more-warnings
  129 + --disable-static
  130 + --localstatedir=/var
  131 + --with-distro=gentoo
  132 + --with-dbus-sys-dir=/etc/dbus-1/system.d
  133 + --with-udev-dir=${udevdir}
  134 + --with-iptables=/sbin/iptables
  135 + --enable-concheck
  136 + $(use_enable policykit polkit)
  137 + $(use_enable doc gtk-doc)
  138 + $(use_enable introspection)
  139 + $(use_enable ppp)
  140 + $(use_enable wimax)
  141 + $(use_with dhclient)
  142 + $(use_with dhcpcd)
  143 + $(use_with doc docs)
  144 + $(use_with resolvconf)
  145 + $(use_enable vala)
  146 + $(use_with wext)
  147 + $(use_with wimax libnl-1)
  148 + $(systemd_with_unitdir)"
  149 +
  150 + if use nss ; then
  151 + ECONF="${ECONF} $(use_with nss crypto=nss)"
  152 + else
  153 + ECONF="${ECONF} $(use_with gnutls crypto=gnutls)"
  154 + fi
  155 +
  156 + if use systemd; then
  157 + ECONF="${ECONF} --with-session-tracking=systemd"
  158 + elif use consolekit; then
  159 + ECONF="${ECONF} --with-session-tracking=ck"
  160 + else
  161 + ECONF="${ECONF} --with-session-tracking=none"
  162 + fi
  163 +
  164 + econf ${ECONF}
  165 +}
  166 +
  167 +src_install() {
  168 + default
  169 + # /var/run/NetworkManager is used by some distros, but not by Gentoo
  170 + rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
  171 +
  172 + # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
  173 + keepdir /etc/NetworkManager/dispatcher.d
  174 +
  175 + # Add keyfile plugin support
  176 + keepdir /etc/NetworkManager/system-connections
  177 + chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765
  178 + insinto /etc/NetworkManager
  179 + newins "${FILESDIR}/nm-system-settings.conf-ifnet" NetworkManager.conf
  180 +
  181 + if use policykit; then
  182 + # Allow users in plugdev group to modify system connections
  183 + insinto /usr/share/polkit-1/rules.d/
  184 + doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
  185 + if has_version '<sys-auth/polkit-0.106'; then
  186 + insinto /etc/polkit-1/localauthority/10-vendor.d
  187 + doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.pkla"
  188 + fi
  189 + fi
  190 +
  191 + # Remove useless .la files
  192 + find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
  193 + dosbin ${FILESDIR}/addwifi
  194 +}
  195 +
  196 +pkg_postinst() {
  197 + elog "To modify system network connections without needing to enter the"
  198 + elog "root password, add your user account to the 'plugdev' group."
  199 +
  200 + if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
  201 + ewarn "The ${PN} system configuration file has moved to a new location."
  202 + ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
  203 + ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
  204 + ewarn
  205 + ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
  206 + fi
  207 +
  208 + if use policykit; then
  209 + # The polkit rules file moved to /usr/share
  210 + old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
  211 + if [[ -f "${old_rules}" ]]; then
  212 + case "$(md5sum ${old_rules})" in
  213 + 574d0cfa7e911b1f7792077003060240* )
  214 + # Automatically delete the old rules.d file if the user did not change it
  215 + elog
  216 + elog "Removing old ${old_rules} ..."
  217 + rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
  218 + ;;
  219 + * )
  220 + elog "The ${old_rules}"
  221 + elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
  222 + elog "If you edited ${old_rules}"
  223 + elog "without changing its behavior, you may want to remove it."
  224 + ;;
  225 + esac
  226 + fi
  227 + fi
  228 +}

0 comments on commit 93deba3

Please sign in to comment.
Something went wrong with that request. Please try again.