[9045] | 1 | Name: xtables-addons |
---|
| 2 | Summary: Extensions targets and matches for iptables |
---|
[10399] | 3 | Version: 2.10 |
---|
[9045] | 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 |
---|
[10399] | 158 | * Sun Jun 26 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.10-1 |
---|
| 159 | - new upstream release. |
---|
| 160 | |
---|
[9779] | 161 | * Sat Oct 31 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.9-1 |
---|
| 162 | - new upstream release. |
---|
| 163 | |
---|
[9648] | 164 | * Tue Jul 7 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.7-1 |
---|
| 165 | - new upstream release. |
---|
| 166 | |
---|
| 167 | * Sat Nov 1 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.6-1 |
---|
[9045] | 168 | - built for Vine Linux. |
---|
| 169 | - new upstream release. |
---|
| 170 | |
---|
| 171 | * Sat Apr 26 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.5-1 |
---|
| 172 | - Update to 2.5 |
---|
| 173 | |
---|
| 174 | * Sun Jan 12 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.4-1 |
---|
| 175 | - Update to 2.4 |
---|
| 176 | |
---|
| 177 | * Tue Jun 18 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.3-1 |
---|
| 178 | - Update to 2.3 |
---|
| 179 | |
---|
| 180 | * Thu Apr 18 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.2-1 |
---|
| 181 | - Update to 2.2 |
---|
| 182 | |
---|
| 183 | * Mon Jan 14 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1-1 |
---|
| 184 | - Update to 2.1 |
---|
| 185 | |
---|
| 186 | * Thu Oct 18 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.47.1-1 |
---|
| 187 | - Update to 1.47.1 |
---|
| 188 | |
---|
| 189 | * Wed Oct 03 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.46-1 |
---|
| 190 | - Update to 1.46 |
---|
| 191 | |
---|
| 192 | * Tue Jul 31 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.45-1 |
---|
| 193 | - Update to 1.45 |
---|
| 194 | |
---|
| 195 | * Thu Jun 14 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.42-3 |
---|
| 196 | - Fix ipset path in F-16 and later |
---|
| 197 | |
---|
| 198 | * Tue Jun 05 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.42-2 |
---|
| 199 | - Fix for UsrMove - rfbz#2360 |
---|
| 200 | - Fix Conflict with ipset - rfbz#2201 |
---|
| 201 | - Add Requires ipset >= 6.11 - rfbz#2226 |
---|
| 202 | |
---|
| 203 | * Thu Apr 12 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.42-1 |
---|
| 204 | - Update to 1.42 |
---|
| 205 | |
---|
| 206 | * Tue Jan 24 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.41-1 |
---|
| 207 | - Update to 1.41 |
---|
| 208 | |
---|
| 209 | * Thu Nov 17 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.39-1 |
---|
| 210 | - Update to 1.39 |
---|
| 211 | |
---|
| 212 | * Wed Oct 27 2010 Chen Lei <supercyper@163.com> - 1.30-1 |
---|
| 213 | - update to 1.30 |
---|
| 214 | |
---|
| 215 | * Sun Jul 25 2010 Chen Lei <supercyper@163.com> - 1.28-1 |
---|
| 216 | - update to 1.28 |
---|
| 217 | |
---|
| 218 | * Mon Jun 28 2010 Chen Lei <supercyper@163.com> - 1.27-2 |
---|
| 219 | - rebuild for kernel 2.6.35 |
---|
| 220 | |
---|
| 221 | * Mon May 31 2010 Chen Lei <supercyper@163.com> - 1.27-1 |
---|
| 222 | - update to 1.27 |
---|
| 223 | |
---|
| 224 | * Sun May 02 2010 Chen Lei <supercyper@163.com> - 1.26-1 |
---|
| 225 | - update to 1.26 |
---|
| 226 | |
---|
| 227 | * Mon Apr 26 2010 Chen Lei <supercyper@163.com> - 1.25-1 |
---|
| 228 | - update to 1.25 |
---|
| 229 | |
---|
| 230 | * Sun Apr 25 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.24-2 |
---|
| 231 | - rebuilt |
---|
| 232 | |
---|
| 233 | * Thu Mar 18 2010 Chen Lei <supercyper@163.com> - 1.24-1 |
---|
| 234 | - initial rpm build |
---|