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