Add APT pinning for "postgresql" package#800
Conversation
This would be easier if we had APT 1.9.11+ and could thus pin by source package, but the packages we need to worry the most about start consistently with |
|
This might add "too much magic", though. If you go that route, I'd move the comment inside the installed file to people looking around can see the rationale better. |
|
Yeah, that's fair -- we did something similar in PHP a few years ago in docker-library/php#542, and it did lead to some confusion, but mostly it helped folks find bugs in their own assumptions (and those who weren't willing to find bugs just figured out the I guess if we include Edit: nope 😞 |
We had a confusing report that `postgres:12` contained PostgreSQL 13 -- we weren't able to reproduce, but the reporter mentioned "debugging what's wrong with my dockerfiles" so the best we can figure is that they somehow ended up installing `postgresql` (either directly or indirectly via `Depends:`). This adds APT pinning to ensure that can't succeed unless installing `postgresql` will give the same major version as the current image (and that all our PostgreSQL-related packages come from upstream's repos, not Debian's).
|
(Updated to embed the |
|
Also somewhat related: #677 + #678 (comment) (but in that case we decided the pinning wasn't necessary, I believe because Edit: further context - current |
|
Yes, this is a bit overreactive, so I think we should revisit this if it becomes a problem for a larger set of users. |
We had a confusing report that
postgres:12contained PostgreSQL 13 -- we weren't able to reproduce, but the reporter mentioned "debugging what's wrong with my dockerfiles" (#799) so the best we can figure is that they somehow ended up installingpostgresql(either directly or indirectly viaDepends:).This adds APT pinning to ensure that can't succeed unless installing
postgresqlwill give the same major version as the current image.I'm honestly a little bit on the fence here -- there's a solid argument to be made for blocking this metapackage entirely instead (since installing it could bring a totally different install and/or version of PostgreSQL, in extreme cases).
I could also see an argument for creating our own mini virtual package and installing it instead, but IMO that's really a bridge too far.
I think it would probably also be useful for us to test blocking all the relevant Debian-provided packages, since they're low-hanging fruit that's not what we're after.