Skip to content

Commit

Permalink
Disable 'community' repository by default
Browse files Browse the repository at this point in the history
'main' has a full support cycle of 2 years, but 'community' has a maximum support cycle of 6 months (i.e. until next stable release; see https://wiki.alpinelinux.org/wiki/Repositories). Therefore you must ensure to always use Alpine's latest stable release when installing packages from the 'community' repository. Thus we better disable the 'community' repository by default. You can either re-enable the repository in your image (run `sed -i -E 's/^@community (.+)$/\1/' /etc/apk/repositories`), or explicitly install single packages from the 'community' repository by appending '@community' to package names (e.g. `apk add package-name@community`).
  • Loading branch information
PhrozenByte committed Jul 7, 2023
1 parent 8f7ead1 commit cfc04ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ Alpine Linux
Rebuilds are triggered only if Alpine publishes a new patch release, or if one of Alpine's Mini Root Filesystem packages were updated. Currently we create images for **Alpine 3.18**, **Alpine 3.17**, **Alpine 3.16** and **Alpine 3.15**. Please note that we might add or drop branches at any time.

All images are tagged with their full Alpine version string, build date and build job number (e.g. `v3.15.4-20190618.1658821493.1`). The latest build of an Alpine release is additionally tagged without the build information (e.g. `v3.15.4`). If an image represents the latest version of an Alpine release branch, it is additionally tagged without the patch version (e.g. `v3.15`), and without the minor version (e.g. `v3`); both without and with build information (e.g. `v3.15-20190618.1658821493.1` and `v3-20190618.1658821493.1`). The latest build of the latest Alpine version is furthermore tagged with `latest`.

Please note that we disable [Alpine's `community` repository](https://pkgs.alpinelinux.org/packages?name=&branch=edge&repo=community&arch=x86_64&maintainer=) by default. The reason is its limited support: In the [`main` repository](https://pkgs.alpinelinux.org/packages?name=&branch=edge&repo=main&arch=x86_64&maintainer=) we can expect the full support cycle of 2 years, but `community` is only supported for about 6 months, i.e. until the next stable release (see [Alpine wiki](https://wiki.alpinelinux.org/wiki/Repositories) for more information). If you want to install packages from the `community` repository, make sure to always use Alpine's latest stable branch. You can then either re-enable the repository as a whole (run `sed -i -E 's/^@community (.+)$/\1/' /etc/apk/repositories`), or install single packages by tagging them with `@community` (e.g. `apk add --no-cache package-name@community`).
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ CONTAINER="$(buildah from "$BASE_IMAGE")"
echo + "MOUNT=\"\$(buildah mount $(quote "$CONTAINER"))\"" >&2
MOUNT="$(buildah mount "$CONTAINER")"

echo + "sed -i -E -e 's#^(https?://[^/]*alpinelinux.org/.*/community)$#@community \1#' …/etc/apk/repositories" >&2
sed -i -E -e 's#^(https?://[^/]*alpinelinux.org/.*/community)$#@community \1#' "$MOUNT/etc/apk/repositories"

cmd buildah run "$CONTAINER" -- \
apk update

Expand Down

0 comments on commit cfc04ff

Please sign in to comment.