Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/.gitlab/ci
diff options
context:
space:
mode:
authorJonathon Fernyhough <jonathon@m2x.dev>2021-03-04 20:58:59 +0000
committerDavid Runge <dvzrv@archlinux.org>2021-03-14 17:42:54 +0000
commitf502b56ec2518cb2f3a6bd687683a09c0cd07712 (patch)
tree0fa4cfe58309a72dcb2a8634d93d67b57e472652 /.gitlab/ci
parentbc67933af14c28eb385b537a6afa3aa6e458af59 (diff)
Create zsync control file for delta downloads
Diffstat (limited to '.gitlab/ci')
-rwxr-xr-x.gitlab/ci/build-host.sh2
-rwxr-xr-x.gitlab/ci/build-inside-vm.sh10
2 files changed, 11 insertions, 1 deletions
diff --git a/.gitlab/ci/build-host.sh b/.gitlab/ci/build-host.sh
index 7f7433d..3d26565 100755
--- a/.gitlab/ci/build-host.sh
+++ b/.gitlab/ci/build-host.sh
@@ -140,7 +140,7 @@ function main() {
expect "# "
# Install required packages
- send "pacman -Syu --ignore linux --noconfirm --needed qemu-headless jq dosfstools e2fsprogs libisoburn mtools squashfs-tools\n"
+ send "pacman -Syu --ignore linux --noconfirm --needed qemu-headless jq dosfstools e2fsprogs libisoburn mtools squashfs-tools zsync\n"
expect "# " 120
## Start build and copy output to local disk
diff --git a/.gitlab/ci/build-inside-vm.sh b/.gitlab/ci/build-inside-vm.sh
index dbaadea..151cc13 100755
--- a/.gitlab/ci/build-inside-vm.sh
+++ b/.gitlab/ci/build-inside-vm.sh
@@ -26,12 +26,22 @@ create_checksums() {
fi
}
+create_zsync_delta() {
+ # create a zsync control file for a file
+ # $1: a file
+ zsyncmake -C -u "${1##*/}" -o "${1}".zsync "${1}"
+ if [ -n "${SUDO_UID:-}" ]; then
+ chown "${SUDO_UID}:${SUDO_GID}" "${1}".zsync
+ fi
+}
+
run_mkarchiso() {
# run mkarchiso
# $1: template name
mkdir -p "${output}/${1}" "${tmpdir}/${1}"
./archiso/mkarchiso -o "${output}/${1}" -w "${tmpdir}/${1}" -v "configs/${1}"
create_checksums "${output}/${1}/"*.iso
+ create_zsync_delta "${output}/${1}/"*.iso
}
trap cleanup EXIT