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