Package: release.debian.org Severity: normal Tags: stretch User: release.debian....@packages.debian.org Usertags: pu
While doing some QA testing on sendmail to verify the start-stop-daemon fixes for buster, I noticed that sendmail does not stop itself properly while being removed. This has been fixed in sid, and has a buster-pu request open, but I'd like to fix this in stretch, too. Along this, I've cherry-picked all the bugfixes that have been applied to the package during the buster release cycle and are relevant for stretch, too. Thanks for considering. Andreas
diff --git a/debian/Makefile.in b/debian/Makefile.in index 3c89f52..0f6e3f3 100644 --- a/debian/Makefile.in +++ b/debian/Makefile.in @@ -117,6 +117,7 @@ CONFIG_CLEAN_FILES = build/autoconf.mk build/autoconf.pl \ cf/ostype/debian.m4 \ examples/dhcp/dhclient-exit-hooks.d/sendmail \ examples/network/if-down.d/sendmail \ + examples/network/if-post-down.d/sendmail \ examples/network/if-up.d/sendmail \ examples/ppp/ip-down.d/sendmail examples/ppp/ip-up.d/sendmail \ examples/resolvconf/update-libc.d/sendmail \ @@ -211,6 +212,7 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/bug-control.in \ $(top_srcdir)/cf/ostype/debian.m4.in \ $(top_srcdir)/examples/dhcp/dhclient-exit-hooks.d/sendmail.in \ $(top_srcdir)/examples/network/if-down.d/sendmail.in \ + $(top_srcdir)/examples/network/if-post-down.d/sendmail.in \ $(top_srcdir)/examples/network/if-up.d/sendmail.in \ $(top_srcdir)/examples/ppp/ip-down.d/sendmail.in \ $(top_srcdir)/examples/ppp/ip-up.d/sendmail.in \ @@ -591,6 +593,8 @@ examples/dhcp/dhclient-exit-hooks.d/sendmail: $(top_builddir)/config.status $(to cd $(top_builddir) && $(SHELL) ./config.status $@ examples/network/if-down.d/sendmail: $(top_builddir)/config.status $(top_srcdir)/examples/network/if-down.d/sendmail.in cd $(top_builddir) && $(SHELL) ./config.status $@ +examples/network/if-post-down.d/sendmail: $(top_builddir)/config.status $(top_srcdir)/examples/network/if-post-down.d/sendmail.in + cd $(top_builddir) && $(SHELL) ./config.status $@ examples/network/if-up.d/sendmail: $(top_builddir)/config.status $(top_srcdir)/examples/network/if-up.d/sendmail.in cd $(top_builddir) && $(SHELL) ./config.status $@ examples/ppp/ip-down.d/sendmail: $(top_builddir)/config.status $(top_srcdir)/examples/ppp/ip-down.d/sendmail.in diff --git a/debian/changelog b/debian/changelog index 267dcce..c3fe5ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,26 @@ +sendmail (8.15.2-8+deb9u1) stretch; urgency=medium + + * QA upload. + * rmail: Add exim4 to the list of conflicting MTAs. (Closes: #863567) + * Skip hook execution if /usr/share/sendmail/dynamic does not exist. + (Closes: #873978) + * debian/examples/network/if-post-down.d/sendmail: Generate during build. + * connect-from-null.patch: New, fix "NOQUEUE: connect from (null)", thanks + to Michael Grant and Claus Assmann. + * Fix finding the queue runner control process in "split daemon" mode, + thanks to Marc Andre Selig. (Closes: #887064) + * Fix prerm failure on btrfs. (Closes: #893424) + * Switch Vcs-* URLs to salsa.debian.org. + * Fix typos in descriptions. (Closes: #894535) + * sendmail-bin.prerm: Stop sendmail before removing the alternatives. + + -- Andreas Beckmann <a...@debian.org> Sun, 25 Aug 2019 20:07:11 +0200 + sendmail (8.15.2-8) unstable; urgency=medium * QA upload. * Use lockfile-create (from lockfile-progs) instead of touch to manage the - cronjob lockfiles. + cronjob lockfiles. (Closes: #847498) * Switch to debhelper compat level 10. -- Andreas Beckmann <a...@debian.org> Thu, 08 Dec 2016 18:43:49 +0100 diff --git a/debian/configure b/debian/configure index 3ed645a..c0bd6b0 100755 --- a/debian/configure +++ b/debian/configure @@ -7588,6 +7588,8 @@ ac_config_files="$ac_config_files examples/dhcp/dhclient-exit-hooks.d/sendmail" ac_config_files="$ac_config_files examples/network/if-down.d/sendmail" +ac_config_files="$ac_config_files examples/network/if-post-down.d/sendmail" + ac_config_files="$ac_config_files examples/network/if-up.d/sendmail" ac_config_files="$ac_config_files examples/ppp/ip-down.d/sendmail" @@ -8442,6 +8444,7 @@ do "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "examples/dhcp/dhclient-exit-hooks.d/sendmail") CONFIG_FILES="$CONFIG_FILES examples/dhcp/dhclient-exit-hooks.d/sendmail" ;; "examples/network/if-down.d/sendmail") CONFIG_FILES="$CONFIG_FILES examples/network/if-down.d/sendmail" ;; + "examples/network/if-post-down.d/sendmail") CONFIG_FILES="$CONFIG_FILES examples/network/if-post-down.d/sendmail" ;; "examples/network/if-up.d/sendmail") CONFIG_FILES="$CONFIG_FILES examples/network/if-up.d/sendmail" ;; "examples/ppp/ip-down.d/sendmail") CONFIG_FILES="$CONFIG_FILES examples/ppp/ip-down.d/sendmail" ;; "examples/ppp/ip-up.d/sendmail") CONFIG_FILES="$CONFIG_FILES examples/ppp/ip-up.d/sendmail" ;; @@ -9006,6 +9009,7 @@ $as_echo X"$file" | ;; "examples/dhcp/dhclient-exit-hooks.d/sendmail":F) chmod a+x ./examples/dhcp/dhclient-exit-hooks.d/sendmail ;; "examples/network/if-down.d/sendmail":F) chmod a+x ./examples/network/if-down.d/sendmail ;; + "examples/network/if-post-down.d/sendmail":F) chmod a+x ./examples/network/if-post-down.d/sendmail ;; "examples/network/if-up.d/sendmail":F) chmod a+x ./examples/network/if-up.d/sendmail ;; "examples/ppp/ip-down.d/sendmail":F) chmod a+x ./examples/ppp/ip-down.d/sendmail ;; "examples/ppp/ip-up.d/sendmail":F) chmod a+x ./examples/ppp/ip-up.d/sendmail ;; diff --git a/debian/configure.ac b/debian/configure.ac index 3c16c82..343aa1e 100644 --- a/debian/configure.ac +++ b/debian/configure.ac @@ -1746,6 +1746,8 @@ AC_CONFIG_FILES([examples/dhcp/dhclient-exit-hooks.d/sendmail], [chmod a+x ./examples/dhcp/dhclient-exit-hooks.d/sendmail]) AC_CONFIG_FILES([examples/network/if-down.d/sendmail], [chmod a+x ./examples/network/if-down.d/sendmail]) +AC_CONFIG_FILES([examples/network/if-post-down.d/sendmail], + [chmod a+x ./examples/network/if-post-down.d/sendmail]) AC_CONFIG_FILES([examples/network/if-up.d/sendmail], [chmod a+x ./examples/network/if-up.d/sendmail]) AC_CONFIG_FILES([examples/ppp/ip-down.d/sendmail], diff --git a/debian/control b/debian/control index 3fb1646..9045be2 100644 --- a/debian/control +++ b/debian/control @@ -19,8 +19,8 @@ Build-Conflicts: bind-dev, fakeroot (<< 0.4.5), Homepage: http://www.sendmail.org -Vcs-Git: https://anonscm.debian.org/git/collab-maint/sendmail.git -Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/sendmail.git +Vcs-Browser: https://salsa.debian.org/debian/sendmail +Vcs-Git: https://salsa.debian.org/debian/sendmail.git Package: sendmail-bin Architecture: any @@ -48,7 +48,7 @@ Description: powerful, efficient, and scalable Mail Transport Agent It is suitable for handling sophisticated mail configurations, although this means that its configuration can also be complex. . - Fortunately, simple thing can be done easily, and complex things + Fortunately, simple things can be done easily, and complex things are possible, even if not easily understood ;) Sendmail is the *ONLY* MTA with a Turing complete language to control *ALL* aspects of delivery! . @@ -66,6 +66,7 @@ Conflicts: postfix, exim, exim-tls, + exim4, exim4-daemon-custom, exim4-daemon-heavy, exim4-daemon-light, @@ -173,7 +174,7 @@ Description: powerful, efficient, and scalable Mail Transport Agent (metapackage It is suitable for handling sophisticated mail configurations, although this means that its configuration can also be complex. . - Fortunately, simple thing can be done easily, and complex things + Fortunately, simple things can be done easily, and complex things are possible, even if not easily understood ;) Sendmail is the *ONLY* MTA with a Turing complete language to control *ALL* aspects of delivery! . diff --git a/debian/control.in b/debian/control.in index 6930cc9..c4c7fe8 100644 --- a/debian/control.in +++ b/debian/control.in @@ -19,8 +19,8 @@ Build-Conflicts: bind-dev, fakeroot (<< 0.4.5), Homepage: http://www.sendmail.org -Vcs-Git: https://anonscm.debian.org/git/collab-maint/sendmail.git -Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/sendmail.git +Vcs-Browser: https://salsa.debian.org/debian/sendmail +Vcs-Git: https://salsa.debian.org/debian/sendmail.git Package: sendmail-bin Architecture: any @@ -48,7 +48,7 @@ Description: powerful, efficient, and scalable Mail Transport Agent It is suitable for handling sophisticated mail configurations, although this means that its configuration can also be complex. . - Fortunately, simple thing can be done easily, and complex things + Fortunately, simple things can be done easily, and complex things are possible, even if not easily understood ;) Sendmail is the *ONLY* MTA with a Turing complete language to control *ALL* aspects of delivery! . @@ -66,6 +66,7 @@ Conflicts: postfix, exim, exim-tls, + exim4, exim4-daemon-custom, exim4-daemon-heavy, exim4-daemon-light, @@ -173,7 +174,7 @@ Description: powerful, efficient, and scalable Mail Transport Agent (metapackage It is suitable for handling sophisticated mail configurations, although this means that its configuration can also be complex. . - Fortunately, simple thing can be done easily, and complex things + Fortunately, simple things can be done easily, and complex things are possible, even if not easily understood ;) Sendmail is the *ONLY* MTA with a Turing complete language to control *ALL* aspects of delivery! . diff --git a/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.in b/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.in index c517033..256b05b 100644 --- a/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.in +++ b/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.in @@ -25,6 +25,7 @@ case "$reason" in esac; # Bring in some script functions to handle dynamic configuration +test -r @datadir@/sendmail/dynamic || exit 0 . @datadir@/sendmail/dynamic; # Note the interface that just changed diff --git a/debian/examples/network/if-down.d/sendmail.in b/debian/examples/network/if-down.d/sendmail.in index 254445b..ae5d24a 100644 --- a/debian/examples/network/if-down.d/sendmail.in +++ b/debian/examples/network/if-down.d/sendmail.in @@ -31,6 +31,7 @@ if [ -z "$provider" ]; then fi; # Bring in some script functions to handle dynamic configuration +test -r @datadir@/sendmail/dynamic || exit 0 . @datadir@/sendmail/dynamic; # Note the interface that just changed diff --git a/debian/examples/network/if-post-down.d/sendmail b/debian/examples/network/if-post-down.d/sendmail deleted file mode 100644 index 5cb9322..0000000 --- a/debian/examples/network/if-post-down.d/sendmail +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -# -# This script is called when a network device goes down. -# -# Here is where we'll stop sendmail if needed -# -# Written By Richard Nelson <cow...@debian.org> -# -# NOTE: The following lines (without the #) must be in /etc/mail/sendmail.mc: -# include(`/etc/mail/dialup.m4')dnl -# include(`/etc/mail/provider.m4')dnl -# - -# These variables are for the use of the scripts run by run-parts -#IFACE=; -#IF_ADDRESS=; -#IF_PROVIDER=; - -if [ ! -z "$IFACE" ]; then - addr=$IF_ADDRESS; - provider=$IF_PROVIDER; - iface=$IFACE; -else - addr=$1; - provider=$2; - iface=$3; - fi; - -if [ -z "$provider" ]; then - exit 0; - fi; - -# Bring in some script functions to handle dynamic configuration -. /usr/share/sendmail/dynamic; - -# Note the interface that just changed -update_interface "$iface" "STOP"; - -# If anything has been changed, update sendmail.cf and reload -update_sendmail "ifupdown"; - -exit 0; diff --git a/debian/examples/network/if-post-down.d/sendmail.in b/debian/examples/network/if-post-down.d/sendmail.in index 254445b..ae5d24a 100644 --- a/debian/examples/network/if-post-down.d/sendmail.in +++ b/debian/examples/network/if-post-down.d/sendmail.in @@ -31,6 +31,7 @@ if [ -z "$provider" ]; then fi; # Bring in some script functions to handle dynamic configuration +test -r @datadir@/sendmail/dynamic || exit 0 . @datadir@/sendmail/dynamic; # Note the interface that just changed diff --git a/debian/examples/network/if-up.d/sendmail.in b/debian/examples/network/if-up.d/sendmail.in index f0d58d1..1226b58 100644 --- a/debian/examples/network/if-up.d/sendmail.in +++ b/debian/examples/network/if-up.d/sendmail.in @@ -41,6 +41,7 @@ else fi; # Bring in some script functions to handle dynamic configuration +test -r @datadir@/sendmail/dynamic || exit 0 . @datadir@/sendmail/dynamic; # Note the interface that just changed diff --git a/debian/examples/ppp/ip-down.d/sendmail.in b/debian/examples/ppp/ip-down.d/sendmail.in index 71f42b6..0ac5215 100644 --- a/debian/examples/ppp/ip-down.d/sendmail.in +++ b/debian/examples/ppp/ip-down.d/sendmail.in @@ -34,6 +34,7 @@ if [ -z "$provider" ]; then fi; # Bring in some script functions to handle dynamic configuration +test -r @datadir@/sendmail/dynamic || exit 0 . @datadir@/sendmail/dynamic; # Note the interface that just changed diff --git a/debian/examples/ppp/ip-up.d/sendmail.in b/debian/examples/ppp/ip-up.d/sendmail.in index 191b9a8..9d41548 100644 --- a/debian/examples/ppp/ip-up.d/sendmail.in +++ b/debian/examples/ppp/ip-up.d/sendmail.in @@ -39,6 +39,7 @@ if [ -z "$provider" ]; then fi; # Bring in some script functions to handle dynamic configuration +test -r @datadir@/sendmail/dynamic || exit 0 . @datadir@/sendmail/dynamic; # Note the interface that just changed diff --git a/debian/examples/resolvconf/update-libc.d/sendmail.in b/debian/examples/resolvconf/update-libc.d/sendmail.in index 31a1638..eba62b3 100644 --- a/debian/examples/resolvconf/update-libc.d/sendmail.in +++ b/debian/examples/resolvconf/update-libc.d/sendmail.in @@ -4,7 +4,8 @@ # so that we can reset the statistics for unresolvable hostnames # Bring in some script functions to handle dynamic configuration -. /usr/share/sendmail/dynamic; +test -r @datadir@/sendmail/dynamic || exit 0 +. @datadir@/sendmail/dynamic # Note the interface that just changed - unfortunately, we know not how :( update_resolv; diff --git a/debian/local/sendmail.in b/debian/local/sendmail.in index 885ad24..b629852 100644 --- a/debian/local/sendmail.in +++ b/debian/local/sendmail.in @@ -248,7 +248,7 @@ start_mta () { if [ -z "$qp" ]; then chmod 0664 $MTAQ_PIDFILE; else - qc=`ps --no-headers -fCsendmail \ + qc=`ps --no-headers -fCsendmail-mta \ | egrep -e 'Queue control' \ | awk '{print $2}'`; if [ -z "$qc" ]; then diff --git a/debian/patches/connect-from-null.patch b/debian/patches/connect-from-null.patch new file mode 100644 index 0000000..b7c2acc --- /dev/null +++ b/debian/patches/connect-from-null.patch @@ -0,0 +1,26 @@ +Author: Claus Assmann <sendmail-bugs-2...@support.sendmail.org> +Description: fix NOQUEUE: connect from (null) + +--- a/sendmail/main.c ++++ b/sendmail/main.c +@@ -2623,8 +2623,19 @@ main(argc, argv, envp) + + if (LogLevel > 9) + { ++ p = authinfo; ++ if (NULL == p) ++ { ++ if (NULL != RealHostName) ++ p = RealHostName; ++ else ++ p = anynet_ntoa(&RealHostAddr); ++ if (NULL == p) ++ p = "unknown"; ++ } ++ + /* log connection information */ +- sm_syslog(LOG_INFO, NULL, "connect from %s", authinfo); ++ sm_syslog(LOG_INFO, NULL, "connect from %s", p); + } + + /* diff --git a/debian/patches/openssl-1.1.0.patch b/debian/patches/openssl-1.1.0.patch index bbca045..4507621 100644 --- a/debian/patches/openssl-1.1.0.patch +++ b/debian/patches/openssl-1.1.0.patch @@ -240,3 +240,14 @@ Signed-off-by: Sebastian Andrzej Siewior <sebast...@breakpoint.cc> return 1; /* override it */ } } +--- a/doc/op/op.me ++++ b/doc/op/op.me +@@ -10898,7 +10898,7 @@ C=FileName_of_CA_Certificate + ln -s $C `openssl x509 -noout -hash < $C`.0 + .)b + A better way to do this is to use the +-.b c_rehash ++.b "openssl rehash" + command that is part of the OpenSSL distribution + because it handles subject hash collisions + by incrementing the number in the suffix of the filename of the symbolic link, diff --git a/debian/patches/series b/debian/patches/series index c3e3966..1042264 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -22,3 +22,4 @@ fhs.patch typos.patch format-security.patch openssl-1.1.0.patch +connect-from-null.patch diff --git a/debian/sendmail-base.prerm.in b/debian/sendmail-base.prerm.in index 7cbba77..a9e5bb3 100644 --- a/debian/sendmail-base.prerm.in +++ b/debian/sendmail-base.prerm.in @@ -67,7 +67,7 @@ if [ "$1" = "remove" ]; then @sysconfdir@/mail/tls; # Remove empty files (probably touched databases) - find @sysconfdir@/mail -maxdepth 1 -size 0 | xargs -r rm; + find @sysconfdir@/mail -maxdepth 1 -type f -size 0 -delete fi if [ "$1" = "upgrade" ]; then diff --git a/debian/sendmail-bin.postinst.in b/debian/sendmail-bin.postinst.in index ed633f4..357a528 100644 --- a/debian/sendmail-bin.postinst.in +++ b/debian/sendmail-bin.postinst.in @@ -6,6 +6,9 @@ PACKAGE=sendmail-bin; #----------------------------------------------------------- #stop(): stop sendmail stop_mta () { + if [ -x @sysconfdir@/init.d/sendmail ]; then + invoke-rc.d --quiet --force sendmail stop + fi # Account for varying PIDfile locations of older sendmail packages if [ -f /var/run/sendmail/mta/sendmail.pid ]; then start-stop-daemon --stop --oknodo --quiet \ @@ -26,9 +29,6 @@ stop_mta () { fi; start-stop-daemon --stop --oknodo --quiet \ --name sendmail > /dev/null; - if [ -x @sysconfdir@/init.d/sendmail ]; then - invoke-rc.d --quiet --force sendmail stop - fi; }; #----------------------------------------------------------- diff --git a/debian/sendmail-bin.prerm.in b/debian/sendmail-bin.prerm.in index 43c6385..dca7f3d 100644 --- a/debian/sendmail-bin.prerm.in +++ b/debian/sendmail-bin.prerm.in @@ -1,32 +1,26 @@ #!/bin/sh -set -e; - -PACKAGE=sendmail-bin; +set -e if [ "$1" = "remove" ]; then - # Remove alternatives for MTA, MSP - update-alternatives --remove sendmail-mta @libexecdir@/sendmail; - update-alternatives --remove sendmail-msp @libexecdir@/sendmail; - if [ -x @sysconfdir@/init.d/sendmail ] && \ - [ -x @datadir@/sendmail/sendmail ]; then - invoke-rc.d --quiet --force sendmail stop - fi; - # Prevent cronjob from running during upgrade... - if [ -f /etc/cron.d/sendmail ]; then - rm -f @sysconfdir@/cron.d/sendmail; - fi; + # Prevent cronjob from running during removal... + if [ -f @sysconfdir@/cron.d/sendmail ]; then + rm -f @sysconfdir@/cron.d/sendmail + fi fi if [ "$1" = "upgrade" ]; then - # Prevent cronjob from running during upgrade... - if [ -f /etc/cron.d/sendmail ]; then - echo "#prerm" > @sysconfdir@/cron.d/sendmail; - fi; - - # NOTE NOTE NOTE NOTE NOTE - # If we fall through to DEBHELPER, sendmail will be stopped - # much earlier than necessary !!! - exit 0; + # Prevent cronjob from running during upgrade... + if [ -f @sysconfdir@/cron.d/sendmail ]; then + echo "#prerm" > @sysconfdir@/cron.d/sendmail + # The cronjob is regenerated by the postinst + fi fi #DEBHELPER# + +if [ "$1" = "remove" ]; then + # Remove alternatives for MTA, MSP + # Note: removes paths needed by the initscript + update-alternatives --remove sendmail-mta @libexecdir@/sendmail + update-alternatives --remove sendmail-msp @libexecdir@/sendmail +fi