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