1 |
|
# buildforkernels macro hint: when you build a new version or a new release |
2 |
|
# that contains bugfixes or other improvements then you must disable the |
3 |
|
# "buildforkernels newest" macro for just that build; immediately after |
4 |
|
# queuing that build enable the macro again for subsequent builds; that way |
5 |
|
# a new akmod package will only get build when a new one is actually needed |
6 |
|
%global buildforkernels current |
7 |
|
|
8 |
|
#FIXME xtables-kmod doesn't use the appropriate cflags |
9 |
|
%global debug_package %{nil} |
10 |
|
|
11 |
%define name xtables-addons-kmod |
%define name xtables-addons-kmod |
12 |
%define name_src xtables-addons |
%define name_src xtables-addons |
13 |
%define version 1.47.1 |
%define version 1.47.1 |
14 |
%define release 5 |
%define release 10 |
15 |
Summary: %{name} is a set of additional extensions for the Xtables packet filter (modules kmod ONLY). |
Summary: %{name} is a set of additional extensions for the Xtables packet filter (modules kmod ONLY). |
16 |
Name: %{name} |
Name: %{name} |
17 |
Version: %{version} |
Version: %{version} |
24 |
URL: http://xtables-addons.sourceforge.net |
URL: http://xtables-addons.sourceforge.net |
25 |
Patch0: xtables-addons-1.47.1-v6.patch |
Patch0: xtables-addons-1.47.1-v6.patch |
26 |
Packager: Michel Begue <mab974@gmail.com> |
Packager: Michel Begue <mab974@gmail.com> |
|
BuildRoot: %RPM_BUILD_ROOT |
|
27 |
#Requires: smeserver-release >= 9.0 |
#Requires: smeserver-release >= 9.0 |
28 |
Requires: xtables-addons >= 1.47.1-4 |
Requires: xtables-addons >= 1.47.1-4 |
29 |
#Requires: kernel = 2.6.32-696 |
#Requires: kernel = 2.6.32-696 |
30 |
Requires: kernel = 2.6.32-696.28.1.el6 |
#Requires: kernel = 2.6.32-696.28.1.el6 |
31 |
BuildRequires: e-smith-devtools |
BuildRequires: e-smith-devtools |
32 |
BuildRequires: iptables-devel |
BuildRequires: iptables-devel |
33 |
BuildRequires: %{_bindir}/kmodtool |
BuildRequires: %{_bindir}/kmodtool |
34 |
AutoReqProv: no |
ExclusiveArch: x86_64 |
35 |
|
Requires(post): /sbin/weak-modules |
36 |
|
Requires(postun): /sbin/weak-modules |
37 |
|
|
38 |
|
%{!?kernels:BuildRequires: buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu} } |
39 |
|
|
40 |
|
# kmodtool does its magic here |
41 |
|
%{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } |
42 |
|
|
43 |
|
|
44 |
%description |
%description |
45 |
%{name} is a set of additional extensions for the Xtables packet filter that is present in the Linux kernel (modules kmod ONLY). |
%{name} is a set of additional extensions for the Xtables packet filter that is present in the Linux kernel (modules kmod ONLY). |
46 |
It is just a "kernel update" release. |
It is just a "kernel update" release. |
47 |
|
|
48 |
%changelog |
%changelog |
49 |
* Wed Feb 06 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.47.1-5.sme |
* Tue Feb 19 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.47.1-10.sme |
50 |
|
- add weak-modules as post and postun [SME: 10739] |
51 |
|
|
52 |
|
* Sun Feb 17 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.47.1-9.sme |
53 |
|
- fix Requires: xtables-addons-kmod-common [SME: 10734] |
54 |
|
- revert change from -8 for -9 |
55 |
|
|
56 |
|
* Wed Feb 06 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.47.1-7.sme |
57 |
- first import to SME buildsys [SME: 10734] |
- first import to SME buildsys [SME: 10734] |
58 |
- add buildrequires iptables-devel |
- add buildrequires iptables-devel |
59 |
|
- update spec files according to rpmfusion way, |
60 |
|
add buildsys-build-rpmfusion-kerneldevpkgs requirement from rpmfusion |
61 |
|
- workaround for install dir lib while script send it to usr/lib |
62 |
|
- set current |
63 |
|
- set archs x86_6, as no i386 buildsys-build-rpmfusion-kerneldevpkgs available to build |
64 |
|
- TODO: try to build i386 using i686 buildsys-build-rpmfusion-kerneldevpkgs |
65 |
|
|
66 |
* Thu Mar 15 2018 Mab974 <mab974@gmail.com> |
* Thu Mar 15 2018 Mab974 <mab974@gmail.com> |
67 |
- compiled for kernel version 2.6.32-696.23.1.el6.x86_64 |
- compiled for kernel version 2.6.32-696.23.1.el6.x86_64 |
75 |
- patch disable WITH_IPV6 in extra/*c (-v6) |
- patch disable WITH_IPV6 in extra/*c (-v6) |
76 |
|
|
77 |
%prep |
%prep |
|
|
|
|
#%setup -n %{name_src}-%{version} |
|
|
#%patch0 -p1 |
|
|
|
|
|
#./configure --prefix=/usr --with-kbuild= |
|
|
|
|
78 |
# error out if there was something wrong with kmodtool |
# error out if there was something wrong with kmodtool |
79 |
%{?kmodtool_check} |
%{?kmodtool_check} |
80 |
# print kmodtool output for debugging purposes: |
# print kmodtool output for debugging purposes: |
81 |
kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null |
kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null |
82 |
|
|
83 |
%setup -q -c -T -a 0 |
%setup -q -c -T -a 0 |
84 |
%patch0 -p1 |
%patch0 |
85 |
for kernel_version in %{?kernel_versions} ; do |
for kernel_version in %{?kernel_versions} ; do |
86 |
cp -a xtables-addons-%{version} _kmod_build_${kernel_version%%___*} |
cp -a xtables-addons-%{version} _kmod_build_${kernel_version%%___*} |
87 |
done |
done |
88 |
|
|
|
|
|
89 |
%build |
%build |
90 |
|
#ls -l /usr/src/kernels/2.6.32-754.el6.x86_64/include/config/auto.conf >&2 |
91 |
for kernel_version in %{?kernel_versions} ; do |
for kernel_version in %{?kernel_versions} ; do |
92 |
|
if ! grep -q 'XT_TARGET_TEE=m' %{_usrsrc}/kernels/${kernel_version%%___*}/.config; then |
93 |
|
sed -i 's/build_TEE=/build_TEE=m/' _kmod_build_${kernel_version%%___*}/mconfig |
94 |
|
fi |
95 |
|
if ! grep -q 'XT_TARGET_CHECKSUM=m' %{_usrsrc}/kernels/${kernel_version%%___*}/.config; then |
96 |
|
sed -i 's/build_CHECKSUM=/build_CHECKSUM=m/' _kmod_build_${kernel_version%%___*}/mconfig |
97 |
|
fi |
98 |
export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*} |
export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*} |
99 |
make %{?_smp_mflags} V=1 -C "${kernel_version##*___}" M=${PWD}/_kmod_build_${kernel_version%%___*}/extensions modules |
make %{?_smp_mflags} V=1 -C "${kernel_version##*___}" M=${PWD}/_kmod_build_${kernel_version%%___*}/extensions modules |
100 |
done |
done |
101 |
|
|
|
|
|
|
#%build |
|
|
#%{__make} |
|
|
|
|
102 |
%install |
%install |
103 |
%{__rm} -rf %{buildroot} |
for kernel_version in %{?kernel_versions} ; do |
104 |
%{__make} install DESTDIR="%{buildroot}" |
export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*} |
105 |
%{__rm} -rf %{buildroot}/lib64/ |
make %{?_smp_mflags} V=1 -C "${kernel_version##*___}" M=${PWD}/_kmod_build_${kernel_version%%___*}/extensions _emodinst_ INSTALL_MOD_PATH=%{buildroot}%{_prefix} ext-mod-dir=%{kmodinstdir_postfix} |
106 |
%{__rm} -rf %{buildroot}/usr/ |
# workaround to avoid error at file stage, it seems that we are installing it in /usr/lib and files script is waiting it in /lib... |
107 |
|
mv %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/../lib |
108 |
|
done |
109 |
|
%{?akmod_install} |
110 |
|
|
111 |
%clean |
%clean |
112 |
%{__rm} -rf %{buildroot} |
%{__rm} -rf %{buildroot} |
113 |
|
|
114 |
%pre |
%pre |
115 |
|
|
116 |
%post |
%post -n %{name} |
117 |
|
/sbin/weak-modules --add-kernel |
118 |
|
|
119 |
%preun |
%preun |
120 |
|
|
121 |
%postun |
%postun -n %{name} |
122 |
|
/sbin/weak-modules --add-kernel |
123 |
|
|
124 |
%files |
%files |
125 |
%defattr(-, root, root, 0755) |
%defattr(-, root, root, 0755) |