Skip to content

Various SDK fixes#3899

Open
chewi wants to merge 4 commits intomainfrom
chewi/sdk-fixes
Open

Various SDK fixes#3899
chewi wants to merge 4 commits intomainfrom
chewi/sdk-fixes

Conversation

@chewi
Copy link
Copy Markdown
Contributor

@chewi chewi commented Apr 9, 2026

Various SDK fixes

  • Fixes writing to /dev/stdout and /dev/stderr. I noticed set_version --file /dev/stdout was broken.
  • Fixes writing /etc/os-release with bad quotes following a Jenkins revert. This will also be fixed in flatcar/jenkins-os#431, but I wanted to make this more robust anyway.
  • Speeds up build_image. It doesn't seem to make much difference in CI, but it definitely makes a difference locally.
  • Drops an unused function.

How to use

The most important thing to test is ./run_sdk_container.

Testing done

I've used these changes locally for a few days. A Jenkins run passed, although we cannot currently run the arm64 tests.

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update) -- N/A
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

chewi added 4 commits April 8, 2026 11:59
Entering the SDK via `su` breaks stdout/stderr permissions because the
underlying /dev/pts/N device is still owned by root. `sudo` doesn't have
this problem. Neither does `runuser`, which might be preferable, but the
SDK doesn't have that.

This was previously `sudo su`, so changing this to `sudo sudo` might
seem logical, but I think the original `sudo` was only there to prevent
`su` from asking for a password. That shouldn't happen with a single
`sudo` call.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This is used to read version.txt, which was written with single quotes
when Jenkins reverted a build. These quotes were then erroneously
written into /etc/os-release, which caused havoc. This has already been
addressed in jenkins-os, but let's make this code more robust anyway.

Fix this by grepping out the lines we need (in one go) and actually
parsing them with Bash. Less safe, but we already parse version.txt with
Bash in other places.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
I see a 25% improvement. `man make.conf` says that this can potentially
result in build failures, but it seems unlikely when merely installing
binary packages. I haven't had any issues after several local builds.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
@chewi chewi self-assigned this Apr 9, 2026
@chewi chewi requested a review from a team as a code owner April 9, 2026 09:07
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.

1 participant