From 0de8b7db130dfb2ac453b392a3418fd7acaa28f6 Mon Sep 17 00:00:00 2001 From: Thomas Woerner Date: Mon, 11 Feb 2008 15:16:43 +0000 Subject: [PATCH] - use nf_ext_init instead of my_init for extension constructors - use kernel-headers package for KBUILD_OUTPUT --- iptables.spec | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/iptables.spec b/iptables.spec index 0a125da..60687d8 100644 --- a/iptables.spec +++ b/iptables.spec @@ -64,23 +64,27 @@ find . -type f -exec perl -pi -e "s,/usr/local,%{_prefix},g" {} \; # do not use ld -shared and _init perl -pi -e "s/\(LD\) -shared/\(CC\) -shared/g" Rules.make -perl -pi -e "s/void _init\(/void __attribute\(\(constructor\)\) my_init\(/g" extensions/*.c -perl -pi -e "s/^_init\(/__attribute\(\(constructor\)\) my_init\(/g" extensions/*.c +perl -pi -e "s/void _init\(/void __attribute\(\(constructor\)\) nf_ext_init\(/g" extensions/*.c +perl -pi -e "s/^_init\(/__attribute\(\(constructor\)\) nf_ext_init\(/g" extensions/*.c %build TOPDIR=`pwd` OPT="$RPM_OPT_FLAGS -I$TOPDIR/include -fPIC" +export KERNEL_DIR=/usr +export KBUILD_OUTPUT=/usr export DO_SELINUX=1 -make COPT_FLAGS="$OPT" KERNEL_DIR=/usr LIBDIR=/%{_lib} -make COPT_FLAGS="$OPT" KERNEL_DIR=/usr LIBDIR=/%{_lib} iptables-save iptables-restore -make COPT_FLAGS="$OPT" KERNEL_DIR=/usr LIBDIR=/%{_lib} ip6tables-save ip6tables-restore +make COPT_FLAGS="$OPT" LIBDIR=/%{_lib} +make COPT_FLAGS="$OPT" LIBDIR=/%{_lib} iptables-save iptables-restore +make COPT_FLAGS="$OPT" LIBDIR=/%{_lib} ip6tables-save ip6tables-restore %install rm -rf %{buildroot} +export KERNEL_DIR=/usr +export KBUILD_OUTPUT=/usr export DO_SELINUX=1 -make install DESTDIR=%{buildroot} KERNEL_DIR=/usr BINDIR=/sbin LIBDIR=/%{_lib} MANDIR=%{_mandir} +make install DESTDIR=%{buildroot} BINDIR=/sbin LIBDIR=/%{_lib} MANDIR=%{_mandir} %if %{build_devel} -make install-devel DESTDIR=%{buildroot} KERNEL_DIR=/usr BINDIR=/sbin LIBDIR=%{_libdir} MANDIR=%{_mandir} +make install-devel DESTDIR=%{buildroot} BINDIR=/sbin LIBDIR=%{_libdir} MANDIR=%{_mandir} %endif cp ip{6,}tables-{save,restore} $RPM_BUILD_ROOT/sbin cp iptables-*.8 $RPM_BUILD_ROOT%{_mandir}/man8 @@ -154,6 +158,7 @@ fi - new version 1.4.0 - fixed condrestart (rhbz#428148) - report the module in rmmod_r if there is an error +- use nf_ext_init instead of my_init for extension constructors * Mon Nov 5 2007 Thomas Woerner 1.3.8-6 - fixed leaked file descriptor before fork/exec (rhbz#312191)