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

Joel Grunbaum
2020-11-30 9e5affc4b5def98e5e959d870168831fb1bc1a30
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.
9e5aff 5 It supports building packages from PKGBUILDs attached to git repositories, such as those in the AUR.
8ea4ef 6
9e5aff 7 Currently it supports package signing and building clean from source.
JG 8 It can help set itself up and generate GPG keys if need be (partially tested).
e6c63d 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.
9e5aff 12 It is unmaintained but should work.
e6c63d 13
JG 14 * Features
15 - Automatic building from the AUR
9e5aff 16 - Automatic AUR dependency resolution
JG 17 - Automatic rebuilding of version control packages
18 - Parallel building to speed up the build process
e6c63d 19 - Package signing
JG 20 - Clean building
21 - Supports multiple targets from a single PKGBUILD
303424 22
82201d 23 * Set-up
9e5aff 24 Create a copy of ~vars-default.sh~ as ~vars.sh~ and edit to match repository details.
8ea4ef 25 Have a look at the init function near the bottom of the file to decide if you want to run it.
JG 26 If you decide to generate a GPG key, edit the name, comment and email so that it fits you.
a9dd2c 27
9e5aff 28 You may also want to set ~MAKEFLAGS="-j$(nproc)"~ within ~makepkg.conf~ to enable parallel compilation.
JG 29 It may also be advisable to edit ~makepkg.conf~ to enable parallel compression, see the Arch Wiki for details.
30 ccache may be useful to decrease the times of git packages, as there are few changes on each rebuild.
a9dd2c 31
82201d 32 * Usage
9e5aff 33 To add a package: ~main.sh add [package]~.
JG 34 If a package fails to build, it can be manually rebuilt by re-adding it.
35 I find that removing and reading often solves build problems.
e6c63d 36
JG 37 Packages can be removed with ~main.sh remove [package]~.
38 This remove it from the repo, build folder and deletes any built versions in the repository directory.
39
40 To update all packages, use ~main.sh build-all~.
41 A ~-f~ flag can be used to force a rebuild of all the packages.
8ea4ef 42 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 43
533d81 44 * To Dos
f6854c 45 # - Multiple packages from a single PKGBUILD :: Some PKGBUILDs can create many packages at once, currently I am unable to handle this.
9e5aff 46 # - AUR dependency checking and automatic resolution :: Something like what aurutils does, maybe I can steal it from there
f6854c 47 - 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 48 # - Create a universal variables file :: Not sure how useful this would be, but could be nice
e6c63d 49 # - Build parallelism :: Try and make packages build in parallel, place a lock on the repo file.
JG 50 # - Add or remove multiple packages at a time :: Make it less tedious to add packages