Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package postfix for openSUSE:Factory checked in at 2024-05-21 18:33:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/postfix (Old) and /work/SRC/openSUSE:Factory/.postfix.new.1880 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "postfix" Tue May 21 18:33:12 2024 rev:240 rq:1175398 version:3.9.0 Changes: -------- --- /work/SRC/openSUSE:Factory/postfix/postfix-bdb.changes 2024-05-20 18:09:56.986677660 +0200 +++ /work/SRC/openSUSE:Factory/.postfix.new.1880/postfix-bdb.changes 2024-05-21 18:33:13.751364700 +0200 @@ -1,0 +2,7 @@ +Mon May 20 20:45:06 UTC 2024 - ch...@computersalat.de + +- Update update_chroot.systemd + * Add missing checks for DKIM (openDKIM) +- keep spec and changes files in sync + +------------------------------------------------------------------- @@ -10,0 +18,5 @@ +Fri Apr 5 01:44:30 UTC 2024 - Georg Pfuetzenreuter <mail+...@georg-pfuetzenreuter.net> + +- Move qshape(1) out of -doc, install it as a binary with the main package + +------------------------------------------------------------------- --- /work/SRC/openSUSE:Factory/postfix/postfix.changes 2024-05-20 18:09:57.038679556 +0200 +++ /work/SRC/openSUSE:Factory/.postfix.new.1880/postfix.changes 2024-05-21 18:33:13.787366009 +0200 @@ -1,0 +2,7 @@ +Mon May 20 20:45:06 UTC 2024 - ch...@computersalat.de + +- Update update_chroot.systemd + * Add missing checks for DKIM (openDKIM) +- keep spec and changes files in sync + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ postfix-bdb.spec ++++++ --- /var/tmp/diff_new_pack.NwWn8L/_old 2024-05-21 18:33:17.355495741 +0200 +++ /var/tmp/diff_new_pack.NwWn8L/_new 2024-05-21 18:33:17.371496323 +0200 @@ -128,14 +128,14 @@ %endif # /usr/lib/postfix/bin//post-install: line 667: ed: command not found Requires(pre): ed -Requires(preun):ed +Requires(preun): ed Requires(post): ed -Requires(postun):ed +Requires(postun): ed # /usr/sbin/config.postfix needs perl Requires(pre): perl -Requires(preun):perl +Requires(preun): perl Requires(post): perl -Requires(postun):perl +Requires(postun): perl %description Postfix aims to be an alternative to the widely-used sendmail program with bdb support @@ -342,6 +342,9 @@ cp -a html/* %{buildroot}%{pf_html_directory} cp -a auxiliary %{buildroot}%{pf_docdir} rm %{buildroot}%{pf_docdir}/README_FILES/INSTALL +rm -r %{buildroot}%{pf_docdir}/auxiliary/qshape +install -p auxiliary/qshape/qshape.pl %{buildroot}%{_sbindir}/qshape +mantools/srctoman - auxiliary/qshape/qshape.pl > %{buildroot}%{_mandir}/man1/qshape.1 # Fix build for Leap 42.3. rm -f %{buildroot}%{_sysconfdir}/postfix/*.orig mkdir -p %{buildroot}%{_unitdir} @@ -506,6 +509,7 @@ %attr(0755,root,root) %{_sbindir}/postmap %attr(0755,root,root) %{_sbindir}/postmulti %attr(0755,root,root) %{_sbindir}/postsuper +%attr(0755,root,root) %{_sbindir}/qshape %attr(0755,root,root) %{_sbindir}/qmqp-source %attr(0755,root,root) %{_sbindir}/smtp-sink %attr(0755,root,root) %{_sbindir}/smtp-source ++++++ postfix.spec ++++++ --- /var/tmp/diff_new_pack.NwWn8L/_old 2024-05-21 18:33:17.751510140 +0200 +++ /var/tmp/diff_new_pack.NwWn8L/_new 2024-05-21 18:33:17.771510867 +0200 @@ -110,14 +110,14 @@ %endif # /usr/lib/postfix/bin//post-install: line 667: ed: command not found Requires(pre): /usr/bin/ed -Requires(preun):/usr/bin/ed +Requires(preun): /usr/bin/ed Requires(post): /usr/bin/ed -Requires(postun):/usr/bin/ed +Requires(postun): /usr/bin/ed # /usr/sbin/config.postfix needs perl Requires(pre): perl -Requires(preun):perl +Requires(preun): perl Requires(post): perl -Requires(postun):perl +Requires(postun): perl %description Postfix aims to be an alternative to the widely-used sendmail program. ++++++ postfix-SUSE.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/postfix-SUSE/update_chroot.systemd new/postfix-SUSE/update_chroot.systemd --- old/postfix-SUSE/update_chroot.systemd 2020-07-03 16:28:10.000000000 +0200 +++ new/postfix-SUSE/update_chroot.systemd 2024-05-20 23:05:47.000000000 +0200 @@ -1,84 +1,152 @@ #!/bin/bash # -# /etc/postfix/system/update_chroot +# /usr/lib/postfix/systemd/update_chroot # # Description: # +############################################################################## +# +# functions # -defaults=/usr/bin/my_print_defaults -test -f /etc/sysconfig/postfix && . /etc/sysconfig/postfix - -warn_user(){ +warn_user() { tput bold echo -e "\t*** WARNING ***" - echo -e $1 + echo -e "${1}" echo -e "\t*** WARNING ***" tput sgr0 } -chk_mysql_sock() -{ +chk_dkim_sock() { local -i RET=0 - local PF_CHROOT="/var/spool/postfix" - local MYSQLD="$($defaults mysqld)" + DKIM_SOCKET=$(awk -F':' '/^Socket(\s|\t)+local/ {print $2}' /etc/opendkim/opendkim.conf) + + if [[ -n "${DKIM_SOCKET}" ]]; then + [[ "${DKIM_SOCKET}" =~ ^/var/run ]] && DKIM_SOCKET="${DKIM_SOCKET#/var}" + DKIM_SOCKET_DIR="${DKIM_SOCKET%/*}" + CHR_DKIM_SOCKET="${PF_CHROOT}${DKIM_SOCKET}" + CHR_DKIM_SOCKET_DIR="${CHR_DKIM_SOCKET%/*}" + if [[ -S "${DKIM_SOCKET}" ]]; then + if [[ -d "${CHR_DKIM_SOCKET_DIR}" ]]; then + if grep "${CHR_DKIM_SOCKET_DIR}" /proc/mounts &> /dev/null; then + RET=0 + else + RET=4 + fi + else + RET=3 + fi + else + RET=2 + fi + else + RET=1 + fi + return "${RET}" +} - if [ -n "$MYSQLD" ]; then - MYSQL_SOCKET=$(echo "$MYSQLD" | awk -F"=" '/--socket/ {print $2}') +chk_mysql_sock() { + local -i RET=0 + MYSQL_SOCKET=$(awk -F'=' '/--socket/ {print $2}'<<<"$(/usr/bin/my_print_defaults mysqld)") + + if [[ -n "${MYSQL_SOCKET}" ]]; then # fix for: Can't connect to local MySQL server through socket '/run/mysql/mysql.sock' (2) [[ "${MYSQL_SOCKET}" =~ ^/var/run ]] && MYSQL_SOCKET="${MYSQL_SOCKET#/var}" - MYSQL_SOCKET_DIR=${MYSQL_SOCKET%/*} - CHR_MYSQL_SOCKET=${PF_CHROOT}${MYSQL_SOCKET} - CHR_MYSQL_SOCKET_DIR=${CHR_MYSQL_SOCKET%/*} - if [ -S $MYSQL_SOCKET ]; then - if [ -d $CHR_MYSQL_SOCKET_DIR ]; then - if grep $CHR_MYSQL_SOCKET_DIR /proc/mounts &> /dev/null; then - RET=0 - else - RET=8 - fi + MYSQL_SOCKET_DIR="${MYSQL_SOCKET%/*}" + CHR_MYSQL_SOCKET="${PF_CHROOT}${MYSQL_SOCKET}" + CHR_MYSQL_SOCKET_DIR="${CHR_MYSQL_SOCKET%/*}" + if [[ -S "${MYSQL_SOCKET}" ]]; then + if [[ -d "${CHR_MYSQL_SOCKET_DIR}" ]]; then + if grep "${CHR_MYSQL_SOCKET_DIR}" /proc/mounts &> /dev/null; then + RET=0 else RET=4 fi + else + RET=3 + fi else - RET=2 + RET=2 fi else RET=1 fi - return $RET + return "${RET}" } -if [ "${POSTFIX_UPDATE_CHROOT_JAIL,,[A-Z]}" != "no" ]; then - if [ "${POSTFIX_MYSQL_CONN,,[A-Z]}" == "socket" -a "${POSTFIX_WITH_MYSQL,,[A-Z]}" != "no" ]; then - chk_mysql_sock - case $? in - 1) +############################################################################## +# +# vars +# + +PF_CHROOT='/var/spool/postfix' + +############################################################################## +# +# main script +# + +test -f /etc/sysconfig/postfix && . /etc/sysconfig/postfix + +if [[ "${POSTFIX_UPDATE_CHROOT_JAIL,,[A-Z]}" != 'no' ]]; then + # POSTFIX_DKIM + if [[ "${POSTFIX_DKIM_CONN,,[A-Z]}" == 'socket' ]] && [[ "${POSTFIX_WITH_DKIM,,[A-Z]}" != 'no' ]]; then + chk_dkim_sock + case $? in + 1) +warn_user "\t/etc/opendkim/opendkim.conf does not exist!!\n\ +\tThis should not happen!\n\ +\tPlease check if opendkim is installed." + exit 1 + ;; + 2) +warn_user "\tDKIM not started\n\ +\tPlease check if DKIM is started on boot" + exit 2 + ;; + 3) +warn_user "\t${CHR_DKIM_SOCKET_DIR} does not exist!!\n\ +\tThis should not happen!" + exit 3 + ;; + 4) + if ! /bin/mount -o bind "${DKIM_SOCKET_DIR}" "${CHR_DKIM_SOCKET_DIR}" &> /dev/null; then + echo -n " ... can not mount ${DKIM_SOCKET_DIR} to ${CHR_DKIM_SOCKET_DIR}" + exit 4 + fi + ;; + esac + fi + + # POSTFIX_MYSQL/MARIADB + if [[ "${POSTFIX_MYSQL_CONN,,[A-Z]}" == 'socket' ]] && [[ "${POSTFIX_WITH_MYSQL,,[A-Z]}" != 'no' ]]; then + chk_mysql_sock + case $? in + 1) warn_user "\t/etc/my.cnf does not exist!!\n\ \tThis should not happen!\n\ \tPlease check if postfix-mysql is installed and check for package mysql." - exit 5 - ;; - 2) + exit 5 + ;; + 2) warn_user "\tMySQL not started\n\ \tPlease check if MySQL is started on boot" - exit 7 - ;; - 4) -warn_user "\t$CHR_MYSQL_SOCKET_DIR does not exist!!\n\ + exit 6 + ;; + 3) +warn_user "\t${CHR_MYSQL_SOCKET_DIR} does not exist!!\n\ \tThis should not happen!" - exit 6 - ;; - 8) - /bin/mount -o bind $MYSQL_SOCKET_DIR $CHR_MYSQL_SOCKET_DIR &> /dev/null - [ $? -ne 0 ] && { - echo -n " ... can not mount $MYSQL_SOCKET_DIR to $CHR_MYSQL_SOCKET_DIR" - exit 1 - } - ;; - esac + exit 7 + ;; + 4) + if ! /bin/mount -o bind "${MYSQL_SOCKET_DIR}" "${CHR_MYSQL_SOCKET_DIR}" &> /dev/null; then + echo -n " ... can not mount ${MYSQL_SOCKET_DIR} to ${CHR_MYSQL_SOCKET_DIR}" + exit 8 + fi + ;; + esac fi fi exit 0 # -# end /etc/postfix/system/update_chroot +# end /usr/lib/postfix/systemd/update_chroot