]>
Commit | Line | Data |
---|---|---|
1 | # abchr | |
2 | ||
3 | There are various build chains surrounding Alpine. Most solutions use | |
4 | containerization, QEMU, and other technologies; meanwhile I just wanted a | |
5 | simple way to build packages and install development utilities without shitting | |
6 | up my production system. `abchr` is an attempt to create a simple solution to | |
7 | my simple problem. It isn't very flexible, requires root access for chroot, and | |
8 | won't allow you to (easily) build for multiarch, but it works. | |
9 | ||
10 | ## Installation | |
11 | ||
12 | 1. Create a directory and 3 subdirectories named `bin`, `alpine`, and `aports`. | |
13 | Your tree should look like this: | |
14 | ``` | |
15 | + abchr | |
16 | + bin | |
17 | + alpine | |
18 | + aports | |
19 | ``` | |
20 | 2. Clone the repo to the `bin` directory. | |
21 | 3. Run `abchr-newchroot $(id -u)` to populate the `alpine` directory with a new | |
22 | installation of Alpine Linux. This processes downloads the latest | |
23 | `apk-tools-static` into the chroot and installs the basic packages necessary | |
24 | for a build environment. It also creates a user in the chroot with its UID | |
25 | set to the first argument of the script. Having this be your own UID is | |
26 | optimal as it lets you manupulate the chroot files easily. | |
27 | 4. To ensure everything worked, run `abchr abuild -h`. You should see the help | |
28 | text for `abuild`, which should be installed in the chroot. | |
29 | ||
30 | ## Usage | |
31 | ||
32 | The `abchr` command simply sets up the chroot and starts whatever program is | |
33 | specified in the arguments as-is. There are some exceptions, meant for ease-of- | |
34 | use; run `abchr -h` to see what the script is capable of. |