From 7cc9690193ef68adea400187f2e69a6833a6cbc6 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Tue, 25 Jun 2024 14:00:48 +0200 Subject: [PATCH] feat(arm64): Bump raspbian version --- .../workflows/builder.yaml | 45 +++++++++++-------- arm64-build.sh | 8 ++-- 2 files changed, 30 insertions(+), 23 deletions(-) rename .gitlab-ci.yml => .gitea/workflows/builder.yaml (66%) diff --git a/.gitlab-ci.yml b/.gitea/workflows/builder.yaml similarity index 66% rename from .gitlab-ci.yml rename to .gitea/workflows/builder.yaml index d455be1..644c6e2 100644 --- a/.gitlab-ci.yml +++ b/.gitea/workflows/builder.yaml @@ -1,10 +1,17 @@ -stages: - - build +name: Build ISO images +on: + workflow_dispatch: + release: + types: [released] -build-x86: - image: debian:latest - stage: build - script: + +jobs: + build-x86: + container: + image: debian:latest + runs-on: [arm64] + + steps: - apt update - apt install -y xorriso curl genisoimage cpio - curl -LO https://laotzu.ftp.acc.umu.se/debian-cd/current/amd64/iso-cd/debian-11.6.0-amd64-netinst.iso @@ -20,20 +27,20 @@ build-x86: - sh -c "find -follow -type f ! -name md5sum.txt -print0 | xargs -0 md5sum > md5sum.txt" - cd .. - chmod -w -R isofiles/ - - genisoimage -r -J -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o halia-debian-11.6.0-amd64.iso isofiles + - genisoimage -r -J -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o halis-debian-11.6.0-amd64.iso isofiles artifacts: paths: - - halia-debian-11.3.0-amd64.iso + - halis-debian-11.3.0-amd64.iso expire_in: 1 mos 8 days -build-arm64: - image: debian:latest - stage: build - script: - - apt update - - apt install -y curl xz-utils file sudo - - ./arm64-build.sh - artifacts: - paths: - - ./*.img.xz - expire_in: 1 mos 8 days + build-arm64: + image: debian:latest + stage: build + script: + - apt update + - apt install -y curl xz-utils file sudo + - ./arm64-build.sh + artifacts: + paths: + - ./*.img.xz + expire_in: 1 mos 8 days diff --git a/arm64-build.sh b/arm64-build.sh index b58ca44..b9dc61f 100755 --- a/arm64-build.sh +++ b/arm64-build.sh @@ -1,9 +1,9 @@ #/bin/sh -RASPIOS_IMG=2022-04-04-raspios-bullseye-arm64-lite.img +RASPIOS_IMG=2024-03-15-raspios-bookworm-arm64-lite.img echo "Fetching image" -curl -O https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2022-04-07/2022-04-04-raspios-bullseye-arm64-lite.img.xz +curl -O https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz echo "Uncompressing image" unxz $RASPIOS_IMG.xz @@ -18,8 +18,8 @@ sudo mount $RASPIOS_IMG -o offset=$((512*$OFFSET_IMG)) mnt echo "Chroot into partition to start edition" sudo chroot mnt /bin/sh <<"EOT" -usermod -l creator pi -usermod -d /home/creator -m creator +/usr/sbin/usermod -l creator pi +/usr/sbin/usermod -d /home/creator -m creator sed -i 's/creator:\*:/creator:\$6\$saltsalt\$EamwjkVXAe1WqiTTXuzgsmljl5cpVewMLH3xl8TdvQ\/V4S9e30upeNz2bdLkG5\.H71TCEso5Nl0jpyZRx7xy6\/:/g' /etc/shadow sudo -u creator mkdir -p -m 700 /home/creator/.ssh sudo -u creator sh -c 'echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDYsz4jdyzf9UcJ8eEavVmi+DNYE3ioeJBfTlVMw7Vsb tanguy@Diogenes" > /home/creator/.ssh/authorized_keys'