forked from pool/fetchmail
- Made /etc/sysconfig/fetchmail work again after a botched systemd
conversion that ignored the file altogether (bsc#905673) - Removed the FETCHMAIL_USER setting in favor of editing the systemd service file (which should be copied to the respective location in /etc, and not edited in-place) OBS-URL: https://build.opensuse.org/package/show/server:mail/fetchmail?expand=0&rev=65
This commit is contained in:
parent
c6354a6215
commit
06b06198ff
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Apr 8 12:20:27 UTC 2016 - pjanouch@suse.de
|
||||||
|
|
||||||
|
- Made /etc/sysconfig/fetchmail work again after a botched systemd
|
||||||
|
conversion that ignored the file altogether (bsc#905673)
|
||||||
|
- Removed the FETCHMAIL_USER setting in favor of editing the
|
||||||
|
systemd service file (which should be copied to the respective
|
||||||
|
location in /etc, and not edited in-place)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jan 8 16:04:11 UTC 2015 - tchvatal@suse.com
|
Thu Jan 8 16:04:11 UTC 2015 - tchvatal@suse.com
|
||||||
|
|
||||||
|
21
fetchmail.exec
Normal file
21
fetchmail.exec
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# fetchmail-systemd-exec: sysconfig helper script for systemd
|
||||||
|
|
||||||
|
die() {
|
||||||
|
echo "$@" 1>&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "$FETCHMAIL_POLLING_INTERVAL" | grep -Eq '^[0-9]+$' \
|
||||||
|
|| die 'invalid $FETCHMAIL_POLLING_INTERVAL setting'
|
||||||
|
[ -r "$FETCHMAIL_RC_PATH" ] \
|
||||||
|
|| die '$FETCHMAIL_RC_PATH does not exist'
|
||||||
|
|
||||||
|
OPTS="-d $FETCHMAIL_POLLING_INTERVAL"
|
||||||
|
[ "$FETCHMAIL_FETCHALL" = "yes" ] && OPTS="$OPTS -a"
|
||||||
|
[ "$FETCHMAIL_SILENT" = "yes" ] && OPTS="$OPTS -s"
|
||||||
|
[ "`whoami`" = "fetchmail" -a -z "$FETCHMAILHOME" ] && \
|
||||||
|
export FETCHMAILHOME=/var/lib/fetchmail
|
||||||
|
|
||||||
|
exec /usr/bin/fetchmail $OPTS $FETCHMAIL_EXPERT_OPTIONS \
|
||||||
|
-f $FETCHMAIL_RC_PATH -L /var/log/fetchmail
|
@ -3,8 +3,9 @@ Description=A remote-mail retrieval utility
|
|||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
EnvironmentFile=-/etc/sysconfig/fetchmail
|
||||||
User=fetchmail
|
User=fetchmail
|
||||||
ExecStart=/usr/bin/fetchmail -d 900 -f /etc/fetchmailrc
|
ExecStart=/usr/lib/fetchmail-systemd-exec
|
||||||
RestartSec=1
|
RestartSec=1
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package fetchmail
|
# spec file for package fetchmail
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -30,6 +30,7 @@ Source4: http://sourceforge.net/projects/fetchmail/files/branch_6.3/%{nam
|
|||||||
Source5: %{name}.keyring
|
Source5: %{name}.keyring
|
||||||
Source6: %{name}.service
|
Source6: %{name}.service
|
||||||
Source7: %{name}.tmpfiles
|
Source7: %{name}.tmpfiles
|
||||||
|
Source8: %{name}.exec
|
||||||
Patch0: fetchmail-6.3.8-smtp_errors.patch
|
Patch0: fetchmail-6.3.8-smtp_errors.patch
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: krb5-devel
|
BuildRequires: krb5-devel
|
||||||
@ -40,13 +41,13 @@ BuildRequires: procmail
|
|||||||
BuildRequires: pwdutils
|
BuildRequires: pwdutils
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: xz
|
BuildRequires: xz
|
||||||
|
BuildRequires: pkgconfig(systemd)
|
||||||
Requires: logrotate
|
Requires: logrotate
|
||||||
Requires(pre): %fillup_prereq
|
Requires(pre): %fillup_prereq
|
||||||
Requires(pre): coreutils
|
Requires(pre): coreutils
|
||||||
Requires(pre): pwdutils
|
Requires(pre): pwdutils
|
||||||
Suggests: smtp_daemon
|
Suggests: smtp_daemon
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: pkgconfig(systemd)
|
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -88,7 +89,7 @@ export CFLAGS="%{optflags} -fPIE"
|
|||||||
--enable-opie \
|
--enable-opie \
|
||||||
--with-kerberos5 \
|
--with-kerberos5 \
|
||||||
--with-gssapi \
|
--with-gssapi \
|
||||||
--with-ssl=/usr
|
--with-ssl=%{_prefix}
|
||||||
make %{?_smp_mflags} LDFLAGS="-pie"
|
make %{?_smp_mflags} LDFLAGS="-pie"
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -101,6 +102,7 @@ mkdir -p %{buildroot}/%{_unitdir}
|
|||||||
mkdir -p %{buildroot}/%{_libexecdir}/tmpfiles.d
|
mkdir -p %{buildroot}/%{_libexecdir}/tmpfiles.d
|
||||||
install -m 0644 %{SOURCE6} %{buildroot}/%{_unitdir}/%{name}.service
|
install -m 0644 %{SOURCE6} %{buildroot}/%{_unitdir}/%{name}.service
|
||||||
install -m 0644 %{SOURCE7} %{buildroot}/%{_libexecdir}/tmpfiles.d/%{name}.conf
|
install -m 0644 %{SOURCE7} %{buildroot}/%{_libexecdir}/tmpfiles.d/%{name}.conf
|
||||||
|
install -m 0755 %{SOURCE8} %{buildroot}/%{_libexecdir}/%{name}-systemd-exec
|
||||||
mkdir -p %{buildroot}%{_sbindir}
|
mkdir -p %{buildroot}%{_sbindir}
|
||||||
ln -s service %{buildroot}%{_sbindir}/rc%{name}
|
ln -s service %{buildroot}%{_sbindir}/rc%{name}
|
||||||
touch %{buildroot}%{_sysconfdir}/fetchmailrc
|
touch %{buildroot}%{_sysconfdir}/fetchmailrc
|
||||||
@ -141,19 +143,20 @@ fi
|
|||||||
%{_bindir}/fetchmail
|
%{_bindir}/fetchmail
|
||||||
%dir %attr(0700, fetchmail, root) %{_localstatedir}/lib/fetchmail
|
%dir %attr(0700, fetchmail, root) %{_localstatedir}/lib/fetchmail
|
||||||
%ghost %attr(0600, fetchmail, root) %{_localstatedir}/log/fetchmail
|
%ghost %attr(0600, fetchmail, root) %{_localstatedir}/log/fetchmail
|
||||||
%doc %{_mandir}/man1/fetchmail.1.gz
|
%{_mandir}/man1/fetchmail.1.gz
|
||||||
%doc COPYING FAQ FEATURES NEWS NOTES OLDNEWS README README.NTLM README.SSL README.SSL-SERVER TODO contrib *.html *.txt *.pdf
|
%doc COPYING FAQ FEATURES NEWS NOTES OLDNEWS README README.NTLM README.SSL README.SSL-SERVER TODO contrib *.html *.txt *.pdf
|
||||||
%ghost %config(noreplace) %attr(0600, fetchmail, root) %{_sysconfdir}/fetchmailrc
|
%ghost %config(noreplace) %attr(0600, fetchmail, root) %{_sysconfdir}/fetchmailrc
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/fetchmail
|
%config(noreplace) %{_sysconfdir}/logrotate.d/fetchmail
|
||||||
%{_unitdir}/%{name}.service
|
%{_unitdir}/%{name}.service
|
||||||
%{_sbindir}/rc%{name}
|
%{_sbindir}/rc%{name}
|
||||||
|
%{_libexecdir}/%{name}-systemd-exec
|
||||||
%{_libexecdir}/tmpfiles.d/%{name}.conf
|
%{_libexecdir}/tmpfiles.d/%{name}.conf
|
||||||
%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
|
%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
|
||||||
|
|
||||||
%files -n fetchmailconf
|
%files -n fetchmailconf
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%{_bindir}/fetchmailconf
|
%{_bindir}/fetchmailconf
|
||||||
%doc %{_mandir}/man1/fetchmailconf.1.gz
|
%{_mandir}/man1/fetchmailconf.1.gz
|
||||||
%{python_sitelib}/fetchmailconf.*
|
%{python_sitelib}/fetchmailconf.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -27,15 +27,6 @@ FETCHMAIL_FETCHALL="yes"
|
|||||||
#
|
#
|
||||||
FETCHMAIL_SILENT="no"
|
FETCHMAIL_SILENT="no"
|
||||||
|
|
||||||
## Type: list(fetchmail,root)
|
|
||||||
## Default: fetchmail
|
|
||||||
#
|
|
||||||
# Fetchmail runs by default as a non-root user. This is more secure, but
|
|
||||||
# can cause problems when using delivery via MDA. In this case, change
|
|
||||||
# it to "root".
|
|
||||||
#
|
|
||||||
FETCHMAIL_USER="fetchmail"
|
|
||||||
|
|
||||||
## Type: string
|
## Type: string
|
||||||
## Default: ""
|
## Default: ""
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user