update to 6.4.2 [release 6.4.2-1mamba;Sat Feb 22 2020]

This commit is contained in:
Silvan Calarco 2024-01-05 22:15:01 +01:00
parent e9558c5210
commit 3e398dfea9
4 changed files with 49 additions and 84 deletions

View File

@ -1,62 +0,0 @@
#! /bin/bash
#
# fetchmail Start/Stop the fetchmail service
# Copyright (c) 2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
#
# chkconfig: 2345 90 60
# description: fetchmail is a command line pop3/imap client daemon
#
# Source function library.
. /etc/init.d/functions
RETVAL=0
FETCHMAIL_CONFIGFILE=/etc/fetchmailrc
FETCHMAIL_PIDFILE=/var/run/fetchmail/fetchmail.pid
prog="fetchmail"
user="fetchmail"
start() {
echo -n $"Starting $prog: "
${prog} \
-m "/usr/sbin/sendmail -i -f %F -- %T" \
-L /var/log/fetchmail/fetchmail.log \
-f ${FETCHMAIL_CONFIGFILE} \
--pidfile ${FETCHMAIL_PIDFILE}
evaluate_retval
echo
}
stop() {
echo -n $"Stopping $prog: "
[ -e ${FETCHMAIL_PIDFILE} ] && {
PID=`head -n1 ${FETCHMAIL_PIDFILE}`
kill -9 $PID
RETVAL=$?
evaluate_retval
rm -f ${FETCHMAIL_PIDFILE}
echo
}
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?

1
fetchmail-tmpfiles.conf Normal file
View File

@ -0,0 +1 @@
d /run/fetchmail 750 vmail vmail

11
fetchmail.service Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=Fetchmail
After=network.target
[Service]
User=fetchmail
ExecStart=/usr/bin/fetchmail -d 900 -f /etc/fetchmailrc
RestartSec=1
[Install]
WantedBy=multi-user.target

View File

@ -2,22 +2,25 @@
%define fetchmail_groupid 65040 %define fetchmail_groupid 65040
%define vmail_groupid 64901 %define vmail_groupid 64901
%define vmail_userid 64907 %define vmail_userid 64907
%define majver %(echo %version | cut -d. -f1-2)
Name: fetchmail Name: fetchmail
Version: 6.3.26 Version: 6.4.2
Release: 2mamba Release: 1mamba
Summary: A mail-retrieval and forwarding utility Summary: A mail-retrieval and forwarding utility
Group: Applications/Networking Group: Applications/Networking
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://fetchmail.berlios.de/ URL: http://fetchmail.berlios.de/
Source: http://download.berlios.de/fetchmail/fetchmail-%{version}.tar.bz2 Source: https://sourceforge.net/projects/fetchmail/files/branch_%{majver}/fetchmail-%{version}.tar.xz
Source1: %{name}-initscript Source1: fetchmail.service
Source2: %{name}-fetchmailrc Source2: %{name}-fetchmailrc
Source3: fetchmail-tmpfiles.conf
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: ldconfig
BuildRequires: libopenssl-devel BuildRequires: libopenssl-devel
BuildRequires: libpython-devel BuildRequires: libpython-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
@ -46,10 +49,10 @@ The fetchmail program can gather mail from servers supporting any of the common
pythondir=%{python_sitearch} \ pythondir=%{python_sitearch} \
pyexecdir=%{python_sitelib} pyexecdir=%{python_sitelib}
install -D -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/fetchmail install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/fetchmail.service
install -D -m0640 %{SOURCE2} %{buildroot}%{_sysconfdir}/fetchmailrc install -D -m0640 %{SOURCE2} %{buildroot}%{_sysconfdir}/fetchmailrc
install -D -m0640 %{SOURCE3} %{buildroot}%{_tmpfilesdir}/fetchmail.conf
install -d %{buildroot}/var/log/fetchmail/ install -d %{buildroot}/var/log/fetchmail/
install -d %{buildroot}/var/run/fetchmail/
%find_lang %{name} %find_lang %{name}
@ -57,36 +60,48 @@ install -d %{buildroot}/var/run/fetchmail/
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%pre %pre
groupadd vmail -g %{vmail_groupid} 2>/dev/null if [ $1 -ge 1 ]; then
useradd -u %{vmail_userid} -c 'Virtual Mailboxes' -d /var/vmail -g vmail \ groupadd vmail -g %{vmail_groupid} 2>/dev/null
useradd -u %{vmail_userid} -c 'Virtual Mailboxes' -d /var/vmail -g vmail \
-s /bin/false vmail 2>/dev/null -s /bin/false vmail 2>/dev/null
exit 0 fi
:
%preun %preun
# erase %systemd_preun fetchmail
if [ $1 -eq 0 ]; then :
[ -e /var/run/fetchmail/fetchmail.pid ] && %{_initrddir}/fetchmail stop
chkconfig --del fetchmail %post
fi %systemd_post fetchmail
userdel fetchmail 2>/dev/null :
groupdel fetchmail 2>/dev/null
exit 0 %postun
%systemd_postun fetchmail
:
%posttrans
# clean broken old sysv links
find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \;
:
%files -f %{name}.lang %files -f %{name}.lang
%defattr(-,root,root) %defattr(-,root,root)
%{_initrddir}/fetchmail %{_unitdir}/fetchmail.service
%attr(0640,vmail,vmail) %config(noreplace) %{_sysconfdir}/fetchmailrc %attr(0640,vmail,vmail) %config(noreplace) %{_sysconfdir}/fetchmailrc
%{_tmpfilesdir}/fetchmail.conf
%{_bindir}/fetchmail %{_bindir}/fetchmail
%{_bindir}/fetchmailconf %{_bindir}/fetchmailconf
%{python_sitearch}/fetchmailconf.py* %{python_sitearch}/fetchmailconf.py*
%attr(0750,vmail,vmail) %dir /var/log/fetchmail %attr(0750,vmail,vmail) %dir /var/log/fetchmail
%attr(0755,vmail,vmail) %dir /var/run/fetchmail %{_mandir}/man1/fetchmail.1*
%{_mandir}/man1/fetchmail.1.gz %{_mandir}/man1/fetchmailconf.1*
%{_mandir}/man1/fetchmailconf.1.gz
%doc COPYING %doc COPYING
#NEWS README README.NTLM README.SSL TODO #NEWS README README.NTLM README.SSL TODO
%changelog %changelog
* Sat Feb 22 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 6.4.2-1mamba
- update to 6.4.2
* Thu May 30 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 6.3.26-2mamba * Thu May 30 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 6.3.26-2mamba
- python 2.7 rebuild - python 2.7 rebuild