From 3d918611a7da82247377abf1f12300387ce33c40 Mon Sep 17 00:00:00 2001 From: Joel Grunbaum <joelgrun@gmail.com> Date: Mon, 30 Nov 2020 12:26:22 +0000 Subject: [PATCH] Removed testing comments and unused spaces. added todo --- README.org | 60 +++++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 45 insertions(+), 15 deletions(-) diff --git a/README.org b/README.org old mode 100644 new mode 100755 index 97d3649..8fd5044 --- a/README.org +++ b/README.org @@ -1,21 +1,51 @@ #+TITLE: Auto-build package repository for Arch Linux * What is this? -This is a set of files to auto-build a personal repository for Arch. -It uses a chroot environment to build the packages, so that a build environment can be made on a server running a non-arch operating system. +This is an automatic package building solution for Arch Linux. +It supports building packages from PKGBUILDs attached to git repositories, such as those in the AUR. + +Currently it supports package signing and building clean from source. +It can help set itself up and generate GPG keys if need be (partially tested). +Notifications can be sent using the sendmail command, which is supported in Postfix and OpenSMTPD. + +The chroot generation script is here from an older version of this project and I think its interesting. +It is unmaintained but should work. + +* Features +- Automatic building from the AUR +- Automatic AUR dependency resolution +- Automatic rebuilding of version control packages +- Parallel building to speed up the build process +- Package signing +- Clean building +- Supports multiple targets from a single PKGBUILD + * Set-up -Create a chroot environment named "chroot" in the current directory. -Copy the ~build.sh~ script to ~/build/repo~ within the chroot. -Script coming soon. +Create a copy of ~vars-default.sh~ as ~vars.sh~ and edit to match repository details. +Have a look at the init function near the bottom of the file to decide if you want to run it. +If you decide to generate a GPG key, edit the name, comment and email so that it fits you. + +You may also want to set ~MAKEFLAGS="-j$(nproc)"~ within ~makepkg.conf~ to enable parallel compilation. +It may also be advisable to edit ~makepkg.conf~ to enable parallel compression, see the Arch Wiki for details. +ccache may be useful to decrease the times of git packages, as there are few changes on each rebuild. + * Usage -All scripts must be run as root. -To enter the chroot, use the ~enter_chroot.sh~ script. -To add a package from the AUR, use the ~add_package.sh~ script, with the git URL as the argument. -To build the packages use the ~build_packages.sh~ script, which will enter the chroot, and build the packages from the PKGBUILDs stored in ~/build/repo~. -The packages are built and put into the directory ~/build/repo/x86_64~, then pushed with git. -Only the latest packages are stored in ~/build/repo/x86_64~ to avoid multiple older versions building up. -Since git is used, be sure to sign in to git in the chroot and set ~git config --global credential.helper store~, with an appropriate remote repository. -To enable automatic building, create a cronjob for root, something of the sort of ~* 12 * * * /path/to/dir/build_packages.sh~ to build ever day at noon. +To add a package: ~main.sh add [package]~. +If a package fails to build, it can be manually rebuilt by re-adding it. +I find that removing and reading often solves build problems. + +Packages can be removed with ~main.sh remove [package]~. +This remove it from the repo, build folder and deletes any built versions in the repository directory. + +To update all packages, use ~main.sh build-all~. +A ~-f~ flag can be used to force a rebuild of all the packages. +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. + * To Dos -- Add a script to create the chroot folder. -- Error catching for builds which fail. +# - Multiple packages from a single PKGBUILD :: Some PKGBUILDs can create many packages at once, currently I am unable to handle this. +# - AUR dependency checking and automatic resolution :: Something like what aurutils does, maybe I can steal it from there +- Error catching for builds which fail. :: Have emailing, but nothing more advanced. Would be nice to have some basic error handling in the script +# - Create a universal variables file :: Not sure how useful this would be, but could be nice +# - Build parallelism :: Try and make packages build in parallel, place a lock on the repo file. +# - Add or remove multiple packages at a time :: Make it less tedious to add packages +- Keep multiple old packages :: Keep so that packages can be downloaded even if repository isn't upgraded. Also allow downgrading -- Gitblit v1.9.3