118 lines
2.9 KiB
RPMSpec
118 lines
2.9 KiB
RPMSpec
|
|
Name: ipset
|
||
|
|
Version: 7.3
|
||
|
|
Release: 1
|
||
|
|
Summary: Manage Linux IP sets
|
||
|
|
License: GPLv2
|
||
|
|
URL: https://ipset.netfilter.org/
|
||
|
|
Source0: https://ipset.netfilter.org/%{name}-%{version}.tar.bz2
|
||
|
|
Source1: ipset.service
|
||
|
|
Source2: ipset.start-stop
|
||
|
|
|
||
|
|
BuildRequires: libmnl-devel automake autoconf libtool libtool-ltdl-devel systemd
|
||
|
|
Requires: ipset-libs = %{version}-%{release} iptables-services
|
||
|
|
Requires(post): systemd
|
||
|
|
Requires(preun): systemd
|
||
|
|
Requires(postun): systemd
|
||
|
|
|
||
|
|
|
||
|
|
Provides: ipset-service
|
||
|
|
Obsoletes: ipset-service
|
||
|
|
|
||
|
|
%description
|
||
|
|
IP sets are a framework inside the Linux kernel, which can be administered
|
||
|
|
by the ipset utility. Depending on the type, an IP set may store IP
|
||
|
|
addresses, networks, (TCP/UDP) port numbers, MAC addresses, interface names
|
||
|
|
or combinations of them 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: library files for ipset
|
||
|
|
|
||
|
|
%description libs
|
||
|
|
library files for ipset
|
||
|
|
|
||
|
|
%package devel
|
||
|
|
Summary: Header files for ipset
|
||
|
|
Requires: ipset-libs = %{version}-%{release} kernel-headers
|
||
|
|
|
||
|
|
%description devel
|
||
|
|
Header files for ipset
|
||
|
|
|
||
|
|
%package_help
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%autosetup -n %{name}-%{version} -p1
|
||
|
|
|
||
|
|
%build
|
||
|
|
./autogen.sh
|
||
|
|
%configure --with-kmod=no
|
||
|
|
rm -fr kernel
|
||
|
|
%disable_rpath
|
||
|
|
%make_build
|
||
|
|
|
||
|
|
%install
|
||
|
|
%make_install
|
||
|
|
%delete_la
|
||
|
|
|
||
|
|
install -d -m 755 %{buildroot}/%{_unitdir}
|
||
|
|
install -c -m 644 %{SOURCE1} %{buildroot}/%{_unitdir}
|
||
|
|
|
||
|
|
install -d -m 755 %{buildroot}%{_libexecdir}/%{name}
|
||
|
|
install -c -m 755 %{SOURCE2} %{buildroot}%{_libexecdir}/%{name}
|
||
|
|
|
||
|
|
install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}
|
||
|
|
|
||
|
|
%ldconfig_scriptlets libs
|
||
|
|
|
||
|
|
%post
|
||
|
|
%systemd_post %{name}.service
|
||
|
|
|
||
|
|
%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
|
||
|
|
%systemd_preun %{name}.service
|
||
|
|
|
||
|
|
%postun
|
||
|
|
%systemd_postun_with_restart %{name}.service
|
||
|
|
|
||
|
|
%files
|
||
|
|
%defattr(-,root,root)
|
||
|
|
%license COPYING
|
||
|
|
%doc ChangeLog
|
||
|
|
%{_sbindir}/ipset
|
||
|
|
%{_unitdir}/ipset.service
|
||
|
|
%{_libexecdir}/ipset/ipset.start-stop
|
||
|
|
%{_sysconfdir}/%{name}
|
||
|
|
|
||
|
|
%files libs
|
||
|
|
%defattr(-,root,root)
|
||
|
|
%license COPYING
|
||
|
|
%{_libdir}/libipset.so.13*
|
||
|
|
|
||
|
|
%files devel
|
||
|
|
%defattr(-,root,root)
|
||
|
|
%{_includedir}/libipset
|
||
|
|
%{_libdir}/*.a
|
||
|
|
%{_libdir}/libipset.so
|
||
|
|
%{_libdir}/pkgconfig/*.pc
|
||
|
|
|
||
|
|
%files help
|
||
|
|
%defattr(-,root,root)
|
||
|
|
%{_mandir}/man8/%{name}.8.*
|
||
|
|
%{_mandir}/man3/libipset.3.*
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Wed Sep 11 2019 openEuler Buildteam <buildteam@openeuler.org> - 7.3-1
|
||
|
|
- Package init
|