diff --git a/.gitignore b/.gitignore index 7654f12..931bdcd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ mkosi.key mkosi.output/ mkosi.cache/ -mkosi.local.conf diff --git a/AGENTS.md b/AGENTS.md index d3dc573..24da7e1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -66,6 +66,7 @@ CMD ["/sbin/init"] END podman run -d --name mkosi --privileged --systemd=always -v :/repo \ -v mkosi-cache:/root/.cache/mkosi -v mkosi-work:/var/tmp -w /repo mkosi-vm +podman exec mkosi mkosi -f genkey # Run this once. Don't commit mkosi.crt. podman exec mkosi mkdir -p mkosi.cache podman exec -d -t mkosi sh -c 'mkosi -i -f \ --kernel-command-line-extra=console=ttyS0 vm -- -serial chardev:console \ @@ -73,7 +74,6 @@ podman exec -d -t mkosi sh -c 'mkosi -i -f \ podman exec mkosi mkosi ssh -- systemctl --failed ``` -- mkosi signs with the test key from [README.md](README.md#development). - `mkosi -i` keeps the image with its packages installed in `mkosi.cache/`. Rebuilds start from it and skip installing packages. - The volume `mkosi-work` keeps mkosi's workspace in /var/tmp off overlayfs. diff --git a/README.md b/README.md index 5ff6b30..61685f0 100644 --- a/README.md +++ b/README.md @@ -35,27 +35,11 @@ itself up as at first boot. ## Development -Only CI has `mkosi.key`, so local builds sign with a test key: - ```sh -openssl req -new -x509 -newkey rsa:2048 -nodes -subj /CN=test \ - -keyout ~/test.key -out ~/test.crt +mkosi -f genkey # This replaces mkosi.crt for local tests. Don't commit it. +mkosi build ``` -`mkosi.local.conf`: - -```ini -[Validation] -SecureBootKey=~/test.key -SecureBootCertificate=~/test.crt -SignExpectedPcrKey=~/test.key -SignExpectedPcrCertificate=~/test.crt -VerityKey=~/test.key -VerityCertificate=~/test.crt -``` - -Then run `mkosi build`. - `mkosi.output/` then holds the disk image (`agentos_.raw`) and the UKI and /usr partitions that make up an update.