Skip to content

Commit f374ac0

Browse files
authored
Merge pull request #14 from AquaBx/patch-1
Switch to an ARM runner
2 parents d5d6121 + 3cce468 commit f374ac0

6 files changed

Lines changed: 14 additions & 17 deletions

File tree

.github/workflows/docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,6 @@ jobs:
4747
with:
4848
context: .
4949
push: ${{ github.event_name != 'pull_request' }}
50+
platforms: linux/amd64,linux/arm64
5051
tags: ${{ steps.meta.outputs.tags }}
5152
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/image.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ env:
1414
jobs:
1515
build:
1616
name: Build default Image
17-
runs-on: ubuntu-latest
17+
runs-on: ubuntu-24.04-arm
1818
permissions:
1919
contents: read
2020
packages: write
@@ -23,9 +23,6 @@ jobs:
2323
- name: Checkout repository
2424
uses: actions/checkout@v4
2525

26-
- name: Set up QEMU
27-
uses: docker/setup-qemu-action@v3
28-
2926
- name: Setup Docker buildx
3027
uses: docker/setup-buildx-action@v3
3128

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM archlinux/archlinux
1+
FROM pkgforge/archlinux
22

33
RUN pacman --noconfirm -Syu \
44
&& pacman --noconfirm -S wget libarchive arch-install-scripts \

lib/base/img.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,21 @@ _img_build() {
5858
_msg2 "Laying out partitions..."
5959

6060
# compute EFS partition size in MiB
61-
efs_size=$(du -bc "${_DIR_DISK_EFI}" | grep total | cut -f1)
62-
efs_part_size=$(( (efs_size*105)/100/(1024*1024) + 1))
61+
efs_part_size=$(du -s --block-size=1M "${_DIR_DISK_EFI}" | cut -f1)
6362

6463
if [[ $efs_part_size -lt 48 ]]; then
6564
efs_part_size=48
6665
fi
6766

6867
# compute root partition size in MiB
69-
root_size=$(du -bc "${_DIR_DISK_ROOT}" | grep total | cut -f1)
70-
root_part_size=$(( (root_size*110)/100/(1024*1024) + 1))
68+
root_size=$(du -s --block-size=1M "${_DIR_DISK_ROOT}" | cut -f1)
69+
root_part_size=$(( root_size + 128 ))
7170

7271
# compute disk size and create base image
7372
_msg2 "Allocating disk image..."
7473
_IMG_DISK="${_DIR_BUILD}/disk.img"
7574

76-
disk_size=$(( efs_part_size + root_part_size + 5 ))
75+
disk_size=$(( efs_part_size + root_part_size + 8 ))
7776
dd if=/dev/zero of="${_IMG_DISK}" bs="${disk_size}" count=1048576 status=none
7877
sync
7978

lib/chroot/pacman.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ _pacman_setup() {
88

99
_pacman_update() {
1010
_msg1 "Updating the system..."
11-
pacman --noconfirm -Syu
11+
pacman --noconfirm --disable-sandbox -Syu
1212
}
1313

1414
_pacman_install() {
@@ -18,7 +18,7 @@ _pacman_install() {
1818
mapfile -t pkglist < "${_CHROOT_PACKAGES}/install"
1919

2020
if [[ ${#pkglist[@]} -gt 0 ]]; then
21-
pacman --noconfirm -S "${pkglist[@]}"
21+
pacman --noconfirm --disable-sandbox -S "${pkglist[@]}"
2222
fi
2323
fi
2424

@@ -29,7 +29,7 @@ _pacman_install() {
2929
shopt -u nullglob
3030

3131
if [[ ${#pkglist[@]} -gt 0 ]]; then
32-
pacman --noconfirm -U "${pkglist[@]}"
32+
pacman --noconfirm --disable-sandbox -U "${pkglist[@]}"
3333
fi
3434
fi
3535
}
@@ -41,11 +41,11 @@ _pacman_uninstall() {
4141
mapfile -t pkglist < "${_CHROOT_PACKAGES}/uninstall"
4242

4343
if [[ ${#pkglist[@]} -gt 0 ]]; then
44-
pacman --noconfirm -Rns "${pkglist[@]}"
44+
pacman --noconfirm --disable-sandbox -Rns "${pkglist[@]}"
4545
fi
4646
fi
4747
}
4848

4949
_pacman_install_local() {
50-
pacman --noconfirm -U "${@}"
50+
pacman --noconfirm --disable-sandbox -U "${@}"
5151
}

lib/modules/linux-surface.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
__pacman_install_retry() {
44
for i in {1..5}; do
5-
if pacman --noconfirm -S "${@}"; then
5+
if pacman --noconfirm --disable-sandbox -S "${@}"; then
66
break
77
fi
88

@@ -30,7 +30,7 @@ Server = https://pkg.surfacelinux.com/arch-aarch64/
3030
EOF
3131

3232
# update
33-
pacman --noconfirm -Syu
33+
pacman --noconfirm --disable-sandbox -Syu
3434

3535
# WORKAROUND: This is a workaround for an issue with GitHub CI. Normally,
3636
# we would install these packages together with the other packages via the

0 commit comments

Comments
 (0)