Merge ~bryce/ubuntu/+source/postgresql-common:fix-lp1690432-hirsute into ubuntu/+source/postgresql-common:ubuntu/devel

Proposed by Bryce Harrington
Status: Merged
Approved by: Bryce Harrington
Approved revision: 76a556b784f2fa03e187fce1e8999a2bc969b27d
Merge reported by: Bryce Harrington
Merged at revision: 76a5b5d3fdd3fa738251b65b7b6df5fd94c58eaf
Proposed branch: ~bryce/ubuntu/+source/postgresql-common:fix-lp1690432-hirsute
Merge into: ubuntu/+source/postgresql-common:ubuntu/devel
Diff against target: 0 lines
Reviewer Review Type Date Requested Status
Sergio Durigan Junior (community) Approve
git-ubuntu developers Pending
Canonical Server packageset reviewers Pending
git-ubuntu developers Pending
Review via email: mp+398752@code.launchpad.net

Description of the change

Only add postgres to group ssl-cert on new installs if postgres isn't already a member.

While this doesn't really "fix" a bug, it enables a way to work around a buggy situation. If postgres is installed in a place where the system config is unwriteable for some reason, then the postgres postinst fails when it tries to add postgres to group ssl-cert. This problem came up in creating the Docker image for postgres (maybe due to some glibc issue? still investigating). But the problem can crop up in other circumstances, such as when a user is maintaining their config with oneconf, but oneconf is broken for some reason.

There is an earlier test in the postinst for if postgres is in the postgres group, so I've used the same approach in implementing the test for the ssl-cert group. For this reason I think this stands a good chance of being taken by Debian, and I'll forward it their way if this looks like an acceptable solution to the problem.

PPA: https://launchpad.net/~bryce/+archive/ubuntu/postgresql-common-fix-lp1690432/+packages

To post a comment you must log in.
f1428fa... by Bryce Harrington

changelog

76a5b5d... by Bryce Harrington

update-maintainer

Revision history for this message
Bryce Harrington (bryce) wrote :

I've verified in a privileged container that the package installs properly, however the original bug only appears in an unprivileged container. Unfortunately due to LP: #1916485 apt-get update fails when run a second time in an unprivileged container, so testing the fixed postgresql-common there doesn't seem to be feasible.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for the MP, Bryce. It LGTM, but I found a small typo in the changelog and I left a comment about stderr redirection in the code. I think this one is ripe to be submitted to Debian; I agree with you forwarding it. Otherwise, +1.

review: Approve
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks, I'll forward to debian and upload for hirsute.

Revision history for this message
Bryce Harrington (bryce) wrote :

triage-hirsute+21.04:~/pkg/PostgresqlCommon/fix-lp1690432/postgresql-common-gu$ changes_file=../postgresql-common_225ubuntu1_source.changes
triage-hirsute+21.04:~/pkg/PostgresqlCommon/fix-lp1690432/postgresql-common-gu$ git ubuntu tag --upload
triage-hirsute+21.04:~/pkg/PostgresqlCommon/fix-lp1690432/postgresql-common-gu$ git push pkg upload/225ubuntu1
Enumerating objects: 18, done.
Counting objects: 100% (18/18), done.
Delta compression using up to 12 threads
Compressing objects: 100% (13/13), done.
Writing objects: 100% (13/13), 1.67 KiB | 155.00 KiB/s, done.
Total 13 (delta 9), reused 0 (delta 0), pack-reused 0
To ssh://git.launchpad.net/ubuntu/+source/postgresql-common
 * [new tag] upload/225ubuntu1 -> upload/225ubuntu1
triage-hirsute+21.04:~/pkg/PostgresqlCommon/fix-lp1690432/postgresql-common-gu$ dput ubuntu ${changes_file}
D: Setting host argument.
Checking signature on .changes
gpg: ../postgresql-common_225ubuntu1_source.changes: Valid signature from E603B2578FB8F0FB
Checking signature on .dsc
gpg: ../postgresql-common_225ubuntu1.dsc: Valid signature from E603B2578FB8F0FB
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading postgresql-common_225ubuntu1.dsc: done.
  Uploading postgresql-common_225ubuntu1.tar.xz: done.
  Uploading postgresql-common_225ubuntu1_source.buildinfo: done.
  Uploading postgresql-common_225ubuntu1_source.changes: done.
Successfully uploaded packages.

Revision history for this message
Bryce Harrington (bryce) wrote :

Preview Diff

Empty

Subscribers

People subscribed via source and target branches