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)