1 |
commit: ed0c875a14ea0308fe822e13f0f80d801e968c31 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 7 13:59:32 2018 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 7 16:02:19 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed0c875a |
7 |
|
8 |
net-firewall/shorewall: drop old |
9 |
|
10 |
Package-Manager: Portage-2.3.50, Repoman-2.3.11 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
net-firewall/shorewall/Manifest | 7 - |
14 |
net-firewall/shorewall/shorewall-5.2.0.4.ebuild | 459 ------------------------ |
15 |
2 files changed, 466 deletions(-) |
16 |
|
17 |
diff --git a/net-firewall/shorewall/Manifest b/net-firewall/shorewall/Manifest |
18 |
index b53573f8835..5dc17102042 100644 |
19 |
--- a/net-firewall/shorewall/Manifest |
20 |
+++ b/net-firewall/shorewall/Manifest |
21 |
@@ -1,14 +1,7 @@ |
22 |
-DIST shorewall-5.2.0.4.tar.bz2 538938 BLAKE2B 1df68e166f5f443f120b9f45010da005b3d86a51d09c059d0886a2735c6d27c1568ae0422998f001deb48c512cb9fed23cbad423754682b06e9a4b5176b45cef SHA512 b44622972d4b4ffcde9d7da57d3994279f3962bb2d2e13892d7d77453da502527ab89cb59fb6692341b5d166cb7a3e31909df31dc21c758707eff29f3ab2c9a0 |
23 |
DIST shorewall-5.2.0.5.tar.bz2 539666 BLAKE2B df4f8680ee29a773f584a1210b40a7047be1a590490a01617b26b71840e488f569ebcf268ba2f6199fb10671925356c4e187a5219ed7784672f6d14b2e90f580 SHA512 8299e0f40ad96c09eceb9460c6088e694e50b7a1b81a16395426466c666eb21dc23236c1ee6cc6047c05ad4a4ba43aac33fc7cb05f5784bf27ac81e5fa4e9059 |
24 |
-DIST shorewall-core-5.2.0.4.tar.bz2 76022 BLAKE2B 58602e01f7a7b6e6853c847fa38bfff2fbeb57ea68ffd124f9e556b0137bef65bfe25c8b7c70f0d6fc7b21dab7e82401985a08f0a1a8c4ca6159cbfd1862712c SHA512 bfd21f249fa3b7a952bf9aeead91eac0f7db6c2f3c386e9d2aca9645916b8a799ce58ac7b6edb93d0b934d224824f9cd94b8db63a0b35a260051209613561bf4 |
25 |
DIST shorewall-core-5.2.0.5.tar.bz2 76567 BLAKE2B 078520ef3166d689d559f1c08ae417a2bf5c7fdc3618a26f72b244fa14679634752dffaeebafbd84609e33ec7f1856b701abb297077797abcb14d3264a3bfd25 SHA512 640c854a7484e886cd603742d16682456e02c0054c3d6d5f2188bf30e235ac975fc1ce50af500cf4fb99253a1d13c2408cc72aff54f14aa738e1e80b8d07066a |
26 |
-DIST shorewall-docs-html-5.2.0.4.tar.bz2 4294681 BLAKE2B b6e975ddefae5dc7fd0a9be58c6fd231e828ed8e18e2405202766068b37796c075785c2cc05f25bc9decc50fbdfc01bad8d8f929b90592aa2e8cc040719e3cf1 SHA512 2685161f9d25cf745831f603129c4e9a33a264118698392f589e481a76bcb082dad14c9be6dc57c29441eb9807d842e5f08b3483e1e03099f0059f10ea907d91 |
27 |
DIST shorewall-docs-html-5.2.0.5.tar.bz2 4295236 BLAKE2B 8cef99b3535551e1d4ecdf0d3d1c2b3434c0b91c793f0857bc3f22f0020d80cd49b038c7c4f5d15fe23af14869f1736a69b01978403fe94bc5dac261bd2f5e4d SHA512 5fa3ab52580e8f090ab0be9b1796bef65a41d1a9dc5c9501e3daeba22bad7b28b5306aba5b383c654eed5f7d727a7744812034eeb1ad051633a80b2892096c24 |
28 |
-DIST shorewall-init-5.2.0.4.tar.bz2 30526 BLAKE2B a8ac5bf7e650a58d87b608321e0ed40d8b73ed675d5b5b64ff5859149f04aca507d7a83ff6ca9c7801c84fb416d22fdc930199731a9134ef529b29cf1ec01a67 SHA512 c4e2bcf5a2f7b8fae30773a930ac7433cc8678f7bb52958ecd92a4ce5f0a78041e45578bd47e01ad72fe9fc1a3cbcda2995bd9379cc90917a31b3f676c12beb6 |
29 |
DIST shorewall-init-5.2.0.5.tar.bz2 30881 BLAKE2B 92617f17553b6df514cbfc72e86597e9859baa641782848763923ff4c650915cd7fb97f0c71b41d525d6a9d5ebbf10e9918d6a8d682c9c4654de3ba40b54c0ce SHA512 0367ad7468d5a9c0c70d31fdd66c05e54cf747dd45dc1bf2e128935c65af8c2508f033ed2945185059214dd81f5a8fb3f122323fd2bb79d2d642997741167371 |
30 |
-DIST shorewall-lite-5.2.0.4.tar.bz2 36307 BLAKE2B ad95e4f640ae1f05936dd5dbc87e4acaf6dd576bd6704f650c8bfdc437284f0c121563427f89dbe5de4e19f543f3e182ff0d5a333da8c8416aae24994ac52ed0 SHA512 55bb514d9446c953de0453b8016105ed2471420d2ca6346cbd986f03cec5e713a1d27d5e08ddc6cf54cd6e5f936cf9a826eac622596480374929f41c062e8803 |
31 |
DIST shorewall-lite-5.2.0.5.tar.bz2 36651 BLAKE2B 192ecda8b04d0330f0a7bced6136f2723d201cd7c30af80b59bfa81f49614d10c900cf5856296ad854287f3c925e5f78f144698674ec7b8d91065072db4ca53e SHA512 b95154f7614eeedde1fc087750372cadd0c0a9618986741e035a9d83c06d2534feb78edaf6a97e2a45788015e6706f8dac3714ca3b22bd068e792458a3f5af40 |
32 |
-DIST shorewall6-5.2.0.4.tar.bz2 186267 BLAKE2B 4076c94596e462d4f150d734700d400db90ca1d0bd788152e5421d581890cf28d7e6546d2ac0c604625cdf25771415229b2a3324153ec5439cddfcab73464ae5 SHA512 e8989b5c6fcc1162f42e884cdb0fff47baed61b69c39b8bbdaf78b246f95ee0bf6690fce3a6ae14eff2bf48d64b762b170d67462dc685f594dfd70a2e3720a01 |
33 |
DIST shorewall6-5.2.0.5.tar.bz2 185740 BLAKE2B 846a3fc44a9c0a838cf75671ca34e78dd9758eeee0690d994a34615467b241f0c854e3bb9b818bcfd5e96664ab03e14a7c69affc946dffd1357ad744da41f8d5 SHA512 6875074ed8ee5bce40253a6e2633c422d7c2c1bf860a072236d6197cfe949e455b511a1792d822a8f2351254e99880236267ce70fc1150ca68e87f962b6cc265 |
34 |
-DIST shorewall6-lite-5.2.0.4.tar.bz2 36035 BLAKE2B edbdee2b979c0d2144e358b6e8b52808578923498c0da4f906ed6aa8460153879dd5f8b4cf98da4bcecc90a6a776d39ef17492881c093a018ccdc5b86e0c0bab SHA512 c212ba3f6bacab1b26bbc5c13a2bac2f1f796c7fa3d442f398c91ff367f242a9562ff2191b9b678e82d07a96c2dc39a0109d30417154e6cfd4f2c4c6e31b616f |
35 |
DIST shorewall6-lite-5.2.0.5.tar.bz2 36370 BLAKE2B 212cee0313c3bbf08c8d22893c5b62125d0362eb66218dc954bc05d0e082fdb4dab209a05948300394943dcd97f698c1e02310ec54cc88fb72bd24d4383776f7 SHA512 18bcbaf3bd56aaadb8d42610d4868278f42299e5a022ac5732f730b34ed7d97f7cd013f1c9374f0a6afc809250288490d94d2b4e02e4bf5edf2542bff99150e4 |
36 |
|
37 |
diff --git a/net-firewall/shorewall/shorewall-5.2.0.4.ebuild b/net-firewall/shorewall/shorewall-5.2.0.4.ebuild |
38 |
deleted file mode 100644 |
39 |
index 041ddab407e..00000000000 |
40 |
--- a/net-firewall/shorewall/shorewall-5.2.0.4.ebuild |
41 |
+++ /dev/null |
42 |
@@ -1,459 +0,0 @@ |
43 |
-# Copyright 1999-2018 Gentoo Foundation |
44 |
-# Distributed under the terms of the GNU General Public License v2 |
45 |
- |
46 |
-EAPI="6" |
47 |
- |
48 |
-inherit linux-info prefix systemd versionator |
49 |
- |
50 |
-DESCRIPTION='A high-level tool for configuring Netfilter' |
51 |
-HOMEPAGE="http://www.shorewall.net/" |
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=$(get_version_component_range 1-2) |
61 |
-MY_MAJORMINOR_RELEASE_NUMBER=$(get_version_component_range 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 |
- _tmp_last_index=$(($(get_last_version_component_index ${MY_PV})+1)) |
102 |
- _tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${MY_PV}) |
103 |
- if [[ ${_tmp_suffix} = *Beta* ]] || [[ ${_tmp_suffix} = *RC* ]]; then |
104 |
- MY_URL_SUFFIX="-${_tmp_suffix}" |
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 |
- http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-core-${MY_PV}.tar.bz2 |
116 |
- ipv4? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-${MY_PV}.tar.bz2 ) |
117 |
- ipv6? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall6-${MY_PV}.tar.bz2 ) |
118 |
- lite4? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-lite-${MY_PV}.tar.bz2 ) |
119 |
- lite6? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall6-lite-${MY_PV}.tar.bz2 ) |
120 |
- init? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-init-${MY_PV}.tar.bz2 ) |
121 |
- doc? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/${MY_P_DOCS}.tar.bz2 ) |
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 http://shorewall.net/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 |
- if use ipv4 || use lite4; then |
173 |
- CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV4" |
174 |
- |
175 |
- local WARNING_CONNTRACK_IPV4="Without NF_CONNTRACK_IPV4 support, you will" |
176 |
- local WARNING_CONNTRACK_IPV4+=" be unable to run any shorewall-based IPv4 firewall on the local system." |
177 |
- fi |
178 |
- |
179 |
- if use ipv6 || use lite6; then |
180 |
- CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV6" |
181 |
- |
182 |
- local WARNING_CONNTRACK_IPV6="Without NF_CONNTRACK_IPV6 support, you will" |
183 |
- local WARNING_CONNTRACK_IPV6+=" be unable to run any shorewall-based IPv6 firewall on the local system." |
184 |
- fi |
185 |
- |
186 |
- check_extra_config |
187 |
-} |
188 |
- |
189 |
-pkg_setup() { |
190 |
- if [[ -n "${DIGEST}" ]]; then |
191 |
- einfo "Unsetting environment variable \"DIGEST\" to prevent conflicts with package's \"install.sh\" script ..." |
192 |
- unset DIGEST |
193 |
- fi |
194 |
-} |
195 |
- |
196 |
-src_prepare() { |
197 |
- # We are moving each unpacked source from MY_P_* to MY_PN_*. |
198 |
- # This allows us to use patches from upstream and keeps epatch_user working |
199 |
- |
200 |
- einfo "Preparing shorewallrc ..." |
201 |
- cp "${FILESDIR}"/shorewallrc-r3 "${S}"/shorewallrc.gentoo || die "Copying shorewallrc failed" |
202 |
- eprefixify "${S}"/shorewallrc.gentoo |
203 |
- sed -i \ |
204 |
- -e "s|SERVICEDIR=tbs|SERVICEDIR=$(systemd_get_systemunitdir)|" \ |
205 |
- "${S}"/shorewallrc.gentoo || die "Failed to update shorewallrc" |
206 |
- |
207 |
- # shorewall-core |
208 |
- mv "${S}"/${MY_P_CORE} "${S}"/${MY_PN_CORE} || die "Failed to move '${S}/${MY_P_CORE}' to '${S}/${MY_PN_CORE}'" |
209 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_CORE} ..." |
210 |
- ln -s ../shorewallrc.gentoo ${MY_PN_CORE}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
211 |
- eend 0 |
212 |
- |
213 |
- # shorewall |
214 |
- if use ipv4; then |
215 |
- mv "${S}"/${MY_P_IPV4} "${S}"/${MY_PN_IPV4} || die "Failed to move '${S}/${MY_P_IPV4}' to '${S}/${MY_PN_IPV4}'" |
216 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_IPV4}" |
217 |
- ln -s ../shorewallrc.gentoo ${MY_PN_IPV4}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
218 |
- cp "${FILESDIR}"/shorewall.confd-r1 "${S}"/${MY_PN_IPV4}/default.gentoo || die "Copying shorewall.confd-r1 failed" |
219 |
- cp "${FILESDIR}"/shorewall.initd-r3 "${S}"/${MY_PN_IPV4}/init.gentoo.sh || die "Copying shorewall.initd-r2 failed" |
220 |
- cp "${FILESDIR}"/shorewall.systemd "${S}"/${MY_PN_IPV4}/gentoo.service || die "Copying shorewall.systemd failed" |
221 |
- eend 0 |
222 |
- fi |
223 |
- |
224 |
- # shorewall6 |
225 |
- if use ipv6; then |
226 |
- mv "${S}"/${MY_P_IPV6} "${S}"/${MY_PN_IPV6} || die "Failed to move '${S}/${MY_P_IPV6}' to '${S}/${MY_PN_IPV6}'" |
227 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_IPV6}" |
228 |
- ln -s ../shorewallrc.gentoo ${MY_PN_IPV6}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
229 |
- cp "${FILESDIR}"/shorewall.confd-r1 "${S}"/${MY_PN_IPV6}/default.gentoo || die "Copying shorewall.confd-r1 failed" |
230 |
- cp "${FILESDIR}"/shorewall.initd-r3 "${S}"/${MY_PN_IPV6}/init.gentoo.sh || die "Copying shorewall.initd-r2 failed" |
231 |
- cp "${FILESDIR}"/shorewall6.systemd "${S}"/${MY_PN_IPV6}/gentoo.service || die "Copying shorewall6.systemd failed" |
232 |
- eend 0 |
233 |
- fi |
234 |
- |
235 |
- # shorewall-lite |
236 |
- if use lite4; then |
237 |
- mv "${S}"/${MY_P_LITE4} "${S}"/${MY_PN_LITE4} || die "Failed to move '${S}/${MY_P_LITE4}' to '${S}/${MY_PN_LITE4}'" |
238 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_LITE4}" |
239 |
- ln -s ../shorewallrc.gentoo ${MY_PN_LITE4}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
240 |
- cp "${FILESDIR}"/shorewall-lite.confd-r1 "${S}"/${MY_PN_LITE4}/default.gentoo || die "Copying shorewall-lite.confd-r1 failed" |
241 |
- cp "${FILESDIR}"/shorewall-lite.initd-r3 "${S}"/${MY_PN_LITE4}/init.gentoo.sh || die "Copying shorewall-lite.initd-r2 failed" |
242 |
- cp "${FILESDIR}"/shorewall-lite.systemd "${S}"/${MY_PN_LITE4}/gentoo.service || die "Copying shorewall-lite.systemd failed" |
243 |
- eend 0 |
244 |
- fi |
245 |
- |
246 |
- # shorewall6-lite |
247 |
- if use lite6; then |
248 |
- mv "${S}"/${MY_P_LITE6} "${S}"/${MY_PN_LITE6} || die "Failed to move '${S}/${MY_P_LITE6}' to '${S}/${MY_PN_LITE6}'" |
249 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_LITE6}" |
250 |
- ln -s ../shorewallrc.gentoo ${MY_PN_LITE6}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
251 |
- cp "${FILESDIR}"/shorewall-lite.confd-r1 "${S}"/${MY_PN_LITE6}/default.gentoo || die "Copying shorewall-lite.confd-r1 failed" |
252 |
- cp "${FILESDIR}"/shorewall-lite.initd-r3 "${S}"/${MY_PN_LITE6}/init.gentoo.sh || die "Copying shorewall-lite.initd-r2 failed" |
253 |
- cp "${FILESDIR}"/shorewall6-lite.systemd "${S}"/${MY_PN_LITE6}/gentoo.service || die "Copying shorewall6-lite.systemd failed" |
254 |
- eend 0 |
255 |
- fi |
256 |
- |
257 |
- # shorewall-init |
258 |
- if use init; then |
259 |
- mv "${S}"/${MY_P_INIT} "${S}"/${MY_PN_INIT} || die "Failed to move '${S}/${MY_P_INIT}' to '${S}/${MY_PN_INIT}'" |
260 |
- ebegin "Applying Gentoo-specific changes to ${MY_P_INIT}" |
261 |
- ln -s ../shorewallrc.gentoo ${MY_PN_INIT}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
262 |
- cp "${FILESDIR}"/shorewall-init.confd "${S}"/${MY_PN_INIT}/default.gentoo || die "Copying shorewall-init.confd failed" |
263 |
- cp "${FILESDIR}"/shorewall-init.initd "${S}"/${MY_PN_INIT}/init.gentoo.sh || die "Copying shorewall-init.initd failed" |
264 |
- cp "${FILESDIR}"/shorewall-init.systemd "${S}"/${MY_PN_INIT}/gentoo.service || die "Copying shorewall-init.systemd failed" |
265 |
- cp "${FILESDIR}"/shorewall-init.readme "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt || die "Copying shorewall-init.systemd failed" |
266 |
- eend 0 |
267 |
- |
268 |
- eprefixify "${S}"/${MY_PN_INIT}/init.gentoo.sh |
269 |
- |
270 |
- cd "${S}"/${MY_PN_INIT} || die |
271 |
- eapply -p2 "${FILESDIR}"/shorewall-init-01_remove-ipset-functionality-r1.patch |
272 |
- cd "${S}" || die |
273 |
- fi |
274 |
- |
275 |
- # shorewall-docs-html |
276 |
- if use doc; then |
277 |
- mv "${S}"/${MY_P_DOCS} "${S}"/${MY_PN_DOCS} || die "Failed to move '${S}/${MY_P_DOCS}' to '${S}/${MY_PN_DOCS}'" |
278 |
- fi |
279 |
- |
280 |
- eapply_user |
281 |
-} |
282 |
- |
283 |
-src_configure() { |
284 |
- :; |
285 |
-} |
286 |
- |
287 |
-src_compile() { |
288 |
- :; |
289 |
-} |
290 |
- |
291 |
-src_install() { |
292 |
- # shorewall-core |
293 |
- einfo "Installing ${MY_P_CORE} ..." |
294 |
- DESTDIR="${D%/}" ${MY_PN_CORE}/install.sh shorewallrc.gentoo || die "${MY_PN_CORE}/install.sh failed" |
295 |
- dodoc "${S}"/${MY_PN_CORE}/changelog.txt "${S}"/${MY_PN_CORE}/releasenotes.txt |
296 |
- |
297 |
- # shorewall |
298 |
- if use ipv4; then |
299 |
- einfo "Installing ${MY_P_IPV4} ..." |
300 |
- DESTDIR="${D%/}" ${MY_PN_IPV4}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV4}/install.sh failed" |
301 |
- keepdir /var/lib/shorewall |
302 |
- |
303 |
- if use doc; then |
304 |
- dodoc -r "${S}"/${MY_PN_IPV4}/Samples |
305 |
- fi |
306 |
- fi |
307 |
- |
308 |
- # shorewall6 |
309 |
- if use ipv6; then |
310 |
- einfo "Installing ${MY_P_IPV6} ..." |
311 |
- DESTDIR="${D%/}" ${MY_PN_IPV6}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV6}/install.sh failed" |
312 |
- keepdir /var/lib/shorewall6 |
313 |
- |
314 |
- if use doc; then |
315 |
- dodoc -r "${S}"/${MY_PN_IPV6}/Samples6 |
316 |
- fi |
317 |
- fi |
318 |
- |
319 |
- # shorewall-lite |
320 |
- if use lite4; then |
321 |
- einfo "Installing ${MY_P_LITE4} ..." |
322 |
- DESTDIR="${D%/}" ${MY_PN_LITE4}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE4}/install.sh failed" |
323 |
- keepdir /var/lib/shorewall-lite |
324 |
- fi |
325 |
- |
326 |
- # shorewall6-lite |
327 |
- if use lite6; then |
328 |
- einfo "Installing ${MY_P_LITE6} ..." |
329 |
- DESTDIR="${D%/}" ${MY_PN_LITE6}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE6}/install.sh failed" |
330 |
- keepdir /var/lib/shorewall6-lite |
331 |
- fi |
332 |
- |
333 |
- # shorewall-init |
334 |
- if use init; then |
335 |
- einfo "Installing ${MY_P_INIT} ..." |
336 |
- DESTDIR="${D%/}" ${MY_PN_INIT}/install.sh shorewallrc.gentoo || die "${MY_PN_INIT}/install.sh failed" |
337 |
- dodoc "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt |
338 |
- |
339 |
- if [[ -f "${D}etc/logrotate.d/shorewall-init" ]]; then |
340 |
- # On Gentoo, shorewall-init will not create shorewall-ifupdown.log, |
341 |
- # so we don't need a logrotate configuration file for shorewall-init |
342 |
- einfo "Removing unused \"${D}etc/logrotate.d/shorewall-init\" ..." |
343 |
- rm -rf "${D}"etc/logrotate.d/shorewall-init || die "Removing \"${D}etc/logrotate.d/shorewall-init\" failed" |
344 |
- fi |
345 |
- |
346 |
- if [[ -d "${D}etc/NetworkManager" ]]; then |
347 |
- # On Gentoo, we don't support NetworkManager |
348 |
- # so we don't need this folder at all |
349 |
- einfo "Removing unused \"${D}etc/NetworkManager\" ..." |
350 |
- rm -rf "${D}"etc/NetworkManager || die "Removing \"${D}etc/NetworkManager\" failed" |
351 |
- fi |
352 |
- |
353 |
- if [[ -f "${D}usr/share/shorewall-init/ifupdown" ]]; then |
354 |
- # This script isn't supported on Gentoo |
355 |
- rm -rf "${D}"usr/share/shorewall-init/ifupdown || die "Removing \"${D}usr/share/shorewall-init/ifupdown\" failed" |
356 |
- fi |
357 |
- fi |
358 |
- |
359 |
- if use doc; then |
360 |
- einfo "Installing ${MY_P_DOCS} ..." |
361 |
- docinto html && dodoc -r "${S}"/${MY_PN_DOCS}/* |
362 |
- fi |
363 |
-} |
364 |
- |
365 |
-pkg_postinst() { |
366 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
367 |
- # This is a new installation |
368 |
- |
369 |
- # Show first steps for shorewall/shorewall6 |
370 |
- local _PRODUCTS="" |
371 |
- if use ipv4; then |
372 |
- _PRODUCTS="shorewall" |
373 |
- |
374 |
- if use ipv6; then |
375 |
- _PRODUCTS="${_PRODUCTS}/shorewall6" |
376 |
- fi |
377 |
- fi |
378 |
- |
379 |
- if [[ -n "${_PRODUCTS}" ]]; then |
380 |
- elog "Before you can use ${_PRODUCTS}, you need to edit its configuration in:" |
381 |
- elog "" |
382 |
- elog " /etc/shorewall/shorewall.conf" |
383 |
- |
384 |
- if use ipv6; then |
385 |
- elog " /etc/shorewall6/shorewall6.conf" |
386 |
- fi |
387 |
- |
388 |
- elog "" |
389 |
- elog "To activate your shorewall-based firewall on system start, please add ${_PRODUCTS} to your default runlevel:" |
390 |
- elog "" |
391 |
- elog " # rc-update add shorewall default" |
392 |
- |
393 |
- if use ipv6; then |
394 |
- elog " # rc-update add shorewall6 default" |
395 |
- fi |
396 |
- fi |
397 |
- |
398 |
- # Show first steps for shorewall-lite/shorewall6-lite |
399 |
- _PRODUCTS="" |
400 |
- if use lite4; then |
401 |
- _PRODUCTS="shorewall-lite" |
402 |
- fi |
403 |
- |
404 |
- if use lite6; then |
405 |
- if [[ -z "${_PRODUCTS}" ]]; then |
406 |
- _PRODUCTS="shorewall6-lite" |
407 |
- else |
408 |
- _PRODUCTS="${_PRODUCTS}/shorewall6-lite" |
409 |
- fi |
410 |
- fi |
411 |
- |
412 |
- if [[ -n "${_PRODUCTS}" ]]; then |
413 |
- if use ipv4; then |
414 |
- elog "" |
415 |
- fi |
416 |
- |
417 |
- elog "Before you can use ${_PRODUCTS}, you need to provide a configuration, which you can" |
418 |
- elog "create using ${CATEGORY}/shorewall (with \"ipv4\" and or \"ipv6\" USE flag)." |
419 |
- elog "" |
420 |
- elog "To read more about ${_PRODUCTS}, please visit" |
421 |
- elog " http://shorewall.net/CompiledPrograms.html" |
422 |
- elog "" |
423 |
- elog "To activate your shorewall-lite-based firewall on system start, please add ${PRODUCTS} to your default runlevel:" |
424 |
- elog "" |
425 |
- |
426 |
- if use lite4; then |
427 |
- elog " # rc-update add shorewall-lite default" |
428 |
- fi |
429 |
- |
430 |
- if use lite6; then |
431 |
- elog " # rc-update add shorewall6-lite default" |
432 |
- fi |
433 |
- fi |
434 |
- |
435 |
- if use init; then |
436 |
- elog "" |
437 |
- elog "To secure your system on boot, please add shorewall-init to your boot runlevel:" |
438 |
- elog "" |
439 |
- elog " # rc-update add shorewall-init boot" |
440 |
- elog "" |
441 |
- elog "and review \$PRODUCTS in" |
442 |
- elog "" |
443 |
- elog " /etc/conf.d/shorewall-init" |
444 |
- fi |
445 |
- |
446 |
- fi |
447 |
- |
448 |
- local v |
449 |
- for v in ${REPLACING_VERSIONS}; do |
450 |
- if ! version_is_at_least ${MY_MAJOR_RELEASE_NUMBER} ${v}; then |
451 |
- # This is an upgrade |
452 |
- |
453 |
- elog "You are upgrading from a previous major version. It is highly recommended that you read" |
454 |
- elog "" |
455 |
- elog " - /usr/share/doc/shorewall*/releasenotes.tx*" |
456 |
- elog " - http://shorewall.net/Shorewall-5.html#idm214" |
457 |
- |
458 |
- if use ipv4; then |
459 |
- elog "" |
460 |
- elog "You can auto-migrate your configuration using" |
461 |
- elog "" |
462 |
- elog " # shorewall update -A" |
463 |
- |
464 |
- if use ipv6; then |
465 |
- elog " # shorewall6 update -A" |
466 |
- fi |
467 |
- |
468 |
- elog "" |
469 |
- elog "*after* you have merged the changed files using one of the configuration" |
470 |
- elog "files update tools of your choice (dispatch-conf, etc-update...)." |
471 |
- |
472 |
- elog "" |
473 |
- elog "But if you are not familiar with the \"shorewall[6] update\" command," |
474 |
- elog "please read the shorewall[6] man page first." |
475 |
- fi |
476 |
- |
477 |
- # Show this elog only once |
478 |
- break |
479 |
- fi |
480 |
- done |
481 |
- |
482 |
- if ! use init; then |
483 |
- elog "" |
484 |
- elog "Consider emerging ${CATEGORY}/${PN} with USE flag \"init\" to secure your system on boot" |
485 |
- elog "before your shorewall-based firewall is ready to start." |
486 |
- elog "" |
487 |
- elog "To read more about shorewall-init, please visit" |
488 |
- elog " http://www.shorewall.net/Shorewall-init.html" |
489 |
- fi |
490 |
- |
491 |
- if ! has_version "net-firewall/conntrack-tools"; then |
492 |
- elog "" |
493 |
- elog "Your Shorewall firewall can utilize \"conntrack\" from the \"net-firewall/conntrack-tools\"" |
494 |
- elog "package. if you want to use this feature, you need to install \"net-firewall/conntrack-tools\"!" |
495 |
- fi |
496 |
- |
497 |
- if ! has_version "dev-perl/Devel-NYTProf"; then |
498 |
- elog "" |
499 |
- elog "If you want to profile your Shorewall firewall you need to install \"dev-perl/Devel-NYTProf\"!" |
500 |
- fi |
501 |
-} |