Browse Source

xtables-addons-2.6-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@9045 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 9 years ago
parent
commit
128c4ed75c
2 changed files with 446 additions and 0 deletions
  1. 221 0
      i/ipset/ipset-vl.spec
  2. 225 0
      x/xtables-addons/xtables-addons-vl.spec

+ 221 - 0
i/ipset/ipset-vl.spec

@@ -0,0 +1,221 @@
+Name:             ipset
+Version:          6.23
+Release:          1%{?_dist_release}
+Group:            Applications/System
+Summary:          Manage Linux IP sets
+
+License:          GPLv2
+URL:              http://ipset.netfilter.org/
+Source0:          http://ipset.netfilter.org/%{name}-%{version}.tar.bz2
+Source1:          %{name}.service
+Source2:          %{name}.start-stop
+
+BuildRequires:    libmnl-devel
+
+# An explicit requirement is needed here, to avoid cases where a user would
+# explicitly update only one of the two (e.g 'yum update ipset')
+Requires:         %{name}-libs%{?_isa} = %{version}-%{release}
+
+%description
+IP sets are a framework inside the Linux 2.4.x and 2.6.x kernel, which can be
+administered by the ipset utility. Depending on the type, currently an IP set
+may store IP addresses, (TCP/UDP) port numbers or IP addresses with MAC
+addresses in a way, which ensures lightning speed when matching an entry
+against a set.
+
+If you want to:
+ - store multiple IP addresses or port numbers and match against the collection
+   by iptables at one swoop;
+ - dynamically update iptables rules against IP addresses or ports without
+   performance penalty;
+ - express complex IP address and ports based rulesets with one single iptables
+   rule and benefit from the speed of IP sets
+then ipset may be the proper tool for you.
+
+
+%package libs
+Summary:       Shared library providing the IP sets functionality
+Group:         System Environment/Libraries
+
+%description libs
+This package contains the libraries which provide the IP sets funcionality.
+
+
+%package devel
+Summary:       Development files for %{name}
+Group:         Development/Libraries
+Requires:      %{name}-libs%{?_isa} == %{version}-%{release}
+Requires:      kernel-devel
+
+%description devel
+This package contains the files required to develop software using the %{name}
+libraries.
+
+
+%if 0
+%package service
+Summary:          %{name} service for %{name}s
+Requires:         %{name} = %{version}-%{release}
+BuildRequires:    systemd
+Requires:         iptables-services
+Requires(post):   systemd
+Requires(preun):  systemd
+Requires(postun): systemd
+BuildArch:        noarch
+
+%description service
+This package provides the service %{name} that is split
+out of the base package since it is not active by default.
+
+
+%endif
+
+%prep
+%setup -q
+
+
+%build
+%configure --enable-static=no --with-kmod=no
+
+# Just to make absolutely sure we are not building the bundled kernel module
+# I have to do it after the configure run unfortunately
+rm -fr kernel
+
+# Prevent libtool from defining rpath
+sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
+sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+
+make %{?_smp_mflags}
+
+
+%install
+make install DESTDIR=%{buildroot}
+find %{buildroot} -name '*.la' -exec rm -f '{}' \;
+
+%if 0
+# install systemd unit file
+install -d -m 755 %{buildroot}/%{_unitdir}
+install -c -m 644 %{SOURCE1} %{buildroot}/%{_unitdir}
+%endif
+
+# install supporting script
+install -d -m 755 %{buildroot}%{_libexecdir}/%{name}
+install -c -m 755 %{SOURCE2} %{buildroot}%{_libexecdir}/%{name}
+
+# Create directory for configuration
+mkdir -p %{buildroot}%{_sysconfdir}/%{name}
+
+
+%preun
+if [[ $1 -eq 0 && -n $(lsmod | grep "^xt_set ") ]]; then
+    rmmod xt_set 2>/dev/null
+    [[ $? -ne 0 ]] && echo Current iptables configuration requires ipsets && exit 1
+fi
+
+
+%post libs -p /sbin/ldconfig
+
+%postun libs -p /sbin/ldconfig
+
+
+%if 0
+%post service
+%systemd_post %{name}.service
+
+%preun service
+if [[ $1 -eq 0 && -n $(lsmod | grep "^xt_set ") ]]; then
+    rmmod xt_set 2>/dev/null
+    [[ $? -ne 0 ]] && echo Current iptables configuration requires ipsets && exit 1
+fi
+%systemd_preun %{name}.service
+
+%postun service
+%systemd_postun_with_restart %{name}.service
+
+%endif
+
+%files
+%doc COPYING ChangeLog
+%doc %{_mandir}/man8/%{name}.8.gz
+%{_sbindir}/%{name}
+
+%files libs
+%doc COPYING
+%{_libdir}/lib%{name}.so.3*
+
+%files devel
+%{_includedir}/lib%{name}
+%{_libdir}/lib%{name}.so
+%{_libdir}/pkgconfig/lib%{name}.pc
+
+%if 0
+%files service
+%{_unitdir}/%{name}.service
+%dir %{_libexecdir}/%{name}
+%attr(0755,root,root) %{_libexecdir}/%{name}/%{name}.start-stop
+%dir %{_sysconfdir}/%{name}
+%endif
+
+
+%changelog
+* Sat Nov 1 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.23-1
+- built for Vine Linux.
+- new upstream release.
+
+* Thu Sep 18 2014 Mathieu Bridon <bochecha@fedoraproject.org> - 6.22-1
+- New upstream release.
+
+* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.21.1-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
+* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.21.1-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
+* Tue Mar 11 2014 Mathieu Bridon <bochecha@fedoraproject.org> - 6.21.1-2
+- Remove runtime requirement on the kernel.
+  https://lists.fedoraproject.org/pipermail/devel/2014-March/196565.html
+
+* Tue Oct 29 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 6.20.1-1
+- New upstream release.
+
+* Tue Aug 27 2013 Quentin Armitage <quentin@armitage.org.uk> 6.19-2
+- Add service pkg - adds save and reload functionality on shutdown/startup
+- Add requires dependency of ipset on matching ipset-libs
+
+* Thu Aug 15 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 6.19-1
+- New upstream release.
+
+* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.16.1-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
+* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.16.1-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
+* Wed Sep 26 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 6.16.1-1
+- New upstream release.
+- Fix a requirement.
+
+* Wed Sep 26 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 6.14-1
+- New upstream release.
+- Fix scriptlets, ldconfig is needed for the libs subpackage, not the main one.
+
+* Mon Jul 30 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 6.13-1
+- New upstream release.
+- Split out the library in its own subpackage.
+
+* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.11-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Mon Feb 06 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 6.11-1
+- New upstream release.
+- Removed our patch, it has been integrated upstream. As such, we also don't
+  need to re-run autoreconf any more.
+
+* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.9.1-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Fri Sep 16 2011 Mathieu Bridon <bochecha@fedoraproject.org> - 6.9.1-2
+- Some fixes based on Pierre-Yves' review feedback.
+
+* Wed Sep 14 2011 Mathieu Bridon <bochecha@fedoraproject.org> - 6.9.1-1
+- Initial packaging.

+ 225 - 0
x/xtables-addons/xtables-addons-vl.spec

@@ -0,0 +1,225 @@
+Name:		xtables-addons
+Summary:	Extensions targets and matches for iptables
+Version:	2.6
+Release:	1%{?dist}
+# The entire source code is GPLv2 except ACCOUNT/libxt_ACCOUNT_cl.* which is LGPLv2
+License:	GPLv2 and LGPLv2
+Group:		System Environment/Base
+URL:		http://xtables-addons.sourceforge.net
+Source0:	http://dl.sourceforge.net/xtables-addons/Xtables-addons/%{version}/xtables-addons-%{version}.tar.xz
+Source1:	ipset.init
+Source2:	ipset-config
+BuildRequires:	iptables-devel >= 1.4.5
+BuildRequires:	autoconf automake libtool
+Provides:	%{name}-kmod-common = %{version}
+Requires(post): chkconfig
+Requires(preun): chkconfig
+# This is for /sbin/service
+Requires(preun): initscripts
+Requires(postun): initscripts
+Requires:	ipset >= 6.11
+Obsoletes:	%{name}-devel < 1.27-1
+
+%description
+Xtables-addons provides extra modules for iptables not present in the kernel,
+and is the successor of patch-o-matic. Extensions includes new targets like 
+TEE, TARPIT, CHAOS, or modules like geoip, ipset, and account.
+
+This package provides the userspace libraries for iptables to use extensions 
+in the %{name}-kmod package. You must also install the 
+%{name}-kmod package.
+
+%package -n dkms-%{name}
+Summary:        dkms package for xtables-addons
+Group:          System Environment/Kernel
+Requires:       dkms
+Requires:       kernel-devel >= 3.7
+Requires(post): dkms
+Requires(preun):dkms
+
+%description -n dkms-%{name}
+This contains the dkms package building the xtables-addons kernel modules.
+
+%prep
+%setup -q -n %{name}-%{version}
+./autogen.sh
+if [ ! -e /%{_lib}/xtables/libxt_CHECKSUM.so ]; then
+	sed -i 's/build_CHECKSUM=/build_CHECKSUM=m/' mconfig
+fi
+if [ ! -e /%{_lib}/xtables/libxt_TEE.so ]; then
+	sed -i 's/build_TEE=/build_TEE=m/' mconfig
+fi
+sed -i 's/build_ipset6=/build_ipset6=m/' mconfig
+
+%build
+%configure --without-kbuild
+
+make V=1 %{?_smp_mflags}
+
+%install
+make DESTDIR=%{buildroot} install
+
+# We add xt_geoip database scripts manually
+rm -rf %{buildroot}%{_libexecdir}
+rm -f geoip/{Makefile*,.gitignore}
+chmod 0644 geoip/*
+
+# There is no -devel package. So no need for these files
+rm -f %{buildroot}%{_libdir}/*.{la,so}
+
+# install init scripts and configuration files
+install -D -pm 0755 %{SOURCE1} %{buildroot}%{_initddir}/ipset
+install -D -pm 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/ipset-config
+
+# prepare the dkms sources
+mkdir -p %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/ACCOUNT %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/pknock
+cp extensions/Kbuild extensions/Mbuild mconfig extensions/Makefile* extensions/mac.c extensions/xt_* extensions/compat_* %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}
+cp extensions/ACCOUNT/Kbuild extensions/ACCOUNT/Mbuild extensions/ACCOUNT/Makefile* extensions/ACCOUNT/xt_* %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/ACCOUNT
+cp extensions/pknock/Kbuild extensions/pknock/Mbuild extensions/pknock/Makefile* extensions/pknock/xt_* %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/pknock
+
+# mconfig is not in parent dir anymore
+sed -i 's/${XA_ABSTOPSRCDIR}/${M}/' %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/Kbuild
+
+# remove ipset-6 references to silence make clean errors
+sed -i '/ipset-6/ d' %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/Kbuild
+sed -i '/ipset-6/ d' %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/Mbuild
+
+cat > %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/dkms.conf << EOF
+PACKAGE_NAME="%{name}"
+PACKAGE_VERSION="%{version}-%{release}"
+AUTOINSTALL="yes"
+MAKE[0]="make -C \${kernel_source_dir} M=\\\$(pwd)"
+CLEAN="make -C \${kernel_source_dir} M=\\\$(pwd) clean"
+BUILT_MODULE_LOCATION[0]="ACCOUNT"
+DEST_MODULE_LOCATION[0]="/kernel/extra"
+BUILT_MODULE_NAME[0]="xt_ACCOUNT"
+BUILT_MODULE_LOCATION[1]="pknock"
+DEST_MODULE_LOCATION[1]="/kernel/extra"
+BUILT_MODULE_NAME[1]="xt_pknock"
+EOF
+
+i=2
+for mod in compat_xtables xt_CHAOS \
+xt_condition xt_DELUDE xt_DHCPMAC xt_DNETMAP xt_fuzzy xt_geoip xt_iface \
+xt_IPMARK xt_ipp2p xt_ipv4options xt_length2 xt_LOGMARK xt_lscan xt_psd \
+xt_quota2 xt_SYSRQ xt_TARPIT; do
+	echo -e "DEST_MODULE_LOCATION[$i]=\"/kernel/extra\"\nBUILT_MODULE_NAME[$i]=\"$mod\"" >> %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/dkms.conf
+	(( i = $i + 1 ))
+done
+
+install -m755 geoip/xt_geoip_dl %{buildroot}%{_sbindir}/
+install -m755 geoip/xt_geoip_build %{buildroot}%{_sbindir}/
+
+%post 
+/sbin/ldconfig
+/sbin/chkconfig --add ipset
+
+%preun
+if [ $1 = 0 ] ; then
+    /sbin/service ipset stop >/dev/null 2>&1
+    /sbin/chkconfig --del ipset
+fi
+
+%postun
+/sbin/ldconfig
+if [ "$1" -ge "1" ] ; then
+    /sbin/service ipset condrestart >/dev/null 2>&1 || :
+fi
+
+%post -n dkms-%{name}
+set -x
+/usr/sbin/dkms add     -m %{name} -v %{version}-%{release} --rpm_safe_upgrade &&
+/usr/sbin/dkms build   -m %{name} -v %{version}-%{release} --rpm_safe_upgrade &&
+/usr/sbin/dkms install -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --force
+true
+
+%preun -n dkms-%{name}
+set -x
+/usr/sbin/dkms remove  -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --all
+true
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%doc LICENSE README doc/* geoip
+%attr(0755,root,root) %{_initddir}/*
+%config(noreplace) %{_sysconfdir}/sysconfig/*
+/%{_lib}/xtables/*.so
+%{_libdir}/*.so.*
+%{_sbindir}/*
+%{_mandir}/man?/*
+
+%files -n dkms-%{name}
+%{_usr}/src/%{name}-%{version}-%{release}
+
+%changelog
+* Sat Nov 1 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.6-1
+- built for Vine Linux.
+- new upstream release.
+
+* Sat Apr 26 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.5-1
+- Update to 2.5
+
+* Sun Jan 12 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.4-1
+- Update to 2.4
+
+* Tue Jun 18 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.3-1
+- Update to 2.3
+
+* Thu Apr 18 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.2-1
+- Update to 2.2
+
+* Mon Jan 14 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1-1
+- Update to 2.1
+
+* Thu Oct 18 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.47.1-1
+- Update to 1.47.1
+
+* Wed Oct 03 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.46-1
+- Update to 1.46
+
+* Tue Jul 31 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.45-1
+- Update to 1.45
+
+* Thu Jun 14 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.42-3
+- Fix ipset path in F-16 and later
+
+* Tue Jun 05 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.42-2
+- Fix for UsrMove - rfbz#2360
+- Fix Conflict with ipset - rfbz#2201
+- Add Requires ipset >= 6.11 - rfbz#2226
+
+* Thu Apr 12 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.42-1
+- Update to 1.42
+
+* Tue Jan 24 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.41-1
+- Update to 1.41
+
+* Thu Nov 17 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.39-1
+- Update to 1.39
+
+* Wed Oct 27 2010 Chen Lei <supercyper@163.com> - 1.30-1
+- update to 1.30
+
+* Sun Jul 25 2010 Chen Lei <supercyper@163.com> - 1.28-1
+- update to 1.28
+
+* Mon Jun 28 2010 Chen Lei <supercyper@163.com> - 1.27-2
+- rebuild for kernel 2.6.35
+
+* Mon May 31 2010 Chen Lei <supercyper@163.com> - 1.27-1
+- update to 1.27
+
+* Sun May 02 2010 Chen Lei <supercyper@163.com> - 1.26-1
+- update to 1.26
+
+* Mon Apr 26 2010 Chen Lei <supercyper@163.com> - 1.25-1
+- update to 1.25
+
+* Sun Apr 25 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.24-2
+- rebuilt
+
+* Thu Mar 18 2010 Chen Lei <supercyper@163.com> - 1.24-1
+- initial rpm build