summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2018-10-29 14:30:48 +0100
committerThomas Deutschmann <whissi@gentoo.org>2018-10-29 15:54:03 +0100
commit9684940802ac82dbbb0eff5ca1b9e1b83b815ff4 (patch)
tree9ad07cc6baba0f9d1b4c318edfd2624d3a4bd5b4 /net-firewall
parentsys-firmware/intel-microcode: drop old (diff)
downloadgentoo-9684940802ac82dbbb0eff5ca1b9e1b83b815ff4.tar.gz
gentoo-9684940802ac82dbbb0eff5ca1b9e1b83b815ff4.tar.bz2
gentoo-9684940802ac82dbbb0eff5ca1b9e1b83b815ff4.zip
net-firewall/shorewall: bump to v5.2.1.1
Package-Manager: Portage-2.3.51, Repoman-2.3.11 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/shorewall/Manifest7
-rw-r--r--net-firewall/shorewall/shorewall-5.2.1.1.ebuild479
2 files changed, 486 insertions, 0 deletions
diff --git a/net-firewall/shorewall/Manifest b/net-firewall/shorewall/Manifest
index 65b3e1bc59e..8a3f2870510 100644
--- a/net-firewall/shorewall/Manifest
+++ b/net-firewall/shorewall/Manifest
@@ -1,14 +1,21 @@
DIST shorewall-5.2.0.5.tar.bz2 539666 BLAKE2B df4f8680ee29a773f584a1210b40a7047be1a590490a01617b26b71840e488f569ebcf268ba2f6199fb10671925356c4e187a5219ed7784672f6d14b2e90f580 SHA512 8299e0f40ad96c09eceb9460c6088e694e50b7a1b81a16395426466c666eb21dc23236c1ee6cc6047c05ad4a4ba43aac33fc7cb05f5784bf27ac81e5fa4e9059
+DIST shorewall-5.2.1.1.tar.bz2 552739 BLAKE2B bfbfdb3320eb884b965f3c7b8d5af61a78bb625a10ad2bc493a5c8a191d676d933855335209a41f893ccb2edb644cf510930da936227fad9fb667793dce88e91 SHA512 59e1b4bb09114162911f0cb42d67df0d82c5a4410322ceb972506705c10cf903cb482123a00181399da99513c857d382771de36ec11433ff7bd9d57a343c48dc
DIST shorewall-5.2.1.tar.bz2 550552 BLAKE2B c7b77912f644b3ae1a15a366018bc57da72d23342ec9db4ba282c8bc993f4964b3ce6d783448e2e36a6370fd223e1d14f1b27e9cadfa47024a1dda8109419c7f SHA512 2c408196a142a314f72ea4adb4193fa5cf30300529c41661e157e7b69f2d8448a0c25bcd177f25d6f993494b26068edf48cc0fc8e6a526380726baa33a8e11c8
DIST shorewall-core-5.2.0.5.tar.bz2 76567 BLAKE2B 078520ef3166d689d559f1c08ae417a2bf5c7fdc3618a26f72b244fa14679634752dffaeebafbd84609e33ec7f1856b701abb297077797abcb14d3264a3bfd25 SHA512 640c854a7484e886cd603742d16682456e02c0054c3d6d5f2188bf30e235ac975fc1ce50af500cf4fb99253a1d13c2408cc72aff54f14aa738e1e80b8d07066a
+DIST shorewall-core-5.2.1.1.tar.bz2 78022 BLAKE2B dfa53a4558ec819feee25116021e410ac65dfad20d3d9384e3a233d47e7e443957149d025166d094397fb2c01b8be7694db8c06e927776250b5edafa97e5d287 SHA512 0c12d5deb4a93fb174a7c97459f2863149eec52ab778c30523c23cbdfbeb94d890442a0eb8ad9869158a967f2daac59a9d7194734e35e69982889d93d984b58b
DIST shorewall-core-5.2.1.tar.bz2 76562 BLAKE2B 6129e90f9cfca9b36221320eb917f3299dd151d366e2b98d546519330cd5c95511d4a1e7b1a4ea2de046aed2d2a72367f8e3039ad288de89178e161cb16eb5a0 SHA512 4ea3fdec0c4ffb57a7e63334aed3479819079936575928b01399a3c2a8515a4ecf1eb19f1e193849480e6ac84f4c7de9e4c84699765684fb2299bf1b5276a3a8
DIST shorewall-docs-html-5.2.0.5.tar.bz2 4295236 BLAKE2B 8cef99b3535551e1d4ecdf0d3d1c2b3434c0b91c793f0857bc3f22f0020d80cd49b038c7c4f5d15fe23af14869f1736a69b01978403fe94bc5dac261bd2f5e4d SHA512 5fa3ab52580e8f090ab0be9b1796bef65a41d1a9dc5c9501e3daeba22bad7b28b5306aba5b383c654eed5f7d727a7744812034eeb1ad051633a80b2892096c24
+DIST shorewall-docs-html-5.2.1.1.tar.bz2 4303275 BLAKE2B d2a9c980f0486671103653a6944e12f03e282bd859a9c06558d6dbfdf9fd6a7c72993355ab61138c94317d36228cbbb55903c9d17547ecdc18af57e989a5ef7b SHA512 c9eef71fdc53a97a523a580c5df0c7773f7dc6fc8abfbfe7a2fbc607be6d0e6377f47886001a87a37260118edb298880abda06e3ac4581d8551b3934791332fc
DIST shorewall-docs-html-5.2.1.tar.bz2 4302517 BLAKE2B a38659f9740da36efe3a2bf844b9686a18bb47476388580d02462aec0715afb1d09d20ffb2ee708550f7288fb7bb36ae8e5f23d902bd126bb2a5c496866e49dd SHA512 c67c621c1fea599c5e1987a7847bed187d8d0571e1b6d42c9fc351022de04b47e4f57030f919b85e8c9fef51829e0b04cbbc14e29a0df6f084c765219d46591c
DIST shorewall-init-5.2.0.5.tar.bz2 30881 BLAKE2B 92617f17553b6df514cbfc72e86597e9859baa641782848763923ff4c650915cd7fb97f0c71b41d525d6a9d5ebbf10e9918d6a8d682c9c4654de3ba40b54c0ce SHA512 0367ad7468d5a9c0c70d31fdd66c05e54cf747dd45dc1bf2e128935c65af8c2508f033ed2945185059214dd81f5a8fb3f122323fd2bb79d2d642997741167371
+DIST shorewall-init-5.2.1.1.tar.bz2 33215 BLAKE2B 3b151f60e368cd4237a8549d6de14ec4ed896c2c838f680a59aa12492c46bfb48accfa1a5bc98877663523861040af4995628e75f693c9fa5433483ef0fc6161 SHA512 21cdccc01b60df48e7e1204102c0b371d7e32fb1f897310e31a6cff128ebf5ed5efe3903bc487aa41ee093c23eb87e59764b78903ee5c6eba03552a1dcccc634
DIST shorewall-init-5.2.1.tar.bz2 31705 BLAKE2B 7f6a6b5266d63e3b0fab99a49f342e8172a20f50471fdcebe07a6c62dc36fcf4d96a041870df815aa5ecf2c421b5d7cb1408c0f54f520295611d54a876150294 SHA512 caba4eebcc576bf261327cb7304aedcaaea7325a34e444b4dd9ce60cd545b479271ea9b7049743ac1499485695d7d0f2a37b127a895cb3d200e6dfb41a21fe17
DIST shorewall-lite-5.2.0.5.tar.bz2 36651 BLAKE2B 192ecda8b04d0330f0a7bced6136f2723d201cd7c30af80b59bfa81f49614d10c900cf5856296ad854287f3c925e5f78f144698674ec7b8d91065072db4ca53e SHA512 b95154f7614eeedde1fc087750372cadd0c0a9618986741e035a9d83c06d2534feb78edaf6a97e2a45788015e6706f8dac3714ca3b22bd068e792458a3f5af40
+DIST shorewall-lite-5.2.1.1.tar.bz2 39020 BLAKE2B 40697930bb2251062a126a4bd86cd8379d32d9543f32d67208106205b35d3ae9cb9a67e48a48451053ae90138ffcda6cbe5dd5ce7c25bda6eab340dd4680bec8 SHA512 c10ee8ec81817fe8fc35caac253a89fb58be105fa1fb1c692d269f6916537007d555daeba4e5445568a6a6972dfc6db3e21f5637844c6a5e51e91b2a4795724d
DIST shorewall-lite-5.2.1.tar.bz2 37527 BLAKE2B 5a50d66366b5c4c456fd4291d1413923162cfe24f989df00be5f613089d96402430ec6c6780c78ee5e398cd931c964e8d164efefb4d1531cb870ba65040809be SHA512 111f68c2d59b58e7d344e55b293d78fe2013771be9f8399bea88d9699905f3683931668fad23e7efea1fcae9d3c6381bd9f2073c3f208e81cec958ab19b2510e
DIST shorewall6-5.2.0.5.tar.bz2 185740 BLAKE2B 846a3fc44a9c0a838cf75671ca34e78dd9758eeee0690d994a34615467b241f0c854e3bb9b818bcfd5e96664ab03e14a7c69affc946dffd1357ad744da41f8d5 SHA512 6875074ed8ee5bce40253a6e2633c422d7c2c1bf860a072236d6197cfe949e455b511a1792d822a8f2351254e99880236267ce70fc1150ca68e87f962b6cc265
+DIST shorewall6-5.2.1.1.tar.bz2 191039 BLAKE2B 4d40d30d4d6ad6a9aacf4acc4da6a4b31546a07969f12fde0d568f75e31ca587a31a830f386092ec0061df8cbff4032402c834e374076097fedb5de18127071b SHA512 0eb342a89f875527242be5e91c64a2debb7e2d159f5edc7f53a86c504e4e782f5635dd4e52b573526d1528d4aa4944384f52f68dc9a7c25513c3e5b2a7922b8c
DIST shorewall6-5.2.1.tar.bz2 188322 BLAKE2B 5814433b11001f1e00ce3b124b5ec4ca6b1909ec00f966cb5fc93c34207325853249964492eb03f1f3c73cfc9c1b42def9578e507395395dd067f236475215b5 SHA512 b5dd5c4bf014c24a8a8bb4dc38b45dc92749182091b572340e1aef12d0aaeeb1dc436716b449cc1de34c74c6e4d590cc8cbe6b73aa3c614e8c9c37d7fa7a00a6
DIST shorewall6-lite-5.2.0.5.tar.bz2 36370 BLAKE2B 212cee0313c3bbf08c8d22893c5b62125d0362eb66218dc954bc05d0e082fdb4dab209a05948300394943dcd97f698c1e02310ec54cc88fb72bd24d4383776f7 SHA512 18bcbaf3bd56aaadb8d42610d4868278f42299e5a022ac5732f730b34ed7d97f7cd013f1c9374f0a6afc809250288490d94d2b4e02e4bf5edf2542bff99150e4
+DIST shorewall6-lite-5.2.1.1.tar.bz2 38766 BLAKE2B 3a60a877516676a85f5d5d645ce3140c92438c7bb44abb5d8b8e188611bc14a0f3611e977a26526e6408439dd29eb00584217230e20e94ead9f5cbab73a980b3 SHA512 3df814352027ef9f16df030c7187eaa4d7b984cbb23e123eaa19a123a85e276a730b510ff7a76cafba80978474ed5bcb57a4b569332396780e14f7aa7d0d8669
DIST shorewall6-lite-5.2.1.tar.bz2 37244 BLAKE2B 4fcd5a1b65b15a7c4214b079677f6ee3604d1a718fe6a4710d42085434af64bcef9db57135b0c6b0e6678dba6272a4341330e47b8a6917c759e450091c7d1b5a SHA512 ca807bf0d59db09439d80725e6eeafb7795346bd030fe8598dcccc4fc93a57819715c33c73035c1819a9eba93efe69e058be1377fcd9adf135a0a08f6ff3e481
diff --git a/net-firewall/shorewall/shorewall-5.2.1.1.ebuild b/net-firewall/shorewall/shorewall-5.2.1.1.ebuild
new file mode 100644
index 00000000000..1666426f5c3
--- /dev/null
+++ b/net-firewall/shorewall/shorewall-5.2.1.1.ebuild
@@ -0,0 +1,479 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit linux-info prefix systemd versionator
+
+DESCRIPTION='A high-level tool for configuring Netfilter'
+HOMEPAGE="http://www.shorewall.net/"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="doc +init +ipv4 ipv6 lite4 lite6 selinux"
+
+MY_PV=${PV/_rc/-RC}
+MY_PV=${MY_PV/_beta/-Beta}
+MY_P=${PN}-${MY_PV}
+
+MY_MAJOR_RELEASE_NUMBER=$(get_version_component_range 1-2)
+MY_MAJORMINOR_RELEASE_NUMBER=$(get_version_component_range 1-3)
+
+# shorewall
+MY_PN_IPV4=Shorewall
+MY_P_IPV4=${MY_PN_IPV4/#S/s}-${MY_PV}
+
+# shorewall6
+MY_PN_IPV6=Shorewall6
+MY_P_IPV6=${MY_PN_IPV6/#S/s}-${MY_PV}
+
+# shorewall-lite
+MY_PN_LITE4=Shorewall-lite
+MY_P_LITE4=${MY_PN_LITE4/#S/s}-${MY_PV}
+
+# shorewall6-lite
+MY_PN_LITE6=Shorewall6-lite
+MY_P_LITE6=${MY_PN_LITE6/#S/s}-${MY_PV}
+
+# shorewall-init
+MY_PN_INIT=Shorewall-init
+MY_P_INIT=${MY_PN_INIT/#S/s}-${MY_PV}
+
+# shorewall-core
+MY_PN_CORE=Shorewall-core
+MY_P_CORE=${MY_PN_CORE/#S/s}-${MY_PV}
+
+# shorewall-docs-html
+MY_PN_DOCS=Shorewall-docs-html
+MY_P_DOCS=${MY_PN_DOCS/#S/s}-${MY_PV}
+
+# Upstream URL schema:
+# Beta: $MIRROR/pub/shorewall/development/4.6/shorewall-4.6.4-Beta2/shorewall-4.6.4-Beta2.tar.bz2
+# RC: $MIRROR/pub/shorewall/development/4.6/shorewall-4.6.4-RC1/shorewall-4.6.4-RC1.tar.bz2
+# Release: $MIRROR/pub/shorewall/4.6/shorewall-4.6.3/shorewall-4.6.3.3.tar.bz2
+
+MY_URL_PREFIX=
+MY_URL_SUFFIX=
+if [[ ${MY_PV} = *-Beta* ]] || [[ ${MY_PV} = *-RC* ]]; then
+ MY_URL_PREFIX='development/'
+
+ _tmp_last_index=$(($(get_last_version_component_index ${MY_PV})+1))
+ _tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${MY_PV})
+ if [[ ${_tmp_suffix} = *Beta* ]] || [[ ${_tmp_suffix} = *RC* ]]; then
+ MY_URL_SUFFIX="-${_tmp_suffix}"
+ fi
+
+ # Cleaning up temporary variables
+ unset _tmp_last_index
+ unset _tmp_suffix
+else
+ KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+SRC_URI="
+ 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
+ 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 )
+ 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 )
+ 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 )
+ 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 )
+ 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 )
+ 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 )
+"
+
+# - Shorewall6 requires Shorewall
+# - Installing Shorewall-init or just the documentation doesn't make any sense,
+# that's why we force the user to select at least one "real" Shorewall product
+#
+# See http://shorewall.net/download.htm#Which
+REQUIRED_USE="
+ ipv6? ( ipv4 )
+ || ( ipv4 lite4 lite6 )
+"
+
+# No build dependencies! Just plain shell scripts...
+DEPEND=""
+
+RDEPEND="
+ >=net-firewall/iptables-1.4.20
+ >=sys-apps/iproute2-3.8.0[-minimal]
+ >=sys-devel/bc-1.06.95
+ ipv4? (
+ >=dev-lang/perl-5.16
+ virtual/perl-Digest-SHA
+ )
+ ipv6? (
+ >=dev-perl/Socket6-0.230.0
+ >=net-firewall/iptables-1.4.20[ipv6]
+ >=sys-apps/iproute2-3.8.0[ipv6]
+ )
+ lite6? (
+ >=net-firewall/iptables-1.4.20[ipv6]
+ >=sys-apps/iproute2-3.8.0[ipv6]
+ )
+ init? ( >=sys-apps/coreutils-8.20 )
+ selinux? ( >=sec-policy/selinux-shorewall-2.20161023-r3 )
+ !net-firewall/shorewall-core
+ !net-firewall/shorewall6
+ !net-firewall/shorewall-lite
+ !net-firewall/shorewall6-lite
+ !net-firewall/shorewall-init
+ !<sys-apps/systemd-214
+"
+
+S=${WORKDIR}
+
+pkg_pretend() {
+ local CONFIG_CHECK="~NF_CONNTRACK"
+
+ local WARNING_CONNTRACK="Without NF_CONNTRACK support, you will be unable"
+ local WARNING_CONNTRACK+=" to run any shorewall-based firewall on the local system."
+
+ if use ipv4 || use lite4; then
+ CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV4"
+
+ local WARNING_CONNTRACK_IPV4="Without NF_CONNTRACK_IPV4 support, you will"
+ local WARNING_CONNTRACK_IPV4+=" be unable to run any shorewall-based IPv4 firewall on the local system."
+ fi
+
+ if use ipv6 || use lite6; then
+ CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV6"
+
+ local WARNING_CONNTRACK_IPV6="Without NF_CONNTRACK_IPV6 support, you will"
+ local WARNING_CONNTRACK_IPV6+=" be unable to run any shorewall-based IPv6 firewall on the local system."
+ fi
+
+ check_extra_config
+}
+
+pkg_setup() {
+ if [[ -n "${DIGEST}" ]]; then
+ einfo "Unsetting environment variable \"DIGEST\" to prevent conflicts with package's \"install.sh\" script ..."
+ unset DIGEST
+ fi
+}
+
+src_prepare() {
+ # We are moving each unpacked source from MY_P_* to MY_PN_*.
+ # This allows us to use patches from upstream and keeps epatch_user working
+
+ einfo "Preparing shorewallrc ..."
+ cp "${FILESDIR}"/shorewallrc-r3 "${S}"/shorewallrc.gentoo || die "Copying shorewallrc failed"
+ eprefixify "${S}"/shorewallrc.gentoo
+ sed -i \
+ -e "s|SERVICEDIR=tbs|SERVICEDIR=$(systemd_get_systemunitdir)|" \
+ "${S}"/shorewallrc.gentoo || die "Failed to update shorewallrc"
+
+ # shorewall-core
+ mv "${S}"/${MY_P_CORE} "${S}"/${MY_PN_CORE} || die "Failed to move '${S}/${MY_P_CORE}' to '${S}/${MY_PN_CORE}'"
+ ebegin "Applying Gentoo-specific changes to ${MY_P_CORE} ..."
+ ln -s ../shorewallrc.gentoo ${MY_PN_CORE}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo"
+ eend 0
+
+ pushd "${S}"/${MY_PN_CORE} &>/dev/null || die
+ eapply "${FILESDIR}"/shorewall-core-5.2.1-no-gzipped-manpages.patch
+ popd &>/dev/null || die
+
+ # shorewall
+ if use ipv4; then
+ mv "${S}"/${MY_P_IPV4} "${S}"/${MY_PN_IPV4} || die "Failed to move '${S}/${MY_P_IPV4}' to '${S}/${MY_PN_IPV4}'"
+ ebegin "Applying Gentoo-specific changes to ${MY_P_IPV4}"
+ ln -s ../shorewallrc.gentoo ${MY_PN_IPV4}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo"
+ cp "${FILESDIR}"/shorewall.confd-r1 "${S}"/${MY_PN_IPV4}/default.gentoo || die "Copying shorewall.confd-r1 failed"
+ cp "${FILESDIR}"/shorewall.initd-r3 "${S}"/${MY_PN_IPV4}/init.gentoo.sh || die "Copying shorewall.initd-r2 failed"
+ cp "${FILESDIR}"/shorewall.systemd "${S}"/${MY_PN_IPV4}/gentoo.service || die "Copying shorewall.systemd failed"
+ eend 0
+
+ pushd "${S}"/${MY_PN_IPV4} &>/dev/null || die
+ eapply "${FILESDIR}"/shorewall-5.2.1-no-gzipped-manpages.patch
+ popd &>/dev/null || die
+ fi
+
+ # shorewall6
+ if use ipv6; then
+ mv "${S}"/${MY_P_IPV6} "${S}"/${MY_PN_IPV6} || die "Failed to move '${S}/${MY_P_IPV6}' to '${S}/${MY_PN_IPV6}'"
+ ebegin "Applying Gentoo-specific changes to ${MY_P_IPV6}"
+ ln -s ../shorewallrc.gentoo ${MY_PN_IPV6}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo"
+ cp "${FILESDIR}"/shorewall.confd-r1 "${S}"/${MY_PN_IPV6}/default.gentoo || die "Copying shorewall.confd-r1 failed"
+ cp "${FILESDIR}"/shorewall.initd-r3 "${S}"/${MY_PN_IPV6}/init.gentoo.sh || die "Copying shorewall.initd-r2 failed"
+ cp "${FILESDIR}"/shorewall6.systemd "${S}"/${MY_PN_IPV6}/gentoo.service || die "Copying shorewall6.systemd failed"
+ eend 0
+
+ pushd "${S}"/${MY_PN_IPV6} &>/dev/null || die
+ eapply "${FILESDIR}"/shorewall-5.2.1-no-gzipped-manpages.patch
+ popd &>/dev/null || die
+ fi
+
+ # shorewall-lite
+ if use lite4; then
+ mv "${S}"/${MY_P_LITE4} "${S}"/${MY_PN_LITE4} || die "Failed to move '${S}/${MY_P_LITE4}' to '${S}/${MY_PN_LITE4}'"
+ ebegin "Applying Gentoo-specific changes to ${MY_P_LITE4}"
+ ln -s ../shorewallrc.gentoo ${MY_PN_LITE4}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo"
+ cp "${FILESDIR}"/shorewall-lite.confd-r1 "${S}"/${MY_PN_LITE4}/default.gentoo || die "Copying shorewall-lite.confd-r1 failed"
+ cp "${FILESDIR}"/shorewall-lite.initd-r3 "${S}"/${MY_PN_LITE4}/init.gentoo.sh || die "Copying shorewall-lite.initd-r2 failed"
+ cp "${FILESDIR}"/shorewall-lite.systemd "${S}"/${MY_PN_LITE4}/gentoo.service || die "Copying shorewall-lite.systemd failed"
+ eend 0
+
+ pushd "${S}"/${MY_PN_LITE4} &>/dev/null || die
+ eapply "${FILESDIR}"/shorewall-lite-5.2.1-no-gzipped-manpages.patch
+ popd &>/dev/null || die
+ fi
+
+ # shorewall6-lite
+ if use lite6; then
+ mv "${S}"/${MY_P_LITE6} "${S}"/${MY_PN_LITE6} || die "Failed to move '${S}/${MY_P_LITE6}' to '${S}/${MY_PN_LITE6}'"
+ ebegin "Applying Gentoo-specific changes to ${MY_P_LITE6}"
+ ln -s ../shorewallrc.gentoo ${MY_PN_LITE6}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo"
+ cp "${FILESDIR}"/shorewall-lite.confd-r1 "${S}"/${MY_PN_LITE6}/default.gentoo || die "Copying shorewall-lite.confd-r1 failed"
+ cp "${FILESDIR}"/shorewall-lite.initd-r3 "${S}"/${MY_PN_LITE6}/init.gentoo.sh || die "Copying shorewall-lite.initd-r2 failed"
+ cp "${FILESDIR}"/shorewall6-lite.systemd "${S}"/${MY_PN_LITE6}/gentoo.service || die "Copying shorewall6-lite.systemd failed"
+ eend 0
+
+ pushd "${S}"/${MY_PN_LITE6} &>/dev/null || die
+ eapply "${FILESDIR}"/shorewall-lite-5.2.1-no-gzipped-manpages.patch
+ popd &>/dev/null || die
+ fi
+
+ # shorewall-init
+ if use init; then
+ mv "${S}"/${MY_P_INIT} "${S}"/${MY_PN_INIT} || die "Failed to move '${S}/${MY_P_INIT}' to '${S}/${MY_PN_INIT}'"
+ ebegin "Applying Gentoo-specific changes to ${MY_P_INIT}"
+ ln -s ../shorewallrc.gentoo ${MY_PN_INIT}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo"
+ cp "${FILESDIR}"/shorewall-init.confd "${S}"/${MY_PN_INIT}/default.gentoo || die "Copying shorewall-init.confd failed"
+ cp "${FILESDIR}"/shorewall-init.initd "${S}"/${MY_PN_INIT}/init.gentoo.sh || die "Copying shorewall-init.initd failed"
+ cp "${FILESDIR}"/shorewall-init.systemd "${S}"/${MY_PN_INIT}/gentoo.service || die "Copying shorewall-init.systemd failed"
+ cp "${FILESDIR}"/shorewall-init.readme "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt || die "Copying shorewall-init.systemd failed"
+ eend 0
+
+ eprefixify "${S}"/${MY_PN_INIT}/init.gentoo.sh
+
+ pushd "${S}"/${MY_PN_INIT} &>/dev/null || die
+ eapply -p2 "${FILESDIR}"/shorewall-init-01_remove-ipset-functionality-r1.patch
+ popd &>/dev/null || die
+ fi
+
+ # shorewall-docs-html
+ if use doc; then
+ mv "${S}"/${MY_P_DOCS} "${S}"/${MY_PN_DOCS} || die "Failed to move '${S}/${MY_P_DOCS}' to '${S}/${MY_PN_DOCS}'"
+ fi
+
+ eapply_user
+}
+
+src_configure() {
+ :;
+}
+
+src_compile() {
+ :;
+}
+
+src_install() {
+ # shorewall-core
+ einfo "Installing ${MY_P_CORE} ..."
+ DESTDIR="${D%/}" ${MY_PN_CORE}/install.sh shorewallrc.gentoo || die "${MY_PN_CORE}/install.sh failed"
+ dodoc "${S}"/${MY_PN_CORE}/changelog.txt "${S}"/${MY_PN_CORE}/releasenotes.txt
+
+ # shorewall
+ if use ipv4; then
+ einfo "Installing ${MY_P_IPV4} ..."
+ DESTDIR="${D%/}" ${MY_PN_IPV4}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV4}/install.sh failed"
+ keepdir /var/lib/shorewall
+
+ if use doc; then
+ dodoc -r "${S}"/${MY_PN_IPV4}/Samples
+ fi
+ fi
+
+ # shorewall6
+ if use ipv6; then
+ einfo "Installing ${MY_P_IPV6} ..."
+ DESTDIR="${D%/}" ${MY_PN_IPV6}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV6}/install.sh failed"
+ keepdir /var/lib/shorewall6
+
+ if use doc; then
+ dodoc -r "${S}"/${MY_PN_IPV6}/Samples6
+ fi
+ fi
+
+ # shorewall-lite
+ if use lite4; then
+ einfo "Installing ${MY_P_LITE4} ..."
+ DESTDIR="${D%/}" ${MY_PN_LITE4}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE4}/install.sh failed"
+ keepdir /var/lib/shorewall-lite
+ fi
+
+ # shorewall6-lite
+ if use lite6; then
+ einfo "Installing ${MY_P_LITE6} ..."
+ DESTDIR="${D%/}" ${MY_PN_LITE6}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE6}/install.sh failed"
+ keepdir /var/lib/shorewall6-lite
+ fi
+
+ # shorewall-init
+ if use init; then
+ einfo "Installing ${MY_P_INIT} ..."
+ DESTDIR="${D%/}" ${MY_PN_INIT}/install.sh shorewallrc.gentoo || die "${MY_PN_INIT}/install.sh failed"
+ dodoc "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt
+
+ if [[ -f "${D}etc/logrotate.d/shorewall-init" ]]; then
+ # On Gentoo, shorewall-init will not create shorewall-ifupdown.log,
+ # so we don't need a logrotate configuration file for shorewall-init
+ einfo "Removing unused \"${D}etc/logrotate.d/shorewall-init\" ..."
+ rm -rf "${D}"etc/logrotate.d/shorewall-init || die "Removing \"${D}etc/logrotate.d/shorewall-init\" failed"
+ fi
+
+ if [[ -d "${D}etc/NetworkManager" ]]; then
+ # On Gentoo, we don't support NetworkManager
+ # so we don't need this folder at all
+ einfo "Removing unused \"${D}etc/NetworkManager\" ..."
+ rm -rf "${D}"etc/NetworkManager || die "Removing \"${D}etc/NetworkManager\" failed"
+ fi
+
+ if [[ -f "${D}usr/share/shorewall-init/ifupdown" ]]; then
+ # This script isn't supported on Gentoo
+ rm -rf "${D}"usr/share/shorewall-init/ifupdown || die "Removing \"${D}usr/share/shorewall-init/ifupdown\" failed"
+ fi
+ fi
+
+ if use doc; then
+ einfo "Installing ${MY_P_DOCS} ..."
+ docinto html && dodoc -r "${S}"/${MY_PN_DOCS}/*
+ fi
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ # This is a new installation
+
+ # Show first steps for shorewall/shorewall6
+ local _PRODUCTS=""
+ if use ipv4; then
+ _PRODUCTS="shorewall"
+
+ if use ipv6; then
+ _PRODUCTS="${_PRODUCTS}/shorewall6"
+ fi
+ fi
+
+ if [[ -n "${_PRODUCTS}" ]]; then
+ elog "Before you can use ${_PRODUCTS}, you need to edit its configuration in:"
+ elog ""
+ elog " /etc/shorewall/shorewall.conf"
+
+ if use ipv6; then
+ elog " /etc/shorewall6/shorewall6.conf"
+ fi
+
+ elog ""
+ elog "To activate your shorewall-based firewall on system start, please add ${_PRODUCTS} to your default runlevel:"
+ elog ""
+ elog " # rc-update add shorewall default"
+
+ if use ipv6; then
+ elog " # rc-update add shorewall6 default"
+ fi
+ fi
+
+ # Show first steps for shorewall-lite/shorewall6-lite
+ _PRODUCTS=""
+ if use lite4; then
+ _PRODUCTS="shorewall-lite"
+ fi
+
+ if use lite6; then
+ if [[ -z "${_PRODUCTS}" ]]; then
+ _PRODUCTS="shorewall6-lite"
+ else
+ _PRODUCTS="${_PRODUCTS}/shorewall6-lite"
+ fi
+ fi
+
+ if [[ -n "${_PRODUCTS}" ]]; then
+ if use ipv4; then
+ elog ""
+ fi
+
+ elog "Before you can use ${_PRODUCTS}, you need to provide a configuration, which you can"
+ elog "create using ${CATEGORY}/shorewall (with \"ipv4\" and or \"ipv6\" USE flag)."
+ elog ""
+ elog "To read more about ${_PRODUCTS}, please visit"
+ elog " http://shorewall.net/CompiledPrograms.html"
+ elog ""
+ elog "To activate your shorewall-lite-based firewall on system start, please add ${PRODUCTS} to your default runlevel:"
+ elog ""
+
+ if use lite4; then
+ elog " # rc-update add shorewall-lite default"
+ fi
+
+ if use lite6; then
+ elog " # rc-update add shorewall6-lite default"
+ fi
+ fi
+
+ if use init; then
+ elog ""
+ elog "To secure your system on boot, please add shorewall-init to your boot runlevel:"
+ elog ""
+ elog " # rc-update add shorewall-init boot"
+ elog ""
+ elog "and review \$PRODUCTS in"
+ elog ""
+ elog " /etc/conf.d/shorewall-init"
+ fi
+
+ fi
+
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least ${MY_MAJOR_RELEASE_NUMBER} ${v}; then
+ # This is an upgrade
+
+ elog "You are upgrading from a previous major version. It is highly recommended that you read"
+ elog ""
+ elog " - /usr/share/doc/shorewall*/releasenotes.tx*"
+ elog " - http://shorewall.net/Shorewall-5.html#idm214"
+
+ if use ipv4; then
+ elog ""
+ elog "You can auto-migrate your configuration using"
+ elog ""
+ elog " # shorewall update -A"
+
+ if use ipv6; then
+ elog " # shorewall6 update -A"
+ fi
+
+ elog ""
+ elog "*after* you have merged the changed files using one of the configuration"
+ elog "files update tools of your choice (dispatch-conf, etc-update...)."
+
+ elog ""
+ elog "But if you are not familiar with the \"shorewall[6] update\" command,"
+ elog "please read the shorewall[6] man page first."
+ fi
+
+ # Show this elog only once
+ break
+ fi
+ done
+
+ if ! use init; then
+ elog ""
+ elog "Consider emerging ${CATEGORY}/${PN} with USE flag \"init\" to secure your system on boot"
+ elog "before your shorewall-based firewall is ready to start."
+ elog ""
+ elog "To read more about shorewall-init, please visit"
+ elog " http://www.shorewall.net/Shorewall-init.html"
+ fi
+
+ if ! has_version "net-firewall/conntrack-tools"; then
+ elog ""
+ elog "Your Shorewall firewall can utilize \"conntrack\" from the \"net-firewall/conntrack-tools\""
+ elog "package. if you want to use this feature, you need to install \"net-firewall/conntrack-tools\"!"
+ fi
+
+ if ! has_version "dev-perl/Devel-NYTProf"; then
+ elog ""
+ elog "If you want to profile your Shorewall firewall you need to install \"dev-perl/Devel-NYTProf\"!"
+ fi
+}