diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2019-02-28 04:06:05 +0100 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2019-02-28 04:06:20 +0100 |
commit | 96e562a5f55911b393e923fc42efb8dd78248cd0 (patch) | |
tree | c60841ab5ef9492976f847b5cda4b536ee3b8d10 /net-firewall | |
parent | app-admin/salt: Version bump to 2019.2.0 (diff) | |
download | gentoo-96e562a5f55911b393e923fc42efb8dd78248cd0.tar.gz gentoo-96e562a5f55911b393e923fc42efb8dd78248cd0.tar.bz2 gentoo-96e562a5f55911b393e923fc42efb8dd78248cd0.zip |
net-firewall/shorewall: bump to v5.2.3.1
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'net-firewall')
-rw-r--r-- | net-firewall/shorewall/Manifest | 7 | ||||
-rw-r--r-- | net-firewall/shorewall/shorewall-5.2.3.1.ebuild | 482 |
2 files changed, 489 insertions, 0 deletions
diff --git a/net-firewall/shorewall/Manifest b/net-firewall/shorewall/Manifest index c0e8ac708d35..c24b91842dff 100644 --- a/net-firewall/shorewall/Manifest +++ b/net-firewall/shorewall/Manifest @@ -1,21 +1,28 @@ 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-5.2.3.1.tar.bz2 555568 BLAKE2B a6d1a32d0b3a8858fed6c920b5988ddb27b090ce3a455298ed0f75eb29eb274befebc9509245878a5b9d32574dc8d64d01420eba0e091d9bffde0138296eb7f8 SHA512 bc8bc7f35c9e259ca7a38f6cf38bac60dd04d4c73f7366d33213a9279809f58ef816f8767c81105b8b391b753f9acae7e6313172dacae38f9ad7a5dc02bb890c DIST shorewall-5.2.3.tar.bz2 555553 BLAKE2B 8d59d128f4fd5a109fba2280cc0f6a9c74e756feb2e9b8fffa481ee0e1dddef84da44e0c3e578b1513b34b200226ef17c8f73e1a5d917e71d2c83990bf499275 SHA512 51e945ef8207734729e5e81a6d14a4c109042cfe91ef4a893d1e2efca5fa1cca38b22524eaa0c84d95f59ae6f85a6f5e2942443827e74afb8bac62a3bd785ee1 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-core-5.2.3.1.tar.bz2 68870 BLAKE2B 50fe40b119c7778687cef5ac2728c55dff2c70f16174f03d229507ae9db1e505976dbf85df002a234f01a8c07843e889e963c3776dd647c32d202f161cb0f0d2 SHA512 3b44c5cc4dd6e0ffa2f2ed6ce4783fc2f934966eff405671931c2c150794de0e6645f7e4fdb35e93bcaee74e2df53ce41641ea7d9093f20399761ceb90191faf DIST shorewall-core-5.2.3.tar.bz2 68720 BLAKE2B 20ee90025c53befd9328a8f6280bcad59f14b9064973634fe0167c2228444d277ccb4c7bb73979856f7ec3b1dec145753b7bdcc01de6f77742f88d410a6ef946 SHA512 52cf9c7ac55fc9fa152f8fe236ff60c3e802e72661d0429f4c1e39eb685dc81878c4d08adf9d2eca022abc952d745f247240bcc182039a05411db180c21404ae 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-docs-html-5.2.3.1.tar.bz2 4302429 BLAKE2B dbd36a313ae3a637450ebcb1b5147c2a43f688e21d312ad7ccd79101ad1b046975fb6cf20ea46afb3f1383f427ac1bbcb1ce3fa4715338ed46827da17429e6be SHA512 31f840d9522331266149ac24898618ea172ae89c1b35b5abf4db6d5a15dc9199b6385999a7dff9445c0a319d18e2d47c1b718b6daa07155f28c0f0aa18dba767 DIST shorewall-docs-html-5.2.3.tar.bz2 4302850 BLAKE2B 4ba7d4a181bb62737e31750e2e1e790ca4176e7c987d699c3447d19d238d9b79f61cb8b135b94214ce69e7e5e71d324df99a393009abe2555eb909e82eb0755d SHA512 177b88d735c23796bae805f261c9e7843ecaad4539123d4f16b1e00723ab5c476b2d143f80bcf4c773f3ee33f0a5b2db4131857e65855b5e4f2dd5ed579bbe72 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-init-5.2.3.1.tar.bz2 34221 BLAKE2B 79607fa498eef4adb657009031dd2fc81c53f891d170fc9cb1f6d8432772319194770894d7cb5b95bcd3e41eabd3d6885edde13317b04c92c05c9106a925747a SHA512 fdbe504659c4c0436e3992288aa8868df60bcbccf2ba89e014d4927b82046354f47a54794020199b741de15f38fa4c04a012e595288828715e87fb2ce2bd4d60 DIST shorewall-init-5.2.3.tar.bz2 34153 BLAKE2B 1a4eddf778f372ce152c542b40da31f867ae43d94dfb664a750ef2a68a8842be353d2b105ca2ba8959864ac5669afc3624de3b44fbe1f145be48ac2a9e1d4685 SHA512 bacd1a24e6ab23d4ee84fcf6ad8edd30716b20e0115540536c70061d7749e9e302749e7fe9f50e07bc100be8122ada3d0f047301e88f58bd5b2573d73917f0b4 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 shorewall-lite-5.2.3.1.tar.bz2 38993 BLAKE2B d8c230c9abef51ce4b1a02584c903b5c39080aa9d0398f104c36481eb28d29079fa0b6cb9c20f2d78e2bf8dc09535a643ee318c734ff1358f574f6b12ffc8bf2 SHA512 7ba0cb4ddc863448237c60dec3300dc04b8e509b7df5f650cbc5517badf59af35a5bc651a58bb5e2fed47fb16d633772a385c54bb929c7ac12222191deaab7ba DIST shorewall-lite-5.2.3.tar.bz2 38963 BLAKE2B a13153f85a41c45b37e31bde851e3b587ecb31c752f8c8ca4b2956341ecff8cd534326ed0f0fc069f67f84b74e5e933493c0901695bc24872509ebb24bf89149 SHA512 8b49668fd983baae91e18a712fe79cc8c90f949969bf49e00506b8e822ae8e5495914bba6df795a71ebc47958649fbc521401dde66af79790e7f59352a27e627 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-5.2.3.1.tar.bz2 190299 BLAKE2B 71745734cda4359da9213478bed680dca595775dca82e937f3a57cce9af0a3f0910989570461d5507bb88e5ebbad5176ed515ab1f8dcef072c78c42a96ff0d11 SHA512 4d2f688e1ecdde239f271c660820faec4db1d7c936c4579e9c5b087125fdfd14e14b72dc590ca59de050155ce91815a49b7b30125ebe97e7be8323aa0f662136 DIST shorewall6-5.2.3.tar.bz2 190796 BLAKE2B 134dc046cd6b5a88df598f37c503835382f85082783af844e3f70174641d7ddfb94b9be5f5e9c76add6bafdfb1472b6958e880d9b3da67d662a78421363eb8c6 SHA512 52613602800d3118ba9d1bb46088f932772fe0a002e640e406fa4f22079ac5700bc2f39ae59dd771cfd3557a9c8a68822ba684c07d8b9bfe01c0a8ab83ad1b38 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 +DIST shorewall6-lite-5.2.3.1.tar.bz2 38966 BLAKE2B c7c6158b1d1dd1aa58bdba35b2606286d01de885e7e35c825d41bcadb651357c62188dd4d7af81979ac8dc18b2f24a6d37c6d2486159796fcccdb9b656178f60 SHA512 cbe82e7a25ea0e0d7cd6a0ceaefe80413a2d07be92433c9932a4b0e1aaa6ff93e6150fd221b43fd056c088390d42b9bb9d8540e8d70dde315f7a53057e6f2f1c DIST shorewall6-lite-5.2.3.tar.bz2 38897 BLAKE2B 93003ad535d87dd0c69fc8dde49c63c63445974aec2949739fedf5a0df9b77a4ee43b4a41e0ff33e1e83a1917aeb978366d95f62ed1ec80d5168627317a26b03 SHA512 1cc21eb1c822e00dbf304d323a9c1cea42e7974e15f24596eb03327bb2499147f6ee9b2e5f5446847943c7e0e925af9a7155e75f0777f5c022e65b54b7cb2cf4 diff --git a/net-firewall/shorewall/shorewall-5.2.3.1.ebuild b/net-firewall/shorewall/shorewall-5.2.3.1.ebuild new file mode 100644 index 000000000000..b12b3712acbb --- /dev/null +++ b/net-firewall/shorewall/shorewall-5.2.3.1.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 +} |