Skip to content

Improve (speedup and fixup) user local build experience - #873

Draft
vjr wants to merge 54 commits into
mainfrom
vishal/avoid-sudo
Draft

vjr wants to merge 54 commits into
mainfrom
vishal/avoid-sudo

Conversation

@vjr

@vjr vjr commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Fixes #895

This branch is mainly to speed up user local builds with some fixups while we're here.

The CI workflows are unaffected (especially avoid consuming time/space copying the flatpak repo cache in and out) and continue to work as before.

CHANGES:

  • Rework sudo usage (do single enclosing invocations instead of multiple separate ones) to avoid it timing out and asking for password in the middle of a user's local build.

    Rationale is so it does not pause if they walk away for their favourite beverage while waiting only to return and be unpleasantly surprised.

    The CI worked previously because github runners are passwordless sudo.

  • Rework the checksum-repo and checksum-ext Justfile recipes to fix CI-only failures caused apparently by just generating temp bash script snippets in (now root owned) /run/user/1001/just/just-xxxx due to the (now removed) bash shebang lines.

  • Preserve (using rsync) flatpak cache from mkosi chroot across local (non-CI) rebuilds for speedups.

  • Cleanup thoroughly when the user wants to just clean.

  • Mark some just recipes/targets as [private] so they don't show up for users in just --choose but still still work if explicitly triggered by users/CI.

  • Add fzf to the README.md runtime dependency list - it's currently usually not installed by default in distros like Ubuntu.

Now with this PR, for users building locally multiple runs of the available Justfile targets/recipes like just clean, just do-daily and/or just checksum-repo, just checksum-ext, well, they "just work" :-)

NOTE:

Initial clean local builds take about 15 minutes for me with or without changes in this PR. With the changes in this PR my subsequent incremental local build times dropped down to under 3 minutes.

Tested the ISOs which were locally built, the CI built proposed ISOs and the daily ISO from the public website in gnome boxes (v50 though) and bare metal laptop, installation seemed to work on both VM/laptop for all ISOs - would not boot (post install) in VM but booted fine in hardware. Lots of things seem broken in the desktop (initial-setup and user login works) but these issues already exist in main builds (aka the public daily ISO) and are not due to the changes in this PR.

@vjr vjr self-assigned this Sep 23, 2026
@jumpyvi

jumpyvi commented Sep 23, 2026

Copy link
Copy Markdown
Member

Did you try it?

If some critical files aren't owned by id 0 (like all the sudoers files, lightdm... etc) you will get a bunch of errors when trying to login or run sudo or pretty much do anything.

If you can show it working, I will approve

@jumpyvi

jumpyvi commented Sep 23, 2026

Copy link
Copy Markdown
Member

It might work with podman run --user 0:0 .... it might also be the default, not sure?

@vjr

vjr commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

Did you try it?

I only tried (re)building it locally, will try shortly on bare metal, with the bash installer and maybe also the gui installer, and report back.

Is there some way to check for silent issues, like something wrong that might not be evident with normal/brief usage?

Thanks!

@vjr

vjr commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

It might work with podman run --user 0:0 .... it might also be the default, not sure?

Yup I only removed the sudo part and the ISO (re)builds fine so what you showed must be the default... Will this PR work for the CI builds? I'll test shortly on my spare laptop.

@vjr
vjr marked this pull request as draft September 23, 2026 15:12
@nikodunk

Copy link
Copy Markdown
Collaborator

https://github.com/elementary/os/actions/runs/35885005835

@vjr vjr changed the title Avoid using sudo Improvements for users' local builds Sep 23, 2026
@vjr vjr changed the title Improvements for users' local builds Improve user local build experience Sep 25, 2026
@github-actions

Copy link
Copy Markdown

Installer builds for fdb98d4

Do not use these installers for production systems. They are intended for testing purposes only. They will update to the latest PR build, which will break your install eventually.

Arch ISO Checksum
amd64 elementaryos-9.0-proposed-x86-64.20260930125400.iso sha256
arm64 elementaryos-9.0-proposed-arm64.20260930125359.iso sha256

@vjr

vjr commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

It seems fine, but I cannot built it locally, even after a clean, and removing the temporary mkosi files

OSError: [Errno 18] Invalid cross-device link: '/workspace/mkosi-workspace-yzwuz_3h/staging/mkosi.tools' -> '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/work/mkosi.tools'

During handling of the above exception, another exception occurred:

hi @jumpyvi could you tell me if this branch currently fixes the error 18 for you? if not, can you share what distro (and version) you are using to build locally? could it be some sudo/umask/podman configuration issue? or do i really need to pass full user env using sudo -E ... instead of only sudo HOME=$HOME ...? thank you!

@github-actions

Copy link
Copy Markdown

Installer builds for 4a96ffd

Do not use these installers for production systems. They are intended for testing purposes only. They will update to the latest PR build, which will break your install eventually.

Arch ISO Checksum
amd64 elementaryos-9.0-proposed-x86-64.20260930132940.iso sha256
arm64 elementaryos-9.0-proposed-arm64.20260930132946.iso sha256

* Preserve flatpak cache from mkosi chroot across rebuilds

* Replace CP with RSYNC for "delta"-based m0ar speedup

* Don't rsync flatpak repo cache in CI runs
@vjr

vjr commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

Went ahead and combined #898 into this PR.

@github-actions

Copy link
Copy Markdown

Installer builds for fa8db9b

Do not use these installers for production systems. They are intended for testing purposes only. They will update to the latest PR build, which will break your install eventually.

Arch ISO Checksum
amd64 elementaryos-9.0-proposed-x86-64.20260930140823.iso sha256
arm64 elementaryos-9.0-proposed-arm64.20260930140843.iso sha256

@vjr
vjr marked this pull request as draft September 30, 2026 15:12
@vjr vjr changed the title Improve user local build experience Improve (speedup and fixup) user local build experience Sep 30, 2026
@github-actions

Copy link
Copy Markdown

Installer builds for 988d7f5

Do not use these installers for production systems. They are intended for testing purposes only. They will update to the latest PR build, which will break your install eventually.

Arch ISO Checksum
amd64 elementaryos-9.0-proposed-x86-64.20260930171101.iso sha256
arm64 elementaryos-9.0-proposed-arm64.20260930171103.iso sha256

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.

Preserve flatpak repo cache across (local user) build reruns to speed them up

3 participants