Subject: Is there an official script for compiling packages?

From: Mathu Xu <[email-masked]>
Date: Tue, 3 Sep 2024 11:48:59 -0400

Hi,

I was working on compiling Alpine Linux packages to a custom web
assembly target, but I've encountered many different problems when
compiling. I was wondering since there are more than 1000 packages
in Alpine Linux package keeper, do Alpine people have a script for
mass compiling them? If yes, is it possible to share it or share the
design principles behind it?

I don't know too much about this but I'm assuming all the packages
need to be recompiled when basic things in Alpine updates
(e.g. if there's an update in the musl libc).
Any help would be appreciated, thanks for your time.

This is also my first time using a mailing list so please correct me if
there's any formatting issues.

Cheers,
Mathu Xu

---

From: Jeffrey Walton <[email-masked]>
Date: Tue, 3 Sep 2024 12:14:55 -0400

> there's any formatting issues.

Have you had a look at
<https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package>? It
should give you an idea about how Alpine builds packages. However, it
may not have the info about building for web assemblies.

Jeff

---

From: "fossdd" <[email-masked]>
Date: Tue, 03 Sep 2024 20:58:53 +0200

> design principles behind it?

Alpine stores it's package build scripts inside a git repository
(https://gitlab.alpinelinux.org/alpine/aports). If you want to build one
of the package, you can use the `abuild` (which is basically a shell
script) command for that.

The wiki, specially https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package,
has some great documentation on how to set up a build environment for
building Alpine packages. (While the wiki title says "Creating" most
sections are still applicable for other scenarious).

abuild is also used at the build servers, but there is also a lot of
other work involved like dependency resolution (aka. which package
depends on which, to determine the build queue order).

> (e.g. if there's an update in the musl libc).

Actually Alpine only rebuilds dependents if there is a breaking change,
like a ABI difference, mostly detected by the change of the soname.
That way we only rebuild packages if necessary to not waste any
resources that could be used to build other packages.

https://build.alpinelinux.org/ shows the current build status and how
much packages are left to be built.

> Any help would be appreciated, thanks for your time.

No problem ;)

If you have further questions, don't hestitate to reply or write a
message on IRC.

> there's any formatting issues.

Nice to see new people using mailing lists!