- Follow AGENTS.md style: headers start with the file's name, short notes are full sentences, comments within 80 columns. - Build with mkosi's tools tree, pinned to the image's release (ToolsTreeRelease=%r): rawhide's repositories made the image rawhide. - Incremental builds with mkosi.cache/ for faster local rebuilds. - Hostname= instead of systemd.hostname= on the kernel command line. - mkosi.finalize: bash, no cd, and L+ for /etc/systemd. PID 1 applies the presets at first boot and made /etc/systemd/system, which blocked the link, so /etc/systemd/user (the user's D-Bus) was missing. - Disable homed, userdbd and nsresourced with presets instead of deleting their units. Drop modules the kernel has built in. - mkosi.version adds the git commit to the version. - One dev container per worktree or session in CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
26 files changed
+205
-243
No files matched your search
+10
-10
@@ -1,8 +1,6 @@
|
||||
# OS image
|
||||
#
|
||||
# Builds the OS image and publishes it as version "latest". VMs fetch the
|
||||
# built images as updates (mkosi.extra/usr/lib/sysupdate.d). Runs on every
|
||||
# push, weekly for package updates, and by hand for critical CVEs.
|
||||
# os.yml builds the OS image and publishes it as version "latest". VMs fetch
|
||||
# the built images as updates (mkosi.extra/usr/lib/sysupdate.d). It runs on
|
||||
# every push, weekly for package updates, and by hand for critical CVEs.
|
||||
#
|
||||
# Required values:
|
||||
# - SECUREBOOT_KEY repository secret: the private key of mkosi.crt, written
|
||||
@@ -21,12 +19,9 @@ on:
|
||||
jobs:
|
||||
os:
|
||||
runs-on: linux
|
||||
env:
|
||||
PKG: ${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/generic/agent/latest
|
||||
AUTH: "Authorization: token ${{ gitea.token }}"
|
||||
steps:
|
||||
- name: Install tools
|
||||
run: dnf install -yq mkosi sbsigntools
|
||||
run: dnf install -yq mkosi git-core
|
||||
- name: Check out
|
||||
uses: builtin:checkout
|
||||
- name: Build
|
||||
@@ -39,12 +34,14 @@ jobs:
|
||||
working-directory: mkosi.output
|
||||
run: |
|
||||
zstd -q --rm -9 agent_*.usr-*.raw
|
||||
- name: Checksum
|
||||
working-directory: mkosi.output
|
||||
run: sha256sum agent_*.efi agent_*.usr-*.raw.zst > SHA256SUMS
|
||||
- name: Sign
|
||||
working-directory: mkosi.output
|
||||
env:
|
||||
KEY: ${{ secrets.SIGNING_KEY }}
|
||||
run: |
|
||||
sha256sum agent_*.efi agent_*.usr-*.raw.zst > SHA256SUMS
|
||||
export GNUPGHOME=$(mktemp -d)
|
||||
gpg -q --batch --import <<< "$KEY"
|
||||
gpg -q --batch -o SHA256SUMS.gpg --detach-sign SHA256SUMS
|
||||
@@ -53,6 +50,9 @@ jobs:
|
||||
run: qemu-img convert -c -O qcow2 "$(basename agent_*.efi .efi).raw" agent.qcow2
|
||||
- name: Publish
|
||||
working-directory: mkosi.output
|
||||
env:
|
||||
PKG: ${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/generic/agent/latest
|
||||
AUTH: "Authorization: token ${{ gitea.token }}"
|
||||
run: |
|
||||
curl -fsS -H "$AUTH" -X DELETE "$PKG" || true
|
||||
for f in agent_*.efi agent_*.usr-*.raw.zst agent.qcow2 agent_*.manifest SHA256SUMS.gpg SHA256SUMS; do
|
||||
|
||||
Reference in new issue
Block a user