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