diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-10-15 11:29:05 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-10-15 11:29:05 +0000 |
commit | 2828b7f0849ac0de29f2102b4f5d25167ec5258f (patch) | |
tree | b1691f1f597ec1b118298df945908642c4d93e29 /main/libnl | |
parent | 4445acfbaa04990754aed1cefc4510c15ad2e9ac (diff) | |
download | aports-2828b7f0849ac0de29f2102b4f5d25167ec5258f.tar.bz2 aports-2828b7f0849ac0de29f2102b4f5d25167ec5258f.tar.xz |
main/libnl: upgrade to 1.1.4 and fix strerror_r usage
Diffstat (limited to 'main/libnl')
-rw-r--r-- | main/libnl/APKBUILD | 25 | ||||
-rw-r--r-- | main/libnl/fix-strerror_r.patch | 50 | ||||
-rw-r--r-- | main/libnl/libnl-1.1-glibc-2.8-ULONG_MAX.patch | 13 | ||||
-rw-r--r-- | main/libnl/libnl-1.1-minor-leaks.patch | 40 |
4 files changed, 61 insertions, 67 deletions
diff --git a/main/libnl/APKBUILD b/main/libnl/APKBUILD index 587793e65d..bfeb34e153 100644 --- a/main/libnl/APKBUILD +++ b/main/libnl/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=libnl -pkgver=1.1 -pkgrel=5 +pkgver=1.1.4 +pkgrel=0 pkgdesc="Library for applications dealing with netlink sockets" url="http://people.suug.ch/~tgr/libnl" arch="all" @@ -9,11 +9,10 @@ license="GPL" depends= makedepends= subpackages="$pkgname-dev" -source="http://distfiles.gentoo.org/distfiles/$pkgname-$pkgver.tar.gz +source="http://www.carisma.slowglass.com/~tgr/libnl/files/$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 + fix-strerror_r.patch fix-includes.patch " @@ -30,6 +29,7 @@ prepare () { build () { cd "$_builddir" + export CFLAGS="$CFLAGS -D_GNU_SOURCE" ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -43,21 +43,18 @@ package() { make DESTDIR="$pkgdir" install || return 1 } -md5sums="ae970ccd9144e132b68664f98e7ceeb1 libnl-1.1.tar.gz +md5sums="580cb878be536804daca87fb75ae46cc libnl-1.1.4.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 +08714767527cb9579c0b918f3433eb4d fix-strerror_r.patch eebc5ce0956034b3526de410a814442b fix-includes.patch" -sha256sums="35cea4cfb6cd8af0cafa0f34fff81def5a1f193b8b8384299b4b21883e22edc3 libnl-1.1.tar.gz +sha256sums="4f80c21fe5bbcdde6e72b59b4f98306063a41421f909887c34e58d93e746d063 libnl-1.1.4.tar.gz 1b89c83789c695c7622318496c6cb6de338c76a61844c2bbaa200a5a1d6a8c9b libnl-1.1-flags.patch -b423657e30be6b2589b9da7fc98507b658028786c4950295138769b0ff0cb171 libnl-1.1-minor-leaks.patch c9c7d8bf94ab06884f91ecd98977433be952530555aff37befc335f1f6312619 libnl-1.1-vlan-header.patch -cb9e0965c5a4a44c5d1e51254b453219660d47b843d5c4607c7b766804396949 libnl-1.1-glibc-2.8-ULONG_MAX.patch +93d5dbb813cf5f6424c6110a05bc39bf2e9a942b2eecc150d3e5e0cbf13066b8 fix-strerror_r.patch 1429f078e58372a7bfbd94e02f8be13d302731013673d14fbeb5f685125e9a92 fix-includes.patch" -sha512sums="add02849845bd0029968a9fb9a642133051196da17cf7b45eef192de1c09ad0b0ad7cc8424fa325f1c63262779d0abfd74e4ecb634abe66a4d2f394b3ad3e3de libnl-1.1.tar.gz +sha512sums="25e26ddcc16540346ea34815ab6ac094177e5cee2eb3d843c4f8b30cd9d83390a3e87cb46046dc3bd9ae4d21f77e57bb3827c2cfc588eb18afe049921f2030b4 libnl-1.1.4.tar.gz 7ef2b3a7fb79227644c897a8cd59d6fc1e94a37211ea59684fe11ec4e34fe95cdc8c3df72134128326c2db10cbada9641290994253a4a80875971d95a73a74c0 libnl-1.1-flags.patch -4e0023fd4f23dc9c4f85033c20dd7c5e731e74e8d9654f55fafe5019caee91faf60a3e290163008fc330c036d5deea316b9791873f4b4648d826efa6f11534c5 libnl-1.1-minor-leaks.patch ea45d780b16e6045735aaf2e3febf19ddccab4ca0e03710aebfe51655adc50177aefa3bd4d06e0ccce0160f4c6db73cfa4eb7cebe53b3e15c1807c3b00dc1c9c libnl-1.1-vlan-header.patch -acd5a5c986d722a1b2303dc229a894c3e7463199387e7f823cca5e1d464843475454e3fae713fe8cceeaaba2d0284ab0de8619e3f98999ac13b85da7c5f49055 libnl-1.1-glibc-2.8-ULONG_MAX.patch +0464db6611234e3ece7191d88da12d241d0a1cf03e8fa1a8ec1757c0ae971fde1ae727e39358a49ac74f2fee8465b02f6fe21ae0ccc58851299c325b9475d58b fix-strerror_r.patch 3d7281137f95e2dcdbc17e1e1676f2a220a735161527cef80d4608e0c16d985d4d14df1d040b6d18b24c407577b6bf0cfb0d7f3520657e9c16b2d487eb1d445a fix-includes.patch" diff --git a/main/libnl/fix-strerror_r.patch b/main/libnl/fix-strerror_r.patch new file mode 100644 index 0000000000..ff129be721 --- /dev/null +++ b/main/libnl/fix-strerror_r.patch @@ -0,0 +1,50 @@ +--- libnl-1.1.4.orig/lib/fib_lookup/lookup.c ++++ libnl-1.1.4/lib/fib_lookup/lookup.c +@@ -124,7 +124,7 @@ + static int result_dump_brief(struct nl_object *obj, struct nl_dump_params *p) + { + struct flnl_result *res = (struct flnl_result *) obj; +- char buf[256]; ++ char buf[256], buf2[256]; + int line = 1; + + dp_dump(p, "table %s prefixlen %u next-hop-selector %u\n", +@@ -132,9 +132,10 @@ + res->fr_prefixlen, res->fr_nh_sel); + dp_dump_line(p, line++, "type %s ", + nl_rtntype2str(res->fr_type, buf, sizeof(buf))); ++ strerror_r(-res->fr_error, buf2, sizeof(buf2)); + dp_dump(p, "scope %s error %s (%d)\n", + rtnl_scope2str(res->fr_scope, buf, sizeof(buf)), +- strerror_r(-res->fr_error, buf, sizeof(buf)), res->fr_error); ++ buf2, res->fr_error); + + return line; + } +--- libnl-1.1.4.orig/lib/handlers.c ++++ libnl-1.1.4/lib/handlers.c +@@ -136,8 +136,8 @@ + FILE *ofd = arg ? arg : stderr; + char buf[256]; + +- fprintf(ofd, "-- Error received: %s\n-- Original message: ", +- strerror_r(-e->error, buf, sizeof(buf))); ++ strerror_r(-e->error, buf, sizeof(buf)); ++ fprintf(ofd, "-- Error received: %s\n-- Original message: ", buf); + print_header_content(ofd, &e->msg); + fprintf(ofd, "\n"); + +--- libnl-1.1.4.orig/lib/msg.c ++++ libnl-1.1.4/lib/msg.c +@@ -961,9 +961,9 @@ + struct nlmsgerr *err = nlmsg_data(hdr); + char buf[256]; + ++ strerror_r(-err->error, buf, sizeof(buf)); + fprintf(ofd, " [ERRORMSG] %Zu octets\n", sizeof(*err)); +- fprintf(ofd, " .error = %d \"%s\"\n", err->error, +- strerror_r(-err->error, buf, sizeof(buf))); ++ fprintf(ofd, " .error = %d \"%s\"\n", err->error, buf); + fprintf(ofd, " [ORIGINAL MESSAGE] %Zu octets\n", sizeof(*hdr)); + + errmsg = nlmsg_inherit(&err->msg); 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 deleted file mode 100644 index c4082cbab0..0000000000 --- a/main/libnl/libnl-1.1-glibc-2.8-ULONG_MAX.patch +++ /dev/null @@ -1,13 +0,0 @@ -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 deleted file mode 100644 index 855a6ab391..0000000000 --- a/main/libnl/libnl-1.1-minor-leaks.patch +++ /dev/null @@ -1,40 +0,0 @@ -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); |