[12383] | 1 | %bcond_with systemd |
---|
[9045] | 2 | |
---|
[12383] | 3 | Name: ipset |
---|
| 4 | Summary: Manage Linux IP sets |
---|
| 5 | Version: 7.6 |
---|
| 6 | Release: 1%{?_dist_release}%{?with_systemd:.systemd} |
---|
| 7 | Group: Applications/System |
---|
| 8 | Vendor: Project Vine |
---|
| 9 | Distribution: Vine Linux |
---|
[9045] | 10 | |
---|
[12383] | 11 | License: GPLv2 |
---|
| 12 | URL: http://ipset.netfilter.org/ |
---|
| 13 | Source0: http://ipset.netfilter.org/%{name}-%{version}.tar.bz2 |
---|
| 14 | Source1: %{name}.service |
---|
| 15 | Source2: %{name}.start-stop |
---|
| 16 | Source3: %{name}.init |
---|
[9045] | 17 | |
---|
[12383] | 18 | BuildRequires: libmnl-devel |
---|
| 19 | |
---|
[9045] | 20 | # An explicit requirement is needed here, to avoid cases where a user would |
---|
| 21 | # explicitly update only one of the two (e.g 'yum update ipset') |
---|
| 22 | Requires: %{name}-libs%{?_isa} = %{version}-%{release} |
---|
[12383] | 23 | %if !%{with systemd} |
---|
| 24 | Requires(post): chkconfig |
---|
| 25 | Requires(preun): chkconfig /sbin/service |
---|
| 26 | %endif |
---|
[9045] | 27 | |
---|
| 28 | %description |
---|
| 29 | IP sets are a framework inside the Linux 2.4.x and 2.6.x kernel, which can be |
---|
| 30 | administered by the ipset utility. Depending on the type, currently an IP set |
---|
| 31 | may store IP addresses, (TCP/UDP) port numbers or IP addresses with MAC |
---|
| 32 | addresses in a way, which ensures lightning speed when matching an entry |
---|
| 33 | against a set. |
---|
| 34 | |
---|
| 35 | If you want to: |
---|
| 36 | - store multiple IP addresses or port numbers and match against the collection |
---|
| 37 | by iptables at one swoop; |
---|
| 38 | - dynamically update iptables rules against IP addresses or ports without |
---|
| 39 | performance penalty; |
---|
| 40 | - express complex IP address and ports based rulesets with one single iptables |
---|
| 41 | rule and benefit from the speed of IP sets |
---|
| 42 | then ipset may be the proper tool for you. |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | %package libs |
---|
| 46 | Summary: Shared library providing the IP sets functionality |
---|
| 47 | Group: System Environment/Libraries |
---|
| 48 | |
---|
| 49 | %description libs |
---|
| 50 | This package contains the libraries which provide the IP sets funcionality. |
---|
| 51 | |
---|
| 52 | |
---|
| 53 | %package devel |
---|
| 54 | Summary: Development files for %{name} |
---|
| 55 | Group: Development/Libraries |
---|
| 56 | Requires: %{name}-libs%{?_isa} == %{version}-%{release} |
---|
| 57 | Requires: kernel-devel |
---|
| 58 | |
---|
| 59 | %description devel |
---|
| 60 | This package contains the files required to develop software using the %{name} |
---|
| 61 | libraries. |
---|
| 62 | |
---|
| 63 | |
---|
[12383] | 64 | %if %{with systemd} |
---|
[9045] | 65 | %package service |
---|
| 66 | Summary: %{name} service for %{name}s |
---|
| 67 | Requires: %{name} = %{version}-%{release} |
---|
| 68 | BuildRequires: systemd |
---|
[12383] | 69 | #Requires: iptables-services |
---|
[9045] | 70 | Requires(post): systemd |
---|
| 71 | Requires(preun): systemd |
---|
| 72 | Requires(postun): systemd |
---|
| 73 | BuildArch: noarch |
---|
| 74 | |
---|
| 75 | %description service |
---|
| 76 | This package provides the service %{name} that is split |
---|
| 77 | out of the base package since it is not active by default. |
---|
| 78 | |
---|
| 79 | |
---|
| 80 | %endif |
---|
| 81 | |
---|
| 82 | %prep |
---|
| 83 | %setup -q |
---|
| 84 | |
---|
| 85 | |
---|
| 86 | %build |
---|
| 87 | %configure --enable-static=no --with-kmod=no |
---|
| 88 | |
---|
| 89 | # Just to make absolutely sure we are not building the bundled kernel module |
---|
| 90 | # I have to do it after the configure run unfortunately |
---|
| 91 | rm -fr kernel |
---|
| 92 | |
---|
| 93 | # Prevent libtool from defining rpath |
---|
| 94 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool |
---|
| 95 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool |
---|
| 96 | |
---|
| 97 | make %{?_smp_mflags} |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | %install |
---|
| 101 | make install DESTDIR=%{buildroot} |
---|
| 102 | find %{buildroot} -name '*.la' -exec rm -f '{}' \; |
---|
| 103 | |
---|
[12383] | 104 | %if %{with systemd} |
---|
[9045] | 105 | # install systemd unit file |
---|
| 106 | install -d -m 755 %{buildroot}/%{_unitdir} |
---|
| 107 | install -c -m 644 %{SOURCE1} %{buildroot}/%{_unitdir} |
---|
| 108 | |
---|
| 109 | # install supporting script |
---|
| 110 | install -d -m 755 %{buildroot}%{_libexecdir}/%{name} |
---|
| 111 | install -c -m 755 %{SOURCE2} %{buildroot}%{_libexecdir}/%{name} |
---|
[12383] | 112 | %else |
---|
| 113 | mkdir -p %{buildroot}%{_initdir} |
---|
| 114 | install -m755 %{SOURCE3} %{buildroot}%{_initdir}/%{name} |
---|
[11069] | 115 | %endif |
---|
[9045] | 116 | |
---|
| 117 | # Create directory for configuration |
---|
| 118 | mkdir -p %{buildroot}%{_sysconfdir}/%{name} |
---|
| 119 | |
---|
[12383] | 120 | |
---|
| 121 | %if !%{with systemd} |
---|
[11069] | 122 | %post |
---|
| 123 | /sbin/chkconfig --add ipset |
---|
[12383] | 124 | %endif |
---|
[9045] | 125 | |
---|
| 126 | %preun |
---|
[12383] | 127 | %if !%{with systemd} |
---|
[11069] | 128 | if [ "$1" = 0 ]; then |
---|
| 129 | /sbin/chkconfig --del ipset |
---|
| 130 | fi |
---|
[12383] | 131 | %endif |
---|
[9045] | 132 | if [[ $1 -eq 0 && -n $(lsmod | grep "^xt_set ") ]]; then |
---|
| 133 | rmmod xt_set 2>/dev/null |
---|
| 134 | [[ $? -ne 0 ]] && echo Current iptables configuration requires ipsets && exit 1 |
---|
| 135 | fi |
---|
| 136 | |
---|
| 137 | |
---|
| 138 | %post libs -p /sbin/ldconfig |
---|
| 139 | |
---|
| 140 | %postun libs -p /sbin/ldconfig |
---|
| 141 | |
---|
| 142 | |
---|
[12383] | 143 | %if %{with systemd} |
---|
[9045] | 144 | %post service |
---|
| 145 | %systemd_post %{name}.service |
---|
| 146 | |
---|
| 147 | %preun service |
---|
| 148 | if [[ $1 -eq 0 && -n $(lsmod | grep "^xt_set ") ]]; then |
---|
| 149 | rmmod xt_set 2>/dev/null |
---|
| 150 | [[ $? -ne 0 ]] && echo Current iptables configuration requires ipsets && exit 1 |
---|
| 151 | fi |
---|
| 152 | %systemd_preun %{name}.service |
---|
| 153 | |
---|
| 154 | %postun service |
---|
| 155 | %systemd_postun_with_restart %{name}.service |
---|
| 156 | %endif |
---|
| 157 | |
---|
| 158 | %files |
---|
[12383] | 159 | %license COPYING |
---|
| 160 | %doc ChangeLog |
---|
[9045] | 161 | %doc %{_mandir}/man8/%{name}.8.gz |
---|
| 162 | %{_sbindir}/%{name} |
---|
[12383] | 163 | %if !%{with systemd} |
---|
[11069] | 164 | %{_initdir}/%{name} |
---|
[12383] | 165 | %dir %{_sysconfdir}/%{name} |
---|
| 166 | %endif |
---|
[9045] | 167 | |
---|
| 168 | %files libs |
---|
[12383] | 169 | %license COPYING |
---|
| 170 | %{_libdir}/lib%{name}.so.* |
---|
[9045] | 171 | |
---|
| 172 | %files devel |
---|
| 173 | %{_includedir}/lib%{name} |
---|
| 174 | %{_libdir}/lib%{name}.so |
---|
| 175 | %{_libdir}/pkgconfig/lib%{name}.pc |
---|
[12383] | 176 | %{_mandir}/man3/libipset.3.* |
---|
[9045] | 177 | |
---|
[12383] | 178 | %if %{with systemd} |
---|
[9045] | 179 | %files service |
---|
| 180 | %{_unitdir}/%{name}.service |
---|
| 181 | %dir %{_libexecdir}/%{name} |
---|
| 182 | %attr(0755,root,root) %{_libexecdir}/%{name}/%{name}.start-stop |
---|
| 183 | %dir %{_sysconfdir}/%{name} |
---|
| 184 | %endif |
---|
| 185 | |
---|
| 186 | |
---|
| 187 | %changelog |
---|
[12383] | 188 | * Sat Apr 18 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.6-1 |
---|
| 189 | - new upstream release. |
---|
| 190 | |
---|
[11069] | 191 | * Mon May 8 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.32-1 |
---|
| 192 | - new upstream release. |
---|
| 193 | |
---|
| 194 | * Sat Nov 1 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.23-1 |
---|
[9045] | 195 | - built for Vine Linux. |
---|
| 196 | - new upstream release. |
---|
| 197 | |
---|
| 198 | * Thu Sep 18 2014 Mathieu Bridon <bochecha@fedoraproject.org> - 6.22-1 |
---|
| 199 | - New upstream release. |
---|
| 200 | |
---|
| 201 | * Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.21.1-4 |
---|
| 202 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild |
---|
| 203 | |
---|
| 204 | * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.21.1-3 |
---|
| 205 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild |
---|
| 206 | |
---|
| 207 | * Tue Mar 11 2014 Mathieu Bridon <bochecha@fedoraproject.org> - 6.21.1-2 |
---|
| 208 | - Remove runtime requirement on the kernel. |
---|
| 209 | https://lists.fedoraproject.org/pipermail/devel/2014-March/196565.html |
---|
| 210 | |
---|
| 211 | * Tue Oct 29 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 6.20.1-1 |
---|
| 212 | - New upstream release. |
---|
| 213 | |
---|
| 214 | * Tue Aug 27 2013 Quentin Armitage <quentin@armitage.org.uk> 6.19-2 |
---|
| 215 | - Add service pkg - adds save and reload functionality on shutdown/startup |
---|
| 216 | - Add requires dependency of ipset on matching ipset-libs |
---|
| 217 | |
---|
| 218 | * Thu Aug 15 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 6.19-1 |
---|
| 219 | - New upstream release. |
---|
| 220 | |
---|
| 221 | * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.16.1-3 |
---|
| 222 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild |
---|
| 223 | |
---|
| 224 | * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.16.1-2 |
---|
| 225 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild |
---|
| 226 | |
---|
| 227 | * Wed Sep 26 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 6.16.1-1 |
---|
| 228 | - New upstream release. |
---|
| 229 | - Fix a requirement. |
---|
| 230 | |
---|
| 231 | * Wed Sep 26 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 6.14-1 |
---|
| 232 | - New upstream release. |
---|
| 233 | - Fix scriptlets, ldconfig is needed for the libs subpackage, not the main one. |
---|
| 234 | |
---|
| 235 | * Mon Jul 30 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 6.13-1 |
---|
| 236 | - New upstream release. |
---|
| 237 | - Split out the library in its own subpackage. |
---|
| 238 | |
---|
| 239 | * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.11-2 |
---|
| 240 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild |
---|
| 241 | |
---|
| 242 | * Mon Feb 06 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 6.11-1 |
---|
| 243 | - New upstream release. |
---|
| 244 | - Removed our patch, it has been integrated upstream. As such, we also don't |
---|
| 245 | need to re-run autoreconf any more. |
---|
| 246 | |
---|
| 247 | * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.9.1-3 |
---|
| 248 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild |
---|
| 249 | |
---|
| 250 | * Fri Sep 16 2011 Mathieu Bridon <bochecha@fedoraproject.org> - 6.9.1-2 |
---|
| 251 | - Some fixes based on Pierre-Yves' review feedback. |
---|
| 252 | |
---|
| 253 | * Wed Sep 14 2011 Mathieu Bridon <bochecha@fedoraproject.org> - 6.9.1-1 |
---|
| 254 | - Initial packaging. |
---|