1 |
commit: 1f051acb49d0115c1967a90190d2e66c4ec789ed |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 14 12:24:32 2018 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 14 13:02:23 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f051acb |
7 |
|
8 |
app-admin/webmin: Drop old |
9 |
|
10 |
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
12 |
|
13 |
app-admin/webmin/Manifest | 2 - |
14 |
app-admin/webmin/files/gentoo-setup-1.791 | 438 ------------------------------ |
15 |
app-admin/webmin/webmin-1.791.ebuild | 308 --------------------- |
16 |
3 files changed, 748 deletions(-) |
17 |
|
18 |
diff --git a/app-admin/webmin/Manifest b/app-admin/webmin/Manifest |
19 |
index 47a2615820d..1869d7a965b 100644 |
20 |
--- a/app-admin/webmin/Manifest |
21 |
+++ b/app-admin/webmin/Manifest |
22 |
@@ -1,4 +1,2 @@ |
23 |
-DIST webmin-1.791-minimal.tar.gz 2635024 BLAKE2B a817063c722586c99f19156733c2efbc87515498ae0238ba393c1f0a7e59726d1a6b4f797469128a75b8ab3b92d8a3fcfc2117a281a42e2a993c44d8ca0b8514 SHA512 e8e7b43865399e918ef017d4d710b21cc7ce2f6566056faa82d756be29f038e07a20055978531f8785639c78339970fbfeabd4a4aa1fa4b331f3a344a78954d2 |
24 |
-DIST webmin-1.791.tar.gz 28800013 BLAKE2B 90bcb65131b559f5a0e45aea6cc2735269ddbc49e91604cc37cac0951423ef57c4e1e8496aff1105925f67bce1d2ea10392fa73ca3ed4d714d12f14c76da1e27 SHA512 4ba19f057ee70bc0a283753a6c190bbae15f0e2af1650ef1656c7b94e07a6750203ef3b7190f7abd544b25988446df6b174bf06191426893bd4224e54451e771 |
25 |
DIST webmin-1.881-minimal.tar.gz 2827351 BLAKE2B b8ea9964147c09c91413fbdad3b6a0e5161497296bb33b614161e370ac1292ac9cdf752483835fb279aa70ba41eb09f2774d08caa58861049e467346ad0b64ff SHA512 5b855c5562a6eb6a8fd836e3bd1dcc30696b7f63776d0f8b5ee69f5e219c749210436315fe5fd8f811f4f19e02fe4d7d3cff451a831b085101081b97b8ce794d |
26 |
DIST webmin-1.881.tar.gz 28903876 BLAKE2B beaab3282ccbbe7716fe35e62ee93e64b636f420fa9235398954904b5e14888cdc4b0acd5126184dcdab59274d3e5b71a7997df3e73e18c55849b7197f024971 SHA512 eab1acb53aca5e947bb9fac1c08a32e9eeca2903bc19595fbc8e19895bda8f4c3432550c2a87cf8c2b577b223b97566b046b7c339bd8754266544f5777560cc7 |
27 |
|
28 |
diff --git a/app-admin/webmin/files/gentoo-setup-1.791 b/app-admin/webmin/files/gentoo-setup-1.791 |
29 |
deleted file mode 100644 |
30 |
index 680dfbb5303..00000000000 |
31 |
--- a/app-admin/webmin/files/gentoo-setup-1.791 |
32 |
+++ /dev/null |
33 |
@@ -1,438 +0,0 @@ |
34 |
-#!/bin/sh |
35 |
-# gentoo-setup.sh |
36 |
-# |
37 |
-# Version 1.2 |
38 |
-# |
39 |
-# A modified original Webmin setup.sh script to comply with Gentoo specifics |
40 |
-# |
41 |
-# Modification done by: PhobosK <phobosk@××××.net> |
42 |
-# |
43 |
-# This script runs after the webmin archive is installed, and in the pkg_config() phase. |
44 |
-# It does setup the various config files of Webmin depending on if it is |
45 |
-# a new install, an upgrade or a reset. |
46 |
- |
47 |
-LANG= |
48 |
-export LANG |
49 |
- |
50 |
-if [ -z ${wadir} ]; then |
51 |
- echo "You can't run this script outside of the 'emerge --config app-admin/webmin' command." |
52 |
- exit 1 |
53 |
-fi |
54 |
- |
55 |
-# All things we do is from the Webmin install dir - $wadir |
56 |
-cd $wadir |
57 |
- |
58 |
- |
59 |
-# Are we hard resetting everything? |
60 |
-# If yes, we do: |
61 |
-# 1. Run the specific Webmin $wadir/run-uninstalls.pl |
62 |
-# It runs all uninstall.pl files in every module's folder. |
63 |
-# They delete all the set specific Webmin cron jobs. |
64 |
-# If bumping you should go through these files using the command: |
65 |
-# find . -name uninstall.pl -exec cat {} \; -print |
66 |
-# 2. Delete the whole /etc/webmin content, keeping only the gentoo .keep_* files |
67 |
-if [ "$reset" = "hard" ]; then |
68 |
- echo "Running Webmin's specific uninstall procedures.. (Please ignore any possible errors)" |
69 |
- (WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir LANG= "$wadir/run-uninstalls.pl") |
70 |
- echo "..done" |
71 |
- echo "" |
72 |
- |
73 |
- echo "Deleting the content of user's config folder: $config_dir .." |
74 |
- find $config_dir ! -name '.keep_*' -delete 2>/dev/null |
75 |
- echo "..done" |
76 |
- echo "" |
77 |
-fi |
78 |
- |
79 |
- |
80 |
-# Are we soft resetting? |
81 |
-# If yes we do: |
82 |
-# - Delete the $config_dir/config file so we get new config values |
83 |
-if [ "$reset" = "soft" ]; then |
84 |
- echo "Deleting the user's $config_dir/config file.." |
85 |
- if [ -f "$config_dir/config" ]; then |
86 |
- rm -f "$config_dir/config" |
87 |
- fi |
88 |
- echo "..done" |
89 |
- echo "" |
90 |
-fi |
91 |
- |
92 |
- |
93 |
-# Get all available modules of this version |
94 |
-allmods=`echo */module.info | sed -e 's/\/module.info//g'` |
95 |
- |
96 |
-# Get current Webmin version |
97 |
-ver=`cat "$wadir/version"` |
98 |
- |
99 |
-if [ -r "$config_dir/config" ]; then |
100 |
- upgrading=1 |
101 |
-fi |
102 |
- |
103 |
- |
104 |
-# Check if upgrading from an old version |
105 |
-if [ "$upgrading" = 1 ]; then |
106 |
- echo "Updating existant Webmin's config files.." |
107 |
- |
108 |
- # Get current var path |
109 |
- if [ -r "$config_dir/var-path" ]; then |
110 |
- _var_dir=`cat $config_dir/var-path` |
111 |
- if [ -n ${_var_dir} ]; then |
112 |
- var_dir=${_var_dir} |
113 |
- fi |
114 |
- fi |
115 |
- |
116 |
- # Get current perl path |
117 |
- if [ -r "$config_dir/perl-path" ]; then |
118 |
- _perl=`cat $config_dir/perl-path` |
119 |
- if [ -n ${_perl} ]; then |
120 |
- perl=${_perl} |
121 |
- fi |
122 |
- fi |
123 |
- |
124 |
- # Get old os name and version |
125 |
- os_type=`grep "^os_type=" $config_dir/config | sed -e 's/os_type=//g'` |
126 |
- os_version=`grep "^os_version=" $config_dir/config | sed -e 's/os_version=//g'` |
127 |
- real_os_type=`grep "^real_os_type=" $config_dir/config | sed -e 's/real_os_type=//g'` |
128 |
- real_os_version=`grep "^real_os_version=" $config_dir/config | sed -e 's/real_os_version=//g'` |
129 |
- |
130 |
- # Get port, ssl, no_ssl2, no_ssl3, ssl_redirect, no_sslcompression, ssl_honorcipherorder, no_tls1, no_tls1_1 and keyfile |
131 |
- port=`grep "^port=" $config_dir/miniserv.conf | sed -e 's/port=//g'` |
132 |
- ssl=`grep "^ssl=" $config_dir/miniserv.conf | sed -e 's/ssl=//g'` |
133 |
- no_ssl2=`grep "^no_ssl2=" $config_dir/miniserv.conf | sed -e 's/no_ssl2=//g'` |
134 |
- no_ssl3=`grep "^no_ssl3=" $config_dir/miniserv.conf | sed -e 's/no_ssl3=//g'` |
135 |
- ssl_redirect=`grep "^ssl_redirect=" $config_dir/miniserv.conf | sed -e 's/ssl_redirect=//g'` |
136 |
- ssl_honorcipherorder=`grep "^ssl_honorcipherorder=" $config_dir/miniserv.conf | sed -e 's/ssl_honorcipherorder=//g'` |
137 |
- no_sslcompression=`grep "^no_sslcompression=" $config_dir/miniserv.conf | sed -e 's/no_sslcompression=//g'` |
138 |
- no_tls1=`grep "^no_tls1=" $config_dir/miniserv.conf | sed -e 's/no_tls1=//g'` |
139 |
- no_tls1_1=`grep "^no_tls1_1=" $config_dir/miniserv.conf | sed -e 's/no_tls1_1=//g'` |
140 |
- keyfile=`grep "^keyfile=" $config_dir/miniserv.conf | sed -e 's/keyfile=//g'` |
141 |
- |
142 |
- # Update ACLs |
143 |
- $perl "$wadir/newmods.pl" $config_dir $allmods |
144 |
- |
145 |
- # Update miniserv.conf with new root directory, mime types file and server info |
146 |
- grep -v "^root=" $config_dir/miniserv.conf | grep -v "^mimetypes=" | grep -v "^server=" >$tempdir/$$.miniserv.conf |
147 |
- mv $tempdir/$$.miniserv.conf $config_dir/miniserv.conf |
148 |
- echo "root=$wadir" >> $config_dir/miniserv.conf |
149 |
- echo "mimetypes=$wadir/mime.types" >> $config_dir/miniserv.conf |
150 |
- echo "server=MiniServ/$ver" >> $config_dir/miniserv.conf |
151 |
- grep logout= $config_dir/miniserv.conf >/dev/null |
152 |
- if [ $? != "0" ]; then |
153 |
- echo "logout=$config_dir/logout-flag" >> $config_dir/miniserv.conf |
154 |
- fi |
155 |
- |
156 |
- # Remove old cache of module infos |
157 |
- rm -f $config_dir/module.infos.cache |
158 |
- echo "..done" |
159 |
- echo "" |
160 |
-else |
161 |
- # Create webserver's new config files |
162 |
- echo "Creating Webmin's new config files.." |
163 |
- |
164 |
- echo $perl > $config_dir/perl-path |
165 |
- echo $var_dir > $config_dir/var-path |
166 |
- |
167 |
- # Create a totally new conf file |
168 |
- cfile=$config_dir/miniserv.conf |
169 |
- echo "port=$port" > $cfile |
170 |
- echo "root=$wadir" >> $cfile |
171 |
- echo "mimetypes=$wadir/mime.types" >> $cfile |
172 |
- echo "addtype_cgi=internal/cgi" >> $cfile |
173 |
- echo "realm=Webmin Server" >> $cfile |
174 |
- echo "logfile=$var_dir/miniserv.log" >> $cfile |
175 |
- echo "errorlog=$var_dir/miniserv.error" >> $cfile |
176 |
- echo "pidfile=$pidfile" >> $cfile |
177 |
- echo "logtime=168" >> $cfile |
178 |
- echo "ppath=$ppath" >> $cfile |
179 |
- echo "ssl=$ssl" >> $cfile |
180 |
- echo "no_ssl2=$no_ssl2" >> $cfile |
181 |
- echo "no_ssl3=$no_ssl3" >> $cfile |
182 |
- echo "ssl_redirect=$ssl_redirect" >> $cfile |
183 |
- echo "ssl_honorcipherorder=$ssl_honorcipherorder" >> $cfile |
184 |
- echo "no_sslcompression=$no_sslcompression" >> $cfile |
185 |
- echo "no_tls1=$no_tls1" >> $cfile |
186 |
- echo "no_tls1_1=$no_tls1_1" >> $cfile |
187 |
- echo "keyfile=$keyfile" >> $cfile |
188 |
- echo "env_WEBMIN_CONFIG=$config_dir" >> $cfile |
189 |
- echo "env_WEBMIN_VAR=$var_dir" >> $cfile |
190 |
- echo "atboot=$atboot" >> $cfile |
191 |
- echo "logout=$config_dir/logout-flag" >> $cfile |
192 |
- echo "listen=10000" >> $cfile |
193 |
- echo "denyfile=\\.pl\$" >> $cfile |
194 |
- echo "log=1" >> $cfile |
195 |
- echo "blockhost_failures=5" >> $cfile |
196 |
- echo "blockhost_time=60" >> $cfile |
197 |
- echo "syslog=1" >> $cfile |
198 |
- echo "session=1" >> $cfile |
199 |
- echo "premodules=WebminCore" >> $cfile |
200 |
- echo "server=MiniServ/$ver" >> $cfile |
201 |
- |
202 |
- # Append package-specific info to config file. |
203 |
- # miniserv-conf can be created by upstream or by us in src_install phase (see there). |
204 |
- if [ -f "$wadir/miniserv-conf" ]; then |
205 |
- cat "$wadir/miniserv-conf" >>$cfile |
206 |
- fi |
207 |
- |
208 |
- # Create the default user allowed to login - root only |
209 |
- login="root" |
210 |
- |
211 |
- if [ -r /etc/shadow ]; then |
212 |
- #crypt=`grep "^root:" /etc/shadow | cut -f 2 -d :` |
213 |
- crypt=x |
214 |
- else |
215 |
- crypt=`grep "^root:" /etc/passwd | cut -f 2 -d :` |
216 |
- fi |
217 |
- |
218 |
- ufile=$config_dir/miniserv.users |
219 |
- echo "$login:$crypt:0" > $ufile |
220 |
- chmod 600 $ufile |
221 |
- |
222 |
- |
223 |
- echo "userfile=$ufile" >> $cfile |
224 |
- chmod 600 $cfile |
225 |
- echo "..done" |
226 |
- echo "" |
227 |
- |
228 |
- echo "Creating access control file.." |
229 |
- afile=$config_dir/webmin.acl |
230 |
- echo "$login: $allmods" > $afile |
231 |
- chmod 600 $afile |
232 |
- echo "..done" |
233 |
- echo "" |
234 |
-fi |
235 |
- |
236 |
- |
237 |
-# Create start, stop, restart and reload Gentoo compliant Webmin scripts |
238 |
-# We use sys-apps/openrc functions which is already pulled by sys-apps/baselayout |
239 |
-# or systemctl if we run under systemd |
240 |
-echo "Creating start and stop scripts.." |
241 |
-rm -f $config_dir/{start,stop,restart,reload} |
242 |
- |
243 |
-# The start script in /etc/webmin (Gentoo compliant) |
244 |
-cat <<END >>"$config_dir/start" |
245 |
-#!/bin/sh |
246 |
- |
247 |
-if [ ! -f "${pidfile}" ]; then |
248 |
- if [[ -d /run/systemd/system ]] ; then |
249 |
- systemctl start webmin.service |
250 |
- else |
251 |
- rc-service --ifexists -- webmin start |
252 |
- fi |
253 |
-fi |
254 |
-END |
255 |
- |
256 |
-# The stop script in /etc/webmin (Gentoo compliant) |
257 |
-cat <<END >>"$config_dir/stop" |
258 |
-#!/bin/sh |
259 |
- |
260 |
-if [[ -d /run/systemd/system ]] ; then |
261 |
- systemctl stop webmin.service |
262 |
-else |
263 |
- rc-service --ifexists -- webmin --ifstarted stop |
264 |
-fi |
265 |
-END |
266 |
- |
267 |
-# The restart script in /etc/webmin (Gentoo compliant) |
268 |
-cat <<END >>"$config_dir/restart" |
269 |
-#!/bin/sh |
270 |
- |
271 |
-if [[ -d /run/systemd/system ]] ; then |
272 |
- systemctl try-restart webmin.service |
273 |
-else |
274 |
- rc-service --ifexists -- webmin --ifstarted restart |
275 |
-fi |
276 |
-END |
277 |
- |
278 |
-# The reload script in /etc/webmin (Gentoo compliant) |
279 |
-cat <<END >>"$config_dir/reload" |
280 |
-#!/bin/sh |
281 |
- |
282 |
-if [[ -d /run/systemd/system ]] ; then |
283 |
- systemctl reload-or-try-restart webmin.service |
284 |
-else |
285 |
- rc-service --ifexists -- webmin --ifstarted reload |
286 |
-fi |
287 |
-END |
288 |
- |
289 |
-chmod 755 $config_dir/{start,stop,restart,reload} |
290 |
-echo "..done" |
291 |
-echo "" |
292 |
- |
293 |
- |
294 |
-if [ "$upgrading" = 1 ]; then |
295 |
- echo "Updating other config files.." |
296 |
-else |
297 |
- echo "Copying other config files.." |
298 |
-fi |
299 |
- |
300 |
-# This just copies and merges the Webmin's release config files, with user's in the /etc/webmin folder |
301 |
-newmods=`$perl "$wadir/copyconfig.pl" "$os_type/$real_os_type" "$os_version/$real_os_version" "$wadir" $config_dir "" $allmods` |
302 |
-if [ "$upgrading" != 1 ]; then |
303 |
- # Store the OS and version |
304 |
- echo "os_type=$os_type" >> $config_dir/config |
305 |
- echo "os_version=$os_version" >> $config_dir/config |
306 |
- echo "real_os_type=$real_os_type" >> $config_dir/config |
307 |
- echo "real_os_version=$real_os_version" >> $config_dir/config |
308 |
- |
309 |
- # Turn on logging by default |
310 |
- echo "log=1" >> $config_dir/config |
311 |
- |
312 |
- # Disallow unknown referers by default |
313 |
- echo "referers_none=1" >>$config_dir/config |
314 |
-else |
315 |
- # one-off hack to set log variable in config from miniserv.conf |
316 |
- grep log= $config_dir/config >/dev/null |
317 |
- if [ "$?" = "1" ]; then |
318 |
- grep log= $config_dir/miniserv.conf >> $config_dir/config |
319 |
- grep logtime= $config_dir/miniserv.conf >> $config_dir/config |
320 |
- grep logclear= $config_dir/miniserv.conf >> $config_dir/config |
321 |
- fi |
322 |
- |
323 |
- # Disallow unknown referers if not set |
324 |
- grep referers_none= $config_dir/config >/dev/null |
325 |
- if [ "$?" != "0" ]; then |
326 |
- echo "referers_none=1" >>$config_dir/config |
327 |
- fi |
328 |
-fi |
329 |
-echo $ver > $config_dir/version |
330 |
-echo "..done" |
331 |
-echo "" |
332 |
- |
333 |
-# Set passwd_ fields in miniserv.conf from global config |
334 |
-for field in passwd_file passwd_uindex passwd_pindex passwd_cindex passwd_mindex; do |
335 |
- grep $field= $config_dir/miniserv.conf >/dev/null |
336 |
- if [ "$?" != "0" ]; then |
337 |
- grep $field= $config_dir/config >> $config_dir/miniserv.conf |
338 |
- fi |
339 |
-done |
340 |
-grep passwd_mode= $config_dir/miniserv.conf >/dev/null |
341 |
-if [ "$?" != "0" ]; then |
342 |
- echo passwd_mode=0 >> $config_dir/miniserv.conf |
343 |
-fi |
344 |
- |
345 |
-grep ssl_honorcipherorder= $config_dir/miniserv.conf >/dev/null |
346 |
-if [ "$?" != "0" ]; then |
347 |
- echo ssl_honorcipherorder=1 >> $config_dir/miniserv.conf |
348 |
-fi |
349 |
- |
350 |
-# Disable SSL compression to defeat BEAST attack |
351 |
-grep no_sslcompression= $config_dir/miniserv.conf >/dev/null |
352 |
-if [ "$?" != "0" ]; then |
353 |
- echo no_sslcompression=1 >> $config_dir/miniserv.conf |
354 |
-fi |
355 |
- |
356 |
-# Tighten SSL security |
357 |
-grep no_ssl2= $config_dir/miniserv.conf >/dev/null |
358 |
-if [ "$?" != "0" ]; then |
359 |
- echo no_ssl2=1 >> $config_dir/miniserv.conf |
360 |
-fi |
361 |
- |
362 |
-grep no_ssl3= $config_dir/miniserv.conf >/dev/null |
363 |
-if [ "$?" != "0" ]; then |
364 |
- echo no_ssl3=1 >> $config_dir/miniserv.conf |
365 |
-fi |
366 |
- |
367 |
-grep no_tls1= $config_dir/miniserv.conf >/dev/null |
368 |
-if [ "$?" != "0" ]; then |
369 |
- echo no_tls1=1 >> $config_dir/miniserv.conf |
370 |
-fi |
371 |
- |
372 |
-grep no_tls1_1= $config_dir/miniserv.conf >/dev/null |
373 |
-if [ "$?" != "0" ]; then |
374 |
- echo no_tls1_1=1 >> $config_dir/miniserv.conf |
375 |
-fi |
376 |
- |
377 |
-# Make Perl crypt MD5 the default |
378 |
-grep md5pass= $config_dir/config >/dev/null |
379 |
-if [ "$?" != "0" ]; then |
380 |
- echo md5pass=1 >> $config_dir/config |
381 |
-fi |
382 |
- |
383 |
-# Set a special theme if none was set before |
384 |
-if [ "$theme" = "" ]; then |
385 |
- theme=`cat "$wadir/defaulttheme" 2>/dev/null` |
386 |
-fi |
387 |
-oldthemeline=`grep "^theme=" $config_dir/config` |
388 |
-oldtheme=`echo $oldthemeline | sed -e 's/theme=//g'` |
389 |
-if [ "$theme" != "" ] && [ "$oldthemeline" = "" ] && [ -d "$wadir/$theme" ]; then |
390 |
- themelist=$theme |
391 |
-fi |
392 |
- |
393 |
-# Set a special overlay if none was set before |
394 |
-if [ "$overlay" = "" ]; then |
395 |
- overlay=`cat "$wadir/defaultoverlay" 2>/dev/null` |
396 |
-fi |
397 |
-if [ "$overlay" != "" ] && [ "$theme" != "" ] && [ -d "$wadir/$overlay" ]; then |
398 |
- themelist="$themelist $overlay" |
399 |
-fi |
400 |
- |
401 |
-# Apply the theme and maybe overlay |
402 |
-if [ "$themelist" != "" ]; then |
403 |
- echo "theme=$themelist" >> $config_dir/config |
404 |
- echo "preroot=$themelist" >> $config_dir/miniserv.conf |
405 |
-fi |
406 |
- |
407 |
-# If the old blue-theme is still in use, change it (new in 1.730) |
408 |
-oldtheme=`grep "^theme=" $config_dir/config | sed -e 's/theme=//g'` |
409 |
-if [ "$oldtheme" = "blue-theme" ]; then |
410 |
- sed -i -e 's/theme=blue-theme/theme=gray-theme/g' $config_dir/config |
411 |
- sed -i -e 's/preroot=blue-theme/preroot=gray-theme/g' $config_dir/miniserv.conf |
412 |
-fi |
413 |
- |
414 |
-# Set the product field in the global config |
415 |
-grep product= $config_dir/config >/dev/null |
416 |
-if [ "$?" != "0" ]; then |
417 |
- echo product=webmin >> $config_dir/config |
418 |
-fi |
419 |
- |
420 |
-# If password delays are not specifically disabled, enable them |
421 |
-grep passdelay= $config_dir/miniserv.conf >/dev/null |
422 |
-if [ "$?" != "0" ]; then |
423 |
- echo passdelay=1 >> $config_dir/miniserv.conf |
424 |
-fi |
425 |
- |
426 |
- |
427 |
-echo "Changing ownership and permissions.." |
428 |
-# Make all config dirs non-world-readable |
429 |
-for m in $newmods; do |
430 |
- chown -R root:root $config_dir/$m |
431 |
- chmod -R og-rw $config_dir/$m |
432 |
-done |
433 |
- |
434 |
-# Make miniserv config files non-world-readable |
435 |
-for f in miniserv.conf miniserv.users; do |
436 |
- chown -R root:root $config_dir/$f |
437 |
- chmod -R og-rw $config_dir/$f |
438 |
-done |
439 |
-chmod +r $config_dir/version |
440 |
- |
441 |
-# Fix up bad permissions from some older installs |
442 |
-for m in ldap-client ldap-server ldap-useradmin mailboxes mysql postgresql servers virtual-server; do |
443 |
- if [ -d "$config_dir/$m" ]; then |
444 |
- chown root:root $config_dir/$m |
445 |
- chmod og-rw $config_dir/$m |
446 |
- chmod og-rw $config_dir/$m/config 2>/dev/null |
447 |
- fi |
448 |
-done |
449 |
-echo "..done" |
450 |
-echo "" |
451 |
- |
452 |
- |
453 |
-# This executes all postinstall.pl for every module |
454 |
-# If you do bump, you should look at the specific changes they do with this command in root folder: |
455 |
-# find . -name postinstall.pl -exec cat {} \; -print |
456 |
-# Generally they are safe to run 'cause they change only user's config in /etc/webmin |
457 |
-# or setup some cron jobs |
458 |
-if [ "$nopostinstall" = "" ]; then |
459 |
- echo "Running postinstall scripts.. (Please ignore any possible errors)" |
460 |
- (cd "$wadir" ; WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir "$wadir/run-postinstalls.pl") |
461 |
- echo "..done" |
462 |
- echo "" |
463 |
-fi |
464 |
- |
465 |
-# Enable background collection |
466 |
-if [ "$upgrading" != 1 -a -r $config_dir/system-status/enable-collection.pl ]; then |
467 |
- echo "Enabling background status collection.. (Please ignore any possible errors)" |
468 |
- $config_dir/system-status/enable-collection.pl 5 |
469 |
- echo "..done" |
470 |
- echo "" |
471 |
-fi |
472 |
|
473 |
diff --git a/app-admin/webmin/webmin-1.791.ebuild b/app-admin/webmin/webmin-1.791.ebuild |
474 |
deleted file mode 100644 |
475 |
index c69abb400e6..00000000000 |
476 |
--- a/app-admin/webmin/webmin-1.791.ebuild |
477 |
+++ /dev/null |
478 |
@@ -1,308 +0,0 @@ |
479 |
-# Copyright 1999-2016 Gentoo Foundation |
480 |
-# Distributed under the terms of the GNU General Public License v2 |
481 |
- |
482 |
-EAPI="5" |
483 |
- |
484 |
-inherit eutils pam ssl-cert systemd |
485 |
- |
486 |
-DESCRIPTION="A web-based Unix systems administration interface" |
487 |
-HOMEPAGE="http://www.webmin.com/" |
488 |
-SRC_URI="minimal? ( mirror://sourceforge/webadmin/${P}-minimal.tar.gz ) |
489 |
- !minimal? ( mirror://sourceforge/webadmin/${P}.tar.gz )" |
490 |
- |
491 |
-LICENSE="BSD GPL-2" |
492 |
-SLOT="0" |
493 |
- |
494 |
-KEYWORDS="~amd64 ~x86" |
495 |
- |
496 |
-# NOTE: The ssl flag auto added by ssl-cert eclass is not used actually |
497 |
-# because openssl is forced by dev-perl/Net-SSLeay |
498 |
-IUSE="minimal +ssl mysql postgres ldap" |
499 |
-REQUIRED_USE="minimal? ( !mysql !postgres !ldap )" |
500 |
- |
501 |
-# All the required perl modules can be found easily using (in Webmin's root src dir): |
502 |
-# find . -name cpan_modules.pl -exec grep "::" {} \; |
503 |
-# NOTE: If Webmin doesn't find the required perl modules, it offers(runtime) the user |
504 |
-# to install them using the in-built cpan module, and this will mess up perl on the system |
505 |
-# That's why some modules are forced without a use flag |
506 |
-# NOTE: pam, ssl and dnssec-tools deps are forced for security and Gentoo compliance installation reasons |
507 |
-DEPEND="virtual/perl-MIME-Base64 |
508 |
- virtual/perl-Socket |
509 |
- virtual/perl-Sys-Syslog |
510 |
- virtual/perl-Time-HiRes |
511 |
- virtual/perl-Time-Local |
512 |
- dev-perl/Authen-Libwrap |
513 |
- dev-perl/IO-Tty |
514 |
- dev-perl/MD5 |
515 |
- dev-perl/Net-SSLeay |
516 |
- dev-perl/Authen-PAM |
517 |
- dev-perl/Sys-Hostname-Long |
518 |
- >=net-dns/dnssec-tools-1.13 |
519 |
- !minimal? ( |
520 |
- mysql? ( dev-perl/DBD-mysql ) |
521 |
- postgres? ( dev-perl/DBD-Pg ) |
522 |
- ldap? ( dev-perl/perl-ldap ) |
523 |
- dev-perl/XML-Generator |
524 |
- dev-perl/XML-Parser |
525 |
- )" |
526 |
-RDEPEND="${DEPEND}" |
527 |
- |
528 |
-src_prepare() { |
529 |
- local perl="$( which perl )" |
530 |
- |
531 |
- # Remove the unnecessary and incompatible files |
532 |
- rm -rf acl/Authen-SolarisRBAC-0.1* |
533 |
- if ! use minimal ; then |
534 |
- rm -rf {format,{bsd,hpux,sgi}exports,zones,rbac} |
535 |
- rm -f mount/{free,net,open}bsd-mounts* |
536 |
- rm -f mount/macos-mounts* |
537 |
- fi |
538 |
- |
539 |
- # For security reasons remove the SSL certificate that comes with Webmin |
540 |
- # We will create our own later |
541 |
- rm -f miniserv.pem |
542 |
- |
543 |
- # Remove the Webmin setup scripts to avoid Webmin in runtime to mess up config |
544 |
- # We will use our own later |
545 |
- rm -f setup.{sh,pl} |
546 |
- |
547 |
- # Set the installation type/mode to Gentoo |
548 |
- echo "gentoo" > install-type |
549 |
- |
550 |
- # Fix the permissions of the install files |
551 |
- chmod -R og-w "${S}" |
552 |
- |
553 |
- # Since we should not modify any files after install |
554 |
- # we set the perl path in all cgi and pl files here using Webmin's routines |
555 |
- # The pl file is Prefix safe and works only on provided input, no other filesystem files |
556 |
- ebegin "Fixing perl path in source files" |
557 |
- (find "${S}" -name '*.cgi' -print ; find "${S}" -name '*.pl' -print) | $perl "${S}"/perlpath.pl $perl - |
558 |
- eend $? |
559 |
-} |
560 |
- |
561 |
-src_install() { |
562 |
- # Create config dir and keep |
563 |
- diropts -m0755 |
564 |
- dodir /etc/webmin |
565 |
- keepdir /etc/webmin |
566 |
- |
567 |
- # Create install dir |
568 |
- # Third party modules installed through Webmin go here too, so keep |
569 |
- dodir /usr/libexec/webmin |
570 |
- keepdir /usr/libexec/webmin |
571 |
- |
572 |
- # Copy our own setup script to installation folder |
573 |
- insinto /usr/libexec/webmin |
574 |
- newins "${FILESDIR}"/gentoo-setup-${PV} gentoo-setup.sh |
575 |
- fperms 0744 /usr/libexec/webmin/gentoo-setup.sh |
576 |
- |
577 |
- # This is here if we ever want in future ebuilds to add some specific |
578 |
- # config values in the /etc/webmin/miniserv.conf |
579 |
- # The format of this file should be the same as the one of miniserv.conf: |
580 |
- # var=value |
581 |
- # |
582 |
- # Uncomment it if you use such file. Before that check if upstream |
583 |
- # has this file in root dir too. |
584 |
- #newins "${FILESDIR}/miniserv-conf" miniserv-conf |
585 |
- |
586 |
- # Create the log dir and keep |
587 |
- diropts -m0700 |
588 |
- dodir /var/log/webmin |
589 |
- keepdir /var/log/webmin |
590 |
- |
591 |
- # Create the init.d file and put the neccessary variables there |
592 |
- newinitd "${FILESDIR}"/init.d.webmin webmin |
593 |
- sed -i \ |
594 |
- -e "s:%exe%:${EROOT}usr/libexec/webmin/miniserv.pl:" \ |
595 |
- -e "s:%pid%:${EROOT}var/run/webmin.pid:" \ |
596 |
- -e "s:%conf%:${EROOT}etc/webmin/miniserv.conf:" \ |
597 |
- -e "s:%config%:${EROOT}etc/webmin/config:" \ |
598 |
- -e "s:%perllib%:${EROOT}usr/libexec/webmin:" \ |
599 |
- "${ED}etc/init.d/webmin" \ |
600 |
- || die "Failed to patch the webmin init file" |
601 |
- |
602 |
- # Create the systemd service file and put the neccessary variables there |
603 |
- systemd_newunit "${FILESDIR}"/webmin.service webmin.service |
604 |
- sed -i \ |
605 |
- -e "s:%exe%:${EROOT}usr/libexec/webmin/miniserv.pl:" \ |
606 |
- -e "s:%pid%:${EROOT}var/run/webmin.pid:" \ |
607 |
- -e "s:%conf%:${EROOT}etc/webmin/miniserv.conf:" \ |
608 |
- -e "s:%config%:${EROOT}etc/webmin/config:" \ |
609 |
- -e "s:%perllib%:${EROOT}usr/libexec/webmin:" \ |
610 |
- "${ED}$(_systemd_get_systemunitdir)/webmin.service" \ |
611 |
- || die "Failed to patch the webmin systemd service file" |
612 |
- |
613 |
- # Setup pam |
614 |
- pamd_mimic system-auth webmin auth account session |
615 |
- |
616 |
- # Copy files to installation folder |
617 |
- ebegin "Copying install files to destination" |
618 |
- cp -pPR "${S}"/* "${ED}usr/libexec/webmin" |
619 |
- eend $? |
620 |
-} |
621 |
- |
622 |
-pkg_preinst() { |
623 |
- # First stop service if running so Webmin to not messup our config |
624 |
- ebegin "Stopping any running Webmin instance prior merging" |
625 |
- if systemd_is_booted ; then |
626 |
- systemctl stop webmin.service 2>/dev/null |
627 |
- else |
628 |
- rc-service --ifexists -- webmin --ifstarted stop |
629 |
- fi |
630 |
- eend $? |
631 |
-} |
632 |
- |
633 |
-pkg_postinst() { |
634 |
- # Run pkg_config phase first - non interactively |
635 |
- export INTERACTIVE="no" |
636 |
- pkg_config |
637 |
- # Every next time pkg_config should be interactive |
638 |
- INTERACTIVE="yes" |
639 |
- |
640 |
- ewarn |
641 |
- ewarn "Bare in mind that not all Webmin modules are Gentoo tweaked and may have some issues." |
642 |
- ewarn "Always be careful when using modules that modify init entries, do update of webmin, install CPAN modules etc." |
643 |
- ewarn "To avoid problems, please before using any module, look at its configuration options first." |
644 |
- ewarn "(Usually there is a link at top in the right pane of Webmin for configuring the module.)" |
645 |
- ewarn |
646 |
- if systemd_is_booted ; then |
647 |
- elog "- To make Webmin start at boot time, run: 'systemctl enable webmin.service'" |
648 |
- else |
649 |
- elog "- To make Webmin start at boot time, run: 'rc-update add webmin default'" |
650 |
- fi |
651 |
- elog "- The default URL to connect to Webmin is: https://localhost:10000" |
652 |
- elog "- The default user that can login is: root" |
653 |
- elog "- To reconfigure Webmin in case of problems run 'emerge --config app-admin/webmin'" |
654 |
-} |
655 |
- |
656 |
-pkg_prerm() { |
657 |
- # First stop service if running - we do not want Webmin to mess up config |
658 |
- ebegin "Stopping any running Webmin instance prior unmerging" |
659 |
- if systemd_is_booted ; then |
660 |
- systemctl stop webmin.service 2>/dev/null |
661 |
- else |
662 |
- rc-service --ifexists -- webmin --ifstarted stop |
663 |
- fi |
664 |
- eend $? |
665 |
-} |
666 |
- |
667 |
-pkg_postrm() { |
668 |
- # If removing webmin completely, remind the user for the Webmin's own cron jobs. |
669 |
- if [[ ! ${REPLACED_BY_VERSION} ]]; then |
670 |
- ewarn |
671 |
- ewarn "You have uninstalled Webmin, so have in mind that all cron jobs scheduled" |
672 |
- ewarn "by Webmin for its own modules, are left active and they will fail when Webmin is missing." |
673 |
- ewarn "To fix this just disable them if you intend to use Webmin again," |
674 |
- ewarn "OR delete them if not." |
675 |
- ewarn |
676 |
- fi |
677 |
-} |
678 |
- |
679 |
-pkg_config(){ |
680 |
- # First stop service if running |
681 |
- ebegin "Stopping any running Webmin instance" |
682 |
- if systemd_is_booted ; then |
683 |
- systemctl stop webmin.service 2>/dev/null |
684 |
- else |
685 |
- rc-service --ifexists -- webmin --ifstarted stop |
686 |
- fi |
687 |
- eend $? |
688 |
- |
689 |
- # Next set the default reset variable to 'none' |
690 |
- # reset/_reset can be: |
691 |
- # 'none' - does not reset anything, just upgrades if a conf is present |
692 |
- # OR installs new conf if a conf is missing |
693 |
- # 'soft' - deletes only $config_dir/config file and thus resetting most |
694 |
- # conf values to their defaults. Keeps the specific Webmin cron jobs |
695 |
- # 'hard' - deletes all files in $config_dir (keeping the .keep_* Gentoo file) |
696 |
- # and thus resetting all Webmin. Deletes the specific Webmin cron jobs too. |
697 |
- local _reset="none" |
698 |
- |
699 |
- # If in interactive mode ask user what should we do |
700 |
- if [[ "${INTERACTIVE}" = "yes" ]]; then |
701 |
- einfo |
702 |
- einfo "Please enter the number of the action you would like to perform?" |
703 |
- einfo |
704 |
- einfo "1. Update configuration" |
705 |
- einfo " (keeps old config options and adds the new ones)" |
706 |
- einfo "2. Soft reset configuration" |
707 |
- einfo " (keeps some old config options, the other options are set to default)" |
708 |
- ewarn " All Webmin users will be reset" |
709 |
- einfo "3. Hard reset configuration" |
710 |
- einfo " (all options including module options are set to default)" |
711 |
- ewarn " You will lose all Webmin configuration options you have done till now" |
712 |
- einfo "4. Exit this configuration utility (default)" |
713 |
- while [ "$correct" != "true" ] ; do |
714 |
- read answer |
715 |
- if [[ "$answer" = "1" ]] ; then |
716 |
- _reset="none" |
717 |
- correct="true" |
718 |
- elif [[ "$answer" = "2" ]] ; then |
719 |
- _reset="soft" |
720 |
- correct="true" |
721 |
- elif [[ "$answer" = "3" ]] ; then |
722 |
- _reset="hard" |
723 |
- correct="true" |
724 |
- elif [ "$answer" = "4" -o "$answer" = "" ] ; then |
725 |
- die "User aborted configuration." |
726 |
- else |
727 |
- echo "Answer not recognized. Enter a number from 1 to 4" |
728 |
- fi |
729 |
- done |
730 |
- |
731 |
- if [[ "$_reset" = "hard" ]]; then |
732 |
- while [ "$sure" != "true" ] ; do |
733 |
- ewarn "You will lose all Webmin configuration options you have done till now." |
734 |
- ewarn "Are you sure you want to do this? (y/n)" |
735 |
- read answer |
736 |
- if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then |
737 |
- sure="true" |
738 |
- elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then |
739 |
- die "User aborted configuration." |
740 |
- else |
741 |
- echo "Answer not recognized. Enter 'y' or 'n'" |
742 |
- fi |
743 |
- done |
744 |
- fi |
745 |
- fi |
746 |
- |
747 |
- export reset=$_reset |
748 |
- |
749 |
- # Create ssl certificate for Webmin if there is not one in the proper place |
750 |
- if [[ ! -e "${EROOT}etc/ssl/webmin/server.pem" ]]; then |
751 |
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-Webmin Server}" |
752 |
- SSL_COMMONNAME="${SSL_COMMONNAME:-*}" |
753 |
- install_cert "${EROOT}/etc/ssl/webmin/server" |
754 |
- fi |
755 |
- |
756 |
- # Ensure all paths passed to the setup script use EROOT |
757 |
- export wadir="${EROOT}usr/libexec/webmin" |
758 |
- export config_dir="${EROOT}etc/webmin" |
759 |
- export var_dir="${EROOT}var/log/webmin" |
760 |
- export tempdir="${T}" |
761 |
- export pidfile="${EROOT}var/run/webmin.pid" |
762 |
- export perl="$( which perl )" |
763 |
- export os_type='gentoo-linux' |
764 |
- export os_version='*' |
765 |
- export real_os_type='Gentoo Linux' |
766 |
- export real_os_version='Any version' |
767 |
- # Forcing 'ssl', 'no_ssl2', 'no_ssl3', 'ssl_redirect', 'no_sslcompression', |
768 |
- # 'ssl_honorcipherorder', 'no_tls1' and 'no_tls1_1' for tightening security |
769 |
- export ssl=1 |
770 |
- export no_ssl2=1 |
771 |
- export no_ssl3=1 |
772 |
- export ssl_redirect=1 |
773 |
- export ssl_honorcipherorder=1 |
774 |
- export no_sslcompression=1 |
775 |
- export no_tls1=1 |
776 |
- export no_tls1_1=1 |
777 |
- export keyfile="${EROOT}etc/ssl/webmin/server.pem" |
778 |
- export port=10000 |
779 |
- |
780 |
- export atboot=0 |
781 |
- |
782 |
- einfo "Executing Webmin's configure script" |
783 |
- $wadir/gentoo-setup.sh |
784 |
- |
785 |
- einfo "Configuration of Webmin done" |
786 |
-} |