public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Thomas Deutschmann" <whissi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/shorewall/
Date: Mon,  6 Aug 2018 23:56:34 +0000 (UTC)	[thread overview]
Message-ID: <1533599787.3b384e7068e79024defc28e037961035217b40f6.whissi@gentoo> (raw)

commit:     3b384e7068e79024defc28e037961035217b40f6
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  6 23:56:06 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Aug  6 23:56:27 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b384e70

net-firewall/shorewall: bump to v5.2.0.5

Package-Manager: Portage-2.3.44, Repoman-2.3.10

 net-firewall/shorewall/Manifest                 |   7 +
 net-firewall/shorewall/shorewall-5.2.0.5.ebuild | 459 ++++++++++++++++++++++++
 2 files changed, 466 insertions(+)

diff --git a/net-firewall/shorewall/Manifest b/net-firewall/shorewall/Manifest
index df74226f872..b53573f8835 100644
--- a/net-firewall/shorewall/Manifest
+++ b/net-firewall/shorewall/Manifest
@@ -1,7 +1,14 @@
 DIST shorewall-5.2.0.4.tar.bz2 538938 BLAKE2B 1df68e166f5f443f120b9f45010da005b3d86a51d09c059d0886a2735c6d27c1568ae0422998f001deb48c512cb9fed23cbad423754682b06e9a4b5176b45cef SHA512 b44622972d4b4ffcde9d7da57d3994279f3962bb2d2e13892d7d77453da502527ab89cb59fb6692341b5d166cb7a3e31909df31dc21c758707eff29f3ab2c9a0
+DIST shorewall-5.2.0.5.tar.bz2 539666 BLAKE2B df4f8680ee29a773f584a1210b40a7047be1a590490a01617b26b71840e488f569ebcf268ba2f6199fb10671925356c4e187a5219ed7784672f6d14b2e90f580 SHA512 8299e0f40ad96c09eceb9460c6088e694e50b7a1b81a16395426466c666eb21dc23236c1ee6cc6047c05ad4a4ba43aac33fc7cb05f5784bf27ac81e5fa4e9059
 DIST shorewall-core-5.2.0.4.tar.bz2 76022 BLAKE2B 58602e01f7a7b6e6853c847fa38bfff2fbeb57ea68ffd124f9e556b0137bef65bfe25c8b7c70f0d6fc7b21dab7e82401985a08f0a1a8c4ca6159cbfd1862712c SHA512 bfd21f249fa3b7a952bf9aeead91eac0f7db6c2f3c386e9d2aca9645916b8a799ce58ac7b6edb93d0b934d224824f9cd94b8db63a0b35a260051209613561bf4
+DIST shorewall-core-5.2.0.5.tar.bz2 76567 BLAKE2B 078520ef3166d689d559f1c08ae417a2bf5c7fdc3618a26f72b244fa14679634752dffaeebafbd84609e33ec7f1856b701abb297077797abcb14d3264a3bfd25 SHA512 640c854a7484e886cd603742d16682456e02c0054c3d6d5f2188bf30e235ac975fc1ce50af500cf4fb99253a1d13c2408cc72aff54f14aa738e1e80b8d07066a
 DIST shorewall-docs-html-5.2.0.4.tar.bz2 4294681 BLAKE2B b6e975ddefae5dc7fd0a9be58c6fd231e828ed8e18e2405202766068b37796c075785c2cc05f25bc9decc50fbdfc01bad8d8f929b90592aa2e8cc040719e3cf1 SHA512 2685161f9d25cf745831f603129c4e9a33a264118698392f589e481a76bcb082dad14c9be6dc57c29441eb9807d842e5f08b3483e1e03099f0059f10ea907d91
+DIST shorewall-docs-html-5.2.0.5.tar.bz2 4295236 BLAKE2B 8cef99b3535551e1d4ecdf0d3d1c2b3434c0b91c793f0857bc3f22f0020d80cd49b038c7c4f5d15fe23af14869f1736a69b01978403fe94bc5dac261bd2f5e4d SHA512 5fa3ab52580e8f090ab0be9b1796bef65a41d1a9dc5c9501e3daeba22bad7b28b5306aba5b383c654eed5f7d727a7744812034eeb1ad051633a80b2892096c24
 DIST shorewall-init-5.2.0.4.tar.bz2 30526 BLAKE2B a8ac5bf7e650a58d87b608321e0ed40d8b73ed675d5b5b64ff5859149f04aca507d7a83ff6ca9c7801c84fb416d22fdc930199731a9134ef529b29cf1ec01a67 SHA512 c4e2bcf5a2f7b8fae30773a930ac7433cc8678f7bb52958ecd92a4ce5f0a78041e45578bd47e01ad72fe9fc1a3cbcda2995bd9379cc90917a31b3f676c12beb6
+DIST shorewall-init-5.2.0.5.tar.bz2 30881 BLAKE2B 92617f17553b6df514cbfc72e86597e9859baa641782848763923ff4c650915cd7fb97f0c71b41d525d6a9d5ebbf10e9918d6a8d682c9c4654de3ba40b54c0ce SHA512 0367ad7468d5a9c0c70d31fdd66c05e54cf747dd45dc1bf2e128935c65af8c2508f033ed2945185059214dd81f5a8fb3f122323fd2bb79d2d642997741167371
 DIST shorewall-lite-5.2.0.4.tar.bz2 36307 BLAKE2B ad95e4f640ae1f05936dd5dbc87e4acaf6dd576bd6704f650c8bfdc437284f0c121563427f89dbe5de4e19f543f3e182ff0d5a333da8c8416aae24994ac52ed0 SHA512 55bb514d9446c953de0453b8016105ed2471420d2ca6346cbd986f03cec5e713a1d27d5e08ddc6cf54cd6e5f936cf9a826eac622596480374929f41c062e8803
+DIST shorewall-lite-5.2.0.5.tar.bz2 36651 BLAKE2B 192ecda8b04d0330f0a7bced6136f2723d201cd7c30af80b59bfa81f49614d10c900cf5856296ad854287f3c925e5f78f144698674ec7b8d91065072db4ca53e SHA512 b95154f7614eeedde1fc087750372cadd0c0a9618986741e035a9d83c06d2534feb78edaf6a97e2a45788015e6706f8dac3714ca3b22bd068e792458a3f5af40
 DIST shorewall6-5.2.0.4.tar.bz2 186267 BLAKE2B 4076c94596e462d4f150d734700d400db90ca1d0bd788152e5421d581890cf28d7e6546d2ac0c604625cdf25771415229b2a3324153ec5439cddfcab73464ae5 SHA512 e8989b5c6fcc1162f42e884cdb0fff47baed61b69c39b8bbdaf78b246f95ee0bf6690fce3a6ae14eff2bf48d64b762b170d67462dc685f594dfd70a2e3720a01
+DIST shorewall6-5.2.0.5.tar.bz2 185740 BLAKE2B 846a3fc44a9c0a838cf75671ca34e78dd9758eeee0690d994a34615467b241f0c854e3bb9b818bcfd5e96664ab03e14a7c69affc946dffd1357ad744da41f8d5 SHA512 6875074ed8ee5bce40253a6e2633c422d7c2c1bf860a072236d6197cfe949e455b511a1792d822a8f2351254e99880236267ce70fc1150ca68e87f962b6cc265
 DIST shorewall6-lite-5.2.0.4.tar.bz2 36035 BLAKE2B edbdee2b979c0d2144e358b6e8b52808578923498c0da4f906ed6aa8460153879dd5f8b4cf98da4bcecc90a6a776d39ef17492881c093a018ccdc5b86e0c0bab SHA512 c212ba3f6bacab1b26bbc5c13a2bac2f1f796c7fa3d442f398c91ff367f242a9562ff2191b9b678e82d07a96c2dc39a0109d30417154e6cfd4f2c4c6e31b616f
+DIST shorewall6-lite-5.2.0.5.tar.bz2 36370 BLAKE2B 212cee0313c3bbf08c8d22893c5b62125d0362eb66218dc954bc05d0e082fdb4dab209a05948300394943dcd97f698c1e02310ec54cc88fb72bd24d4383776f7 SHA512 18bcbaf3bd56aaadb8d42610d4868278f42299e5a022ac5732f730b34ed7d97f7cd013f1c9374f0a6afc809250288490d94d2b4e02e4bf5edf2542bff99150e4

diff --git a/net-firewall/shorewall/shorewall-5.2.0.5.ebuild b/net-firewall/shorewall/shorewall-5.2.0.5.ebuild
new file mode 100644
index 00000000000..a7f7766988a
--- /dev/null
+++ b/net-firewall/shorewall/shorewall-5.2.0.5.ebuild
@@ -0,0 +1,459 @@
+# Copyright 1999-2018 Gentoo Foundation
+# 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
+
+	# 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
+	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
+	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
+	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
+	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
+
+		cd "${S}"/${MY_PN_INIT} || die
+		eapply -p2 "${FILESDIR}"/shorewall-init-01_remove-ipset-functionality-r1.patch
+		cd "${S}" || 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
+}


             reply	other threads:[~2018-08-06 23:56 UTC|newest]

Thread overview: 160+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-06 23:56 Thomas Deutschmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-22  9:38 [gentoo-commits] repo/gentoo:master commit in: net-firewall/shorewall/ Ulrich Müller
2024-01-08  9:48 Sam James
2021-02-03 20:16 Thomas Deutschmann
2020-09-30 22:18 Thomas Deutschmann
2020-09-30 22:18 Thomas Deutschmann
2020-09-27 13:39 Jeroen Roovers
2020-08-30 17:35 Thomas Deutschmann
2020-08-19 19:52 Thomas Deutschmann
2020-08-06 13:50 Thomas Deutschmann
2020-08-06 13:50 Thomas Deutschmann
2020-08-06 13:50 Thomas Deutschmann
2020-07-26 18:30 Thomas Deutschmann
2020-07-26 18:30 Thomas Deutschmann
2020-07-26 18:30 Thomas Deutschmann
2020-07-08 12:49 Thomas Deutschmann
2020-07-05 19:12 Thomas Deutschmann
2020-07-05 19:12 Thomas Deutschmann
2020-06-29 14:59 Thomas Deutschmann
2020-06-29 14:58 Thomas Deutschmann
2020-06-29 14:58 Thomas Deutschmann
2020-06-25 21:43 Thomas Deutschmann
2020-06-25 21:43 Thomas Deutschmann
2020-06-25 21:43 Thomas Deutschmann
2020-06-14 23:30 Thomas Deutschmann
2020-05-19  9:49 Thomas Deutschmann
2020-05-09 21:41 Thomas Deutschmann
2020-05-01 13:23 Thomas Deutschmann
2020-03-30  1:25 Thomas Deutschmann
2020-03-30  1:25 Thomas Deutschmann
2020-03-30  1:25 Thomas Deutschmann
2020-03-09 15:01 Thomas Deutschmann
2020-02-24 17:28 Thomas Deutschmann
2020-02-24 17:28 Thomas Deutschmann
2020-02-24 17:28 Thomas Deutschmann
2020-01-18  9:51 Thomas Deutschmann
2019-09-12 21:35 Thomas Deutschmann
2019-09-12 21:35 Thomas Deutschmann
2019-09-04  9:06 Thomas Deutschmann
2019-09-03 22:23 Thomas Deutschmann
2019-04-18  1:40 Thomas Deutschmann
2019-03-20 19:29 Thomas Deutschmann
2019-03-06 22:52 Thomas Deutschmann
2019-03-06 22:52 Thomas Deutschmann
2019-02-28  3:06 Thomas Deutschmann
2019-02-16 18:17 Thomas Deutschmann
2019-01-26 19:35 Thomas Deutschmann
2018-12-22 19:22 Thomas Deutschmann
2018-12-22 19:22 Thomas Deutschmann
2018-12-17 23:20 Thomas Deutschmann
2018-12-03  0:55 Thomas Deutschmann
2018-11-11 22:37 Thomas Deutschmann
2018-11-11 22:37 Thomas Deutschmann
2018-10-29 14:54 Thomas Deutschmann
2018-10-07 16:02 Thomas Deutschmann
2018-10-07 16:02 Thomas Deutschmann
2018-06-07  0:02 Thomas Deutschmann
2018-05-21 19:02 Thomas Deutschmann
2018-05-16 23:12 Thomas Deutschmann
2018-05-08  7:57 Thomas Deutschmann
2018-05-04 15:25 Thomas Deutschmann
2018-05-04 15:24 Thomas Deutschmann
2018-04-16 11:37 Thomas Deutschmann
2018-03-13 21:41 Thomas Deutschmann
2018-03-13 21:41 Thomas Deutschmann
2018-03-05 14:07 Thomas Deutschmann
2018-02-22  0:34 Thomas Deutschmann
2018-02-12 23:32 Thomas Deutschmann
2018-02-09 14:30 Thomas Deutschmann
2018-02-01 20:49 Thomas Deutschmann
2018-01-29  2:38 Thomas Deutschmann
2018-01-20 20:58 Thomas Deutschmann
2018-01-01 21:15 Thomas Deutschmann
2017-12-30 19:55 Thomas Deutschmann
2017-12-30 19:55 Thomas Deutschmann
2017-12-30 19:02 Thomas Deutschmann
2017-12-29 17:49 Thomas Deutschmann
2017-12-21 22:08 Thomas Deutschmann
2017-12-18 21:49 Thomas Deutschmann
2017-12-18 21:49 Thomas Deutschmann
2017-12-14 15:41 Thomas Deutschmann
2017-11-27  4:39 Thomas Deutschmann
2017-11-09 18:53 Thomas Deutschmann
2017-10-10 18:58 Thomas Deutschmann
2017-10-01 15:03 Thomas Deutschmann
2017-09-26 13:52 Thomas Deutschmann
2017-09-05 16:43 Thomas Deutschmann
2017-08-20 20:07 Thomas Deutschmann
2017-08-02 17:38 Thomas Deutschmann
2017-07-24 17:20 Thomas Deutschmann
2017-07-03 15:17 Thomas Deutschmann
2017-07-03 15:17 Thomas Deutschmann
2017-07-03 15:17 Thomas Deutschmann
2017-07-03 15:17 Thomas Deutschmann
2017-06-26  1:16 Thomas Deutschmann
2017-06-20  8:11 Thomas Deutschmann
2017-06-13 15:57 Thomas Deutschmann
2017-06-13 15:56 Thomas Deutschmann
2017-05-27 15:30 Thomas Deutschmann
2017-05-09 22:40 Thomas Deutschmann
2017-04-16 13:05 Thomas Deutschmann
2017-04-16  4:29 Thomas Deutschmann
2017-03-30  6:43 Thomas Deutschmann
2017-03-30  6:43 Thomas Deutschmann
2017-02-24 11:38 Thomas Deutschmann
2017-01-10 23:52 Thomas Deutschmann
2017-01-02 18:42 Thomas Deutschmann
2016-12-27 23:37 Thomas Deutschmann
2016-12-20 14:19 Thomas Deutschmann
2016-12-20 14:19 Thomas Deutschmann
2016-11-10  0:08 Thomas Deutschmann
2016-11-07 16:41 Thomas Deutschmann
2016-11-01 15:45 Thomas Deutschmann
2016-10-18 23:46 Thomas Deutschmann
2016-10-18 23:46 Thomas Deutschmann
2016-10-16 11:46 Thomas Deutschmann
2016-10-16  7:00 Jeroen Roovers
2016-10-12 22:05 Thomas Deutschmann
2016-10-04  7:37 Tobias Klausmann
2016-10-03 23:48 Thomas Deutschmann
2016-08-13  0:26 Thomas Deutschmann
2016-08-13  0:26 Thomas Deutschmann
2016-08-13  0:26 Thomas Deutschmann
2016-08-10 19:47 Thomas Deutschmann
2016-08-10 19:47 Thomas Deutschmann
2016-08-04  8:57 Jeroen Roovers
2016-08-03  8:03 Patrice Clement
2016-08-03  8:03 Patrice Clement
2016-08-03  8:03 Patrice Clement
2016-07-08 18:55 Patrice Clement
2016-06-16  7:01 Patrice Clement
2016-06-11 20:20 Patrice Clement
2016-06-11 20:20 Patrice Clement
2016-05-31 13:58 Tobias Klausmann
2016-05-23 11:33 Ian Delaney
2016-05-23 11:33 Ian Delaney
2016-05-13  8:41 Agostino Sarubbo
2016-05-09 16:44 Patrice Clement
2016-04-18  8:13 Patrice Clement
2016-04-01  6:44 Patrice Clement
2016-03-29 13:53 Ian Delaney
2016-03-21 21:50 Patrice Clement
2016-03-21 21:50 Patrice Clement
2016-03-15  9:01 Agostino Sarubbo
2016-03-15  2:24 Ian Delaney
2016-03-14 14:34 Agostino Sarubbo
2016-02-28 19:04 Patrice Clement
2016-02-28 19:04 Patrice Clement
2016-02-20  8:18 Jeroen Roovers
2016-02-04 11:01 Tobias Klausmann
2016-02-03  8:33 Amy Winston
2016-02-03  8:33 Amy Winston
2016-02-01  8:14 Agostino Sarubbo
2015-12-15  4:45 Ian Delaney
2015-12-15  4:45 Ian Delaney
2015-11-10  6:12 Ian Delaney
2015-10-27  3:09 Ian Delaney
2015-09-26  9:09 Ian Delaney
2015-09-18  5:46 Ian Delaney
2015-08-26 10:32 Agostino Sarubbo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1533599787.3b384e7068e79024defc28e037961035217b40f6.whissi@gentoo \
    --to=whissi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox