Mathieu Bridon 0fc73fb
Name:             ipset
64e0be5
Version:          7.6
64e0be5
Release:          1%{?dist}
Mathieu Bridon 0fc73fb
Summary:          Manage Linux IP sets
Mathieu Bridon c4eef8c
Mathieu Bridon 0fc73fb
License:          GPLv2
Mathieu Bridon 0fc73fb
URL:              http://ipset.netfilter.org/
7ae4b9e
Source0:          %{url}/%{name}-%{version}.tar.bz2
Mathieu Bridon 0fc73fb
Source1:          %{name}.service
Mathieu Bridon 0fc73fb
Source2:          %{name}.start-stop
Mathieu Bridon b6a0c13
Mathieu Bridon 0fc73fb
BuildRequires:    libmnl-devel
cee0103
BuildRequires:    automake
cee0103
BuildRequires:    autoconf
cee0103
BuildRequires:    libtool
cee0103
BuildRequires:    libtool-ltdl-devel
Mathieu Bridon b6a0c13
Mathieu Bridon b6a0c13
# An explicit requirement is needed here, to avoid cases where a user would
Mathieu Bridon b6a0c13
# explicitly update only one of the two (e.g 'yum update ipset')
Mathieu Bridon 0fc73fb
Requires:         %{name}-libs%{?_isa} = %{version}-%{release}
Mathieu Bridon c4eef8c
Mathieu Bridon c4eef8c
%description
38400ab
IP sets are a framework inside the Linux kernel since version 2.4.x, which can
38400ab
be administered by the ipset utility. Depending on the type, currently an IP
38400ab
set may store IP addresses, (TCP/UDP) port numbers or IP addresses with MAC
Mathieu Bridon c4eef8c
addresses in a way, which ensures lightning speed when matching an entry
Mathieu Bridon c4eef8c
against a set.
Mathieu Bridon c4eef8c
Mathieu Bridon c4eef8c
If you want to:
Mathieu Bridon c4eef8c
 - store multiple IP addresses or port numbers and match against the collection
Mathieu Bridon c4eef8c
   by iptables at one swoop;
Mathieu Bridon c4eef8c
 - dynamically update iptables rules against IP addresses or ports without
Mathieu Bridon c4eef8c
   performance penalty;
Mathieu Bridon c4eef8c
 - express complex IP address and ports based rulesets with one single iptables
Mathieu Bridon c4eef8c
   rule and benefit from the speed of IP sets
Mathieu Bridon c4eef8c
then ipset may be the proper tool for you.
Mathieu Bridon c4eef8c
Mathieu Bridon 9faae09
Mathieu Bridon 9caff1a
%package libs
Mathieu Bridon 9caff1a
Summary:       Shared library providing the IP sets functionality
Mathieu Bridon 9caff1a
Mathieu Bridon 9caff1a
%description libs
Mathieu Bridon 9caff1a
This package contains the libraries which provide the IP sets funcionality.
Mathieu Bridon c4eef8c
Mathieu Bridon 9faae09
Mathieu Bridon c4eef8c
%package devel
Mathieu Bridon c4eef8c
Summary:       Development files for %{name}
Mathieu Bridon af9c68b
Requires:      %{name}-libs%{?_isa} == %{version}-%{release}
c7c6eda
Requires:      kernel-headers
Mathieu Bridon c4eef8c
Mathieu Bridon c4eef8c
%description devel
Mathieu Bridon c4eef8c
This package contains the files required to develop software using the %{name}
Mathieu Bridon c4eef8c
libraries.
Mathieu Bridon c4eef8c
Mathieu Bridon c4eef8c
Mathieu Bridon 9faae09
%package service
Mathieu Bridon 9faae09
Summary:          %{name} service for %{name}s
Mathieu Bridon 9faae09
Requires:         %{name} = %{version}-%{release}
Mathieu Bridon 9faae09
BuildRequires:    systemd
Mathieu Bridon 9faae09
Requires:         iptables-services
Mathieu Bridon 9faae09
Requires(post):   systemd
Mathieu Bridon 9faae09
Requires(preun):  systemd
Mathieu Bridon 9faae09
Requires(postun): systemd
Mathieu Bridon 9faae09
BuildArch:        noarch
Mathieu Bridon 9faae09
Mathieu Bridon 9faae09
%description service
Mathieu Bridon 9faae09
This package provides the service %{name} that is split
Mathieu Bridon 9faae09
out of the base package since it is not active by default.
Mathieu Bridon 9faae09
Mathieu Bridon 9faae09
Mathieu Bridon c4eef8c
%prep
cee0103
%autosetup -p1
Mathieu Bridon c4eef8c
Mathieu Bridon c4eef8c
Mathieu Bridon c4eef8c
%build
cee0103
./autogen.sh
Mathieu Bridon c4eef8c
%configure --enable-static=no --with-kmod=no
Mathieu Bridon c4eef8c
Mathieu Bridon 6b8cbe6
# Just to make absolutely sure we are not building the bundled kernel module
Mathieu Bridon 6b8cbe6
# I have to do it after the configure run unfortunately
Mathieu Bridon 6b8cbe6
rm -fr kernel
Mathieu Bridon 6b8cbe6
Mathieu Bridon c4eef8c
# Prevent libtool from defining rpath
Mathieu Bridon c4eef8c
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
Mathieu Bridon c4eef8c
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
Mathieu Bridon c4eef8c
593bb71
%make_build
Mathieu Bridon c4eef8c
Mathieu Bridon c4eef8c
Mathieu Bridon c4eef8c
%install
593bb71
%make_install
Mathieu Bridon c4eef8c
find %{buildroot} -name '*.la' -exec rm -f '{}' \;
Mathieu Bridon c4eef8c
Quentin Armitage e4af967
# install systemd unit file
Quentin Armitage e4af967
install -d -m 755 %{buildroot}/%{_unitdir}
Quentin Armitage e4af967
install -c -m 644 %{SOURCE1} %{buildroot}/%{_unitdir}
Mathieu Bridon c4eef8c
Quentin Armitage e4af967
# install supporting script
Quentin Armitage e4af967
install -d -m 755 %{buildroot}%{_libexecdir}/%{name}
Quentin Armitage e4af967
install -c -m 755 %{SOURCE2} %{buildroot}%{_libexecdir}/%{name}
Quentin Armitage e4af967
Quentin Armitage e4af967
# Create directory for configuration
Quentin Armitage e4af967
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
Quentin Armitage e4af967
Mathieu Bridon 9faae09
Quentin Armitage e4af967
%preun
Quentin Armitage e4af967
if [[ $1 -eq 0 && -n $(lsmod | grep "^xt_set ") ]]; then
Quentin Armitage e4af967
    rmmod xt_set 2>/dev/null
Quentin Armitage e4af967
    [[ $? -ne 0 ]] && echo Current iptables configuration requires ipsets && exit 1
Quentin Armitage e4af967
fi
Mathieu Bridon c4eef8c
Mathieu Bridon 9faae09
593bb71
%ldconfig_scriptlets libs
Mathieu Bridon 9faae09
Mathieu Bridon 9faae09
Quentin Armitage e4af967
%post service
Quentin Armitage e4af967
%systemd_post %{name}.service
Quentin Armitage e4af967
Quentin Armitage e4af967
%preun service
Quentin Armitage e4af967
if [[ $1 -eq 0 && -n $(lsmod | grep "^xt_set ") ]]; then
Quentin Armitage e4af967
    rmmod xt_set 2>/dev/null
Quentin Armitage e4af967
    [[ $? -ne 0 ]] && echo Current iptables configuration requires ipsets && exit 1
Quentin Armitage e4af967
fi
Quentin Armitage e4af967
%systemd_preun %{name}.service
Quentin Armitage e4af967
Quentin Armitage e4af967
%postun service
Quentin Armitage e4af967
%systemd_postun_with_restart %{name}.service
Quentin Armitage e4af967
Mathieu Bridon c4eef8c
Mathieu Bridon c4eef8c
%files
593bb71
%doc ChangeLog
593bb71
%license COPYING
74a8b03
%{_mandir}/man8/%{name}.8.*
Mathieu Bridon c4eef8c
%{_sbindir}/%{name}
Mathieu Bridon 9caff1a
Mathieu Bridon 9caff1a
%files libs
593bb71
%license COPYING
dfbb15c
%{_libdir}/lib%{name}.so.13*
Mathieu Bridon c4eef8c
Mathieu Bridon 9faae09
%files devel
Mathieu Bridon 9faae09
%{_includedir}/lib%{name}
Mathieu Bridon 9faae09
%{_libdir}/lib%{name}.so
Mathieu Bridon 6b8cbe6
%{_libdir}/pkgconfig/lib%{name}.pc
74a8b03
%{_mandir}/man3/libipset.3.*
Mathieu Bridon 9faae09
Quentin Armitage e4af967
%files service
Quentin Armitage e4af967
%{_unitdir}/%{name}.service
Quentin Armitage e4af967
%dir %{_libexecdir}/%{name}
Quentin Armitage e4af967
%attr(0755,root,root) %{_libexecdir}/%{name}/%{name}.start-stop
Quentin Armitage e4af967
%dir %{_sysconfdir}/%{name}
Quentin Armitage e4af967
Mathieu Bridon c4eef8c
Mathieu Bridon c4eef8c
%changelog
64e0be5
* Mon Feb 24 2020 Nicolas Chauvet <kwizart@gmail.com> - 7.6-1
64e0be5
- Update to 7.6
64e0be5
e48e9a1
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.5-2
e48e9a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
e48e9a1
98c9987
* Fri Jan 10 2020 Nicolas Chauvet <kwizart@gmail.com> - 7.5-1
98c9987
- Update to 7.5
98c9987
cd2727a
* Mon Nov 04 2019 Eric Garver <eric@garver.life> - 7.4-1
cd2727a
- Update to 7.4
cd2727a
eb982c9
* Mon Aug 19 2019 Nicolas Chauvet <kwizart@gmail.com> - 7.3-1
eb982c9
- Update to 7.3
eb982c9
7ad1b36
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.2-2
7ad1b36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
7ad1b36
7ae4b9e
* Thu Jul 11 2019 Nicolas Chauvet <kwizart@gmail.com> - 7.2-1
7ae4b9e
- Update to 7.2
7ae4b9e
701b471
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.38-2
701b471
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
701b471
593bb71
* Mon Aug 13 2018 Nicolas Chauvet <kwizart@gmail.com> - 6.38-1
593bb71
- Update to 6.38
593bb71
- Clean-up spec
593bb71
81db011
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.35-4
81db011
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
81db011
cee0103
* Mon Feb 12 2018 Eric Garver <egarver@redhat.com> - 6.35-3
cee0103
- Patch for missing header file (RHBZ#1543596)
cee0103
54e38f5
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.35-2
54e38f5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
54e38f5
608536d
* Mon Jan 08 2018 Nicolas Chauvet <kwizart@gmail.com> - 6.35-1
608536d
- Update to 6.35
608536d
b033adb
* Mon Jul 31 2017 Nicolas Chauvet <kwizart@gmail.com> - 6.32-1
b033adb
- Update to 6.32
b033adb
bc20e66
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.29-4
bc20e66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
bc20e66
c7c6eda
* Fri Apr 07 2017 Nicolas Chauvet <kwizart@gmail.com> - 6.29-3
c7c6eda
- Userspace needs kernel-headers - rhbz#1420864
c7c6eda
5a4869a
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.29-2
5a4869a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
5a4869a
6006ef8
* Mon Apr 18 2016 Thomas Woerner <twoerner@redhat.com> - 6.29-1
6006ef8
- New upstream version 6.29 (RHBZ#1317208)
6006ef8
  - Suppress unnecessary stderr in command loop for resize and list
6006ef8
  - Correction in comment test
6006ef8
  - Support chroot buildroots (reported by Jan Engelhardt)
6006ef8
  - Fix "configure" breakage due to pkg-config related changes
6006ef8
    (reported by Jan Engelhardt)
6006ef8
  - Support older pkg-config packages
6006ef8
  - Add bash completion to the install routine (Mart Frauenlob)
6006ef8
  - Fix misleading error message with comment extension
6006ef8
  - Test added to check 0.0.0.0/0,iface to be matched in hash:net,iface type
6006ef8
  - Fix link with libtool >= 2.4.4 (Olivier Blin)
6006ef8
5207814
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 6.27-2
5207814
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
5207814
38400ab
* Tue Nov 10 2015 Thomas Woerner <twoerner@redhat.com> - 6.27-1
38400ab
- New upstream version 6.27 (RHBZ#1145913)
38400ab
7669e87
* Sat Oct 10 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 6.26-1
7669e87
- Upstream 6.26 (RHBZ#1145913)
7669e87
7c2731d
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.22-2
7c2731d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
7c2731d
Mathieu Bridon d1e74bb
* Thu Sep 18 2014 Mathieu Bridon <bochecha@fedoraproject.org> - 6.22-1
Mathieu Bridon d1e74bb
- New upstream release.
Mathieu Bridon d1e74bb
9a1d675
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.21.1-4
9a1d675
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
9a1d675
b8c09ad
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.21.1-3
b8c09ad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
b8c09ad
Mathieu Bridon d021479
* Tue Mar 11 2014 Mathieu Bridon <bochecha@fedoraproject.org> - 6.21.1-2
Mathieu Bridon d021479
- Remove runtime requirement on the kernel.
Mathieu Bridon d021479
  https://lists.fedoraproject.org/pipermail/devel/2014-March/196565.html
Mathieu Bridon ee4829b
Mathieu Bridon 6b8cbe6
* Tue Oct 29 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 6.20.1-1
Mathieu Bridon 6b8cbe6
- New upstream release.
Mathieu Bridon 6b8cbe6
Quentin Armitage e4af967
* Tue Aug 27 2013 Quentin Armitage <quentin@armitage.org.uk> 6.19-2
Quentin Armitage e4af967
- Add service pkg - adds save and reload functionality on shutdown/startup
Quentin Armitage e4af967
- Add requires dependency of ipset on matching ipset-libs
Quentin Armitage e4af967
Mathieu Bridon 0f6aa8d
* Thu Aug 15 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 6.19-1
Mathieu Bridon c2e2665
- New upstream release.
Mathieu Bridon c2e2665
c4b098a
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.16.1-3
c4b098a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c4b098a
65945b9
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.16.1-2
65945b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
65945b9
Mathieu Bridon 5254985
* Wed Sep 26 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 6.16.1-1
Mathieu Bridon 5254985
- New upstream release.
Mathieu Bridon 5254985
- Fix a requirement.
Mathieu Bridon 5254985
Mathieu Bridon 9b28e1d
* Wed Sep 26 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 6.14-1
Mathieu Bridon 9b28e1d
- New upstream release.
Mathieu Bridon 75f71d0
- Fix scriptlets, ldconfig is needed for the libs subpackage, not the main one.
Mathieu Bridon 75f71d0
Mathieu Bridon d5748a5
* Mon Jul 30 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 6.13-1
Mathieu Bridon d5748a5
- New upstream release.
Mathieu Bridon 9caff1a
- Split out the library in its own subpackage.
Mathieu Bridon d5748a5
b18ba51
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.11-2
b18ba51
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b18ba51
Mathieu Bridon 71acab3
* Mon Feb 06 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 6.11-1
Mathieu Bridon 71acab3
- New upstream release.
Mathieu Bridon 71acab3
- Removed our patch, it has been integrated upstream. As such, we also don't
Mathieu Bridon 71acab3
  need to re-run autoreconf any more.
Mathieu Bridon 71acab3
4b3ccb1
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.9.1-3
4b3ccb1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
4b3ccb1
Mathieu Bridon dbbd648
* Fri Sep 16 2011 Mathieu Bridon <bochecha@fedoraproject.org> - 6.9.1-2
Mathieu Bridon dbbd648
- Some fixes based on Pierre-Yves' review feedback.
Mathieu Bridon dbbd648
Mathieu Bridon c4eef8c
* Wed Sep 14 2011 Mathieu Bridon <bochecha@fedoraproject.org> - 6.9.1-1
Mathieu Bridon c4eef8c
- Initial packaging.