Skip to content

chore(deps): bump github.com/urfave/cli/v3 from 3.9.1 to 3.10.0 #368

chore(deps): bump github.com/urfave/cli/v3 from 3.9.1 to 3.10.0

chore(deps): bump github.com/urfave/cli/v3 from 3.9.1 to 3.10.0 #368

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
golangci:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.26.3'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install libbtrfs-dev
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.12.2
args: --build-tags containers_image_openpgp
- name: Check generated manpages are up to date
run: make man-check
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Free disk space
run: |
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/.ghcup
sudo docker image prune --all --force
- name: Install mkosi
uses: systemd/mkosi@main
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.26.3'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install libbtrfs-dev qemu-system qemu-kvm qemu-utils
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Build disk image with mkosi
working-directory: testdata
run: |
mkdir -p mkosi.output
sudo mkosi --force
sudo chmod a+r mkosi.output/*
- name: List mkosi output
working-directory: testdata
run: |
echo "=== mkosi.output/ ==="
ls -lhR mkosi.output/ 2>/dev/null || echo "(empty or missing)"
echo "=== testdata root ==="
ls -lh *.raw *.cow 2>/dev/null || echo "(no .raw/.cow files)"
- name: Extract root partition from GPT image
working-directory: testdata
run: |
# mkosi produces a GPT disk image; extract the root partition
# as a plain ext4 image for compatibility with the test framework.
# Use sfdisk to read partition offsets directly — avoids relying on
# loop device partition scanning which can race.
IMG=$(find mkosi.output -name '*.raw' -size +1M -print -quit 2>/dev/null)
if [ -z "$IMG" ]; then
echo "ERROR: no disk image found in mkosi.output/"
ls -lhR mkosi.output/ 2>/dev/null
exit 1
fi
echo "Image: $IMG ($(stat -c%s "$IMG") bytes)"
# Dump partition table for debugging
sudo sfdisk --json "$IMG" | jq '.partitiontable.partitions[] | {type, start, size}'
# Select the root partition (x86-64 root GUID), not the ESP
eval "$(sudo sfdisk --json "$IMG" | jq -r '
.partitiontable.partitions[] |
select(.type == "4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709") |
"PART_START=\(.start) PART_SIZE=\(.size)"')"
echo "Root partition start=$PART_START size=$PART_SIZE (sectors)"
sudo dd if="$IMG" of=rootfs_ext4.raw \
bs=512 skip="$PART_START" count="$PART_SIZE" status=progress
mv rootfs_ext4.raw rootfs.raw
- name: Configure rootfs image
working-directory: testdata
run: |
mkdir -p /tmp/rootfs-mnt
sudo mount -o loop rootfs.raw /tmp/rootfs-mnt
R=/tmp/rootfs-mnt
# Remove root password
sudo sed -i '/^root:/ s|^root:[^:]*:|root::|' $R/etc/shadow
# Generate SSH host keys
sudo ssh-keygen -A -f $R
# Configure sshd for passwordless root access (test environment only).
# openSUSE keeps the vendor config at /usr/etc/ssh/sshd_config which
# includes /etc/ssh/sshd_config.d/*.conf — write our overrides there.
sudo mkdir -p $R/etc/ssh/sshd_config.d
printf 'PermitRootLogin yes\nPasswordAuthentication yes\nPermitEmptyPasswords yes\nUsePAM yes\n' \
| sudo tee $R/etc/ssh/sshd_config.d/99-test.conf
# Configure PAM to allow empty password authentication
if [ -f $R/etc/pam.d/sshd ]; then
sudo sed -i 's/pam_unix\.so/pam_unix.so nullok/' $R/etc/pam.d/sshd
fi
if [ -f $R/etc/pam.d/common-auth ]; then
sudo sed -i 's/pam_unix\.so/pam_unix.so nullok/' $R/etc/pam.d/common-auth
fi
# Configure systemd-networkd to use DHCP on the virtual NIC
sudo mkdir -p $R/etc/systemd/network
printf '[Match]\nName=e*\n\n[Network]\nAddress=10.0.2.15/24\nGateway=10.0.2.2\nDNS=10.0.2.3\n' \
| sudo tee $R/etc/systemd/network/80-dhcp.network
# Mask serial console getty (hangs waiting for udev to tag /dev/ttyS0)
sudo ln -sf /dev/null $R/etc/systemd/system/serial-getty@ttyS0.service
sudo ln -sf /dev/null $R/etc/systemd/system/serial-getty@.service
# Mask mkosi's VSock SSH socket (not needed, causes noisy failure)
sudo ln -sf /dev/null $R/etc/systemd/system/ssh.socket
# Enable services
sudo ln -sf /usr/lib/systemd/system/sshd.service $R/etc/systemd/system/multi-user.target.wants/sshd.service
sudo ln -sf /usr/lib/systemd/system/systemd-networkd.service $R/etc/systemd/system/multi-user.target.wants/systemd-networkd.service
sudo ln -sf /usr/lib/systemd/system/containerd.service $R/etc/systemd/system/multi-user.target.wants/containerd.service
sudo mkdir -p $R/etc/systemd/system/sockets.target.wants
sudo ln -sf /usr/lib/systemd/system/podman.socket $R/etc/systemd/system/sockets.target.wants/podman.socket
sudo umount /tmp/rootfs-mnt
- name: Create qcow2 overlay
working-directory: testdata
run: qemu-img create -o backing_file=rootfs.raw,backing_fmt=raw -f qcow2 rootfs.cow
- name: Build
run: go build -tags containers_image_openpgp -v ./...
- name: Test
run: go test -tags containers_image_openpgp -timeout 20m -v ./...
- name: E2E signature verification (network)
run: go test -tags 'containers_image_openpgp e2e' -timeout 5m -v ./internal/verify/...