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