1 |
commit: 098d7c9931e31aeab8b1f1dac651b4060b13e55c |
2 |
Author: Thomas D <whissi <AT> whissi <DOT> de> |
3 |
AuthorDate: Mon Apr 25 23:12:43 2016 +0000 |
4 |
Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 26 08:49:42 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=098d7c99 |
7 |
|
8 |
net-firewall/shorewall: Bump to v5.0.8 |
9 |
|
10 |
- "reload" action added to runscripts (#580632) |
11 |
|
12 |
Package-Manager: portage-2.2.28 |
13 |
Closes: https://github.com/gentoo/gentoo/pull/1354 |
14 |
|
15 |
Signed-off-by: Ian Delaney <idella4 <AT> gentoo.org> |
16 |
|
17 |
net-firewall/shorewall/Manifest | 7 + |
18 |
.../shorewall/files/shorewall-lite.confd-r1 | 19 + |
19 |
.../shorewall/files/shorewall-lite.initd-r1 | 83 ++++ |
20 |
net-firewall/shorewall/files/shorewall.confd-r1 | 19 + |
21 |
net-firewall/shorewall/files/shorewall.initd-r1 | 108 +++++ |
22 |
.../shorewall/files/shorewall6-lite.confd-r1 | 19 + |
23 |
.../shorewall/files/shorewall6-lite.initd-r1 | 93 +++++ |
24 |
net-firewall/shorewall/files/shorewall6.confd-r1 | 19 + |
25 |
net-firewall/shorewall/files/shorewall6.initd-r1 | 118 ++++++ |
26 |
net-firewall/shorewall/shorewall-5.0.8.ebuild | 446 +++++++++++++++++++++ |
27 |
10 files changed, 931 insertions(+) |
28 |
|
29 |
diff --git a/net-firewall/shorewall/Manifest b/net-firewall/shorewall/Manifest |
30 |
index 659efd4..8610ecd 100644 |
31 |
--- a/net-firewall/shorewall/Manifest |
32 |
+++ b/net-firewall/shorewall/Manifest |
33 |
@@ -1,14 +1,21 @@ |
34 |
DIST shorewall-5.0.4.tar.bz2 482227 SHA256 34a4ab3e4ded052cb563a280f07f350616db913ded124bfceb39adb325f1ce0a SHA512 7912d46e794b4facf29d290370a5cbad83a568873d8aca1b6efe7856c1420a7da882957d16bd4d376d9e7c69accb5263bfa0dd73af06f3c85eab41a0e244c362 WHIRLPOOL eb7351b01c9a3c709179eb6e21d6bb54935a11c066fb31588a1b90c9a089eac7e2d8387006f436c2a68c1618847f5ea69c65e8233240a8d3c8352e0a4d685dc9 |
35 |
DIST shorewall-5.0.7.2.tar.bz2 488554 SHA256 f88746e8fbce315e333855120c9c7bc0390ddd170696a8059bfe0a7c94887c50 SHA512 31fc0c2c1498eb67a311dd181340bdabb90170e16240a9cf4fb85d08773bbb33f6f857e9229133d98100d39e7c1a1b9c39118749094f65382698155d897ec7f1 WHIRLPOOL af78482e9b9909eda84b4dfc831a13219073c38db4d324d32a593b7be5829f7be8eba733db42dfdb6d5e86d638c8462c2b755bc5ba2f210c1ccd0cedfe369918 |
36 |
+DIST shorewall-5.0.8.tar.bz2 497396 SHA256 a1a598a3bb73793de245841ff54fae01cc2e29e006a4f4c09f04f16be4c41f54 SHA512 b0ad03aa86f1c5d607026db37fe3fb6ba335d29dd596770ef1b4b338b8afa5916062c07372427d44e8cdbd7e59183b3a73f4b531a869cc1dd4025f72ae5fc945 WHIRLPOOL 6e5643b094199a5bfa8da253e1348547525449b74f22ddfc5fa75fd504f456e914a56122a040532b460632ce43e178f28c22174ac000e724f43a2523c572819b |
37 |
DIST shorewall-core-5.0.4.tar.bz2 50604 SHA256 ea80b9e1854033c723a5321fc920b35aa0ebb0dea3721a47cee616aa3b92ed9f SHA512 1db3b7a44bf2f99d1a9c6775c798285bbc9a4bec5a340a10fd762600c01486f90d305297247cceb451616e852d9deb89163a43082e06f9eadad75cdd5d480a21 WHIRLPOOL bb4cea303c7ea1190ec3788f9e7cab4f0febf88ab5047c18adbe9e88476c5ebe569bd3ead6105131a61ac6c31bdab6d3192383e1709847e637220f223a8875b9 |
38 |
DIST shorewall-core-5.0.7.2.tar.bz2 53796 SHA256 97f984261ca24e11e0ce4ab8c6ee2bb7f877dad9ed5b3df292bc6a6336e50b4c SHA512 7d76fede69e1cd218e574087cdf609b8fce6997a0f904151f2f514558d1664008a5e7516e1d97a912fe028c95a4d313c3db8e180745c99b5e15b28d25a67ccf6 WHIRLPOOL 0be39a6b9db6c561d5d2bd5e192b77d81a59c9236dcd3595a2d9b03af00e7df06b8f9e7aeedc03f9226714c987b1e812fb053e472099649bc0f1295943ac1459 |
39 |
+DIST shorewall-core-5.0.8.tar.bz2 57121 SHA256 1cd2449e4f86a23c518d180c9c802fa77400d33f0a2945b4434d89407167ecad SHA512 901673f76a65d7039abbad6d8b8553d9a1751dcc7559d25f0f798135121a52b4c25159b7ef4c95affdba6ed92e6a37d7d39928468e6a7737eaa78acb365c8a32 WHIRLPOOL df60d7ecb7422d5dd81c0a9b487bc7a4b15a1384c5a2ba262d9a8041262fec048d27d72c03dedfbe7a3b310b2708d40412d355dd70eeba7427eb5f43a3d44edf |
40 |
DIST shorewall-docs-html-5.0.4.tar.bz2 4263406 SHA256 501d76f53d6e638aaa14ab60718fa173ef0c3a7756e325326288c353d2845707 SHA512 7e35191fbd5a1b7f0172880fa03ce95f4ac13da3a481c4c2cace83380bcacd23809c56ea12876e55c6d2371a4c88ba44d6a8a600c83481156294ff1a2a48c0e4 WHIRLPOOL 347666e97898ea19af93aef3fb2852b1453791038fa534bb5cad8e96acff75460cb5527389b726f7e09d4721a7b171ca9d2171ac5704f8fa50e172d7ac403929 |
41 |
DIST shorewall-docs-html-5.0.7.2.tar.bz2 4269013 SHA256 cf25f6f3db125ccdb45a27252f9896c338078b4d7c5dc2c73fda1edb5887c103 SHA512 11239c5d271b6e71aaa15880a1ed56566c1ce30b100c00a25e49279d0a9d07bd86484a43a4810a0904b84264a44c3cc65f0b12ec579ab0c953db26af3d8ed152 WHIRLPOOL 34f579be4799e8b5c17edc4b4b7a245bc7e6519a03226156fdc56f73abb6912d9a2b71c404b36ffd2458d4ab37a7a5ad1cc1622d3d2cc139204a3279c6a5b503 |
42 |
+DIST shorewall-docs-html-5.0.8.tar.bz2 4270299 SHA256 8646627ce8a4ceb8e0800e82c8a62facf5e4c8240b6fded00d4fed4516a275d1 SHA512 a820a3e0a2e6d95b8f349e66bd7ed8d27d7155801494042d6732b16cd93ad7f7e1a76a62b32335a62e98eb9528b49f16e11a4b2fe7bc0d9d8064a270cbd52d4f WHIRLPOOL 358b5948d3bb9912e8634e025003a969ecd546b7552e149c5e779844446a107f66a662c381f393d43a6d3cf241dafd8299341ae9ef56fb3ff37ca7277608deb8 |
43 |
DIST shorewall-init-5.0.4.tar.bz2 29902 SHA256 97c99c9e68f2546139f26f1f713e1a3377754e53bf2ba0d8f431469aed47ee9c SHA512 67a66ba6db64a320192f5affa38fb779c1f7d7b915523fe82e4dc8a79bb6590b8da62979f9108ba3f56beef05c1cddb5bb2ffea21317e516c2d8a380a5117567 WHIRLPOOL b4f7875ed0f52d8667135dc7204b1a570dec351a7d3fb42a37618af3d54b808355b4479bfb3421d29d4ab808aeae37cd3f1d12b66046f96ec80f776e796d86c7 |
44 |
DIST shorewall-init-5.0.7.2.tar.bz2 32525 SHA256 82b56c01e427e4806c4590b854adfe71feff4bed33185ec7be0310d8e8ae4991 SHA512 6ea2e2379d9baaca0730797f4d7f896f7350965cb203b8c322edc9e47bf0ce8966fd0d0ae5a01f50e5acc3a2578089bfe262e5567428aa13923e68cededda4b9 WHIRLPOOL de074623c93a43ca586a87f5ddae184ec2ce41a3a225f88aa0c92d0311e20cfd4c4b0c5a152bf8c9ca1daa0b159a306aeb321b960082000e99552704c34f9d1b |
45 |
+DIST shorewall-init-5.0.8.tar.bz2 35665 SHA256 953a1ed63bcb36e2ecbe98813c85e4bae90f3dfadd4a4d034544b5eec113af4e SHA512 bc20cee91140e39c7cfcbf8b08c4dc3f19ce3cb76df62d7321a41679af007a2c4da49b6fff160a3cc4fb909a7cbb984157ad78e156df1c6094812f66cb549d2d WHIRLPOOL c56dace686dbe2e29123854374ed350cea0a399389577d7c8c2cc68a5534da6145a8b22819d53f1f4a42cee2e020085cac2544a20d3889476980a9fb4f062884 |
46 |
DIST shorewall-lite-5.0.4.tar.bz2 46454 SHA256 23ac0c1b5f8f1650e6a03a70022b3de0c705fb4257c56d0f84d823b0a10f659d SHA512 8f29c4318de4464eaaaab81096e6290abb0c5d148b043dda70f2f38b21823338e093766dd6fcf0d8924a8a7cd3dd84b5c253fdae421982bc2f9ada13a38db7ba WHIRLPOOL 271b9605e97b1f2c5891cae9c30b4b56b8e07e69f1effbc277d784d781cb35f33f1f3c8e2bcbae0e7ae0e6fe092937573cdbf7c9adea498212007b4db7a5ee95 |
47 |
DIST shorewall-lite-5.0.7.2.tar.bz2 48465 SHA256 7511a2f721c10e42628fe4dab1d8ce0c4499a76ad1ecb071a59575513f6b3d74 SHA512 d49fe0419da71ac492f2b48e142e353a09de746c5b842cf9f90added2e9e7578b1542d71c1f99251cbfd469bda73cd6fe151d45d71b38055365d5d36e67a806d WHIRLPOOL 8a0ff4aa17a2ab635488456f9bbd50d32a714dea56370b8cefe8938a5d12c16f906c24e0de8680251e5827038ea45f2c1bef1b477b1ffec76e2d4ff9c3703cc4 |
48 |
+DIST shorewall-lite-5.0.8.tar.bz2 51897 SHA256 42c2a2f7c81bfab47371748e8e5230bbac7bd5985372dce64071e695f9d8746a SHA512 7a2497a768102c331fda410206c77ef9e57b012eb6932ed519caf036b7cd8ae110bad536175db0339024c4d8aaa77b682a2b816358a3268e15018371c4fd69b8 WHIRLPOOL 4738355687e05ca133a6f9d7c3b467567cd49a8124bee4d12ec04981e38642555911b7249a9e161d22e6c1b64f221fea202141f7fcd05be8ea973cf78bc1900d |
49 |
DIST shorewall6-5.0.4.tar.bz2 221062 SHA256 86b939f5a27e464d2d4928b66ba145c30c299bc90fd19802817d8a013cfc1fff SHA512 cc38b44fd4af38981d2a7acff11be4f481683f5d6227ed072a2147650ff20fbafdf2bdca63f66b330c11cabf521484f6d860ad1dc426f1d952d94643ff3d63dc WHIRLPOOL 2e0abbcd7e308f2523907be285c77a257a37aa70b81af0d356de53cd6e330305ca66be6972ab53954d0b02ada9fc6b5176b928db8f4a9ee588410c81dce55792 |
50 |
DIST shorewall6-5.0.7.2.tar.bz2 222450 SHA256 cf78fb9c75e65315502a56b963baf81afec0563d5e2e7bf5e7461c0a0772a29a SHA512 d052185ef2edcf0c4c81de41c52ff4db5b31649ae14847791b87a99e644b9a0a3026aeaa09bdd7d90687eeca5e86938af400574c31e6f44255fdf045b6716505 WHIRLPOOL 4b0779d7870700a62f614deb7a359add26520d6d989dfbe9c6feb0f027073d53752f0bc604008a2e9dfc5d719521fb25bef1967eea1b92d88efb151bb6b574f4 |
51 |
+DIST shorewall6-5.0.8.tar.bz2 224839 SHA256 564fb305c8d816d9e2b5a2487b68b80e34049144b8499931767a647d8bbd2192 SHA512 7d0eeac59c965cb4599b0fb42bdc8791ad29f284de9635a96df0c1e27bbdf69a35c501b72b4787380176c97fbbbdcd22a1a6b113c24344f296ec6b2438d2f77f WHIRLPOOL 47dc867b7c84db50cae87aeed79ba2c0f954841a5d593e76ca3c3caa0547ff1dd3e9e433a649cb655e8c1ad876faa518cd04fbf7daeb7be3f9d89625bfd2c77d |
52 |
DIST shorewall6-lite-5.0.4.tar.bz2 45573 SHA256 ea578f90bdb5b797c5604a4490ce90437bb4fbc1384f99ef131b2a6415ce6cfe SHA512 eb85ba4cc7992acb0667c735593cceb958ffa06fedd101a6c987078cbfb8509a7b979c92147dfbc4be58a00a2042a20d88873ba6048038ba5c6c8695487c3a85 WHIRLPOOL b040e1850f30103642d83a93467bb21d31a22a1e2c3759677720f0efc613d43759a278536f6304968fba208121f91a151df1b64f9dec6aaae3859f04a2da8215 |
53 |
DIST shorewall6-lite-5.0.7.2.tar.bz2 47869 SHA256 3351ec654e7c65c5f0e6865b604d04f8fd164ff10af892aa0e586282dbd8def1 SHA512 75003fba3d2dc6e3b4eea27b21574c893d1759de2db1b008fff2de233d90159c4221cc1018a693745f7786702049cfe21636d12e80c02aedd2cdc904599bda5b WHIRLPOOL 1129bcae9878fe0f2b34944fd0b10f117160c617be79d837da056c0fd50f6f5f1b0855707b014618a7a8db41a6ab59e30707e468dfed9ff6f1ca9437dce05833 |
54 |
+DIST shorewall6-lite-5.0.8.tar.bz2 51351 SHA256 970b738ac1d3f6c7ca64769fde7daedd855dfb4ce000127f48bb6a352e28c184 SHA512 bc4fa6cb635b25856764009a7d10cf9d38d3df820ee291658a38c8014491baa407476ff5f5955168b84090ee6c8fdaf2718ea77dacdf15abd5c862f0e2e6eed6 WHIRLPOOL 8cabd7086f0fe593dea29ace8fedcff7078a9ce5c07b314c104c53d758962a3f344a46268e814516ebd03a225b4296d0b381b676c9d52fe94ce2afa5557bf5da |
55 |
|
56 |
diff --git a/net-firewall/shorewall/files/shorewall-lite.confd-r1 b/net-firewall/shorewall/files/shorewall-lite.confd-r1 |
57 |
new file mode 100644 |
58 |
index 0000000..daef305 |
59 |
--- /dev/null |
60 |
+++ b/net-firewall/shorewall/files/shorewall-lite.confd-r1 |
61 |
@@ -0,0 +1,19 @@ |
62 |
+# Global start/restart/stop options |
63 |
+# |
64 |
+OPTIONS="-tvv" |
65 |
+ |
66 |
+# Start options |
67 |
+# |
68 |
+STARTOPTIONS="" |
69 |
+ |
70 |
+# Stop options |
71 |
+# |
72 |
+STOPOPTIONS="" |
73 |
+ |
74 |
+# Reload options |
75 |
+# |
76 |
+RELOADOPTIONS="" |
77 |
+ |
78 |
+# Restart options |
79 |
+# |
80 |
+RESTARTOPTIONS="" |
81 |
|
82 |
diff --git a/net-firewall/shorewall/files/shorewall-lite.initd-r1 b/net-firewall/shorewall/files/shorewall-lite.initd-r1 |
83 |
new file mode 100644 |
84 |
index 0000000..f6dbccd |
85 |
--- /dev/null |
86 |
+++ b/net-firewall/shorewall/files/shorewall-lite.initd-r1 |
87 |
@@ -0,0 +1,83 @@ |
88 |
+#!/sbin/openrc-run |
89 |
+# Copyright 1999-2016 Gentoo Foundation |
90 |
+# Distributed under the terms of the GNU General Public License v2 |
91 |
+# $Id$ |
92 |
+ |
93 |
+description='The Shoreline Firewall Lite, more commonly known as "Shorewall Lite", is' |
94 |
+description="${description} a high-level tool for configuring Netfilter." |
95 |
+ |
96 |
+extra_commands="clear" |
97 |
+extra_started_commands="reload reset" |
98 |
+ |
99 |
+description_clear="Clear will remove all rules and chains installed by" |
100 |
+description_clear="${description_clear} Shorewall Lite. The firewall is" |
101 |
+description_clear="${description_clear} then wide open and unprotected." |
102 |
+ |
103 |
+description_reload="Reload is similar to \"${RC_SERVICE} start\" except that it assumes" |
104 |
+description_reload="${description_reload} that the firewall is already started." |
105 |
+description_reload="${description_reload} Existing connections are maintained." |
106 |
+ |
107 |
+description_reset="All the packet and byte counters in the firewall are reset." |
108 |
+ |
109 |
+command="/usr/sbin/shorewall-lite" |
110 |
+ |
111 |
+depend() { |
112 |
+ provide firewall |
113 |
+ after ulogd |
114 |
+} |
115 |
+ |
116 |
+status() { |
117 |
+ local _retval |
118 |
+ ${command} status 1>/dev/null |
119 |
+ _retval=$? |
120 |
+ if [ ${_retval} = '0' ]; then |
121 |
+ einfo 'status: started' |
122 |
+ mark_service_started "${SVCNAME}" |
123 |
+ return 0 |
124 |
+ else |
125 |
+ einfo 'status: stopped' |
126 |
+ mark_service_stopped "${SVCNAME}" |
127 |
+ return 3 |
128 |
+ fi |
129 |
+} |
130 |
+ |
131 |
+start() { |
132 |
+ ebegin "Starting shorewall-lite" |
133 |
+ ${command} ${OPTIONS} start ${STARTOPTIONS} 1>/dev/null |
134 |
+ eend $? |
135 |
+} |
136 |
+ |
137 |
+stop() { |
138 |
+ ebegin "Stopping shorewall-lite" |
139 |
+ ${command} ${OPTIONS} stop ${STOPOPTIONS} 1>/dev/null |
140 |
+ eend $? |
141 |
+} |
142 |
+ |
143 |
+restart() { |
144 |
+ ebegin "Restarting shorewall-lite" |
145 |
+ ${command} status 1>/dev/null |
146 |
+ if [ $? != 0 ] ; then |
147 |
+ svc_start |
148 |
+ else |
149 |
+ ${command} ${OPTIONS} restart ${RESTARTOPTIONS} 1>/dev/null |
150 |
+ fi |
151 |
+ eend $? |
152 |
+} |
153 |
+ |
154 |
+reload() { |
155 |
+ ebegin "Reloading shorewall-lite" |
156 |
+ ${command} ${OPTIONS} reload ${RELOADOPTIONS} 1>/dev/null |
157 |
+ eend $? |
158 |
+} |
159 |
+ |
160 |
+clear() { |
161 |
+ ebegin "Clearing all shorewall-lite rules and setting policy to ACCEPT" |
162 |
+ ${command} ${OPTIONS} clear 1>/dev/null |
163 |
+ eend $? |
164 |
+} |
165 |
+ |
166 |
+reset() { |
167 |
+ ebegin "Resetting the packet and byte counters in shorewall-lite" |
168 |
+ ${command} ${OPTIONS} reset 1>/dev/null |
169 |
+ eend $? |
170 |
+} |
171 |
|
172 |
diff --git a/net-firewall/shorewall/files/shorewall.confd-r1 b/net-firewall/shorewall/files/shorewall.confd-r1 |
173 |
new file mode 100644 |
174 |
index 0000000..daef305 |
175 |
--- /dev/null |
176 |
+++ b/net-firewall/shorewall/files/shorewall.confd-r1 |
177 |
@@ -0,0 +1,19 @@ |
178 |
+# Global start/restart/stop options |
179 |
+# |
180 |
+OPTIONS="-tvv" |
181 |
+ |
182 |
+# Start options |
183 |
+# |
184 |
+STARTOPTIONS="" |
185 |
+ |
186 |
+# Stop options |
187 |
+# |
188 |
+STOPOPTIONS="" |
189 |
+ |
190 |
+# Reload options |
191 |
+# |
192 |
+RELOADOPTIONS="" |
193 |
+ |
194 |
+# Restart options |
195 |
+# |
196 |
+RESTARTOPTIONS="" |
197 |
|
198 |
diff --git a/net-firewall/shorewall/files/shorewall.initd-r1 b/net-firewall/shorewall/files/shorewall.initd-r1 |
199 |
new file mode 100644 |
200 |
index 0000000..74cadf2 |
201 |
--- /dev/null |
202 |
+++ b/net-firewall/shorewall/files/shorewall.initd-r1 |
203 |
@@ -0,0 +1,108 @@ |
204 |
+#!/sbin/openrc-run |
205 |
+# Copyright 1999-2016 Gentoo Foundation |
206 |
+# Distributed under the terms of the GNU General Public License v2 |
207 |
+# $Id$ |
208 |
+ |
209 |
+description='The Shoreline Firewall, more commonly known as "Shorewall", is' |
210 |
+description="${description} a high-level tool for configuring Netfilter." |
211 |
+ |
212 |
+extra_commands="check clear" |
213 |
+extra_started_commands="refresh reload reset" |
214 |
+ |
215 |
+description_check="Checks if the configuration will compile or not." |
216 |
+ |
217 |
+description_clear="Clear will remove all rules and chains installed by" |
218 |
+description_clear="${description_clear} Shorewall. The firewall is then" |
219 |
+description_clear="${description_clear} wide open and unprotected." |
220 |
+ |
221 |
+description_refresh="The mangle table will be refreshed along with the" |
222 |
+description_refresh="${description_refresh} blacklist chain (if any)." |
223 |
+ |
224 |
+description_reload="Reload is similar to \"${RC_SERVICE} start\" except that it assumes" |
225 |
+description_reload="${description_reload} that the firewall is already started." |
226 |
+description_reload="${description_reload} Existing connections are maintained." |
227 |
+ |
228 |
+description_reset="All the packet and byte counters in the firewall are reset." |
229 |
+ |
230 |
+command="/usr/sbin/shorewall" |
231 |
+ |
232 |
+depend() { |
233 |
+ provide firewall |
234 |
+ after ulogd |
235 |
+} |
236 |
+ |
237 |
+status() { |
238 |
+ local _retval |
239 |
+ ${command} status 1>/dev/null |
240 |
+ _retval=$? |
241 |
+ if [ ${_retval} = '0' ]; then |
242 |
+ einfo 'status: started' |
243 |
+ mark_service_started "${SVCNAME}" |
244 |
+ return 0 |
245 |
+ else |
246 |
+ einfo 'status: stopped' |
247 |
+ mark_service_stopped "${SVCNAME}" |
248 |
+ return 3 |
249 |
+ fi |
250 |
+} |
251 |
+ |
252 |
+start() { |
253 |
+ ebegin "Starting shorewall" |
254 |
+ ${command} ${OPTIONS} start ${STARTOPTIONS} 1>/dev/null |
255 |
+ eend $? |
256 |
+} |
257 |
+ |
258 |
+stop() { |
259 |
+ ebegin "Stopping shorewall" |
260 |
+ ${command} ${OPTIONS} stop ${STOPOPTIONS} 1>/dev/null |
261 |
+ eend $? |
262 |
+} |
263 |
+ |
264 |
+restart() { |
265 |
+ ebegin "Restarting shorewall" |
266 |
+ ${command} status 1>/dev/null |
267 |
+ if [ $? != 0 ] ; then |
268 |
+ svc_start |
269 |
+ else |
270 |
+ ${command} ${OPTIONS} restart ${RESTARTOPTIONS} 1>/dev/null |
271 |
+ fi |
272 |
+ eend $? |
273 |
+} |
274 |
+ |
275 |
+clear() { |
276 |
+ ebegin "Clearing all shorewall rules and setting policy to ACCEPT" |
277 |
+ ${command} ${OPTIONS} clear 1>/dev/null |
278 |
+ eend $? |
279 |
+} |
280 |
+ |
281 |
+reload() { |
282 |
+ ebegin "Reloading shorewall" |
283 |
+ ${command} ${OPTIONS} reload ${RELOADOPTIONS} 1>/dev/null |
284 |
+ eend $? |
285 |
+} |
286 |
+ |
287 |
+reset() { |
288 |
+ ebegin "Resetting the packet and byte counters in shorewall" |
289 |
+ ${command} ${OPTIONS} reset 1>/dev/null |
290 |
+ eend $? |
291 |
+} |
292 |
+ |
293 |
+refresh() { |
294 |
+ # refresh the rules involving the broadcast addresses of firewall |
295 |
+ # interfaces, the black list, traffic control rules and |
296 |
+ # ECN control rules |
297 |
+ |
298 |
+ ebegin "Refreshing shorewall rules" |
299 |
+ ${command} ${OPTIONS} refresh 1>/dev/null |
300 |
+ eend $? |
301 |
+} |
302 |
+ |
303 |
+check() { |
304 |
+ # perform cursory validation of the zones, interfaces, hosts, rules |
305 |
+ # and policy files. CAUTION: does not parse and validate the generated |
306 |
+ # iptables commands. |
307 |
+ |
308 |
+ ebegin "Checking shorewall configuration" |
309 |
+ ${command} ${OPTIONS} check 1>/dev/null |
310 |
+ eend $? |
311 |
+} |
312 |
|
313 |
diff --git a/net-firewall/shorewall/files/shorewall6-lite.confd-r1 b/net-firewall/shorewall/files/shorewall6-lite.confd-r1 |
314 |
new file mode 100644 |
315 |
index 0000000..daef305 |
316 |
--- /dev/null |
317 |
+++ b/net-firewall/shorewall/files/shorewall6-lite.confd-r1 |
318 |
@@ -0,0 +1,19 @@ |
319 |
+# Global start/restart/stop options |
320 |
+# |
321 |
+OPTIONS="-tvv" |
322 |
+ |
323 |
+# Start options |
324 |
+# |
325 |
+STARTOPTIONS="" |
326 |
+ |
327 |
+# Stop options |
328 |
+# |
329 |
+STOPOPTIONS="" |
330 |
+ |
331 |
+# Reload options |
332 |
+# |
333 |
+RELOADOPTIONS="" |
334 |
+ |
335 |
+# Restart options |
336 |
+# |
337 |
+RESTARTOPTIONS="" |
338 |
|
339 |
diff --git a/net-firewall/shorewall/files/shorewall6-lite.initd-r1 b/net-firewall/shorewall/files/shorewall6-lite.initd-r1 |
340 |
new file mode 100644 |
341 |
index 0000000..8bca1e1 |
342 |
--- /dev/null |
343 |
+++ b/net-firewall/shorewall/files/shorewall6-lite.initd-r1 |
344 |
@@ -0,0 +1,93 @@ |
345 |
+#!/sbin/openrc-run |
346 |
+# Copyright 1999-2016 Gentoo Foundation |
347 |
+# Distributed under the terms of the GNU General Public License v2 |
348 |
+# $Id$ |
349 |
+ |
350 |
+description='The Shoreline Firewall 6 Lite, more commonly known as "Shorewall6 Lite", is' |
351 |
+description="${description} a high-level tool for configuring Netfilter." |
352 |
+ |
353 |
+extra_commands="clear" |
354 |
+extra_started_commands="reload reset" |
355 |
+ |
356 |
+description_clear="Clear will remove all rules and chains installed by" |
357 |
+description_clear="${description_clear} Shorewall6 Lite. The firewall is" |
358 |
+description_clear="${description_clear} then wide open and unprotected." |
359 |
+ |
360 |
+description_reload="Reload is similar to \"${RC_SERVICE} start\" except that it assumes" |
361 |
+description_reload="${description_reload} that the firewall is already started." |
362 |
+description_reload="${description_reload} Existing connections are maintained." |
363 |
+ |
364 |
+description_reset="All the packet and byte counters in the firewall are reset." |
365 |
+ |
366 |
+command="/usr/sbin/shorewall6-lite" |
367 |
+ |
368 |
+depend() { |
369 |
+ provide firewall |
370 |
+ after ulogd |
371 |
+} |
372 |
+ |
373 |
+status() { |
374 |
+ local _retval |
375 |
+ ${command} status 1>/dev/null |
376 |
+ _retval=$? |
377 |
+ if [ ${_retval} = '0' ]; then |
378 |
+ einfo 'status: started' |
379 |
+ mark_service_started "${SVCNAME}" |
380 |
+ return 0 |
381 |
+ else |
382 |
+ einfo 'status: stopped' |
383 |
+ mark_service_stopped "${SVCNAME}" |
384 |
+ return 3 |
385 |
+ fi |
386 |
+} |
387 |
+ |
388 |
+start() { |
389 |
+ ebegin "Starting shorewall6-lite" |
390 |
+ ${command} ${OPTIONS} start ${STARTOPTIONS} 1>/dev/null |
391 |
+ eend $? |
392 |
+} |
393 |
+ |
394 |
+stop() { |
395 |
+ ebegin "Stopping shorewall6-lite" |
396 |
+ ${command} ${OPTIONS} stop ${STOPOPTIONS} 1>/dev/null |
397 |
+ eend $? |
398 |
+} |
399 |
+ |
400 |
+restart() { |
401 |
+ # shorewall comes with its own control script that includes a |
402 |
+ # restart function, so refrain from calling svc_stop/svc_start |
403 |
+ # here. Note that this comment is required to fix bug 55576; |
404 |
+ # runscript.sh greps this script... (09 Jul 2004 agriffis) |
405 |
+ |
406 |
+ ebegin "Restarting shorewall6-lite" |
407 |
+ ${command} status 1>/dev/null |
408 |
+ if [ $? != 0 ] ; then |
409 |
+ svc_start |
410 |
+ else |
411 |
+ ${command} ${OPTIONS} restart ${RESTARTOPTIONS} 1>/dev/null |
412 |
+ fi |
413 |
+ eend $? |
414 |
+} |
415 |
+ |
416 |
+clear() { |
417 |
+ # clear will remove all the rules and bring the system to an unfirewalled |
418 |
+ # state. (21 Nov 2004 eldad) |
419 |
+ |
420 |
+ ebegin "Clearing all shorewall6-lite rules and setting policy to ACCEPT" |
421 |
+ ${command} ${OPTIONS} clear 1>/dev/null |
422 |
+ eend $? |
423 |
+} |
424 |
+ |
425 |
+reload() { |
426 |
+ ebegin "Reloading shorewall6-lite" |
427 |
+ ${command} ${OPTIONS} reload ${RELOADOPTIONS} 1>/dev/null |
428 |
+ eend $? |
429 |
+} |
430 |
+ |
431 |
+reset() { |
432 |
+ # reset the packet and byte counters in the firewall |
433 |
+ |
434 |
+ ebegin "Resetting the packet and byte counters in shorewall6-lite" |
435 |
+ ${command} ${OPTIONS} reset 1>/dev/null |
436 |
+ eend $? |
437 |
+} |
438 |
|
439 |
diff --git a/net-firewall/shorewall/files/shorewall6.confd-r1 b/net-firewall/shorewall/files/shorewall6.confd-r1 |
440 |
new file mode 100644 |
441 |
index 0000000..f372685 |
442 |
--- /dev/null |
443 |
+++ b/net-firewall/shorewall/files/shorewall6.confd-r1 |
444 |
@@ -0,0 +1,19 @@ |
445 |
+# Global start/restart/stop options |
446 |
+# |
447 |
+OPTIONS="-tvv" |
448 |
+ |
449 |
+# Start options |
450 |
+# |
451 |
+STARTOPTIONS="" |
452 |
+ |
453 |
+# Stop options |
454 |
+# |
455 |
+STOPOPTIONS="" |
456 |
+ |
457 |
+# Reload options |
458 |
+# |
459 |
+RELOADOPTIONS="" |
460 |
+ |
461 |
+# Restart options |
462 |
+# |
463 |
+RESTARTOPTIONS="" |
464 |
|
465 |
diff --git a/net-firewall/shorewall/files/shorewall6.initd-r1 b/net-firewall/shorewall/files/shorewall6.initd-r1 |
466 |
new file mode 100644 |
467 |
index 0000000..c725a28 |
468 |
--- /dev/null |
469 |
+++ b/net-firewall/shorewall/files/shorewall6.initd-r1 |
470 |
@@ -0,0 +1,118 @@ |
471 |
+#!/sbin/openrc-run |
472 |
+# Copyright 1999-2016 Gentoo Foundation |
473 |
+# Distributed under the terms of the GNU General Public License v2 |
474 |
+# $Id$ |
475 |
+ |
476 |
+description='The Shoreline Firewall 6, more commonly known as "Shorewall6", is' |
477 |
+description="${description} a high-level tool for configuring Netfilter." |
478 |
+ |
479 |
+extra_commands="check clear" |
480 |
+extra_started_commands="refresh reload reset" |
481 |
+ |
482 |
+description_check="Checks if the configuration will compile or not." |
483 |
+ |
484 |
+description_clear="Clear will remove all rules and chains installed by" |
485 |
+description_clear="${description_clear} Shorewall6. The firewall is then" |
486 |
+description_clear="${description_clear} wide open and unprotected." |
487 |
+ |
488 |
+description_refresh="The mangle table will be refreshed along with the" |
489 |
+description_refresh="${description_refresh} blacklist chain (if any)." |
490 |
+ |
491 |
+description_reload="Reload is similar to \"${RC_SERVICE} start\" except that it assumes" |
492 |
+description_reload="${description_reload} that the firewall is already started." |
493 |
+description_reload="${description_reload} Existing connections are maintained." |
494 |
+ |
495 |
+description_reset="All the packet and byte counters in the firewall are reset." |
496 |
+ |
497 |
+command="/usr/sbin/shorewall6" |
498 |
+ |
499 |
+depend() { |
500 |
+ provide firewall |
501 |
+ after ulogd |
502 |
+} |
503 |
+ |
504 |
+status() { |
505 |
+ local _retval |
506 |
+ ${command} status 1>/dev/null |
507 |
+ _retval=$? |
508 |
+ if [ ${_retval} = '0' ]; then |
509 |
+ einfo 'status: started' |
510 |
+ mark_service_started "${SVCNAME}" |
511 |
+ return 0 |
512 |
+ else |
513 |
+ einfo 'status: stopped' |
514 |
+ mark_service_stopped "${SVCNAME}" |
515 |
+ return 3 |
516 |
+ fi |
517 |
+} |
518 |
+ |
519 |
+start() { |
520 |
+ ebegin "Starting shorewall6" |
521 |
+ ${command} ${OPTIONS} start ${STARTOPTIONS} 1>/dev/null |
522 |
+ eend $? |
523 |
+} |
524 |
+ |
525 |
+stop() { |
526 |
+ ebegin "Stopping shorewall6" |
527 |
+ ${command} ${OPTIONS} stop ${STOPOPTIONS} 1>/dev/null |
528 |
+ eend $? |
529 |
+} |
530 |
+ |
531 |
+restart() { |
532 |
+ # shorewall comes with its own control script that includes a |
533 |
+ # restart function, so refrain from calling svc_stop/svc_start |
534 |
+ # here. Note that this comment is required to fix bug 55576; |
535 |
+ # runscript.sh greps this script... (09 Jul 2004 agriffis) |
536 |
+ |
537 |
+ ebegin "Restarting shorewall6" |
538 |
+ ${command} status 1>/dev/null |
539 |
+ if [ $? != 0 ] ; then |
540 |
+ svc_start |
541 |
+ else |
542 |
+ ${command} ${OPTIONS} restart ${RESTARTOPTIONS} 1>/dev/null |
543 |
+ fi |
544 |
+ eend $? |
545 |
+} |
546 |
+ |
547 |
+clear() { |
548 |
+ # clear will remove all the rules and bring the system to an unfirewalled |
549 |
+ # state. (21 Nov 2004 eldad) |
550 |
+ |
551 |
+ ebegin "Clearing all shorewall rules and setting policy to ACCEPT" |
552 |
+ ${command} ${OPTIONS} clear 1>/dev/null |
553 |
+ eend $? |
554 |
+} |
555 |
+ |
556 |
+reload() { |
557 |
+ ebegin "Reloading shorewall6" |
558 |
+ ${command} ${OPTIONS} reload ${RELOADOPTIONS} 1>/dev/null |
559 |
+ eend $? |
560 |
+} |
561 |
+ |
562 |
+reset() { |
563 |
+ # reset the packet and byte counters in the firewall |
564 |
+ |
565 |
+ ebegin "Resetting the packet and byte counters in shorewall6" |
566 |
+ ${command} ${OPTIONS} reset 1>/dev/null |
567 |
+ eend $? |
568 |
+} |
569 |
+ |
570 |
+refresh() { |
571 |
+ # refresh the rules involving the broadcast addresses of firewall |
572 |
+ # interfaces, the black list, traffic control rules and |
573 |
+ # ECN control rules |
574 |
+ |
575 |
+ ebegin "Refreshing shorewall6 rules" |
576 |
+ ${command} ${OPTIONS} refresh 1>/dev/null |
577 |
+ eend $? |
578 |
+} |
579 |
+ |
580 |
+check() { |
581 |
+ # perform cursory validation of the zones, interfaces, hosts, rules |
582 |
+ # and policy files. CAUTION: does not parse and validate the generated |
583 |
+ # iptables commands. |
584 |
+ |
585 |
+ ebegin "Checking shorewall6 configuration" |
586 |
+ ${command} ${OPTIONS} check 1>/dev/null |
587 |
+ eend $? |
588 |
+} |
589 |
|
590 |
diff --git a/net-firewall/shorewall/shorewall-5.0.8.ebuild b/net-firewall/shorewall/shorewall-5.0.8.ebuild |
591 |
new file mode 100644 |
592 |
index 0000000..96d62a2 |
593 |
--- /dev/null |
594 |
+++ b/net-firewall/shorewall/shorewall-5.0.8.ebuild |
595 |
@@ -0,0 +1,446 @@ |
596 |
+# Copyright 1999-2016 Gentoo Foundation |
597 |
+# Distributed under the terms of the GNU General Public License v2 |
598 |
+# $Id$ |
599 |
+ |
600 |
+EAPI=6 |
601 |
+ |
602 |
+inherit linux-info prefix systemd versionator |
603 |
+ |
604 |
+DESCRIPTION='A high-level tool for configuring Netfilter' |
605 |
+HOMEPAGE="http://www.shorewall.net/" |
606 |
+LICENSE="GPL-2" |
607 |
+SLOT="0" |
608 |
+IUSE="doc +init +ipv4 ipv6 lite4 lite6" |
609 |
+ |
610 |
+MY_PV=${PV/_rc/-RC} |
611 |
+MY_PV=${MY_PV/_beta/-Beta} |
612 |
+MY_P=${PN}-${MY_PV} |
613 |
+ |
614 |
+MY_MAJOR_RELEASE_NUMBER=$(get_version_component_range 1-2) |
615 |
+MY_MAJORMINOR_RELEASE_NUMBER=$(get_version_component_range 1-3) |
616 |
+ |
617 |
+# shorewall |
618 |
+MY_PN_IPV4=Shorewall |
619 |
+MY_P_IPV4=${MY_PN_IPV4/#S/s}-${MY_PV} |
620 |
+ |
621 |
+# shorewall6 |
622 |
+MY_PN_IPV6=Shorewall6 |
623 |
+MY_P_IPV6=${MY_PN_IPV6/#S/s}-${MY_PV} |
624 |
+ |
625 |
+# shorewall-lite |
626 |
+MY_PN_LITE4=Shorewall-lite |
627 |
+MY_P_LITE4=${MY_PN_LITE4/#S/s}-${MY_PV} |
628 |
+ |
629 |
+# shorewall6-lite |
630 |
+MY_PN_LITE6=Shorewall6-lite |
631 |
+MY_P_LITE6=${MY_PN_LITE6/#S/s}-${MY_PV} |
632 |
+ |
633 |
+# shorewall-init |
634 |
+MY_PN_INIT=Shorewall-init |
635 |
+MY_P_INIT=${MY_PN_INIT/#S/s}-${MY_PV} |
636 |
+ |
637 |
+# shorewall-core |
638 |
+MY_PN_CORE=Shorewall-core |
639 |
+MY_P_CORE=${MY_PN_CORE/#S/s}-${MY_PV} |
640 |
+ |
641 |
+# shorewall-docs-html |
642 |
+MY_PN_DOCS=Shorewall-docs-html |
643 |
+MY_P_DOCS=${MY_PN_DOCS/#S/s}-${MY_PV} |
644 |
+ |
645 |
+# Upstream URL schema: |
646 |
+# Beta: $MIRROR/pub/shorewall/development/4.6/shorewall-4.6.4-Beta2/shorewall-4.6.4-Beta2.tar.bz2 |
647 |
+# RC: $MIRROR/pub/shorewall/development/4.6/shorewall-4.6.4-RC1/shorewall-4.6.4-RC1.tar.bz2 |
648 |
+# Release: $MIRROR/pub/shorewall/4.6/shorewall-4.6.3/shorewall-4.6.3.3.tar.bz2 |
649 |
+ |
650 |
+MY_URL_PREFIX= |
651 |
+MY_URL_SUFFIX= |
652 |
+if [[ ${MY_PV} = *-Beta* ]] || [[ ${MY_PV} = *-RC* ]]; then |
653 |
+ MY_URL_PREFIX='development/' |
654 |
+ |
655 |
+ _tmp_last_index=$(($(get_last_version_component_index ${MY_PV})+1)) |
656 |
+ _tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${MY_PV}) |
657 |
+ if [[ ${_tmp_suffix} = *Beta* ]] || [[ ${_tmp_suffix} = *RC* ]]; then |
658 |
+ MY_URL_SUFFIX="-${_tmp_suffix}" |
659 |
+ fi |
660 |
+ |
661 |
+ # Cleaning up temporary variables |
662 |
+ unset _tmp_last_index |
663 |
+ unset _tmp_suffix |
664 |
+else |
665 |
+ KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" |
666 |
+fi |
667 |
+ |
668 |
+SRC_URI=" |
669 |
+ 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 |
670 |
+ 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 ) |
671 |
+ 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 ) |
672 |
+ 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 ) |
673 |
+ 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 ) |
674 |
+ 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 ) |
675 |
+ 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 ) |
676 |
+" |
677 |
+ |
678 |
+# - Shorewall6 requires Shorewall |
679 |
+# - Installing Shorewall-init or just the documentation doesn't make any sense, |
680 |
+# that's why we force the user to select at least one "real" Shorewall product |
681 |
+# |
682 |
+# See http://shorewall.net/download.htm#Which |
683 |
+REQUIRED_USE=" |
684 |
+ ipv6? ( ipv4 ) |
685 |
+ || ( ipv4 lite4 lite6 ) |
686 |
+" |
687 |
+ |
688 |
+# No build dependencies! Just plain shell scripts... |
689 |
+DEPEND="" |
690 |
+ |
691 |
+RDEPEND=" |
692 |
+ >=net-firewall/iptables-1.4.20 |
693 |
+ >=sys-apps/iproute2-3.8.0[-minimal] |
694 |
+ >=sys-devel/bc-1.06.95 |
695 |
+ ipv4? ( |
696 |
+ >=dev-lang/perl-5.16 |
697 |
+ virtual/perl-Digest-SHA |
698 |
+ ) |
699 |
+ ipv6? ( |
700 |
+ >=dev-perl/Socket6-0.230.0 |
701 |
+ >=net-firewall/iptables-1.4.20[ipv6] |
702 |
+ >=sys-apps/iproute2-3.8.0[ipv6] |
703 |
+ ) |
704 |
+ lite6? ( |
705 |
+ >=net-firewall/iptables-1.4.20[ipv6] |
706 |
+ >=sys-apps/iproute2-3.8.0[ipv6] |
707 |
+ ) |
708 |
+ init? ( >=sys-apps/coreutils-8.20 ) |
709 |
+ !net-firewall/shorewall-core |
710 |
+ !net-firewall/shorewall6 |
711 |
+ !net-firewall/shorewall-lite |
712 |
+ !net-firewall/shorewall6-lite |
713 |
+ !net-firewall/shorewall-init |
714 |
+ !<sys-apps/systemd-214 |
715 |
+" |
716 |
+ |
717 |
+S=${WORKDIR} |
718 |
+ |
719 |
+pkg_pretend() { |
720 |
+ local CONFIG_CHECK="~NF_CONNTRACK" |
721 |
+ |
722 |
+ local WARNING_CONNTRACK="Without NF_CONNTRACK support, you will be unable" |
723 |
+ local WARNING_CONNTRACK+=" to run any shorewall-based firewall on the local system." |
724 |
+ |
725 |
+ if use ipv4 || use lite4; then |
726 |
+ CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV4" |
727 |
+ |
728 |
+ local WARNING_CONNTRACK_IPV4="Without NF_CONNTRACK_IPV4 support, you will" |
729 |
+ local WARNING_CONNTRACK_IPV4+=" be unable to run any shorewall-based IPv4 firewall on the local system." |
730 |
+ fi |
731 |
+ |
732 |
+ if use ipv6 || use lite6; then |
733 |
+ CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV6" |
734 |
+ |
735 |
+ local WARNING_CONNTRACK_IPV6="Without NF_CONNTRACK_IPV6 support, you will" |
736 |
+ local WARNING_CONNTRACK_IPV6+=" be unable to run any shorewall-based IPv6 firewall on the local system." |
737 |
+ fi |
738 |
+ |
739 |
+ check_extra_config |
740 |
+} |
741 |
+ |
742 |
+pkg_setup() { |
743 |
+ if [ -n "${DIGEST}" ]; then |
744 |
+ einfo "Unsetting environment variable \"DIGEST\" to prevent conflicts with package's \"install.sh\" script ..." |
745 |
+ unset DIGEST |
746 |
+ fi |
747 |
+} |
748 |
+ |
749 |
+src_prepare() { |
750 |
+ # We are moving each unpacked source from MY_P_* to MY_PN_*. |
751 |
+ # This allows us to use patches from upstream and keeps epatch_user working |
752 |
+ |
753 |
+ einfo "Preparing shorewallrc ..." |
754 |
+ cp "${FILESDIR}"/shorewallrc "${S}"/shorewallrc.gentoo || die "Copying shorewallrc failed" |
755 |
+ eprefixify "${S}"/shorewallrc.gentoo |
756 |
+ |
757 |
+ # shorewall-core |
758 |
+ mv "${S}"/${MY_P_CORE} "${S}"/${MY_PN_CORE} || die "Failed to move '${S}/${MY_P_CORE}' to '${S}/${MY_PN_CORE}'" |
759 |
+ ebegin "Applying Gentoo-specific changes to ${MY_P_CORE} ..." |
760 |
+ ln -s ../shorewallrc.gentoo ${MY_PN_CORE}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
761 |
+ eend 0 |
762 |
+ |
763 |
+ # shorewall |
764 |
+ if use ipv4; then |
765 |
+ mv "${S}"/${MY_P_IPV4} "${S}"/${MY_PN_IPV4} || die "Failed to move '${S}/${MY_P_IPV4}' to '${S}/${MY_PN_IPV4}'" |
766 |
+ ebegin "Applying Gentoo-specific changes to ${MY_P_IPV4}" |
767 |
+ ln -s ../shorewallrc.gentoo ${MY_PN_IPV4}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
768 |
+ cp "${FILESDIR}"/shorewall.confd-r1 "${S}"/${MY_PN_IPV4}/default.gentoo || die "Copying shorewall.confd-r1 failed" |
769 |
+ cp "${FILESDIR}"/shorewall.initd-r1 "${S}"/${MY_PN_IPV4}/init.gentoo.sh || die "Copying shorewall.initd-r1 failed" |
770 |
+ cp "${FILESDIR}"/shorewall.systemd "${S}"/${MY_PN_IPV4}/gentoo.service || die "Copying shorewall.systemd failed" |
771 |
+ eend 0 |
772 |
+ fi |
773 |
+ |
774 |
+ # shorewall6 |
775 |
+ if use ipv6; then |
776 |
+ mv "${S}"/${MY_P_IPV6} "${S}"/${MY_PN_IPV6} || die "Failed to move '${S}/${MY_P_IPV6}' to '${S}/${MY_PN_IPV6}'" |
777 |
+ ebegin "Applying Gentoo-specific changes to ${MY_P_IPV6}" |
778 |
+ ln -s ../shorewallrc.gentoo ${MY_PN_IPV6}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
779 |
+ cp "${FILESDIR}"/shorewall6.confd-r1 "${S}"/${MY_PN_IPV6}/default.gentoo || die "Copying shorewall6.confd-r1 failed" |
780 |
+ cp "${FILESDIR}"/shorewall6.initd-r1 "${S}"/${MY_PN_IPV6}/init.gentoo.sh || die "Copying shorewall6.initd-r1 failed" |
781 |
+ cp "${FILESDIR}"/shorewall6.systemd "${S}"/${MY_PN_IPV6}/gentoo.service || die "Copying shorewall6.systemd failed" |
782 |
+ eend 0 |
783 |
+ fi |
784 |
+ |
785 |
+ # shorewall-lite |
786 |
+ if use lite4; then |
787 |
+ mv "${S}"/${MY_P_LITE4} "${S}"/${MY_PN_LITE4} || die "Failed to move '${S}/${MY_P_LITE4}' to '${S}/${MY_PN_LITE4}'" |
788 |
+ ebegin "Applying Gentoo-specific changes to ${MY_P_LITE4}" |
789 |
+ ln -s ../shorewallrc.gentoo ${MY_PN_LITE4}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
790 |
+ cp "${FILESDIR}"/shorewall-lite.confd-r1 "${S}"/${MY_PN_LITE4}/default.gentoo || die "Copying shorewall-lite.confd-r1 failed" |
791 |
+ cp "${FILESDIR}"/shorewall-lite.initd-r1 "${S}"/${MY_PN_LITE4}/init.gentoo.sh || die "Copying shorewall-lite.initd-r1 failed" |
792 |
+ cp "${FILESDIR}"/shorewall-lite.systemd "${S}"/${MY_PN_LITE4}/gentoo.service || die "Copying shorewall-lite.systemd failed" |
793 |
+ eend 0 |
794 |
+ fi |
795 |
+ |
796 |
+ # shorewall6-lite |
797 |
+ if use lite6; then |
798 |
+ mv "${S}"/${MY_P_LITE6} "${S}"/${MY_PN_LITE6} || die "Failed to move '${S}/${MY_P_LITE6}' to '${S}/${MY_PN_LITE6}'" |
799 |
+ ebegin "Applying Gentoo-specific changes to ${MY_P_LITE6}" |
800 |
+ ln -s ../shorewallrc.gentoo ${MY_PN_LITE6}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
801 |
+ cp "${FILESDIR}"/shorewall6-lite.confd-r1 "${S}"/${MY_PN_LITE6}/default.gentoo || die "Copying shorewall6-lite.confd-r1 failed" |
802 |
+ cp "${FILESDIR}"/shorewall6-lite.initd-r1 "${S}"/${MY_PN_LITE6}/init.gentoo.sh || die "Copying shorewall6-lite.initd-r1 failed" |
803 |
+ cp "${FILESDIR}"/shorewall6-lite.systemd "${S}"/${MY_PN_LITE6}/gentoo.service || die "Copying shorewall6-lite.systemd failed" |
804 |
+ eend 0 |
805 |
+ fi |
806 |
+ |
807 |
+ # shorewall-init |
808 |
+ if use init; then |
809 |
+ mv "${S}"/${MY_P_INIT} "${S}"/${MY_PN_INIT} || die "Failed to move '${S}/${MY_P_INIT}' to '${S}/${MY_PN_INIT}'" |
810 |
+ ebegin "Applying Gentoo-specific changes to ${MY_P_INIT}" |
811 |
+ ln -s ../shorewallrc.gentoo ${MY_PN_INIT}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo" |
812 |
+ cp "${FILESDIR}"/shorewall-init.confd "${S}"/${MY_PN_INIT}/default.gentoo || die "Copying shorewall-init.confd failed" |
813 |
+ cp "${FILESDIR}"/shorewall-init.initd "${S}"/${MY_PN_INIT}/init.gentoo.sh || die "Copying shorewall-init.initd failed" |
814 |
+ cp "${FILESDIR}"/shorewall-init.systemd "${S}"/${MY_PN_INIT}/gentoo.service || die "Copying shorewall-init.systemd failed" |
815 |
+ cp "${FILESDIR}"/shorewall-init.readme "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt || die "Copying shorewall-init.systemd failed" |
816 |
+ eend 0 |
817 |
+ |
818 |
+ eprefixify "${S}"/${MY_PN_INIT}/init.gentoo.sh |
819 |
+ |
820 |
+ cd "${S}"/${MY_PN_INIT} |
821 |
+ eapply -p2 "${FILESDIR}"/shorewall-init-01_remove-ipset-functionality.patch |
822 |
+ cd "${S}" |
823 |
+ fi |
824 |
+ |
825 |
+ # shorewall-docs-html |
826 |
+ if use doc; then |
827 |
+ mv "${S}"/${MY_P_DOCS} "${S}"/${MY_PN_DOCS} || die "Failed to move '${S}/${MY_P_DOCS}' to '${S}/${MY_PN_DOCS}'" |
828 |
+ fi |
829 |
+ |
830 |
+ eapply_user |
831 |
+} |
832 |
+ |
833 |
+src_configure() { |
834 |
+ :; |
835 |
+} |
836 |
+ |
837 |
+src_compile() { |
838 |
+ :; |
839 |
+} |
840 |
+ |
841 |
+src_install() { |
842 |
+ # shorewall-core |
843 |
+ einfo "Installing ${MY_P_CORE} ..." |
844 |
+ DESTDIR="${D%/}" ${MY_PN_CORE}/install.sh shorewallrc.gentoo || die "${MY_PN_CORE}/install.sh failed" |
845 |
+ dodoc "${S}"/${MY_PN_CORE}/changelog.txt "${S}"/${MY_PN_CORE}/releasenotes.txt |
846 |
+ |
847 |
+ # shorewall |
848 |
+ if use ipv4; then |
849 |
+ einfo "Installing ${MY_P_IPV4} ..." |
850 |
+ keepdir /var/lib/shorewall |
851 |
+ DESTDIR="${D%/}" ${MY_PN_IPV4}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV4}/install.sh failed" |
852 |
+ |
853 |
+ if use doc; then |
854 |
+ dodoc -r "${S}"/${MY_PN_IPV4}/Samples |
855 |
+ fi |
856 |
+ fi |
857 |
+ |
858 |
+ # shorewall6 |
859 |
+ if use ipv6; then |
860 |
+ einfo "Installing ${MY_P_IPV6} ..." |
861 |
+ keepdir /var/lib/shorewall6 |
862 |
+ DESTDIR="${D%/}" ${MY_PN_IPV6}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV6}/install.sh failed" |
863 |
+ |
864 |
+ if use doc; then |
865 |
+ dodoc -r "${S}"/${MY_PN_IPV6}/Samples6 |
866 |
+ fi |
867 |
+ fi |
868 |
+ |
869 |
+ # shorewall-lite |
870 |
+ if use lite4; then |
871 |
+ einfo "Installing ${MY_P_LITE4} ..." |
872 |
+ keepdir /var/lib/shorewall-lite |
873 |
+ DESTDIR="${D%/}" ${MY_PN_LITE4}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE4}/install.sh failed" |
874 |
+ fi |
875 |
+ |
876 |
+ # shorewall6-lite |
877 |
+ if use lite6; then |
878 |
+ einfo "Installing ${MY_P_LITE6} ..." |
879 |
+ keepdir /var/lib/shorewall6-lite |
880 |
+ DESTDIR="${D%/}" ${MY_PN_LITE6}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE6}/install.sh failed" |
881 |
+ fi |
882 |
+ |
883 |
+ # shorewall-init |
884 |
+ if use init; then |
885 |
+ einfo "Installing ${MY_P_INIT} ..." |
886 |
+ DESTDIR="${D%/}" ${MY_PN_INIT}/install.sh shorewallrc.gentoo || die "${MY_PN_INIT}/install.sh failed" |
887 |
+ dodoc "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt |
888 |
+ |
889 |
+ if [ -f "${D}etc/logrotate.d/shorewall-init" ]; then |
890 |
+ # On Gentoo, shorewall-init will not create shorewall-ifupdown.log, |
891 |
+ # so we don't need a logrotate configuration file for shorewall-init |
892 |
+ einfo "Removing unused \"${D}etc/logrotate.d/shorewall-init\" ..." |
893 |
+ rm -rf "${D}"etc/logrotate.d/shorewall-init || die "Removing \"${D}etc/logrotate.d/shorewall-init\" failed" |
894 |
+ fi |
895 |
+ |
896 |
+ if [ -d "${D}etc/NetworkManager" ]; then |
897 |
+ # On Gentoo, we don't support NetworkManager |
898 |
+ # so we don't need this folder at all |
899 |
+ einfo "Removing unused \"${D}etc/NetworkManager\" ..." |
900 |
+ rm -rf "${D}"etc/NetworkManager || die "Removing \"${D}etc/NetworkManager\" failed" |
901 |
+ fi |
902 |
+ |
903 |
+ if [ -f "${D}usr/share/shorewall-init/ifupdown" ]; then |
904 |
+ # This script isn't supported on Gentoo |
905 |
+ rm -rf "${D}"usr/share/shorewall-init/ifupdown || die "Removing \"${D}usr/share/shorewall-init/ifupdown\" failed" |
906 |
+ fi |
907 |
+ fi |
908 |
+ |
909 |
+ if use doc; then |
910 |
+ einfo "Installing ${MY_P_DOCS} ..." |
911 |
+ docinto html && dodoc -r "${S}"/${MY_PN_DOCS}/* |
912 |
+ fi |
913 |
+} |
914 |
+ |
915 |
+pkg_postinst() { |
916 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
917 |
+ # This is a new installation |
918 |
+ |
919 |
+ # Show first steps for shorewall/shorewall6 |
920 |
+ local _PRODUCTS="" |
921 |
+ if use ipv4; then |
922 |
+ _PRODUCTS="shorewall" |
923 |
+ |
924 |
+ if use ipv6; then |
925 |
+ _PRODUCTS="${_PRODUCTS}/shorewall6" |
926 |
+ fi |
927 |
+ fi |
928 |
+ |
929 |
+ if [[ -n "${_PRODUCTS}" ]]; then |
930 |
+ elog "Before you can use ${_PRODUCTS}, you need to edit its configuration in:" |
931 |
+ elog "" |
932 |
+ elog " /etc/shorewall/shorewall.conf" |
933 |
+ |
934 |
+ if use ipv6; then |
935 |
+ elog " /etc/shorewall6/shorewall6.conf" |
936 |
+ fi |
937 |
+ |
938 |
+ elog "" |
939 |
+ elog "To activate your shorewall-based firewall on system start, please add ${_PRODUCTS} to your default runlevel:" |
940 |
+ elog "" |
941 |
+ elog " # rc-update add shorewall default" |
942 |
+ |
943 |
+ if use ipv6; then |
944 |
+ elog " # rc-update add shorewall6 default" |
945 |
+ fi |
946 |
+ fi |
947 |
+ |
948 |
+ # Show first steps for shorewall-lite/shorewall6-lite |
949 |
+ _PRODUCTS="" |
950 |
+ if use lite4; then |
951 |
+ _PRODUCTS="shorewall-lite" |
952 |
+ fi |
953 |
+ |
954 |
+ if use lite6; then |
955 |
+ if [[ -z "${_PRODUCTS}" ]]; then |
956 |
+ _PRODUCTS="shorewall6-lite" |
957 |
+ else |
958 |
+ _PRODUCTS="${_PRODUCTS}/shorewall6-lite" |
959 |
+ fi |
960 |
+ fi |
961 |
+ |
962 |
+ if [[ -n "${_PRODUCTS}" ]]; then |
963 |
+ if use ipv4; then |
964 |
+ elog "" |
965 |
+ fi |
966 |
+ |
967 |
+ elog "Before you can use ${_PRODUCTS}, you need to provide a configuration, which you can" |
968 |
+ elog "create using ${CATEGORY}/shorewall (with \"ipv4\" and or \"ipv6\" USE flag)." |
969 |
+ elog "" |
970 |
+ elog "To read more about ${_PRODUCTS}, please visit" |
971 |
+ elog " http://shorewall.net/CompiledPrograms.html" |
972 |
+ elog "" |
973 |
+ elog "To activate your shorewall-lite-based firewall on system start, please add ${PRODUCTS} to your default runlevel:" |
974 |
+ elog "" |
975 |
+ |
976 |
+ if use lite4; then |
977 |
+ elog " # rc-update add shorewall-lite default" |
978 |
+ fi |
979 |
+ |
980 |
+ if use lite6; then |
981 |
+ elog " # rc-update add shorewall6-lite default" |
982 |
+ fi |
983 |
+ fi |
984 |
+ |
985 |
+ if use init; then |
986 |
+ elog "" |
987 |
+ elog "To secure your system on boot, please add shorewall-init to your boot runlevel:" |
988 |
+ elog "" |
989 |
+ elog " # rc-update add shorewall-init boot" |
990 |
+ elog "" |
991 |
+ elog "and review \$PRODUCTS in" |
992 |
+ elog "" |
993 |
+ elog " /etc/conf.d/shorewall-init" |
994 |
+ fi |
995 |
+ |
996 |
+ fi |
997 |
+ |
998 |
+ if [[ -n "${REPLACING_VERSIONS}" && ${REPLACING_VERSIONS} < ${MY_MAJOR_RELEASE_NUMBER} ]]; then |
999 |
+ # This is an upgrade |
1000 |
+ |
1001 |
+ elog "You are upgrading from a previous major version. It is highly recommended that you read" |
1002 |
+ elog "" |
1003 |
+ elog " - /usr/share/doc/shorewall*/releasenotes.tx*" |
1004 |
+ elog " - http://shorewall.net/upgrade_issues.htm#idp8704902640" |
1005 |
+ |
1006 |
+ if use ipv4; then |
1007 |
+ elog "" |
1008 |
+ elog "You can auto-migrate your configuration using" |
1009 |
+ elog "" |
1010 |
+ elog " # shorewall update -A" |
1011 |
+ |
1012 |
+ if use ipv6; then |
1013 |
+ elog " # shorewall6 update -A" |
1014 |
+ fi |
1015 |
+ |
1016 |
+ elog "" |
1017 |
+ elog "But if you are not familiar with the \"shorewall[6] update\" command," |
1018 |
+ elog "please read the shorewall[6] man page first." |
1019 |
+ fi |
1020 |
+ fi |
1021 |
+ |
1022 |
+ if ! use init; then |
1023 |
+ elog "" |
1024 |
+ elog "Consider emerging ${CATEGORY}/${PN} with USE flag \"init\" to secure your system on boot" |
1025 |
+ elog "before your shorewall-based firewall is ready to start." |
1026 |
+ elog "" |
1027 |
+ elog "To read more about shorewall-init, please visit" |
1028 |
+ elog " http://www.shorewall.net/Shorewall-init.html" |
1029 |
+ fi |
1030 |
+ |
1031 |
+ if ! has_version "net-firewall/conntrack-tools"; then |
1032 |
+ elog "" |
1033 |
+ elog "Your Shorewall firewall can utilize \"conntrack\" from the \"net-firewall/conntrack-tools\"" |
1034 |
+ elog "package. if you want to use this feature, you need to install \"net-firewall/conntrack-tools\"!" |
1035 |
+ fi |
1036 |
+ |
1037 |
+ if ! has_version "dev-perl/Devel-NYTProf"; then |
1038 |
+ elog "" |
1039 |
+ elog "If you want to profile your Shorewall firewall you need to install \"dev-perl/Devel-NYTProf\"!" |
1040 |
+ fi |
1041 |
+} |