From ea7d0a91bdb2a0547d89b100dadac1261c0d3d7ddcece36e07875806975eaf1c Mon Sep 17 00:00:00 2001 From: Peter Varkoly Date: Wed, 21 Apr 2021 11:50:57 +0000 Subject: [PATCH 1/9] - (bsc#1185074) /var/run in /usr/lib/tmpfiles.d/dovecot.conf is deprecated, please use /run instead OBS-URL: https://build.opensuse.org/package/show/server:mail/dovecot?expand=0&rev=22 --- dovecot.changes | 6 ++++++ dovecot.spec | 2 +- dovecot.tmpfiles.d | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dovecot.changes b/dovecot.changes index 775a4ad..a5f0fb1 100644 --- a/dovecot.changes +++ b/dovecot.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Apr 21 11:50:25 UTC 2021 - Peter Varkoly + +- (bsc#1185074) /var/run in /usr/lib/tmpfiles.d/dovecot.conf is + deprecated, please use /run instead + ------------------------------------------------------------------- Fri Nov 13 14:11:59 UTC 2020 - Thorsten Kukuk diff --git a/dovecot.spec b/dovecot.spec index 7c7e3d4..60baa14 100644 --- a/dovecot.spec +++ b/dovecot.spec @@ -1,7 +1,7 @@ # # spec file for package dovecot # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/dovecot.tmpfiles.d b/dovecot.tmpfiles.d index c6b1e38..30c4683 100644 --- a/dovecot.tmpfiles.d +++ b/dovecot.tmpfiles.d @@ -1,3 +1,3 @@ -# Type Path Mode UID GID Age Argument -d /var/run/dovecot/ 0755 root root - - -d /var/run/dovecot/login/ 0750 root dovecot - - +# Type Path Mode UID GID Age Argument +d /run/dovecot/ 0755 root root - - +d /run/dovecot/login/ 0750 root dovecot - - From 0db101c4195a6ab93f8b592fcdf3e65a2c61c135a1553f031b830f001497706c Mon Sep 17 00:00:00 2001 From: Peter Varkoly Date: Wed, 21 Apr 2021 14:08:31 +0000 Subject: [PATCH 2/9] - Refreshed spec-file via spec-cleaner and manual optimization. * Removed file dovecot.init (droped SystemV support). * Added parameter -p to all install command in spec-file. * Added %{name} macro wherever possible. OBS-URL: https://build.opensuse.org/package/show/server:mail/dovecot?expand=0&rev=23 --- dovecot.changes | 8 +++++ dovecot.spec | 93 ++++++++++++++++--------------------------------- 2 files changed, 38 insertions(+), 63 deletions(-) diff --git a/dovecot.changes b/dovecot.changes index a5f0fb1..f4590f6 100644 --- a/dovecot.changes +++ b/dovecot.changes @@ -5,6 +5,14 @@ Wed Apr 21 11:50:25 UTC 2021 - Peter Varkoly deprecated, please use /run instead ------------------------------------------------------------------- +Fri Apr 16 10:58:13 UTC 2021 - Илья Индиго +- Refreshed spec-file via spec-cleaner and manual optimization. + * Removed file dovecot.init (droped SystemV support). + * Added parameter -p to all install command in spec-file. + * Added %{name} macro wherever possible. + +------------------------------------------------------------------- +Wed Apr 21 11:50:25 UTC 2021 - Peter Varkoly Fri Nov 13 14:11:59 UTC 2020 - Thorsten Kukuk - Check first if they exist before creating user and group accounts diff --git a/dovecot.spec b/dovecot.spec index 60baa14..05aaf6a 100644 --- a/dovecot.spec +++ b/dovecot.spec @@ -16,12 +16,6 @@ # -%if 0%{?suse_version} > 1230 -%bcond_without systemd -%else -%bcond_with systemd -%endif - Name: dovecot Version: 2.3 Release: 0 @@ -31,23 +25,22 @@ Group: Productivity/Networking/Email/Servers URL: http://www.dovecot.org/ PreReq: dovecot-implementation PreReq: shadow -Recommends: dovecot23 +Recommends: %{name}23 #!BuildIgnore: dovecot-implementation BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch -Source0: dovecot-2.0.configfiles -Source1: dovecot-2.1.configfiles -Source2: dovecot-2.2.configfiles -Source3: %{name}.init +Source0: %{name}-2.0.configfiles +Source1: %{name}-2.1.configfiles +Source2: %{name}-2.2.configfiles Source4: %{name}.pam Source5: %{name}.README.SUSE -Source7: dovecot.tmpfiles.d -Source8: dovecot.service -Source9: dovecot.socket -Source10: dovecot-2.1-pigeonhole.configfiles -Source11: dovecot-2.2-pigeonhole.configfiles -Source12: dovecot-2.3.configfiles -Source13: dovecot-2.3-pigeonhole.configfiles +Source7: %{name}.tmpfiles.d +Source8: %{name}.service +Source9: %{name}.socket +Source10: %{name}-2.1-pigeonhole.configfiles +Source11: %{name}-2.2-pigeonhole.configfiles +Source12: %{name}-2.3.configfiles +Source13: %{name}-2.3-pigeonhole.configfiles %description Dovecot is an IMAP and POP3 server for Linux and UNIX-like systems, @@ -73,87 +66,61 @@ for i in $RPM_SOURCE_DIR/*.configfiles ; do done done -install -D -m 0644 %{S:5} %{buildroot}%{_datadir}/doc/packages/dovecot/README.SUSE +install -D -p -m 0644 %{S:5} %{buildroot}%{_datadir}/doc/packages/%{name}/README.SUSE install -d %{buildroot}%{_sbindir} -# install the init script -%if %{with systemd} -%{__install} -D -m 644 %{S:7} %{buildroot}/usr/lib/tmpfiles.d/dovecot.conf +%{__install} -D -m 644 %{S:7} %{buildroot}/usr/lib/tmpfiles.d/%{name}.conf %{__ln_s} -f %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} -install -D -m 0644 %{S:8} %{buildroot}%{_unitdir}/dovecot.service -install -D -m 0644 %{S:9} %{buildroot}%{_unitdir}/dovecot.socket -%else -%{__install} -D -m 0755 %{S:3} %{buildroot}%{_sysconfdir}/init.d/%{name} -%{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} -%endif +install -D -p -m 0644 %{S:8} %{buildroot}%{_unitdir}/%{name}.service +install -D -p -m 0644 %{S:9} %{buildroot}%{_unitdir}/%{name}.socket # install pam config -%{__install} -D -m 0644 %{S:4} %{buildroot}%{_sysconfdir}/pam.d/%{name} +%{__install} -D -p -m 0644 %{S:4} %{buildroot}%{_sysconfdir}/pam.d/%{name} # create /var directories -%{__install} -m 0755 -Dd \ +%{__install} -p -m 0755 -Dd \ %{buildroot}%{_var}/run/%{name}/login/ \ %{buildroot}%{_var}/lib/%{name}/ %pre getent group %{name} > /dev/null || /usr/sbin/groupadd -r %{name} >/dev/null 2>&1 || : -getent passwd %{name} > /dev/null || /usr/sbin/useradd -g %{name} -s /bin/false -r -c "User for Dovecot imapd" -d %{_var}/run/%{name} %{name} >/dev/null 2>&1 || : -getent passwd dovenull > /dev/null || /usr/sbin/useradd -g %{name} -s /bin/false -r -c "User for Dovecot login" -d %{_var}/run/%{name} dovenull >/dev/null 2>&1 || : +getent passwd %{name} > /dev/null || /usr/sbin/useradd -g %{name} -s /bin/false -r -c "User for Dovecot imapd" -d %{_var}/run/%{name} %{name} +getent passwd dovenull > /dev/null || /usr/sbin/useradd -g %{name} -s /bin/false -r -c "User for Dovecot login" -d %{_var}/run/%{name} dovenull # try to copy the default configuration. # # we fail silently if the dovecot-implementation package is not # installed yet. This allows us to break a little build loop between # dovecot and dovecotXY. -if [ ! -e %{_sysconfdir}/%{name}/dovecot.conf -a -e %{_datadir}/%{name}/example-config/dovecot.conf ] ; then +if [ ! -e %{_sysconfdir}/%{name}/%{name}.conf -a -e %{_datadir}/%{name}/example-config/%{name}.conf ] ; then # install default config echo "Did not find a /etc/dovecot/dovecot.conf. copying default configuration" cp -na %{_datadir}/%{name}/example-config/* %{_sysconfdir}/%{name}/ # the chmod breaks the lda. lets use the more open permissions #chmod -Rv o= %{_sysconfdir}/%{name}/ fi -%if %{with systemd} %service_add_pre %{name}.service %{name}.socket -%endif %preun -%if %{with systemd} %service_del_preun %{name}.service %{name}.socket -%else -%stop_on_removal %{name} -%endif -%if %{with systemd} %post -%tmpfiles_create dovecot.conf +%tmpfiles_create %{_tmpfilesdir}/%{name}.conf %service_add_post %{name}.service %{name}.socket -%endif %postun -%if %{with systemd} %service_del_postun %{name}.service -%else -%restart_on_update %{name} -%insserv_cleanup -%endif %files %defattr(-,root,root) -%doc %{_datadir}/doc/packages/dovecot/ +%doc %{_datadir}/doc/packages/%{name}/ # conf -%dir /etc/dovecot/ -%ghost %config(noreplace) /etc/dovecot/* +%dir /etc/%{name}/ +%ghost %config(noreplace) /etc/%{name}/* %config(noreplace) %{_sysconfdir}/pam.d/%{name} %{_sbindir}/rc%{name} -%if %{with systemd} -/usr/lib/tmpfiles.d/dovecot.conf -%{_unitdir}/dovecot.service -%{_unitdir}/dovecot.socket -%else -%{_sysconfdir}/init.d/%{name} -%endif -# setting up permissions -%if ! %{with systemd} -%dir %attr(0755,root,root) %ghost %{_var}/run/%{name}/ -%dir %attr(0750,root,%{name}) %ghost %{_var}/run/%{name}/login/ -%endif -%dir %attr(0750,root,root) %{_var}/lib/%{name}/ +/usr/lib/tmpfiles.d/%{name}.conf +%{_unitdir}/%{name}.service +%{_unitdir}/%{name}.socket +%dir %{_localstatedir}/lib/%{name} +%ghost %dir /run/%{name} +%ghost %dir /run/%{name}/login %changelog From 68ec85d3e982a737fd6591cfd41c5d19de507bbc33101d213afcc1aa48977bce Mon Sep 17 00:00:00 2001 From: Peter Varkoly Date: Wed, 21 Apr 2021 14:14:29 +0000 Subject: [PATCH 3/9] Remove not used file OBS-URL: https://build.opensuse.org/package/show/server:mail/dovecot?expand=0&rev=24 --- dovecot.init | 94 ---------------------------------------------------- 1 file changed, 94 deletions(-) delete mode 100644 dovecot.init diff --git a/dovecot.init b/dovecot.init deleted file mode 100644 index 417a24b..0000000 --- a/dovecot.init +++ /dev/null @@ -1,94 +0,0 @@ -#! /bin/sh -# Copyright (c) 1995-2004 SUSE Linux AG, Nuernberg, Germany. -# 2005-2007 SUSE / Novell Inc. -# All rights reserved. -# -# Author: Mads Martin Joergensen -# Marcus Rueckert -# Please send feedback to http://www.suse.de/feedback/ -# -# /etc/init.d/dovecot -# and its symbolic link -# /usr/sbin/rcdovecot -# -### BEGIN INIT INFO -# Provides: dovecot -# Required-Start: $remote_fs $syslog $network -# Required-Stop: $remote_fs $syslog $network -# Should-Start: $named $time postgresql mysql ldap -# Should-Stop: postgresql mysql ldap -# X-Start-Before: exim postfix -# Default-Start: 3 5 -# Default-Stop: 0 1 2 6 -# Short-Description: Dovecot IMAP/POP3/SASL server -# Description: Dovecot IMAP/POP3/SASL server -### END INIT INFO - -. /etc/rc.status - -# Reset status of this service -rc_reset - -DOVECOT_BIN=/usr/sbin/dovecot -test -x $DOVECOT_BIN || { - echo "$DOVECOT_BIN not installed"; - if [ "$1" = "stop" ] ; then - exit 0 - else - exit 5 - fi - } - -case "$1" in - start) - echo -n "Starting dovecot " - startproc $DOVECOT_BIN - rc_status -v - ;; - stop) - echo -n "Stopping dovecot " - killproc -TERM $DOVECOT_BIN - rc_status -v - ;; - try-restart|condrestart) - $0 status - if test $? = 0; then - $0 restart - else - rc_reset - fi - rc_status - ;; - restart) - $0 stop - $0 start - rc_status - ;; - force-reload) - # dovecot has support for reloading it's config when - # recieving signal 1 (SIGHUP). There's still some - # issues noticed in the dovecot-TODO though so restart - # for now. - echo -n "Reload service dovecot " - # killproc -HUP $DOVECOT_BIN - # rc_status -v - - $0 try-restart - rc_status - ;; - reload) - echo -n "Reload service dovecot " - killproc -HUP $DOVECOT_BIN - rc_status -v - ;; - status) - echo -n "Checking for service dovecot " - checkproc $DOVECOT_BIN - rc_status -v - ;; - *) - echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" - exit 1 - ;; -esac -rc_exit From 16d79b773c7c412b11faa2f45f976a56d2c8e088acd1fb8a371ae413017db4c5 Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Sat, 12 Feb 2022 22:26:10 +0000 Subject: [PATCH 4/9] Accepting request 950206 from home:weberho:qmailtoaster - Re-ordered changelog to make it building on Leap versions again OBS-URL: https://build.opensuse.org/request/show/950206 OBS-URL: https://build.opensuse.org/package/show/server:mail/dovecot?expand=0&rev=25 --- dovecot.changes | 19 +++++++++++++------ dovecot.spec | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/dovecot.changes b/dovecot.changes index f4590f6..ac1c87e 100644 --- a/dovecot.changes +++ b/dovecot.changes @@ -1,9 +1,22 @@ +------------------------------------------------------------------- +Mon Jan 31 13:21:23 UTC 2022 - Johannes Weberhofer + +- Re-ordered changelog to make it building on Leap versions + again + ------------------------------------------------------------------- Wed Apr 21 11:50:25 UTC 2021 - Peter Varkoly - (bsc#1185074) /var/run in /usr/lib/tmpfiles.d/dovecot.conf is deprecated, please use /run instead +------------------------------------------------------------------- +Wed Apr 21 11:50:25 UTC 2021 - Peter Varkoly + - also modified by Thorsten Kukuk on + Fri Nov 13 14:11:59 UTC 2020 + +- Check first if they exist before creating user and group accounts + ------------------------------------------------------------------- Fri Apr 16 10:58:13 UTC 2021 - Илья Индиго - Refreshed spec-file via spec-cleaner and manual optimization. @@ -11,12 +24,6 @@ Fri Apr 16 10:58:13 UTC 2021 - Илья Индиго * Added parameter -p to all install command in spec-file. * Added %{name} macro wherever possible. -------------------------------------------------------------------- -Wed Apr 21 11:50:25 UTC 2021 - Peter Varkoly -Fri Nov 13 14:11:59 UTC 2020 - Thorsten Kukuk - -- Check first if they exist before creating user and group accounts - ------------------------------------------------------------------- Thu Nov 5 14:33:43 UTC 2020 - Thorsten Kukuk diff --git a/dovecot.spec b/dovecot.spec index 05aaf6a..9f5582e 100644 --- a/dovecot.spec +++ b/dovecot.spec @@ -1,7 +1,7 @@ # # spec file for package dovecot # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed From 7a9c02bb9f2be4e659a25f90130dca5da645ccfb6d42448b64d2827b7d7b0bab Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Mon, 14 Feb 2022 09:55:15 +0000 Subject: [PATCH 5/9] OBS-URL: https://build.opensuse.org/package/show/server:mail/dovecot?expand=0&rev=26 --- dovecot.changes | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/dovecot.changes b/dovecot.changes index ac1c87e..8a27e70 100644 --- a/dovecot.changes +++ b/dovecot.changes @@ -10,13 +10,6 @@ Wed Apr 21 11:50:25 UTC 2021 - Peter Varkoly - (bsc#1185074) /var/run in /usr/lib/tmpfiles.d/dovecot.conf is deprecated, please use /run instead -------------------------------------------------------------------- -Wed Apr 21 11:50:25 UTC 2021 - Peter Varkoly - - also modified by Thorsten Kukuk on - Fri Nov 13 14:11:59 UTC 2020 - -- Check first if they exist before creating user and group accounts - ------------------------------------------------------------------- Fri Apr 16 10:58:13 UTC 2021 - Илья Индиго - Refreshed spec-file via spec-cleaner and manual optimization. @@ -24,6 +17,11 @@ Fri Apr 16 10:58:13 UTC 2021 - Илья Индиго * Added parameter -p to all install command in spec-file. * Added %{name} macro wherever possible. +------------------------------------------------------------------- +Fri Nov 13 14:11:59 UTC 2020 - Thorsten Kukuk + +- Check first if they exist before creating user and group accounts + ------------------------------------------------------------------- Thu Nov 5 14:33:43 UTC 2020 - Thorsten Kukuk From 28ff0314a1e3c77d2b3dd1c20f912c2677125999b5ef8f51b62209f359cbbbb8 Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Mon, 14 Feb 2022 09:55:21 +0000 Subject: [PATCH 6/9] OBS-URL: https://build.opensuse.org/package/show/server:mail/dovecot?expand=0&rev=27 --- dovecot.changes | 1 - 1 file changed, 1 deletion(-) diff --git a/dovecot.changes b/dovecot.changes index 8a27e70..e55b386 100644 --- a/dovecot.changes +++ b/dovecot.changes @@ -151,4 +151,3 @@ Fri Sep 5 10:59:11 UTC 2014 - mrueckert@suse.de Thu Sep 4 13:44:06 UTC 2014 - mrueckert@suse.de - start an unversioned wrapper package again - From b96cc07944ad257b5e0bc7b55c99c2bf83961fd0ade1ade5a92afcf76b938176 Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Mon, 14 Feb 2022 10:04:37 +0000 Subject: [PATCH 7/9] Fix perms OBS-URL: https://build.opensuse.org/package/show/server:mail/dovecot?expand=0&rev=28 --- dovecot.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dovecot.spec b/dovecot.spec index 9f5582e..f177332 100644 --- a/dovecot.spec +++ b/dovecot.spec @@ -119,7 +119,7 @@ fi /usr/lib/tmpfiles.d/%{name}.conf %{_unitdir}/%{name}.service %{_unitdir}/%{name}.socket -%dir %{_localstatedir}/lib/%{name} +%dir %attr(0750,root,root) %{_localstatedir}/lib/%{name} %ghost %dir /run/%{name} %ghost %dir /run/%{name}/login From c21fed8d49a9d13aed5d41d030c9b1b46a7b797e8e7d7119bb33b713587a0c32 Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Mon, 14 Feb 2022 10:05:04 +0000 Subject: [PATCH 8/9] OBS-URL: https://build.opensuse.org/package/show/server:mail/dovecot?expand=0&rev=29 --- dovecot.changes | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dovecot.changes b/dovecot.changes index e55b386..2d87a99 100644 --- a/dovecot.changes +++ b/dovecot.changes @@ -1,8 +1,7 @@ ------------------------------------------------------------------- -Mon Jan 31 13:21:23 UTC 2022 - Johannes Weberhofer +Mon Feb 14 10:04:47 UTC 2022 - Dirk Stoecker -- Re-ordered changelog to make it building on Leap versions - again +- Fix changelog and permissions ------------------------------------------------------------------- Wed Apr 21 11:50:25 UTC 2021 - Peter Varkoly From 3f3a9eaed01e4c98bab4531162a7e120bdb717d535fc6fe959b45d700577e2c7 Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Mon, 14 Feb 2022 13:45:03 +0000 Subject: [PATCH 9/9] OBS-URL: https://build.opensuse.org/package/show/server:mail/dovecot?expand=0&rev=30 --- dovecot.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dovecot.spec b/dovecot.spec index f177332..36cdbf4 100644 --- a/dovecot.spec +++ b/dovecot.spec @@ -68,7 +68,7 @@ done install -D -p -m 0644 %{S:5} %{buildroot}%{_datadir}/doc/packages/%{name}/README.SUSE install -d %{buildroot}%{_sbindir} -%{__install} -D -m 644 %{S:7} %{buildroot}/usr/lib/tmpfiles.d/%{name}.conf +%{__install} -D -m 644 %{S:7} %{buildroot}%{_tmpfilesdir}/%{name}.conf %{__ln_s} -f %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} install -D -p -m 0644 %{S:8} %{buildroot}%{_unitdir}/%{name}.service install -D -p -m 0644 %{S:9} %{buildroot}%{_unitdir}/%{name}.socket @@ -116,7 +116,7 @@ fi %ghost %config(noreplace) /etc/%{name}/* %config(noreplace) %{_sysconfdir}/pam.d/%{name} %{_sbindir}/rc%{name} -/usr/lib/tmpfiles.d/%{name}.conf +%{_tmpfilesdir}/%{name}.conf %{_unitdir}/%{name}.service %{_unitdir}/%{name}.socket %dir %attr(0750,root,root) %{_localstatedir}/lib/%{name}