1 |
commit: 795949f18bb4a4d470a7165e46acee532b184942 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 25 21:01:32 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 25 21:43:09 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=795949f1 |
7 |
|
8 |
net-firewall/shorewall: drop old |
9 |
|
10 |
Package-Manager: Portage-2.3.101, Repoman-2.3.22 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
net-firewall/shorewall/Manifest | 14 - |
14 |
net-firewall/shorewall/shorewall-5.2.4.4.ebuild | 482 ------------------------ |
15 |
net-firewall/shorewall/shorewall-5.2.4.5.ebuild | 482 ------------------------ |
16 |
3 files changed, 978 deletions(-) |
17 |
|
18 |
diff --git a/net-firewall/shorewall/Manifest b/net-firewall/shorewall/Manifest |
19 |
index 5f4e2ffb0af..a3f1403db32 100644 |
20 |
--- a/net-firewall/shorewall/Manifest |
21 |
+++ b/net-firewall/shorewall/Manifest |
22 |
@@ -1,21 +1,7 @@ |
23 |
-DIST shorewall-5.2.4.4.tar.bz2 581085 BLAKE2B 6830f1ce9350534a51b0d79efad07b338c511ab3cc1bf151ac958052c5feb1794d994a71e80ebf1546a76fae1718ebc74abab37fbb4d9362d8b3108133b30354 SHA512 c050af24969c2f18c4c020dfb611edaf9c6a5aa09d1dace502ae99b9aa82d7f217695e8099d6615a9a3c9f6de951f6d8b24621021c48ee2f2095edf9815a8d57 |
24 |
-DIST shorewall-5.2.4.5.tar.bz2 581558 BLAKE2B 9b089a9c5cab212ba130e3865c2ea5a8ad27c88979e6497a0fef823a12a6ac98ca12a150c3e9a5b6c76c90339aeb3c92a438dfc068811790aef13783e39e6204 SHA512 3914bac627cf8787372f21c4332fc13744a6190c7a128521103e3f47533ebbe2fe359a4c6bc95a0d7dfb03e2ce30f7b7cd8eaed9d8fa3169d4b0b5244aa6d8f8 |
25 |
DIST shorewall-5.2.5.tar.bz2 582270 BLAKE2B 6b0e883dd424ec814fb5f2dac601bd4e896c97c73ed0f2a151a054bd4b3db732aeaeb158d5bc453ca7cf3723233e429aa24f0b9908787f384e69da656fd71832 SHA512 6527fae5067bbfedd4d1fe53fb1b110fbac3f6d7f3b1abfe76be373ebb345bc238dabf3f24a8883314bf29ffc847dcd190bddc82ca64183311ba0e5544078743 |
26 |
-DIST shorewall-core-5.2.4.4.tar.bz2 73257 BLAKE2B 16b8d3a1d08c9db6a939f946324295063cee71b373bd67dd85d0acb4332502df4b5d9bb932695228ad6d33395c6596e86fd3e77ca59abc99d88bab7e883777c9 SHA512 1868dcd6bad6b0cb5be2c1b0724f076605e7990d0b9dfd19fee06c758b19f2ebcbe18bccaa7a4ea861ceb26038ed07837eecdacdd2a02d0c2a927c732d6bdc30 |
27 |
-DIST shorewall-core-5.2.4.5.tar.bz2 73333 BLAKE2B e4d71ddd92e83c31d90b766568d4d595d1035278832c9f92c103e7b95436adecf9e79612f0bf82e7eb3447d067c2d4e626bed14f1c9d74e5f11fa5d585830ba6 SHA512 74d413cbe95688d7604a01580eff32c92b1be754df2052fa4ed22dd549c18887b1462fc70c1a2913c2d77255fccb7badce33863686abffecadb6b316aa545827 |
28 |
DIST shorewall-core-5.2.5.tar.bz2 74420 BLAKE2B ff2a6c2ead74f125785bcb2aea42948f27b88cb39d121a3ab1af1e4df6dc4ec878854499be7c385766af6245f4590c62b4dd2eb3d648b02fa4f16d3e13a302ce SHA512 9bd7e74def89cdc07987cbcbf9b8d8a69500f7b0dfc346c9fbcec6ab8cecad3c2adfcc505136ef0c2f0525345fdb6de4918dd5bd2d382bfb4773b23ce868a937 |
29 |
-DIST shorewall-docs-html-5.2.4.4.tar.bz2 4294159 BLAKE2B 81bb4a9d086f48bf8551be3bc8aff0ed8a0a99d215338f12b711c96115507ea5a7eb567d084db0a93628c4036623a72231f33dd15671e84739d59608268b98c7 SHA512 086096604f5a580906f05b460e1e19df24620b610675a8ec6038c0061199fd6f09cd8aff08f1e8daa8d2898bfaec9db95cf7f4f1397ca9df784d420907b16fac |
30 |
-DIST shorewall-docs-html-5.2.4.5.tar.bz2 4294320 BLAKE2B dd80e0ae8bc622aaa2e1278a20d2b0e2aaccd25debf22301b71dfce125f94be3e9c30dd411f3f7a84592ca126917447d1b61624079b6bf3686156578c54495cd SHA512 6453c0dbdd80c41b5ca706eae2cd05946a6442f939b398985bf2b6687b60c1f636cf387d1581694223b6d887f914764f9193070dfce745e6e32dd0edd582fe76 |
31 |
DIST shorewall-docs-html-5.2.5.tar.bz2 4310021 BLAKE2B 2d5704f126f6626bf2c934390552c19190fac5fd4231aaf61a2b0eadd770cad7b220d1083df2b0ab26ce8b2c1d97f5a3b0f2b083d14d3c5ce800bb6402603216 SHA512 04ae753f25371c0ce08af2cac5abd19797ec70860714e6891900a45baab0fb24d0f7c3163a5d2f5e419f1c1a8b092c164b7230b8d0c8cc4c3f53bbd0269e419b |
32 |
-DIST shorewall-init-5.2.4.4.tar.bz2 38048 BLAKE2B 01b4664396933ca303d4013d50f290be850dad51142257a7b1f3081cee3baac219feadc96636c732072c6918f83d847eca2107aa094804691500972a90f222fd SHA512 fdab4aa68429144cbffdf41aad78744feb3e9736df0e8d6ed87ed7ac80aebf7078c6ec28646069a71cacc8d9a6738605d59c6b6fb35d8c4d9a1ed8353a71775c |
33 |
-DIST shorewall-init-5.2.4.5.tar.bz2 38113 BLAKE2B 4231e22c7dfd862fd6ee8b573ea3f137ea078e488d354ddf197a83c4d60827a462311f5f9cd7d1dd0df17b61713fa164e6c6594eb4b8c173bef59fee75f4c1bc SHA512 51ac7a4022caca14c25efe0e608bb3983f27c31326b1a933385891fbe01aa5137f3d8e50406fddec41024fe8aea6e55ad16c3a4cb2d1b211fd0d13d61ce61cb1 |
34 |
DIST shorewall-init-5.2.5.tar.bz2 39405 BLAKE2B 8259b4618c3b75201e245fd414da7890a80d31535eea71358f9ed3bc9b44ad0e341c3b795f624ac8cb05e2345fac82a8831ad877abe6a9ef13a8c7889bfdcb7e SHA512 61f31287472770fe02a099bddd7a6a5fa42fb676462cb7b16975fb15c6a70fe1fbb40d4c1b714f9e8a1a4bdc0ef3d7542552b1dd780833be781dda1e8dba9879 |
35 |
-DIST shorewall-lite-5.2.4.4.tar.bz2 42806 BLAKE2B d6dd5d9268d40fb88ee99be36b359423a6d7785417752f6e9d7245806bf9677963851327dcfd0d5fe81ea54ab11d59a5e64ee4115d41d3a6c8f4ced1e7cda732 SHA512 b81aa04f124435d3bf63d1796cca4db987f56c3e31953386ab7f3aae290058e5f3240b43864753121ed48b3744f8d6ee2dcd5210105dc1ccf5a4f790b3e22092 |
36 |
-DIST shorewall-lite-5.2.4.5.tar.bz2 42868 BLAKE2B 5ccab6fd410deb721671d16967fdf57be051c8403d7b2dc7273dea76f42584d01c593adee25d72730091d3f8cc7d85b985e58b5e243f5f5a11522935eae88087 SHA512 329535471f9a44f7cd3935e490d238768fe37bba397dbfd83b1f0960e16a1fdb6407ae6fd36f7054ec998f1ea8c2f91bb4cc1fa6d970675939856b2436cf7c45 |
37 |
DIST shorewall-lite-5.2.5.tar.bz2 44120 BLAKE2B 47154b9f7203f5bff279c2e936dd0fe108bcb44bc9dd43abb49dc0c129a54ea381fff71b1dc3ac55e026b4065d8d5ab48edb1dcf52845e5e5f88492a958f4451 SHA512 41e6de25b2b10452bd15c465df5ffaf21019059f511197a6d398af086bba55f80b21b6644747fb2c228414a1e8af381ef5c4174b8e4defc72389664e971a85d3 |
38 |
-DIST shorewall6-5.2.4.4.tar.bz2 199722 BLAKE2B c5c741ea7108e6edbb35190bccea06d04c6a0d1cf5dbae23481e38d3c05155df6bcaf4deb6397d07a1f51ba0b13b18b4ed22349fbe1f6e605d0303486002d876 SHA512 cf212d1c7c8703319a5c6f34ba8629f115b2f03a0713c1b40cf370adad66b671bfd9536a28bc650aba04bf6a6fd7c396788d40c2eb650a006e8f2eb27baf76f8 |
39 |
-DIST shorewall6-5.2.4.5.tar.bz2 200261 BLAKE2B b21f8232a3497be70184c9053e17265d803a9561f5799921ee63ab67bd4b1b8fa8c1950de13a5f6d8f1662013641859844b5a2032e684151a3b85b0de8d8dfb9 SHA512 362802b8b9dc52da00a291f0fb0bb115387a409974e418bb3e00d8c9c900cd49f0b6d90a4c75db5028b5a2d1ad499d352d322e4f7132a9e8647b3502a263531b |
40 |
DIST shorewall6-5.2.5.tar.bz2 201419 BLAKE2B efb1a81ee1bcee982d7cfd1bb5ee9cbae5e59e3ce47895d25332f71c1d79d2bb2421c6fca0645fe9d2d493648caab2b9c233d36fb9210e3fd6f667b89ff66671 SHA512 2b3656490209872c696966129bf4a411d050f561fd82645f494c503013a755854833cdbedfd6bdb971abb974988d11b1c4e29e62d431a4d67bba74822f579692 |
41 |
-DIST shorewall6-lite-5.2.4.4.tar.bz2 42739 BLAKE2B 3f1caa78b12f779bd73716dad78a26544bf99204b96da2fa950c709bbb5d68ac1ee062714d5040d961a2df35b4d22e0b6c8747b36a84bb9a5b6805cb6d0158cd SHA512 4a0c6e939bd8ca239734de64ea0b2a94885f8f14d00e37dce291b2f5aa00384227c16cc0595ef1b038f05d3d42212ace3e9482937c8c072d7e194099ab867646 |
42 |
-DIST shorewall6-lite-5.2.4.5.tar.bz2 42843 BLAKE2B a02923bcd75bedbcb3d48f43c11de7956829528c7076f6cdd7353550e4703de3c19d01e16abbc6d2db74a748edaffec613060a7fb6179a1c89a75e0058d766ff SHA512 c93ebb94c9baa627cb9fd18af098ca484c5e6cf2d0405624a00d6cf9093e900e06b6da7f2f9acedf3fcd1c68d6221a50ae2826718313cc0482b74c34d6f2498a |
43 |
DIST shorewall6-lite-5.2.5.tar.bz2 44064 BLAKE2B e4667d1f1c932980d7bea03059b0aae8f83f0f3557f4245cec21aafaae72a942d47a8a355d3581cc459f85a80c10cb16af1c6e08971be2d120644098543bb3af SHA512 0c61c489f79aa51178aa733e1e738a2921c598e9403884322ccbc90461be4ee18dd0225d758371f1c750cfc832ca63652bbd8cac831e2ea026d63b72202c6f2a |
44 |
|
45 |
diff --git a/net-firewall/shorewall/shorewall-5.2.4.4.ebuild b/net-firewall/shorewall/shorewall-5.2.4.4.ebuild |
46 |
deleted file mode 100644 |
47 |
index c6f9c3e5bed..00000000000 |
48 |
--- a/net-firewall/shorewall/shorewall-5.2.4.4.ebuild |
49 |
+++ /dev/null |
50 |
@@ -1,482 +0,0 @@ |
51 |
-# Copyright 1999-2020 Gentoo Authors |
52 |
-# Distributed under the terms of the GNU General Public License v2 |
53 |
- |
54 |
-EAPI="7" |
55 |
- |
56 |
-inherit linux-info prefix systemd |
57 |
- |
58 |
-DESCRIPTION='A high-level tool for configuring Netfilter' |
59 |
-HOMEPAGE="https://shorewall.org/" |
60 |
-LICENSE="GPL-2" |
61 |
-SLOT="0" |
62 |
-IUSE="doc +init +ipv4 ipv6 lite4 lite6 selinux" |
63 |
- |
64 |
-MY_PV=${PV/_rc/-RC} |
65 |
-MY_PV=${MY_PV/_beta/-Beta} |
66 |
-MY_P=${PN}-${MY_PV} |
67 |
- |
68 |
-MY_MAJOR_RELEASE_NUMBER=$(ver_cut 1-2) |
69 |
-MY_MAJORMINOR_RELEASE_NUMBER=$(ver_cut 1-3) |
70 |
- |
71 |
-# shorewall |
72 |
-MY_PN_IPV4=Shorewall |
73 |
-MY_P_IPV4=${MY_PN_IPV4/#S/s}-${MY_PV} |
74 |
- |
75 |
-# shorewall6 |
76 |
-MY_PN_IPV6=Shorewall6 |
77 |
-MY_P_IPV6=${MY_PN_IPV6/#S/s}-${MY_PV} |
78 |
- |
79 |
-# shorewall-lite |
80 |
-MY_PN_LITE4=Shorewall-lite |
81 |
-MY_P_LITE4=${MY_PN_LITE4/#S/s}-${MY_PV} |
82 |
- |
83 |
-# shorewall6-lite |
84 |
-MY_PN_LITE6=Shorewall6-lite |
85 |
-MY_P_LITE6=${MY_PN_LITE6/#S/s}-${MY_PV} |
86 |
- |
87 |
-# shorewall-init |
88 |
-MY_PN_INIT=Shorewall-init |
89 |
-MY_P_INIT=${MY_PN_INIT/#S/s}-${MY_PV} |
90 |
- |
91 |
-# shorewall-core |
92 |
-MY_PN_CORE=Shorewall-core |
93 |
-MY_P_CORE=${MY_PN_CORE/#S/s}-${MY_PV} |
94 |
- |
95 |
-# shorewall-docs-html |
96 |
-MY_PN_DOCS=Shorewall-docs-html |
97 |
-MY_P_DOCS=${MY_PN_DOCS/#S/s}-${MY_PV} |
98 |
- |
99 |
-# Upstream URL schema: |
100 |
-# Beta: $MIRROR/pub/shorewall/development/4.6/shorewall-4.6.4-Beta2/shorewall-4.6.4-Beta2.tar.bz2 |
101 |
-# RC: $MIRROR/pub/shorewall/development/4.6/shorewall-4.6.4-RC1/shorewall-4.6.4-RC1.tar.bz2 |
102 |
-# Release: $MIRROR/pub/shorewall/4.6/shorewall-4.6.3/shorewall-4.6.3.3.tar.bz2 |
103 |
- |
104 |
-MY_URL_PREFIX= |
105 |
-MY_URL_SUFFIX= |
106 |
-if [[ ${MY_PV} = *-Beta* ]] || [[ ${MY_PV} = *-RC* ]]; then |
107 |
- MY_URL_PREFIX='development/' |
108 |
- |
109 |
- if [[ ${MY_PV} = *-Beta* ]] ; then |
110 |
- MY_URL_SUFFIX="-Beta${MY_PV##*-Beta}" |
111 |
- elif [[ ${MY_PV} = *-RC* ]] ; then |
112 |
- MY_URL_SUFFIX="-RC${MY_PV##*-RC}" |
113 |
- fi |
114 |
- |
115 |
- # Cleaning up temporary variables |
116 |
- unset _tmp_last_index |
117 |
- unset _tmp_suffix |
118 |
-else |
119 |
- KEYWORDS="~alpha amd64 hppa ppc ppc64 sparc x86" |
120 |
-fi |
121 |
- |
122 |
-SRC_URI=" |
123 |
- 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 |
124 |
- 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 ) |
125 |
- 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 ) |
126 |
- 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 ) |
127 |
- 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 ) |
128 |
- 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 ) |
129 |
- 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 ) |
130 |
-" |
131 |
- |
132 |
-# - Shorewall6 requires Shorewall |
133 |
-# - Installing Shorewall-init or just the documentation doesn't make any sense, |
134 |
-# that's why we force the user to select at least one "real" Shorewall product |
135 |
-# |
136 |
-# See https://shorewall.org/download.htm#Which |
137 |
-REQUIRED_USE=" |
138 |
- ipv6? ( ipv4 ) |
139 |
- || ( ipv4 lite4 lite6 ) |
140 |
-" |
141 |
- |
142 |
-# No build dependencies! Just plain shell scripts... |
143 |
-DEPEND="" |
144 |
- |
145 |
-RDEPEND=" |
146 |
- >=net-firewall/iptables-1.4.20 |
147 |
- >=sys-apps/iproute2-3.8.0[-minimal] |
148 |
- >=sys-devel/bc-1.06.95 |
149 |
- ipv4? ( |
150 |
- >=dev-lang/perl-5.16 |
151 |
- virtual/perl-Digest-SHA |
152 |
- ) |
153 |
- ipv6? ( |
154 |
- >=dev-perl/Socket6-0.230.0 |
155 |
- >=net-firewall/iptables-1.4.20[ipv6] |
156 |
- >=sys-apps/iproute2-3.8.0[ipv6] |
157 |
- ) |
158 |
- lite6? ( |
159 |
- >=net-firewall/iptables-1.4.20[ipv6] |
160 |
- >=sys-apps/iproute2-3.8.0[ipv6] |
161 |
- ) |
162 |
- init? ( >=sys-apps/coreutils-8.20 ) |
163 |
- selinux? ( >=sec-policy/selinux-shorewall-2.20161023-r3 ) |
164 |
- !net-firewall/shorewall-core |
165 |
- !net-firewall/shorewall6 |
166 |
- !net-firewall/shorewall-lite |
167 |
- !net-firewall/shorewall6-lite |
168 |
- !net-firewall/shorewall-init |
169 |
- !<sys-apps/systemd-214 |
170 |
-" |
171 |
- |
172 |
-S=${WORKDIR} |
173 |
- |
174 |
-pkg_pretend() { |
175 |
- local CONFIG_CHECK="~NF_CONNTRACK" |
176 |
- |
177 |
- local WARNING_CONNTRACK="Without NF_CONNTRACK support, you will be unable" |
178 |
- local WARNING_CONNTRACK+=" to run any shorewall-based firewall on the local system." |
179 |
- |
180 |
- # kernel >=4.19 has unified NF_CONNTRACK module, bug 671176 |
181 |
- if kernel_is -lt 4 19; then |
182 |
- if use ipv4 || use lite4; then |
183 |
- CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV4" |
184 |
- |
185 |
- local WARNING_CONNTRACK_IPV4="Without NF_CONNTRACK_IPV4 support, you will" |
186 |
- local WARNING_CONNTRACK_IPV4+=" be unable to run any shorewall-based IPv4 firewall on the local system." |
187 |
- fi |
188 |
- |
189 |
- if use ipv6 || use lite6; then |
190 |
- CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV6" |
191 |
- |
192 |
- local WARNING_CONNTRACK_IPV6="Without NF_CONNTRACK_IPV6 support, you will" |
193 |
- local WARNING_CONNTRACK_IPV6+=" be unable to run any shorewall-based IPv6 firewall on the local system." |
194 |
- fi |
195 |
- fi |
196 |
- |
197 |
- check_extra_config |
198 |
-} |
199 |
- |
200 |
-pkg_setup() { |
201 |
- if [[ -n "${DIGEST}" ]]; then |
202 |
- einfo "Unsetting environment variable \"DIGEST\" to prevent conflicts with package's \"install.sh\" script ..." |
203 |
- unset DIGEST |
204 |
- fi |
205 |
-} |
206 |
- |
207 |
-src_prepare() { |
208 |
- # We are moving each unpacked source from MY_P_* to MY_PN_*. |
209 |
- # This allows us to use patches from upstream and keeps epatch_user working |
210 |
- |
211 |
- einfo "Preparing shorewallrc ..." |
212 |
- cp "${FILESDIR}"/shorewallrc-r3 "${S}"/shorewallrc.gentoo || die "Copying shorewallrc failed" |
213 |
- eprefixify "${S}"/shorewallrc.gentoo |
214 |
- sed -i \ |
215 |
- -e "s|SERVICEDIR=tbs|SERVICEDIR=$(systemd_get_systemunitdir)|" \ |
216 |
- "${S}"/shorewallrc.gentoo || die "Failed to update shorewallrc" |
217 |
- |
218 |
- # shorewall-core |
219 |
- mv "${S}"/${MY_P_CORE} "${S}"/${MY_PN_CORE} || die "Failed to move '${S}/${MY_P_CORE}' to '${S}/${MY_PN_CORE}'" |
220 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_CORE} ..." |
221 |
- ln -s ../shorewallrc.gentoo ${MY_PN_CORE}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
222 |
- eend 0 |
223 |
- |
224 |
- pushd "${S}"/${MY_PN_CORE} &>/dev/null || die |
225 |
- eapply "${FILESDIR}"/shorewall-core-5.2.1-no-gzipped-manpages.patch |
226 |
- popd &>/dev/null || die |
227 |
- |
228 |
- # shorewall |
229 |
- if use ipv4; then |
230 |
- mv "${S}"/${MY_P_IPV4} "${S}"/${MY_PN_IPV4} || die "Failed to move '${S}/${MY_P_IPV4}' to '${S}/${MY_PN_IPV4}'" |
231 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_IPV4}" |
232 |
- ln -s ../shorewallrc.gentoo ${MY_PN_IPV4}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
233 |
- cp "${FILESDIR}"/shorewall.confd-r1 "${S}"/${MY_PN_IPV4}/default.gentoo || die "Copying shorewall.confd-r1 failed" |
234 |
- cp "${FILESDIR}"/shorewall.initd-r3 "${S}"/${MY_PN_IPV4}/init.gentoo.sh || die "Copying shorewall.initd-r2 failed" |
235 |
- cp "${FILESDIR}"/shorewall.systemd "${S}"/${MY_PN_IPV4}/gentoo.service || die "Copying shorewall.systemd failed" |
236 |
- eend 0 |
237 |
- |
238 |
- pushd "${S}"/${MY_PN_IPV4} &>/dev/null || die |
239 |
- eapply "${FILESDIR}"/shorewall-5.2.1-no-gzipped-manpages.patch |
240 |
- popd &>/dev/null || die |
241 |
- fi |
242 |
- |
243 |
- # shorewall6 |
244 |
- if use ipv6; then |
245 |
- mv "${S}"/${MY_P_IPV6} "${S}"/${MY_PN_IPV6} || die "Failed to move '${S}/${MY_P_IPV6}' to '${S}/${MY_PN_IPV6}'" |
246 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_IPV6}" |
247 |
- ln -s ../shorewallrc.gentoo ${MY_PN_IPV6}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
248 |
- cp "${FILESDIR}"/shorewall.confd-r1 "${S}"/${MY_PN_IPV6}/default.gentoo || die "Copying shorewall.confd-r1 failed" |
249 |
- cp "${FILESDIR}"/shorewall.initd-r3 "${S}"/${MY_PN_IPV6}/init.gentoo.sh || die "Copying shorewall.initd-r2 failed" |
250 |
- cp "${FILESDIR}"/shorewall6.systemd "${S}"/${MY_PN_IPV6}/gentoo.service || die "Copying shorewall6.systemd failed" |
251 |
- eend 0 |
252 |
- |
253 |
- pushd "${S}"/${MY_PN_IPV6} &>/dev/null || die |
254 |
- eapply "${FILESDIR}"/shorewall-5.2.1-no-gzipped-manpages.patch |
255 |
- popd &>/dev/null || die |
256 |
- fi |
257 |
- |
258 |
- # shorewall-lite |
259 |
- if use lite4; then |
260 |
- mv "${S}"/${MY_P_LITE4} "${S}"/${MY_PN_LITE4} || die "Failed to move '${S}/${MY_P_LITE4}' to '${S}/${MY_PN_LITE4}'" |
261 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_LITE4}" |
262 |
- ln -s ../shorewallrc.gentoo ${MY_PN_LITE4}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
263 |
- cp "${FILESDIR}"/shorewall-lite.confd-r1 "${S}"/${MY_PN_LITE4}/default.gentoo || die "Copying shorewall-lite.confd-r1 failed" |
264 |
- cp "${FILESDIR}"/shorewall-lite.initd-r3 "${S}"/${MY_PN_LITE4}/init.gentoo.sh || die "Copying shorewall-lite.initd-r2 failed" |
265 |
- cp "${FILESDIR}"/shorewall-lite.systemd "${S}"/${MY_PN_LITE4}/gentoo.service || die "Copying shorewall-lite.systemd failed" |
266 |
- eend 0 |
267 |
- |
268 |
- pushd "${S}"/${MY_PN_LITE4} &>/dev/null || die |
269 |
- eapply "${FILESDIR}"/shorewall-lite-5.2.1-no-gzipped-manpages.patch |
270 |
- popd &>/dev/null || die |
271 |
- fi |
272 |
- |
273 |
- # shorewall6-lite |
274 |
- if use lite6; then |
275 |
- mv "${S}"/${MY_P_LITE6} "${S}"/${MY_PN_LITE6} || die "Failed to move '${S}/${MY_P_LITE6}' to '${S}/${MY_PN_LITE6}'" |
276 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_LITE6}" |
277 |
- ln -s ../shorewallrc.gentoo ${MY_PN_LITE6}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
278 |
- cp "${FILESDIR}"/shorewall-lite.confd-r1 "${S}"/${MY_PN_LITE6}/default.gentoo || die "Copying shorewall-lite.confd-r1 failed" |
279 |
- cp "${FILESDIR}"/shorewall-lite.initd-r3 "${S}"/${MY_PN_LITE6}/init.gentoo.sh || die "Copying shorewall-lite.initd-r2 failed" |
280 |
- cp "${FILESDIR}"/shorewall6-lite.systemd "${S}"/${MY_PN_LITE6}/gentoo.service || die "Copying shorewall6-lite.systemd failed" |
281 |
- eend 0 |
282 |
- |
283 |
- pushd "${S}"/${MY_PN_LITE6} &>/dev/null || die |
284 |
- eapply "${FILESDIR}"/shorewall-lite-5.2.1-no-gzipped-manpages.patch |
285 |
- popd &>/dev/null || die |
286 |
- fi |
287 |
- |
288 |
- # shorewall-init |
289 |
- if use init; then |
290 |
- mv "${S}"/${MY_P_INIT} "${S}"/${MY_PN_INIT} || die "Failed to move '${S}/${MY_P_INIT}' to '${S}/${MY_PN_INIT}'" |
291 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_INIT}" |
292 |
- ln -s ../shorewallrc.gentoo ${MY_PN_INIT}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
293 |
- cp "${FILESDIR}"/shorewall-init.confd "${S}"/${MY_PN_INIT}/default.gentoo || die "Copying shorewall-init.confd failed" |
294 |
- cp "${FILESDIR}"/shorewall-init.initd "${S}"/${MY_PN_INIT}/init.gentoo.sh || die "Copying shorewall-init.initd failed" |
295 |
- cp "${FILESDIR}"/shorewall-init.systemd "${S}"/${MY_PN_INIT}/gentoo.service || die "Copying shorewall-init.systemd failed" |
296 |
- cp "${FILESDIR}"/shorewall-init.readme "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt || die "Copying shorewall-init.systemd failed" |
297 |
- eend 0 |
298 |
- |
299 |
- eprefixify "${S}"/${MY_PN_INIT}/init.gentoo.sh |
300 |
- |
301 |
- pushd "${S}"/${MY_PN_INIT} &>/dev/null || die |
302 |
- eapply -p2 "${FILESDIR}"/shorewall-init-01_remove-ipset-functionality-r2.patch |
303 |
- popd &>/dev/null || die |
304 |
- fi |
305 |
- |
306 |
- # shorewall-docs-html |
307 |
- if use doc; then |
308 |
- mv "${S}"/${MY_P_DOCS} "${S}"/${MY_PN_DOCS} || die "Failed to move '${S}/${MY_P_DOCS}' to '${S}/${MY_PN_DOCS}'" |
309 |
- fi |
310 |
- |
311 |
- eapply_user |
312 |
-} |
313 |
- |
314 |
-src_configure() { |
315 |
- :; |
316 |
-} |
317 |
- |
318 |
-src_compile() { |
319 |
- :; |
320 |
-} |
321 |
- |
322 |
-src_install() { |
323 |
- # shorewall-core |
324 |
- einfo "Installing ${MY_P_CORE} ..." |
325 |
- DESTDIR="${ED}" ${MY_PN_CORE}/install.sh shorewallrc.gentoo || die "${MY_PN_CORE}/install.sh failed" |
326 |
- dodoc "${S}"/${MY_PN_CORE}/changelog.txt "${S}"/${MY_PN_CORE}/releasenotes.txt |
327 |
- |
328 |
- # shorewall |
329 |
- if use ipv4; then |
330 |
- einfo "Installing ${MY_P_IPV4} ..." |
331 |
- DESTDIR="${ED}" ${MY_PN_IPV4}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV4}/install.sh failed" |
332 |
- keepdir /var/lib/shorewall |
333 |
- |
334 |
- if use doc; then |
335 |
- dodoc -r "${S}"/${MY_PN_IPV4}/Samples |
336 |
- fi |
337 |
- fi |
338 |
- |
339 |
- # shorewall6 |
340 |
- if use ipv6; then |
341 |
- einfo "Installing ${MY_P_IPV6} ..." |
342 |
- DESTDIR="${ED}" ${MY_PN_IPV6}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV6}/install.sh failed" |
343 |
- keepdir /var/lib/shorewall6 |
344 |
- |
345 |
- if use doc; then |
346 |
- dodoc -r "${S}"/${MY_PN_IPV6}/Samples6 |
347 |
- fi |
348 |
- fi |
349 |
- |
350 |
- # shorewall-lite |
351 |
- if use lite4; then |
352 |
- einfo "Installing ${MY_P_LITE4} ..." |
353 |
- DESTDIR="${ED}" ${MY_PN_LITE4}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE4}/install.sh failed" |
354 |
- keepdir /var/lib/shorewall-lite |
355 |
- fi |
356 |
- |
357 |
- # shorewall6-lite |
358 |
- if use lite6; then |
359 |
- einfo "Installing ${MY_P_LITE6} ..." |
360 |
- DESTDIR="${ED}" ${MY_PN_LITE6}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE6}/install.sh failed" |
361 |
- keepdir /var/lib/shorewall6-lite |
362 |
- fi |
363 |
- |
364 |
- # shorewall-init |
365 |
- if use init; then |
366 |
- einfo "Installing ${MY_P_INIT} ..." |
367 |
- DESTDIR="${ED}" ${MY_PN_INIT}/install.sh shorewallrc.gentoo || die "${MY_PN_INIT}/install.sh failed" |
368 |
- dodoc "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt |
369 |
- |
370 |
- if [[ -f "${ED}/etc/logrotate.d/shorewall-init" ]]; then |
371 |
- # On Gentoo, shorewall-init will not create shorewall-ifupdown.log, |
372 |
- # so we don't need a logrotate configuration file for shorewall-init |
373 |
- einfo "Removing unused \"${ED}/etc/logrotate.d/shorewall-init\" ..." |
374 |
- rm -rf "${ED}"/etc/logrotate.d/shorewall-init || die "Removing \"${ED}/etc/logrotate.d/shorewall-init\" failed" |
375 |
- fi |
376 |
- |
377 |
- if [[ -d "${ED}/etc/NetworkManager" ]]; then |
378 |
- # On Gentoo, we don't support NetworkManager |
379 |
- # so we don't need this folder at all |
380 |
- einfo "Removing unused \"${ED}/etc/NetworkManager\" ..." |
381 |
- rm -rf "${ED}"/etc/NetworkManager || die "Removing \"${ED}/etc/NetworkManager\" failed" |
382 |
- fi |
383 |
- |
384 |
- if [[ -f "${ED}/usr/share/shorewall-init/ifupdown" ]]; then |
385 |
- # This script isn't supported on Gentoo |
386 |
- rm -rf "${ED}"/usr/share/shorewall-init/ifupdown || die "Removing \"${ED}/usr/share/shorewall-init/ifupdown\" failed" |
387 |
- fi |
388 |
- fi |
389 |
- |
390 |
- if use doc; then |
391 |
- einfo "Installing ${MY_P_DOCS} ..." |
392 |
- docinto html && dodoc -r "${S}"/${MY_PN_DOCS}/* |
393 |
- fi |
394 |
-} |
395 |
- |
396 |
-pkg_postinst() { |
397 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
398 |
- # This is a new installation |
399 |
- |
400 |
- # Show first steps for shorewall/shorewall6 |
401 |
- local _PRODUCTS="" |
402 |
- if use ipv4; then |
403 |
- _PRODUCTS="shorewall" |
404 |
- |
405 |
- if use ipv6; then |
406 |
- _PRODUCTS="${_PRODUCTS}/shorewall6" |
407 |
- fi |
408 |
- fi |
409 |
- |
410 |
- if [[ -n "${_PRODUCTS}" ]]; then |
411 |
- elog "Before you can use ${_PRODUCTS}, you need to edit its configuration in:" |
412 |
- elog "" |
413 |
- elog " /etc/shorewall/shorewall.conf" |
414 |
- |
415 |
- if use ipv6; then |
416 |
- elog " /etc/shorewall6/shorewall6.conf" |
417 |
- fi |
418 |
- |
419 |
- elog "" |
420 |
- elog "To activate your shorewall-based firewall on system start, please add ${_PRODUCTS} to your default runlevel:" |
421 |
- elog "" |
422 |
- elog " # rc-update add shorewall default" |
423 |
- |
424 |
- if use ipv6; then |
425 |
- elog " # rc-update add shorewall6 default" |
426 |
- fi |
427 |
- fi |
428 |
- |
429 |
- # Show first steps for shorewall-lite/shorewall6-lite |
430 |
- _PRODUCTS="" |
431 |
- if use lite4; then |
432 |
- _PRODUCTS="shorewall-lite" |
433 |
- fi |
434 |
- |
435 |
- if use lite6; then |
436 |
- if [[ -z "${_PRODUCTS}" ]]; then |
437 |
- _PRODUCTS="shorewall6-lite" |
438 |
- else |
439 |
- _PRODUCTS="${_PRODUCTS}/shorewall6-lite" |
440 |
- fi |
441 |
- fi |
442 |
- |
443 |
- if [[ -n "${_PRODUCTS}" ]]; then |
444 |
- if use ipv4; then |
445 |
- elog "" |
446 |
- fi |
447 |
- |
448 |
- elog "Before you can use ${_PRODUCTS}, you need to provide a configuration, which you can" |
449 |
- elog "create using ${CATEGORY}/shorewall (with \"ipv4\" and or \"ipv6\" USE flag)." |
450 |
- elog "" |
451 |
- elog "To read more about ${_PRODUCTS}, please visit" |
452 |
- elog " https://shorewall.org/CompiledPrograms.html" |
453 |
- elog "" |
454 |
- elog "To activate your shorewall-lite-based firewall on system start, please add ${PRODUCTS} to your default runlevel:" |
455 |
- elog "" |
456 |
- |
457 |
- if use lite4; then |
458 |
- elog " # rc-update add shorewall-lite default" |
459 |
- fi |
460 |
- |
461 |
- if use lite6; then |
462 |
- elog " # rc-update add shorewall6-lite default" |
463 |
- fi |
464 |
- fi |
465 |
- |
466 |
- if use init; then |
467 |
- elog "" |
468 |
- elog "To secure your system on boot, please add shorewall-init to your boot runlevel:" |
469 |
- elog "" |
470 |
- elog " # rc-update add shorewall-init boot" |
471 |
- elog "" |
472 |
- elog "and review \$PRODUCTS in" |
473 |
- elog "" |
474 |
- elog " /etc/conf.d/shorewall-init" |
475 |
- fi |
476 |
- |
477 |
- fi |
478 |
- |
479 |
- local v |
480 |
- for v in ${REPLACING_VERSIONS}; do |
481 |
- if ! version_is_at_least ${MY_MAJOR_RELEASE_NUMBER} ${v}; then |
482 |
- # This is an upgrade |
483 |
- |
484 |
- elog "You are upgrading from a previous major version. It is highly recommended that you read" |
485 |
- elog "" |
486 |
- elog " - /usr/share/doc/shorewall*/releasenotes.tx*" |
487 |
- elog " - https://shorewall.org/Shorewall-5.html#idm214" |
488 |
- |
489 |
- if use ipv4; then |
490 |
- elog "" |
491 |
- elog "You can auto-migrate your configuration using" |
492 |
- elog "" |
493 |
- elog " # shorewall update -A" |
494 |
- |
495 |
- if use ipv6; then |
496 |
- elog " # shorewall6 update -A" |
497 |
- fi |
498 |
- |
499 |
- elog "" |
500 |
- elog "*after* you have merged the changed files using one of the configuration" |
501 |
- elog "files update tools of your choice (dispatch-conf, etc-update...)." |
502 |
- |
503 |
- elog "" |
504 |
- elog "But if you are not familiar with the \"shorewall[6] update\" command," |
505 |
- elog "please read the shorewall[6] man page first." |
506 |
- fi |
507 |
- |
508 |
- # Show this elog only once |
509 |
- break |
510 |
- fi |
511 |
- done |
512 |
- |
513 |
- if ! use init; then |
514 |
- elog "" |
515 |
- elog "Consider emerging ${CATEGORY}/${PN} with USE flag \"init\" to secure your system on boot" |
516 |
- elog "before your shorewall-based firewall is ready to start." |
517 |
- elog "" |
518 |
- elog "To read more about shorewall-init, please visit" |
519 |
- elog " https://shorewall.org/Shorewall-init.html" |
520 |
- fi |
521 |
- |
522 |
- if ! has_version "net-firewall/conntrack-tools"; then |
523 |
- elog "" |
524 |
- elog "Your Shorewall firewall can utilize \"conntrack\" from the \"net-firewall/conntrack-tools\"" |
525 |
- elog "package. if you want to use this feature, you need to install \"net-firewall/conntrack-tools\"!" |
526 |
- fi |
527 |
- |
528 |
- if ! has_version "dev-perl/Devel-NYTProf"; then |
529 |
- elog "" |
530 |
- elog "If you want to profile your Shorewall firewall you need to install \"dev-perl/Devel-NYTProf\"!" |
531 |
- fi |
532 |
-} |
533 |
|
534 |
diff --git a/net-firewall/shorewall/shorewall-5.2.4.5.ebuild b/net-firewall/shorewall/shorewall-5.2.4.5.ebuild |
535 |
deleted file mode 100644 |
536 |
index 95a3c0906ea..00000000000 |
537 |
--- a/net-firewall/shorewall/shorewall-5.2.4.5.ebuild |
538 |
+++ /dev/null |
539 |
@@ -1,482 +0,0 @@ |
540 |
-# Copyright 1999-2020 Gentoo Authors |
541 |
-# Distributed under the terms of the GNU General Public License v2 |
542 |
- |
543 |
-EAPI="7" |
544 |
- |
545 |
-inherit linux-info prefix systemd |
546 |
- |
547 |
-DESCRIPTION='A high-level tool for configuring Netfilter' |
548 |
-HOMEPAGE="https://shorewall.org/" |
549 |
-LICENSE="GPL-2" |
550 |
-SLOT="0" |
551 |
-IUSE="doc +init +ipv4 ipv6 lite4 lite6 selinux" |
552 |
- |
553 |
-MY_PV=${PV/_rc/-RC} |
554 |
-MY_PV=${MY_PV/_beta/-Beta} |
555 |
-MY_P=${PN}-${MY_PV} |
556 |
- |
557 |
-MY_MAJOR_RELEASE_NUMBER=$(ver_cut 1-2) |
558 |
-MY_MAJORMINOR_RELEASE_NUMBER=$(ver_cut 1-3) |
559 |
- |
560 |
-# shorewall |
561 |
-MY_PN_IPV4=Shorewall |
562 |
-MY_P_IPV4=${MY_PN_IPV4/#S/s}-${MY_PV} |
563 |
- |
564 |
-# shorewall6 |
565 |
-MY_PN_IPV6=Shorewall6 |
566 |
-MY_P_IPV6=${MY_PN_IPV6/#S/s}-${MY_PV} |
567 |
- |
568 |
-# shorewall-lite |
569 |
-MY_PN_LITE4=Shorewall-lite |
570 |
-MY_P_LITE4=${MY_PN_LITE4/#S/s}-${MY_PV} |
571 |
- |
572 |
-# shorewall6-lite |
573 |
-MY_PN_LITE6=Shorewall6-lite |
574 |
-MY_P_LITE6=${MY_PN_LITE6/#S/s}-${MY_PV} |
575 |
- |
576 |
-# shorewall-init |
577 |
-MY_PN_INIT=Shorewall-init |
578 |
-MY_P_INIT=${MY_PN_INIT/#S/s}-${MY_PV} |
579 |
- |
580 |
-# shorewall-core |
581 |
-MY_PN_CORE=Shorewall-core |
582 |
-MY_P_CORE=${MY_PN_CORE/#S/s}-${MY_PV} |
583 |
- |
584 |
-# shorewall-docs-html |
585 |
-MY_PN_DOCS=Shorewall-docs-html |
586 |
-MY_P_DOCS=${MY_PN_DOCS/#S/s}-${MY_PV} |
587 |
- |
588 |
-# Upstream URL schema: |
589 |
-# Beta: $MIRROR/pub/shorewall/development/4.6/shorewall-4.6.4-Beta2/shorewall-4.6.4-Beta2.tar.bz2 |
590 |
-# RC: $MIRROR/pub/shorewall/development/4.6/shorewall-4.6.4-RC1/shorewall-4.6.4-RC1.tar.bz2 |
591 |
-# Release: $MIRROR/pub/shorewall/4.6/shorewall-4.6.3/shorewall-4.6.3.3.tar.bz2 |
592 |
- |
593 |
-MY_URL_PREFIX= |
594 |
-MY_URL_SUFFIX= |
595 |
-if [[ ${MY_PV} = *-Beta* ]] || [[ ${MY_PV} = *-RC* ]]; then |
596 |
- MY_URL_PREFIX='development/' |
597 |
- |
598 |
- if [[ ${MY_PV} = *-Beta* ]] ; then |
599 |
- MY_URL_SUFFIX="-Beta${MY_PV##*-Beta}" |
600 |
- elif [[ ${MY_PV} = *-RC* ]] ; then |
601 |
- MY_URL_SUFFIX="-RC${MY_PV##*-RC}" |
602 |
- fi |
603 |
- |
604 |
- # Cleaning up temporary variables |
605 |
- unset _tmp_last_index |
606 |
- unset _tmp_suffix |
607 |
-else |
608 |
- KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" |
609 |
-fi |
610 |
- |
611 |
-SRC_URI=" |
612 |
- 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 |
613 |
- 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 ) |
614 |
- 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 ) |
615 |
- 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 ) |
616 |
- 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 ) |
617 |
- 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 ) |
618 |
- 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 ) |
619 |
-" |
620 |
- |
621 |
-# - Shorewall6 requires Shorewall |
622 |
-# - Installing Shorewall-init or just the documentation doesn't make any sense, |
623 |
-# that's why we force the user to select at least one "real" Shorewall product |
624 |
-# |
625 |
-# See https://shorewall.org/download.htm#Which |
626 |
-REQUIRED_USE=" |
627 |
- ipv6? ( ipv4 ) |
628 |
- || ( ipv4 lite4 lite6 ) |
629 |
-" |
630 |
- |
631 |
-# No build dependencies! Just plain shell scripts... |
632 |
-DEPEND="" |
633 |
- |
634 |
-RDEPEND=" |
635 |
- >=net-firewall/iptables-1.4.20 |
636 |
- >=sys-apps/iproute2-3.8.0[-minimal] |
637 |
- >=sys-devel/bc-1.06.95 |
638 |
- ipv4? ( |
639 |
- >=dev-lang/perl-5.16 |
640 |
- virtual/perl-Digest-SHA |
641 |
- ) |
642 |
- ipv6? ( |
643 |
- >=dev-perl/Socket6-0.230.0 |
644 |
- >=net-firewall/iptables-1.4.20[ipv6] |
645 |
- >=sys-apps/iproute2-3.8.0[ipv6] |
646 |
- ) |
647 |
- lite6? ( |
648 |
- >=net-firewall/iptables-1.4.20[ipv6] |
649 |
- >=sys-apps/iproute2-3.8.0[ipv6] |
650 |
- ) |
651 |
- init? ( >=sys-apps/coreutils-8.20 ) |
652 |
- selinux? ( >=sec-policy/selinux-shorewall-2.20161023-r3 ) |
653 |
- !net-firewall/shorewall-core |
654 |
- !net-firewall/shorewall6 |
655 |
- !net-firewall/shorewall-lite |
656 |
- !net-firewall/shorewall6-lite |
657 |
- !net-firewall/shorewall-init |
658 |
- !<sys-apps/systemd-214 |
659 |
-" |
660 |
- |
661 |
-S=${WORKDIR} |
662 |
- |
663 |
-pkg_pretend() { |
664 |
- local CONFIG_CHECK="~NF_CONNTRACK" |
665 |
- |
666 |
- local WARNING_CONNTRACK="Without NF_CONNTRACK support, you will be unable" |
667 |
- local WARNING_CONNTRACK+=" to run any shorewall-based firewall on the local system." |
668 |
- |
669 |
- # kernel >=4.19 has unified NF_CONNTRACK module, bug 671176 |
670 |
- if kernel_is -lt 4 19; then |
671 |
- if use ipv4 || use lite4; then |
672 |
- CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV4" |
673 |
- |
674 |
- local WARNING_CONNTRACK_IPV4="Without NF_CONNTRACK_IPV4 support, you will" |
675 |
- local WARNING_CONNTRACK_IPV4+=" be unable to run any shorewall-based IPv4 firewall on the local system." |
676 |
- fi |
677 |
- |
678 |
- if use ipv6 || use lite6; then |
679 |
- CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV6" |
680 |
- |
681 |
- local WARNING_CONNTRACK_IPV6="Without NF_CONNTRACK_IPV6 support, you will" |
682 |
- local WARNING_CONNTRACK_IPV6+=" be unable to run any shorewall-based IPv6 firewall on the local system." |
683 |
- fi |
684 |
- fi |
685 |
- |
686 |
- check_extra_config |
687 |
-} |
688 |
- |
689 |
-pkg_setup() { |
690 |
- if [[ -n "${DIGEST}" ]]; then |
691 |
- einfo "Unsetting environment variable \"DIGEST\" to prevent conflicts with package's \"install.sh\" script ..." |
692 |
- unset DIGEST |
693 |
- fi |
694 |
-} |
695 |
- |
696 |
-src_prepare() { |
697 |
- # We are moving each unpacked source from MY_P_* to MY_PN_*. |
698 |
- # This allows us to use patches from upstream and keeps epatch_user working |
699 |
- |
700 |
- einfo "Preparing shorewallrc ..." |
701 |
- cp "${FILESDIR}"/shorewallrc-r3 "${S}"/shorewallrc.gentoo || die "Copying shorewallrc failed" |
702 |
- eprefixify "${S}"/shorewallrc.gentoo |
703 |
- sed -i \ |
704 |
- -e "s|SERVICEDIR=tbs|SERVICEDIR=$(systemd_get_systemunitdir)|" \ |
705 |
- "${S}"/shorewallrc.gentoo || die "Failed to update shorewallrc" |
706 |
- |
707 |
- # shorewall-core |
708 |
- mv "${S}"/${MY_P_CORE} "${S}"/${MY_PN_CORE} || die "Failed to move '${S}/${MY_P_CORE}' to '${S}/${MY_PN_CORE}'" |
709 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_CORE} ..." |
710 |
- ln -s ../shorewallrc.gentoo ${MY_PN_CORE}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
711 |
- eend 0 |
712 |
- |
713 |
- pushd "${S}"/${MY_PN_CORE} &>/dev/null || die |
714 |
- eapply "${FILESDIR}"/shorewall-core-5.2.1-no-gzipped-manpages.patch |
715 |
- popd &>/dev/null || die |
716 |
- |
717 |
- # shorewall |
718 |
- if use ipv4; then |
719 |
- mv "${S}"/${MY_P_IPV4} "${S}"/${MY_PN_IPV4} || die "Failed to move '${S}/${MY_P_IPV4}' to '${S}/${MY_PN_IPV4}'" |
720 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_IPV4}" |
721 |
- ln -s ../shorewallrc.gentoo ${MY_PN_IPV4}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
722 |
- cp "${FILESDIR}"/shorewall.confd-r1 "${S}"/${MY_PN_IPV4}/default.gentoo || die "Copying shorewall.confd-r1 failed" |
723 |
- cp "${FILESDIR}"/shorewall.initd-r3 "${S}"/${MY_PN_IPV4}/init.gentoo.sh || die "Copying shorewall.initd-r2 failed" |
724 |
- cp "${FILESDIR}"/shorewall.systemd "${S}"/${MY_PN_IPV4}/gentoo.service || die "Copying shorewall.systemd failed" |
725 |
- eend 0 |
726 |
- |
727 |
- pushd "${S}"/${MY_PN_IPV4} &>/dev/null || die |
728 |
- eapply "${FILESDIR}"/shorewall-5.2.1-no-gzipped-manpages.patch |
729 |
- popd &>/dev/null || die |
730 |
- fi |
731 |
- |
732 |
- # shorewall6 |
733 |
- if use ipv6; then |
734 |
- mv "${S}"/${MY_P_IPV6} "${S}"/${MY_PN_IPV6} || die "Failed to move '${S}/${MY_P_IPV6}' to '${S}/${MY_PN_IPV6}'" |
735 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_IPV6}" |
736 |
- ln -s ../shorewallrc.gentoo ${MY_PN_IPV6}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
737 |
- cp "${FILESDIR}"/shorewall.confd-r1 "${S}"/${MY_PN_IPV6}/default.gentoo || die "Copying shorewall.confd-r1 failed" |
738 |
- cp "${FILESDIR}"/shorewall.initd-r3 "${S}"/${MY_PN_IPV6}/init.gentoo.sh || die "Copying shorewall.initd-r2 failed" |
739 |
- cp "${FILESDIR}"/shorewall6.systemd "${S}"/${MY_PN_IPV6}/gentoo.service || die "Copying shorewall6.systemd failed" |
740 |
- eend 0 |
741 |
- |
742 |
- pushd "${S}"/${MY_PN_IPV6} &>/dev/null || die |
743 |
- eapply "${FILESDIR}"/shorewall-5.2.1-no-gzipped-manpages.patch |
744 |
- popd &>/dev/null || die |
745 |
- fi |
746 |
- |
747 |
- # shorewall-lite |
748 |
- if use lite4; then |
749 |
- mv "${S}"/${MY_P_LITE4} "${S}"/${MY_PN_LITE4} || die "Failed to move '${S}/${MY_P_LITE4}' to '${S}/${MY_PN_LITE4}'" |
750 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_LITE4}" |
751 |
- ln -s ../shorewallrc.gentoo ${MY_PN_LITE4}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
752 |
- cp "${FILESDIR}"/shorewall-lite.confd-r1 "${S}"/${MY_PN_LITE4}/default.gentoo || die "Copying shorewall-lite.confd-r1 failed" |
753 |
- cp "${FILESDIR}"/shorewall-lite.initd-r3 "${S}"/${MY_PN_LITE4}/init.gentoo.sh || die "Copying shorewall-lite.initd-r2 failed" |
754 |
- cp "${FILESDIR}"/shorewall-lite.systemd "${S}"/${MY_PN_LITE4}/gentoo.service || die "Copying shorewall-lite.systemd failed" |
755 |
- eend 0 |
756 |
- |
757 |
- pushd "${S}"/${MY_PN_LITE4} &>/dev/null || die |
758 |
- eapply "${FILESDIR}"/shorewall-lite-5.2.1-no-gzipped-manpages.patch |
759 |
- popd &>/dev/null || die |
760 |
- fi |
761 |
- |
762 |
- # shorewall6-lite |
763 |
- if use lite6; then |
764 |
- mv "${S}"/${MY_P_LITE6} "${S}"/${MY_PN_LITE6} || die "Failed to move '${S}/${MY_P_LITE6}' to '${S}/${MY_PN_LITE6}'" |
765 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_LITE6}" |
766 |
- ln -s ../shorewallrc.gentoo ${MY_PN_LITE6}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
767 |
- cp "${FILESDIR}"/shorewall-lite.confd-r1 "${S}"/${MY_PN_LITE6}/default.gentoo || die "Copying shorewall-lite.confd-r1 failed" |
768 |
- cp "${FILESDIR}"/shorewall-lite.initd-r3 "${S}"/${MY_PN_LITE6}/init.gentoo.sh || die "Copying shorewall-lite.initd-r2 failed" |
769 |
- cp "${FILESDIR}"/shorewall6-lite.systemd "${S}"/${MY_PN_LITE6}/gentoo.service || die "Copying shorewall6-lite.systemd failed" |
770 |
- eend 0 |
771 |
- |
772 |
- pushd "${S}"/${MY_PN_LITE6} &>/dev/null || die |
773 |
- eapply "${FILESDIR}"/shorewall-lite-5.2.1-no-gzipped-manpages.patch |
774 |
- popd &>/dev/null || die |
775 |
- fi |
776 |
- |
777 |
- # shorewall-init |
778 |
- if use init; then |
779 |
- mv "${S}"/${MY_P_INIT} "${S}"/${MY_PN_INIT} || die "Failed to move '${S}/${MY_P_INIT}' to '${S}/${MY_PN_INIT}'" |
780 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_INIT}" |
781 |
- ln -s ../shorewallrc.gentoo ${MY_PN_INIT}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
782 |
- cp "${FILESDIR}"/shorewall-init.confd "${S}"/${MY_PN_INIT}/default.gentoo || die "Copying shorewall-init.confd failed" |
783 |
- cp "${FILESDIR}"/shorewall-init.initd "${S}"/${MY_PN_INIT}/init.gentoo.sh || die "Copying shorewall-init.initd failed" |
784 |
- cp "${FILESDIR}"/shorewall-init.systemd "${S}"/${MY_PN_INIT}/gentoo.service || die "Copying shorewall-init.systemd failed" |
785 |
- cp "${FILESDIR}"/shorewall-init.readme "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt || die "Copying shorewall-init.systemd failed" |
786 |
- eend 0 |
787 |
- |
788 |
- eprefixify "${S}"/${MY_PN_INIT}/init.gentoo.sh |
789 |
- |
790 |
- pushd "${S}"/${MY_PN_INIT} &>/dev/null || die |
791 |
- eapply -p2 "${FILESDIR}"/shorewall-init-01_remove-ipset-functionality-r2.patch |
792 |
- popd &>/dev/null || die |
793 |
- fi |
794 |
- |
795 |
- # shorewall-docs-html |
796 |
- if use doc; then |
797 |
- mv "${S}"/${MY_P_DOCS} "${S}"/${MY_PN_DOCS} || die "Failed to move '${S}/${MY_P_DOCS}' to '${S}/${MY_PN_DOCS}'" |
798 |
- fi |
799 |
- |
800 |
- eapply_user |
801 |
-} |
802 |
- |
803 |
-src_configure() { |
804 |
- :; |
805 |
-} |
806 |
- |
807 |
-src_compile() { |
808 |
- :; |
809 |
-} |
810 |
- |
811 |
-src_install() { |
812 |
- # shorewall-core |
813 |
- einfo "Installing ${MY_P_CORE} ..." |
814 |
- DESTDIR="${ED}" ${MY_PN_CORE}/install.sh shorewallrc.gentoo || die "${MY_PN_CORE}/install.sh failed" |
815 |
- dodoc "${S}"/${MY_PN_CORE}/changelog.txt "${S}"/${MY_PN_CORE}/releasenotes.txt |
816 |
- |
817 |
- # shorewall |
818 |
- if use ipv4; then |
819 |
- einfo "Installing ${MY_P_IPV4} ..." |
820 |
- DESTDIR="${ED}" ${MY_PN_IPV4}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV4}/install.sh failed" |
821 |
- keepdir /var/lib/shorewall |
822 |
- |
823 |
- if use doc; then |
824 |
- dodoc -r "${S}"/${MY_PN_IPV4}/Samples |
825 |
- fi |
826 |
- fi |
827 |
- |
828 |
- # shorewall6 |
829 |
- if use ipv6; then |
830 |
- einfo "Installing ${MY_P_IPV6} ..." |
831 |
- DESTDIR="${ED}" ${MY_PN_IPV6}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV6}/install.sh failed" |
832 |
- keepdir /var/lib/shorewall6 |
833 |
- |
834 |
- if use doc; then |
835 |
- dodoc -r "${S}"/${MY_PN_IPV6}/Samples6 |
836 |
- fi |
837 |
- fi |
838 |
- |
839 |
- # shorewall-lite |
840 |
- if use lite4; then |
841 |
- einfo "Installing ${MY_P_LITE4} ..." |
842 |
- DESTDIR="${ED}" ${MY_PN_LITE4}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE4}/install.sh failed" |
843 |
- keepdir /var/lib/shorewall-lite |
844 |
- fi |
845 |
- |
846 |
- # shorewall6-lite |
847 |
- if use lite6; then |
848 |
- einfo "Installing ${MY_P_LITE6} ..." |
849 |
- DESTDIR="${ED}" ${MY_PN_LITE6}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE6}/install.sh failed" |
850 |
- keepdir /var/lib/shorewall6-lite |
851 |
- fi |
852 |
- |
853 |
- # shorewall-init |
854 |
- if use init; then |
855 |
- einfo "Installing ${MY_P_INIT} ..." |
856 |
- DESTDIR="${ED}" ${MY_PN_INIT}/install.sh shorewallrc.gentoo || die "${MY_PN_INIT}/install.sh failed" |
857 |
- dodoc "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt |
858 |
- |
859 |
- if [[ -f "${ED}/etc/logrotate.d/shorewall-init" ]]; then |
860 |
- # On Gentoo, shorewall-init will not create shorewall-ifupdown.log, |
861 |
- # so we don't need a logrotate configuration file for shorewall-init |
862 |
- einfo "Removing unused \"${ED}/etc/logrotate.d/shorewall-init\" ..." |
863 |
- rm -rf "${ED}"/etc/logrotate.d/shorewall-init || die "Removing \"${ED}/etc/logrotate.d/shorewall-init\" failed" |
864 |
- fi |
865 |
- |
866 |
- if [[ -d "${ED}/etc/NetworkManager" ]]; then |
867 |
- # On Gentoo, we don't support NetworkManager |
868 |
- # so we don't need this folder at all |
869 |
- einfo "Removing unused \"${ED}/etc/NetworkManager\" ..." |
870 |
- rm -rf "${ED}"/etc/NetworkManager || die "Removing \"${ED}/etc/NetworkManager\" failed" |
871 |
- fi |
872 |
- |
873 |
- if [[ -f "${ED}/usr/share/shorewall-init/ifupdown" ]]; then |
874 |
- # This script isn't supported on Gentoo |
875 |
- rm -rf "${ED}"/usr/share/shorewall-init/ifupdown || die "Removing \"${ED}/usr/share/shorewall-init/ifupdown\" failed" |
876 |
- fi |
877 |
- fi |
878 |
- |
879 |
- if use doc; then |
880 |
- einfo "Installing ${MY_P_DOCS} ..." |
881 |
- docinto html && dodoc -r "${S}"/${MY_PN_DOCS}/* |
882 |
- fi |
883 |
-} |
884 |
- |
885 |
-pkg_postinst() { |
886 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
887 |
- # This is a new installation |
888 |
- |
889 |
- # Show first steps for shorewall/shorewall6 |
890 |
- local _PRODUCTS="" |
891 |
- if use ipv4; then |
892 |
- _PRODUCTS="shorewall" |
893 |
- |
894 |
- if use ipv6; then |
895 |
- _PRODUCTS="${_PRODUCTS}/shorewall6" |
896 |
- fi |
897 |
- fi |
898 |
- |
899 |
- if [[ -n "${_PRODUCTS}" ]]; then |
900 |
- elog "Before you can use ${_PRODUCTS}, you need to edit its configuration in:" |
901 |
- elog "" |
902 |
- elog " /etc/shorewall/shorewall.conf" |
903 |
- |
904 |
- if use ipv6; then |
905 |
- elog " /etc/shorewall6/shorewall6.conf" |
906 |
- fi |
907 |
- |
908 |
- elog "" |
909 |
- elog "To activate your shorewall-based firewall on system start, please add ${_PRODUCTS} to your default runlevel:" |
910 |
- elog "" |
911 |
- elog " # rc-update add shorewall default" |
912 |
- |
913 |
- if use ipv6; then |
914 |
- elog " # rc-update add shorewall6 default" |
915 |
- fi |
916 |
- fi |
917 |
- |
918 |
- # Show first steps for shorewall-lite/shorewall6-lite |
919 |
- _PRODUCTS="" |
920 |
- if use lite4; then |
921 |
- _PRODUCTS="shorewall-lite" |
922 |
- fi |
923 |
- |
924 |
- if use lite6; then |
925 |
- if [[ -z "${_PRODUCTS}" ]]; then |
926 |
- _PRODUCTS="shorewall6-lite" |
927 |
- else |
928 |
- _PRODUCTS="${_PRODUCTS}/shorewall6-lite" |
929 |
- fi |
930 |
- fi |
931 |
- |
932 |
- if [[ -n "${_PRODUCTS}" ]]; then |
933 |
- if use ipv4; then |
934 |
- elog "" |
935 |
- fi |
936 |
- |
937 |
- elog "Before you can use ${_PRODUCTS}, you need to provide a configuration, which you can" |
938 |
- elog "create using ${CATEGORY}/shorewall (with \"ipv4\" and or \"ipv6\" USE flag)." |
939 |
- elog "" |
940 |
- elog "To read more about ${_PRODUCTS}, please visit" |
941 |
- elog " https://shorewall.org/CompiledPrograms.html" |
942 |
- elog "" |
943 |
- elog "To activate your shorewall-lite-based firewall on system start, please add ${PRODUCTS} to your default runlevel:" |
944 |
- elog "" |
945 |
- |
946 |
- if use lite4; then |
947 |
- elog " # rc-update add shorewall-lite default" |
948 |
- fi |
949 |
- |
950 |
- if use lite6; then |
951 |
- elog " # rc-update add shorewall6-lite default" |
952 |
- fi |
953 |
- fi |
954 |
- |
955 |
- if use init; then |
956 |
- elog "" |
957 |
- elog "To secure your system on boot, please add shorewall-init to your boot runlevel:" |
958 |
- elog "" |
959 |
- elog " # rc-update add shorewall-init boot" |
960 |
- elog "" |
961 |
- elog "and review \$PRODUCTS in" |
962 |
- elog "" |
963 |
- elog " /etc/conf.d/shorewall-init" |
964 |
- fi |
965 |
- |
966 |
- fi |
967 |
- |
968 |
- local v |
969 |
- for v in ${REPLACING_VERSIONS}; do |
970 |
- if ! version_is_at_least ${MY_MAJOR_RELEASE_NUMBER} ${v}; then |
971 |
- # This is an upgrade |
972 |
- |
973 |
- elog "You are upgrading from a previous major version. It is highly recommended that you read" |
974 |
- elog "" |
975 |
- elog " - /usr/share/doc/shorewall*/releasenotes.tx*" |
976 |
- elog " - https://shorewall.org/Shorewall-5.html#idm214" |
977 |
- |
978 |
- if use ipv4; then |
979 |
- elog "" |
980 |
- elog "You can auto-migrate your configuration using" |
981 |
- elog "" |
982 |
- elog " # shorewall update -A" |
983 |
- |
984 |
- if use ipv6; then |
985 |
- elog " # shorewall6 update -A" |
986 |
- fi |
987 |
- |
988 |
- elog "" |
989 |
- elog "*after* you have merged the changed files using one of the configuration" |
990 |
- elog "files update tools of your choice (dispatch-conf, etc-update...)." |
991 |
- |
992 |
- elog "" |
993 |
- elog "But if you are not familiar with the \"shorewall[6] update\" command," |
994 |
- elog "please read the shorewall[6] man page first." |
995 |
- fi |
996 |
- |
997 |
- # Show this elog only once |
998 |
- break |
999 |
- fi |
1000 |
- done |
1001 |
- |
1002 |
- if ! use init; then |
1003 |
- elog "" |
1004 |
- elog "Consider emerging ${CATEGORY}/${PN} with USE flag \"init\" to secure your system on boot" |
1005 |
- elog "before your shorewall-based firewall is ready to start." |
1006 |
- elog "" |
1007 |
- elog "To read more about shorewall-init, please visit" |
1008 |
- elog " https://shorewall.org/Shorewall-init.html" |
1009 |
- fi |
1010 |
- |
1011 |
- if ! has_version "net-firewall/conntrack-tools"; then |
1012 |
- elog "" |
1013 |
- elog "Your Shorewall firewall can utilize \"conntrack\" from the \"net-firewall/conntrack-tools\"" |
1014 |
- elog "package. if you want to use this feature, you need to install \"net-firewall/conntrack-tools\"!" |
1015 |
- fi |
1016 |
- |
1017 |
- if ! has_version "dev-perl/Devel-NYTProf"; then |
1018 |
- elog "" |
1019 |
- elog "If you want to profile your Shorewall firewall you need to install \"dev-perl/Devel-NYTProf\"!" |
1020 |
- fi |
1021 |
-} |