1 | Name: xtables-addons |
---|
2 | Summary: Extensions targets and matches for iptables |
---|
3 | Version: 2.12 |
---|
4 | Release: 1%{?dist} |
---|
5 | # The entire source code is GPLv2 except ACCOUNT/libxt_ACCOUNT_cl.* which is LGPLv2 |
---|
6 | License: GPLv2 and LGPLv2 |
---|
7 | Group: System Environment/Base |
---|
8 | URL: http://xtables-addons.sourceforge.net |
---|
9 | Source0: http://dl.sourceforge.net/xtables-addons/Xtables-addons/%{version}/xtables-addons-%{version}.tar.xz |
---|
10 | Source1: ipset.init |
---|
11 | Source2: ipset-config |
---|
12 | BuildRequires: iptables-devel >= 1.4.5 |
---|
13 | BuildRequires: autoconf automake libtool |
---|
14 | Provides: %{name}-kmod-common = %{version} |
---|
15 | Requires(post): chkconfig |
---|
16 | Requires(preun): chkconfig |
---|
17 | # This is for /sbin/service |
---|
18 | Requires(preun): initscripts |
---|
19 | Requires(postun): initscripts |
---|
20 | Requires: ipset >= 6.11 |
---|
21 | Obsoletes: %{name}-devel < 1.27-1 |
---|
22 | |
---|
23 | %description |
---|
24 | Xtables-addons provides extra modules for iptables not present in the kernel, |
---|
25 | and is the successor of patch-o-matic. Extensions includes new targets like |
---|
26 | TEE, TARPIT, CHAOS, or modules like geoip, ipset, and account. |
---|
27 | |
---|
28 | This package provides the userspace libraries for iptables to use extensions |
---|
29 | in the %{name}-kmod package. You must also install the |
---|
30 | %{name}-kmod package. |
---|
31 | |
---|
32 | %package -n dkms-%{name} |
---|
33 | Summary: dkms package for xtables-addons |
---|
34 | Group: System Environment/Kernel |
---|
35 | Requires: dkms |
---|
36 | Requires: kernel-devel >= 3.7 |
---|
37 | Requires(post): dkms |
---|
38 | Requires(preun):dkms |
---|
39 | |
---|
40 | %description -n dkms-%{name} |
---|
41 | This contains the dkms package building the xtables-addons kernel modules. |
---|
42 | |
---|
43 | %prep |
---|
44 | %setup -q -n %{name}-%{version} |
---|
45 | ./autogen.sh |
---|
46 | if [ ! -e /%{_lib}/xtables/libxt_CHECKSUM.so ]; then |
---|
47 | sed -i 's/build_CHECKSUM=/build_CHECKSUM=m/' mconfig |
---|
48 | fi |
---|
49 | if [ ! -e /%{_lib}/xtables/libxt_TEE.so ]; then |
---|
50 | sed -i 's/build_TEE=/build_TEE=m/' mconfig |
---|
51 | fi |
---|
52 | sed -i 's/build_ipset6=/build_ipset6=m/' mconfig |
---|
53 | |
---|
54 | %build |
---|
55 | %configure --without-kbuild |
---|
56 | |
---|
57 | make V=1 %{?_smp_mflags} |
---|
58 | |
---|
59 | %install |
---|
60 | make DESTDIR=%{buildroot} install |
---|
61 | |
---|
62 | # We add xt_geoip database scripts manually |
---|
63 | rm -rf %{buildroot}%{_libexecdir} |
---|
64 | rm -f geoip/{Makefile*,.gitignore} |
---|
65 | chmod 0644 geoip/* |
---|
66 | |
---|
67 | # There is no -devel package. So no need for these files |
---|
68 | rm -f %{buildroot}%{_libdir}/*.{la,so} |
---|
69 | |
---|
70 | # install init scripts and configuration files |
---|
71 | install -D -pm 0755 %{SOURCE1} %{buildroot}%{_initddir}/ipset |
---|
72 | install -D -pm 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/ipset-config |
---|
73 | |
---|
74 | # prepare the dkms sources |
---|
75 | mkdir -p %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/ACCOUNT %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/pknock |
---|
76 | cp extensions/Kbuild extensions/Mbuild mconfig extensions/Makefile* extensions/mac.c extensions/xt_* extensions/compat_* %{buildroot}%{_usr}/src/%{name}-%{version}-%{release} |
---|
77 | cp extensions/ACCOUNT/Kbuild extensions/ACCOUNT/Mbuild extensions/ACCOUNT/Makefile* extensions/ACCOUNT/xt_* %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/ACCOUNT |
---|
78 | cp extensions/pknock/Kbuild extensions/pknock/Mbuild extensions/pknock/Makefile* extensions/pknock/xt_* %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/pknock |
---|
79 | |
---|
80 | # mconfig is not in parent dir anymore |
---|
81 | sed -i 's/${XA_ABSTOPSRCDIR}/${M}/' %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/Kbuild |
---|
82 | |
---|
83 | # remove ipset-6 references to silence make clean errors |
---|
84 | sed -i '/ipset-6/ d' %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/Kbuild |
---|
85 | sed -i '/ipset-6/ d' %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/Mbuild |
---|
86 | |
---|
87 | cat > %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/dkms.conf << EOF |
---|
88 | PACKAGE_NAME="%{name}" |
---|
89 | PACKAGE_VERSION="%{version}-%{release}" |
---|
90 | AUTOINSTALL="yes" |
---|
91 | MAKE[0]="make -C \${kernel_source_dir} M=\\\$(pwd)" |
---|
92 | CLEAN="make -C \${kernel_source_dir} M=\\\$(pwd) clean" |
---|
93 | BUILT_MODULE_LOCATION[0]="ACCOUNT" |
---|
94 | DEST_MODULE_LOCATION[0]="/kernel/extra" |
---|
95 | BUILT_MODULE_NAME[0]="xt_ACCOUNT" |
---|
96 | BUILT_MODULE_LOCATION[1]="pknock" |
---|
97 | DEST_MODULE_LOCATION[1]="/kernel/extra" |
---|
98 | BUILT_MODULE_NAME[1]="xt_pknock" |
---|
99 | EOF |
---|
100 | |
---|
101 | i=2 |
---|
102 | for mod in compat_xtables xt_CHAOS \ |
---|
103 | xt_condition xt_DELUDE xt_DHCPMAC xt_DNETMAP xt_fuzzy xt_geoip xt_iface \ |
---|
104 | xt_IPMARK xt_ipp2p xt_ipv4options xt_length2 xt_LOGMARK xt_lscan xt_psd \ |
---|
105 | xt_quota2 xt_SYSRQ xt_TARPIT; do |
---|
106 | echo -e "DEST_MODULE_LOCATION[$i]=\"/kernel/extra\"\nBUILT_MODULE_NAME[$i]=\"$mod\"" >> %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/dkms.conf |
---|
107 | (( i = $i + 1 )) |
---|
108 | done |
---|
109 | |
---|
110 | install -m755 geoip/xt_geoip_dl %{buildroot}%{_sbindir}/ |
---|
111 | install -m755 geoip/xt_geoip_build %{buildroot}%{_sbindir}/ |
---|
112 | |
---|
113 | %post |
---|
114 | /sbin/ldconfig |
---|
115 | /sbin/chkconfig --add ipset |
---|
116 | |
---|
117 | %preun |
---|
118 | if [ $1 = 0 ] ; then |
---|
119 | /sbin/service ipset stop >/dev/null 2>&1 |
---|
120 | /sbin/chkconfig --del ipset |
---|
121 | fi |
---|
122 | |
---|
123 | %postun |
---|
124 | /sbin/ldconfig |
---|
125 | if [ "$1" -ge "1" ] ; then |
---|
126 | /sbin/service ipset condrestart >/dev/null 2>&1 || : |
---|
127 | fi |
---|
128 | |
---|
129 | %post -n dkms-%{name} |
---|
130 | set -x |
---|
131 | /usr/sbin/dkms add -m %{name} -v %{version}-%{release} --rpm_safe_upgrade && |
---|
132 | /usr/sbin/dkms build -m %{name} -v %{version}-%{release} --rpm_safe_upgrade && |
---|
133 | /usr/sbin/dkms install -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --force |
---|
134 | true |
---|
135 | |
---|
136 | %preun -n dkms-%{name} |
---|
137 | set -x |
---|
138 | /usr/sbin/dkms remove -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --all |
---|
139 | true |
---|
140 | |
---|
141 | %clean |
---|
142 | rm -rf %{buildroot} |
---|
143 | |
---|
144 | %files |
---|
145 | %defattr(-,root,root,-) |
---|
146 | %doc LICENSE README doc/* geoip |
---|
147 | %attr(0755,root,root) %{_initddir}/* |
---|
148 | %config(noreplace) %{_sysconfdir}/sysconfig/* |
---|
149 | /%{_lib}/xtables/*.so |
---|
150 | %{_libdir}/*.so.* |
---|
151 | %{_sbindir}/* |
---|
152 | %{_mandir}/man?/* |
---|
153 | |
---|
154 | %files -n dkms-%{name} |
---|
155 | %{_usr}/src/%{name}-%{version}-%{release} |
---|
156 | |
---|
157 | %changelog |
---|
158 | * Mon May 8 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.12-1 |
---|
159 | - new upstream release. |
---|
160 | |
---|
161 | * Sun Jun 26 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.10-1 |
---|
162 | - new upstream release. |
---|
163 | |
---|
164 | * Sat Oct 31 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.9-1 |
---|
165 | - new upstream release. |
---|
166 | |
---|
167 | * Tue Jul 7 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.7-1 |
---|
168 | - new upstream release. |
---|
169 | |
---|
170 | * Sat Nov 1 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.6-1 |
---|
171 | - built for Vine Linux. |
---|
172 | - new upstream release. |
---|
173 | |
---|
174 | * Sat Apr 26 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.5-1 |
---|
175 | - Update to 2.5 |
---|
176 | |
---|
177 | * Sun Jan 12 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.4-1 |
---|
178 | - Update to 2.4 |
---|
179 | |
---|
180 | * Tue Jun 18 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.3-1 |
---|
181 | - Update to 2.3 |
---|
182 | |
---|
183 | * Thu Apr 18 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.2-1 |
---|
184 | - Update to 2.2 |
---|
185 | |
---|
186 | * Mon Jan 14 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1-1 |
---|
187 | - Update to 2.1 |
---|
188 | |
---|
189 | * Thu Oct 18 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.47.1-1 |
---|
190 | - Update to 1.47.1 |
---|
191 | |
---|
192 | * Wed Oct 03 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.46-1 |
---|
193 | - Update to 1.46 |
---|
194 | |
---|
195 | * Tue Jul 31 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.45-1 |
---|
196 | - Update to 1.45 |
---|
197 | |
---|
198 | * Thu Jun 14 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.42-3 |
---|
199 | - Fix ipset path in F-16 and later |
---|
200 | |
---|
201 | * Tue Jun 05 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.42-2 |
---|
202 | - Fix for UsrMove - rfbz#2360 |
---|
203 | - Fix Conflict with ipset - rfbz#2201 |
---|
204 | - Add Requires ipset >= 6.11 - rfbz#2226 |
---|
205 | |
---|
206 | * Thu Apr 12 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.42-1 |
---|
207 | - Update to 1.42 |
---|
208 | |
---|
209 | * Tue Jan 24 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.41-1 |
---|
210 | - Update to 1.41 |
---|
211 | |
---|
212 | * Thu Nov 17 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.39-1 |
---|
213 | - Update to 1.39 |
---|
214 | |
---|
215 | * Wed Oct 27 2010 Chen Lei <supercyper@163.com> - 1.30-1 |
---|
216 | - update to 1.30 |
---|
217 | |
---|
218 | * Sun Jul 25 2010 Chen Lei <supercyper@163.com> - 1.28-1 |
---|
219 | - update to 1.28 |
---|
220 | |
---|
221 | * Mon Jun 28 2010 Chen Lei <supercyper@163.com> - 1.27-2 |
---|
222 | - rebuild for kernel 2.6.35 |
---|
223 | |
---|
224 | * Mon May 31 2010 Chen Lei <supercyper@163.com> - 1.27-1 |
---|
225 | - update to 1.27 |
---|
226 | |
---|
227 | * Sun May 02 2010 Chen Lei <supercyper@163.com> - 1.26-1 |
---|
228 | - update to 1.26 |
---|
229 | |
---|
230 | * Mon Apr 26 2010 Chen Lei <supercyper@163.com> - 1.25-1 |
---|
231 | - update to 1.25 |
---|
232 | |
---|
233 | * Sun Apr 25 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.24-2 |
---|
234 | - rebuilt |
---|
235 | |
---|
236 | * Thu Mar 18 2010 Chen Lei <supercyper@163.com> - 1.24-1 |
---|
237 | - initial rpm build |
---|