aboutsummaryrefslogtreecommitdiffstats
path: root/main/libnl
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-02-19 14:22:00 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-02-19 14:22:00 +0000
commitfe3c74dd23459bd5a35e3d14d5f999fc17bd923a (patch)
tree73119e34ac99b04195267f4bcfcc833a6a6912ad /main/libnl
parent04ccd94d8d28394c087efcc17d954dcb555b7208 (diff)
downloadaports-fe3c74dd23459bd5a35e3d14d5f999fc17bd923a.tar.bz2
aports-fe3c74dd23459bd5a35e3d14d5f999fc17bd923a.tar.xz
main/libnl: moved from testing
needed by wpa_supplicant
Diffstat (limited to 'main/libnl')
-rw-r--r--main/libnl/APKBUILD44
-rw-r--r--main/libnl/libnl-1.1-flags.patch11
-rw-r--r--main/libnl/libnl-1.1-glibc-2.8-ULONG_MAX.patch13
-rw-r--r--main/libnl/libnl-1.1-minor-leaks.patch40
-rw-r--r--main/libnl/libnl-1.1-vlan-header.patch80
5 files changed, 188 insertions, 0 deletions
diff --git a/main/libnl/APKBUILD b/main/libnl/APKBUILD
new file mode 100644
index 0000000000..9db755aef1
--- /dev/null
+++ b/main/libnl/APKBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=libnl
+pkgver=1.1
+pkgrel=0
+pkgdesc="Library for applications dealing with netlink sockets"
+url="http://people.suug.ch/~tgr/libnl"
+license="GPL"
+depends=
+makedepends=
+subpackages="$pkgname-dev"
+source="http://distfiles.gentoo.org/distfiles/$pkgname-$pkgver.tar.gz
+ libnl-1.1-flags.patch
+ libnl-1.1-minor-leaks.patch
+ libnl-1.1-vlan-header.patch
+ libnl-1.1-glibc-2.8-ULONG_MAX.patch
+ "
+
+_builddir="$srcdir"/libnl-$pkgver
+
+prepare () {
+ cd "$_builddir"
+ for i in "$srcdir"/*.patch; do
+ [ -r "$i" ] || continue
+ msg "Applying $i"
+ patch -s -p1 -i $i || return 1
+ done
+}
+
+build () {
+ cd "$_builddir"
+ ./configure --prefix=/usr || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="ae970ccd9144e132b68664f98e7ceeb1 libnl-1.1.tar.gz
+9c9072ac8b74135798e0ebcf2d90290d libnl-1.1-flags.patch
+3a42f98cfb353f2469ac3c44b7c0a027 libnl-1.1-minor-leaks.patch
+d757127e7af3bd3c82cdb51b1b09d2e0 libnl-1.1-vlan-header.patch
+9169c7eec8a2b4b2556dd26ac73c6020 libnl-1.1-glibc-2.8-ULONG_MAX.patch"
diff --git a/main/libnl/libnl-1.1-flags.patch b/main/libnl/libnl-1.1-flags.patch
new file mode 100644
index 0000000000..bb09b36266
--- /dev/null
+++ b/main/libnl/libnl-1.1-flags.patch
@@ -0,0 +1,11 @@
+--- libnl-1.1/lib/Makefile.orig 2008-01-14 16:48:45.000000000 +0100
++++ libnl-1.1/lib/Makefile 2009-05-26 09:47:42.000000000 +0200
+@@ -48,7 +48,7 @@
+
+ $(OUT_SLIB): ../Makefile.opts $(OBJ)
+ @echo " LD $(OUT_SLIB)"; \
+- $(CC) -shared -Wl,-soname,libnl.so.1 -o $(OUT_SLIB) $(OBJ) $(LIBNL_LIB) -lc
++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,libnl.so.1 -o $(OUT_SLIB) $(OBJ) $(LIBNL_LIB) -lc
+ @echo " LN $(OUT_SLIB) $(LN1_SLIB)"; \
+ rm -f $(LN1_SLIB) ; $(LN) -s $(OUT_SLIB) $(LN1_SLIB)
+ @echo " LN $(LN1_SLIB) $(LN_SLIB)"; \
diff --git a/main/libnl/libnl-1.1-glibc-2.8-ULONG_MAX.patch b/main/libnl/libnl-1.1-glibc-2.8-ULONG_MAX.patch
new file mode 100644
index 0000000000..c4082cbab0
--- /dev/null
+++ b/main/libnl/libnl-1.1-glibc-2.8-ULONG_MAX.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/show_bug.cgi?id=225393
+
+--- a/include/netlink-local.h 2008-06-09 07:54:20 +0000
++++ b/include/netlink-local.h 2008-06-09 07:54:47 +0000
+@@ -26,6 +26,7 @@
+ #include <sys/socket.h>
+ #include <inttypes.h>
+ #include <assert.h>
++#include <limits.h>
+
+ #include <arpa/inet.h>
+ #include <netdb.h>
+
diff --git a/main/libnl/libnl-1.1-minor-leaks.patch b/main/libnl/libnl-1.1-minor-leaks.patch
new file mode 100644
index 0000000000..855a6ab391
--- /dev/null
+++ b/main/libnl/libnl-1.1-minor-leaks.patch
@@ -0,0 +1,40 @@
+From: Patrick McHardy <kaber@trash.net>
+Date: Fri, 18 Jan 2008 16:55:49 +0000 (+0100)
+Subject: [LIBNL]: Fix minor memleaks on exit
+X-Git-Url: http://git.kernel.org/?p=libs%2Fnetlink%2Flibnl.git;a=commitdiff_plain;h=b64f15d6f947839236fa276d473d238f8c9b9d57;hp=e91bb2ffb090955d443e643a25b250bf3d33534a
+
+[LIBNL]: Fix minor memleaks on exit
+
+Make valgrind happy ...
+
+Signed-off-by: Patrick McHardy <kaber@trash.net>
+---
+
+diff --git a/lib/route/route_utils.c b/lib/route/route_utils.c
+index a12d169..1386cda 100644
+--- a/lib/route/route_utils.c
++++ b/lib/route/route_utils.c
+@@ -63,6 +63,11 @@ static void __init init_routing_table_names(void)
+ add_routing_table_name(RT_TABLE_LOCAL, "local");
+ };
+
++static void __exit release_routing_table_names(void)
++{
++ __trans_list_clear(&table_names);
++}
++
+ int rtnl_route_read_table_names(const char *path)
+ {
+ __trans_list_clear(&table_names);
+@@ -104,6 +109,11 @@ static void __init init_proto_names(void)
+ add_proto_name(RTPROT_STATIC, "static");
+ };
+
++static void __exit release_proto_names(void)
++{
++ __trans_list_clear(&proto_names);
++}
++
+ int rtnl_route_read_protocol_names(const char *path)
+ {
+ __trans_list_clear(&proto_names);
diff --git a/main/libnl/libnl-1.1-vlan-header.patch b/main/libnl/libnl-1.1-vlan-header.patch
new file mode 100644
index 0000000000..c4c2fc6382
--- /dev/null
+++ b/main/libnl/libnl-1.1-vlan-header.patch
@@ -0,0 +1,80 @@
+From: Patrick McHardy <kaber@trash.net>
+Date: Fri, 18 Jan 2008 16:55:48 +0000 (+0100)
+Subject: [LIBNL]: Add if_vlan.h
+X-Git-Url: http://git.kernel.org/?p=libs%2Fnetlink%2Flibnl.git;a=commitdiff_plain;h=e91bb2ffb090955d443e643a25b250bf3d33534a;hp=7f6b7a8eea0334b34d58dec72c66121a76f08958
+
+[LIBNL]: Add if_vlan.h
+
+vlan support needs VLAN_FLAG_REORDER_HDR, which is not available in
+older if_vlan.h versions. Add the current version from the kernel.
+
+Signed-off-by: Patrick McHardy <kaber@trash.net>
+---
+
+diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
+new file mode 100644
+index 0000000..068cd7b
+--- /dev/null
++++ include/linux/if_vlan.h
+@@ -0,0 +1,61 @@
++/*
++ * VLAN An implementation of 802.1Q VLAN tagging.
++ *
++ * Authors: Ben Greear <greearb@candelatech.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.
++ *
++ */
++
++#ifndef _LINUX_IF_VLAN_H_
++#define _LINUX_IF_VLAN_H_
++
++
++/* VLAN IOCTLs are found in sockios.h */
++
++/* Passed in vlan_ioctl_args structure to determine behaviour. */
++enum vlan_ioctl_cmds {
++ ADD_VLAN_CMD,
++ DEL_VLAN_CMD,
++ SET_VLAN_INGRESS_PRIORITY_CMD,
++ SET_VLAN_EGRESS_PRIORITY_CMD,
++ GET_VLAN_INGRESS_PRIORITY_CMD,
++ GET_VLAN_EGRESS_PRIORITY_CMD,
++ SET_VLAN_NAME_TYPE_CMD,
++ SET_VLAN_FLAG_CMD,
++ GET_VLAN_REALDEV_NAME_CMD, /* If this works, you know it's a VLAN device, btw */
++ GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */
++};
++
++enum vlan_flags {
++ VLAN_FLAG_REORDER_HDR = 0x1,
++};
++
++enum vlan_name_types {
++ VLAN_NAME_TYPE_PLUS_VID, /* Name will look like: vlan0005 */
++ VLAN_NAME_TYPE_RAW_PLUS_VID, /* name will look like: eth1.0005 */
++ VLAN_NAME_TYPE_PLUS_VID_NO_PAD, /* Name will look like: vlan5 */
++ VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD, /* Name will look like: eth0.5 */
++ VLAN_NAME_TYPE_HIGHEST
++};
++
++struct vlan_ioctl_args {
++ int cmd; /* Should be one of the vlan_ioctl_cmds enum above. */
++ char device1[24];
++
++ union {
++ char device2[24];
++ int VID;
++ unsigned int skb_priority;
++ unsigned int name_type;
++ unsigned int bind_type;
++ unsigned int flag; /* Matches vlan_dev_info flags */
++ } u;
++
++ short vlan_qos;
++};
++
++#endif /* !(_LINUX_IF_VLAN_H_) */