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