diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2017-05-27 17:30:34 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2017-05-27 17:30:51 +0200 |
commit | 96cfef114c55637320e3c34a5f34b2b7f7d90f25 (patch) | |
tree | fb22d38dbdbec4c3b3d8fffc445309f648f6adf3 /net-firewall/shorewall | |
parent | app-vim/voom: Port to python-single-r1 (diff) | |
download | gentoo-96cfef114c55637320e3c34a5f34b2b7f7d90f25.tar.gz gentoo-96cfef114c55637320e3c34a5f34b2b7f7d90f25.tar.bz2 gentoo-96cfef114c55637320e3c34a5f34b2b7f7d90f25.zip |
net-firewall/shorewall: Bump to v5.1.4.1
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'net-firewall/shorewall')
-rw-r--r-- | net-firewall/shorewall/Manifest | 7 | ||||
-rw-r--r-- | net-firewall/shorewall/shorewall-5.1.4.1.ebuild | 456 |
2 files changed, 463 insertions, 0 deletions
diff --git a/net-firewall/shorewall/Manifest b/net-firewall/shorewall/Manifest index 46444ec74aca..3f73710063b5 100644 --- a/net-firewall/shorewall/Manifest +++ b/net-firewall/shorewall/Manifest @@ -1,21 +1,28 @@ DIST shorewall-5.0.15.3.tar.bz2 525470 SHA256 c71c42e9697057b39ae27593725d2fcc5829cc8eab78ef2109a1f16ed89534db SHA512 a0990a23870740e96d86dc5f02aa55d0f762e030a0a08ba9ce8801065712a1908889d9d82052cdeefcd14d851462217fd0096101a4535de96d5ff141a8ec7faa WHIRLPOOL f95ce4cbf856a8d4d635cf926408e782c44317ea4866c476b5ba8372f62fac1b16651a4b3ce8266e2bd8ff211254e2c6fa32dfef5e381c540e12651c7c695a2b DIST shorewall-5.0.15.6.tar.bz2 525827 SHA256 17ae4613eac68a62d4cd520af8c63b54b36ae79aac4e22fc57c74929a968ef46 SHA512 d1665a30a9b1273e3cfdb7e8001a679beb3d09e75e8fd21caadcd528d3912cceca5525c6ef7c8191865e8e62d1abaa894480a403cc2e8ef6545301ca36f83b32 WHIRLPOOL 1e2e613de27e6caf449b8f3127526dc68971d08693b7235a7f504abc8cf2afcdda244f910b726e37e2554080830f13eb197424995a0a5155b73d5c538042ce5d +DIST shorewall-5.1.4.1.tar.bz2 510816 SHA256 c561dd91c4b88ef087a6d172bafb4ac5d01c0055c47b855568536a0c422ff232 SHA512 4650e2ec73dcf6c38cf2992fefdbd2e302a34a9687a933d8a375d227df2621db96c9a2e54ebbfac50014152caffc0736a7bc1192f479c69c56f78f7874bc09b3 WHIRLPOOL 065cbd0f4e07a09e5326968680919de7fb988db092a406b0e809335374e8c5e68c0c8e4abeb4b8bd7dbb727869bcb7e0dc65bc38c33d783ff355943966183287 DIST shorewall-5.1.4.tar.bz2 509894 SHA256 e25cfac5ea16309d5b24f1d4b9612ca2f3ba724f6d09acd8a99de697d0972f29 SHA512 67da4db601981071d030c3e2000899ea599b6b69465c9b778fc7d6afed0a4dec4c52f3d5cbfcd54ca4fdce64af19ba24508a6144fa19445a53939348bf6b96ac WHIRLPOOL 2223b8018264b36fb5b5e60dc19cf01105fa8fcc049087471518b01830a2a6c86206bdaaac03bb31fc47bf7c659c0857baa3a7ff37c22e902557bcfcbb8bf60f DIST shorewall-core-5.0.15.3.tar.bz2 65108 SHA256 0d174d9aabd3608e000a4536470b35d15a856d7394f5e8bd22ef410d8501b989 SHA512 4a5cca151bc5e8e538e7cb0f4d36461e32232bc7d94e72f82ddefc8c4d5622f14d8c625892295275b41b5ca99dc5217e3fafbf9c1d25d872117f78eed621575c WHIRLPOOL 71f0011684a1bfadaa5439eaa4e0852189262381a1a39b6c17e6f3ee0d4e397faf6ec5516b0288ac9a80896d56f275ae1c85b385adf69d98b4a780a60491e7bf DIST shorewall-core-5.0.15.6.tar.bz2 65272 SHA256 6b1c461494922f207397ce2d9ed12b0a105d82ee3528a02a4448bc6c028623b8 SHA512 5e33ef55c4ca43a5c49747d5b3f40c9f43b0696e7084a6db56df73810551d216bd313860eb5354f50b1f9849c4d332f665e3f4832ff1cf3a9542bb6a43a73119 WHIRLPOOL 1b66e763e0d37b78b0343c8ad4964d46459347114bbebfeb965af075d73bbf71a8c695310f051f4160e5dd1cc7033e32545a5404538acce7d0452aa1618af4cd +DIST shorewall-core-5.1.4.1.tar.bz2 75813 SHA256 3d1446f7e437104c8f8c7257ccdbddfc0dc7df3ea68b80274c11dd94cc1c8629 SHA512 118378698e0fa1216b52ace92fe9eae0f7d32c39becbc50837a895d7367674b2c973b1633c8919045d9d16dd2a5fdbedb9d62ff1513547ee4770a2e9116d8b1e WHIRLPOOL 02ef5428faeb68f2ca3cf6c1e00ab15d0146d5ad931942528ba1832ce96e490df67976a40ed576014f30f06e2e4869ba691c1606d57b22364ab2e6b7ed32a019 DIST shorewall-core-5.1.4.tar.bz2 75254 SHA256 3a4c287fed059e476fbfa0ccaf10d99cbb2c512a502b0bdb391dbf76ad6cad8a SHA512 f11c53465d8b9cd68f757377bb547e056e88220220fde915a871dbd18ffbde0044efe91b6acbeaf353f9a7f9b12a2b2a48b5bb372a4cbe59307f6b927214a1db WHIRLPOOL 01b0fb3b2f19ff7057f903106e049c751aebcdc208759e01c389e28c28de2dac9827126303343aab254fcb10d7d5d22c43bd4949aeec9d054477751e6fe0e901 DIST shorewall-docs-html-5.0.15.3.tar.bz2 4290905 SHA256 5e519eb6956fb51058e7c977f7130ab4c91b519097c624c83de980808e555849 SHA512 bca31dcb50246aa081512ee61c6e46545361777c9b033912023624872d7fb8fb4fc0b0b821fd0422698fab9000b4f087b8f4ef6799ee2d55b5f3cfbf81276a87 WHIRLPOOL 84c6c3777cfd228ef98880c84832fd5e23ae46fb38397783ad3dacd93eb57e5e0dc662014d3c9e98a1cd4647e3b84a84ecd3564be098a3ca20820215ae4b13db DIST shorewall-docs-html-5.0.15.6.tar.bz2 4290931 SHA256 e6b253591fd9df7d00bf0bbcfd9c563f4248013119e13b22b34d947b244ce4e4 SHA512 e1304ea2b0e05645654b04ea825d255de70e02edc5f183dcf9eba88641aaeda8cd9781bf46a84b98628a7ed148bf1450e37e7871ef2a577e54ffd3707d7d85c3 WHIRLPOOL f1c038886f1428480c1f6b6be688717cee11717a8ae2b31ea35aef915245d2e46f7934e5bc0e54aaca7a9c83b0328cb3e96c949ed96730bada25896d85fbbf4a +DIST shorewall-docs-html-5.1.4.1.tar.bz2 4284060 SHA256 0d077e38503832e75f5432d4a1b1c478f0ef02576c8aeb00480a3a101ec9a105 SHA512 ccc36bae8daacf3dca75002bee207abba667bd9a467afbde7f6cb1c18fa5d33fa53a4f93dfabfe0e85fd479449ebff2d12851cba5b494b7f3ce256cd79328687 WHIRLPOOL fa3c5a2abd61d005003f090492801a7a2c88512d28ed3ba174d4ecc998236132e7d923f780de30edcad44fe5fcc684bba13441f5fb9a1974d915607b4fd62eda DIST shorewall-docs-html-5.1.4.tar.bz2 4284146 SHA256 c17bf2f6f7448a89a97afa00425a503d1cc202a042af096bbacec6b66ced22e0 SHA512 5be7f4f5725e5a4ff2c8314ff869a9d902184f1050b26dda1be0febdd4d7dc997a45a5f286d9857539241e1bc9bfc1910fa89005672619c61c1628d565cb6478 WHIRLPOOL 0b64bce92e26ef2a22a2b48b54fd5ac3c4be15946ba936ebf0875f38c3401b19f24b572a14d811a5fd0b3b175f8d8400c85fd434db8bf3e53bf785ae56514a29 DIST shorewall-init-5.0.15.3.tar.bz2 42608 SHA256 00fc0f1bd04010626debf8b076b5b4e9a7451eff9d813ee6bf9cd507679a6443 SHA512 fae316724fe64cc93e20f08e221959156f59abc0b9349f830f6f4f8ba6be9f0a4ffedf68db5ee18b1a765c4ab51a3c9cb8153b70f1319b2b3bde38086208c628 WHIRLPOOL 35a5b06fe158ff4d173dec2246cdd329bcd573021b7e49db70065f9ea4ac3e5ca0321ed7ada9347eb0753fb68dfbd37ed6d65c599b005b25f024ffafe6a5882e DIST shorewall-init-5.0.15.6.tar.bz2 42934 SHA256 c7afa1aff586186c4ce0cbe0f4e0fc06a84e936349f3dc69c84ef97c815fc6c1 SHA512 11c639b20992005e74ccd4aaa855a519fe6f96b030f171e91d68ec4ba1ca5ff5f73c6a1c823c5ffc88e3ad8e3cc2809dd24a91e0c892ab1f71d6c957113367e9 WHIRLPOOL c1190c31f5c2556fa7e73385856c8bbeb3b0cadb5ebed834e9b2138eee90059a864d85301095d3accdf537b6b4347cffe213d26c6a2201e040887647c65f4291 +DIST shorewall-init-5.1.4.1.tar.bz2 30878 SHA256 c61b83601d3a4bb10e2bd8705682ddbed5ab3adcdc6074bc1ca4cb8d030e84e9 SHA512 4b9fa872a1ce0535d9c9054ad8e9750f7f797c4fd14777c77554c5218162882973fe1caf22c7242b6b38b4a5c2a122e901851757e86a560ea5f8030be063b70a WHIRLPOOL 76a360c00dc9c28576cb121360372b1218c7a9c399e89ae3366458e5aa2f5f20c7845fc4a49de5a55619e7589372c5b07eeea195604e4a4eac380739659611f1 DIST shorewall-init-5.1.4.tar.bz2 30353 SHA256 f8d75ff55bf2264a8961f16dbd8cd69054f7e1f3e4eb5e52a9f1aab2096fdaca SHA512 de9c712bd35adf6156bf51fb1a7482b7d8019feba6e1c596eb16bc15cd8ebd834b674895c285f9e9b0b359fa807e338678a29977b4009a8584ab5e11073f5c3e WHIRLPOOL 4cab6192321768b377d531d6424ed5aef7ec2c1ad54313a8799711d7733a0d5becd1c7d02be17c1e9c59b06189e43493a16d5dac7e05edc25c7e0f1c63f0395d DIST shorewall-lite-5.0.15.3.tar.bz2 59024 SHA256 5e32b0346edea2ceef4930b80e1a5797048c4e419c96a870499ea0d6336e9eef SHA512 c71957f243e5e93810f04bfb4154a6bc0ae96ea7040753d15a4856d3b7d153871e29394b07ff1fba92a7f832a3880a6e58ac55303ae7c81e5df8ace7fadd8129 WHIRLPOOL b864fb2f776540d26e578ba038368ae9d014979fff9008ce9241d1acd893ac41df46696a2513866c280cd86d363257e8b9b1f2f47237c13f54d489a034adc5a6 DIST shorewall-lite-5.0.15.6.tar.bz2 59347 SHA256 393a2aea8fe8c9d43babaad969e00c80508900123d78a0433d3a3ac6470fd6a8 SHA512 e49f74bfa39d65fffca00657487bc4d8600d6330af0413d3b146ff9192769def1e3f66e181c02bf541d50b73e327ff4035f86fd4ded5a133fc02b84c958a4bbc WHIRLPOOL 85e25de97e5594ae41e2277f6a48500d14add389710c0727483a270b8d071dec2ef66c8d2633b96a34109b432c4025832cdb7c05c9eb4de4d8ac9aba755651e8 +DIST shorewall-lite-5.1.4.1.tar.bz2 36647 SHA256 e90d419ed8a6da615c3a0d6fdcb9481f8e71f89c2bdcff09ab027198ca2ce293 SHA512 c06e365d06c484e7ef673e5a8597d70996f1008a00163aae2d7a53d0d720739a8b0317a093b3e75487ef1c8a02ac4c4c542480757226a974671f82ab08353896 WHIRLPOOL 0077886083aadcc5973c6f515da8e99fdbbcc4e64e0e4cc4893a47cda7afc17331d2ff175da314aa38dc0186ea074bee65facacc5dc7212c0c8836cbfc0c9a02 DIST shorewall-lite-5.1.4.tar.bz2 36155 SHA256 293ec572444ec5ff1119dd2cab0bc1fcc3e5ff5483ddea5d08cff566035bb363 SHA512 5093fe0d85049b7495bfefbc2525c935db21e10731389451f787c7fd0e9c7fa0258a6de1100633db1056562d912e68639e22285260a642fa40806360ab89f352 WHIRLPOOL f63315b05535ba7185b3ff2d4955c22c8e3e97a83e24cf04936c0436d369b389e96ee1483261e1a520ae13611c7e38b070f93861a5a06ef84b522105f18a3712 DIST shorewall6-5.0.15.3.tar.bz2 241045 SHA256 79b91e33b24ac620a682e91c48ca18590dbac33e36c0fea37bdb2b1f3db47d7e SHA512 141fe6e23883d71f3d1fb8cb3d305a5eb439170430d71c9a066feb2acd734d4db54f386c91345c91c14f017ca5b4da7b08ad521e580545632411ae4c43d99e5b WHIRLPOOL 03c2f0731f988d094c96dd74271437c8bddc494b780980edab914c77944ded0343d6df0b94b871e33508d293f9ccfde89e4023a56b0ca2866433aa1c87ac2595 DIST shorewall6-5.0.15.6.tar.bz2 240682 SHA256 1434b973e76ed75080aa1853986406a2346e57f0f21b094a2e1793a8b6bd7ee4 SHA512 26ea371bf40548ceda7bff786b790dd74e9a1a74a3745dcc683e7101ea5303eef87006116704d15aa688b0c40c0777c7732a7727fe714c71c8566b85ae4c560a WHIRLPOOL 92097d48bcd77ff814ab2ce9a0edb9514f2ec2e27725fd01492982ae9e4731e4366b6a5a10d903122ec7e0c43a4107d370b8f2ee11dc213a9ae78a19df6dd172 +DIST shorewall6-5.1.4.1.tar.bz2 224863 SHA256 e3da805b4aa1e8c483f1bb451cb47a869e1977b213a86145a82d42e9bc12ea36 SHA512 3b5c228693936103eb1479e5b0968c5a7d24d94beea410b3ad79f9e7e3b32cca286384b91ee3b09ce006758d27f9b2efe22c589d07d05eeef9ef981818da0b80 WHIRLPOOL 810739511bfb730c6040c8cd9a8a06c836e085a70ea5b4e148d3d364d92648e194ce2b4f1e4a0535a0860a138d87744ddacb229312100242e36828f7e348514f DIST shorewall6-5.1.4.tar.bz2 224287 SHA256 bac38ea334dcc5ce7e505ee3a484ca2b739e119c030e815839455c41114b3ebb SHA512 1e7c3fbe91d5ca3f06a0e31bbe7659c29e3c4e2c6d87ec0eb449e09c321b7eb16458cfc73e054dd6f04deb9dc4e45da8279d611bd8424f36624e4027a7cc3c19 WHIRLPOOL 0eba307ed1a453f28f7dbd3ffaa6d25ed68f7cf2f836ed6bb6d8945b0af6bccc88310baa58864fd87475a63f589cad4882f832acfb6436dd73ba511b9edd3287 DIST shorewall6-lite-5.0.15.3.tar.bz2 58442 SHA256 822e6fbf3f2f7bef8db2424f6c40ad03b492ce7305d95b123ad2b1d1329e396a SHA512 f8bf47f2d39857df9579b8bacc32ef87159b5502cd4fed1761fca21d14a902122c30d87ce2a8af9a309c32d826238c5f966416cccc6bb1fe93271f45902d867d WHIRLPOOL 40d37102e415c3b13560159cd994a9baeeefa96f641e5bf6133212a084ff5bc2a54abcbe34901f35b5d0faef671b908fa19a873f0a98d8e074f6731bfae46ec1 DIST shorewall6-lite-5.0.15.6.tar.bz2 58776 SHA256 1d693d3815bd0c2e4a9e7acad7be38ff2b354681da847a5ec4b8d87ca860378f SHA512 83cab85eda851e071eb004688b10a70811bd6f896c831e97713c48b322ee419ed9fc8ac7570b4faf567be317ca1d6f5c89c1e0da0e025a94abe39aa0f000e9ad WHIRLPOOL 842e02fe907854682b54343750df60b0e4c60613eca675d69c071c4d726a05d5d940c8283e9b718413520b3ccc11a01913dabba49189c41a61aa756645a401ae +DIST shorewall6-lite-5.1.4.1.tar.bz2 36362 SHA256 29a2f2be295b4f995b38e663b771660ccdc6321134bcfbd0f9378f9bb1237e3c SHA512 b616c5886b5bc274e88052359ca4c8aa6df60a9706958698eac7fc362f1c893de00ed2272535d61a88cb6a786bae9b7cba64a835833a9f81c991fb2ffed8244b WHIRLPOOL 519aee8ad997c14f4337824d40c38cbf7ba2d2ac7db0964c2557816e0d4c4dca24ed2ac69341473e899d0e9e84d367a9e6f42b2484221257bdd55b40c73ee201 DIST shorewall6-lite-5.1.4.tar.bz2 35837 SHA256 732fe79096e164c641f3e3744e840ac4ac7ed5e6777a0beeb402d237f48a3b24 SHA512 987f925bd4559064878dfef11026d4a8938c9656be5c3587346ed8e6157bfb7890dd9a6a3fcbdd8eeb4a859c657aa3235279fa6e0de15740c8a4d22323038ce5 WHIRLPOOL fb0cab6f0b89c23a7f9db08cd50ee18b2f0cbeca305470ec5275b8298f7db62aa6dbccaaf52b3e07379049b7c1dbe856b6d8e0cd2780a2c055e3208b65e6d44d diff --git a/net-firewall/shorewall/shorewall-5.1.4.1.ebuild b/net-firewall/shorewall/shorewall-5.1.4.1.ebuild new file mode 100644 index 000000000000..ea2ef11ce095 --- /dev/null +++ b/net-firewall/shorewall/shorewall-5.1.4.1.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.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 +} |