summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-01-26 20:34:42 +0100
committerThomas Deutschmann <whissi@gentoo.org>2019-01-26 20:34:42 +0100
commit8af1323d3ac7bcb3043fe39a869c6e4bebd87a17 (patch)
treeb134650a7ddf202c029c84b965201bfedaf8f6fa /net-firewall
parentdev-db/mysql: bump to v5.7.25 (diff)
downloadgentoo-8af1323d3ac7bcb3043fe39a869c6e4bebd87a17.tar.gz
gentoo-8af1323d3ac7bcb3043fe39a869c6e4bebd87a17.tar.bz2
gentoo-8af1323d3ac7bcb3043fe39a869c6e4bebd87a17.zip
net-firewall/shorewall: bump to v5.2.2
Package-Manager: Portage-2.3.58, Repoman-2.3.12 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.2.ebuild482
2 files changed, 489 insertions, 0 deletions
diff --git a/net-firewall/shorewall/Manifest b/net-firewall/shorewall/Manifest
index 9e6b945df9c9..a4334183ceeb 100644
--- a/net-firewall/shorewall/Manifest
+++ b/net-firewall/shorewall/Manifest
@@ -1,7 +1,14 @@
DIST shorewall-5.2.1.4.tar.bz2 554756 BLAKE2B cfbc917fb12049a0e8817c478fcccb93b02634ad9aebcd31a839f934e52890f6c20dc2a7d10742d4e10ac0adb1500d9e6445b43390db5bc28874e610b9c07939 SHA512 3682399ddc743c03965e0c0c26b5714e611d186bddf9169524268488cc4f2d6e9e9fb3b2a4c24408cc247ce7d32f793fb35090f85b73a645bb0dd0e99c671564
+DIST shorewall-5.2.2.tar.bz2 557248 BLAKE2B d4fface30ef1bbeefda716b00373e686db73bd29bd2597d3f9950c5f4b3208205be8f321e84749fb92313633f7a6a2a37a493e4a826790d82e6bc6a8dd18bbd3 SHA512 0c4c3e51c2517a56fda2335f433033c8db66fcb843484b928979627b213be4e24408deb1e49df56f9a96e6b9c2a95d74789f07a365d4c4e6f17db96915520598
DIST shorewall-core-5.2.1.4.tar.bz2 78957 BLAKE2B 7310813f4c4ac57378ed9565b1aa32fc3db3bcf9e1dc6e6307a7c399465a051110262dcb78c6d465a6227beeadc1f5c4a82d204c1926f66bcecf5469dc44b5e3 SHA512 9418cb6ef14def2a1a2c7879c6364881d80245ff5a59996bb71d093c14e67c6ce1d462d0217f0ae8574e9a916d3796f945dbececbe6b9851f892022f29a389c9
+DIST shorewall-core-5.2.2.tar.bz2 68223 BLAKE2B 33bc2b8a2ec2f76a909ddd73199462a470ed631029cebae37ca4a43d64a217e6e20fe0aa4c3002a2a5d0d3894a23634f45b4d5ecd916b96db44d3abcbd2fee58 SHA512 607fee1d17bb777e95346867d4dfeac5063f353d6bac6bc6ea625841746bb66a9959cd436a7340c18258188771bddf916e004ba81f256f01699cfda9c909cf7d
DIST shorewall-docs-html-5.2.1.4.tar.bz2 4303361 BLAKE2B 22f7a94d9cb0de5ee9903e8d05498a6a6de6ea643f2d08b709bf9f8dd516ba507f80ed11207973884905421443eedf56e3693b9e42f5f372515b957e2be8132c SHA512 44bb66feecac927de6fe1cdfba9247e9f01c982c3b105f7cd68348fee0803b9b7bd76e7551528e0b2d6ff8e65e6ebf8a05c26831871a98565374692d6405f34a
+DIST shorewall-docs-html-5.2.2.tar.bz2 4302493 BLAKE2B 49c8f44aaeb3d06330ea293fafb7535096355bd4a151d8b4dfbc476d1e92c785360474d1b86754247ccff1f7198fd7f6f8e17da608f41a76642e73cafbdea65b SHA512 ea7fa5f6df6413e33c5fa9f043973c70351c9c99fe8e6095ccbe3e5b6e4667c4f89907fc995ab252c6a1aee5652b496e96d4e38b898ddd41b9e220f4edefa93e
DIST shorewall-init-5.2.1.4.tar.bz2 34088 BLAKE2B f285b04e448584fe1f9a5528b6ddb6e16cbedcfda51f9c9925228835b2b065c658e9314ecad23364dc4ee21579fa113fe5a1c5581ea3e7c310d12744de64798d SHA512 58044bbcd2f30aaecb3c02374ca21a51b6f5fee49e9cf9565444649d64e3babd3070a72eddaccb52224201064e8642f9bcd9979bde41c13bfe10438720911d24
+DIST shorewall-init-5.2.2.tar.bz2 33578 BLAKE2B d8eb427e482f01fc59412b08cd58dc2317157570b266e5950ee34d17d504d9dfd886ecbfc861bc83b445b44b2cf85831ec2462acd54c9be519263e340af0d827 SHA512 4aaee33f2f6944498c88938796e987f05e16f2a4a761b1ec14a293ffd293d688bf39f913c426168a7162f3b0dba6679dc0392d9248bd43f678dd42e9532afbbe
DIST shorewall-lite-5.2.1.4.tar.bz2 39858 BLAKE2B dcaf1adfc20640c22cdca20e2b786ec4ad2736567c0c5eec6cd22a95f0b0c461b24826afa933eac7a1ecffd836da55b8053a1370623d73dd6434b91d59d63e36 SHA512 25712a264ee615b4b0ae038836636ea07f4fedca721759b3860912838ef1aee4535831ed4dd8abd670e082e9f59bd52ac00fb0fd1c5907786bb239e270d5fdf1
+DIST shorewall-lite-5.2.2.tar.bz2 39421 BLAKE2B 6d24b62c54eed028785b6eb581be4659c1110c5e7d85caf3382b814edce0046064798a1ffb5100f04bc48bbac877969913f03e19883c33563bc7dfdb0bc48a3d SHA512 e49ee3eee13a4fe801c5d86aa85747a9543882a49b40454dad62154f772dc47adea84e967a4ef30b8c4c3e9964a04c76a794a318affe8eaac6cc107b255cca4a
DIST shorewall6-5.2.1.4.tar.bz2 191855 BLAKE2B 3967e715ca88c85fd05f0cce1d4836c2b7f17b7a7360698c269b109f54dfbac2c4d67958c3c8c2d8cb74b5117d7f8ac30dc9ab3c09d97243cffe21ef3005c7b7 SHA512 8b49f187b7141c3eedb02c64a17fe8fa3f01e4b40b33184c4b4c5914e65557595828f87f3e1534abb973320b7a1103b10296b6dfc316ea78f698aeb61a0d63a1
+DIST shorewall6-5.2.2.tar.bz2 191037 BLAKE2B d774ab42658e2636fc15bc9dc04510c3a3745c9ebe204a27707237c168b476ee4fc247fb55c17b99069348947db1760d23c9f61d70a78231d8928e86eb312560 SHA512 5cf83e8c3fd940a6573de04afd29e37e3aa5d6908fffa276ff338b6818d0200b3d1e556420fcdf6989fe27dbef6e26f5a513ea566d70acb9a7db4bf1c3e6faf4
DIST shorewall6-lite-5.2.1.4.tar.bz2 39599 BLAKE2B cb0e2b45fecc4c126504f5caafcd291e919542cd08fb53d69f89c11d4bca784744e2c6eedc0e86a234bcfe7dd9baee46498de1600bdba4475be6a705c92faa54 SHA512 a994cc1a37174ac085d784c5638eb9c5713e6f191260857c7b288a5ba5c54e3d99e88fb31a5b887d3d637edbd2ba8c7711575ca323d616f49b7a0595431b6e13
+DIST shorewall6-lite-5.2.2.tar.bz2 39148 BLAKE2B bcb0cb1b23cb4a486faafcfee588e11a6a50f6d151039ef15f396838b828ed803589d205717ad868140cc7d468f9309ac23dd34d307bbd8640a7791728102c55 SHA512 10f96bc42f47adebc581579b28ab2edb79876dccbf0a8c27d46234ac8fb9af8cb03730851188576bdb24278e9b19cb3cdef91bb4873cab0ef82064d54eeb176f
diff --git a/net-firewall/shorewall/shorewall-5.2.2.ebuild b/net-firewall/shorewall/shorewall-5.2.2.ebuild
new file mode 100644
index 000000000000..b12b3712acbb
--- /dev/null
+++ b/net-firewall/shorewall/shorewall-5.2.2.ebuild
@@ -0,0 +1,482 @@
+# Copyright 1999-2019 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."
+
+ # kernel >=4.19 has unified NF_CONNTRACK module, bug 671176
+ if kernel_is -lt 4 19; then
+ 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
+ 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
+}