Skip to content

build_library: Fix path handling in QEMU launcher script#2808

Merged
chewi merged 1 commit intomainfrom
chewi/qemu-script-paths
Apr 8, 2025
Merged

build_library: Fix path handling in QEMU launcher script#2808
chewi merged 1 commit intomainfrom
chewi/qemu-script-paths

Conversation

@chewi
Copy link
Copy Markdown
Contributor

@chewi chewi commented Apr 7, 2025

build_library: Fix path handling in QEMU launcher script

I couldn't take it anymore! The launcher script could not handle paths outside the script's own directory, and it was driving me crazy. Now only the default values are relative to the script's directory. Given paths are relative to the current directory and absolute paths work as you would expect.

How to use

You don't need to grab any new images, just the .sh files from bincache.

Testing done

I ran CI but without the tests because they don't use this script. I grabbed the new .sh files, compared them against the old ones, and tried them out with different paths.

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

I couldn't take it anymore! The launcher script could not handle paths
outside the script's own directory, and it was driving me crazy. Now
only the default values are relative to the script's directory. Given
paths are relative to the current directory and absolute paths work as
you would expect.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
@chewi chewi requested a review from a team April 7, 2025 09:14
@chewi chewi self-assigned this Apr 7, 2025
Copy link
Copy Markdown
Member

@krnowak krnowak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the SCRIPT_DIR variable is now unused, so maybe you could drop it.

@chewi
Copy link
Copy Markdown
Contributor Author

chewi commented Apr 8, 2025

Looks like the SCRIPT_DIR variable is now unused, so maybe you could drop it.

No, it is still used, just in a different way now.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2025

Build action triggered: https://github.com/flatcar/scripts/actions/runs/14333886296

@krnowak
Copy link
Copy Markdown
Member

krnowak commented Apr 8, 2025

Looks like the SCRIPT_DIR variable is now unused, so maybe you could drop it.

No, it is still used, just in a different way now.

Oh, ok. I just did a search for SCRIPT_DIR in the script and the only occurence was in the third line. But maybe the script is being too clever somewhere. Anyway, looks good.

@chewi chewi merged commit 8bc40c5 into main Apr 8, 2025
1 of 3 checks passed
@chewi chewi deleted the chewi/qemu-script-paths branch April 8, 2025 12:50
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