Build local debian image for specific pg versions using the base podman image#9
Open
qount25 wants to merge 8 commits intopostgres-pm:masterfrom
Open
Build local debian image for specific pg versions using the base podman image#9qount25 wants to merge 8 commits intopostgres-pm:masterfrom
qount25 wants to merge 8 commits intopostgres-pm:masterfrom
Conversation
added 3 commits
April 1, 2025 04:18
…n installed inside chroot
…o use when building dev pkg
In its official deb repository, postgresql packages may have the following
names:
postgresql-17
postgresql-16
postgresql-15
etc. The problem here is that the latest minor version will be installed, wherease
users may want a different version.
Solution: packages have versions. Inside pbuilder_install_script.sh.erb we pick
up which version our user wants and match it agains what's available. If it
exists, we install that particular version:
...
apt -y install postgresql-$PG_MAJOR_VERSION=$pkg_version
...
And then build the local podman image named after the chosen postgresql version.
If user selected postgresql version 17.14 on amd64, the image will be called:
pgpm-debian-pg17.4-amd64
BONUS FIX: LD_CONFIG error messages are no longer present!
8950a5b to
2ae1b01
Compare
…the first build Solution: adding a documentation md file on how to solve it by followin a few simple steps
cd9796b to
61af2ae
Compare
…d argument" The issue is present on podman hosts when they are themslves KVM guests, but is not present if podman is used on host OS, which iteself is installed on bare metal. Solution: create `faketar` script and patch pbuilder to use it instead of tar. The `faketar` script uses simple `cp` and `mv` commands, which not only help us avoid the issue with `tar`, but also make our builds faster by skipping compression & decompression of tgz. Due to a rather esoteric nature of the problem `faketar` script is reasonable workaround, which also saves on build time.
61af2ae to
8977f44
Compare
yrashk
reviewed
Apr 6, 2025
lib/pgpm/deb/Dockerfile
Outdated
| ARG DEBIAN_FRONTEND=noninteractive | ||
| RUN apt update | ||
| RUN apt install -y build-essential pbuilder fakeroot fakechroot | ||
| RUN apt install -y build-essential pbuilder fakeroot fakechroot vim ripgrep |
Contributor
There was a problem hiding this comment.
do we need vim and ripgrep in this image?
Author
There was a problem hiding this comment.
I actually decided that yes, because I ended up installing those two every single time I needed to debug an issue. I think those two tools are generally useful, so my suggestions is to keep them. Their relative size is negligible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.