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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30