summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2017-11-27 05:31:33 +0100
committerThomas Deutschmann <whissi@gentoo.org>2017-11-27 05:39:35 +0100
commitc57afd348df1987b9db26674059098b45e57a0c1 (patch)
tree333d03854f2c7009da46300e05627bf17308fea5 /net-firewall/shorewall
parentdev-util/android-studio: stable 3.0.0 (diff)
downloadgentoo-c57afd348df1987b9db26674059098b45e57a0c1.tar.gz
gentoo-c57afd348df1987b9db26674059098b45e57a0c1.tar.bz2
gentoo-c57afd348df1987b9db26674059098b45e57a0c1.zip
net-firewall/shorewall: Bump to v5.1.9
Package-Manager: Portage-2.3.16, Repoman-2.3.6
Diffstat (limited to 'net-firewall/shorewall')
-rw-r--r--net-firewall/shorewall/Manifest21
-rw-r--r--net-firewall/shorewall/shorewall-5.1.9.ebuild456
2 files changed, 470 insertions, 7 deletions
diff --git a/net-firewall/shorewall/Manifest b/net-firewall/shorewall/Manifest
index a6890552d1fd..699d17f63654 100644
--- a/net-firewall/shorewall/Manifest
+++ b/net-firewall/shorewall/Manifest
@@ -1,14 +1,21 @@
DIST shorewall-5.1.7.2.tar.bz2 524263 SHA256 e7c4cde2d04894ddf6e8dd8a8f96e96e04574181807cfe9f78915fa0dfc836e4 SHA512 05599609b50189e300cd71eda6876ac5e8878a2d2ab7c1635afc1b79f1ab3c9bc92c1ac1758aa8996d10bb37783d1fa29c76adaa879ec93bc12669c3dbdbed9b WHIRLPOOL a2fcc48c9c51161c4a2ec692fa29215824a412056fdc15203892e6a9752c2239722462be89f26c4e7374ceb0131ba35df87847a3f16329438c57ec8f8dec0208
-DIST shorewall-5.1.8.1.tar.bz2 524305 SHA256 0ba4f22394d988a5714637444c248e542d5897e41ab5770907edf38e422fe2ff SHA512 3dfacf35134c4831db057bb11d11b10d0e8cd0eb0edf28f64a02a3970ebb33e9a2e2d1cc943432a14c7fa34779e812e704d43c8e6f1070bca30fcc470c7a215c WHIRLPOOL 0e549aa6d28d79ec8b9f448c2c5ef0a10a0ad930249d6be31e86ea9bf33501ac7ee544a628e408406018efaa5b80cdccd6e29f68ede9b506428fbf143deab733
+DIST shorewall-5.1.8.1.tar.bz2 524305 BLAKE2B a59b32d734bdbc62389d542ac8c6beb054266ec98f6d05a67126f3d85d1ff6143a55737a4cd38cabd581dd6df6fc2569e8bb9327d435debfbea5f0b03ded51a1 SHA512 3dfacf35134c4831db057bb11d11b10d0e8cd0eb0edf28f64a02a3970ebb33e9a2e2d1cc943432a14c7fa34779e812e704d43c8e6f1070bca30fcc470c7a215c
+DIST shorewall-5.1.9.tar.bz2 529237 BLAKE2B abf9b54ef6083d322bd2e4fc00f98c2058759b2bf0e30f4aeebbc3cbb0e943543c7c304c8fb3b00ed7fd60391d1afa7d713cb88040a76eb8db549426ba3450e3 SHA512 a29155d8d92e21b7fc6d3fb3ec0be5ff4a648237317ff83aac523ce6d04c863c2ff48a14d368130431c41897e15068a54a2c0d3d0d9867017c11ba50a14e02b5
DIST shorewall-core-5.1.7.2.tar.bz2 80213 SHA256 c1f78229d9633ea6b35ec067c9724003e2929a39ae54ccd8e6875776d155cd70 SHA512 73c547d6985f17f5c2f2fe4a846a7db76fe514edbc03b7b2f191b437405ac6175cbe3dba615839bb46658031f7cd74ce26221cac42869818e5131b1836d43951 WHIRLPOOL e58a64514f50b375670908cea228610abab9bdb7a8300d04a3c728a70b662da144711e09124fa6149e61c941d165f93a65d162cedbc739eb670ddad4d86f76ff
-DIST shorewall-core-5.1.8.1.tar.bz2 81130 SHA256 0caca8dbd969e88f3f875789b3ac31985a19d39916efe15f69766a6ddd8d97ac SHA512 480003ff87da59ea64cabc3fc15e12bef44180fcc47b71f9a08c225484dc401080271ddf2834574ca46992973f9d3567ddd14d977b670c48a453eb435c356ab6 WHIRLPOOL 173dee8d7e3cc89d092c844a040f75924c860a2c8b9a97fda21cac20ee9160c98597c54c830061ecc866f51b3d22fd78513ce06f39e176662bbf26133ac2d421
+DIST shorewall-core-5.1.8.1.tar.bz2 81130 BLAKE2B 6cd8a434b9da66b264c5c4bd48009ff52c55693e9f749a150acea9b9790ac863ebab8fb75e8032edea0b6ccc75f259b65edf002912550c4d691da3e646685f80 SHA512 480003ff87da59ea64cabc3fc15e12bef44180fcc47b71f9a08c225484dc401080271ddf2834574ca46992973f9d3567ddd14d977b670c48a453eb435c356ab6
+DIST shorewall-core-5.1.9.tar.bz2 81533 BLAKE2B 5c47197c6dc6d43c63efef4806707948c0edfb39b237a214249522200a6b0429b0a2a0e8350af5cf448f28ca2b07a9258f91a88d8e9fb7112b2f265100fdc666 SHA512 633ac2f5bd25946f90d6351ea510976b01a61292616856f119602813510e1c24b55e8d86531a854fdbca03572d9eb2865a8e94a1566d36bf286c411e92182877
DIST shorewall-docs-html-5.1.7.2.tar.bz2 4218919 SHA256 348e9bf9c97e97aa3f8f425e30da9f6c89d2b7c5a035a21ac4c3e792ef33ac95 SHA512 b9c85d228b65ecf6b9e29ba316b8cf878a06832bc94f62e2ca8793c02c95bae7be934dd45dc572b31d8e4cff00e1092c8c8681d7c1fc4759c5700a1b8f868f55 WHIRLPOOL 01c51b28a9bcbed7e9a8d257ef01ecc113ba0ad095fce02d6fc17b3b341fd5d340281dfe1db0699ae1ff81e990f9413436d9fa0920846ae9f4b4298a483bede3
-DIST shorewall-docs-html-5.1.8.1.tar.bz2 4212495 SHA256 cf7aafa3b9c990205ceda790ecb006a6b17c5d0aea4d223a8da708f34fd91bd1 SHA512 665cc93d62bff6e18517ef959990fea6608de8246068a09f3548b855cafe08a9a6a7722a92bf8a2890889a0041ec5cb0647abe4f3afcaec857e309f2d33d6fd4 WHIRLPOOL 36e6099e5bd2790dc3952ba06c8f8e84737f505557a912fa0b58b2d603d66ba75aa2a14c4e8611d7186a44650d689cbfb5ec4012e0069732130e2d602f2e0e9f
+DIST shorewall-docs-html-5.1.8.1.tar.bz2 4212495 BLAKE2B be7e0da12b87f7f839c6c956d80e6bd5cfa4fe3cd6c9e9a651b1dcdc5530726daa31adf30f87a6f98f7ea980ab30cce32973211057f99a9dc81e5cf8d9b387e2 SHA512 665cc93d62bff6e18517ef959990fea6608de8246068a09f3548b855cafe08a9a6a7722a92bf8a2890889a0041ec5cb0647abe4f3afcaec857e309f2d33d6fd4
+DIST shorewall-docs-html-5.1.9.tar.bz2 4279854 BLAKE2B 49a5285b19fd14a739090ebda718b936fe4be5222d32a23600c8acceb598ed7539c471ba02464c8c5e7aeb8944277d740dd05c99a09486b8d4933c8676e0f724 SHA512 38bfb3aa680c3e8eb2916aed63800396cd1ae1bac3e084e0d9aecf89ba457f10b578e1122a36d486095028a39f17bfaa1bc85e92fdf324e7d53b10fb5f3b61fe
DIST shorewall-init-5.1.7.2.tar.bz2 35347 SHA256 f47900550045901a38a96fbcad6e401f86cc53ba0a94c44e1b3903b0e6358609 SHA512 9f295da51cbfe7c2fa3aab4029b18ff4bb9c4834d852e2a4cc3770fbed6eae79797000053ad7097ba831e01f710bf4c030d1f3b0cda93cb8da3dc3befa6ae0f4 WHIRLPOOL 1d47c4211959193334e921a82fe50b2cfb353ac6f3635bb96d1b8500a8dacaf2ddf2d62f96874dd3c2d9f4dd9d7e7f689fee4254b528bf1fe92a47fff5d8cca5
-DIST shorewall-init-5.1.8.1.tar.bz2 36268 SHA256 c2007f45efae58235c445e53cdab0ebef559adcdc6a84ac09125f1e57081c27d SHA512 67d9e7f7dda5615c826eae784c30ed36dfed0e7b0f7bd95088082f401998eb989ac9e39ab528300f075a1d6f4ad2eb3a7dcbfac5c785db79dc154821e2c5e86a WHIRLPOOL b82dab99fc44e27e6c1f420ea6512f4560f497f2df03d14e01d06c7661d8f6166539f2b6798ffa56ac85eec556411826c1ade182adeb9aea75ca60d56e7b6cfe
+DIST shorewall-init-5.1.8.1.tar.bz2 36268 BLAKE2B dabe010dde8df66a1ca25fda0cf7c0984d6358774ab5b3c8124c9ad36ca9c750e6f3377c49021383035e00e37f6dab0263620e207e8edafb8305ee4c52c0cba5 SHA512 67d9e7f7dda5615c826eae784c30ed36dfed0e7b0f7bd95088082f401998eb989ac9e39ab528300f075a1d6f4ad2eb3a7dcbfac5c785db79dc154821e2c5e86a
+DIST shorewall-init-5.1.9.tar.bz2 36834 BLAKE2B 6e8ebdda40e547e528df1faec4174f757b7922f7f06fae07dcc4a5c11005d2da5df387c900a9aa07715c9d99940b62f4fef28aed6b845b93f3172eca88e091fa SHA512 b7dd4394e4b48d225acff6f81d559b4020bca0f80447a179ad0a87536ce6a4c75af2f0bd9eca313bcede14c73d29c3a18a2c48cd230103b3ab656ed76747a95b
DIST shorewall-lite-5.1.7.2.tar.bz2 41048 SHA256 e5f4f97031ef81ef599391279e18c26762f3db6dffc5fee33f3e93f37d92618c SHA512 385b072f93015259b6bb57a07c62815ac27c858c63254cd968240761a230e8b781207ee9f1cc9e6caab43e8f12c60e42cfcbaa6f938c964184b14e5d360bee83 WHIRLPOOL fe88d3f7df02164fe17f141dc1dfce9f082688ee133f93e8af63b4046981cf879560bff4a148fc21739f84d76bf3eda58906bf280fda81fc8bbec5f21f277535
-DIST shorewall-lite-5.1.8.1.tar.bz2 41954 SHA256 2efc424c1d4f737618f91864ba8e618328605514965e497660ee0ac9020b6048 SHA512 2e6716a8a7dc38e9b6b9abb85d14216b0ed4f63c8e360ac98ff5b40d0a9708cd0dbdc870c41693c135c959d1000f6880eabf7b0c4002ccd52c0e98f1ad3e1ccb WHIRLPOOL 7cc3ca69dd3aee3cc10bf85847d9d999e3539d4a31a029fb37e5c3f14c017f60b6a054c0eb41a799c02484cdb2ea8db193f14597f5bf7b31dce8bf15c45e5989
+DIST shorewall-lite-5.1.8.1.tar.bz2 41954 BLAKE2B 78d5e32bff3fa860caf258570ce5a98ff7f6484a6d4076dc4537cc1ea9b28d35f7d6f7bfbe93046a89ae83d56529763cc0a4783a4280460d420ddc04ffb35706 SHA512 2e6716a8a7dc38e9b6b9abb85d14216b0ed4f63c8e360ac98ff5b40d0a9708cd0dbdc870c41693c135c959d1000f6880eabf7b0c4002ccd52c0e98f1ad3e1ccb
+DIST shorewall-lite-5.1.9.tar.bz2 42487 BLAKE2B 6a8c41f87c0f60f7ec453ea61490560da7640a37839d0c6be004cad48aad53143e3ee327690a18cbbfbb9292a4d998ece2500fc5274a036a82d2406eb27cba1d SHA512 61eb359155fd261bf7aaf5ce03a04aead297a17e80ba9ab45a3a8e23cd0deadef780c18b2d39ffe19bce9eb0a81ad64abb9643e466af4a9e78f3464f27f95092
DIST shorewall6-5.1.7.2.tar.bz2 192087 SHA256 8cddd2baafe71ebfd9aa691400bc320ab0672791f5d8f1e82067d91c3586deba SHA512 2ce5beb6be5ce9a5f9b1f116468f2834188938c5893ca2a9fdc7d76ab43ed487a7dd59cca5a8098ecee06274c1c359543ff57f2d3efa5e4ed8fc728702f6a689 WHIRLPOOL db5b3569689d3dd05e82316e9d7851f72e18b7df1a84b768bf6ceb546bf470843d31834a0e3d5a40e6c83597b65633efc9507eb75709a66f1c1d7223162792c2
-DIST shorewall6-5.1.8.1.tar.bz2 193412 SHA256 fde5b7a9eb0d4241ef3dfb8392b93f86a974c76cec8b05bd946bc12f509aca8e SHA512 9f4518444a8982eaaa9cd218742e4ab27b31e9b8799b4e483e30708bf13d68b444562f8cac6e98c170281d91c5bcb7730cb0f559146cd09e3b99a45dba68ef86 WHIRLPOOL 688e3f2a8538cc0a59d017a3e92c3a8d90a0372037bf8a0e7da2abb58d572fcb0b467f2149d330eb8eaa9d7fc8aefbe83411e55bd235ccd220601549392b097f
+DIST shorewall6-5.1.8.1.tar.bz2 193412 BLAKE2B fb32d234854afdc418d2d7aa95305042749b4aff9b0d6f445b2d88636db817720352ec7d295eb1c7bb2750d2363e7bd170872e2a3bdc553f82e27a8949cbb988 SHA512 9f4518444a8982eaaa9cd218742e4ab27b31e9b8799b4e483e30708bf13d68b444562f8cac6e98c170281d91c5bcb7730cb0f559146cd09e3b99a45dba68ef86
+DIST shorewall6-5.1.9.tar.bz2 194504 BLAKE2B d849470c9f737f16b47d4a0288767d7a5c6fcd48dacf4d2f51df434e43f34b9e71188a01e8b893ed64d84c1afc41a7d40e9f37ed2b6ad6b4b2b57e118ec28565 SHA512 e086dc8721865b2ddf891842838ed2ae6683154977ec1005d5c1327f76e7441b6056bd2bd53bb5ee9b95ff8dd50e5ae5b821ddbf8e5fe8f5543ff0028b7eda49
DIST shorewall6-lite-5.1.7.2.tar.bz2 40737 SHA256 bf22e67559ebdeff464cd910b97578a4c82f5fcc87bc77aeeb9fb4a5ca2a71be SHA512 9125d4380b91f0bcaaedfef6bd5ba89ada0391bf322cd1a00deb239eebc2e818a994844a653daa2e8784bb21ad7ed51798fcaa129e28da08c66de4163fe13bdc WHIRLPOOL 12c5e8036ae08d312ee52af40157f7ad8c18e0ccc8475845b22a3ce7647a73105b8a2f9034851f3e547ed6c47b2a7f0ef566de6dc96a19a20b1da429cd90a170
-DIST shorewall6-lite-5.1.8.1.tar.bz2 41671 SHA256 7f1b99465df8f6bc47e0bc40e413b9323a5a9d0b2576709fd28366f0af5b852e SHA512 b10f503d179094095f8d5f1844c59ae678a304685fc9ed684dc92ba20f50416afba1da8a77bee1a15de4f328d1f3ffb977926361f814982737b6380e3dc6a1ec WHIRLPOOL d0994b703132e9909f75bfbbac194d901ad97d9d9b3147d900ec642dc69cfa815133c228215082def21d43c2d7707fbb554d65e6b410b0766dc419129d6c323a
+DIST shorewall6-lite-5.1.8.1.tar.bz2 41671 BLAKE2B 47e4e192d441098f3fb5c2c569e35a78ce3464e7b29c2a1e8a75b70c3306a89c6415100d392c80ea6f1877648bb32bb0775a32466c33854d52da8369b0bc4bce SHA512 b10f503d179094095f8d5f1844c59ae678a304685fc9ed684dc92ba20f50416afba1da8a77bee1a15de4f328d1f3ffb977926361f814982737b6380e3dc6a1ec
+DIST shorewall6-lite-5.1.9.tar.bz2 42198 BLAKE2B 7854a1f4221241c3e91ba2fa4ea40ee4f78e320fd251fe9f491c32b4847aa1608bc56f53ccf0e573f77240693881fa18a006b6e2d0dfd88971a83c0b292ed2fe SHA512 a3fefc75ad6cfe461943e9d3390b08f214c493724060d710e104dd44345c3913a3a2c9d28ce26288042329581a9e4630aeb3ae4db49e915e8c073dde48cdf975
diff --git a/net-firewall/shorewall/shorewall-5.1.9.ebuild b/net-firewall/shorewall/shorewall-5.1.9.ebuild
new file mode 100644
index 000000000000..3b7545ca47d4
--- /dev/null
+++ b/net-firewall/shorewall/shorewall-5.1.9.ebuild
@@ -0,0 +1,456 @@
+# Copyright 1999-2017 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-r1 "${S}"/shorewallrc.gentoo || die "Copying shorewallrc failed"
+ eprefixify "${S}"/shorewallrc.gentoo
+
+ # 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-r2 "${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-r2 "${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-r2 "${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-r2 "${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} ..."
+ keepdir /var/lib/shorewall
+ DESTDIR="${D%/}" ${MY_PN_IPV4}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV4}/install.sh failed"
+
+ if use doc; then
+ dodoc -r "${S}"/${MY_PN_IPV4}/Samples
+ fi
+ fi
+
+ # shorewall6
+ if use ipv6; then
+ einfo "Installing ${MY_P_IPV6} ..."
+ keepdir /var/lib/shorewall6
+ DESTDIR="${D%/}" ${MY_PN_IPV6}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV6}/install.sh failed"
+
+ if use doc; then
+ dodoc -r "${S}"/${MY_PN_IPV6}/Samples6
+ fi
+ fi
+
+ # shorewall-lite
+ if use lite4; then
+ einfo "Installing ${MY_P_LITE4} ..."
+ keepdir /var/lib/shorewall-lite
+ DESTDIR="${D%/}" ${MY_PN_LITE4}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE4}/install.sh failed"
+ fi
+
+ # shorewall6-lite
+ if use lite6; then
+ einfo "Installing ${MY_P_LITE6} ..."
+ keepdir /var/lib/shorewall6-lite
+ DESTDIR="${D%/}" ${MY_PN_LITE6}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE6}/install.sh failed"
+ 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#idp51151872"
+
+ 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
+}