summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/shorewall/Manifest14
-rw-r--r--net-firewall/shorewall/shorewall-5.2.3.5.ebuild482
-rw-r--r--net-firewall/shorewall/shorewall-5.2.3.6.ebuild482
3 files changed, 0 insertions, 978 deletions
diff --git a/net-firewall/shorewall/Manifest b/net-firewall/shorewall/Manifest
index 988a7f65c92d..a8d5d51b46e2 100644
--- a/net-firewall/shorewall/Manifest
+++ b/net-firewall/shorewall/Manifest
@@ -1,21 +1,7 @@
-DIST shorewall-5.2.3.5.tar.bz2 554891 BLAKE2B 470b2a6d67e18f05262197877dc2bd853a756fcf3ac4e547c4e53a398fc1ddcb7bc2beccecc3146baafce72cae49cb20b41f482ceb036ccbe1c4b21bc2a3c2af SHA512 a93166d77ae29d32719a47912d64c9f0a7fdace61473a2d95c60cd611bab3a9b5faf0cebe6d80c47a34a5164538d61695e951e5d458a6f7ae172ff62dd9b81ea
-DIST shorewall-5.2.3.6.tar.bz2 543859 BLAKE2B 29a7e8068a5920e73bcb832241c2366a31fc54e6671d401ad35dd01a38f719622a5e3d09cb50084887ac52b96ff5f827e433ef06223eaf2d7f279b1299d726c4 SHA512 e6cd5bcf9f3fe57a5220e717985525ef4dac37b36e7e81b583948fc47c73d443e9649395db365829e0b29d213e5ca8e706578ad323983c6851c3cc5f3dccb03f
DIST shorewall-5.2.3.7.tar.bz2 579234 BLAKE2B 968d9f23f9d66d1326dfd9c0b989959a1a8449f6dd3230d9191cb3f3be805065fe4d1ab5e7bd679b5da7ebbf625654dc0a878a4ebc6346e51a9d2588102e52b5 SHA512 c0f90d5cbbc6a9cad443b3ecfedda79bee71f79685049c421d8bba3826e5c874c7c31f09f243d3728514684983a27c8d4ac6854b55766fbcf34f6937f8ab28bd
-DIST shorewall-core-5.2.3.5.tar.bz2 70007 BLAKE2B 0f7485775fe566e5bc9d67da314f27f1aba3b9faef82a8d51dc5bc00413dba32a24c53cae07531c59c528b0c2b7c87fda81252669c771c749abf5d83f9c02696 SHA512 f8346767d42ae6624b1831b637be3b4f625c4213a75759fc9330ffac7fc31aef0926e89af952f6353faf2a56334fe49fc65635c33a9c77c21b4ae79d93a0e9a6
-DIST shorewall-core-5.2.3.6.tar.bz2 70407 BLAKE2B 084e79d02702dfa3738f593ba029d97b230ccff5fd1741ca2566db7bfabb5ffe7afba5104ec7cca7d54da6e261c85090ecdbc2a0ab3c85b4fc9eb5a22add8ee8 SHA512 8bbd571e4279ea097634632903e3297bad6579152fe0d590db1f04cc1852cef86abdf5720b704bc166185118fa2d90c0463745a930ffe379f87a5d77c8a69141
DIST shorewall-core-5.2.3.7.tar.bz2 71454 BLAKE2B 3df2b99dfbde169a817f4a5f45876c07dbdcda432763c1227fd86d9f2e2556c639595db9c57f195a404535c72f33ae1211aee080e5df37c342f6ebd4be2a5994 SHA512 e708ee48bc087cef24959b22430c8d8814d5c2f9315988c410e6fa59b4dca9c8b48501fea9515115e760d902d9e9719f33c1310d91a83550030a8768efd18751
-DIST shorewall-docs-html-5.2.3.5.tar.bz2 4291459 BLAKE2B 150345621b93a100ff08b3e38df789a706ef73543022ab963b951d1c19088407c7b4698729935c2717d65199cffceb2652b222247f4610554d21c7d74ef14c07 SHA512 5b638a4eb15a8ab28787cf684003ba02c43f04b691b90f70637a3c981d774ccc52150fa1419e54b5294f59f92118a74b56cb6ca9b5598e7176f92f0cab76c3b8
-DIST shorewall-docs-html-5.2.3.6.tar.bz2 4306757 BLAKE2B b2ef0ec2956b6dccfa0e2c597d3a924ad068f7e627bf86cf508d7db5547def979910a9bfdbf49650b1907716ca45973be23d0470eb1e90825c3cef9ea8c63268 SHA512 fb89f54e6da64fcb59ac76441588d0473e229279aad8cbc394cacf9bdb93d74723c6c7334934dee373527adcfc582d9843ce12aa454ea3a4d3f42597c93a3661
DIST shorewall-docs-html-5.2.3.7.tar.bz2 4293387 BLAKE2B 6a0ffe8eac171c13961fcf448932b7287cdca3e1da895020d5551d135fe542ca8dba3e0cba7f505ec9a204649dd5fd9849613bbb30d2970a45f321b46aa74ba5 SHA512 19c5bb80f40c9df8262e6ee00908f64d3e2d489c734bdecf6faec5f8d23bf3b6201ed21673900a2906053bc7d59872b7974262caf9883207126a082bbb2cb281
-DIST shorewall-init-5.2.3.5.tar.bz2 35147 BLAKE2B 34fff5474fc60a7526991e5718f2f561ee7e67f339f5d95bef204bbbd4efafef5c1298d9533eae481a6adeb4fe516f45cd1060af33b66c900c054f7b7f9e519e SHA512 ad06ad0c0ddeef278e18babe7aa42935aa3af79052d10b54cd6729fe7b67ed9f210ea3f511b0da23cb2b1f67b82bdcba339f919f1ccbafbde51f77b9f0004606
-DIST shorewall-init-5.2.3.6.tar.bz2 35309 BLAKE2B 963b73e86592fcefa5881273149d8c0c2fcf423d6268ba4ccc60941f2eccebc9d8e5ee2d2e80209fe3109ae43ce43521117f50824c2796b51ea945c9a7d06e01 SHA512 4e3ef2d4a47f8e0b7751dbeab26cbf749a0304c5e64f42642b3e6cdf8df1bfa057666260dc76c628ec193cac880d8574f2aaf91b4a54f2fd4f4ac76ee102093b
DIST shorewall-init-5.2.3.7.tar.bz2 35860 BLAKE2B b6046004c246113105206f2a034e0d8930a8283c3431675a2cb5c29b1509619b5d79a03bdf8c1daea085a330344ffe519a0b9d7ec860fdcd3603efd739613d2e SHA512 f3f231923a5d352cb8288d051568d4dbf24ef38122a1d8ae0c158b317c09146d938389597a5f57e9099c7c1b283780357b74f8605ea1e14393a0e3b1fa6b1118
-DIST shorewall-lite-5.2.3.5.tar.bz2 39954 BLAKE2B 601e793adaa9d4ac77a1a4c17b7d1726af6a0b19c8dda2621ebbd36be63e3a33deb9ff36cb25d195d0875c5f159fa758a16cd7af2200e748d542f862bc474425 SHA512 3472bc4e96cd1624b5a6dde0bac893d87f57baa0381a230682889c15f841324e67034411e3ceb5229d48256a84e7f63ba04c478a86df9dd0e76ce820bb7c27dc
-DIST shorewall-lite-5.2.3.6.tar.bz2 40125 BLAKE2B 432fe34770b0da68c3fa9955ddebab6ce3fd75fec83d81d2e71ff4c7b74e8923886396acf8d5641cd5f1bd4bbf7a298283dad5db52ff1df04c6df452a947f791 SHA512 5d2802057cd5b3b8cbd15aadd8a4bdad13b2ae88d9839982ff95a98552bf672a2602bb3afa548068fc58f095f31267e07037f6ffc58a8213367a3edc904e5966
DIST shorewall-lite-5.2.3.7.tar.bz2 40674 BLAKE2B cf7ed3c81ab3a49556e61f48bdabf828dbb79a4c0a6c431f9ce77a4f15ec33ccbfc6bc5b1e6a942d695795679670bdb3ff22c37c54bcc4cd3552f6117bb4834b SHA512 c83f349f2626fe98a2f968a76fb48de2e7412f95ed0e72c48724cd93fe6e3b480d6cc185b5445434432bbf40ffaef7dbb875c4b5494f7875ce1f96f345314ea6
-DIST shorewall6-5.2.3.5.tar.bz2 191963 BLAKE2B b1aa5e5576749313a351eac29b2c247d58c4e38b9d948374f2c64a97a51bd6f7407afd52601ad0856c2899765ff4fe3ac0c96b4507e777a3112ec962a7dc71c9 SHA512 10081615887a5507b885ba6177016575829ca9cec81fe0fb8d5a6c12871d87ae1c63bb7319ea1e831d0c259084e243294125cad3650a0ffc66d0c09e457283d1
-DIST shorewall6-5.2.3.6.tar.bz2 191857 BLAKE2B 53784b26b8a8a94c525ec50e94d370ac022f4ab214d20580450bd2f083dcd05192442750aeeca17dba7b9e910c148feaa988bf3affcc07010bc0b87751fef47a SHA512 56b72e4821217a57b64a5295cd7fd9556899b946a8ad6d04e343e35109c67401ed5dc7bb3cf96f3b969f90d5d45cf0c0bbab1a3114658d0f6e21d69d4c0e0bb4
DIST shorewall6-5.2.3.7.tar.bz2 197912 BLAKE2B 20193edb20a6e165cc83391ff36e5601104dbc95f8300d1880253edc451fb086b0b619496cec84f3a6e1ea52c33ebea9de436babeb6517b41688e95eaaa10641 SHA512 45ac97f27569006715156579ca86e9dc580d30f64dabb1557ef25dbb171e76a67251a64e4ff77c8e88017dc2a9e364503c1f565f376312335ca2ac0d961a6043
-DIST shorewall6-lite-5.2.3.5.tar.bz2 39907 BLAKE2B d396c4365d0fedac5afd997c2283c9cfaa05077d786dc95f40f3bcebf778f2cf8a95b386aeed8e8c80f556b000399da8c7c2e3fae9f1cbf2e9ebe4935acd27f4 SHA512 533be2c2bcc6b406eda45916d49bf38d776445fa6a7b43946ab5f11623f45f922d9a49ed47abc141a843c0afbec5ed08f6050d431ff73aba922fd8b5197f6bf0
-DIST shorewall6-lite-5.2.3.6.tar.bz2 40089 BLAKE2B 03552fc8cbcfeeedd5099781a38050896ca36d178faf396a11766c055959d2241e9c9f30e5030001a059b45090914c2c6ee24700b9ee7c1cf96de66665c83e4a SHA512 3bab2d04111ed68e228b5a22db6bc2471eeb4b9fe80da1c826af179a5bb9f8a7377e95850d8e97bf167c6254553304509eee01828da13957f6472c4eb507c1ec
DIST shorewall6-lite-5.2.3.7.tar.bz2 40641 BLAKE2B d1c3720e7fefe6a20a29ab90e65fe9c0a113894c008377734e274177f6759245c056fb2a7e7abf42c7bddd35bd159f8c2ed2e4135edd1dda9d63ad1b596cec8c SHA512 0727a0e709bb206e4905ae8b5b4b39b2d2eb950b8aa03d8593de71a12464422681b5528a8e06a05e91e9bd1bae6a78962da1810ecbc8707e670073c28daccaaa
diff --git a/net-firewall/shorewall/shorewall-5.2.3.5.ebuild b/net-firewall/shorewall/shorewall-5.2.3.5.ebuild
deleted file mode 100644
index ab98fa113074..000000000000
--- a/net-firewall/shorewall/shorewall-5.2.3.5.ebuild
+++ /dev/null
@@ -1,482 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit linux-info prefix systemd
-
-DESCRIPTION='A high-level tool for configuring Netfilter'
-HOMEPAGE="https://shorewall.org/"
-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=$(ver_cut 1-2)
-MY_MAJORMINOR_RELEASE_NUMBER=$(ver_cut 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/'
-
- if [[ ${MY_PV} = *-Beta* ]] ; then
- MY_URL_SUFFIX="-Beta${MY_PV##*-Beta}"
- elif [[ ${MY_PV} = *-RC* ]] ; then
- MY_URL_SUFFIX="-RC${MY_PV##*-RC}"
- fi
-
- # Cleaning up temporary variables
- unset _tmp_last_index
- unset _tmp_suffix
-else
- KEYWORDS="~alpha amd64 hppa ppc ppc64 sparc x86"
-fi
-
-SRC_URI="
- https://shorewall.org/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-core-${MY_PV}.tar.bz2
- ipv4? ( https://shorewall.org/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-${MY_PV}.tar.bz2 )
- ipv6? ( https://shorewall.org/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall6-${MY_PV}.tar.bz2 )
- lite4? ( https://shorewall.org/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-lite-${MY_PV}.tar.bz2 )
- lite6? ( https://shorewall.org/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall6-lite-${MY_PV}.tar.bz2 )
- init? ( https://shorewall.org/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-init-${MY_PV}.tar.bz2 )
- doc? ( https://shorewall.org/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 https://shorewall.org/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="${ED}" ${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="${ED}" ${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="${ED}" ${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="${ED}" ${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="${ED}" ${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="${ED}" ${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 "${ED}/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 \"${ED}/etc/logrotate.d/shorewall-init\" ..."
- rm -rf "${ED}"/etc/logrotate.d/shorewall-init || die "Removing \"${ED}/etc/logrotate.d/shorewall-init\" failed"
- fi
-
- if [[ -d "${ED}/etc/NetworkManager" ]]; then
- # On Gentoo, we don't support NetworkManager
- # so we don't need this folder at all
- einfo "Removing unused \"${ED}/etc/NetworkManager\" ..."
- rm -rf "${ED}"/etc/NetworkManager || die "Removing \"${ED}/etc/NetworkManager\" failed"
- fi
-
- if [[ -f "${ED}/usr/share/shorewall-init/ifupdown" ]]; then
- # This script isn't supported on Gentoo
- rm -rf "${ED}"/usr/share/shorewall-init/ifupdown || die "Removing \"${ED}/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 " https://shorewall.org/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 " - https://shorewall.org/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 " https://shorewall.org/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
-}
diff --git a/net-firewall/shorewall/shorewall-5.2.3.6.ebuild b/net-firewall/shorewall/shorewall-5.2.3.6.ebuild
deleted file mode 100644
index 9f77b3406b11..000000000000
--- a/net-firewall/shorewall/shorewall-5.2.3.6.ebuild
+++ /dev/null
@@ -1,482 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit linux-info prefix systemd
-
-DESCRIPTION='A high-level tool for configuring Netfilter'
-HOMEPAGE="https://shorewall.org/"
-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=$(ver_cut 1-2)
-MY_MAJORMINOR_RELEASE_NUMBER=$(ver_cut 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/'
-
- if [[ ${MY_PV} = *-Beta* ]] ; then
- MY_URL_SUFFIX="-Beta${MY_PV##*-Beta}"
- elif [[ ${MY_PV} = *-RC* ]] ; then
- MY_URL_SUFFIX="-RC${MY_PV##*-RC}"
- fi
-
- # Cleaning up temporary variables
- unset _tmp_last_index
- unset _tmp_suffix
-else
- KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
-fi
-
-SRC_URI="
- https://shorewall.org/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-core-${MY_PV}.tar.bz2
- ipv4? ( https://shorewall.org/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-${MY_PV}.tar.bz2 )
- ipv6? ( https://shorewall.org/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall6-${MY_PV}.tar.bz2 )
- lite4? ( https://shorewall.org/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-lite-${MY_PV}.tar.bz2 )
- lite6? ( https://shorewall.org/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall6-lite-${MY_PV}.tar.bz2 )
- init? ( https://shorewall.org/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-init-${MY_PV}.tar.bz2 )
- doc? ( https://shorewall.org/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 https://shorewall.org/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="${ED}" ${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="${ED}" ${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="${ED}" ${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="${ED}" ${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="${ED}" ${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="${ED}" ${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 "${ED}/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 \"${ED}/etc/logrotate.d/shorewall-init\" ..."
- rm -rf "${ED}"/etc/logrotate.d/shorewall-init || die "Removing \"${ED}/etc/logrotate.d/shorewall-init\" failed"
- fi
-
- if [[ -d "${ED}/etc/NetworkManager" ]]; then
- # On Gentoo, we don't support NetworkManager
- # so we don't need this folder at all
- einfo "Removing unused \"${ED}/etc/NetworkManager\" ..."
- rm -rf "${ED}"/etc/NetworkManager || die "Removing \"${ED}/etc/NetworkManager\" failed"
- fi
-
- if [[ -f "${ED}/usr/share/shorewall-init/ifupdown" ]]; then
- # This script isn't supported on Gentoo
- rm -rf "${ED}"/usr/share/shorewall-init/ifupdown || die "Removing \"${ED}/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 " https://shorewall.org/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 " - https://shorewall.org/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 " https://shorewall.org/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
-}