Skip to content

About

Provides Alpine Linux glibc APK packages, for both amd64 and arm64 packages, from glib 2.36 onwards

Resources

Code of conduct

Contributing

Stars

6 stars

Watchers

0 watching

Forks

Repository files navigation

alpine-glibc

This repo provides Github releases for Alpine Linux glibc packages, for both amd64 and arm64 CPU architectures.

Although the artifacts (and intermediate tarballs) are store in Git LFS, please do not pull these unless you are a maintainer of this repo, as Github's LFS bandwidth limitation of 10GB per month would soon be exhausted. There is no such limit for downloading artifacts from releases.

Acknowledgements

Full credit to @sgerrand for the original work; all that's really done here is wrapping the build process up in Github workflows that provide a hassle-free way to deliver new releases when new glibc versions become available.

Specifically, this repo is derived from a combination of:

Maintainers:

Consuming the released artifacts

Here is an excerpt from a multi-architecture Dockerfile, showing how you might consume the binary artifacts in our releases.

The derivation of this, in turn, came from a long-since-removed AdoptOpenJDK Dockerfile definition for building an OpenJ9 Alpine Linux Java base image.

ENV GLIBC_VERSION='2.42'

RUN echo 'Installing glibc-based standard C libraries' && \
    curl -LfsS https://github.com/dalet-oss/alpine-glibc/releases/download/${GLIBC_VERSION}-${TARGETARCH}/glibc-${GLIBC_VERSION}.apk -o /tmp/glibc-${GLIBC_VERSION}.apk && \
    curl -LfsS https://github.com/dalet-oss/alpine-glibc/releases/download/${GLIBC_VERSION}-${TARGETARCH}/glibc-bin-${GLIBC_VERSION}.apk -o /tmp/glibc-bin-${GLIBC_VERSION}.apk && \
    curl -LfsS https://github.com/dalet-oss/alpine-glibc/releases/download/${GLIBC_VERSION}-${TARGETARCH}/glibc-i18n-${GLIBC_VERSION}.apk -o /tmp/glibc-i18n-${GLIBC_VERSION}.apk && \
    curl -LfsS https://raw.githubusercontent.com/dalet-oss/alpine-glibc/refs/heads/master/alpine-packaging-rsa.pub -o /etc/apk/keys/alpine-packaging-rsa.pub && \
    apk add --force-overwrite --no-cache /tmp/glibc-${GLIBC_VERSION}.apk && \
    apk add --no-cache /tmp/glibc-bin-${GLIBC_VERSION}.apk && \
    apk add --no-cache /tmp/glibc-i18n-${GLIBC_VERSION}.apk && \
    rm -rf /tmp/*.apk

# N.B. If you want to use this glibc installation to run a glibc-based JVM, you'll want to install `libgcc`,
#      `libstdc++`, and `zlib` also. Arch Linux is a good source for these binaries, which at the time of writing seem
#      to work just fine when unpacked to the /usr/glibc-compat/lib directory.

A note on release tag names

Release tags are normally ${GLIBC_VERSION}-${TARGETARCH}, exactly as used above.

Version 2.44 is an exception: its tags are 2.44-amd64-r1 and 2.44-arm64-r1. Empty releases were briefly published for 2.44-amd64 and 2.44-arm64 in error and were subsequently deleted; because this repository has immutable releases enabled, a tag name used by an immutable release is permanently reserved and cannot be recreated even once the release and tag have been deleted. A -r1 suffix is therefore used for 2.44.

Only the tag name is affected; the asset filenames are unchanged. So for 2.44 the download URL is:

https://github.com/dalet-oss/alpine-glibc/releases/download/2.44-${TARGETARCH}-r1/glibc-2.44.apk

Adding a new glibc version

  1. Edit glibc-versions.yml to add an entry for the new glibc version, with dummy checksums. Anyone can raise a PR for this!
  2. Push this change (e.g. merge the PR) to master.
  3. Github Actions will launch the compile-glibc workflow to compile the new glibc version for amd64, and raise a PR delivering it and updating the corresponding checksum in glibc-versions.yml.
  4. When the autogenerated PR is ready, you should review it, and merge if appropriate.
  5. Repeat steps (3) and (4) for the arm64 variant.
  6. Github Actions will then launch both of:
    • the compile-glibc workflow again (validating checksums); and
    • the package-apks workflow to package glibc into appropriate, signed APKs, raising separate PRs for each of the amd64 and arm64 variants.
  7. When the autogenerated PRs are ready, you should review them, and merge if appropriate. They may be merged in either order; the publish-releases workflow watches both architectures' APK directories, and publishes each architecture's release as soon as that architecture's four APKs have landed on master.
  8. Github Actions will then launch the publish-releases workflow to publish the new APK sets to our Github releases page.
  9. 💃 🪩 🕺

About

Provides Alpine Linux glibc APK packages, for both amd64 and arm64 packages, from glib 2.36 onwards

Resources

Code of conduct

Contributing

Stars

6 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages