libnl 1.x: packaged.
svn path=/nixpkgs/trunk/; revision=25365
This commit is contained in:
parent
e1309dee31
commit
bfc2a38651
11
pkgs/os-specific/linux/libnl/libnl-1.1-flags.patch
Normal file
11
pkgs/os-specific/linux/libnl/libnl-1.1-flags.patch
Normal file
@ -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)"; \
|
@ -0,0 +1,13 @@
|
|||||||
|
https://bugs.gentoo.org/show_bug.cgi?id=225393
|
||||||
|
|
||||||
|
--- libnl-1.1/include/netlink-local.h 2008-06-09 07:54:20 +0000
|
||||||
|
+++ libnl-1.1/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>
|
||||||
|
|
40
pkgs/os-specific/linux/libnl/libnl-1.1-minor-leaks.patch
Normal file
40
pkgs/os-specific/linux/libnl/libnl-1.1-minor-leaks.patch
Normal file
@ -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);
|
80
pkgs/os-specific/linux/libnl/libnl-1.1-vlan-header.patch
Normal file
80
pkgs/os-specific/linux/libnl/libnl-1.1-vlan-header.patch
Normal file
@ -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_) */
|
27
pkgs/os-specific/linux/libnl/v1.nix
Normal file
27
pkgs/os-specific/linux/libnl/v1.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{stdenv, fetchurl, bison, flex}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "libnl-1.1";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "${meta.homepage}files/${name}.tar.gz";
|
||||||
|
sha256 = "1hzd48z8h8abkclq90wb7cciynpg3pwgyd0gzb5g12ndnv7s9kim";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ bison flex ];
|
||||||
|
postConfigure = "type -tp flex";
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./libnl-1.1-flags.patch
|
||||||
|
./libnl-1.1-glibc-2.8-ULONG_MAX.patch
|
||||||
|
./libnl-1.1-minor-leaks.patch
|
||||||
|
./libnl-1.1-vlan-header.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = "http://www.infradead.org/~tgr/libnl/";
|
||||||
|
description = "Linux NetLink interface library";
|
||||||
|
maintainers = [ stdenv.lib.maintainers.urkud ];
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
@ -4725,6 +4725,8 @@ let
|
|||||||
|
|
||||||
libnl = callPackage ../os-specific/linux/libnl { };
|
libnl = callPackage ../os-specific/linux/libnl { };
|
||||||
|
|
||||||
|
libnl1 = callPackage ../os-specific/linux/libnl/v1.nix { };
|
||||||
|
|
||||||
linuxHeaders = linuxHeaders_2_6_32;
|
linuxHeaders = linuxHeaders_2_6_32;
|
||||||
|
|
||||||
linuxHeaders26Cross = forceBuildDrv (import ../os-specific/linux/kernel-headers/2.6.32.nix {
|
linuxHeaders26Cross = forceBuildDrv (import ../os-specific/linux/kernel-headers/2.6.32.nix {
|
||||||
|
Loading…
Reference in New Issue
Block a user