packages: iptables/iptables.spec - allow to build ipt_IPV4OPTSSTRIP, ipt_rpc...

qboosh qboosh at pld-linux.org
Sun Feb 6 12:43:07 CET 2011


Author: qboosh                       Date: Sun Feb  6 11:43:07 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- allow to build ipt_IPV4OPTSSTRIP,ipt_rpc,xt_layer7 on non-dist kernel (using individual bconds)
- vserver enabled by default only when building with dist_kernel
- headers from kernel source are needed only when building some additional modules;
  kernel sources no longer needed
- netfilter_snap no longer relevant

---- Files affected:
packages/iptables:
   iptables.spec (1.294 -> 1.295) 

---- Diffs:

================================================================
Index: packages/iptables/iptables.spec
diff -u packages/iptables/iptables.spec:1.294 packages/iptables/iptables.spec:1.295
--- packages/iptables/iptables.spec:1.294	Sun Feb  6 12:06:24 2011
+++ packages/iptables/iptables.spec	Sun Feb  6 12:43:01 2011
@@ -1,18 +1,29 @@
 # $Revision$, $Date$
 #
 # TODO:
+# - update BR to real required llh version
 # - fix makefile (-D_UNKNOWN_KERNEL_POINTER_SIZE issue)
 # - owner needs rewrite to xt
 #
 # Conditional build:
 %bcond_without	doc		# without documentation (HOWTOS) which needed TeX
 %bcond_without	dist_kernel	# without distribution kernel
-%bcond_without	vserver		# build xt_owner module for kernel without vserver support
+%bcond_with	vserver		# build xt_owner module for non-dist kernel with vserver support
 %bcond_with	batch		# build iptables-batch
 %bcond_with	static		# build static libraries, no dynamic modules (all linked into binaries)
+%bcond_with	ipt_IPV4OPTSSTRIP # enable ipt_IPV4OPTSSTRIP for non-dist kernel
+%bcond_with	ipt_rpc		# enable ipt_rpc for non-dist kernel (needs ipt_rpc.h header)
+%bcond_with	xt_layer7	# enable xt_layer7 for non-dist kernel (needs xt_layer7.h header)
+%bcond_with	usekernelsrc	# include kernel headers from %{_kernelsrcdir}
+
+%if %{with dist_kernel}
+%define	with_ipt_IPV4OPTSSTRIP	1
+%define	with_ipt_rpc		1
+%define	with_xt_layer7		1
+%define	with_vserver		1
+%define	with_usekernelsrc	1
+%endif
 
-%define		netfilter_snap		20070806
-%define		llh_version		7:2.6.22.1
 %define		name6			ip6tables
 Summary:	Extensible packet filtering system && extensible NAT system
 Summary(pl.UTF-8):	System filtrowania pakietów oraz system translacji adresów (NAT)
@@ -31,13 +42,13 @@
 # Source1-md5:	2ed2b452daefe70ededd75dc0061fd07
 Source2:	%{name}.init
 Source3:	%{name6}.init
-# GENERAL CHANGES (patches<10):
+# --- GENERAL CHANGES (patches<10):
 Patch0:		%{name}-man.patch
 # additional utils; off by default
 Patch1:		%{name}-batch.patch
-# ADDITIONAL/CHANGED EXTENSIONS:
+# --- ADDITIONAL/CHANGED EXTENSIONS:
 # just ipt_IPV4OPTSSTRIP now
-Patch10:	%{name}-%{netfilter_snap}.patch
+Patch10:	%{name}-20070806.patch
 # xt_layer7; almost based on iptables-1.4-for-kernel-2.6.20forward-layer7-2.18.patch
 # http://downloads.sourceforge.net/l7-filter/netfilter-layer7-v2.18.tar.gz
 Patch11:	%{name}-layer7.patch
@@ -67,13 +78,11 @@
 BuildRequires:	tetex-latex
 BuildRequires:	tetex-tex-babel
 %endif
-%if %{with dist_kernel} && %{netfilter_snap} != 0
+%if %{with dist_kernel}
 # needed for xt_layer7, ipt_rpc
-BuildRequires:	kernel%{_alt_kernel}-headers(netfilter) >= %{netfilter_snap}
-BuildRequires:	kernel%{_alt_kernel}-source
+BuildRequires:	kernel%{_alt_kernel}-headers(netfilter)
 %endif
-#BuildRequires:	linux-libc-headers >= %{llh_version}
-BuildConflicts:	kernel-headers < 2.3.0
+BuildRequires:	linux-libc-headers >= 7:2.6.22.1
 Requires:	%{name}-libs = %{version}-%{release}
 Requires:	libnfnetlink >= 1.0
 Provides:	firewall-userspace-tool
@@ -172,11 +181,9 @@
 %if %{with batch}
 %patch1 -p1
 %endif
-%if %{with dist_kernel}
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%endif
+%{?with_ipt_IPV4OPTSSTRIP:%patch10 -p1}
+%{?with_xt_layer7:%patch11 -p1}
+%{?with_ipt_rpc:%patch12 -p1}
 %patch13 -p0
 %if %{with vserver}
 #patch14 -p1
@@ -189,11 +196,11 @@
 %{__libtoolize}
 %{__aclocal} -I m4
 %{__autoconf}
+%{__autoheader}
 %{__automake}
 %configure \
 	CFLAGS="%{rpmcflags} %{rpmcppflags} -D%{!?debug:N}DEBUG" \
-	--with-kbuild=%{_kernelsrcdir} \
-	--with-ksource=%{_kernelsrcdir} \
+	%{?with_usekernelsrc:--with-kernel=%{_kernelsrcdir}} \
 	--enable-libipq \
 	%{?with_static:--enable-static}
 
@@ -355,11 +362,9 @@
 %attr(755,root,root) %{_libdir}/xtables/libxt_tos.so
 %attr(755,root,root) %{_libdir}/xtables/libxt_u32.so
 %attr(755,root,root) %{_libdir}/xtables/libxt_udp.so
-%if %{with dist_kernel}
-%attr(755,root,root) %{_libdir}/xtables/libipt_IPV4OPTSSTRIP.so
-%attr(755,root,root) %{_libdir}/xtables/libipt_rpc.so
-%attr(755,root,root) %{_libdir}/xtables/libxt_layer7.so
-%endif
+%{?with_ipt_IPV4OPTSSTRIP:%attr(755,root,root) %{_libdir}/xtables/libipt_IPV4OPTSSTRIP.so}
+%{?with_ipt_rpc:%attr(755,root,root) %{_libdir}/xtables/libipt_rpc.so}
+%{?with_xt_layer7:%attr(755,root,root) %{_libdir}/xtables/libxt_layer7.so}
 %{_mandir}/man8/ip6tables.8*
 %{_mandir}/man8/ip6tables-restore.8*
 %{_mandir}/man8/ip6tables-save.8*
@@ -423,6 +428,13 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.295  2011/02/06 11:43:01  qboosh
+- allow to build ipt_IPV4OPTSSTRIP,ipt_rpc,xt_layer7 on non-dist kernel (using individual bconds)
+- vserver enabled by default only when building with dist_kernel
+- headers from kernel source are needed only when building some additional modules;
+  kernel sources no longer needed
+- netfilter_snap no longer relevant
+
 Revision 1.294  2011/02/06 11:06:24  qboosh
 - renumbered patches
 - base R: -libs, libnfnetlink
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/iptables/iptables.spec?r1=1.294&r2=1.295&f=u



More information about the pld-cvs-commit mailing list