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

  ViewVC Help
Powered by ViewVC 1.1.30