~dricottone/apkbuilds

ref: 45a301f454f9fdfc89489fcf60b248aaf73c9c26 apkbuilds/README.md -rw-r--r-- 2.4 KiB
45a301f4Dominic Ricottone I missed another update a month ago

#apkbuilds

#Workflow

Depends on my other projects.

docker login https://registry.intra.dominic-ricottone.com
docker pull registry.intra.dominic-ricottone.com/apkbuilder:latest
git clone https://git.dominic-ricottone.com/~dricottone/simple-builder
cd simple-builder
make
make install

Initialize a local copy of the repository with make pkg.

Delete any old packages that should no longer be served. I recommend keeping 2 versions of any package, so that downgrades can be executed if a runtime bug is discovered.

List packages that can be build with make ls.

Begin building packages with make build. On success, built packages are automatically pushed to the repository. Address failures as needed.

#Tips

Sometimes image resolution is a bit weird.

panic: Error response from daemon: No such image: [...]/apkbuilder:latest

panic: Error response from daemon: image with reference [...]/apkbuilder:latest was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64

Try re-logging into the registry.

docker login REGISTRYURL

A true build failure will look like:

panic: Build failed

goroutine 1 [running]:
main.main()
        [...]/main.go:160 +0x19f

Try running manually.

$ make shell
~ $ /home/builder/build.sh PACKAGENAME

If build failures are propogating from setuid, the fundamental issue is with binfmt configuration on your local machine.

abuild-apk: setuid(0) failed: Operation not permitted

Try:

docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes`

If the Docker daemon has an incompatible version to the builder client, an error message will be propogated.

panic: Error response from daemon: client version 1.45 is too new. Maximum supported API version is 1.44

Set an environment variable to use a compatible API version.

export DOCKER_API_VERSION=1.44

#License

I share the contents of this repository under the BSD 3 clause license, except where alternate attribution and licensing is required.

Namely, the APKBUILDs for sr.ht software is highly derivative of Drew DeVault. The original license is reproduced in this repository, co-located with the corresponding files. The original license can also be viewed online at https://git.sr.ht/~sircmpwn/sr.ht-apkbuilds/tree/master/item/LICENSE .