Mail archive

Re: [alpine-devel] RFC: Distribution variables for abuild

From: Natanael Copa <>
Date: Fri, 30 Jun 2017 07:52:33 +0200

On Sun, 25 Jun 2017 01:36:37 -0500
"A. Wilcox" <> wrote:


> I hereby propose adding the following four variables to abuild.conf,
> with the default values in abuild being appropriate for Alpine.
> :``${DISTRO_NAME}``:
> The name of the distribution, such as "Alpine Linux" or
> "Adélie Linux".
> A single word describing the distribution, such as "Alpine" or
> "Adelie".
> :``${DISTRO_URL}``:
> The home page of the distribution, i.e. "".
> :``${DISTRO_BUG_URL}``:
> The URL to use to report bugs with software on the distribution.
> This would be set to "" by default.

I think this is a good idea. It is trivial to implement and does not
cause any maintenance burden.


> Roadmap
> - -------
> Since the shell environment is flexible, this change can be
> implemented almost immediately; the defaults specified ensure that at
> worst, nothing will change. As forks and spins change the environment
> variables in their ``abuild.conf`` files, all updated packages will
> immediately reflect those changes.

How much code is needed in abuild? I think we could start with the APKBUILDs:


That way you can override the default and we are still backwards
compatible. No code changes in abuild required to get started.

This makes it also possible backport security and bug fixes to stable
branches if needed.

> If there is interest, I would be happy to work on the abuild code and
> adding the variables in relevant APKBUILDs. There are a few packages
> that don't specify bug report URLs where they could; I could
> additionally add support there, if desired.

Yes. This would be great!

> One alternative is sourcing this information from ``/etc/os-release``
> instead of ``abuild.conf``, or using os-release when abuild.conf does
> not have anything set.

Nah, I like your proposal better.
> Thank you for your time in reviewing this proposal. If you have any
> questions or concerns or changes, I would love to discuss them. I'm
> open to any comments the community has.

Are you ok with using the style ${DISTRO_NAME:-Alpine Linux} in the

Something like:
diff --git a/main/alpine-base/APKBUILD b/main/alpine-base/APKBUILD
index e5cfeba83f..58980b5273 100644
--- a/main/alpine-base/APKBUILD
+++ b/main/alpine-base/APKBUILD
_at_@ -26,7 +26,7 @@ package() {
        # create /etc/issue
        cat >"$pkgdir"/etc/issue<<EOF
-Welcome to Alpine Linux ${pkgver%.*}
+Welcome to ${DISTRO_NAME:-Alpine Linux} ${pkgver%.*}
 Kernel \\r on an \\m (\\l)
_at_@ -34,11 +34,11 @@ EOF
        _ver="$(echo "$pkgver" | grep -E -o '^[0-9]+\.[0-9]+')"
        # create os-release
        cat >"$pkgdir"/etc/os-release<<EOF
-NAME="Alpine Linux"
+NAME="${DISTRO_NAME:-Alpine Linux}"
-PRETTY_NAME="Alpine Linux v$_ver"
+PRETTY_NAME="${DISTRO_NAME:-Alpine Linux} v$_ver"

Thanks for working on this.


Received on Fri Jun 30 2017 - 07:52:33 UTC