automatic version update by autodist [release 1.834-1mamba;Sat Feb 19 2022]

This commit is contained in:
Automatic Build System 2024-01-05 18:52:20 +01:00
parent 7504ef3d61
commit 30fb6c7e54
5 changed files with 64 additions and 154 deletions

View File

@ -1,57 +0,0 @@
diff -Nru usermin-1.400/setup.sh usermin-1.400.patch/setup.sh
--- usermin-1.400/setup.sh 2009-03-18 06:34:22.000000000 +0100
+++ usermin-1.400.patch/setup.sh 2009-04-30 18:46:35.000000000 +0200
@@ -33,17 +33,6 @@
echo "systems and common Unix services to be easily administered."
echo ""
-# Only root can run this
-id | grep "uid=0(" >/dev/null
-if [ $? != "0" ]; then
- uname -a | grep -i CYGWIN >/dev/null
- if [ $? != "0" ]; then
- echo "ERROR: The Usermin install script must be run as root";
- echo "";
- exit 1;
- fi
-fi
-
# Use the supplied destination directory, if any
if [ "$1" != "" ]; then
wadir=$1
@@ -345,12 +334,6 @@
echo ""
exit 12
fi
- $perl -e 'use Socket; socket(FOO, PF_INET, SOCK_STREAM, getprotobyname("tcp")); setsockopt(FOO, SOL_SOCKET, SO_REUSEADDR, pack("l", 1)); bind(FOO, pack_sockaddr_in($ARGV[0], INADDR_ANY)) || exit(1); exit(0);' $port
- if [ $? != "0" ]; then
- echo "ERROR: TCP port $port is already in use by another program"
- echo ""
- exit 13
- fi
# Ask the user if SSL should be used
if [ "$ssl" = "" ]; then
@@ -621,22 +604,6 @@
echo ""
fi
-echo "Changing ownership and permissions .."
-chown -R root:bin $config_dir
-chmod -R 755 $config_dir
-if [ "$nochown" = "" ]; then
- chown -R root:bin "$wadir"
- chmod -R og-w "$wadir"
- if [ $var_dir != "/var" ]; then
- chown -R root:bin $var_dir
- chmod -R og-w $var_dir
- chmod -R a+rx "$wadir"
- fi
-fi
-chmod 600 $config_dir/miniserv.pem 2>/dev/null
-echo "..done"
-echo ""
-
# Save target directory if one was specified
if [ "$wadir" != "$srcdir" ]; then
echo $wadir >$config_dir/install-dir

View File

@ -0,0 +1,20 @@
--- usermin-1.834/setup.sh.orig 2022-02-19 19:07:52.274577698 +0100
+++ usermin-1.834/setup.sh 2022-02-19 19:08:20.217420597 +0100
@@ -33,17 +33,6 @@
echo "systems and common Unix services to be easily administered."
echo ""
-# Only root can run this
-id | grep "uid=0(" >/dev/null
-if [ $? != "0" ]; then
- uname -a | grep -i CYGWIN >/dev/null
- if [ $? != "0" ]; then
- echo "ERROR: The Usermin install script must be run as root";
- echo "";
- exit 1;
- fi
-fi
-
# Use the supplied destination directory, if any
if [ "$1" != "" ]; then
wadir=$1

View File

@ -1,51 +0,0 @@
#! /bin/bash
#
# webmin Start/Stop the usermin service
# Copyright (c) 2009 by Silvan Calarco <silvan.calarco@mambasoft.it>
#
# chkconfig: 2345 90 60
# description: a web-based interface for usermin
#
# Source function library.
. /etc/init.d/functions
USERMIN_CONFIG=/etc/usermin
RETVAL=0
prog="webmin"
start() {
echo -n $"Starting $prog: "
$USERMIN_CONFIG/start
evaluate_retval
echo
}
stop() {
echo -n $"Stopping $prog: "
$USERMIN_CONFIG/stop
evaluate_retval
echo
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?

11
usermin.service Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=Usermin
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/etc/usermin/start
ExecStop=/etc/usermin/stop
[Install]
WantedBy=multi-user.target

View File

@ -1,21 +1,25 @@
Name: usermin Name: usermin
Version: 1.610 Version: 1.834
Release: 1mamba Release: 1mamba
Summary: A web-based interface for webmail, password changing, mail filters, fetchmail and much more Summary: A web-based interface for webmail, password changing, mail filters, fetchmail and much more
Group: Applications/Web Group: Applications/Web
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.webmin.com/usermin.html URL: https://www.webmin.com/usermin.html
Source: http://downloads.sourceforge.net/sourceforge/webadmin/usermin-%{version}.tar.gz Source: http://downloads.sourceforge.net/sourceforge/webadmin/usermin-%{version}.tar.gz
Source1: usermin-initscript Source1: usermin.service
Source2: usermin-desktop Source2: usermin-desktop
Patch0: %{name}-1.400-install_noroot.patch Patch0: %{name}-1.834-install_noroot.patch
Patch1: %{name}-1.400-openmamba.patch Patch1: %{name}-1.400-openmamba.patch
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: perl-DBI
BuildRequires: perl-Net-LDAP
BuildRequires: perl-Net-SSLeay
Requires: perl-Authen-PAM Requires: perl-Authen-PAM
Requires: lsof Requires: lsof
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
Usermin is a web-based interface for webmail, password changing, mail filters, fetchmail and much more. It is designed for use by regular non-root users on a Unix system, and limits them to tasks that they would be able to perform if logged in via SSH or at the console. See the standard modules page for a list of all the functions built into Usermin. Usermin is a web-based interface for webmail, password changing, mail filters, fetchmail and much more. It is designed for use by regular non-root users on a Unix system, and limits them to tasks that they would be able to perform if logged in via SSH or at the console. See the standard modules page for a list of all the functions built into Usermin.
@ -27,28 +31,14 @@ Usermin is a web-based interface for webmail, password changing, mail filters, f
find . -type f -exec sed -i 's|/usr/local/bin/perl|/usr/bin/perl|g' {} \; find . -type f -exec sed -i 's|/usr/local/bin/perl|/usr/bin/perl|g' {} \;
%define _use_internal_dependency_generator 0 %global __provides_exclude_from ^%{_datadir}/usermin.*$
%define __find_provides %{_builddir}/usermin-%{version}/find_provides.sh %global __requires_exclude_from ^%{_datadir}/usermin.*$
cat > %{_builddir}/usermin-%{version}/find_provides.sh <<_EOF
#! /bin/sh
%{_prefix}/lib/rpm/find-provides %{buildroot} %{_target_cpu} | \
grep -v "perl(.::" | grep -v "perl(..::" | grep -v "perl()"
_EOF
chmod +x %{_builddir}/usermin-%{version}/find_provides.sh
%define __find_requires %{_builddir}/usermin-%{version}/find_requires.sh
cat > %{_builddir}/usermin-%{version}/find_requires.sh <<_EOF
#! /bin/sh
%{_prefix}/lib/rpm/find-requires %{buildroot} %{_target_cpu} | \
grep -v "perl(.::" | grep -v "perl(..::" | grep -v "perl()"
_EOF
chmod +x %{_builddir}/usermin-%{version}/find_requires.sh
%build %build
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -d %{buildroot}{%{_sysconfdir}/usermin,%{_prefix},/var/log/usermin,/opt/usermin} install -d %{buildroot}{%{_sysconfdir}/usermin,%{_prefix},/var/log/usermin,%{_datadir}/usermin}
config_dir=%{buildroot}%{_sysconfdir}/usermin \ config_dir=%{buildroot}%{_sysconfdir}/usermin \
var_dir=%{buildroot}/var/log/usermin \ var_dir=%{buildroot}/var/log/usermin \
@ -60,15 +50,15 @@ ssl=1 \
atboot=0 \ atboot=0 \
nostart=1 \ nostart=1 \
tempdir=. \ tempdir=. \
./setup.sh %{buildroot}/opt/usermin ./setup.sh %{buildroot}%{_datadir}/usermin
rm -f %{buildroot}%{_sysconfdir}/usermin/uninstall.sh rm -f %{buildroot}%{_sysconfdir}/usermin/uninstall.sh
# strip buildroot from configuration files # strip buildroot from configuration files
find %{buildroot}%{_sysconfdir}/usermin -type f -exec sed -i 's|%{buildroot}||g' {} \; find %{buildroot}%{_sysconfdir}/usermin -type f -exec sed -i 's|%{buildroot}||g' {} \;
# install initscript # install systemd service
install -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/usermin install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/usermin.service
# install desktop link # install desktop link
install -D -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/applications/usermin.desktop install -D -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/applications/usermin.desktop
@ -82,39 +72,36 @@ mkdir -p %{buildroot}/var/log/usermin
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post %post
# new install %systemd_post usermin
if [ $1 -eq 1 ]; then :
/sbin/chkconfig --add usermin
service usermin start
fi
if [ $1 -gt 1 ]; then
# upgrade
service usermin restart
fi
exit 0
%preun %preun
#erase %systemd_preun usermin
if [ $1 -eq 0 ]; then :
service usermin stop 2>/dev/null
/sbin/chkconfig --del usermin %postun
fi %systemd_postun_with_restart usermin
exit 0 :
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%{_initrddir}/usermin
%dir %{_sysconfdir}/usermin %dir %{_sysconfdir}/usermin
%config(noreplace) %{_sysconfdir}/usermin/* %config(noreplace) %{_sysconfdir}/usermin/*
%{_sysconfdir}/pam.d/usermin %{_sysconfdir}/pam.d/usermin
%{_unitdir}/usermin.service
%{_datadir}/applications/usermin.desktop %{_datadir}/applications/usermin.desktop
%dir /opt/usermin %dir %{_datadir}/usermin
/opt/usermin/* %{_datadir}/usermin/*
%dir /var/log/usermin %dir /var/log/usermin
%doc LICENCE README %doc LICENCE
%changelog %changelog
* Sat Feb 19 2022 Automatic Build System <autodist@mambasoft.it> 1.834-1mamba
- automatic version update by autodist
* Sun Jun 11 2017 Automatic Build System <autodist@mambasoft.it> 1.701-1mamba
- automatic update by autodist
* Tue Sep 09 2014 Automatic Build System <autodist@mambasoft.it> 1.610-1mamba * Tue Sep 09 2014 Automatic Build System <autodist@mambasoft.it> 1.610-1mamba
- automatic version update by autodist - automatic version update by autodist