1 |
commit: 5c579431fa27fb92ff506c6668a89757da63dc8b |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 30 22:17:56 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 30 22:18:05 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c579431 |
7 |
|
8 |
net-firewall/shorewall: drop old |
9 |
|
10 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
net-firewall/shorewall/Manifest | 7 - |
14 |
net-firewall/shorewall/shorewall-5.2.7.ebuild | 482 -------------------------- |
15 |
2 files changed, 489 deletions(-) |
16 |
|
17 |
diff --git a/net-firewall/shorewall/Manifest b/net-firewall/shorewall/Manifest |
18 |
index c943e4957d3..3517007e6d7 100644 |
19 |
--- a/net-firewall/shorewall/Manifest |
20 |
+++ b/net-firewall/shorewall/Manifest |
21 |
@@ -1,14 +1,7 @@ |
22 |
-DIST shorewall-5.2.7.tar.bz2 585135 BLAKE2B 614a993d34927b6f976f8d783608832014e1e2c94d02f53904cc977d3a05cc7ef21bc3dd32545c11b705da7c84ca472f0dc2ec6438af6b60eb705f741d432269 SHA512 abe3f2bfa8944cdecf24e8a2b3bcc5a786bc6bafb1e85e10257f4ff3002689b1e0ed23ddf866f63ce301c6bec43959b6ce77bbbbe8ffeb0f48a18c858be226a2 |
23 |
DIST shorewall-5.2.8.tar.bz2 574427 BLAKE2B 1ea97c8d8ed4619af1ffe0e502c6871a2c14e6e75a12b5e702315aa67411efb6d0c3049017ea48f02e302a7d4af72d06b635dcc8314a4d4325a24cc8f7abd344 SHA512 d5fc562f59e97cb462c6c0d7cf2b0f6211d413c2e3db72d93e8ad4f23cd1d0f69c90fff602d6891bbee1725c2505a72f3677c3050758e36f38f0248e8c6c7e52 |
24 |
-DIST shorewall-core-5.2.7.tar.bz2 76504 BLAKE2B 5456b0f844c3f1c99cd8a89dff58ab5cf86d085a763a8de3918c2cf6fb5e59779912fae103f8b4284ba7a2c474beb786422a5de77eb3a67480d1d6ee0b316839 SHA512 0ed2f2e05abafa60e5d1560c5ee8419e7a3d0afe20192597a1efd263cfbe9331369682d6caa22ebdda128a410197010bb4429a3fa1500f9ac06ce8afcc1e6cc8 |
25 |
DIST shorewall-core-5.2.8.tar.bz2 77980 BLAKE2B 141ac2baf5b466c31d90bb73e8aa4f3f8688656f3734b85dcd392196559a70a9550f125595c488e90e2a34c8ab7067106d728b349fbcb7e42fdd0a8d11c749da SHA512 f0d4f41b2614cc4c6f834ac2a7bdfae181789bc97044171b0fa1e968cda930cfdc86fa1ff4b54b43a8ae22b7b6f80b66b77888644c5a7751edf814cc49d491c6 |
26 |
-DIST shorewall-docs-html-5.2.7.tar.bz2 4316006 BLAKE2B a981e050501d7fa9bdd2ecfc3fba279989089b1e6977abc881c2bc04df698e88cf7260acb28a06ce90d296e17944140ab24af98914839717811f2eb6af84da33 SHA512 4e381ad8fe8db5fe614c6dd6e4b595539519091c4aac2f7aa7ff8655e97fa8d07bec651c428492f334f632968ad94e1c863aeb1888964d696aca011e980fcbc6 |
27 |
DIST shorewall-docs-html-5.2.8.tar.bz2 4322407 BLAKE2B 42daa490ac8b14a93a56b6a2beb388600e7be4336e46bdbadf417c638873f8c362171a6c2b388044fa3bc551cc446832e3773459183eaf31d096af575b85631f SHA512 c6bf1d3d6d2e08c483d72662fef66a0db8dd3cc3637c6731e97d6150bcc24762864bd51eaa9a3ff0f75d7599c7a56a467668a6907c4bdaa9f90d8bf9453e127b |
28 |
-DIST shorewall-init-5.2.7.tar.bz2 41377 BLAKE2B d39cf687ed4a5592fb8ea7b2d0a4b1313cb80ba81000e3692700a5a95d8035260991626c3e7466d3b9d1a9e8b3e61c559286f08b20494b81b59e5edbc8383378 SHA512 2dd81a4ae87496079990864a7b7a42814855d13210b996e3881e34d7cfb692035a2394adc912337800c72bc8565ae90426a0f1ddbf3e0384048a7c2d3e18aa43 |
29 |
DIST shorewall-init-5.2.8.tar.bz2 42589 BLAKE2B 74e265ed9d938b6130800f548f5f47658b641a76906a40d1980331f78648650a2165c43d232ab8d817ee5bcd63e1920e2e8b6f97b279a48baba1b72908816bc3 SHA512 eda8648ae5e67b2d6bc29f770e4ba791b6befaf85020445fb38d9837d65d8dcc90db79220e8d6a4c4918151ca2d33375cb3f3b7127e300cb9a37a572d154093c |
30 |
-DIST shorewall-lite-5.2.7.tar.bz2 45949 BLAKE2B 9d56d57c8bbf0d6478aa2b834750c6545fb323bb8ac513eb8df4f377ec70faa1c71c2105ac40bb5c88272bf56e34f39d93d41215b96b889a4fa9bd80339993ac SHA512 9e48d6d48a0a12577518a3b729cb2ad63e5be9a748fd58ef4c450d9f31527773f2fa790f38e7b1547257b49786a56dc293a16fe97b9c6eddd007edcd35efaee8 |
31 |
DIST shorewall-lite-5.2.8.tar.bz2 47250 BLAKE2B 2fff00d7a6248a3db0aa5d6b3ed041b06bdfa35b71195088659afd4036cf61c6bc2f3de739803d4e26e56785aa90c87ec6a2120239183351fae7a54065f1a629 SHA512 d72f260b095f1dfb2b0a0c967ae80bfd7f5f3469a08eb446c0b3e1b1e662cb500510b75f2979a00a9ef57b16e6a23a95483c34e2a5c5d2d090bc1e071ea87292 |
32 |
-DIST shorewall6-5.2.7.tar.bz2 203996 BLAKE2B b8b721d54c5aafae773d0d80b38106a17000793ff16f217ac6ec21f8702afe7a3fd8e99941056e508a8d8c93819e0e5644f1f8ce83c61dc6e3be49fb8fcd70c9 SHA512 039e0092770262f22ba08c2cfd536eccb9530da48306791fa6683e34c34f862001ca827dcb79b535243e68a24bffe92dbd866cf9d7ea8754161b5a8326a86d8e |
33 |
DIST shorewall6-5.2.8.tar.bz2 203102 BLAKE2B d9117d42cd25e18aa1104ec3f4498227eedcce5c3531623e2e4d6ec27ba5221f98e1ae2e596ac90d7415cd366b2dbfdd024adaaef0c1c2756900188bde105903 SHA512 7044efe84b2c585fcd0bfb661666c71cea140157f22ba7d4881006e24d785eb0091c071c825fa5948bc1383e7fd4617cc8f3d4e68865cf472ddea3811bf1833d |
34 |
-DIST shorewall6-lite-5.2.7.tar.bz2 45989 BLAKE2B ae698fb3b580bcc373958932d07b8e27bc805616dabe3b6cbf349fd29fa10299f91fffa6d1a74530b008d8806c62cdaf3868d1830cb3869bcfc6ca422cd9a2ef SHA512 c694c00c96e45d437e62ff600f85bb70b9431211ef9ff84753e880b165d694c5cd1a581a8163ed580cee78e790893b6239a8504b422554f14b4d4b7dd3c70601 |
35 |
DIST shorewall6-lite-5.2.8.tar.bz2 47178 BLAKE2B 47026c3fdab7564c8e48b653a4c67db99fe5ff07de723169f65185aea563691806164a637a38c419d19619cf1380462fa7287b0993d9389dd311393bac911602 SHA512 a80ffc7baf7800e024e41a0f9736543b15d10f2d403540e48e8a2cd2ba0196ce04ff01ac98fc03852c7d268bb4954714dd428375e768b80aa4792683b8775935 |
36 |
|
37 |
diff --git a/net-firewall/shorewall/shorewall-5.2.7.ebuild b/net-firewall/shorewall/shorewall-5.2.7.ebuild |
38 |
deleted file mode 100644 |
39 |
index c6f9c3e5bed..00000000000 |
40 |
--- a/net-firewall/shorewall/shorewall-5.2.7.ebuild |
41 |
+++ /dev/null |
42 |
@@ -1,482 +0,0 @@ |
43 |
-# Copyright 1999-2020 Gentoo Authors |
44 |
-# Distributed under the terms of the GNU General Public License v2 |
45 |
- |
46 |
-EAPI="7" |
47 |
- |
48 |
-inherit linux-info prefix systemd |
49 |
- |
50 |
-DESCRIPTION='A high-level tool for configuring Netfilter' |
51 |
-HOMEPAGE="https://shorewall.org/" |
52 |
-LICENSE="GPL-2" |
53 |
-SLOT="0" |
54 |
-IUSE="doc +init +ipv4 ipv6 lite4 lite6 selinux" |
55 |
- |
56 |
-MY_PV=${PV/_rc/-RC} |
57 |
-MY_PV=${MY_PV/_beta/-Beta} |
58 |
-MY_P=${PN}-${MY_PV} |
59 |
- |
60 |
-MY_MAJOR_RELEASE_NUMBER=$(ver_cut 1-2) |
61 |
-MY_MAJORMINOR_RELEASE_NUMBER=$(ver_cut 1-3) |
62 |
- |
63 |
-# shorewall |
64 |
-MY_PN_IPV4=Shorewall |
65 |
-MY_P_IPV4=${MY_PN_IPV4/#S/s}-${MY_PV} |
66 |
- |
67 |
-# shorewall6 |
68 |
-MY_PN_IPV6=Shorewall6 |
69 |
-MY_P_IPV6=${MY_PN_IPV6/#S/s}-${MY_PV} |
70 |
- |
71 |
-# shorewall-lite |
72 |
-MY_PN_LITE4=Shorewall-lite |
73 |
-MY_P_LITE4=${MY_PN_LITE4/#S/s}-${MY_PV} |
74 |
- |
75 |
-# shorewall6-lite |
76 |
-MY_PN_LITE6=Shorewall6-lite |
77 |
-MY_P_LITE6=${MY_PN_LITE6/#S/s}-${MY_PV} |
78 |
- |
79 |
-# shorewall-init |
80 |
-MY_PN_INIT=Shorewall-init |
81 |
-MY_P_INIT=${MY_PN_INIT/#S/s}-${MY_PV} |
82 |
- |
83 |
-# shorewall-core |
84 |
-MY_PN_CORE=Shorewall-core |
85 |
-MY_P_CORE=${MY_PN_CORE/#S/s}-${MY_PV} |
86 |
- |
87 |
-# shorewall-docs-html |
88 |
-MY_PN_DOCS=Shorewall-docs-html |
89 |
-MY_P_DOCS=${MY_PN_DOCS/#S/s}-${MY_PV} |
90 |
- |
91 |
-# Upstream URL schema: |
92 |
-# Beta: $MIRROR/pub/shorewall/development/4.6/shorewall-4.6.4-Beta2/shorewall-4.6.4-Beta2.tar.bz2 |
93 |
-# RC: $MIRROR/pub/shorewall/development/4.6/shorewall-4.6.4-RC1/shorewall-4.6.4-RC1.tar.bz2 |
94 |
-# Release: $MIRROR/pub/shorewall/4.6/shorewall-4.6.3/shorewall-4.6.3.3.tar.bz2 |
95 |
- |
96 |
-MY_URL_PREFIX= |
97 |
-MY_URL_SUFFIX= |
98 |
-if [[ ${MY_PV} = *-Beta* ]] || [[ ${MY_PV} = *-RC* ]]; then |
99 |
- MY_URL_PREFIX='development/' |
100 |
- |
101 |
- if [[ ${MY_PV} = *-Beta* ]] ; then |
102 |
- MY_URL_SUFFIX="-Beta${MY_PV##*-Beta}" |
103 |
- elif [[ ${MY_PV} = *-RC* ]] ; then |
104 |
- MY_URL_SUFFIX="-RC${MY_PV##*-RC}" |
105 |
- fi |
106 |
- |
107 |
- # Cleaning up temporary variables |
108 |
- unset _tmp_last_index |
109 |
- unset _tmp_suffix |
110 |
-else |
111 |
- KEYWORDS="~alpha amd64 hppa ppc ppc64 sparc x86" |
112 |
-fi |
113 |
- |
114 |
-SRC_URI=" |
115 |
- 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 |
116 |
- 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 ) |
117 |
- 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 ) |
118 |
- 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 ) |
119 |
- 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 ) |
120 |
- 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 ) |
121 |
- 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 ) |
122 |
-" |
123 |
- |
124 |
-# - Shorewall6 requires Shorewall |
125 |
-# - Installing Shorewall-init or just the documentation doesn't make any sense, |
126 |
-# that's why we force the user to select at least one "real" Shorewall product |
127 |
-# |
128 |
-# See https://shorewall.org/download.htm#Which |
129 |
-REQUIRED_USE=" |
130 |
- ipv6? ( ipv4 ) |
131 |
- || ( ipv4 lite4 lite6 ) |
132 |
-" |
133 |
- |
134 |
-# No build dependencies! Just plain shell scripts... |
135 |
-DEPEND="" |
136 |
- |
137 |
-RDEPEND=" |
138 |
- >=net-firewall/iptables-1.4.20 |
139 |
- >=sys-apps/iproute2-3.8.0[-minimal] |
140 |
- >=sys-devel/bc-1.06.95 |
141 |
- ipv4? ( |
142 |
- >=dev-lang/perl-5.16 |
143 |
- virtual/perl-Digest-SHA |
144 |
- ) |
145 |
- ipv6? ( |
146 |
- >=dev-perl/Socket6-0.230.0 |
147 |
- >=net-firewall/iptables-1.4.20[ipv6] |
148 |
- >=sys-apps/iproute2-3.8.0[ipv6] |
149 |
- ) |
150 |
- lite6? ( |
151 |
- >=net-firewall/iptables-1.4.20[ipv6] |
152 |
- >=sys-apps/iproute2-3.8.0[ipv6] |
153 |
- ) |
154 |
- init? ( >=sys-apps/coreutils-8.20 ) |
155 |
- selinux? ( >=sec-policy/selinux-shorewall-2.20161023-r3 ) |
156 |
- !net-firewall/shorewall-core |
157 |
- !net-firewall/shorewall6 |
158 |
- !net-firewall/shorewall-lite |
159 |
- !net-firewall/shorewall6-lite |
160 |
- !net-firewall/shorewall-init |
161 |
- !<sys-apps/systemd-214 |
162 |
-" |
163 |
- |
164 |
-S=${WORKDIR} |
165 |
- |
166 |
-pkg_pretend() { |
167 |
- local CONFIG_CHECK="~NF_CONNTRACK" |
168 |
- |
169 |
- local WARNING_CONNTRACK="Without NF_CONNTRACK support, you will be unable" |
170 |
- local WARNING_CONNTRACK+=" to run any shorewall-based firewall on the local system." |
171 |
- |
172 |
- # kernel >=4.19 has unified NF_CONNTRACK module, bug 671176 |
173 |
- if kernel_is -lt 4 19; then |
174 |
- if use ipv4 || use lite4; then |
175 |
- CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV4" |
176 |
- |
177 |
- local WARNING_CONNTRACK_IPV4="Without NF_CONNTRACK_IPV4 support, you will" |
178 |
- local WARNING_CONNTRACK_IPV4+=" be unable to run any shorewall-based IPv4 firewall on the local system." |
179 |
- fi |
180 |
- |
181 |
- if use ipv6 || use lite6; then |
182 |
- CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV6" |
183 |
- |
184 |
- local WARNING_CONNTRACK_IPV6="Without NF_CONNTRACK_IPV6 support, you will" |
185 |
- local WARNING_CONNTRACK_IPV6+=" be unable to run any shorewall-based IPv6 firewall on the local system." |
186 |
- fi |
187 |
- fi |
188 |
- |
189 |
- check_extra_config |
190 |
-} |
191 |
- |
192 |
-pkg_setup() { |
193 |
- if [[ -n "${DIGEST}" ]]; then |
194 |
- einfo "Unsetting environment variable \"DIGEST\" to prevent conflicts with package's \"install.sh\" script ..." |
195 |
- unset DIGEST |
196 |
- fi |
197 |
-} |
198 |
- |
199 |
-src_prepare() { |
200 |
- # We are moving each unpacked source from MY_P_* to MY_PN_*. |
201 |
- # This allows us to use patches from upstream and keeps epatch_user working |
202 |
- |
203 |
- einfo "Preparing shorewallrc ..." |
204 |
- cp "${FILESDIR}"/shorewallrc-r3 "${S}"/shorewallrc.gentoo || die "Copying shorewallrc failed" |
205 |
- eprefixify "${S}"/shorewallrc.gentoo |
206 |
- sed -i \ |
207 |
- -e "s|SERVICEDIR=tbs|SERVICEDIR=$(systemd_get_systemunitdir)|" \ |
208 |
- "${S}"/shorewallrc.gentoo || die "Failed to update shorewallrc" |
209 |
- |
210 |
- # shorewall-core |
211 |
- mv "${S}"/${MY_P_CORE} "${S}"/${MY_PN_CORE} || die "Failed to move '${S}/${MY_P_CORE}' to '${S}/${MY_PN_CORE}'" |
212 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_CORE} ..." |
213 |
- ln -s ../shorewallrc.gentoo ${MY_PN_CORE}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
214 |
- eend 0 |
215 |
- |
216 |
- pushd "${S}"/${MY_PN_CORE} &>/dev/null || die |
217 |
- eapply "${FILESDIR}"/shorewall-core-5.2.1-no-gzipped-manpages.patch |
218 |
- popd &>/dev/null || die |
219 |
- |
220 |
- # shorewall |
221 |
- if use ipv4; then |
222 |
- mv "${S}"/${MY_P_IPV4} "${S}"/${MY_PN_IPV4} || die "Failed to move '${S}/${MY_P_IPV4}' to '${S}/${MY_PN_IPV4}'" |
223 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_IPV4}" |
224 |
- ln -s ../shorewallrc.gentoo ${MY_PN_IPV4}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
225 |
- cp "${FILESDIR}"/shorewall.confd-r1 "${S}"/${MY_PN_IPV4}/default.gentoo || die "Copying shorewall.confd-r1 failed" |
226 |
- cp "${FILESDIR}"/shorewall.initd-r3 "${S}"/${MY_PN_IPV4}/init.gentoo.sh || die "Copying shorewall.initd-r2 failed" |
227 |
- cp "${FILESDIR}"/shorewall.systemd "${S}"/${MY_PN_IPV4}/gentoo.service || die "Copying shorewall.systemd failed" |
228 |
- eend 0 |
229 |
- |
230 |
- pushd "${S}"/${MY_PN_IPV4} &>/dev/null || die |
231 |
- eapply "${FILESDIR}"/shorewall-5.2.1-no-gzipped-manpages.patch |
232 |
- popd &>/dev/null || die |
233 |
- fi |
234 |
- |
235 |
- # shorewall6 |
236 |
- if use ipv6; then |
237 |
- mv "${S}"/${MY_P_IPV6} "${S}"/${MY_PN_IPV6} || die "Failed to move '${S}/${MY_P_IPV6}' to '${S}/${MY_PN_IPV6}'" |
238 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_IPV6}" |
239 |
- ln -s ../shorewallrc.gentoo ${MY_PN_IPV6}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
240 |
- cp "${FILESDIR}"/shorewall.confd-r1 "${S}"/${MY_PN_IPV6}/default.gentoo || die "Copying shorewall.confd-r1 failed" |
241 |
- cp "${FILESDIR}"/shorewall.initd-r3 "${S}"/${MY_PN_IPV6}/init.gentoo.sh || die "Copying shorewall.initd-r2 failed" |
242 |
- cp "${FILESDIR}"/shorewall6.systemd "${S}"/${MY_PN_IPV6}/gentoo.service || die "Copying shorewall6.systemd failed" |
243 |
- eend 0 |
244 |
- |
245 |
- pushd "${S}"/${MY_PN_IPV6} &>/dev/null || die |
246 |
- eapply "${FILESDIR}"/shorewall-5.2.1-no-gzipped-manpages.patch |
247 |
- popd &>/dev/null || die |
248 |
- fi |
249 |
- |
250 |
- # shorewall-lite |
251 |
- if use lite4; then |
252 |
- mv "${S}"/${MY_P_LITE4} "${S}"/${MY_PN_LITE4} || die "Failed to move '${S}/${MY_P_LITE4}' to '${S}/${MY_PN_LITE4}'" |
253 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_LITE4}" |
254 |
- ln -s ../shorewallrc.gentoo ${MY_PN_LITE4}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
255 |
- cp "${FILESDIR}"/shorewall-lite.confd-r1 "${S}"/${MY_PN_LITE4}/default.gentoo || die "Copying shorewall-lite.confd-r1 failed" |
256 |
- cp "${FILESDIR}"/shorewall-lite.initd-r3 "${S}"/${MY_PN_LITE4}/init.gentoo.sh || die "Copying shorewall-lite.initd-r2 failed" |
257 |
- cp "${FILESDIR}"/shorewall-lite.systemd "${S}"/${MY_PN_LITE4}/gentoo.service || die "Copying shorewall-lite.systemd failed" |
258 |
- eend 0 |
259 |
- |
260 |
- pushd "${S}"/${MY_PN_LITE4} &>/dev/null || die |
261 |
- eapply "${FILESDIR}"/shorewall-lite-5.2.1-no-gzipped-manpages.patch |
262 |
- popd &>/dev/null || die |
263 |
- fi |
264 |
- |
265 |
- # shorewall6-lite |
266 |
- if use lite6; then |
267 |
- mv "${S}"/${MY_P_LITE6} "${S}"/${MY_PN_LITE6} || die "Failed to move '${S}/${MY_P_LITE6}' to '${S}/${MY_PN_LITE6}'" |
268 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_LITE6}" |
269 |
- ln -s ../shorewallrc.gentoo ${MY_PN_LITE6}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
270 |
- cp "${FILESDIR}"/shorewall-lite.confd-r1 "${S}"/${MY_PN_LITE6}/default.gentoo || die "Copying shorewall-lite.confd-r1 failed" |
271 |
- cp "${FILESDIR}"/shorewall-lite.initd-r3 "${S}"/${MY_PN_LITE6}/init.gentoo.sh || die "Copying shorewall-lite.initd-r2 failed" |
272 |
- cp "${FILESDIR}"/shorewall6-lite.systemd "${S}"/${MY_PN_LITE6}/gentoo.service || die "Copying shorewall6-lite.systemd failed" |
273 |
- eend 0 |
274 |
- |
275 |
- pushd "${S}"/${MY_PN_LITE6} &>/dev/null || die |
276 |
- eapply "${FILESDIR}"/shorewall-lite-5.2.1-no-gzipped-manpages.patch |
277 |
- popd &>/dev/null || die |
278 |
- fi |
279 |
- |
280 |
- # shorewall-init |
281 |
- if use init; then |
282 |
- mv "${S}"/${MY_P_INIT} "${S}"/${MY_PN_INIT} || die "Failed to move '${S}/${MY_P_INIT}' to '${S}/${MY_PN_INIT}'" |
283 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_INIT}" |
284 |
- ln -s ../shorewallrc.gentoo ${MY_PN_INIT}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
285 |
- cp "${FILESDIR}"/shorewall-init.confd "${S}"/${MY_PN_INIT}/default.gentoo || die "Copying shorewall-init.confd failed" |
286 |
- cp "${FILESDIR}"/shorewall-init.initd "${S}"/${MY_PN_INIT}/init.gentoo.sh || die "Copying shorewall-init.initd failed" |
287 |
- cp "${FILESDIR}"/shorewall-init.systemd "${S}"/${MY_PN_INIT}/gentoo.service || die "Copying shorewall-init.systemd failed" |
288 |
- cp "${FILESDIR}"/shorewall-init.readme "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt || die "Copying shorewall-init.systemd failed" |
289 |
- eend 0 |
290 |
- |
291 |
- eprefixify "${S}"/${MY_PN_INIT}/init.gentoo.sh |
292 |
- |
293 |
- pushd "${S}"/${MY_PN_INIT} &>/dev/null || die |
294 |
- eapply -p2 "${FILESDIR}"/shorewall-init-01_remove-ipset-functionality-r2.patch |
295 |
- popd &>/dev/null || die |
296 |
- fi |
297 |
- |
298 |
- # shorewall-docs-html |
299 |
- if use doc; then |
300 |
- mv "${S}"/${MY_P_DOCS} "${S}"/${MY_PN_DOCS} || die "Failed to move '${S}/${MY_P_DOCS}' to '${S}/${MY_PN_DOCS}'" |
301 |
- fi |
302 |
- |
303 |
- eapply_user |
304 |
-} |
305 |
- |
306 |
-src_configure() { |
307 |
- :; |
308 |
-} |
309 |
- |
310 |
-src_compile() { |
311 |
- :; |
312 |
-} |
313 |
- |
314 |
-src_install() { |
315 |
- # shorewall-core |
316 |
- einfo "Installing ${MY_P_CORE} ..." |
317 |
- DESTDIR="${ED}" ${MY_PN_CORE}/install.sh shorewallrc.gentoo || die "${MY_PN_CORE}/install.sh failed" |
318 |
- dodoc "${S}"/${MY_PN_CORE}/changelog.txt "${S}"/${MY_PN_CORE}/releasenotes.txt |
319 |
- |
320 |
- # shorewall |
321 |
- if use ipv4; then |
322 |
- einfo "Installing ${MY_P_IPV4} ..." |
323 |
- DESTDIR="${ED}" ${MY_PN_IPV4}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV4}/install.sh failed" |
324 |
- keepdir /var/lib/shorewall |
325 |
- |
326 |
- if use doc; then |
327 |
- dodoc -r "${S}"/${MY_PN_IPV4}/Samples |
328 |
- fi |
329 |
- fi |
330 |
- |
331 |
- # shorewall6 |
332 |
- if use ipv6; then |
333 |
- einfo "Installing ${MY_P_IPV6} ..." |
334 |
- DESTDIR="${ED}" ${MY_PN_IPV6}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV6}/install.sh failed" |
335 |
- keepdir /var/lib/shorewall6 |
336 |
- |
337 |
- if use doc; then |
338 |
- dodoc -r "${S}"/${MY_PN_IPV6}/Samples6 |
339 |
- fi |
340 |
- fi |
341 |
- |
342 |
- # shorewall-lite |
343 |
- if use lite4; then |
344 |
- einfo "Installing ${MY_P_LITE4} ..." |
345 |
- DESTDIR="${ED}" ${MY_PN_LITE4}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE4}/install.sh failed" |
346 |
- keepdir /var/lib/shorewall-lite |
347 |
- fi |
348 |
- |
349 |
- # shorewall6-lite |
350 |
- if use lite6; then |
351 |
- einfo "Installing ${MY_P_LITE6} ..." |
352 |
- DESTDIR="${ED}" ${MY_PN_LITE6}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE6}/install.sh failed" |
353 |
- keepdir /var/lib/shorewall6-lite |
354 |
- fi |
355 |
- |
356 |
- # shorewall-init |
357 |
- if use init; then |
358 |
- einfo "Installing ${MY_P_INIT} ..." |
359 |
- DESTDIR="${ED}" ${MY_PN_INIT}/install.sh shorewallrc.gentoo || die "${MY_PN_INIT}/install.sh failed" |
360 |
- dodoc "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt |
361 |
- |
362 |
- if [[ -f "${ED}/etc/logrotate.d/shorewall-init" ]]; then |
363 |
- # On Gentoo, shorewall-init will not create shorewall-ifupdown.log, |
364 |
- # so we don't need a logrotate configuration file for shorewall-init |
365 |
- einfo "Removing unused \"${ED}/etc/logrotate.d/shorewall-init\" ..." |
366 |
- rm -rf "${ED}"/etc/logrotate.d/shorewall-init || die "Removing \"${ED}/etc/logrotate.d/shorewall-init\" failed" |
367 |
- fi |
368 |
- |
369 |
- if [[ -d "${ED}/etc/NetworkManager" ]]; then |
370 |
- # On Gentoo, we don't support NetworkManager |
371 |
- # so we don't need this folder at all |
372 |
- einfo "Removing unused \"${ED}/etc/NetworkManager\" ..." |
373 |
- rm -rf "${ED}"/etc/NetworkManager || die "Removing \"${ED}/etc/NetworkManager\" failed" |
374 |
- fi |
375 |
- |
376 |
- if [[ -f "${ED}/usr/share/shorewall-init/ifupdown" ]]; then |
377 |
- # This script isn't supported on Gentoo |
378 |
- rm -rf "${ED}"/usr/share/shorewall-init/ifupdown || die "Removing \"${ED}/usr/share/shorewall-init/ifupdown\" failed" |
379 |
- fi |
380 |
- fi |
381 |
- |
382 |
- if use doc; then |
383 |
- einfo "Installing ${MY_P_DOCS} ..." |
384 |
- docinto html && dodoc -r "${S}"/${MY_PN_DOCS}/* |
385 |
- fi |
386 |
-} |
387 |
- |
388 |
-pkg_postinst() { |
389 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
390 |
- # This is a new installation |
391 |
- |
392 |
- # Show first steps for shorewall/shorewall6 |
393 |
- local _PRODUCTS="" |
394 |
- if use ipv4; then |
395 |
- _PRODUCTS="shorewall" |
396 |
- |
397 |
- if use ipv6; then |
398 |
- _PRODUCTS="${_PRODUCTS}/shorewall6" |
399 |
- fi |
400 |
- fi |
401 |
- |
402 |
- if [[ -n "${_PRODUCTS}" ]]; then |
403 |
- elog "Before you can use ${_PRODUCTS}, you need to edit its configuration in:" |
404 |
- elog "" |
405 |
- elog " /etc/shorewall/shorewall.conf" |
406 |
- |
407 |
- if use ipv6; then |
408 |
- elog " /etc/shorewall6/shorewall6.conf" |
409 |
- fi |
410 |
- |
411 |
- elog "" |
412 |
- elog "To activate your shorewall-based firewall on system start, please add ${_PRODUCTS} to your default runlevel:" |
413 |
- elog "" |
414 |
- elog " # rc-update add shorewall default" |
415 |
- |
416 |
- if use ipv6; then |
417 |
- elog " # rc-update add shorewall6 default" |
418 |
- fi |
419 |
- fi |
420 |
- |
421 |
- # Show first steps for shorewall-lite/shorewall6-lite |
422 |
- _PRODUCTS="" |
423 |
- if use lite4; then |
424 |
- _PRODUCTS="shorewall-lite" |
425 |
- fi |
426 |
- |
427 |
- if use lite6; then |
428 |
- if [[ -z "${_PRODUCTS}" ]]; then |
429 |
- _PRODUCTS="shorewall6-lite" |
430 |
- else |
431 |
- _PRODUCTS="${_PRODUCTS}/shorewall6-lite" |
432 |
- fi |
433 |
- fi |
434 |
- |
435 |
- if [[ -n "${_PRODUCTS}" ]]; then |
436 |
- if use ipv4; then |
437 |
- elog "" |
438 |
- fi |
439 |
- |
440 |
- elog "Before you can use ${_PRODUCTS}, you need to provide a configuration, which you can" |
441 |
- elog "create using ${CATEGORY}/shorewall (with \"ipv4\" and or \"ipv6\" USE flag)." |
442 |
- elog "" |
443 |
- elog "To read more about ${_PRODUCTS}, please visit" |
444 |
- elog " https://shorewall.org/CompiledPrograms.html" |
445 |
- elog "" |
446 |
- elog "To activate your shorewall-lite-based firewall on system start, please add ${PRODUCTS} to your default runlevel:" |
447 |
- elog "" |
448 |
- |
449 |
- if use lite4; then |
450 |
- elog " # rc-update add shorewall-lite default" |
451 |
- fi |
452 |
- |
453 |
- if use lite6; then |
454 |
- elog " # rc-update add shorewall6-lite default" |
455 |
- fi |
456 |
- fi |
457 |
- |
458 |
- if use init; then |
459 |
- elog "" |
460 |
- elog "To secure your system on boot, please add shorewall-init to your boot runlevel:" |
461 |
- elog "" |
462 |
- elog " # rc-update add shorewall-init boot" |
463 |
- elog "" |
464 |
- elog "and review \$PRODUCTS in" |
465 |
- elog "" |
466 |
- elog " /etc/conf.d/shorewall-init" |
467 |
- fi |
468 |
- |
469 |
- fi |
470 |
- |
471 |
- local v |
472 |
- for v in ${REPLACING_VERSIONS}; do |
473 |
- if ! version_is_at_least ${MY_MAJOR_RELEASE_NUMBER} ${v}; then |
474 |
- # This is an upgrade |
475 |
- |
476 |
- elog "You are upgrading from a previous major version. It is highly recommended that you read" |
477 |
- elog "" |
478 |
- elog " - /usr/share/doc/shorewall*/releasenotes.tx*" |
479 |
- elog " - https://shorewall.org/Shorewall-5.html#idm214" |
480 |
- |
481 |
- if use ipv4; then |
482 |
- elog "" |
483 |
- elog "You can auto-migrate your configuration using" |
484 |
- elog "" |
485 |
- elog " # shorewall update -A" |
486 |
- |
487 |
- if use ipv6; then |
488 |
- elog " # shorewall6 update -A" |
489 |
- fi |
490 |
- |
491 |
- elog "" |
492 |
- elog "*after* you have merged the changed files using one of the configuration" |
493 |
- elog "files update tools of your choice (dispatch-conf, etc-update...)." |
494 |
- |
495 |
- elog "" |
496 |
- elog "But if you are not familiar with the \"shorewall[6] update\" command," |
497 |
- elog "please read the shorewall[6] man page first." |
498 |
- fi |
499 |
- |
500 |
- # Show this elog only once |
501 |
- break |
502 |
- fi |
503 |
- done |
504 |
- |
505 |
- if ! use init; then |
506 |
- elog "" |
507 |
- elog "Consider emerging ${CATEGORY}/${PN} with USE flag \"init\" to secure your system on boot" |
508 |
- elog "before your shorewall-based firewall is ready to start." |
509 |
- elog "" |
510 |
- elog "To read more about shorewall-init, please visit" |
511 |
- elog " https://shorewall.org/Shorewall-init.html" |
512 |
- fi |
513 |
- |
514 |
- if ! has_version "net-firewall/conntrack-tools"; then |
515 |
- elog "" |
516 |
- elog "Your Shorewall firewall can utilize \"conntrack\" from the \"net-firewall/conntrack-tools\"" |
517 |
- elog "package. if you want to use this feature, you need to install \"net-firewall/conntrack-tools\"!" |
518 |
- fi |
519 |
- |
520 |
- if ! has_version "dev-perl/Devel-NYTProf"; then |
521 |
- elog "" |
522 |
- elog "If you want to profile your Shorewall firewall you need to install \"dev-perl/Devel-NYTProf\"!" |
523 |
- fi |
524 |
-} |