This repo runs some animals for the PostgreSQL BuildFarm for Alpine Linux. The animals run in docker containers via GitHub Actions and uses the Actions Cache to keep the buildroot
between runs.
One limitation of a scheduled workflow for public repositories is, that it will be disabled after 60 days of repository inactivity. To keep the repository active automatically, renovate is configured to automerge updates to dependencies, which include Actions used in CI and the base docker image. In the rare event that no update should happen for two months, the scheduled workflow needs to be manually started again by the repository owner.
Alpine Linux uses musl libc, which "strives to be correct in the sense of standards-conformance and safety". It has some open issues, among them the missing support for custom collation orders (LC_COLLATE). Thus, it's important to build with ICU support instead. Alpine Linux does not use systemd, but other than that the goal is to build with all sensible options enabled and to run all tests successfully. Both with autoconf and meson. All the failing options we currently know about are opened as Pull Requests toward this repository.
Changes to the Dockerfile and buildfarm client configuration will be tested for pull requests and pushes to the main branch. They can also be tested locally by executing the ./test.sh
script. Those will run the buildfarm client in --test
mode and not send any data to the buildfarm. All files are also checked by actionlint, hadolint and shellcheck in CI.
To run PostgreSQL, initdb
needs to lookup the current user/group in /etc/passwd
and /etc/group
. At the same time, when running the docker image, we need to mount a volume for buildroot
into the container to get any kind of caching. To be able to access this folder both inside and outside of the container, the user and group IDs must match, so we always start the docker containers with -u <uid>:<gid>
. This creates a problem, because while building the image we don't know in advance which user ids the image will run with, so we can't pre-create any users inside the container. To solve this we use nss_wrapper, which is loaded via LD_PRELOAD
and is able to fake passwd and group entries for the current user. This same approach is also used by the library/postgres
"official" docker image.