1 |
ennael |
60039 |
# zero out some useless deps. |
2 |
|
|
# (tv) we'd better had a link in minicom & package Encode::HanConvert: |
3 |
|
|
%define _requires_exceptions HanConvert\\|runscript |
4 |
|
|
|
5 |
|
|
# don't spend time with this either |
6 |
|
|
%define _enable_debug_packages %{nil} |
7 |
|
|
%define debug_package %{nil} |
8 |
|
|
|
9 |
|
|
Summary: An SSL web-based administration interface for Unix systems |
10 |
|
|
Name: webmin |
11 |
luigiwalser |
329976 |
Version: 1.610 |
12 |
|
|
Release: %mkrel 1 |
13 |
ennael |
60039 |
License: BSD |
14 |
|
|
Group: System/Configuration/Other |
15 |
|
|
URL: http://www.webmin.com/webmin/ |
16 |
luigiwalser |
329976 |
Source0: http://heanet.dl.sourceforge.net/project/webadmin/%{name}/%{version}/%{name}-%{version}.tar.gz |
17 |
ennael |
60039 |
Source2: other.modules.tar.bz2 |
18 |
|
|
# some images were missing |
19 |
|
|
Source33: advanced.png |
20 |
|
|
Source34: descs.png |
21 |
|
|
Source4: webmin-postinstallscript.sh |
22 |
|
|
Source5: webmin |
23 |
|
|
Source6: webmin.initscript |
24 |
|
|
Source9: http://www.openit.it/index.php/openit_en/content/download/2474/10171/file/openvpn-2.0.wbm.gz |
25 |
|
|
Source10: webmin.pam |
26 |
|
|
Source11: webmin-16.png |
27 |
|
|
Source12: webmin-32.png |
28 |
|
|
Source13: webmin-48.png |
29 |
|
|
# uses include instead of pam_stack |
30 |
|
|
Source14: webmin.pam-new |
31 |
|
|
Source15: webmin.logrotate |
32 |
|
|
# (gc) have the updates; this needs to change for each version and/or release, see |
33 |
|
|
# http://www.webmin.com/webmin/updates.html |
34 |
luigiwalser |
329976 |
Patch1: webmin-1.610-remove-atboot-problem |
35 |
ennael |
60039 |
Patch5: webmin-fix-newmods.patch |
36 |
|
|
Patch7: webmin-0.85-never-fail-detect-os.patch |
37 |
|
|
Patch8: webmin-0.85-enable-changed-theme-at-installation.patch |
38 |
|
|
Patch10: webmin-1.510-fix-os-list.patch |
39 |
|
|
|
40 |
|
|
Patch17: webmin-1.220-remove-mandrakestuff-from-init.patch |
41 |
|
|
Patch19: webmin-0.92-add-default-configs-logviewer-fp2k.patch |
42 |
|
|
Patch21: webmin-0.950-add-netsaint-mandrake-config.patch |
43 |
|
|
Patch23: webmin-1.020-ssl-location.patch |
44 |
|
|
Patch26: webmin-1.060-mysql-fix-installing-missing-packages.patch |
45 |
|
|
Patch29: webmin-1.100-let-localauth-config.patch |
46 |
|
|
Patch32: webmin-1.310-usermin-fix-installing-missing-package.diff |
47 |
luigiwalser |
329976 |
Patch33: webmin-1.610-postgresql-fix-installing-missing-packages.patch |
48 |
ennael |
60039 |
Patch35: webmin-1.220-usermin-fix-index.patch |
49 |
|
|
Patch37: webmin-temp-permission-fix.diff |
50 |
|
|
Patch38: webmin-ssldir-cosmetic.diff |
51 |
|
|
Patch39: webmin-fix-bandwith.diff |
52 |
|
|
Patch40: webmin-fix-sarg.diff |
53 |
luigiwalser |
330413 |
Patch41: webmin-1.610-urpmi.patch |
54 |
ennael |
60039 |
Requires(pre): rpm-helper |
55 |
|
|
Requires: perl |
56 |
|
|
Requires: perl-CGI |
57 |
|
|
Requires: lsof |
58 |
|
|
Requires(pre): sed chkconfig findutils coreutils initscripts grep perl-Net_SSLeay perl-Authen-PAM |
59 |
|
|
Provides: %{name}-%{version} |
60 |
|
|
BuildArch: noarch |
61 |
|
|
|
62 |
|
|
%description |
63 |
|
|
A web-based administration interface for Unix systems. Using Webmin you can |
64 |
|
|
configure DNS, Samba, NFS, local/remote filesystems, Apache, Sendmail/Postfix, |
65 |
|
|
and more using your web browser. |
66 |
|
|
|
67 |
|
|
After installation, enter the URL https://localhost:10000/ into your browser |
68 |
|
|
and login as root with your root password. Please consider logging in and |
69 |
|
|
modify your password for security issue. |
70 |
|
|
|
71 |
|
|
PLEASE NOTE THAT THIS VERSION NOW USES SECURE WEB TRANSACTIONS: YOU HAVE TO |
72 |
|
|
LOGIN TO "https://localhost:10000/" AND NOT "http://localhost:10000/". |
73 |
|
|
|
74 |
|
|
%prep |
75 |
|
|
|
76 |
ennael |
94376 |
%setup -q -a2 |
77 |
ennael |
60039 |
|
78 |
|
|
rm -fr %{name}-%{version}/dhcpd |
79 |
|
|
rm -fr %{name}-%{version}/useradmin |
80 |
|
|
|
81 |
|
|
%setup -q -D -T -c -a 9 -n %{name}-%{version} |
82 |
luigiwalser |
329976 |
%patch1 -p0 |
83 |
ennael |
60039 |
%patch5 -p0 |
84 |
|
|
%patch7 -p1 |
85 |
|
|
%patch8 -p1 |
86 |
|
|
%patch10 -p1 |
87 |
|
|
|
88 |
|
|
%patch19 -p0 |
89 |
|
|
%patch21 -p0 |
90 |
|
|
%patch23 -p1 |
91 |
|
|
%patch26 -p1 |
92 |
|
|
%patch29 -p1 |
93 |
|
|
%patch32 -p0 |
94 |
|
|
%patch33 -p1 |
95 |
|
|
%patch35 -p1 |
96 |
|
|
%patch37 -p1 |
97 |
|
|
%patch38 -p1 |
98 |
|
|
%patch39 -p1 |
99 |
|
|
%patch40 -p1 |
100 |
luigiwalser |
330413 |
%patch41 -p0 |
101 |
ennael |
60039 |
|
102 |
|
|
find bind8 -type f -maxdepth 1 | xargs perl -pi -e 's|/var/run/named\.pid|/var/run/named/named.pid|' |
103 |
|
|
|
104 |
ennael |
94376 |
# daouda: added mageia-linux to known OS |
105 |
|
|
cp config-mandrake-linux config-mageia |
106 |
ennael |
60039 |
|
107 |
luigiwalser |
330413 |
perl -pi -e 's|mandrake-linux|mageia mandrake-linux| if $_ =~ /^os_support.*mandrake-linux/ && $_ !~ /mageia/' */module.info |
108 |
|
|
perl -pi -e 's|mageia|mageia{-r "/etc/named.boot"}| if $_ =~ /^os_support.*mageia/' dnsadmin/module.info |
109 |
ennael |
60039 |
#' |
110 |
luigiwalser |
330413 |
perl -pi -e 's|/etc/smb\.conf|/etc/samba/smb\.conf|' samba/config-mandrake-linux |
111 |
ennael |
60039 |
|
112 |
|
|
(find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl - |
113 |
|
|
rm -f mount/freebsd-mounts-* |
114 |
|
|
rm -f mount/openbsd-mounts-* |
115 |
|
|
|
116 |
|
|
find -name ".xvpics" -o -name ".*.swp" | xargs rm -rf |
117 |
|
|
|
118 |
|
|
%build |
119 |
|
|
|
120 |
|
|
# nothing to do here... |
121 |
|
|
|
122 |
|
|
%install |
123 |
|
|
rm -rf %{buildroot} |
124 |
|
|
|
125 |
|
|
# IMPORTANT: there is no %{_datadir} and so on, since the directories are decided by the post install script. |
126 |
|
|
mkdir -p %{buildroot}/usr/share/webmin |
127 |
|
|
mkdir -p %{buildroot}/%{_initrddir} |
128 |
|
|
mkdir -p %{buildroot}/usr/bin |
129 |
|
|
|
130 |
|
|
find -type f -print0 | xargs -0 chmod a+r |
131 |
|
|
find -type d -print0 | xargs -0 chmod a+rx |
132 |
|
|
|
133 |
|
|
cp -a * %{buildroot}/usr/share/webmin |
134 |
|
|
install -m755 %{SOURCE6} %{buildroot}/%{_initrddir}/webmin |
135 |
|
|
install -m755 %{SOURCE4} %{buildroot}/usr/share/webmin/postinstall.sh |
136 |
|
|
install -m755 %{SOURCE5} %{buildroot}/usr/bin |
137 |
|
|
|
138 |
|
|
mkdir -p %{buildroot}/%{_sysconfdir}/pam.d |
139 |
|
|
|
140 |
|
|
install -m755 %{SOURCE14} %{buildroot}/%{_sysconfdir}/pam.d/webmin |
141 |
|
|
|
142 |
|
|
rm -rf %{buildroot}/usr/share/webmin/*/{CVS,*/CVS} |
143 |
|
|
rm -f `find %{buildroot} -type f -name .cvsignore` |
144 |
|
|
|
145 |
|
|
# (gc) remove zero-length files (to check sometimes if they are still zero-length'ed) |
146 |
|
|
for i in /usr/share/webmin/caldera/images/letters/254.gif /usr/share/webmin/i4lctrl-0.6.7/lang/de /usr/share/webmin/caldera/images/letters/255.gif; do |
147 |
|
|
if [ -f $i ]; then rm -f %{buildroot}$i; fi |
148 |
|
|
done |
149 |
|
|
|
150 |
|
|
echo "rpm" > %{buildroot}/usr/share/webmin/install-type |
151 |
|
|
|
152 |
|
|
# (sb) remove development file |
153 |
|
|
rm -f %{buildroot}/usr/share/webmin/mount/macos-mounts.c |
154 |
|
|
|
155 |
|
|
echo 'blue-theme' > %{buildroot}%{_datadir}/webmin/defaulttheme |
156 |
|
|
|
157 |
|
|
|
158 |
|
|
# Install icons |
159 |
|
|
install -d -m 0755 %{buildroot}%{_liconsdir} |
160 |
|
|
install -d -m 0755 %{buildroot}%{_miconsdir} |
161 |
|
|
install -m 0644 %{SOURCE11} %{buildroot}%{_miconsdir}/webmin.png |
162 |
|
|
install -m 0644 %{SOURCE12} %{buildroot}%{_iconsdir}/webmin.png |
163 |
|
|
install -m 0644 %{SOURCE11} %{buildroot}%{_liconsdir}/webmin.png |
164 |
|
|
|
165 |
|
|
# Menu entry |
166 |
|
|
|
167 |
|
|
# XDG menu |
168 |
|
|
install -d %{buildroot}%{_datadir}/applications |
169 |
luigiwalser |
330413 |
cat > %{buildroot}%{_datadir}/applications/mageia-%{name}.desktop << EOF |
170 |
ennael |
60039 |
[Desktop Entry] |
171 |
|
|
Name=%{name} |
172 |
|
|
Comment=%{summary} |
173 |
|
|
Exec=%{_bindir}/www-browser https://localhost:10000/ |
174 |
|
|
Icon=%{name} |
175 |
|
|
Terminal=false |
176 |
|
|
Type=Application |
177 |
luigiwalser |
330413 |
Categories=X-Mageia-System-Configuration-Other;Settings; |
178 |
ennael |
60039 |
EOF |
179 |
|
|
|
180 |
|
|
rm -fr %{buildroot}/usr/share/webmin/acl/Authen-SolarisRBAC-0.1 |
181 |
|
|
|
182 |
|
|
#logrotate |
183 |
|
|
install -d %{buildroot}%{_sysconfdir}/logrotate.d |
184 |
|
|
install -m 0644 %{SOURCE15} %{buildroot}%{_sysconfdir}/logrotate.d/webmin |
185 |
|
|
|
186 |
|
|
%post |
187 |
|
|
if [ "$1" != 0 ]; then |
188 |
|
|
service webmin status >/dev/null 2>/dev/null && need_restart=1 |
189 |
|
|
service webmin stop >/dev/null 2>/dev/null || : |
190 |
|
|
else |
191 |
|
|
[[ -e /etc/cron.allow ]] && if [ "x`grep root /etc/cron.allow`" == "x" ] ; then |
192 |
|
|
echo root >> /etc/cron.allow |
193 |
|
|
fi |
194 |
|
|
fi |
195 |
|
|
/usr/share/webmin/postinstall.sh |
196 |
|
|
[[ -n $need_restart ]] && service webmin start >/dev/null 2>/dev/null || : |
197 |
|
|
|
198 |
|
|
%preun |
199 |
|
|
%_preun_service webmin |
200 |
|
|
|
201 |
|
|
%postun |
202 |
|
|
if [ "$1" = 0 ]; then |
203 |
|
|
rm -rf /etc/webmin /var/webmin /var/lib/webmin /var/run/webmin /var/log/webmin |
204 |
|
|
fi |
205 |
|
|
|
206 |
|
|
%clean |
207 |
|
|
rm -rf %{buildroot} |
208 |
|
|
|
209 |
|
|
%files |
210 |
|
|
%defattr(-, root, root, 0755) |
211 |
|
|
%doc README LICENCE |
212 |
|
|
%{_initrddir}/webmin |
213 |
|
|
%config(noreplace) %{_sysconfdir}/pam.d/webmin |
214 |
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/webmin |
215 |
|
|
/usr/share/webmin |
216 |
|
|
/usr/bin/%{name} |
217 |
|
|
%{_iconsdir}/%{name}.png |
218 |
|
|
%{_liconsdir}/%{name}.png |
219 |
|
|
%{_miconsdir}/%{name}.png |
220 |
|
|
%{_datadir}/applications/*.desktop |