Received: from mx.nixnet.email (unknown [IPv6:2a01:4ff:f0:2247::1]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id EBF07225A28 for <~alpine/users@lists.alpinelinux.org>; Tue, 3 Sep 2024 18:58:59 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by mx.nixnet.email (Postfix) with ESMTPSA id 0E1327D32D; Tue, 3 Sep 2024 20:58:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pwned.life; s=202002021149; t=1725389936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bYELE5aMUytVcFOl+FmUyZgdeLcsAoZSd3BfJY6tegg=; b=J0DmSKSwlA8wbU7UhD+QC/KItd2jHmqPgxr2CuaYaoulih5ht+z2fG2iONYpPo+FRvmZoS X9UfNXiylJPNZmKWiRGVhz5dZYMKEG4J5leW/UyiOMdNBvc/vusaMJtpDUj5VUhjIUIMxw 91C32Hvd/WDyg4SZ36vkkOTqRSIWMAM= Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 03 Sep 2024 20:58:53 +0200 Message-Id: Subject: Re: Is there an official script for compiling packages? From: "fossdd" To: "Mathu Xu" , <~alpine/users@lists.alpinelinux.org> X-Greeting: Hi mom! Look, I'm in somebodys mail client! X-Mailer: aerc 0.18.2-0-ge037c095a049 References: In-Reply-To: On Tue Sep 3, 2024 at 5:48 PM CEST, Mathu Xu wrote: > 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? 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_pa= ckage, 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). > 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). 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. > This is also my first time using a mailing list so please correct me if > there's any formatting issues. Nice to see new people using mailing lists!