Skip to content

Commit f5ba2a5

Browse files
committed
chore: strip out unnecessary dependencies from QEMU builds
Also upgrades to Alpine 3.22.
1 parent 4f45470 commit f5ba2a5

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

.github/workflows/qemu-image-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- 'qemu-arm64-nix.pkr.hcl'
1111
- 'common-nix.vars.pkr.hcl'
1212
- 'ansible/vars.yml'
13+
- 'scripts/*'
1314
workflow_dispatch:
1415

1516
permissions:

Dockerfile-kubernetes

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
FROM alpine:3.21
1+
FROM alpine:3.22
22

33
ADD ./output-cloudimg/packer-cloudimg /disk/focal.qcow2
44

5-
RUN apk add --no-cache qemu-system-aarch64 qemu-img openssh-client nftables cloud-utils-localds aavmf virtiofsd
6-
# dev stuff
7-
# RUN apk add --no-cache iproute2
5+
RUN apk add --no-cache qemu-system-aarch64 qemu-img openssh-client aavmf virtiofsd \
6+
&& truncate -s 64M /root/varstore.img \
7+
&& truncate -s 64M /root/efi.img \
8+
&& dd if=/usr/share/AAVMF/QEMU_EFI.fd of=/root/efi.img conv=notrunc \
9+
&& qemu-img create -f qcow2 /tmp/disk.qcow2 -b /disk/focal.qcow2 -F qcow2 \
10+
&& apk del --no-cache aavmf qemu-img
811

912
CMD exec /bin/sh -c "trap : TERM INT; sleep 9999999999d & wait"

ansible/vars.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ postgres_major:
99

1010
# Full version strings for each major version
1111
postgres_release:
12-
postgresorioledb-17: "17.0.1.094-orioledb"
13-
postgres17: "17.4.1.044"
14-
postgres15: "15.8.1.101"
12+
postgresorioledb-17: "17.0.1.095-orioledb"
13+
postgres17: "17.4.1.45"
14+
postgres15: "15.8.1.102"
1515

1616
# Non Postgres Extensions
1717
pgbouncer_release: "1.19.0"

ebssurrogate/scripts/qemu-bootstrap-nix.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,6 @@ execute_stage2_playbook
155155
# we do not want to ship an initialized DB as this is performed as needed
156156
mkdir -p /db/template
157157
mv /data/pgdata /db/template
158+
cloud-init clean --logs
158159
clean_legacy_things
159160
clean_system
160-
cloud-init clean --logs

scripts/90-cleanup-qemu.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ elif [ -n "$(command -v apt-get)" ]; then
4343
add-apt-repository --yes --remove ppa:ansible/ansible
4444

4545
source /etc/os-release
46-
apt-get -y remove --purge linux-headers-5.11.0-1021-aws
46+
47+
apt-mark manual libevent-2.1-7 # required for pgbouncer
48+
apt-get -y remove --purge ansible-core apport appstream bash-completion bcache-tools bind9-dnsutils bind9-host bind9-libs bolt btrfs-progs byobu command-not-found console-setup distro-info eject fonts-ubuntu-console friendly-recovery ftp fwupd gawk gdisk keyboard-configuration libvolume-key1 libicu66 libssl-dev lvm2 lxd-agent-loader man-db mdadm modemmanager mtd-utils nano netcat-openbsd nfs-common ntfs-3g parted pastebinit screen strace thin-provisioning-tools tmux usb-modeswitch vim vim-runtime wget whiptail xfsprogs
49+
apt remove -y --purge libc6-dev linux-libc-dev libevent-dev libpcre3-dev libsystemd-dev
4750

4851
apt-get -y update
4952
apt-get -y upgrade

0 commit comments

Comments
 (0)