-
-
Notifications
You must be signed in to change notification settings - Fork 751
mkosi for test image builds #4539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
310e353
Created the base for mkosi
Torxed f98352f
Added final packages for testing archinstall
Torxed a145ba5
Added a mkosi.output/ folder to tidy things up
Torxed 9a44ea0
Added missing packages for archinstall to work (more might be needed,…
Torxed 57fa3ce
Added a small readme on how to use mkosi with archinstall
Torxed 62808cf
Merged master
Torxed 2e4ee81
Adding UKI runner
Torxed 09b641a
ci(iso-build): use new build_iso.sh path after move
0xdeadd b84bf7f
Added networking to UKI, and added a qemu helper script that can boot…
Torxed 9ce08fe
Added instructions on how to run
Torxed 686c619
Fixed pylint issues and missing imports
Torxed 06b8099
Fixed ruff issues
Torxed 8810e74
Fixed more formatting
Torxed 25f90d8
Added some ruff ignores
Torxed 54d0374
Disabled mypy checks for test_tooling
Torxed File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # This workflow will build an Arch Linux UKI file with the commit on it | ||
|
|
||
| name: Build Arch UKI with ArchInstall Commit | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - main # In case we adopt this convention in the future | ||
| pull_request: | ||
| paths-ignore: | ||
| - 'docs/**' | ||
| - '**.editorconfig' | ||
| - '**.gitignore' | ||
| - '**.md' | ||
| - 'LICENSE' | ||
| - 'PKGBUILD' | ||
| release: | ||
| types: | ||
| - created | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: archlinux/archlinux:latest | ||
| options: --privileged | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| - run: pwd | ||
| - run: find . | ||
| - run: cat /etc/os-release | ||
| - run: pacman-key --init | ||
| - run: pacman --noconfirm -Sy archlinux-keyring | ||
| - run: pacman --noconfirm -Sy mkosi | ||
| - run: (cd test_tooling/mkosi/ && mkosi build -B) | ||
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | ||
| with: | ||
| name: Arch Live UKI | ||
| path: test_tooling/mkosi/mkosi.output/*.efi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # To build | ||
|
|
||
| mkosi build -B | ||
|
|
||
| # To run | ||
|
|
||
| mkosi qemu \ | ||
| --drive=archinstall_small:25G \ | ||
| -- \ | ||
| -device nvme,serial=archinstall_small,drive=archinstall_small | ||
|
|
||
| *note: in order to boot the installation, we need to disable UKI being added to -kernel. I don't know of a way to do this yet, unless we tinker with mkosi/qemu.py - https://github.com/Torxed/mkosi/commit/6f3c20802bd73f88b672cc96ef0db1e542084316 - in which case we could do: `mkosi qemu --drive=archinstall_small:25G -- -device nvme,serial=archinstall_small,drive=archinstall_small,bootindex=0 -kernel none` but it still won't boot properly.* |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| [Distribution] | ||
| Distribution=arch | ||
| # LocalMirror=file:///var/lib/localmirror | ||
|
|
||
| [Output] | ||
| Format=uki | ||
| # Format=disk | ||
|
|
||
| [Include] | ||
| Include=mkosi-vm | ||
|
|
||
| [Validation] | ||
| SecureBoot=false | ||
| SecureBootAutoEnroll=false | ||
| Sign=false | ||
| # Signing artifacts (hashsums etc) using a GPG key: | ||
| # Key=D4B58E897A929F2E | ||
| # Signing secure boot using PIV on yubikey: | ||
| # SecureBoot=true | ||
| # SecureBootKey=pkcs11: | ||
| # SecureBootCertificate=secureboot.crt | ||
|
|
||
| [Content] | ||
| Packages= | ||
| pacman | ||
| archlinux-keyring | ||
| amd-ucode | ||
| intel-ucode | ||
| # tpm2-tss | ||
| # libfido2 | ||
| # libp11-kit | ||
| WithDocs=false | ||
| RootPassword=toor | ||
| Timezone=Europe/Stockholm | ||
| Keymap=sv-latin1 | ||
| InitrdProfiles=network | ||
|
|
||
| [Config] | ||
| Profiles=archinstall | ||
|
|
||
| [Build] | ||
| Incremental=true | ||
| ToolsTree=default | ||
| ToolsTreeProfiles=devel,misc,package-manager,runtime,gui | ||
| WithNetwork=yes | ||
|
|
||
| [Runtime] | ||
| Console=gui | ||
| CPUs=4 | ||
| RAM=8G |
3 changes: 3 additions & 0 deletions
3
test_tooling/mkosi/mkosi.extra/etc/systemd/system/getty@tty1.service.d/autologin.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [Service] | ||
| ExecStart= | ||
| ExecStart=-/usr/bin/agetty --noreset --noclear --autologin root - ${TERM} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| cd archinstall-git | ||
| rm -rf dist | ||
|
|
||
| uv build --no-build-isolation --wheel | ||
| uv pip install dist/*.whl --break-system-packages --system --no-build --no-deps |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| git clone https://github.com/archlinux/archinstall.git /root/archinstall-git | ||
| (cd /root/archinstall-git && git checkout master) | ||
|
|
||
| # TODO: Set geo-mirrors statically instead | ||
| curl -s "https://archlinux.org/mirrorlist/?country=SE&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 - > /etc/pacman.d/mirrorlist | ||
|
|
||
| pacman-key --init | ||
| pacman-key --populate archlinux | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| [Content] | ||
| Packages= | ||
| acpid | ||
| intel-media-driver | ||
| linux-firmware | ||
| linux-firmware-intel | ||
| ca-certificates-mozilla | ||
| ca-certificates-utils | ||
| nano | ||
| gvfs | ||
| noto-fonts | ||
| cantarell-fonts | ||
| ttf-dejavu | ||
| polkit | ||
| bash | ||
| bzip2 | ||
| coreutils | ||
| file | ||
| filesystem | ||
| findutils | ||
| gawk | ||
| gcc-libs | ||
| gettext | ||
| glibc | ||
| grep | ||
| gzip | ||
| iproute2 | ||
| iputils | ||
| licenses | ||
| pciutils | ||
| procps-ng | ||
| psmisc | ||
| sed | ||
| tar | ||
| linux | ||
| diffutils | ||
| less | ||
| strace | ||
| util-linux | ||
| xz | ||
| pacman-contrib | ||
| gcc | ||
| git | ||
| pkgconfig | ||
| python | ||
| python-pip | ||
| python-uv | ||
| python-setuptools | ||
| python-pyparted | ||
| python-pydantic | ||
| python-textual | ||
| dosfstools | ||
| btrfs-progs | ||
| arch-install-scripts | ||
| WithDocs=false | ||
| KernelCommandLine=quiet splash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 12 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.