1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# 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 `APKBUILD`s 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 .