1 |
hwoarang 14/06/07 11:29:32 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: webmin-1.690.ebuild |
5 |
Removed: webmin-1.680.ebuild |
6 |
Log: |
7 |
Version bump. Fixes bug #511624 thanks to PhobosK <phobosk@××××××××.fm> and Pacho Ramos <pacho@g.o> |
8 |
|
9 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 09BF4F54C2BA7F3C!) |
10 |
|
11 |
Revision Changes Path |
12 |
1.207 app-admin/webmin/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/webmin/ChangeLog?rev=1.207&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/webmin/ChangeLog?rev=1.207&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/webmin/ChangeLog?r1=1.206&r2=1.207 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/app-admin/webmin/ChangeLog,v |
21 |
retrieving revision 1.206 |
22 |
retrieving revision 1.207 |
23 |
diff -u -r1.206 -r1.207 |
24 |
--- ChangeLog 1 May 2014 16:30:09 -0000 1.206 |
25 |
+++ ChangeLog 7 Jun 2014 11:29:32 -0000 1.207 |
26 |
@@ -1,6 +1,14 @@ |
27 |
# ChangeLog for app-admin/webmin |
28 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/app-admin/webmin/ChangeLog,v 1.206 2014/05/01 16:30:09 hwoarang Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/app-admin/webmin/ChangeLog,v 1.207 2014/06/07 11:29:32 hwoarang Exp $ |
31 |
+ |
32 |
+*webmin-1.690 (07 Jun 2014) |
33 |
+ |
34 |
+ 07 Jun 2014; Markos Chandras <hwoarang@g.o> +files/webmin.service, |
35 |
+ +webmin-1.690.ebuild, -webmin-1.680.ebuild, files/gentoo-setup, |
36 |
+ files/init.d.webmin: |
37 |
+ Version bump. Fixes bug #511624 thanks to PhobosK <phobosk@××××××××.fm> and |
38 |
+ Pacho Ramos <pacho@g.o> |
39 |
|
40 |
*webmin-1.680 (01 May 2014) |
41 |
|
42 |
|
43 |
|
44 |
|
45 |
1.1 app-admin/webmin/webmin-1.690.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/webmin/webmin-1.690.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/webmin/webmin-1.690.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: webmin-1.690.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2014 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
# $Header: /var/cvsroot/gentoo-x86/app-admin/webmin/webmin-1.690.ebuild,v 1.1 2014/06/07 11:29:32 hwoarang Exp $ |
55 |
|
56 |
EAPI="5" |
57 |
|
58 |
inherit eutils pam ssl-cert systemd |
59 |
|
60 |
DESCRIPTION="A web-based Unix systems administration interface" |
61 |
HOMEPAGE="http://www.webmin.com/" |
62 |
SRC_URI="minimal? ( mirror://sourceforge/webadmin/${P}-minimal.tar.gz ) |
63 |
!minimal? ( mirror://sourceforge/webadmin/${P}.tar.gz )" |
64 |
|
65 |
LICENSE="BSD GPL-2" |
66 |
SLOT="0" |
67 |
|
68 |
KEYWORDS="~amd64 ~x86" |
69 |
|
70 |
# NOTE: The ssl flag auto added by ssl-cert eclass is not used actually |
71 |
# because openssl is forced by dev-perl/Net-SSLeay |
72 |
IUSE="minimal +ssl mysql postgres ldap" |
73 |
|
74 |
# All the required perl modules can be found easily using (in Webmin's root src dir): |
75 |
# find . -name cpan_modules.pl -exec grep "::" {} \; |
76 |
# NOTE: If Webmin doesn't find the required perl modules, it offers(runtime) the user |
77 |
# to install them using the in-built cpan module, and this will mess up perl on the system |
78 |
# That's why some modules are forced without a use flag |
79 |
# NOTE: pam, ssl and dnssec-tools deps are forced for security and Gentoo compliance installation reasons |
80 |
DEPEND="virtual/perl-Sys-Syslog |
81 |
virtual/perl-Time-HiRes |
82 |
virtual/perl-Time-Local |
83 |
dev-perl/Authen-Libwrap |
84 |
dev-perl/IO-Tty |
85 |
dev-perl/MD5 |
86 |
dev-perl/Net-SSLeay |
87 |
dev-perl/Authen-PAM |
88 |
dev-perl/Sys-Hostname-Long |
89 |
>=net-dns/dnssec-tools-1.13 |
90 |
!minimal? ( |
91 |
mysql? ( dev-perl/DBD-mysql ) |
92 |
postgres? ( dev-perl/DBD-Pg ) |
93 |
ldap? ( dev-perl/perl-ldap ) |
94 |
dev-perl/XML-Generator |
95 |
dev-perl/XML-Parser |
96 |
)" |
97 |
RDEPEND="${DEPEND}" |
98 |
|
99 |
src_prepare() { |
100 |
local perl="$( which perl )" |
101 |
|
102 |
# Remove the unnecessary and incompatible files |
103 |
rm -rf acl/Authen-SolarisRBAC-0.1* |
104 |
if ! use minimal ; then |
105 |
rm -rf {format,{bsd,hpux,sgi}exports,zones,rbac} |
106 |
rm -f mount/{free,net,open}bsd-mounts* |
107 |
rm -f mount/macos-mounts* |
108 |
fi |
109 |
|
110 |
# For security reasons remove the SSL certificate that comes with Webmin |
111 |
# We will create our own later |
112 |
rm -f miniserv.pem |
113 |
|
114 |
# Remove the Webmin setup scripts to avoid Webmin in runtime to mess up config |
115 |
# We will use our own later |
116 |
rm -f setup.{sh,pl} |
117 |
|
118 |
# Set the installation type/mode to Gentoo |
119 |
echo "gentoo" > install-type |
120 |
|
121 |
# Fix the permissions of the install files |
122 |
chmod -R og-w "${S}" |
123 |
|
124 |
# Since we should not modify any files after install |
125 |
# we set the perl path in all cgi and pl files here using Webmin's routines |
126 |
# The pl file is Prefix safe and works only on provided input, no other filesystem files |
127 |
ebegin "Fixing perl path in source files" |
128 |
(find "${S}" -name '*.cgi' -print ; find "${S}" -name '*.pl' -print) | $perl "${S}"/perlpath.pl $perl - |
129 |
eend $? |
130 |
} |
131 |
|
132 |
src_install() { |
133 |
# Create config dir and keep |
134 |
diropts -m0755 |
135 |
dodir /etc/webmin |
136 |
keepdir /etc/webmin |
137 |
|
138 |
# Create install dir |
139 |
# Third party modules installed through Webmin go here too, so keep |
140 |
dodir /usr/libexec/webmin |
141 |
keepdir /usr/libexec/webmin |
142 |
|
143 |
# Copy our own setup script to installation folder |
144 |
insinto /usr/libexec/webmin |
145 |
newins "${FILESDIR}"/gentoo-setup gentoo-setup.sh |
146 |
fperms 0744 /usr/libexec/webmin/gentoo-setup.sh |
147 |
|
148 |
# This is here if we ever want in future ebuilds to add some specific |
149 |
# config values in the /etc/webmin/miniserv.conf |
150 |
# The format of this file should be the same as the one of miniserv.conf: |
151 |
# var=value |
152 |
# |
153 |
# Uncomment it if you use such file. Before that check if upstream |
154 |
# has this file in root dir too. |
155 |
#newins "${FILESDIR}/miniserv-conf" miniserv-conf |
156 |
|
157 |
# Create the log dir and keep |
158 |
diropts -m0700 |
159 |
dodir /var/log/webmin |
160 |
keepdir /var/log/webmin |
161 |
|
162 |
# Create the init.d file and put the neccessary variables there |
163 |
newinitd "${FILESDIR}"/init.d.webmin webmin |
164 |
sed -i \ |
165 |
-e "s:%exe%:${EROOT}usr/libexec/webmin/miniserv.pl:" \ |
166 |
-e "s:%pid%:${EROOT}var/run/webmin.pid:" \ |
167 |
-e "s:%conf%:${EROOT}etc/webmin/miniserv.conf:" \ |
168 |
-e "s:%config%:${EROOT}etc/webmin/config:" \ |
169 |
-e "s:%perllib%:${EROOT}usr/libexec/webmin:" \ |
170 |
"${ED}etc/init.d/webmin" \ |
171 |
|| die "Failed to patch the webmin init file" |
172 |
|
173 |
# Create the systemd service file and put the neccessary variables there |
174 |
systemd_newunit "${FILESDIR}"/webmin.service webmin.service |
175 |
sed -i \ |
176 |
-e "s:%exe%:${EROOT}usr/libexec/webmin/miniserv.pl:" \ |
177 |
-e "s:%pid%:${EROOT}var/run/webmin.pid:" \ |
178 |
-e "s:%conf%:${EROOT}etc/webmin/miniserv.conf:" \ |
179 |
-e "s:%config%:${EROOT}etc/webmin/config:" \ |
180 |
-e "s:%perllib%:${EROOT}usr/libexec/webmin:" \ |
181 |
"${ED}$(_systemd_get_unitdir)/webmin.service" \ |
182 |
|| die "Failed to patch the webmin systemd service file" |
183 |
|
184 |
# Setup pam |
185 |
pamd_mimic system-auth webmin auth account session |
186 |
|
187 |
# Copy files to installation folder |
188 |
ebegin "Copying install files to destination" |
189 |
cp -pPR "${S}"/* "${ED}usr/libexec/webmin" |
190 |
eend $? |
191 |
} |
192 |
|
193 |
pkg_preinst() { |
194 |
# First stop service if running so Webmin to not messup our config |
195 |
ebegin "Stopping any running Webmin instance prior merging" |
196 |
if systemd_is_booted ; then |
197 |
systemctl stop webmin.service 2>/dev/null |
198 |
else |
199 |
rc-service --ifexists -- webmin --ifstarted stop |
200 |
fi |
201 |
eend $? |
202 |
} |
203 |
|
204 |
pkg_postinst() { |
205 |
# Run pkg_config phase first - non interactively |
206 |
export INTERACTIVE="no" |
207 |
pkg_config |
208 |
# Every next time pkg_config should be interactive |
209 |
INTERACTIVE="yes" |
210 |
|
211 |
ewarn |
212 |
ewarn "Bare in mind that not all Webmin modules are Gentoo tweaked and may have some issues." |
213 |
ewarn "Always be careful when using modules that modify init entries, do update of webmin, install CPAN modules etc." |
214 |
ewarn "To avoid problems, please before using any module, look at its configuration options first." |
215 |
ewarn "(Usually there is a link at top in the right pane of Webmin for configuring the module.)" |
216 |
ewarn |
217 |
if systemd_is_booted ; then |
218 |
elog "- To make Webmin start at boot time, run: 'systemctl enable webmin.service'" |
219 |
else |
220 |
elog "- To make Webmin start at boot time, run: 'rc-update add webmin default'" |
221 |
fi |
222 |
elog "- The default URL to connect to Webmin is: https://localhost:10000" |
223 |
elog "- The default user that can login is: root" |
224 |
elog "- To reconfigure Webmin in case of problems run 'emerge --config app-admin/webmin'" |
225 |
} |
226 |
|
227 |
pkg_prerm() { |
228 |
# First stop service if running - we do not want Webmin to mess up config |
229 |
ebegin "Stopping any running Webmin instance prior unmerging" |
230 |
if systemd_is_booted ; then |
231 |
systemctl stop webmin.service 2>/dev/null |
232 |
else |
233 |
rc-service --ifexists -- webmin --ifstarted stop |
234 |
fi |
235 |
eend $? |
236 |
} |
237 |
|
238 |
pkg_postrm() { |
239 |
# If removing webmin completely, remind the user for the Webmin's own cron jobs. |
240 |
if [[ ! ${REPLACED_BY_VERSION} ]]; then |
241 |
ewarn |
242 |
ewarn "You have uninstalled Webmin, so have in mind that all cron jobs scheduled" |
243 |
ewarn "by Webmin for its own modules, are left active and they will fail when Webmin is missing." |
244 |
ewarn "To fix this just disable them if you intend to use Webmin again," |
245 |
ewarn "OR delete them if not." |
246 |
ewarn |
247 |
fi |
248 |
} |
249 |
|
250 |
pkg_config(){ |
251 |
# First stop service if running |
252 |
ebegin "Stopping any running Webmin instance" |
253 |
if systemd_is_booted ; then |
254 |
systemctl stop webmin.service 2>/dev/null |
255 |
else |
256 |
rc-service --ifexists -- webmin --ifstarted stop |
257 |
fi |
258 |
eend $? |
259 |
|
260 |
# Next set the default reset variable to 'none' |
261 |
# reset/_reset can be: |
262 |
# 'none' - does not reset anything, just upgrades if a conf is present |
263 |
# OR installs new conf if a conf is missing |
264 |
# 'soft' - deletes only $config_dir/config file and thus resetting most |
265 |
# conf values to their defaults. Keeps the specific Webmin cron jobs |
266 |
# 'hard' - deletes all files in $config_dir (keeping the .keep_* Gentoo file) |
267 |
# and thus resetting all Webmin. Deletes the specific Webmin cron jobs too. |
268 |
local _reset="none" |
269 |
|
270 |
# If in interactive mode ask user what should we do |
271 |
if [[ "${INTERACTIVE}" = "yes" ]]; then |
272 |
einfo |
273 |
einfo "Please enter the number of the action you would like to perform?" |
274 |
einfo |
275 |
einfo "1. Update configuration" |
276 |
einfo " (keeps old config options and adds the new ones)" |
277 |
einfo "2. Soft reset configuration" |
278 |
einfo " (keeps some old config options, the other options are set to default)" |
279 |
ewarn " All Webmin users will be reset" |
280 |
einfo "3. Hard reset configuration" |
281 |
einfo " (all options including module options are set to default)" |
282 |
ewarn " You will lose all Webmin configuration options you have done till now" |
283 |
einfo "4. Exit this configuration utility (default)" |
284 |
while [ "$correct" != "true" ] ; do |
285 |
read answer |
286 |
if [[ "$answer" = "1" ]] ; then |
287 |
_reset="none" |
288 |
correct="true" |
289 |
elif [[ "$answer" = "2" ]] ; then |
290 |
_reset="soft" |
291 |
correct="true" |
292 |
elif [[ "$answer" = "3" ]] ; then |
293 |
_reset="hard" |
294 |
correct="true" |
295 |
elif [ "$answer" = "4" -o "$answer" = "" ] ; then |
296 |
die "User aborted configuration." |
297 |
else |
298 |
echo "Answer not recognized. Enter a number from 1 to 4" |
299 |
fi |
300 |
done |
301 |
|
302 |
if [[ "$_reset" = "hard" ]]; then |
303 |
while [ "$sure" != "true" ] ; do |
304 |
ewarn "You will lose all Webmin configuration options you have done till now." |
305 |
ewarn "Are you sure you want to do this? (y/n)" |
306 |
read answer |
307 |
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then |
308 |
sure="true" |
309 |
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then |
310 |
die "User aborted configuration." |
311 |
else |
312 |
echo "Answer not recognized. Enter 'y' or 'n'" |
313 |
fi |
314 |
done |
315 |
fi |
316 |
fi |
317 |
|
318 |
export reset=$_reset |
319 |
|
320 |
# Create ssl certificate for Webmin if there is not one in the proper place |
321 |
if [[ ! -e "${EROOT}etc/ssl/webmin/server.pem" ]]; then |
322 |
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Webmin Server}" |
323 |
SSL_COMMONNAME="${SSL_COMMONNAME:-*}" |
324 |
install_cert "${EROOT}/etc/ssl/webmin/server" |
325 |
fi |
326 |
|
327 |
# Ensure all paths passed to the setup script use EROOT |
328 |
export wadir="${EROOT}usr/libexec/webmin" |
329 |
export config_dir="${EROOT}etc/webmin" |
330 |
export var_dir="${EROOT}var/log/webmin" |
331 |
export tempdir="${T}" |
332 |
export pidfile="${EROOT}var/run/webmin.pid" |
333 |
export perl="$( which perl )" |
334 |
export os_type='gentoo-linux' |
335 |
export os_version='*' |
336 |
export real_os_type='Gentoo Linux' |
337 |
export real_os_version='Any version' |
338 |
# Forcing 'ssl', 'ssl_redirect' and 'no_sslcompression' for tightening security |
339 |
export ssl=1 |
340 |
export ssl_redirect=1 |
341 |
export no_sslcompression=1 |
342 |
export keyfile="${EROOT}etc/ssl/webmin/server.pem" |
343 |
export port=10000 |
344 |
|
345 |
export atboot=0 |
346 |
|
347 |
einfo "Executing Webmin's configure script" |
348 |
$wadir/gentoo-setup.sh |
349 |
|
350 |
einfo "Configuration of Webmin done" |
351 |
} |