1 |
# zero out some useless deps. |
2 |
# (tv) we'd better had a link in minicom & package Encode::HanConvert: |
3 |
%global __requires_exclude runscript |
4 |
|
5 |
%{?perl_default_filter} |
6 |
%global __requires_exclude %__requires_exclude|^perl\\((\\.|\\.\\.)::|^perl\\((ctime.pl|saa-lib.pl|system-status-lib.pl)\\)||^perl\\(gray-theme::gray-theme-lib.pl\\) |
7 |
%global __provides_exclude %__provides_exclude|^perl\\(.*\\) |
8 |
|
9 |
# don't spend time with this either |
10 |
%define _enable_debug_packages %{nil} |
11 |
%define debug_package %{nil} |
12 |
|
13 |
Summary: An SSL web-based administration interface for Unix systems |
14 |
Name: webmin |
15 |
Version: 1.990 |
16 |
Release: %mkrel 1 |
17 |
License: BSD |
18 |
Group: System/Configuration |
19 |
URL: http://www.webmin.com/webmin/ |
20 |
Source0: https://download.sourceforge.net/project/webadmin/%{name}/%{version}/%{name}-%{version}.tar.gz |
21 |
Source2: other.modules.tar.bz2 |
22 |
# some images were missing |
23 |
Source33: advanced.png |
24 |
Source34: descs.png |
25 |
Source4: webmin-postinstallscript.sh |
26 |
Source5: webmin |
27 |
Source6: webmin.initscript |
28 |
# There is no easy way to get the direct link to this file. Download it manually |
29 |
# and move it to the SOURCES directory. |
30 |
# Remember to update the version here |
31 |
# https://www.openit.it/index.php/en/downloads?task=viewcategory&catid=7 |
32 |
Source9: openvpn-3.2.wbm.gz |
33 |
Source10: webmin.pam |
34 |
Source11: webmin-16.png |
35 |
Source12: webmin-32.png |
36 |
Source13: webmin-48.png |
37 |
# uses include instead of pam_stack |
38 |
Source14: webmin.pam-new |
39 |
Source15: webmin.logrotate |
40 |
# (gc) have the updates; this needs to change for each version and/or release, see |
41 |
# http://www.webmin.com/webmin/updates.html |
42 |
Patch1: webmin-1.950-remove-atboot-problem.diff |
43 |
Patch5: webmin-fix-newmods.patch |
44 |
Patch7: webmin-0.85-never-fail-detect-os.patch |
45 |
Patch8: webmin-0.85-enable-changed-theme-at-installation.patch |
46 |
|
47 |
Patch19: webmin-0.92-add-default-configs-logviewer-fp2k.patch |
48 |
Patch21: webmin-0.950-add-netsaint-mandrake-config.patch |
49 |
Patch23: webmin-1.020-ssl-location.patch |
50 |
Patch29: webmin-1.100-let-localauth-config.patch |
51 |
Patch37: webmin-temp-permission-fix.diff |
52 |
Patch38: webmin-ssldir-cosmetic.diff |
53 |
Patch39: webmin-fix-bandwith.diff |
54 |
Patch44: webmin-openvpn-config.patch |
55 |
Patch45: webmin-1.670-disable-update-notifications.patch |
56 |
|
57 |
BuildRequires: python3 |
58 |
|
59 |
Requires(post): systemd >= %{systemd_required_version} |
60 |
Requires(pre): rpm-helper |
61 |
Requires: perl |
62 |
Requires: perl-CGI |
63 |
Requires: perl(Authen::Libwrap) |
64 |
Requires: perl(IO::Tty) |
65 |
Requires: perl(JSON::PP) |
66 |
Requires: perl(Encode::Detect) |
67 |
Requires: perl(Encode::HanConvert) |
68 |
Requires: lsof |
69 |
Requires(pre): sed chkconfig findutils coreutils initscripts grep perl-Net_SSLeay perl-Authen-PAM |
70 |
Provides: %{name}-%{version} |
71 |
BuildArch: noarch |
72 |
|
73 |
%description |
74 |
A web-based administration interface for Unix systems. Using Webmin you can |
75 |
configure DNS, Samba, NFS, local/remote filesystems, Apache, Sendmail/Postfix, |
76 |
and more using your web browser. |
77 |
|
78 |
After installation, enter the URL https://localhost:10000/ into your browser |
79 |
and login as root with your root password. Please consider logging in and |
80 |
modify your password for security issue. |
81 |
|
82 |
PLEASE NOTE THAT THIS VERSION NOW USES SECURE WEB TRANSACTIONS: YOU HAVE TO |
83 |
LOGIN TO "https://localhost:10000/" AND NOT "http://localhost:10000/". |
84 |
|
85 |
%prep |
86 |
|
87 |
%setup -q -a 2 |
88 |
%setup -q -D -T -c -a 9 -n %{name}-%{version} |
89 |
|
90 |
%patch1 -p0 |
91 |
%patch5 -p0 |
92 |
%patch7 -p1 |
93 |
%patch8 -p1 |
94 |
|
95 |
%patch19 -p0 |
96 |
%patch21 -p0 |
97 |
%patch23 -p1 |
98 |
%patch29 -p1 |
99 |
%patch37 -p1 |
100 |
%patch38 -p1 |
101 |
%patch39 -p1 |
102 |
%patch44 -p1 |
103 |
%patch45 -p1 |
104 |
|
105 |
rm -rf inetd jabber netsaint pptp-server webalizer wuftpd |
106 |
rm -rf JSON |
107 |
rm -rf acl/Authen-SolarisRBAC-0.1 |
108 |
|
109 |
find bind8 -type f -maxdepth 1 | xargs perl -pi -e 's|/var/run/(named/)*named\.pid|/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 |
|
116 |
cat <<EOF >> software/config-mandrake-linux |
117 |
update_system=urpmi |
118 |
EOF |
119 |
|
120 |
perl -pi -e 's|base_([ug])id=500|base_\1id=1000|' useradmin/config-mandrake-linux |
121 |
|
122 |
(find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl - |
123 |
|
124 |
rm -f mount/freebsd-mounts-* |
125 |
rm -f mount/macos-mounts-* |
126 |
rm -f mount/openbsd-mounts-* |
127 |
|
128 |
find -name ".xvpics" -o -name ".*.swp" | xargs rm -rf |
129 |
|
130 |
find . -name \*.py -exec 2to3 -w {} \; |
131 |
|
132 |
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" webmin/acme_tiny.py ajaxterm/ajaxterm/ajaxterm.py ajaxterm/ajaxterm/configure |
133 |
|
134 |
%build |
135 |
|
136 |
# nothing to do here... |
137 |
|
138 |
%install |
139 |
# IMPORTANT: there is no %{_datadir} and so on, since the directories are decided by the post install script. |
140 |
mkdir -p %{buildroot}/usr/share/webmin |
141 |
mkdir -p %{buildroot}/%{_initrddir} |
142 |
mkdir -p %{buildroot}/usr/bin |
143 |
|
144 |
find -type f -print0 | xargs -0 chmod a+r |
145 |
find -type d -print0 | xargs -0 chmod a+rx |
146 |
|
147 |
cp -a * %{buildroot}/usr/share/webmin |
148 |
install -m755 %{SOURCE6} %{buildroot}/%{_initrddir}/webmin |
149 |
install -m755 %{SOURCE4} %{buildroot}/usr/share/webmin/postinstall.sh |
150 |
install -m755 %{SOURCE5} %{buildroot}/usr/bin |
151 |
|
152 |
mkdir -p %{buildroot}/%{_sysconfdir}/pam.d |
153 |
|
154 |
install -m755 %{SOURCE14} %{buildroot}/%{_sysconfdir}/pam.d/webmin |
155 |
|
156 |
rm -rf %{buildroot}/usr/share/webmin/*/{CVS,*/CVS} |
157 |
rm -f `find %{buildroot} -type f -name .cvsignore` |
158 |
|
159 |
# (gc) remove zero-length files (to check sometimes if they are still zero-length'ed) |
160 |
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 |
161 |
if [ -f $i ]; then rm -f %{buildroot}$i; fi |
162 |
done |
163 |
|
164 |
echo "rpm" > %{buildroot}/usr/share/webmin/install-type |
165 |
|
166 |
echo 'blue-theme' > %{buildroot}%{_datadir}/webmin/defaulttheme |
167 |
|
168 |
|
169 |
# Install icons |
170 |
install -d -m 0755 %{buildroot}%{_liconsdir} |
171 |
install -d -m 0755 %{buildroot}%{_miconsdir} |
172 |
install -m 0644 %{SOURCE11} %{buildroot}%{_miconsdir}/webmin.png |
173 |
install -m 0644 %{SOURCE12} %{buildroot}%{_iconsdir}/webmin.png |
174 |
install -m 0644 %{SOURCE11} %{buildroot}%{_liconsdir}/webmin.png |
175 |
|
176 |
# Menu entry |
177 |
|
178 |
# XDG menu |
179 |
install -d %{buildroot}%{_datadir}/applications |
180 |
cat > %{buildroot}%{_datadir}/applications/mageia-%{name}.desktop << EOF |
181 |
[Desktop Entry] |
182 |
Name=%{name} |
183 |
Comment=An SSL web-based administration interface for Unix systems |
184 |
Exec=%{_bindir}/www-browser https://localhost:10000/ |
185 |
Icon=%{name} |
186 |
Terminal=false |
187 |
Type=Application |
188 |
Categories=X-Mageia-System-Configuration-Other;Settings; |
189 |
EOF |
190 |
|
191 |
#logrotate |
192 |
install -d %{buildroot}%{_sysconfdir}/logrotate.d |
193 |
install -m 0644 %{SOURCE15} %{buildroot}%{_sysconfdir}/logrotate.d/webmin |
194 |
|
195 |
# create /var/run/webmin |
196 |
mkdir -p %{buildroot}%{_tmpfilesdir} |
197 |
cat > %{buildroot}%{_tmpfilesdir}/%{name}.conf <<EOF |
198 |
d /run/webmin 0700 root bin - |
199 |
EOF |
200 |
|
201 |
%pretrans |
202 |
if [ -d %{_datadir}/webmin/blue-theme ]; then |
203 |
rm -rf %{_datadir}/webmin/blue-theme |
204 |
fi |
205 |
|
206 |
%post |
207 |
if [ "$1" != 0 ]; then |
208 |
service webmin status >/dev/null 2>/dev/null && need_restart=1 |
209 |
service webmin stop >/dev/null 2>/dev/null || : |
210 |
else |
211 |
[[ -e /etc/cron.allow ]] && if [ "x`grep root /etc/cron.allow`" == "x" ] ; then |
212 |
echo root >> /etc/cron.allow |
213 |
fi |
214 |
fi |
215 |
/usr/share/webmin/postinstall.sh |
216 |
%_tmpfilescreate %{name} |
217 |
%_post_service %{name} |
218 |
[[ -n $need_restart ]] && service webmin start >/dev/null 2>/dev/null || : |
219 |
|
220 |
%preun |
221 |
%_preun_service webmin |
222 |
|
223 |
%postun |
224 |
if [ "$1" = 0 ]; then |
225 |
rm -rf /etc/webmin /var/webmin /var/lib/webmin /var/log/webmin |
226 |
fi |
227 |
|
228 |
%files |
229 |
%license LICENCE |
230 |
%doc README.md |
231 |
%{_initrddir}/webmin |
232 |
%config(noreplace) %{_sysconfdir}/pam.d/webmin |
233 |
%config(noreplace) %{_sysconfdir}/logrotate.d/webmin |
234 |
%{_datadir}/webmin |
235 |
%{_bindir}/%{name} |
236 |
%{_iconsdir}/%{name}.png |
237 |
%{_liconsdir}/%{name}.png |
238 |
%{_miconsdir}/%{name}.png |
239 |
%{_datadir}/applications/*.desktop |
240 |
%{_tmpfilesdir}/%{name}.conf |