Merge ~paride/ubuntu/+source/postfix:lp1906970-bionic into ubuntu/+source/postfix:ubuntu/bionic

Proposed by Paride Legovini
Status: Superseded
Proposed branch: ~paride/ubuntu/+source/postfix:lp1906970-bionic
Merge into: ubuntu/+source/postfix:ubuntu/bionic
Diff against target: 225 lines (+86/-16)
12 files modified
debian/changelog (+29/-0)
debian/control (+2/-1)
debian/patches/fix-postconf-segfault.diff (+26/-0)
debian/patches/fix_tls_deploy-server-cert.patch (+19/-0)
debian/patches/series (+2/-0)
debian/postfix-cdb.postinst (+1/-2)
debian/postfix-ldap.postinst (+1/-2)
debian/postfix-lmdb.postinst (+1/-2)
debian/postfix-mysql.postinst (+1/-2)
debian/postfix-pcre.postinst (+1/-2)
debian/postfix-pgsql.postinst (+1/-2)
debian/postfix.postinst (+2/-3)
Reviewer Review Type Date Requested Status
Canonical Server Pending
Review via email: mp+407023@code.launchpad.net

This proposal has been superseded by a proposal from 2021-08-12.

Commit message

Bionic SRU for LP: #1906970, same as https://code.launchpad.net/~paride/ubuntu/+source/postfix/+git/postfix/+merge/406805 but done against Bionic.

Test PPA: https://launchpad.net/~paride/+archive/ubuntu/postfix-lp1906970

Test case: see [Test Plan] in the SRU bug description.

Autopkgtest results (virt-server: qemu):

postfix PASS

(I tried with autopkgtest-virt-lxd but it FTBFS because postfix fails to recognize the newer kernel I'm running locally. Worked fine with qemu. I wonder if autopkgtest-virt-lxd could support LXD VMs.)

To post a comment you must log in.

Unmerged commits

dbc32cf... by Paride Legovini

update-maintainer

6785ca4... by Paride Legovini

Update d/changelog for 3.3.0-1ubuntu0.4

a29ad4d... by Paride Legovini

d/postfix.postinst: tolerate search domain with a leading dot

Search domain with a leading dot cause postfix.postinst to fail because
it constructs a 'myhostname' with a duplicate dot (see #991950).

The glibc resolver tolerates such domains and strips the leading dot
from the search domain [1]. This change makes postfix.postinst do the
same.

This same fix has been proposed for inclusion in Debian [2].

[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=resolv/res_query.c;h=ebbe5a6a4ed86abe3fccd4a134bfcf6f613c9bbb;hb=HEAD#l411
[2] https://salsa.debian.org/postfix-team/postfix-dev/-/merge_requests/12

Closes: #991950, LP: #1906970

213fbe0... by Lucas Kanashiro

3.3.0-1ubuntu0.3 (patches unapplied)

Imported using git-ubuntu import.

840ee0c... by Andreas Hasenack

changelog

907986b... by Karl Stenerud

 * d/postfix-{cdb,ldap,lmdb,mysql,pcre,pgsql}.postinst, d/postfix.postinst:
   Handle empty alias_database field in main.cf (LP: #1791139 Closes: #908221)

d1fa295... by Karl Stenerud

3.3.0-1ubuntu0.1 (patches unapplied)

Imported using git-ubuntu import.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 6d9e675..57c360f 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,32 @@
6+postfix (3.3.0-1ubuntu0.4) bionic; urgency=medium
7+
8+ * d/postfix.postinst: tolerate search domain with a leading dot
9+ (LP: #1906970)
10+
11+ -- Paride Legovini <paride@ubuntu.com> Thu, 12 Aug 2021 14:43:19 +0200
12+
13+postfix (3.3.0-1ubuntu0.3) bionic; urgency=medium
14+
15+ * d/p/fix_tls_deploy-server-cert.patch: handle missing opt arg (LP: #1881196)
16+
17+ -- Lucas Kanashiro <kanashiro@ubuntu.com> Fri, 10 Jul 2020 17:08:22 -0300
18+
19+postfix (3.3.0-1ubuntu0.2) bionic; urgency=medium
20+
21+ [ Karl Stenerud ]
22+ * d/postfix-{cdb,ldap,lmdb,mysql,pcre,pgsql}.postinst, d/postfix.postinst:
23+ Handle empty alias_database field in main.cf (LP: #1791139 Closes: #908221)
24+
25+ -- Andreas Hasenack <andreas@canonical.com> Thu, 11 Oct 2018 17:15:25 -0300
26+
27+postfix (3.3.0-1ubuntu0.1) bionic; urgency=medium
28+
29+ * debian/patches/fix-postconf-segfault.diff: Fix a postconf segfault
30+ when map file cannot be read. Thanks to Viktor Dukhovni <postfix-
31+ users@dukhovni.org>. (LP: #1753470)
32+
33+ -- Karl Stenerud <karl.stenerud@canonical.com> Thu, 16 Aug 2018 11:33:00 -0700
34+
35 postfix (3.3.0-1) unstable; urgency=medium
36
37 [Wietse Venema]
38diff --git a/debian/control b/debian/control
39index 7828b9b..69343ed 100644
40--- a/debian/control
41+++ b/debian/control
42@@ -1,7 +1,8 @@
43 Source: postfix
44 Section: mail
45 Priority: optional
46-Maintainer: LaMont Jones <lamont@debian.org>
47+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
48+XSBC-Original-Maintainer: LaMont Jones <lamont@debian.org>
49 Standards-Version: 4.1.3
50 Homepage: http://www.postfix.org
51 Build-Depends: debhelper (>= 9.20160709), po-debconf (>= 0.5.0), groff-base, patch, lsb-release, libdb-dev (>=4.6.19), libldap2-dev (>=2.1), liblmdb-dev, libpcre3-dev, default-libmysqlclient-dev | libmysqlclient-dev, libssl-dev (>=0.9.7), libsasl2-dev, libpq-dev, libcdb-dev, dpkg-dev (>= 1.16.1~), libsqlite3-dev, html2text, libicu-dev
52diff --git a/debian/patches/fix-postconf-segfault.diff b/debian/patches/fix-postconf-segfault.diff
53new file mode 100644
54index 0000000..20fc5bc
55--- /dev/null
56+++ b/debian/patches/fix-postconf-segfault.diff
57@@ -0,0 +1,26 @@
58+Description: Fix a postconf segfault when map file cannot be read
59+Author: Viktor Dukhovni <postfix-users@dukhovni.org>
60+Applied-Upstream: https://archive.mgm51.com/mirrors/postfix-source/official/postfix-3.3.1.tar.gz
61+Origin: https://marc.info/?l=postfix-users&m=152578771531514&w=2
62+Bug-Debian: https://bugs.debian.org/898271
63+Bug-Ubuntu: https://launchpad.net/bugs/1753470
64+Last-Update: 2018-08-20
65+---
66+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
67+--- a/src/postconf/postconf_dbms.c
68++++ b/src/postconf/postconf_dbms.c
69+@@ -174,10 +174,10 @@
70+ */
71+ dict = dict_ht_open(dict_spec, O_CREAT | O_RDWR, 0);
72+ dict_register(dict_spec, dict);
73+- if ((fp = vstream_fopen(cf_file, O_RDONLY, 0)) == 0
74+- && errno != EACCES) {
75+- msg_warn("open \"%s\" configuration \"%s\": %m",
76+- dp->db_type, cf_file);
77++ if ((fp = vstream_fopen(cf_file, O_RDONLY, 0)) == 0) {
78++ if (errno != EACCES)
79++ msg_warn("open \"%s\" configuration \"%s\": %m",
80++ dp->db_type, cf_file);
81+ myfree(dict_spec);
82+ return;
83+ }
84diff --git a/debian/patches/fix_tls_deploy-server-cert.patch b/debian/patches/fix_tls_deploy-server-cert.patch
85new file mode 100644
86index 0000000..ad73a2a
87--- /dev/null
88+++ b/debian/patches/fix_tls_deploy-server-cert.patch
89@@ -0,0 +1,19 @@
90+Description: Fix "postfix tls deploy-server-cert"
91+ It did not handle a missing optional argument.
92+Author: Viktor Dukhovni
93+Origin: upstream, https://github.com/vdukhovni/postfix/commit/119d6abed969b1b30c62722ae31c854b5682beae#diff-1843f98f5710e97bd063d5807334442a
94+Ubuntu-Bug: LP#1881196
95+Reviewed-By: Lucas Kanashiro <kanashiro@ubuntu.com>
96+Last-Updated: 2020-07-10
97+
98+--- a/conf/postfix-tls-script
99++++ b/conf/postfix-tls-script
100+@@ -777,7 +777,7 @@
101+ deploy_server_cert() {
102+ certfile=$1; shift
103+ keyfile=$1; shift
104+- deploy=$1; shift
105++ case $# in 0) deploy=;; *) deploy=$1; shift;; esac
106+
107+ # Sets key_algo, key_param and cert_param
108+ check_key "$keyfile" || return 1
109diff --git a/debian/patches/series b/debian/patches/series
110index c2e4727..1fb6ad6 100644
111--- a/debian/patches/series
112+++ b/debian/patches/series
113@@ -15,3 +15,5 @@
114 50_LANG.diff
115 70_postfix-check.diff
116 tls_version.diff
117+fix-postconf-segfault.diff
118+fix_tls_deploy-server-cert.patch
119diff --git a/debian/postfix-cdb.postinst b/debian/postfix-cdb.postinst
120index 2f37e39..674c0bd 100644
121--- a/debian/postfix-cdb.postinst
122+++ b/debian/postfix-cdb.postinst
123@@ -30,8 +30,7 @@ set -e
124 case "$1" in
125 configure)
126 addmap cdb mkmap_cdb_open
127- if [ $(postconf |grep alias_database | awk '{print $3}'|awk -F \: \
128- '{print $1}') = 'cdb' ]; then
129+ if [ "$(postconf -h alias_database | cut -f1 -d:)" = "cdb" ]; then
130 runnewaliases
131 fi
132 ;;
133diff --git a/debian/postfix-ldap.postinst b/debian/postfix-ldap.postinst
134index 7c23dd9..7248187 100644
135--- a/debian/postfix-ldap.postinst
136+++ b/debian/postfix-ldap.postinst
137@@ -30,8 +30,7 @@ set -e
138 case "$1" in
139 configure)
140 addmap ldap
141- if [ $(postconf |grep alias_database | awk '{print $3}'|awk -F \: \
142- '{print $1}') = 'ldap' ]; then
143+ if [ "$(postconf -h alias_database | cut -f1 -d:)" = "ldap" ]; then
144 runnewaliases
145 fi
146 ;;
147diff --git a/debian/postfix-lmdb.postinst b/debian/postfix-lmdb.postinst
148index 5cab441..d7f3a96 100644
149--- a/debian/postfix-lmdb.postinst
150+++ b/debian/postfix-lmdb.postinst
151@@ -31,8 +31,7 @@ set -e
152 case "$1" in
153 configure)
154 addmap lmdb mkmap_lmdb_open
155- if [ $(postconf |grep alias_database | awk '{print $3}'|awk -F \: \
156- '{print $1}') = 'lmdb' ]; then
157+ if [ "$(postconf -h alias_database | cut -f1 -d:)" = "lmdb" ]; then
158 runnewaliases
159 fi
160 ;;
161diff --git a/debian/postfix-mysql.postinst b/debian/postfix-mysql.postinst
162index 3b66fe7..d247c5d 100644
163--- a/debian/postfix-mysql.postinst
164+++ b/debian/postfix-mysql.postinst
165@@ -30,8 +30,7 @@ set -e
166 case "$1" in
167 configure)
168 addmap mysql
169- if [ $(postconf |grep alias_database | awk '{print $3}'|awk -F \: \
170- '{print $1}') = 'mysql' ]; then
171+ if [ "$(postconf -h alias_database | cut -f1 -d:)" = "mysql" ]; then
172 runnewaliases
173 fi
174 ;;
175diff --git a/debian/postfix-pcre.postinst b/debian/postfix-pcre.postinst
176index fd58c2e..43b4f12 100644
177--- a/debian/postfix-pcre.postinst
178+++ b/debian/postfix-pcre.postinst
179@@ -30,8 +30,7 @@ set -e
180 case "$1" in
181 configure)
182 addmap pcre
183- if [ $(postconf |grep alias_database | awk '{print $3}'|awk -F \: \
184- '{print $1}') = 'pcre' ]; then
185+ if [ "$(postconf -h alias_database | cut -f1 -d:)" = "pcre" ]; then
186 runnewaliases
187 fi
188 ;;
189diff --git a/debian/postfix-pgsql.postinst b/debian/postfix-pgsql.postinst
190index cae480e..dd9ea14 100644
191--- a/debian/postfix-pgsql.postinst
192+++ b/debian/postfix-pgsql.postinst
193@@ -30,8 +30,7 @@ set -e
194 case "$1" in
195 configure)
196 addmap pgsql
197- if [ $(postconf |grep alias_database | awk '{print $3}'|awk -F \: \
198- '{print $1}') = 'pgsql' ]; then
199+ if [ "$(postconf -h alias_database | cut -f1 -d:)" = "pgsql" ]; then
200 runnewaliases
201 fi
202 ;;
203diff --git a/debian/postfix.postinst b/debian/postfix.postinst
204index b42a983..7261f9e 100644
205--- a/debian/postfix.postinst
206+++ b/debian/postfix.postinst
207@@ -49,7 +49,7 @@ myfqdn() {
208 if [ $myhostname = ${myhostname%.*} ]; then
209 if [ -f /etc/resolv.conf ]; then
210 # The resolver uses the last one found, and ignores the rest
211- mydom=$(sed -n 's/^search[[:space:]]*\([^[:space:]]*\).*/\1/p;s/^domain[[:space:]]*\([^[:space:]]*\).*/\1/p' /etc/resolv.conf | tail -1)
212+ mydom=$(sed -n 's/^search[[:space:]]*\.*\([^[:space:]]*\).*/\1/p;s/^domain[[:space:]]*\.*\([^[:space:]]*\).*/\1/p' /etc/resolv.conf | tail -1)
213 myhostname="$myhostname${mydom:+.$mydom}"
214 else
215 myhostname="$myhostname.UNKNOWN"
216@@ -614,8 +614,7 @@ if [ ! -f /etc/postfix/master.cf.proto ]; then
217 fi
218
219 if [ "$mailer" != "No configuration" ] || [ -f /etc/postfix/main.cf ]; then
220- aliastype=$(postconf |grep alias_database | awk '{print $3}' | \
221- awk -F \: '{print $1}')
222+ aliastype=$(postconf -h alias_database | cut -f1 -d:)
223 if ( [ "$aliastype" != "ldap" ] && [ "$aliastype" != "lmdb" ] && \
224 [ "$aliastype" != "cdb" ] && [ "$aliastype" != "pcre" ] && \
225 [ "$aliastype" != "mysql" ] && [ "$aliastype" != "pgsql" ] && \

Subscribers

People subscribed via source and target branches