Jan Engelhardt 2011-12-30 23:31:51 +00:00 committed by Git OBS Bridge
commit 8af18c001e
10 changed files with 343 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,69 @@
parent 4f3fe23ce9a6b11810ebf862122d08460ed44567 (v6.10-2-g4f3fe23)
commit 056b0ea7b9c66b84842834d92e112db2b4e4d9aa
Author: Jan Engelhardt <jengelh@medozas.de>
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 <kadlec@blackhole.kfki.hu>
---
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

View File

@ -0,0 +1,28 @@
parent 056b0ea7b9c66b84842834d92e112db2b4e4d9aa (v6.10-3-g056b0ea)
commit ab0ef6ab42ae03983570e8c5ee93566bc94d7c84
Author: Jan Engelhardt <jengelh@medozas.de>
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 <kadlec@blackhole.kfki.hu>
---
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

View File

@ -0,0 +1,29 @@
parent ab0ef6ab42ae03983570e8c5ee93566bc94d7c84 (v6.10-4-gab0ef6a)
commit a1a72efb1117edce3702495af3731a261912eaf8
Author: Jan Engelhardt <jengelh@medozas.de>
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 <kadlec@blackhole.kfki.hu>
---
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

View File

@ -0,0 +1,25 @@
parent 42dc039c7c27d7d6cd1fc381986b1c900852ae57 (v6.10-7-g42dc039)
commit 7ac997ef8bd7e62e55c2a70227931b2f9fb4cbd8
Author: Jan Engelhardt <jengelh@medozas.de>
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
<libipset/...>, 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

3
ipset-6.10.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a81c3ece1c220300212e77427433755489826c8a0fc02fa9e2379863d0a00c49
size 120688

3
ipset-preamble Normal file
View File

@ -0,0 +1,3 @@
Enhances: kernel-%1
Requires: kernel-%1
Supplements: packageand(kernel-%1:ipset)

146
ipset.spec Normal file
View File

@ -0,0 +1,146 @@
#
# spec file for package ipset
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: ipset
%define lname libipset1
Version: 6.10
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/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf, automake, libtool
BuildRequires: pkgconfig >= 0.23, pkgconfig(libmnl) >= 1, xz
%if 0%{?suse_version}
BuildRequires: %kernel_module_package_buildreqs
BuildRequires: kernel-syms >= 2.6.39
Recommends: %name-kmp
%endif
%kernel_module_package -p %name-preamble
%description
IP sets are a framework inside the Linux kernel, which can be
administered by the ipset utility. Depending on the type, currently
an IP set may store IP addresses, (TCP/UDP) port numbers or IP
addresses with MAC addresses in a way, which ensures lightning speed
when matching an entry against a set.
ipset can:
* store multiple IP addresses or port numbers and match against the
collection by iptables at one swoop;
* dynamically update iptables rules against IP addresses or ports
without performance penalty;
* express complex IP address and ports based rulesets with one single
iptables rule and benefit from the speed of IP sets
%package KMP
Group: System/Kernel
Summary: Netfilter ipset kernel modules
%description KMP
IP sets are a framework inside the Linux kernel, which can be
administered by the ipset utility. Depending on the type, currently
an IP set may store IP addresses, (TCP/UDP) port numbers or IP
addresses with MAC addresses in a way, which ensures lightning speed
when matching an entry against a set.
This package contains a version update to the in-kernel ipset modules.
%package -n %lname
Summary: Userspace library for the in-kernel Netfilter ipset interface
Group: System/Libraries
%description -n %lname
IP sets are a framework inside the Linux kernel, which can be
administered by the ipset utility. Depending on the type, currently
an IP set may store IP addresses, (TCP/UDP) port numbers or IP
addresses with MAC addresses in a way, which ensures lightning speed
when matching an entry against a set.
%package devel
Summary: Development files for ipset extensions
Group: Development/Libraries/C and C++
%description devel
IP sets are a framework inside the Linux kernel, which can be
administered by the ipset utility. Depending on the type, currently
an IP set may store IP addresses, (TCP/UDP) port numbers or IP
addresses with MAC addresses in a way, which ensures lightning speed
when matching an entry against a set.
%prep
%setup -q
%patch -P 1 -P 2 -P 3 -P 4 -P 5 -p1
%build
if [ ! -e configure ]; then
./autogen.sh;
fi;
pushd ../;
for flavor in %flavors_to_build; do
cp -a "%name-%version" "%name-$flavor-%version";
pushd "%name-$flavor-%version/";
# ksource: it just checks for a header
%configure --disable-static \
--with-kbuild="/usr/src/linux-obj/%_target_cpu/$flavor" \
--with-ksource="/usr/src/linux";
make %{?_smp_mflags} all modules;
popd;
done;
%install
b="%buildroot";
pushd ../;
for flavor in %flavors_to_build; do
pushd "%name-$flavor-%version/";
make %{?_smp_mflags} install modules_install \
DESTDIR="$b" INSTALL_MOD_PATH="$b";
popd;
done;
rm -f "$b/%_libdir"/*.la;
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files
%defattr(-,root,root)
%_sbindir/ipset
%_mandir/man*/*
%files -n %lname
%defattr(-,root,root)
%_libdir/libipset.so.1*
%files devel
%defattr(-,root,root)
%_libdir/libipset.so
%_includedir/libipset
%changelog

16
no-static.diff Normal file
View File

@ -0,0 +1,16 @@
---
src/Makefile.am | 1 -
1 file changed, 1 deletion(-)
Index: ipset-6.10/src/Makefile.am
===================================================================
--- ipset-6.10.orig/src/Makefile.am
+++ ipset-6.10/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