Skip to content

sway: Add profile#162

Merged
poettering merged 1 commit into
systemd:mainfrom
martinpitt:sway
May 22, 2026
Merged

sway: Add profile#162
poettering merged 1 commit into
systemd:mainfrom
martinpitt:sway

Conversation

@martinpitt
Copy link
Copy Markdown
Contributor

@martinpitt martinpitt commented May 20, 2026

Start with the packages. Keep the ones which exist in Debian and Fedora in the common mkosi.conf, and add some distro specifics.

Package list based on Fedora Sway desktop:
https://forge.fedoraproject.org/atomic-desktops/config/src/branch/main/packages/sway-atomic.yaml


This is a stock boot, which looks happy enough:

out

Draft for now, there are still a few things I want to do:

  • Test/fix Debian build
  • Test this on actual hardware

@martinpitt
Copy link
Copy Markdown
Contributor Author

@brauner FYI 😉

@martinpitt
Copy link
Copy Markdown
Contributor Author

@daandemeyer perhaps I can annoy you one more time? I am trying to test this on real iron, and tried three approaches:

  1. Build locally with distro packages (works), and burn → USB stick → install: fails, as systemd-sysinstall isn't in 260.1 yet (i.e. in Debian)
  2. Build locally with building systemd git main, to get installer: Sounds attractive, but I added a mkosi/mkosi.local.conf with Distribution=debian\nRelease=testing to systemd.git, but mkosi -f sandbox -- meson setup build && mkosi -f sandbox -- meson compile -C build still builds for Fedora rawhide. I think the conf file path is right (as it fails when I put an invalid option in there), but this is a bit underdocumented.
  3. Build debian on Fedora host: doesn't work, as it's missing keyring (easy to add) and apt (meh, hard to get on Fedora)
  4. Cross-grade from my fedora rawhide install: I built the Debian image on my old laptop, then scp'ed mkosi.output/ and mkosi.version over to the new one, and tried mkosi sysupdate -- update. It claims to work (it installs something), but it doesn't generate a boot entry.

If you happen to have an idea which approach is right/recommended/easiest to fix, I appreciate -- otherwise please don't waste time on it, I'll dig into it myself. In the worst case, I wait until the next systemd release and then reinstall the laptop.

@daandemeyer
Copy link
Copy Markdown
Collaborator

@daandemeyer perhaps I can annoy you one more time? I am trying to test this on real iron, and tried three approaches:

1. Build locally with distro packages (works), and burn → USB stick → install: fails, as `systemd-sysinstall` isn't in 260.1 yet (i.e. in Debian)

2. Build locally with building systemd git main, to get installer: Sounds attractive, but I added a `mkosi/mkosi.local.conf` with `Distribution=debian\nRelease=testing` to systemd.git, but `mkosi -f sandbox -- meson setup build && mkosi -f sandbox -- meson compile -C build` still builds for Fedora rawhide. I  think the conf file path is right (as it fails when I put an invalid option in there), but this is a bit underdocumented.

3. Build debian on Fedora host: doesn't work, as it's missing keyring (easy to add) and `apt` (meh, hard to get on Fedora)

4. Cross-grade from my fedora rawhide install: I built the Debian image on my old laptop, then scp'ed `mkosi.output/` and `mkosi.version` over to the new one, and tried `mkosi sysupdate -- update`. It _claims_ to work (it installs something), but it doesn't generate a boot entry.

If you happen to have an idea which approach is right/recommended/easiest to fix, I appreciate -- otherwise please don't waste time on it, I'll dig into it myself. In the worst case, I wait until the next systemd release and then reinstall the laptop.

So you're running into the peculiarity that there's usually 2 images involved these days when using mkosi. One is the target image which you're building. The other is the tools image which contains all the tools needed to build the target image. With your second step, you're configuring the target image to be debian, but the tools image is still fedora. mkosi box runs inside the tool image, hence you build systemd inside the tools image for Fedora. Now this isn't necessarily a problem, in fact it's probably what you want. When you run meson compile -C build, it should build the debian packages still because they're built as part of the target image which should be debian with the configuration you posted. Do you see it invoking rpmbuild? That would be a bug.

@martinpitt
Copy link
Copy Markdown
Contributor Author

2. Build locally with building systemd git main, to get installer: Sounds attractive, but I added a `mkosi/mkosi.local.conf` with `Distribution=debian\nRelease=testing` to systemd.git, but `mkosi -f sandbox -- meson setup build && mkosi -f sandbox -- meson compile -C build` still builds for Fedora rawhide. I  think the conf file path is right (as it fails when I put an invalid option in there), but this is a bit underdocumented.

@daandemeyer you were right, that does work. Indeed I ^Ced it too early when I saw it downloading Fedora packages, but that indeed was just the local tools image. I get build/mkosi.builddir/debian~testing~x86-64/ alright, and it works (including sysinstall from USB).

3. Build debian on Fedora host: doesn't work, as it's missing keyring (easy to add) and `apt` (meh, hard to get on Fedora)

Easy after all, systemd/mkosi#4321 (/me puts up "Beware! Beginnner!" sign 🪧 )

4. Cross-grade from my fedora rawhide install: I built the Debian image on my old laptop, then scp'ed `mkosi.output/` and `mkosi.version` over to the new one, and tried `mkosi sysupdate -- update`. It _claims_ to work (it installs something), but it doesn't generate a boot entry.

That I still have trouble with. In fact all sysupdate invocations on the real laptop are a no-op. It works, but it keeps booting into the originally installed OS. That's my next piece of homework.

@martinpitt martinpitt marked this pull request as ready for review May 21, 2026 08:42
@martinpitt
Copy link
Copy Markdown
Contributor Author

This is running on my laptop now, I tested both Debian (needs more polish, but works in general) and Fedora (works quite well) variants. I'm sure there'll be some more follow-ups, but this is ready for a first review. FTR: I'm happy to maintain this, as it's my primary workstation.

Start with the packages. Keep the ones which exist in Debian and Fedora
in the common mkosi.conf, and add some distro specifics.

Package list based on Fedora Sway desktop:
https://forge.fedoraproject.org/atomic-desktops/config/src/branch/main/packages/sway-atomic.yaml
@poettering
Copy link
Copy Markdown
Member

looks ok. given it's a separate profile seems riskless. will merge.

@poettering poettering merged commit bfec849 into systemd:main May 22, 2026
@martinpitt martinpitt deleted the sway branch May 26, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants