1 |
jlec 15/02/08 16:34:25 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: shorewall-4.6.6.2.ebuild |
5 |
Log: |
6 |
net-firewall/shorewall: Version Bump, #539278 |
7 |
|
8 |
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!) |
9 |
|
10 |
Revision Changes Path |
11 |
1.276 net-firewall/shorewall/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/shorewall/ChangeLog?rev=1.276&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/shorewall/ChangeLog?rev=1.276&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/shorewall/ChangeLog?r1=1.275&r2=1.276 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-firewall/shorewall/ChangeLog,v |
20 |
retrieving revision 1.275 |
21 |
retrieving revision 1.276 |
22 |
diff -u -r1.275 -r1.276 |
23 |
--- ChangeLog 7 Feb 2015 22:59:47 -0000 1.275 |
24 |
+++ ChangeLog 8 Feb 2015 16:34:25 -0000 1.276 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for net-firewall/shorewall |
27 |
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/shorewall/ChangeLog,v 1.275 2015/02/07 22:59:47 floppym Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/shorewall/ChangeLog,v 1.276 2015/02/08 16:34:25 jlec Exp $ |
30 |
+ |
31 |
+*shorewall-4.6.6.2 (08 Feb 2015) |
32 |
+ |
33 |
+ 08 Feb 2015; Justin Lecher <jlec@g.o> +shorewall-4.6.6.2.ebuild: |
34 |
+ Version Bump, #539278 |
35 |
|
36 |
07 Feb 2015; Mike Gilbert <floppym@g.o> shorewall-4.6.6.1.ebuild: |
37 |
Adjust KEYWORDS handling, bug 539276 by Thomas D. |
38 |
|
39 |
|
40 |
|
41 |
1.1 net-firewall/shorewall/shorewall-4.6.6.2.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/shorewall/shorewall-4.6.6.2.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/shorewall/shorewall-4.6.6.2.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: shorewall-4.6.6.2.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2015 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/net-firewall/shorewall/shorewall-4.6.6.2.ebuild,v 1.1 2015/02/08 16:34:25 jlec Exp $ |
51 |
|
52 |
EAPI="5" |
53 |
|
54 |
inherit eutils linux-info prefix systemd versionator |
55 |
|
56 |
DESCRIPTION='The Shoreline Firewall, commonly known as Shorewall, is' |
57 |
DESCRIPTION+=' a high-level tool for configuring Netfilter' |
58 |
HOMEPAGE="http://www.shorewall.net/" |
59 |
LICENSE="GPL-2" |
60 |
SLOT="0" |
61 |
IUSE="doc +init +ipv4 ipv6 lite4 lite6" |
62 |
|
63 |
MY_PV=${PV/_rc/-RC} |
64 |
MY_PV=${MY_PV/_beta/-Beta} |
65 |
MY_P=${PN}-${MY_PV} |
66 |
|
67 |
MY_MAJOR_RELEASE_NUMBER=$(get_version_component_range 1-2) |
68 |
MY_MAJORMINOR_RELEASE_NUMBER=$(get_version_component_range 1-3) |
69 |
|
70 |
# shorewall |
71 |
MY_PN_IPV4=Shorewall |
72 |
MY_P_IPV4=${MY_PN_IPV4/#S/s}-${MY_PV} |
73 |
|
74 |
# shorewall6 |
75 |
MY_PN_IPV6=Shorewall6 |
76 |
MY_P_IPV6=${MY_PN_IPV6/#S/s}-${MY_PV} |
77 |
|
78 |
# shorewall-lite |
79 |
MY_PN_LITE4=Shorewall-lite |
80 |
MY_P_LITE4=${MY_PN_LITE4/#S/s}-${MY_PV} |
81 |
|
82 |
# shorewall6-lite |
83 |
MY_PN_LITE6=Shorewall6-lite |
84 |
MY_P_LITE6=${MY_PN_LITE6/#S/s}-${MY_PV} |
85 |
|
86 |
# shorewall-init |
87 |
MY_PN_INIT=Shorewall-init |
88 |
MY_P_INIT=${MY_PN_INIT/#S/s}-${MY_PV} |
89 |
|
90 |
# shorewall-core |
91 |
MY_PN_CORE=Shorewall-core |
92 |
MY_P_CORE=${MY_PN_CORE/#S/s}-${MY_PV} |
93 |
|
94 |
# shorewall-docs-html |
95 |
MY_PN_DOCS=Shorewall-docs-html |
96 |
MY_P_DOCS=${MY_PN_DOCS/#S/s}-${MY_PV} |
97 |
|
98 |
# Upstream URL schema: |
99 |
# Beta: $MIRROR/pub/shorewall/development/4.6/shorewall-4.6.4-Beta2/shorewall-4.6.4-Beta2.tar.bz2 |
100 |
# RC: $MIRROR/pub/shorewall/development/4.6/shorewall-4.6.4-RC1/shorewall-4.6.4-RC1.tar.bz2 |
101 |
# Release: $MIRROR/pub/shorewall/4.6/shorewall-4.6.3/shorewall-4.6.3.3.tar.bz2 |
102 |
|
103 |
MY_URL_PREFIX= |
104 |
MY_URL_SUFFIX= |
105 |
if [[ ${MY_PV} = *-Beta* ]] || [[ ${MY_PV} = *-RC* ]]; then |
106 |
MY_URL_PREFIX='development/' |
107 |
|
108 |
_tmp_last_index=$(($(get_last_version_component_index ${MY_PV})+1)) |
109 |
_tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${MY_PV}) |
110 |
if [[ ${_tmp_suffix} = *Beta* ]] || [[ ${_tmp_suffix} = *RC* ]]; then |
111 |
MY_URL_SUFFIX="-${_tmp_suffix}" |
112 |
fi |
113 |
|
114 |
# Cleaning up temporary variables |
115 |
unset _tmp_last_index |
116 |
unset _tmp_suffix |
117 |
else |
118 |
KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" |
119 |
fi |
120 |
|
121 |
SRC_URI=" |
122 |
http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-core-${MY_PV}.tar.bz2 |
123 |
ipv4? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-${MY_PV}.tar.bz2 ) |
124 |
ipv6? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall6-${MY_PV}.tar.bz2 ) |
125 |
lite4? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-lite-${MY_PV}.tar.bz2 ) |
126 |
lite6? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall6-lite-${MY_PV}.tar.bz2 ) |
127 |
init? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-init-${MY_PV}.tar.bz2 ) |
128 |
doc? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/${MY_P_DOCS}.tar.bz2 ) |
129 |
" |
130 |
|
131 |
# - Shorewall6 requires Shorewall |
132 |
# - Installing Shorewall-init or just the documentation doesn't make any sense, |
133 |
# that's why we force the user to select at least one "real" Shorewall product |
134 |
# |
135 |
# See http://shorewall.net/download.htm#Which |
136 |
REQUIRED_USE=" |
137 |
ipv6? ( ipv4 ) |
138 |
|| ( ipv4 lite4 lite6 ) |
139 |
" |
140 |
|
141 |
# No build dependencies! Just plain shell scripts... |
142 |
DEPEND="" |
143 |
|
144 |
RDEPEND=" |
145 |
>=net-firewall/iptables-1.4.20 |
146 |
>=sys-apps/iproute2-3.8.0[-minimal] |
147 |
>=sys-devel/bc-1.06.95 |
148 |
ipv4? ( |
149 |
>=dev-lang/perl-5.16 |
150 |
virtual/perl-Digest-SHA |
151 |
) |
152 |
ipv6? ( |
153 |
>=dev-perl/Socket6-0.230.0 |
154 |
>=net-firewall/iptables-1.4.20[ipv6] |
155 |
>=sys-apps/iproute2-3.8.0[ipv6] |
156 |
) |
157 |
lite6? ( |
158 |
>=net-firewall/iptables-1.4.20[ipv6] |
159 |
>=sys-apps/iproute2-3.8.0[ipv6] |
160 |
) |
161 |
init? ( >=sys-apps/coreutils-8.20 ) |
162 |
!net-firewall/shorewall-core |
163 |
!net-firewall/shorewall6 |
164 |
!net-firewall/shorewall-lite |
165 |
!net-firewall/shorewall6-lite |
166 |
!net-firewall/shorewall-init |
167 |
!<sys-apps/systemd-214 |
168 |
" |
169 |
|
170 |
S=${WORKDIR} |
171 |
|
172 |
pkg_pretend() { |
173 |
local CONFIG_CHECK="~NF_CONNTRACK" |
174 |
|
175 |
local WARNING_CONNTRACK="Without NF_CONNTRACK support, you will be unable" |
176 |
local WARNING_CONNTRACK+=" to run any shorewall-based firewall on the local system." |
177 |
|
178 |
if use ipv4 || use lite4; then |
179 |
CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV4" |
180 |
|
181 |
local WARNING_CONNTRACK_IPV4="Without NF_CONNTRACK_IPV4 support, you will" |
182 |
local WARNING_CONNTRACK_IPV4+=" be unable to run any shorewall-based IPv4 firewall on the local system." |
183 |
fi |
184 |
|
185 |
if use ipv6 || use lite6; then |
186 |
CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV6" |
187 |
|
188 |
local WARNING_CONNTRACK_IPV6="Without NF_CONNTRACK_IPV6 support, you will" |
189 |
local WARNING_CONNTRACK_IPV6+=" be unable to run any shorewall-based IPv6 firewall on the local system." |
190 |
fi |
191 |
|
192 |
check_extra_config |
193 |
} |
194 |
|
195 |
pkg_setup() { |
196 |
if [ -n "${DIGEST}" ]; then |
197 |
einfo "Unsetting environment variable \"DIGEST\" to prevent conflicts with package's \"install.sh\" script ..." |
198 |
unset DIGEST |
199 |
fi |
200 |
} |
201 |
|
202 |
src_prepare() { |
203 |
# We are moving each unpacked source from MY_P_* to MY_PN_*. |
204 |
# This allows us to use patches from upstream and keeps epatch_user working |
205 |
|
206 |
einfo "Preparing shorewallrc ..." |
207 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewallrc "${S}"/shorewallrc.gentoo || die "Copying shorewallrc failed" |
208 |
eprefixify "${S}"/shorewallrc.gentoo |
209 |
|
210 |
# shorewall-core |
211 |
mv "${S}"/${MY_P_CORE} "${S}"/${MY_PN_CORE} || die "Failed to move '${S}/${MY_P_CORE}' to '${S}/${MY_PN_CORE}'" |
212 |
ebegin "Applying Gentoo-specific changes to ${MY_P_CORE} ..." |
213 |
ln -s ../shorewallrc.gentoo ${MY_PN_CORE}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
214 |
eend 0 |
215 |
|
216 |
# shorewall |
217 |
if use ipv4; then |
218 |
mv "${S}"/${MY_P_IPV4} "${S}"/${MY_PN_IPV4} || die "Failed to move '${S}/${MY_P_IPV4}' to '${S}/${MY_PN_IPV4}'" |
219 |
ebegin "Applying Gentoo-specific changes to ${MY_P_IPV4}" |
220 |
ln -s ../shorewallrc.gentoo ${MY_PN_IPV4}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
221 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall.confd "${S}"/${MY_PN_IPV4}/default.gentoo || die "Copying shorewall.confd failed" |
222 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall.initd "${S}"/${MY_PN_IPV4}/init.gentoo.sh || die "Copying shorewall.initd failed" |
223 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall.systemd "${S}"/${MY_PN_IPV4}/gentoo.service || die "Copying shorewall.systemd failed" |
224 |
eend 0 |
225 |
fi |
226 |
|
227 |
# shorewall6 |
228 |
if use ipv6; then |
229 |
mv "${S}"/${MY_P_IPV6} "${S}"/${MY_PN_IPV6} || die "Failed to move '${S}/${MY_P_IPV6}' to '${S}/${MY_PN_IPV6}'" |
230 |
ebegin "Applying Gentoo-specific changes to ${MY_P_IPV6}" |
231 |
ln -s ../shorewallrc.gentoo ${MY_PN_IPV6}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
232 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall6.confd "${S}"/${MY_PN_IPV6}/default.gentoo || die "Copying shorewall6.confd failed" |
233 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall6.initd "${S}"/${MY_PN_IPV6}/init.gentoo.sh || die "Copying shorewall6.initd failed" |
234 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall6.systemd "${S}"/${MY_PN_IPV6}/gentoo.service || die "Copying shorewall6.systemd failed" |
235 |
eend 0 |
236 |
fi |
237 |
|
238 |
# shorewall-lite |
239 |
if use lite4; then |
240 |
mv "${S}"/${MY_P_LITE4} "${S}"/${MY_PN_LITE4} || die "Failed to move '${S}/${MY_P_LITE4}' to '${S}/${MY_PN_LITE4}'" |
241 |
ebegin "Applying Gentoo-specific changes to ${MY_P_LITE4}" |
242 |
ln -s ../shorewallrc.gentoo ${MY_PN_LITE4}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
243 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall-lite.confd "${S}"/${MY_PN_LITE4}/default.gentoo || die "Copying shorewall-lite.confd failed" |
244 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall-lite.initd "${S}"/${MY_PN_LITE4}/init.gentoo.sh || die "Copying shorewall-lite.initd failed" |
245 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall-lite.systemd "${S}"/${MY_PN_LITE4}/gentoo.service || die "Copying shorewall-lite.systemd failed" |
246 |
eend 0 |
247 |
fi |
248 |
|
249 |
# shorewall6-lite |
250 |
if use lite6; then |
251 |
mv "${S}"/${MY_P_LITE6} "${S}"/${MY_PN_LITE6} || die "Failed to move '${S}/${MY_P_LITE6}' to '${S}/${MY_PN_LITE6}'" |
252 |
ebegin "Applying Gentoo-specific changes to ${MY_P_LITE6}" |
253 |
ln -s ../shorewallrc.gentoo ${MY_PN_LITE6}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
254 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall6-lite.confd "${S}"/${MY_PN_LITE6}/default.gentoo || die "Copying shorewall6-lite.confd failed" |
255 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall6-lite.initd "${S}"/${MY_PN_LITE6}/init.gentoo.sh || die "Copying shorewall6-lite.initd failed" |
256 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall6-lite.systemd "${S}"/${MY_PN_LITE6}/gentoo.service || die "Copying shorewall6-lite.systemd failed" |
257 |
eend 0 |
258 |
fi |
259 |
|
260 |
# shorewall-init |
261 |
if use init; then |
262 |
mv "${S}"/${MY_P_INIT} "${S}"/${MY_PN_INIT} || die "Failed to move '${S}/${MY_P_INIT}' to '${S}/${MY_PN_INIT}'" |
263 |
ebegin "Applying Gentoo-specific changes to ${MY_P_INIT}" |
264 |
ln -s ../shorewallrc.gentoo ${MY_PN_INIT}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
265 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall-init.confd "${S}"/${MY_PN_INIT}/default.gentoo || die "Copying shorewall-init.confd failed" |
266 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall-init.initd "${S}"/${MY_PN_INIT}/init.gentoo.sh || die "Copying shorewall-init.initd failed" |
267 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall-init.systemd "${S}"/${MY_PN_INIT}/gentoo.service || die "Copying shorewall-init.systemd failed" |
268 |
cp "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall-init.readme "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt || die "Copying shorewall-init.systemd failed" |
269 |
eend 0 |
270 |
|
271 |
eprefixify "${S}"/${MY_PN_INIT}/init.gentoo.sh |
272 |
|
273 |
cd "${S}"/${MY_PN_INIT} |
274 |
epatch "${FILESDIR}"/${MY_MAJOR_RELEASE_NUMBER}/shorewall-init-01_remove-ipset-functionality.patch |
275 |
cd "${S}" |
276 |
fi |
277 |
|
278 |
# shorewall-docs-html |
279 |
if use doc; then |
280 |
mv "${S}"/${MY_P_DOCS} "${S}"/${MY_PN_DOCS} || die "Failed to move '${S}/${MY_P_DOCS}' to '${S}/${MY_PN_DOCS}'" |
281 |
fi |
282 |
|
283 |
epatch_user |
284 |
} |
285 |
|
286 |
src_configure() { |
287 |
:; |
288 |
} |
289 |
|
290 |
src_compile() { |
291 |
:; |
292 |
} |
293 |
|
294 |
src_install() { |
295 |
# shorewall-core |
296 |
einfo "Installing ${MY_P_CORE} ..." |
297 |
DESTDIR="${D%/}" ${MY_PN_CORE}/install.sh shorewallrc.gentoo || die "${MY_PN_CORE}/install.sh failed" |
298 |
dodoc "${S}"/${MY_PN_CORE}/changelog.txt "${S}"/${MY_PN_CORE}/releasenotes.txt |
299 |
|
300 |
# shorewall |
301 |
if use ipv4; then |
302 |
einfo "Installing ${MY_P_IPV4} ..." |
303 |
keepdir /var/lib/shorewall |
304 |
DESTDIR="${D%/}" ${MY_PN_IPV4}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV4}/install.sh failed" |
305 |
|
306 |
if use doc; then |
307 |
dodoc -r "${S}"/${MY_PN_IPV4}/Samples |
308 |
fi |
309 |
fi |
310 |
|
311 |
# shorewall6 |
312 |
if use ipv6; then |
313 |
einfo "Installing ${MY_P_IPV6} ..." |
314 |
keepdir /var/lib/shorewall6 |
315 |
DESTDIR="${D%/}" ${MY_PN_IPV6}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV6}/install.sh failed" |
316 |
|
317 |
if use doc; then |
318 |
dodoc -r "${S}"/${MY_PN_IPV6}/Samples6 |
319 |
fi |
320 |
fi |
321 |
|
322 |
# shorewall-lite |
323 |
if use lite4; then |
324 |
einfo "Installing ${MY_P_LITE4} ..." |
325 |
keepdir /var/lib/shorewall-lite |
326 |
DESTDIR="${D%/}" ${MY_PN_LITE4}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE4}/install.sh failed" |
327 |
fi |
328 |
|
329 |
# shorewall6-lite |
330 |
if use lite6; then |
331 |
einfo "Installing ${MY_P_LITE6} ..." |
332 |
keepdir /var/lib/shorewall6-lite |
333 |
DESTDIR="${D%/}" ${MY_PN_LITE6}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE6}/install.sh failed" |
334 |
fi |
335 |
|
336 |
# shorewall-init |
337 |
if use init; then |
338 |
einfo "Installing ${MY_P_INIT} ..." |
339 |
DESTDIR="${D%/}" ${MY_PN_INIT}/install.sh shorewallrc.gentoo || die "${MY_PN_INIT}/install.sh failed" |
340 |
dodoc "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt |
341 |
|
342 |
if [ -f "${D}etc/logrotate.d/shorewall-init" ]; then |
343 |
# On Gentoo, shorewall-init will not create shorewall-ifupdown.log, |
344 |
# so we don't need a logrotate configuration file for shorewall-init |
345 |
einfo "Removing unused \"${D}etc/logrotate.d/shorewall-init\" ..." |
346 |
rm -rf "${D}"etc/logrotate.d/shorewall-init || die "Removing \"${D}etc/logrotate.d/shorewall-init\" failed" |
347 |
fi |
348 |
|
349 |
if [ -d "${D}etc/NetworkManager" ]; then |
350 |
# On Gentoo, we don't support NetworkManager |
351 |
# so we don't need this folder at all |
352 |
einfo "Removing unused \"${D}etc/NetworkManager\" ..." |
353 |
rm -rf "${D}"etc/NetworkManager || die "Removing \"${D}etc/NetworkManager\" failed" |
354 |
fi |
355 |
|
356 |
if [ -f "${D}usr/share/shorewall-init/ifupdown" ]; then |
357 |
# This script isn't supported on Gentoo |
358 |
rm -rf "${D}"usr/share/shorewall-init/ifupdown || die "Removing \"${D}usr/share/shorewall-init/ifupdown\" failed" |
359 |
fi |
360 |
fi |
361 |
|
362 |
if use doc; then |
363 |
einfo "Installing ${MY_P_DOCS} ..." |
364 |
dohtml -r "${S}"/${MY_PN_DOCS} |
365 |
fi |
366 |
} |
367 |
|
368 |
pkg_postinst() { |
369 |
if [[ -z "${REPLACING_VERSIONS}" ]]; then |
370 |
# This is a new installation |
371 |
|
372 |
# Show first steps for shorewall/shorewall6 |
373 |
local _PRODUCTS="" |
374 |
if use ipv4; then |
375 |
_PRODUCTS="shorewall" |
376 |
|
377 |
if use ipv6; then |
378 |
_PRODUCTS="${_PRODUCTS}/shorewall6" |
379 |
fi |
380 |
fi |
381 |
|
382 |
if [[ -n "${_PRODUCTS}" ]]; then |
383 |
elog "Before you can use ${_PRODUCTS}, you need to edit its configuration in:" |
384 |
elog "" |
385 |
elog " /etc/shorewall/shorewall.conf" |
386 |
|
387 |
if use ipv6; then |
388 |
elog " /etc/shorewall6/shorewall6.conf" |
389 |
fi |
390 |
|
391 |
elog "" |
392 |
elog "To activate your shorewall-based firewall on system start, please add ${_PRODUCTS} to your default runlevel:" |
393 |
elog "" |
394 |
elog " # rc-update add shorewall default" |
395 |
|
396 |
if use ipv6; then |
397 |
elog " # rc-update add shorewall6 default" |
398 |
fi |
399 |
fi |
400 |
|
401 |
# Show first steps for shorewall-lite/shorewall6-lite |
402 |
_PRODUCTS="" |
403 |
if use lite4; then |
404 |
_PRODUCTS="shorewall-lite" |
405 |
fi |
406 |
|
407 |
if use lite6; then |
408 |
if [[ -z "${_PRODUCTS}" ]]; then |
409 |
_PRODUCTS="shorewall6-lite" |
410 |
else |
411 |
_PRODUCTS="${_PRODUCTS}/shorewall6-lite" |
412 |
fi |
413 |
fi |
414 |
|
415 |
if [[ -n "${_PRODUCTS}" ]]; then |
416 |
if use ipv4; then |
417 |
elog "" |
418 |
fi |
419 |
|
420 |
elog "Before you can use ${_PRODUCTS}, you need to provide a configuration, which you can" |
421 |
elog "create using ${CATEGORY}/shorewall (with \"ipv4\" and or \"ipv6\" USE flag)." |
422 |
elog "" |
423 |
elog "To read more about ${_PRODUCTS}, please visit" |
424 |
elog " http://shorewall.net/CompiledPrograms.html" |
425 |
elog "" |
426 |
elog "To activate your shorewall-lite-based firewall on system start, please add ${PRODUCTS} to your default runlevel:" |
427 |
elog "" |
428 |
|
429 |
if use lite4; then |
430 |
elog " # rc-update add shorewall-lite default" |
431 |
fi |
432 |
|
433 |
if use lite6; then |
434 |
elog " # rc-update add shorewall6-lite default" |
435 |
fi |
436 |
fi |
437 |
|
438 |
if use init; then |
439 |
elog "" |
440 |
elog "To secure your system on boot, please add shorewall-init to your boot runlevel:" |
441 |
elog "" |
442 |
elog " # rc-update add shorewall-init boot" |
443 |
elog "" |
444 |
elog "and review \$PRODUCTS in" |
445 |
elog "" |
446 |
elog " /etc/conf.d/shorewall-init" |
447 |
fi |
448 |
|
449 |
fi |
450 |
|
451 |
if [[ -n "${REPLACING_VERSIONS}" && ${REPLACING_VERSIONS} < ${MY_MAJOR_RELEASE_NUMBER} ]]; then |
452 |
# This is an upgrade |
453 |
|
454 |
elog "You are upgrading from a previous major version. It is highly recommended that you read" |
455 |
elog "" |
456 |
elog " - /usr/share/doc/shorewall*/releasenotes.tx*" |
457 |
elog " - http://shorewall.net/upgrade_issues.htm#idp8704902640" |
458 |
|
459 |
if use ipv4; then |
460 |
elog "" |
461 |
elog "You can auto-migrate your configuration using" |
462 |
elog "" |
463 |
elog " # shorewall update -A" |
464 |
|
465 |
if use ipv6; then |
466 |
elog " # shorewall6 update -A" |
467 |
fi |
468 |
|
469 |
elog "" |
470 |
elog "But if you are not familiar with the \"shorewall[6] update\" command," |
471 |
elog "please read the shorewall[6] man page first." |
472 |
fi |
473 |
fi |
474 |
|
475 |
if ! use init; then |
476 |
elog "" |
477 |
elog "Consider emerging ${CATEGORY}/${PN} with USE flag \"init\" to secure your system on boot" |
478 |
elog "before your shorewall-based firewall is ready to start." |
479 |
elog "" |
480 |
elog "To read more about shorewall-init, please visit" |
481 |
elog " http://www.shorewall.net/Shorewall-init.html" |
482 |
fi |
483 |
|
484 |
if ! has_version "net-firewall/conntrack-tools"; then |
485 |
elog "" |
486 |
elog "Your Shorewall firewall can utilize \"conntrack\" from the \"net-firewall/conntrack-tools\"" |
487 |
elog "package. if you want to use this feature, you need to install \"net-firewall/conntrack-tools\"!" |
488 |
fi |
489 |
} |