Mail archive

Re: [alpine-devel] A few questions about Alpine

From: A. Wilcox <>
Date: Mon, 12 Jun 2017 17:38:00 -0500

Hash: SHA256

On 12/06/17 05:47, Natanael Copa wrote:
> On Sat, 10 Jun 2017 05:27:38 -0500 "A. Wilcox"
> <> wrote:
>> 1. If we had either a different set of patches for a package, or
>> our patches allowed different features in a package to be built
>> that are currently unavailable in Alpine, would Alpine be willing
>> to evaluate including them in the Alpine APKBUILD?
> Yes.
> We try to avoid patching the packages if possible so patches should
> go upstream if possible.
> But we will evaluate any suggestions for different patches and
> different compile time features.

That is our policy in Adélie as well. I don't like us to carry
patches and am in contact with various upstreams.

But there are some upstreams that seem to no longer exist (CVS is
one), and some upstreams that are hostile to standards conformance :(
 That is when we start doing package patches.

>> 2. Does the abuild utility support multiple repositories of
>> packages?
> we have "main", "community" and "testing" package repositories.
>> How are build-time dependencies resolved in abuild?
> abuild will call `apk add $makdepends $depends` (more or less), so
> the dependencies needs to be found by apk.

That makes sense. Much simpler than the overlay situation with ebuild.

>> If we had our own mesa package, for an example, would abuild be
>> able to build against ours when we build packages from the Alpine
>> package tree? Or would we need to maintain a fork of the Alpine
>> tree and maintain our changes in the same tree?
> Depends a bit if its ABI compatible or not. If its not ABI
> compatible then you will have to rebuild all the packages that
> depends on your version of mesa and maintain a fork of those.

Yeah, that makes sense. So we would just put our repository first in
the /etc/apk/repositories file and then it seems abuild will do the
right thing. Great to hear, makes life much easier.

>> 3. Would support for build-time configuration settings (like
>> FreeBSD*s ports OPTIONS or Gentoo*s portage USE) be welcomed in
>> abuild? This would allow us (and our users) to build packages
>> how we want while still having the defaults remain the same in
>> Alpine upstream.
> Yes. This would be welcomed.

I suppose this needs to be in its own thread :) I have a few
different ideas but I want to continue working with abuild more to get
a better feel for how it works so that my proposal is nice and clean.

>> 4. Is Alpine interested in ports to other architectures supported
>> by musl including PPC32 and MIPS?
> Yes, as long someone steps up and help us do the work, provide the
> needed hardware and help maintain the port.

Hardware is not an issue for me, my office-turned-build lab has:

3x ppc32
2x mips64
1x mips32
2x sparc64 (not musl ported yet)
2x arm32
2x arm64/aarch64
1x ppc64 (Power4 based)

What kind of requirements do you have for the hardware? Do I need to
rack some of it at a datacentre for high bandwidth Internet? Or is an
office-based cable line (~150 mbit) good enough?

>> 5. Would support for alternative shells in abuild be a welcome
>> addition (allowing abuild to run in shells including Busybox,
>> bash, zsh, etc)? These changes would only be to more firmly
>> align abuild with the POSIX shell standard where applicable.
> Yes. We currently use some bashism that is supported in busybox
> ash which is handy. For example ${variable/search/replace}. We'd
> need figure out which extensions works on which shells and see if
> we can allow them or not.

Sure, my main concern is being able to run abuild on computers that
don't have ash. I suppose since most other build systems have a hard
requirement on bash, having a hard requirement on ash isn't unusual.
But I think Alpine can be even better and not have a hard requirement.

>> 6. Would there be any interest in jointly creating some
>> user-facing utilities to make the abuild experience a more
>> pleasant one for users?
> Yes.
> We have talked about replacing APKBUILD format with something else,
> but not really been able to come up with anything. The problem is
> that it is difficult (if not impossible) to make a total replace,
> so changes will need to go incrementally.
> The major issue with APKBUILD is that it is not possible to specify
> the metadata for subpackages (pkgdesc, depends, arch etc) in global
> scope, and regardless of how we define it in shell, it will be
> clumsy at best.
> I also sort of like the template format that void linux uses, or
> at least i like parts of it, but I don't like the idea of hard
> depndency on bash.
> I suppose this is a different discussion, but I think its good that
> you know that we are not 100% happy with APKBUILD format, and that
> we are open to suggestions and ideas.
> -nc

Replacing a format is pretty hard as I am finding out converting all
our custom ebuilds to APKBUILD. Hehe.

It is good to know that the door is open to further improvements to
the format. As I work with it more I will continue to think about
ways to incrementally make it a better format.

One thought that I did have was to have some common things abstracted
into things that could be sourced from the APKBUILD. Almost like
'inherit' eclasses in Gentoo or '.include' templates in FreeBSD. (Can
you tell yet which systems I am familiar with?) It might make things
like Python and Ruby easier to maintain, since you would for instance
just do:

package() {
   . "$templatedir"/python/package

check() {
   . "$templatedir"/python/check_pytest

But I don't know if that really would save a lot of maintenance
burden, or if it would just shift it to another place. Will need to
think more and start a new thread for that as well.

- --arw

- --
A. Wilcox (awilfox)
Project Lead, Adélie Linux
Version: GnuPG v2


Received on Mon Jun 12 2017 - 17:38:00 UTC