packages: ipset/ipset.spec, ipset/ipset-no_kernel.patch (NEW) - Release: 1 ...

jajcus jajcus at pld-linux.org
Fri Apr 15 14:09:12 CEST 2011


Author: jajcus                       Date: Fri Apr 15 12:09:12 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- Release: 1
- builds now

---- Files affected:
packages/ipset:
   ipset.spec (1.109 -> 1.110) , ipset-no_kernel.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/ipset/ipset.spec
diff -u packages/ipset/ipset.spec:1.109 packages/ipset/ipset.spec:1.110
--- packages/ipset/ipset.spec:1.109	Fri Apr 15 12:21:12 2011
+++ packages/ipset/ipset.spec	Fri Apr 15 14:09:06 2011
@@ -1,5 +1,9 @@
 # $Revision$, $Date$
 #
+# TODO:
+#	- patch our kernel to provide the needed API and update
+#	  the dependencies here
+#
 # Conditional build:
 %bcond_without	dist_kernel	# allow non-distribution kernel
 %bcond_without	kernel		# don't build kernel modules
@@ -17,7 +21,7 @@
 %define		_enable_debug_packages	0
 %endif
 
-%define		rel	0.1
+%define		rel	1
 %define		pname	ipset
 Summary:	IP sets utility
 Summary(pl.UTF-8):	Narzędzie do zarządzania zbiorami IP
@@ -30,16 +34,21 @@
 # Source0-md5:	8830f555133695d455a7aa5d7b5019ea
 Source1:	%{pname}.init
 Patch0:		%{name}-config_dist.patch
+Patch1:		%{name}-no_kernel.patch
 URL:		http://ipset.netfilter.org/
 BuildRequires:	autoconf
 BuildRequires:	automake
+%{?with_dist_kernel:BuildRequires:	kernel%{_alt_kernel}-module-build >= 3:2.6.34}
+BuildRequires:	libmnl-devel
 BuildRequires:	libtool
 %{?with_userspace:BuildRequires:	linux-libc-headers >= 7:2.6.34}
-%{?with_dist_kernel:BuildRequires:	kernel%{_alt_kernel}-module-build >= 3:2.6.34}
-BuildRequires:	rpmbuild(macros) >= 1.379
+BuildRequires:	rpmbuild(macros) >= 1.583
 Suggests:	kernel-net-ipset
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+# unresolved ipset_errcode, defined in the ipset binary
+%define		skip_post_check_so	libipset\.so.*
+
 %description
 IP sets are a framework inside the Linux 2.4.x and 2.6.x kernel, which
 can be administered by the ipset utility. Depending on the type,
@@ -49,10 +58,11 @@
 
 %description -l pl.UTF-8
 Zbiory IP to szkielet w jądrze Linuksa 2.4.x i 2.6.x, którym można
-administrować przy użyciu narzędzia ipset. W zależności od rodzaju
-aktualnie zbiór IP może przechowywać adresy IP, numery portów
-(TCP/UDP) lub adresy IP z adresami MAC - w sposób zapewniający
-maksymalną szybkość przy dopasowywaniu elementu do zbioru.
+administrować przy użyciu narzędzia ipset. W zależności od
+rodzaju aktualnie zbiór IP może przechowywać adresy IP, numery
+portów (TCP/UDP) lub adresy IP z adresami MAC - w sposób
+zapewniający maksymalną szybkość przy dopasowywaniu elementu do
+zbioru.
 
 %package devel
 Summary:	Header files for ipset interface
@@ -65,6 +75,18 @@
 %description devel -l pl.UTF-8
 Pliki nagłówkowe do interfejsu IPset.
 
+%package static
+Summary:	Static ipset interface library
+Summary(pl.UTF-8):	Biblioteka statyczna interfejsu ipset
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static IPset interface library.
+
+%description static -l pl.UTF-8
+Biblioteka statyczna interfejsu IPset.
+
 %package init
 Summary:	IPset init script
 Summary(pl.UTF-8):	Skrypt startowy IPset
@@ -98,65 +120,58 @@
 
 %description -n kernel%{_alt_kernel}-net-ipset -l pl.UTF-8
 Zbiory IP to szkielet w jądrze Linuksa 2.4.x i 2.6.x, którym można
-administrować przy użyciu narzędzia ipset. W zależności od rodzaju
-aktualnie zbiór IP może przechowywać adresy IP, numery portów
-(TCP/UDP) lub adresy IP z adresami MAC - w sposób zapewniający
-maksymalną szybkość przy dopasowywaniu elementu do zbioru.
+administrować przy użyciu narzędzia ipset. W zależności od
+rodzaju aktualnie zbiór IP może przechowywać adresy IP, numery
+portów (TCP/UDP) lub adresy IP z adresami MAC - w sposób
+zapewniający maksymalną szybkość przy dopasowywaniu elementu do
+zbioru.
 
 Ten pakiet zawiera moduły jądra oferujące wsparcie dla zbiorów IP.
 
 %prep
 %setup -q -n %{pname}-%{version}
-%patch0 -p1
+%if %{with kernel}
+%{?with_dist_kernel:%patch0 -p1}
+%else
+%patch1 -p1
+%endif
 
 %build
 %{__libtoolize}
-%{__aclocal}
+%{__aclocal} -I m4
 %{__autoconf}
 %{__autoheader}
 %{__automake}
 %configure \
 	--with-kbuild=%{_kernelsrcdir}
 
-%{__make}
-
 %if %{with userspace}
-%{__make} binaries \
-	CC="%{__cc}" \
-	PREFIX="%{_prefix}" \
-	LIBDIR="%{_libdir}" \
-	MANDIR="%{_mandir}" \
-	BINDIR="%{_sbindir}" \
-	COPT_FLAGS:="%{rpmcflags}"
+%{__make}
 %endif
 
 %if %{with kernel}
-# ugly hack for satisfy rpm build macro. in fact all modules will be built.
-%build_kernel_modules -C kernel -m ip_set
+# a hack not to list all modules: list only ip_set, all other are build anyway
+%build_kernel_modules -C kernel/net/netfilter -m ipset/ip_set IP_SET_MAX=255 KDIR=$PWD/../..
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %if %{with userspace}
-install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_includedir}}
+install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_includedir}/libipset}
 
-%{__make} binaries_install \
-	DESTDIR="$RPM_BUILD_ROOT" \
-	PREFIX="%{_prefix}" \
-	LIBDIR="%{_libdir}" \
-	MANDIR="%{_mandir}" \
-	BINDIR="%{_sbindir}"
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+cp include/libipset/*.h $RPM_BUILD_ROOT%{_includedir}/libipset
 
-cp -a *.h $RPM_BUILD_ROOT%{_includedir}
 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{pname}
 %endif
 
 %if %{with kernel}
-cd kernel
-%install_kernel_modules -m ip_set -d kernel/net/ipv4/netfilter
-install -p ip_set_*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
-install -p ipt_*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
+cd kernel/net/netfilter
+%install_kernel_modules -m ipset/ip_set -d kernel/net/ipv4/netfilter/ipset
+install -p ipset/ip_set_*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipset
+install -p xt_*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
 cd -
 %endif
 
@@ -180,16 +195,21 @@
 %if %{with userspace}
 %files
 %defattr(644,root,root,755)
-%doc ChangeLog ChangeLog.ippool TODO
+%doc ChangeLog ChangeLog.ippool README UPGRADE
 %attr(755,root,root) %{_sbindir}/ipset
-%dir %{_libdir}/ipset
-%attr(755,root,root) %{_libdir}/ipset/libipset_*.so
+%attr(755,root,root) %{_libdir}/libipset.so.1.*
+%attr(755,root,root) %ghost %{_libdir}/libipset.so.1
 %{_mandir}/man8/ipset.8*
 
 %files devel
 %defattr(644,root,root,755)
-%{_includedir}/ipset.h
-%{_includedir}/libipt_set.h
+%{_includedir}/libipset/*.h
+%{_libdir}/libipset.la
+%attr(755,root,root) %{_libdir}/libipset.so
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libipset.a
 
 %files init
 %defattr(644,root,root,755)
@@ -199,9 +219,9 @@
 %if %{with kernel}
 %files -n kernel%{_alt_kernel}-net-ipset
 %defattr(644,root,root,755)
-/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set*.ko*
-/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipt_set*.ko*
-/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipt_SET*.ko*
+/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/xt_*.ko*
+/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipset/ip_set.ko*
+/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipset/ip_set_*.ko*
 %endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -210,6 +230,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.110  2011/04/15 12:09:06  jajcus
+- Release: 1
+- builds now
+
 Revision 1.109  2011/04/15 10:21:12  jajcus
 - starting work on ipset 6.x (the one in 2.6.39 kernel, available also for
   older kernels)

================================================================
Index: packages/ipset/ipset-no_kernel.patch
diff -u /dev/null packages/ipset/ipset-no_kernel.patch:1.1
--- /dev/null	Fri Apr 15 14:09:12 2011
+++ packages/ipset/ipset-no_kernel.patch	Fri Apr 15 14:09:06 2011
@@ -0,0 +1,30 @@
+--- ipset-6.3/configure.ac.orig	2011-04-10 17:25:20.000000000 +0200
++++ ipset-6.3/configure.ac	2011-04-15 14:07:22.000000000 +0200
+@@ -39,27 +39,6 @@
+ else
+ 	ksourcedir="/lib/modules/$(uname -r)/source"
+ fi
+-if test ! -e "$ksourcedir/include/linux/netfilter/nfnetlink.h"
+-then
+-	AC_MSG_ERROR([Invalid kernel source directory $ksourcedir])
+-fi
+-
+-if test ! -e "$kbuilddir/.config"
+-then
+-	AC_MSG_ERROR([The kernel build directory $kbuilddir is not configured])
+-fi
+-
+-AC_PROG_GREP
+-
+-if test "X`$GREP '^CONFIG_IP6_NF_IPTABLES=' $kbuilddir/.config`" = "X"
+-then
+-	AC_MSG_ERROR([The kernel build directory $kbuilddir is not configured with IP6_NF_IPTABLES support (ip6tables)])
+-fi
+-
+-if test "X`$GREP 'NFNL_SUBSYS_IPSET' $ksourcedir/include/linux/netfilter/nfnetlink.h`" = "X"
+-then
+-	AC_MSG_ERROR([The kernel source directory $ksourcedir is not patched with netlink.patch to support ipset])
+-fi
+ 
+ dnl Maximal number of sets supported by the kernel, default 256
+ AC_ARG_WITH([maxsets],
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/ipset/ipset.spec?r1=1.109&r2=1.110&f=u



More information about the pld-cvs-commit mailing list