/[packages]/cauldron/shorewall/current/SPECS/shorewall.spec
ViewVC logotype

Contents of /cauldron/shorewall/current/SPECS/shorewall.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 333526 - (show annotations) (download)
Thu Dec 20 23:09:18 2012 UTC (11 years, 4 months ago) by kamil
File size: 14845 byte(s)
- new subpackage: shorewall-core
1 %define debug_package %{nil}
2
3 %define version_major 4.5
4 %define version_minor 10.1
5 %define version %{version_major}.%{version_minor}
6 %define version_main %{version}
7 %define version_lite %{version}
8 %define ipv6_ver %{version}
9 %define ipv6_lite_ver %{version}
10 %define sha1sums_ver %{version}
11 %define ftp_ver %{version_major}.10
12 %define ftp_path ftp://ftp.shorewall.net/pub/shorewall/%{version_major}/%{name}-%{ftp_ver}
13
14 %define name6 %{name}6
15
16 Summary: Iptables-based firewall for Linux systems
17 Name: shorewall
18 Version: %{version}
19 Release: %mkrel 1
20 License: GPLv2+ and LGPLv2.1+
21 Group: System/Servers
22 URL: http://www.shorewall.net/
23 Source0: %ftp_path/%{name}-%{version}.tar.bz2
24 Source1: %ftp_path/%{name}-lite-%{version_lite}.tar.bz2
25 Source2: %ftp_path/%{name}-docs-html-%{version}.tar.bz2
26 Source3: %ftp_path/%{name6}-%{ipv6_ver}.tar.bz2
27 Source4: %ftp_path/%{name6}-lite-%{ipv6_lite_ver}.tar.bz2
28 Source5: %ftp_path/%{sha1sums_ver}.sha1sums
29 Source6: %ftp_path/%{name}-core-%{version}.tar.bz2
30 Patch0: %{name}-common-4.2.5-init-script.patch
31 Patch1: %{name}-lite-4.2.5-init-script.patch
32 Patch2: %{name6}-4.2.5-init-script.patch
33 Patch3: %{name6}-lite-4.2.5-init-script.patch
34 Patch4: %{name}-4.4.23-allow-netmask-0.patch
35 Requires: iptables
36 Requires: iproute2
37 Requires: dash
38 Requires(post): rpm-helper
39 Requires(preun): rpm-helper
40 BuildConflicts: apt-common
41 BuildArch: noarch
42
43 %description
44 The Shoreline Firewall, more commonly known as "Shorewall", is a Netfilter
45 (iptables) based firewall that can be used on a dedicated firewall system,
46 a multi-function gateway/ router/server or on a standalone GNU/Linux system.
47
48 %package core
49 Summary: Shorewall core
50 Group: System/Servers
51 Requires: %{name} = %{version}-%{release}
52 Requires: iptables-ipv6
53 Requires: iproute2
54 Requires(post): rpm-helper
55 Requires(preun): rpm-helper
56
57 %description core
58 An IPv6 enabled and capable Shoreline Firewall.
59
60
61 %package ipv6
62 Summary: IPv6 capable Shorewall
63 Group: System/Servers
64 Requires: %{name} = %{version}-%{release}
65 Requires: iptables-ipv6
66 Requires: iproute2
67 Requires(post): rpm-helper
68 Requires(preun): rpm-helper
69
70 %description ipv6
71 An IPv6 enabled and capable Shoreline Firewall.
72
73 %package ipv6-lite
74 Summary: Lite version of ipv6 shorewall
75 Group: System/Servers
76 Requires: %{name}-ipv6 = %{version}-%{release}
77 Requires(post): rpm-helper
78 Requires(preun): rpm-helper
79
80 %description ipv6-lite
81 Shorewall IPv6 Lite is a companion product to Shorewall IPv6 that allows
82 network administrators to centralize the configuration of Shorewall-based
83 firewalls.
84
85 %package lite
86 Summary: Lite version of shorewall
87 Group: System/Servers
88 Requires: %{name} = %{version}-%{release}
89 Requires(post): rpm-helper
90 Requires(preun): rpm-helper
91
92 %description lite
93 Shorewall Lite is a companion product to Shorewall that allows network
94 administrators to centralize the configuration of Shorewall-based firewalls.
95
96 %package doc
97 Summary: Firewall scripts
98 Group: System/Servers
99
100 %description doc
101 The Shoreline Firewall, more commonly known as "Shorewall", is a Netfilter
102 (iptables) based firewall that can be used on a dedicated firewall system,
103 a multi-function gateway/ router/server or on a standalone GNU/Linux system.
104
105 This package contains the docs.
106
107 %prep
108 %setup -q -c -n %{name}-%{version}
109 %setup -q -T -D -a 1
110 %setup -q -T -D -a 2
111 %setup -q -T -D -a 3
112 %setup -q -T -D -a 4
113 %setup -q -T -D -a 6
114
115 pushd %{name}-%{version_main}
116 #%patch0 -p1 -b .init
117 %patch4 -p1 -b .allow-netmask-0
118 popd
119
120 pushd %{name}-lite-%{version_lite}
121 #%patch1 -p1 -b .initlite
122 popd
123
124 pushd %{name6}-%{ipv6_ver}
125 #%patch2 -p1 -b .init6
126 popd
127
128 pushd %{name6}-lite-%{ipv6_lite_ver}
129 #%patch3 -p1 -b .init6lite
130 popd
131
132 %build
133 # (tpg) we do nothing here
134
135 %install
136 export PREFIX=%{buildroot}
137 export OWNER=`id -n -u`
138 export GROUP=`id -n -g`
139 export DEST=%{_initrddir}
140
141 pushd %{name}-%{version_main}
142 export CONFDIR=%{_sysconfdir}/%{name}
143
144 # (blino) enable startup (new setting as of 2.1.3)
145 perl -pi -e 's/STARTUP_ENABLED=.*/STARTUP_ENABLED=Yes/' configfiles/%{name}.conf
146
147 # Keep synced with net.ipv4.ip_forward var in /etc/sysctl.conf
148 perl -pi -e 's/IP_FORWARDING=.*/IP_FORWARDING=Keep/' configfiles/%{name}.conf
149
150 # blank Internal option
151 perl -pi -e 's/TC_ENABLED=Internal/TC_ENABLED=/' configfiles/%{name}.conf
152
153 # (tpg) do the optimizations
154 perl -pi -e 's/OPTIMIZE=.*/OPTIMIZE=1/' configfiles/%{name}.conf
155
156 # (tpg) set config path
157 perl -pi -e 's#CONFIG_PATH=.*#CONFIG_PATH=configfiles/%{/g_sysconfdir}/%{name}#' configpath
158
159 # (lmenut) mga kernel modules are compressed by default (mga #1147)
160 perl -pi -e 's#MODULE_SUFFIX=.*#MODULE_SUFFIX="ko ko.xz ko.gz"#' configfiles/%{name}.conf
161
162 # (alien) have accounting by default in the mangle table
163 perl -pi -e 's#ACCOUNTING_TABLE=.*#ACCOUNTING_TABLE=mangle#' configfiles/%{name}.conf
164
165 ./configure.pl
166
167 # let's do the install
168 ./install.sh shorewallrc.redhat
169 popd
170
171 #(tpg) IPv6
172 pushd %{name6}-%{ipv6_ver}
173 # (blino) enable startup (new setting as of 2.1.3)
174 perl -pi -e 's/STARTUP_ENABLED=.*/STARTUP_ENABLED=Yes/' configfiles/%{name6}.conf
175 # Keep synced with net.ipv4.ip_forward var in /etc/sysctl.conf
176 perl -pi -e 's/IP_FORWARDING=.*/IP_FORWARDING=Keep/' configfiles/%{name6}.conf
177 # (lmenut) mga kernel modules are compressed by default (mga #1147)
178 perl -pi -e 's#MODULE_SUFFIX=.*#MODULE_SUFFIX="ko ko.xz ko.gz"#' configfiles/%{name6}.conf
179
180 ./install.sh
181 popd
182
183 pushd %{name6}-lite-%{ipv6_lite_ver}
184 ./install.sh
185 popd
186
187 pushd %{name}-lite-%{version_lite}
188 ./install.sh
189 popd
190
191 # Suppress automatic replacement of "echo" by "gprintf" in the shorewall
192 # startup script by RPM. This automatic replacement is broken.
193 export DONT_GPRINTIFY=1
194
195 #(tpg) looks like these files are needed
196 touch %{buildroot}/%{_var}/lib/shorewall/{chains,nat,proxyarp,restarted,zones,restore-base,restore-tail,state,.modules,.modulesdir,.iptables-restore-input,.start,.restart,.restore}
197 touch %{buildroot}/%{_var}/lib/shorewall-lite/firewall
198
199 #(tpg) ipv6
200 touch %{buildroot}/%{_var}/lib/%{name6}/{chains,restarted,zones,restore-base,restore-tail,state,.modules,.modulesdir,.iptables-restore-input,.start,.restart,.restore}
201 touch %{buildroot}/%{_var}/lib/%{name6}-lite/firewall
202
203 #(tpg) remove hash-bang
204 find %{buildroot} -name "lib.*" -exec sed -i -e '/\#\!\/bin\/sh/d' {} \;
205
206 # (tpg) let's use dash everywhere!
207 find %{buildroot} -type f -exec sed -i -e 's@/bin/sh@/bin/dash@' {} \;
208
209 #remove unused files because of %exclude misbehaviour
210 rm -f %{buildroot}%{_datadir}/%{name6}/configfiles/*
211 rm -f %{buildroot}%{_datadir}/shorewall/configfiles/*
212
213 %post
214 if [ "$1" -ge 1 ] ; then
215 perl -pi -e 's#MODULE_SUFFIX=ko$#MODULE_SUFFIX="ko ko.xz ko.gz"#' %{_sysconfdir}/%{name}/%{name}.conf
216 perl -pi -e 's#MODULE_SUFFIX=\"ko ko.gz\"$#MODULE_SUFFIX="ko ko.xz ko.gz"#' %{_sysconfdir}/%{name}/%{name}.conf
217 fi
218 %_post_service shorewall
219
220 %create_ghostfile %{_var}/lib/%{name}/chains root root 644
221 %create_ghostfile %{_var}/lib/%{name}/nat root root 644
222 %create_ghostfile %{_var}/lib/%{name}/proxyarp root root 644
223 %create_ghostfile %{_var}/lib/%{name}/restarted root root 644
224 %create_ghostfile %{_var}/lib/%{name}/zones root root 644
225 %create_ghostfile %{_var}/lib/%{name}/restore-base root root 644
226 %create_ghostfile %{_var}/lib/%{name}/restore-tail root root 644
227 %create_ghostfile %{_var}/lib/%{name}/state root root 644
228 %create_ghostfile %{_var}/lib/%{name}/.modules root root 644
229 %create_ghostfile %{_var}/lib/%{name}/.modulesdir root root 644
230 %create_ghostfile %{_var}/lib/%{name}/.iptables-restore-input root root 644
231 %create_ghostfile %{_var}/lib/%{name}/.restart root root 700
232 %create_ghostfile %{_var}/lib/%{name}/.restore root root 700
233 %create_ghostfile %{_var}/lib/%{name}/.start root root 700
234
235 %preun
236 %_preun_service %{name}
237 if [ $1 = 0 ] ; then
238 rm -f %{_sysconfdir}/%{name}/startup_disabled
239 rm -f %{_var}/lib/%{name}/*
240 fi
241
242 %post lite
243 %_post_service %{name}-lite
244 %create_ghostfile %{_var}/lib/%{name}-lite/firewall root root 644
245
246 %preun lite
247 %_preun_service %{name}-lite
248
249 %post ipv6
250 if [ $1 > 1 ] ; then
251 perl -pi -e 's#MODULE_SUFFIX=ko$#MODULE_SUFFIX="ko ko.xz ko.gz"#' %{_sysconfdir}/%{name6}/%{name6}.conf
252 perl -pi -e 's#MODULE_SUFFIX=\"ko ko.gz\"$#MODULE_SUFFIX="ko ko.xz ko.gz"#' %{_sysconfdir}/%{name6}/%{name6}.conf
253 fi
254 %_post_service %{name6}
255
256 %create_ghostfile %{_var}/lib/%{name6}/chains root root 644
257 %create_ghostfile %{_var}/lib/%{name6}/restarted root root 644
258 %create_ghostfile %{_var}/lib/%{name6}/zones root root 644
259 %create_ghostfile %{_var}/lib/%{name6}/restore-base root root 644
260 %create_ghostfile %{_var}/lib/%{name6}/restore-tail root root 644
261 %create_ghostfile %{_var}/lib/%{name6}/state root root 644
262 %create_ghostfile %{_var}/lib/%{name6}/.modules root root 644
263 %create_ghostfile %{_var}/lib/%{name6}/.modulesdir root root 644
264 %create_ghostfile %{_var}/lib/%{name6}/.iptables-restore-input root root 644
265 %create_ghostfile %{_var}/lib/%{name6}/.restart root root 700
266 %create_ghostfile %{_var}/lib/%{name6}/.restore root root 700
267 %create_ghostfile %{_var}/lib/%{name6}/.start root root 700
268
269 %preun ipv6
270 %_preun_service %{name6}
271 if [ $1 = 0 ] ; then
272 rm -f %{_sysconfdir}/%{name6}/startup_disabled
273 rm -f %{_var}/lib/%{name6}/*
274 fi
275
276 %post ipv6-lite
277 %_post_service %{name6}-lite
278 %create_ghostfile %{_var}/lib/%{name6}-lite/firewall root root 644
279
280 %preun ipv6-lite
281 %_preun_service %{name6}-lite
282
283 %files
284 %doc %{name}-%{version_main}/{changelog.txt,releasenotes.txt,Samples}
285 %dir %{_sysconfdir}/%{name}
286 %dir %{_datadir}/%{name}
287 %dir %attr(755,root,root) %{_var}/lib/%{name}
288 %ghost %{_var}/lib/%{name}/*
289 %ghost %{_var}/lib/%{name}/.??*
290 %config %{_sysconfdir}/logrotate.d/%{name}
291 %attr(700,root,root) %{_initrddir}/%{name}
292 %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/%{name}/*
293 %attr(755,root,root) /sbin/%{name}
294 %{_datadir}/%{name}/action*
295 %{_datadir}/%{name}/configpath
296 %{_datadir}/%{name}/functions
297 %{_datadir}/%{name}/getparams
298 %{_datadir}/%{name}/helpers
299 %{_datadir}/%{name}/lib.*
300 %{_datadir}/%{name}/macro.*
301 %{_datadir}/%{name}/modules*
302 %{_datadir}/%{name}/version
303 %{_datadir}/%{name}/wait4ifup
304 %{_mandir}/man5/%{name}-accounting.5.*
305 %{_mandir}/man5/%{name}-actions.5.*
306 %{_mandir}/man5/%{name}-blacklist.5.*
307 %{_mandir}/man5/%{name}-ecn.5.*
308 %{_mandir}/man5/%{name}-exclusion.5.*
309 %{_mandir}/man5/%{name}-hosts.5.*
310 %{_mandir}/man5/%{name}-interfaces.5.*
311 %{_mandir}/man5/%{name}-ipsets.5.*
312 %{_mandir}/man5/%{name}-maclist.5.*
313 %{_mandir}/man5/%{name}-masq.5.*
314 %{_mandir}/man5/%{name}-modules.5.*
315 %{_mandir}/man5/%{name}-nat.5.*
316 %{_mandir}/man5/%{name}-nesting.5.*
317 %{_mandir}/man5/%{name}-notrack.5.*
318 %{_mandir}/man5/%{name}-netmap.5.*
319 %{_mandir}/man5/%{name}-params.5.*
320 %{_mandir}/man5/%{name}-policy.5.*
321 %{_mandir}/man5/%{name}-providers.5.*
322 %{_mandir}/man5/%{name}-proxyarp.5.*
323 %{_mandir}/man5/%{name}-route_rules.5.*
324 %{_mandir}/man5/%{name}-routes.5.*
325 %{_mandir}/man5/%{name}-routestopped.5.*
326 %{_mandir}/man5/%{name}-rules.5.*
327 %{_mandir}/man5/%{name}-secmarks.5.*
328 %{_mandir}/man5/%{name}-tcclasses.5.*
329 %{_mandir}/man5/%{name}-tcinterfaces.5.*
330 %{_mandir}/man5/%{name}-tcpri.5.*
331 %{_mandir}/man5/%{name}-tcdevices.5.*
332 %{_mandir}/man5/%{name}-tcfilters.5.*
333 %{_mandir}/man5/%{name}-tcrules.5.*
334 %{_mandir}/man5/%{name}-tos.5.*
335 %{_mandir}/man5/%{name}-tunnels.5.*
336 %{_mandir}/man5/%{name}-vardir.5.*
337 %{_mandir}/man5/%{name}-zones.5.*
338 %{_mandir}/man5/%{name}.conf.5.*
339 %{_mandir}/man8/%{name}.8.*
340 %{_mandir}/man8/%{name}-init.8.*
341 %dir %{_datadir}/shorewall/Shorewall
342 %{_datadir}/shorewall/Shorewall/*.pm
343 %{_datadir}/shorewall/compiler.pl
344 %{_datadir}/shorewall/prog.footer
345 %{_datadir}/shorewall/prog.header
346
347 %files ipv6
348 %doc %{name6}-%{ipv6_ver}/{changelog.txt,releasenotes.txt,tunnel,ipsecvpn,Samples6}
349 %dir %{_sysconfdir}/%{name6}
350 %dir %{_datadir}/%{name6}
351 %dir %attr(755,root,root) %{_var}/lib/%{name6}
352 %ghost %{_var}/lib/%{name6}/*
353 %ghost %{_var}/lib/%{name6}/.??*
354 %attr(700,root,root) %{_initrddir}/%{name6}
355 %config(noreplace) %{_sysconfdir}/%{name6}/*
356 %config %{_sysconfdir}/logrotate.d/%{name6}
357 %attr(755,root,root) /sbin/%{name6}
358 %{_datadir}/%{name6}/action*
359 %{_datadir}/%{name}/prog.footer6
360 %{_datadir}/%{name}/prog.header6
361 %{_datadir}/%{name6}/configpath
362 %{_datadir}/%{name6}/functions
363 %{_datadir}/%{name6}/helpers
364 %{_datadir}/%{name6}/lib.*
365 %{_datadir}/%{name6}/macro.*
366 %{_datadir}/%{name6}/modules*
367 %{_datadir}/%{name6}/version
368 %{_datadir}/%{name6}/wait4ifup
369 %{_mandir}/man5/%{name6}-accounting.5.*
370 %{_mandir}/man5/%{name6}-actions.5.*
371 %{_mandir}/man5/%{name6}-blacklist.5.*
372 %{_mandir}/man5/%{name6}-exclusion.5.*
373 %{_mandir}/man5/%{name6}-hosts.5.*
374 %{_mandir}/man5/%{name6}-interfaces.5.*
375 %{_mandir}/man5/%{name6}-ipsets.5.*
376 %{_mandir}/man5/%{name6}-maclist.5.*
377 %{_mandir}/man5/%{name6}-modules.5.*
378 %{_mandir}/man5/%{name6}-nesting.5.*
379 %{_mandir}/man5/%{name6}-notrack.5.*
380 %{_mandir}/man5/%{name6}-params.5.*
381 %{_mandir}/man5/%{name6}-policy.5.*
382 %{_mandir}/man5/%{name6}-providers.5.*
383 %{_mandir}/man5/%{name6}-proxyndp.5.*
384 %{_mandir}/man5/%{name6}-route_rules.5.*
385 %{_mandir}/man5/%{name6}-routes.5.*
386 %{_mandir}/man5/%{name6}-routestopped.5.*
387 %{_mandir}/man5/%{name6}-rules.5.*
388 %{_mandir}/man5/%{name6}-secmarks.5.*
389 %{_mandir}/man5/%{name6}-tcclasses.5.*
390 %{_mandir}/man5/%{name6}-tcdevices.5.*
391 %{_mandir}/man5/%{name6}-tcfilters.5.*
392 %{_mandir}/man5/%{name6}-tcinterfaces.5.*
393 %{_mandir}/man5/%{name6}-tcpri.5.*
394 %{_mandir}/man5/%{name6}-tcrules.5.*
395 %{_mandir}/man5/%{name6}-tos.5.*
396 %{_mandir}/man5/%{name6}-tunnels.5.*
397 %{_mandir}/man5/%{name6}-vardir.5.*
398 %{_mandir}/man5/%{name6}-zones.5.*
399 %{_mandir}/man5/%{name6}.conf.5.*
400 %{_mandir}/man8/%{name6}.8.*
401
402 %files lite
403 %doc %{name}-lite-%{version_lite}/*.txt
404 %dir %{_datadir}/%{name}-lite
405 %dir %attr(755,root,root) %{_var}/lib/%{name}-lite
406 %ghost %{_var}/lib/%{name}-lite/*
407 %attr(700,root,root) %{_initrddir}/%{name}-lite
408 %config(noreplace) %{_sysconfdir}/%{name}-lite/*
409 %config %{_sysconfdir}/logrotate.d/%{name}-lite
410 %attr(755,root,root) /sbin/%{name}-lite
411 %{_datadir}/%{name}-lite/configpath
412 %{_datadir}/%{name}-lite/functions
413 %{_datadir}/%{name}-lite/helpers
414 %{_datadir}/%{name}-lite/lib.*
415 %{_datadir}/%{name}-lite/modules*
416 %{_datadir}/%{name}-lite/shorecap
417 %{_datadir}/%{name}-lite/version
418 %{_datadir}/%{name}-lite/wait4ifup
419 %{_mandir}/man5/%{name}-lite*
420 %{_mandir}/man8/%{name}-lite*
421
422 %files ipv6-lite
423 %doc %{name6}-lite-%{ipv6_lite_ver}/*.txt
424 %dir %{_datadir}/%{name6}-lite
425 %dir %attr(755,root,root) %{_var}/lib/%{name6}-lite
426 %ghost %{_var}/lib/%{name6}-lite/*
427 %attr(700,root,root) %{_initrddir}/%{name6}-lite
428 %config(noreplace) %{_sysconfdir}/%{name6}-lite/*
429 %config %{_sysconfdir}/logrotate.d/%{name6}-lite
430 %attr(755,root,root) /sbin/%{name6}-lite
431 %{_datadir}/%{name6}-lite/configpath
432 %{_datadir}/%{name6}-lite/functions
433 %{_datadir}/%{name6}-lite/helpers
434 %{_datadir}/%{name6}-lite/lib.*
435 %{_datadir}/%{name6}-lite/modules*
436 %{_datadir}/%{name6}-lite/shorecap
437 %{_datadir}/%{name6}-lite/version
438 %{_datadir}/%{name6}-lite/wait4ifup
439 %{_mandir}/man5/%{name6}-lite*
440 %{_mandir}/man8/%{name6}-lite*
441
442 %files doc
443 %doc %{name}-docs-html-%{version}/*

  ViewVC Help
Powered by ViewVC 1.1.30