Skip to content
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

Add APK and postmarketOS support #3236

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

septatrix
Copy link
Contributor

@septatrix septatrix commented Nov 27, 2024

This PR adds support for APK and postmarketOS/Alpine (postmarketOS works like a layer atop of Alpine). It is not yet ready to be merged as it contains a few hacks to get stuff working properly. Regardless, this already works and can be used as a common playground to avoid multiple people working on this independently and duplicating the work.

Some stuff needs to be fixed in mkosi, some in postmarketOS, and some in Alpine. And some stuff needs discussion. Current TODOs/problems:

  • Populate all the vm/initrd/tools presets
  • mkosi assumes that vmlinuz files have their version as a suffic. This is not true for Alpine. file is able to extract the version though - maybe this is something which should be supported by bootctl: bootctl kernel-inspect does not determine version from vmlinuz kernels systemd#35370
  • check support for other arches
  • add support for mirrors, local repo, etc.
  • check that APK cache properly works
  • set up keyring for apk (but --keys-dir is always relative to root destination...)
  • mkosi always assumes that arches which support SMBIOS also have kernels which enable CONFIG_DMI_SYSFS. Alpine does not
  • usr-merge is currently hacked in, should be dropped once this is merged upstream

Pinging @calebccff as this is based on his prototype

@calebccff
Copy link

thanks for picking this up and working on it!

usr-merge is currently hacked in, should be dropped once this is merged upstream

worth noting that while this is fine for a basic poc, it's not very practical yet (e.g. try installing tar in that rootfs and you'll run into trouble) -- this is being worked on upstream though and should be resolved after the next stable releases comes out next month.

Alpine tracking issue is https://gitlab.alpinelinux.org/alpine/aports/-/issues/16514

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants