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

Chizi123
2019-07-09 99cd84265229a8963899270f32abcec43660984f
commit | author | age
82201d 1 #+TITLE: Auto-build package repository for Arch Linux
C 2
3 * What is this?
4 This is a set of files to auto-build a personal repository for Arch.
5 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.
6 * Set-up
7 Create a chroot environment named "chroot" in the current directory.
8 Copy the ~build.sh~ script to ~/build/repo~ within the chroot.
a9dd2c 9 While there, run ~pacman -S base-devel~
C 10 Be sure to sign in to git in the chroot and set ~git config --global credential.helper store~, with an appropriate remote repository.
11
12 You may also want to set ~MAKEFLAGS="-j$(nproc)"~ within the chroot to enable parallel compilation.
13
7ece7a 14 It is also needed to mount execute ~mount --bind chroot chroot~, to set the root directory within the chroot.
C 15
82201d 16 Script coming soon.
C 17 * Usage
18 All scripts must be run as root.
19 To enter the chroot, use the ~enter_chroot.sh~ script.
20 To add a package from the AUR, use the ~add_package.sh~ script, with the git URL as the argument.
21 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~.
a9dd2c 22
82201d 23 The packages are built and put into the directory ~/build/repo/x86_64~, then pushed with git.
3ce647 24 Only the latest packages are stored in ~/build/repo/x86_64~ to avoid multiple older versions building up.
a9dd2c 25
533d81 26 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.
C 27 * To Dos
28 - Add a script to create the chroot folder.
29 - Error catching for builds which fail.