summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-02-15 16:54:30 +0100
committerThomas Haller <thaller@redhat.com>2018-02-21 12:08:46 +0100
commitf7c4b25df4abd7f14f0454c06cc3d068fc5ef114 (patch)
tree10b1126c6515fcba999be38aaeefcd42a699816c /contrib
parent84898b6f8fa96444d4cca786883d46c439259230 (diff)
netlink: drop libnl3 dependency
From libnl3, we only used the helper function to parse/generate netlink messages and the socket functions to send/receive messages. We don't need an external dependency to do that, it is simple enough. Drop the libnl3 dependency, and replace all missing code by directly copying it from libnl3 sources. At this point, I mostly tried to import the required bits to make it working with few modifications. Note that this increases the binary size of NetworkManager by 4736 bytes for contrib/rpm build on x86_64. In the future, we can simplify the code further. A few modifications from libnl3 are: - netlink errors NLE_* are now in the domain or regular errno. The distinction of having to bother with two kinds of error number domains was annoying. - parts of the callback handling is copied partially and unused parts are dropped. Especially, the verbose/debug handlers are not used. In following commits, the callback handling will be significantly simplified. - the complex handling of seleting ports was simplified. We now always let kernel choose the right port automatically.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/fedora/REQUIRED_PACKAGES1
-rwxr-xr-xcontrib/fedora/nm-live-vm/build.sh2
-rw-r--r--contrib/fedora/rpm/NetworkManager.spec2
3 files changed, 1 insertions, 4 deletions
diff --git a/contrib/fedora/REQUIRED_PACKAGES b/contrib/fedora/REQUIRED_PACKAGES
index a63a4196b..27606d194 100644
--- a/contrib/fedora/REQUIRED_PACKAGES
+++ b/contrib/fedora/REQUIRED_PACKAGES
@@ -30,7 +30,6 @@ yum install \
jansson-devel \
libcurl-devel \
libndp-devel \
- libnl3-devel \
libpsl-devel \
libselinux-devel \
libtool \
diff --git a/contrib/fedora/nm-live-vm/build.sh b/contrib/fedora/nm-live-vm/build.sh
index 3033fbc32..633386170 100755
--- a/contrib/fedora/nm-live-vm/build.sh
+++ b/contrib/fedora/nm-live-vm/build.sh
@@ -32,7 +32,7 @@ BUILD_PACKAGES="qemu febootstrap mock rpmdevtools"
ARCH=i386
ROOT="${ROOT:-"fedora-20-$ARCH"}"
TREE="/var/lib/mock/$ROOT/root"
-PACKAGES="kernel passwd git autoconf automake libtool intltool gtk-doc libnl3-devel
+PACKAGES="kernel passwd git autoconf automake libtool intltool gtk-doc
dbus-glib-devel libuuid-devel nss-devel ppp-devel newt-devel libndp-devel
readline-devel
gobject-introspection-devel
diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec
index 8f9480802..c6678c1d1 100644
--- a/contrib/fedora/rpm/NetworkManager.spec
+++ b/contrib/fedora/rpm/NetworkManager.spec
@@ -10,7 +10,6 @@
%global dbus_glib_version 0.100
%global wireless_tools_version 1:28-0pre9
-%global libnl3_version 3.2.7
%global ppp_version %(sed -n 's/^#define\\s*VERSION\\s*"\\([^\\s]*\\)"$/\\1/p' %{_includedir}/pppd/patchlevel.h 2>/dev/null | grep . || echo bad)
%global glib2_version %(pkg-config --modversion glib-2.0 2>/dev/null || echo bad)
@@ -130,7 +129,6 @@ BuildRequires: glib2-devel >= 2.40.0
BuildRequires: gobject-introspection-devel >= 0.10.3
BuildRequires: gettext-devel
BuildRequires: pkgconfig
-BuildRequires: libnl3-devel >= %{libnl3_version}
BuildRequires: automake autoconf intltool libtool
%if %{with ppp}
BuildRequires: ppp-devel >= 2.4.5