1 |
commit: 549223ae6cd311fd1af24890129545f6e3781e0d |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 29 14:58:00 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 29 14:58:00 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=549223ae |
7 |
|
8 |
net-firewall/shorewall: drop old |
9 |
|
10 |
Package-Manager: Portage-2.3.103, Repoman-2.3.23 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
net-firewall/shorewall/Manifest | 7 - |
14 |
net-firewall/shorewall/shorewall-5.2.5.ebuild | 482 -------------------------- |
15 |
2 files changed, 489 deletions(-) |
16 |
|
17 |
diff --git a/net-firewall/shorewall/Manifest b/net-firewall/shorewall/Manifest |
18 |
index 60416d51e98..5931599e3d8 100644 |
19 |
--- a/net-firewall/shorewall/Manifest |
20 |
+++ b/net-firewall/shorewall/Manifest |
21 |
@@ -1,14 +1,7 @@ |
22 |
DIST shorewall-5.2.5.1.tar.bz2 582482 BLAKE2B 6ee3c5a6dc80e9b42ced41eaab36c9ee4fc9f2c6853a17a7dc85f162a8abfdfed2ccd3cec73e1101ea9aa6ce9b773aa76be5c00310dd73b130121b0de73ba77a SHA512 9313bf2effe4572d8898df5d55c461bddbc5d54bec5679af31c02cc494ecff06824d1d46d604078184bdabd7c08be07f30bf81bef2c8d19f03aac99b3525bf6f |
23 |
-DIST shorewall-5.2.5.tar.bz2 582270 BLAKE2B 6b0e883dd424ec814fb5f2dac601bd4e896c97c73ed0f2a151a054bd4b3db732aeaeb158d5bc453ca7cf3723233e429aa24f0b9908787f384e69da656fd71832 SHA512 6527fae5067bbfedd4d1fe53fb1b110fbac3f6d7f3b1abfe76be373ebb345bc238dabf3f24a8883314bf29ffc847dcd190bddc82ca64183311ba0e5544078743 |
24 |
DIST shorewall-core-5.2.5.1.tar.bz2 74648 BLAKE2B f00f2a4302361e557fbfae2fe6bfd5e82d47751a86c1ac6ebf729ead6fbe08386f570dde5ef18917ccd48d8a9a97ec467dde34fda93cde5e3d8e15977bdcfbb1 SHA512 3f1f85f388b17f6fa02fe54bbb28bf7bd36b97b14557891644caffcea11eb167a0df91964525b706f2b5eee9d8f325471f5038f6636308e4c99e8818928fdc75 |
25 |
-DIST shorewall-core-5.2.5.tar.bz2 74420 BLAKE2B ff2a6c2ead74f125785bcb2aea42948f27b88cb39d121a3ab1af1e4df6dc4ec878854499be7c385766af6245f4590c62b4dd2eb3d648b02fa4f16d3e13a302ce SHA512 9bd7e74def89cdc07987cbcbf9b8d8a69500f7b0dfc346c9fbcec6ab8cecad3c2adfcc505136ef0c2f0525345fdb6de4918dd5bd2d382bfb4773b23ce868a937 |
26 |
DIST shorewall-docs-html-5.2.5.1.tar.bz2 4310025 BLAKE2B 4ab4907eade322ec3e9e78d4c1c3c51a86f31fd8f4497d01ba0cfdeddf0294f240307f0d228b923b99d9b0f1b7444046a60a36569c04ef8d9f88043277c89bdc SHA512 a24f6dabed9a7ae9622c9a1f5be323a6c4cb7a8a5a671be3f0bb12d8d0b20ee11c8c11b3f1e8aac49a04a50f2bac6f137524b0e6edf9483a67b1eb44b3997094 |
27 |
-DIST shorewall-docs-html-5.2.5.tar.bz2 4310021 BLAKE2B 2d5704f126f6626bf2c934390552c19190fac5fd4231aaf61a2b0eadd770cad7b220d1083df2b0ab26ce8b2c1d97f5a3b0f2b083d14d3c5ce800bb6402603216 SHA512 04ae753f25371c0ce08af2cac5abd19797ec70860714e6891900a45baab0fb24d0f7c3163a5d2f5e419f1c1a8b092c164b7230b8d0c8cc4c3f53bbd0269e419b |
28 |
DIST shorewall-init-5.2.5.1.tar.bz2 39639 BLAKE2B 8c815c7ebb78c0a85cb2aac9b36e6a232c01f5ecb1fb17dd4d6b76c08746861e4e599213e553f7e2894093dc9722d61120f6f0179eda4b38fa93df4989589934 SHA512 d502b7262587b6546071083bb535f97606316c8ce592b01fe875d90b141833c9488750f864233614237b1e9412206c104f54052d7e20ff2067be8eb78acdb72b |
29 |
-DIST shorewall-init-5.2.5.tar.bz2 39405 BLAKE2B 8259b4618c3b75201e245fd414da7890a80d31535eea71358f9ed3bc9b44ad0e341c3b795f624ac8cb05e2345fac82a8831ad877abe6a9ef13a8c7889bfdcb7e SHA512 61f31287472770fe02a099bddd7a6a5fa42fb676462cb7b16975fb15c6a70fe1fbb40d4c1b714f9e8a1a4bdc0ef3d7542552b1dd780833be781dda1e8dba9879 |
30 |
DIST shorewall-lite-5.2.5.1.tar.bz2 44367 BLAKE2B 2b6f013fd13e895ac104e277eaf8abedec6a2a3f57a50becb2bce752fd0f9c679110d84634aa82a22bbc9ae2ce2ab9f9dc06a1220cb0f6949cc5da2d59524137 SHA512 6bcd0dfeddaf2bc513610cbecbe16574f2ed65958e8455d83f99486b286bd98ae9fba539b90c2a308d62b7a0eb8526e7af8ef3d0190f3e5ffcb660b3cdd3c769 |
31 |
-DIST shorewall-lite-5.2.5.tar.bz2 44120 BLAKE2B 47154b9f7203f5bff279c2e936dd0fe108bcb44bc9dd43abb49dc0c129a54ea381fff71b1dc3ac55e026b4065d8d5ab48edb1dcf52845e5e5f88492a958f4451 SHA512 41e6de25b2b10452bd15c465df5ffaf21019059f511197a6d398af086bba55f80b21b6644747fb2c228414a1e8af381ef5c4174b8e4defc72389664e971a85d3 |
32 |
DIST shorewall6-5.2.5.1.tar.bz2 201672 BLAKE2B 9759de6ddf0025175293f04b62ad7aa9c2a9a18d7d1e713fdcc9f859cbb1585207e8822988b91868d706698950cede5e03bc17c44a1983655fc809d330d3fb37 SHA512 c1168a609373b27db194a8eea2a934b7302fd4e3caa583d7527530426968ae5fc81510f2943a1ba1bb14c6edf7f50081841227f5aec337f5faaa54ff83f99b66 |
33 |
-DIST shorewall6-5.2.5.tar.bz2 201419 BLAKE2B efb1a81ee1bcee982d7cfd1bb5ee9cbae5e59e3ce47895d25332f71c1d79d2bb2421c6fca0645fe9d2d493648caab2b9c233d36fb9210e3fd6f667b89ff66671 SHA512 2b3656490209872c696966129bf4a411d050f561fd82645f494c503013a755854833cdbedfd6bdb971abb974988d11b1c4e29e62d431a4d67bba74822f579692 |
34 |
DIST shorewall6-lite-5.2.5.1.tar.bz2 44252 BLAKE2B 5550703689ff513283ff0656b9f845741f454df4c49e54481316a5bfca5d630b02b45f67bf689ee417b8d411824b71beffde98f6aa2977d4ae6493c0eda2225c SHA512 e5696658195c6d4f4c0953af215fe35bbbcf76532fe572b2613f490716417b042755231db80885293514f21f1b29f8c44c0497df9a7ba7b2ad16431ea7cbe7d2 |
35 |
-DIST shorewall6-lite-5.2.5.tar.bz2 44064 BLAKE2B e4667d1f1c932980d7bea03059b0aae8f83f0f3557f4245cec21aafaae72a942d47a8a355d3581cc459f85a80c10cb16af1c6e08971be2d120644098543bb3af SHA512 0c61c489f79aa51178aa733e1e738a2921c598e9403884322ccbc90461be4ee18dd0225d758371f1c750cfc832ca63652bbd8cac831e2ea026d63b72202c6f2a |
36 |
|
37 |
diff --git a/net-firewall/shorewall/shorewall-5.2.5.ebuild b/net-firewall/shorewall/shorewall-5.2.5.ebuild |
38 |
deleted file mode 100644 |
39 |
index c6f9c3e5bed..00000000000 |
40 |
--- a/net-firewall/shorewall/shorewall-5.2.5.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 |
-} |