Gentoo Archives: gentoo-commits

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