- use nf_ext_init instead of my_init for extension constructors
- use kernel-headers package for KBUILD_OUTPUT
This commit is contained in:
parent
bfc8fd6a19
commit
0de8b7db13
@ -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 <twoerner@redhat.com> 1.3.8-6
|
||||
- fixed leaked file descriptor before fork/exec (rhbz#312191)
|
||||
|
Loading…
Reference in New Issue
Block a user