mirror of https://github.com/Chizi123/Arch-autobuild-repo.git

Chizi123
2020-10-23 5e843f0ef4bd53743d1ab2668bbc8dc598bad280
commit | author | age
82201d 1 #+TITLE: Auto-build package repository for Arch Linux
C 2
3 * What is this?
e6c63d 4 This is an automatic package building solution for Arch Linux.
JG 5 It supports building packages from PKGBUILDs attached to git repositories, such as the AUR.
8ea4ef 6
e6c63d 7 Currently it supports package signing and building clean from source (untested).
JG 8 It can help to set itself up and generate GPG keys if need be (partially tested).
9 Notifications can be sent using the sendmail command, which is supported in Postfix and OpenSMTPD.
8ea4ef 10
e6c63d 11 The chroot generation script is here from an older version of this project and I think its interesting.
JG 12
13 * Features
14 - Automatic building from the AUR
15 - Automatic rebuilding of git packages
16 - Parallel builds to speed up the build process
17 - Package signing
18 - Clean building
19 - Automated set up
20 - Supports multiple targets from a single PKGBUILD
303424 21
82201d 22 * Set-up
e6c63d 23 Edit the variables in ~vars.sh~ to suit your repository details.
8ea4ef 24 Have a look at the init function near the bottom of the file to decide if you want to run it.
JG 25 If you decide to generate a GPG key, edit the name, comment and email so that it fits you.
a9dd2c 26
C 27 You may also want to set ~MAKEFLAGS="-j$(nproc)"~ within the chroot to enable parallel compilation.
a45f88 28 For xz compression, add the ~--threads=0~ option to COMPRESSXZ such that it reads ~COMPRESSXZ=(xz -c -z - --threads=0)~.
C 29 ccache may be useful to decrease the times of git packages, due to the little changes.
a9dd2c 30
82201d 31 * Usage
e6c63d 32 To add a package ~main.sh add [package]~ should be run.
JG 33 If a package fails to build, it can be manually rebuilt by reading it.
34 I find that removing and reading often solves any problems.
35
36 Packages can be removed with ~main.sh remove [package]~.
37 This remove it from the repo, build folder and deletes any built versions in the repository directory.
38
39 To update all packages, use ~main.sh build-all~.
40 A ~-f~ flag can be used to force a rebuild of all the packages.
8ea4ef 41 To allow automatic building, use a cronjob or write a systemd unit, there are many guides out there, although I may add examples if I feel like it.
303424 42
533d81 43 * To Dos
f6854c 44 # - Multiple packages from a single PKGBUILD :: Some PKGBUILDs can create many packages at once, currently I am unable to handle this.
JG 45 - AUR dependency checking and automatic resolution :: Something like what aurutils does, maybe I can steal it from there
46 - Error catching for builds which fail. :: Have emailing, but nothing more advanced. Would be nice to have some basic error handling in the script
8c5114 47 # - Create a universal variables file :: Not sure how useful this would be, but could be nice
e6c63d 48 # - Build parallelism :: Try and make packages build in parallel, place a lock on the repo file.
JG 49 # - Add or remove multiple packages at a time :: Make it less tedious to add packages