From 87da51c9feb332a9f8a64ebd50e7d46eba4da80246a0f25bc2f03dbf0dc5db86 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 1 Jan 2012 03:39:22 +0000 Subject: [PATCH] ipset-6.10+git9 OBS-URL: https://build.opensuse.org/package/show/security:netfilter/ipset?expand=0&rev=2 --- 0001-056b0ea-process-include-libipset.diff | 69 -------------------- 0002-ab0ef6a-include-libipset-nfproto-h.diff | 28 -------- 0003-a1a72ef-install-libipset-linux-ip.diff | 29 -------- 0004-install-libipset-right-place.diff | 25 ------- ipset-6.10+git9.tar.xz | 3 + ipset-6.10.tar.xz | 3 - ipset.changes | 5 ++ ipset.spec | 16 ++--- kernel-3_3.diff | 67 +++++++++++++++++++ no-static.diff | 8 +-- 10 files changed, 86 insertions(+), 167 deletions(-) delete mode 100644 0001-056b0ea-process-include-libipset.diff delete mode 100644 0002-ab0ef6a-include-libipset-nfproto-h.diff delete mode 100644 0003-a1a72ef-install-libipset-linux-ip.diff delete mode 100644 0004-install-libipset-right-place.diff create mode 100644 ipset-6.10+git9.tar.xz delete mode 100644 ipset-6.10.tar.xz create mode 100644 ipset.changes create mode 100644 kernel-3_3.diff diff --git a/0001-056b0ea-process-include-libipset.diff b/0001-056b0ea-process-include-libipset.diff deleted file mode 100644 index b7ae521..0000000 --- a/0001-056b0ea-process-include-libipset.diff +++ /dev/null @@ -1,69 +0,0 @@ -parent 4f3fe23ce9a6b11810ebf862122d08460ed44567 (v6.10-2-g4f3fe23) -commit 056b0ea7b9c66b84842834d92e112db2b4e4d9aa -Author: Jan Engelhardt -Date: Sat Dec 17 16:35:05 2011 +0100 - -build: process include/libipset/ - -We need to visit that directory, otherwise `make install` is -incomplete and `make distcheck` fails. - -Signed-off-by: Jozsef Kadlecsik ---- - Makefile.am | 2 +- - configure.ac | 2 +- - include/Makefile.am | 1 - - include/libipset/Makefile.am | 3 +-- - 4 files changed, 3 insertions(+), 5 deletions(-) - delete mode 100644 include/Makefile.am - -diff --git a/Makefile.am b/Makefile.am -index 09ba4d9..513d641 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -20,7 +20,7 @@ else - V=0 - endif - --SUBDIRS = lib src -+SUBDIRS = include/libipset lib src - - modules_sparse: - if WITH_KMOD -diff --git a/configure.ac b/configure.ac -index e277d05..acae162 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -161,5 +161,5 @@ fi - dnl Checks for library functions. - - dnl Generate output --AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile]) -+AC_CONFIG_FILES([Makefile include/libipset/Makefile lib/Makefile src/Makefile]) - AC_OUTPUT -diff --git a/include/Makefile.am b/include/Makefile.am -deleted file mode 100644 -index 2c4eb5c..0000000 ---- a/include/Makefile.am -+++ /dev/null -@@ -1 +0,0 @@ --SUBDIRS = libipset -diff --git a/include/libipset/Makefile.am b/include/libipset/Makefile.am -index b17293c..3c21d0f 100644 ---- a/include/libipset/Makefile.am -+++ b/include/libipset/Makefile.am -@@ -6,11 +6,10 @@ pkginclude_HEADERS = \ - linux_ip_set_hash.h \ - mnl.h \ - nf_inet_addr.h \ -- nlattr.h \ - parse.h \ - pfxlen.h \ - print.h \ -- session.h -+ session.h \ - transport.h \ - types.h \ - ui.h \ --- -# Created with git-export-patch diff --git a/0002-ab0ef6a-include-libipset-nfproto-h.diff b/0002-ab0ef6a-include-libipset-nfproto-h.diff deleted file mode 100644 index 885d50c..0000000 --- a/0002-ab0ef6a-include-libipset-nfproto-h.diff +++ /dev/null @@ -1,28 +0,0 @@ -parent 056b0ea7b9c66b84842834d92e112db2b4e4d9aa (v6.10-3-g056b0ea) -commit ab0ef6ab42ae03983570e8c5ee93566bc94d7c84 -Author: Jan Engelhardt -Date: Sat Dec 17 16:35:06 2011 +0100 - -build: include libipset/nfproto.h - -libipset/types.h, which is installed by default, requires nfproto.h. - -Signed-off-by: Jozsef Kadlecsik ---- - include/libipset/Makefile.am | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/include/libipset/Makefile.am b/include/libipset/Makefile.am -index 3c21d0f..30b0df8 100644 ---- a/include/libipset/Makefile.am -+++ b/include/libipset/Makefile.am -@@ -6,6 +6,7 @@ pkginclude_HEADERS = \ - linux_ip_set_hash.h \ - mnl.h \ - nf_inet_addr.h \ -+ nfproto.h \ - parse.h \ - pfxlen.h \ - print.h \ --- -# Created with git-export-patch diff --git a/0003-a1a72ef-install-libipset-linux-ip.diff b/0003-a1a72ef-install-libipset-linux-ip.diff deleted file mode 100644 index 4130281..0000000 --- a/0003-a1a72ef-install-libipset-linux-ip.diff +++ /dev/null @@ -1,29 +0,0 @@ -parent ab0ef6ab42ae03983570e8c5ee93566bc94d7c84 (v6.10-4-gab0ef6a) -commit a1a72efb1117edce3702495af3731a261912eaf8 -Author: Jan Engelhardt -Date: Sat Dec 17 16:35:07 2011 +0100 - -build: install libipset/linux_ip_set_list.h - -The other linux_ip_set*.h files are shipped, so this one probably -should too. - -Signed-off-by: Jozsef Kadlecsik ---- - include/libipset/Makefile.am | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/include/libipset/Makefile.am b/include/libipset/Makefile.am -index 30b0df8..d15fedd 100644 ---- a/include/libipset/Makefile.am -+++ b/include/libipset/Makefile.am -@@ -4,6 +4,7 @@ pkginclude_HEADERS = \ - linux_ip_set_bitmap.h \ - linux_ip_set.h \ - linux_ip_set_hash.h \ -+ linux_ip_set_list.h \ - mnl.h \ - nf_inet_addr.h \ - nfproto.h \ --- -# Created with git-export-patch diff --git a/0004-install-libipset-right-place.diff b/0004-install-libipset-right-place.diff deleted file mode 100644 index ec45e45..0000000 --- a/0004-install-libipset-right-place.diff +++ /dev/null @@ -1,25 +0,0 @@ -parent 42dc039c7c27d7d6cd1fc381986b1c900852ae57 (v6.10-7-g42dc039) -commit 7ac997ef8bd7e62e55c2a70227931b2f9fb4cbd8 -Author: Jan Engelhardt -Date: Fri Dec 30 23:57:42 2011 +0100 - -build: install libipset in the right place - -The .c files used to build the plugins for ipset all use #include -, so the files we install should preferably also be in a -directory called "libipset" rather than just "ipset". ---- - include/libipset/Makefile.am | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/include/libipset/Makefile.am b/include/libipset/Makefile.am -index 2bb353b..3b47518 100644 ---- a/include/libipset/Makefile.am -+++ b/include/libipset/Makefile.am -@@ -1,3 +1,4 @@ -+pkgincludedir = ${includedir}/libipset - pkginclude_HEADERS = \ - data.h \ - errcode.h \ --- -# Created with git-export-patch diff --git a/ipset-6.10+git9.tar.xz b/ipset-6.10+git9.tar.xz new file mode 100644 index 0000000..458c49f --- /dev/null +++ b/ipset-6.10+git9.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:068bd00b9f94da5cc5718c4ac5ba6e0c3d71016ba6fba8471f04111a23c49d4d +size 118932 diff --git a/ipset-6.10.tar.xz b/ipset-6.10.tar.xz deleted file mode 100644 index dc00cbc..0000000 --- a/ipset-6.10.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a81c3ece1c220300212e77427433755489826c8a0fc02fa9e2379863d0a00c49 -size 120688 diff --git a/ipset.changes b/ipset.changes new file mode 100644 index 0000000..af0b258 --- /dev/null +++ b/ipset.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Sun Jan 1 03:17:39 UTC 2012 - jengelh@medozas.de + +- Populate ipset package on build.opensuse.org after disabling + ipset-genl compilation in xtables-addons diff --git a/ipset.spec b/ipset.spec index 6a2465b..e389760 100644 --- a/ipset.spec +++ b/ipset.spec @@ -17,22 +17,20 @@ Name: ipset %define lname libipset1 -Version: 6.10 +Version: 6.10+git9 Release: 0 Group: Productivity/Networking/Security Summary: Netfilter ipset administration utility License: GPL-2.0 URL: http://ipset.netfilter.org/ -Source: %name-%version.tar.xz -Source3: %name-preamble -Patch1: 0001-056b0ea-process-include-libipset.diff -Patch2: 0002-ab0ef6a-include-libipset-nfproto-h.diff -Patch3: 0003-a1a72ef-install-libipset-linux-ip.diff -Patch4: 0004-install-libipset-right-place.diff -Patch5: no-static.diff #Git-Clone: git://git.netfilter.org/ipset #Git-Web: http://git.netfilter.org/ +Source: %name-%version.tar.xz +Source3: %name-preamble +Patch1: no-static.diff +Patch2: kernel-3_3.diff + BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf, automake, libtool BuildRequires: pkgconfig >= 0.23, pkgconfig(libmnl) >= 1, xz @@ -96,7 +94,7 @@ when matching an entry against a set. %prep %setup -q -%patch -P 1 -P 2 -P 3 -P 4 -P 5 -p1 +%patch -P 1 -P 2 -p1 %build if [ ! -e configure ]; then diff --git a/kernel-3_3.diff b/kernel-3_3.diff new file mode 100644 index 0000000..c797d1a --- /dev/null +++ b/kernel-3_3.diff @@ -0,0 +1,67 @@ +parent 5f5e497db1f0810ce50bc8807836312c75511079 (v6.10-9-g5f5e497) +commit b2d4e4b4e6c48dc0d53eeab3b52ce56f01a29397 +Author: Jan Engelhardt +Date: Sat Dec 31 02:22:10 2011 +0100 + +kernel 3.2 support +--- + kernel/net/netfilter/ipset/ip_set_getport.c | 6 ++++++ + kernel/net/netfilter/ipset/ip_set_hash_ip.c | 2 +- + kernel/net/netfilter/ipset/ip_set_hash_net.c | 2 +- + 3 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/kernel/net/netfilter/ipset/ip_set_getport.c b/kernel/net/netfilter/ipset/ip_set_getport.c +index 58ca4e1..836855f 100644 +--- a/kernel/net/netfilter/ipset/ip_set_getport.c ++++ b/kernel/net/netfilter/ipset/ip_set_getport.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -115,9 +116,14 @@ ip_set_get_ip6_port(const struct sk_buff *skb, bool src, + { + int protoff; + u8 nexthdr; ++ __be16 frag_off; + + nexthdr = ipv6_hdr(skb)->nexthdr; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) + protoff = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &nexthdr); ++#else ++ protoff = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &nexthdr, &frag_off); ++#endif + if (protoff < 0) + return false; + +diff --git a/kernel/net/netfilter/ipset/ip_set_hash_ip.c b/kernel/net/netfilter/ipset/ip_set_hash_ip.c +index 14a8628..5139dea 100644 +--- a/kernel/net/netfilter/ipset/ip_set_hash_ip.c ++++ b/kernel/net/netfilter/ipset/ip_set_hash_ip.c +@@ -241,7 +241,7 @@ hash_ip6_data_isnull(const struct hash_ip6_elem *elem) + static inline void + hash_ip6_data_copy(struct hash_ip6_elem *dst, const struct hash_ip6_elem *src) + { +- ipv6_addr_copy(&dst->ip.in6, &src->ip.in6); ++ dst->ip.in6 = src->ip.in6; + } + + static inline void +diff --git a/kernel/net/netfilter/ipset/ip_set_hash_net.c b/kernel/net/netfilter/ipset/ip_set_hash_net.c +index 48e35ba..5a4457a 100644 +--- a/kernel/net/netfilter/ipset/ip_set_hash_net.c ++++ b/kernel/net/netfilter/ipset/ip_set_hash_net.c +@@ -267,7 +267,7 @@ static inline void + hash_net6_data_copy(struct hash_net6_elem *dst, + const struct hash_net6_elem *src) + { +- ipv6_addr_copy(&dst->ip.in6, &src->ip.in6); ++ dst->ip.in6 = src->ip.in6; + dst->cidr = src->cidr; + } + +-- +# Created with git-export-patch diff --git a/no-static.diff b/no-static.diff index 46e4a8e..63f2013 100644 --- a/no-static.diff +++ b/no-static.diff @@ -2,15 +2,15 @@ src/Makefile.am | 1 - 1 file changed, 1 deletion(-) -Index: ipset-6.10/src/Makefile.am +Index: ipset-6.10+git9/src/Makefile.am =================================================================== ---- ipset-6.10.orig/src/Makefile.am -+++ ipset-6.10/src/Makefile.am +--- ipset-6.10+git9.orig/src/Makefile.am ++++ ipset-6.10+git9/src/Makefile.am @@ -15,7 +15,6 @@ ipset_SOURCES = ipset.c \ ipset_list_set.c \ ui.c ipset_LDADD = ../lib/libipset.la -AM_LDFLAGS = -static - man_MANS = ipset.8 + dist_man_MANS = ipset.8