1 |
# 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 |
Version: 1.620 |
12 |
Release: %mkrel 2 |
13 |
License: BSD |
14 |
Group: System/Configuration |
15 |
URL: http://www.webmin.com/webmin/ |
16 |
Source0: http://heanet.dl.sourceforge.net/project/webadmin/%{name}/%{version}/%{name}-%{version}.tar.gz |
17 |
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 |
Source16: webmin-grub-config |
33 |
# (gc) have the updates; this needs to change for each version and/or release, see |
34 |
# http://www.webmin.com/webmin/updates.html |
35 |
Patch1: webmin-1.610-remove-atboot-problem |
36 |
Patch5: webmin-fix-newmods.patch |
37 |
Patch7: webmin-0.85-never-fail-detect-os.patch |
38 |
Patch8: webmin-0.85-enable-changed-theme-at-installation.patch |
39 |
Patch10: webmin-1.510-fix-os-list.patch |
40 |
|
41 |
Patch17: webmin-1.220-remove-mandrakestuff-from-init.patch |
42 |
Patch19: webmin-0.92-add-default-configs-logviewer-fp2k.patch |
43 |
Patch21: webmin-0.950-add-netsaint-mandrake-config.patch |
44 |
Patch23: webmin-1.020-ssl-location.patch |
45 |
Patch26: webmin-1.060-mysql-fix-installing-missing-packages.patch |
46 |
Patch29: webmin-1.100-let-localauth-config.patch |
47 |
Patch32: webmin-1.310-usermin-fix-installing-missing-package.diff |
48 |
Patch33: webmin-1.610-postgresql-fix-installing-missing-packages.patch |
49 |
Patch35: webmin-1.220-usermin-fix-index.patch |
50 |
Patch37: webmin-temp-permission-fix.diff |
51 |
Patch38: webmin-ssldir-cosmetic.diff |
52 |
Patch39: webmin-fix-bandwith.diff |
53 |
Patch40: webmin-fix-sarg.diff |
54 |
Patch41: webmin-1.610-urpmi.patch |
55 |
Patch42: webmin-1.610-service-names.patch |
56 |
Patch43: webmin-1.610-syslog.patch |
57 |
Patch44: webmin-openvpn-config.patch |
58 |
Requires(post): systemd >= %{systemd_required_version} |
59 |
Requires(pre): rpm-helper |
60 |
Requires: perl |
61 |
Requires: perl-CGI |
62 |
Requires: lsof |
63 |
Requires(pre): sed chkconfig findutils coreutils initscripts grep perl-Net_SSLeay perl-Authen-PAM |
64 |
Provides: %{name}-%{version} |
65 |
BuildArch: noarch |
66 |
|
67 |
%description |
68 |
A web-based administration interface for Unix systems. Using Webmin you can |
69 |
configure DNS, Samba, NFS, local/remote filesystems, Apache, Sendmail/Postfix, |
70 |
and more using your web browser. |
71 |
|
72 |
After installation, enter the URL https://localhost:10000/ into your browser |
73 |
and login as root with your root password. Please consider logging in and |
74 |
modify your password for security issue. |
75 |
|
76 |
PLEASE NOTE THAT THIS VERSION NOW USES SECURE WEB TRANSACTIONS: YOU HAVE TO |
77 |
LOGIN TO "https://localhost:10000/" AND NOT "http://localhost:10000/". |
78 |
|
79 |
%prep |
80 |
|
81 |
%setup -q -a 2 |
82 |
%setup -q -D -T -c -a 9 -n %{name}-%{version} |
83 |
|
84 |
%patch1 -p0 |
85 |
%patch5 -p0 |
86 |
%patch7 -p1 |
87 |
%patch8 -p1 |
88 |
%patch10 -p1 |
89 |
|
90 |
%patch19 -p0 |
91 |
%patch21 -p0 |
92 |
%patch23 -p1 |
93 |
%patch26 -p1 |
94 |
%patch29 -p1 |
95 |
%patch32 -p0 |
96 |
%patch33 -p1 |
97 |
%patch35 -p1 |
98 |
%patch37 -p1 |
99 |
%patch38 -p1 |
100 |
%patch39 -p1 |
101 |
%patch40 -p1 |
102 |
%patch41 -p0 |
103 |
%patch42 -p0 |
104 |
%patch43 -p0 |
105 |
%patch44 -p0 |
106 |
|
107 |
rm -rf cfengine inetd jabber netsaint pptp-server sentry webalizer wuftpd |
108 |
|
109 |
find bind8 -type f -maxdepth 1 | xargs perl -pi -e 's|/var/run/named\.pid|/var/run/named/named.pid|' |
110 |
|
111 |
# daouda: added mageia-linux to known OS |
112 |
cp config-mandrake-linux config-mageia |
113 |
|
114 |
perl -pi -e 's|mandrake-linux|mageia mandrake-linux| if $_ =~ /^os_support.*mandrake-linux/ && $_ !~ /mageia/' */module.info |
115 |
perl -pi -e 's|mageia|mageia{-r "/etc/named.boot"}| if $_ =~ /^os_support.*mageia/' dnsadmin/module.info |
116 |
perl -pi -e 's|^cachemgr_path=.*$|cachemgr_path=/var/www/cgi-bin/cachemgr.cgi|g' squid/config-mandrake-linux* |
117 |
|
118 |
# adapt to systemd |
119 |
%if "%{_libexecdir}" == "/usr/libexec" |
120 |
perl -pi -e 's|/etc/rc.d/init.d/iptables|%{_libexecdir}/iptables.init|g' firewall/mandrake-linux-lib.pl |
121 |
%endif |
122 |
perl -pi -e 's|/etc/(rc.d/)*init.d/([^ ]*)|/sbin/service \2|g' */config-mandrake-linux* */config-\*-linux net/mandrake-linux-lib.pl |
123 |
|
124 |
(find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl - |
125 |
rm -f mount/freebsd-mounts-* |
126 |
rm -f mount/openbsd-mounts-* |
127 |
|
128 |
find -name ".xvpics" -o -name ".*.swp" | xargs rm -rf |
129 |
|
130 |
cp %{SOURCE16} grub/config-mandrake-linux |
131 |
|
132 |
%build |
133 |
|
134 |
# nothing to do here... |
135 |
|
136 |
%install |
137 |
# IMPORTANT: there is no %{_datadir} and so on, since the directories are decided by the post install script. |
138 |
mkdir -p %{buildroot}/usr/share/webmin |
139 |
mkdir -p %{buildroot}/%{_initrddir} |
140 |
mkdir -p %{buildroot}/usr/bin |
141 |
|
142 |
find -type f -print0 | xargs -0 chmod a+r |
143 |
find -type d -print0 | xargs -0 chmod a+rx |
144 |
|
145 |
cp -a * %{buildroot}/usr/share/webmin |
146 |
install -m755 %{SOURCE6} %{buildroot}/%{_initrddir}/webmin |
147 |
install -m755 %{SOURCE4} %{buildroot}/usr/share/webmin/postinstall.sh |
148 |
install -m755 %{SOURCE5} %{buildroot}/usr/bin |
149 |
|
150 |
mkdir -p %{buildroot}/%{_sysconfdir}/pam.d |
151 |
|
152 |
install -m755 %{SOURCE14} %{buildroot}/%{_sysconfdir}/pam.d/webmin |
153 |
|
154 |
rm -rf %{buildroot}/usr/share/webmin/*/{CVS,*/CVS} |
155 |
rm -f `find %{buildroot} -type f -name .cvsignore` |
156 |
|
157 |
# (gc) remove zero-length files (to check sometimes if they are still zero-length'ed) |
158 |
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 |
159 |
if [ -f $i ]; then rm -f %{buildroot}$i; fi |
160 |
done |
161 |
|
162 |
echo "rpm" > %{buildroot}/usr/share/webmin/install-type |
163 |
|
164 |
# remove macos files (breaks build in find command in find-debuginfo.sh) |
165 |
rm -f %{buildroot}/usr/share/webmin/mount/macos-mounts* |
166 |
|
167 |
echo 'blue-theme' > %{buildroot}%{_datadir}/webmin/defaulttheme |
168 |
|
169 |
|
170 |
# Install icons |
171 |
install -d -m 0755 %{buildroot}%{_liconsdir} |
172 |
install -d -m 0755 %{buildroot}%{_miconsdir} |
173 |
install -m 0644 %{SOURCE11} %{buildroot}%{_miconsdir}/webmin.png |
174 |
install -m 0644 %{SOURCE12} %{buildroot}%{_iconsdir}/webmin.png |
175 |
install -m 0644 %{SOURCE11} %{buildroot}%{_liconsdir}/webmin.png |
176 |
|
177 |
# Menu entry |
178 |
|
179 |
# XDG menu |
180 |
install -d %{buildroot}%{_datadir}/applications |
181 |
cat > %{buildroot}%{_datadir}/applications/mageia-%{name}.desktop << EOF |
182 |
[Desktop Entry] |
183 |
Name=%{name} |
184 |
Comment=%{summary} |
185 |
Exec=%{_bindir}/www-browser https://localhost:10000/ |
186 |
Icon=%{name} |
187 |
Terminal=false |
188 |
Type=Application |
189 |
Categories=X-Mageia-System-Configuration-Other;Settings; |
190 |
EOF |
191 |
|
192 |
rm -fr %{buildroot}/usr/share/webmin/acl/Authen-SolarisRBAC-0.1 |
193 |
|
194 |
#logrotate |
195 |
install -d %{buildroot}%{_sysconfdir}/logrotate.d |
196 |
install -m 0644 %{SOURCE15} %{buildroot}%{_sysconfdir}/logrotate.d/webmin |
197 |
|
198 |
# create /var/run/webmin |
199 |
mkdir -p %{buildroot}%{_tmpfilesdir} |
200 |
cat > %{buildroot}%{_tmpfilesdir}/%{name}.conf <<EOF |
201 |
d /run/webmin 0700 root bin - |
202 |
EOF |
203 |
|
204 |
%post |
205 |
if [ "$1" != 0 ]; then |
206 |
service webmin status >/dev/null 2>/dev/null && need_restart=1 |
207 |
service webmin stop >/dev/null 2>/dev/null || : |
208 |
else |
209 |
[[ -e /etc/cron.allow ]] && if [ "x`grep root /etc/cron.allow`" == "x" ] ; then |
210 |
echo root >> /etc/cron.allow |
211 |
fi |
212 |
fi |
213 |
/usr/share/webmin/postinstall.sh |
214 |
%_tmpfilescreate %{name} |
215 |
%_post_service %{name} |
216 |
[[ -n $need_restart ]] && service webmin start >/dev/null 2>/dev/null || : |
217 |
|
218 |
%preun |
219 |
%_preun_service webmin |
220 |
|
221 |
%postun |
222 |
if [ "$1" = 0 ]; then |
223 |
rm -rf /etc/webmin /var/webmin /var/lib/webmin /var/log/webmin |
224 |
fi |
225 |
|
226 |
%files |
227 |
%doc README LICENCE |
228 |
%{_initrddir}/webmin |
229 |
%config(noreplace) %{_sysconfdir}/pam.d/webmin |
230 |
%config(noreplace) %{_sysconfdir}/logrotate.d/webmin |
231 |
/usr/share/webmin |
232 |
/usr/bin/%{name} |
233 |
%{_iconsdir}/%{name}.png |
234 |
%{_liconsdir}/%{name}.png |
235 |
%{_miconsdir}/%{name}.png |
236 |
%{_datadir}/applications/*.desktop |
237 |
%{_tmpfilesdir}/%{name}.conf |