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

Chizi123
2019-07-14 70bd3ef803e43fb0a12c84e9ac05ad71d911446d
unbinding chroot after process is finished
4 files modified
9 ■■■■■ changed files
README.org 4 ●●● patch | view | raw | blame | history
add_package.sh 1 ●●●● patch | view | raw | blame | history
build_packages.sh 1 ●●●● patch | view | raw | blame | history
enter_chroot.sh 3 ●●●● patch | view | raw | blame | history
README.org
@@ -11,8 +11,6 @@
You may also want to set ~MAKEFLAGS="-j$(nproc)"~ within the chroot to enable parallel compilation.
It is also needed to mount execute ~mount --bind chroot chroot~, to set the root directory within the chroot.
Script coming soon.
* Usage
All scripts must be run as root.
@@ -23,7 +21,7 @@
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.
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 enable automatic building, create a cronjob for root, something of the sort of ~0 12 * * * /path/to/dir/build_packages.sh~ to build ever day at noon.
* To Dos
- Add a script to create the chroot folder.
- Error catching for builds which fail.
add_package.sh
@@ -3,3 +3,4 @@
CHDIR=$(dirname "$(realpath $0)")/chroot 
mount --bind $CHDIR $CHDIR
$CHDIR/bin/arch-chroot $CHDIR su joel -c "cd /build/repo; git clone $1"
umount $CHDIR
build_packages.sh
@@ -3,3 +3,4 @@
CHDIR=$(dirname "$(realpath $0)")/chroot
mount --bind $CHDIR $CHDIR
$CHDIR/bin/arch-chroot $CHDIR su joel -c "/build/repo/build.sh"
umount $CHDIR
enter_chroot.sh
@@ -2,4 +2,5 @@
CHDIR=$(dirname "$(realpath $0)")/chroot 
mount --bind $CHDIR $CHDIR
$CHDIR/bin/arch-chroot $CHDIR su joel
$CHDIR/bin/arch-chroot $CHDIR su joel
umount $CHDIR