Skip to content

ibcli: add new --output-name flag and predictable default names#158

Merged
supakeen merged 4 commits intoosbuild:mainfrom
mvo5:output-filename-after-the-fact
Mar 14, 2025
Merged

ibcli: add new --output-name flag and predictable default names#158
supakeen merged 4 commits intoosbuild:mainfrom
mvo5:output-filename-after-the-fact

Conversation

@mvo5
Copy link
Contributor

@mvo5 mvo5 commented Mar 13, 2025

This commit adds a new --output-name flag that will rename the resulting artifact after it was build. All auxillary artifacts like buildlog, sbom etc are also name based on the same basename.

One open question is if this should be "--output-filename" or "--basename".

See also osbuild/images#1039 for how
this could be simpler (especially the fake osbuild).

As a side-effect this will now produce more predictable names by default as well:

fedora-42-minimal-raw-zst-x86_64/fedora-42-minimal-raw-zst-x86_64.raw.zst

@mvo5 mvo5 force-pushed the output-filename-after-the-fact branch 2 times, most recently from e252a54 to b08bb7e Compare March 13, 2025 18:04
@mvo5 mvo5 changed the title ibcli: add new --output-filename flag ibcli: add new --output-name flag Mar 13, 2025
@mvo5 mvo5 force-pushed the output-filename-after-the-fact branch 3 times, most recently from 9eb14ae to 3b2fe54 Compare March 13, 2025 19:26
@mvo5 mvo5 marked this pull request as ready for review March 13, 2025 19:31
@mvo5 mvo5 force-pushed the output-filename-after-the-fact branch from 6bac826 to 91554e1 Compare March 13, 2025 20:26
@mvo5 mvo5 changed the title ibcli: add new --output-name flag ibcli: add new --output-name flag and predictable output names Mar 14, 2025
@mvo5 mvo5 changed the title ibcli: add new --output-name flag and predictable output names ibcli: add new --output-name flag and predictable default names Mar 14, 2025
mvo5 added 3 commits March 14, 2025 10:01
This commit adds a new `--output-name` flag that will rename
the resulting artifact after it was build. All auxillary artifacts
like buildlog, sbom etc are also name based on the same basename.

See also osbuild/images#1039 for how
this could be simpler (especially the fake osbuild).

Closes: osbuild#43
A tiny helper to run a specific function inside a different dir,
useful in our testsuite.
@mvo5 mvo5 force-pushed the output-filename-after-the-fact branch from 91554e1 to 6e7156d Compare March 14, 2025 09:02
@supakeen supakeen self-requested a review March 14, 2025 11:17
Copy link
Member

@supakeen supakeen left a comment

Choose a reason for hiding this comment

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

I ❤️ this, thank you. I'm perfectly fine with --output-name as that name makes sense to me, it only gets murky when combined with --output-dir, but not much.


For other readers, this would hugely simplify renaming and other bits and bobs I currently would need to do for koji integration.

Copy link
Member

@supakeen supakeen left a comment

Choose a reason for hiding this comment

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

Found a tiny bug.

A small test for a basename that includes dotted parts (as used by for
example Fedora's buildsystem).

Also some code changes to make this test pass, it seems that SBOM base
was determined based on some other filename which is now no longer
relevant?

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
Copy link
Member

@supakeen supakeen left a comment

Choose a reason for hiding this comment

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

Fixed a tiny bug. All seems good now (but weird to approve a PR with my own commits).

@achilleas-k achilleas-k self-requested a review March 14, 2025 12:26
@supakeen supakeen added this pull request to the merge queue Mar 14, 2025
Merged via the queue into osbuild:main with commit e7b9fbf Mar 14, 2025
32 checks passed
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