Commit graph

321 commits

Author SHA1 Message Date
Simon de Vlieger
5e476848de deps: fix images 0.168
A replacement directive was still present in the `go.mod`, leading to
not installing 0.168 but a variation on 0.167.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-08-01 14:48:31 +00:00
schutzbot
bec0e4d1b0 Post release version bump
[skip ci]
2025-07-31 11:24:48 +00:00
Simon de Vlieger
4583fd5960 deps: update images to 0.168
Updates the `images` dependency to 0.168.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-31 10:24:51 +00:00
Michael Vogt
a454b2e96c README.md: document --ignore-warnings
This commit adds some documentation to the `--ignore-warnings`
flag that was added in PR#250.
2025-07-30 10:01:36 +00:00
Simon de Vlieger
1d362f9f20 spec: fix up version number
This got out of sync, somehow?

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-28 10:46:30 +00:00
Simon de Vlieger
26f8059cb4 ci/packit: remove EPEL release automation
With `image-builder` having been released into CentOS/RHEL we should no
longer ship updates for EPEL.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-28 06:40:53 +00:00
Lukas Zapletal
2828ee63cf ci: upgrade golangci-lint to 2.3.0
Upgrades the configuration file from V1 to V2 format which was pretty
straightforward. The vendor/ directory no longer needs to be excluded as
it is a default now in 2.x.

Updates the pre-commit configuration to the latest and greatest version.
2025-07-25 09:10:11 +00:00
Simon de Vlieger
27ad7cb6f0 chore: set specfile version at build
In [1] I changed the name of the variable used to deduce the version
built. I forgot to update this in the specfile. Let's correct that.

[1]: https://github.com/osbuild/image-builder-cli/pull/230

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-22 15:03:30 +00:00
Simon de Vlieger
6022e76122 deps: bump images to 0.164
We have an issue where `%post` scripts are not being executed due to our
incorrect handling of Anaconda modules [1].

[1]: https://github.com/osbuild/bootc-image-builder/issues/968

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-21 09:24:06 +00:00
Michael Vogt
e8b52d7a31 main: add --ignore-warnings cmdline option
This commit adds a new `--ignore-warnings` that can be used to
make warnings not an error when `ibcli` runs.
2025-07-17 06:45:30 +00:00
Michael Vogt
ad20533d87 testutil: rename Calls() -> CallArgsList() for clarity
The current MockCmd.Calls() is a bit ambiguous so follow the example
of pytest here and rename to the cleaner CallArgsList() that
captures more closely what the helper is actually doing.
2025-07-17 06:44:29 +00:00
Michael Vogt
bb45b89d84 testutil: remove unnecessary testutil.MockCmd.Restore()
While looking over the code I noticed that the `Restore()` helper
is not needed (and arguably wrong as it does not reset PATH).
We already use `t.TempDir()` and `t.Setenv()` as part of the
command setup so manually cleanup is not neccessary (and is today
even incomplete). So YAGNI and we can remove Restore().
2025-07-17 06:44:29 +00:00
Simon de Vlieger
9717980d3f deps: bump minimum osbuild
images 0.162.0 requires >= 156 for osbuild.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-16 08:07:57 +00:00
Simon de Vlieger
ce4eae461f deps: update images to 0.162.0
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-16 08:07:57 +00:00
Simon de Vlieger
7b535fdff5 test: smoke test --version
Only verify it returns the correct structure with (some) values in it.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-15 08:50:19 +00:00
Simon de Vlieger
3021afb9f7 main: --version includes git commit
Include the commit of the build (if available in the build environment),
also include the version of `images` in the build; if available.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-15 08:50:19 +00:00
Ondřej Budai
f52041ab67 packit: enable RHEL 10 builds
COPR now supports them, so let's add them! 🚀
2025-07-14 15:28:03 +00:00
schutzbot
1fadf26d0d Post release version bump
[skip ci]
2025-07-09 08:22:39 +00:00
Tomáš Hozza
57e8468390 Test/main: don't rely on EOL RHEL 8.9 in tests
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-07-09 06:52:47 +00:00
Tomáš Hozza
8d0d7106c5 Always set rhsm.Facts when generating manifests
Make sure that images built by ibcli have correct rhsm.Facts set for
distributions that set it (this is handled by the distro definition, not
by the caller of the manifest generator).

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-07-09 06:52:47 +00:00
Tomáš Hozza
0bc6ce4db3 go.mod: update osbuild/images to v0.156.0
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-07-09 06:52:47 +00:00
Simon de Vlieger
3cabb30ff8 readme: mention mount for container
People often forget to mount, we're a bit clearer about this in
`bootc-image-builder`; let's make it clear here as well.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-27 19:50:15 +00:00
Florian Schüller
199f8f3788 doc/10-faq.md: add image types documentation 2025-06-26 13:10:36 +00:00
Florian Schüller
b84e7b8b03 doc/01-usage.md: avoid multiple h1 in one document
Due to https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements#avoid_using_multiple_h1_elements_on_one_page
metioned in #234 we'll just use a single h1 per document.
2025-06-26 13:06:49 +00:00
Lukas Zapletal
10dde06c33 docs: subscription basic info 2025-06-25 09:02:35 +00:00
schutzbot
b377421793 Post release version bump
[skip ci]
2025-06-25 08:23:15 +00:00
Tomáš Hozza
49c87afb33 cmd/describe: fix describing of '*-simplified-installer' images
The  '*-simplified-installer' images require the installation device
to be specified as a BP customization to serialize their Manifest.
The 'describe' command was not setting those, which resulted in errors
when describing such image types.

Set a dummy installation device BP customization for image types with
their name ending with '-simplified-installer', to enable describing
of such images.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-06-23 18:31:27 +00:00
Tomáš Hozza
44ef682ca1 cmd/describe: fix describing of OSTree images
OSTree images require additional arguments to serialize their Manifest.
The 'describe' command was not setting those, which resulted in errors
when describing such image types.

Set the required minimum OSTree arguments to dummy values to enable
describing of such images.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-06-23 18:31:27 +00:00
Tomáš Hozza
8040fee0d4 cmd/describe: test that all images can be described
Add an unit test to verify that the `describe` command can describe all
image types. I've recently ran into issue when describing ostree-based
and `*-simplified-installer` image types.

Add new dependecy for working with YAML - sigs.k8s.io/yaml.

This is what we will probably converge to, since our currently used YAML
library is unmaintained.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-06-23 18:31:27 +00:00
schutzbot
bb7cab6ac7 Post release version bump
[skip ci]
2025-06-22 07:55:56 +00:00
Simon de Vlieger
24d9b0f7cc chore: bump osbuild in spec
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-20 16:36:05 +00:00
Simon de Vlieger
42d41c7d07 chore: bump images
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-20 16:36:05 +00:00
Tomáš Hozza
0013049d26 GHA: add the common-stale-action
Add the common-stale-action for marking issues and PRs as stale. This is
consistent with all osbuild group projects.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-06-18 15:41:30 +02:00
schutzbot
cef337ab7a Post release version bump
[skip ci]
2025-06-11 08:22:15 +00:00
Michael Vogt
dd13153b8b upload: try to auto-detect the upload arch from the filename
This is another convenience feature for the `image-builder upload`
command: when we do not know the target architecture try to
guess it from the filename. This is not perfect but it will
help a lot of users and should be fine until the day we go
and inspect the image.
2025-06-07 12:29:18 +00:00
Michael Vogt
03613a3fb3 upload: warn the user if no --arch flag is passed on upload
This mitigates the issue that a `image-builder upload` command
currently does not know the target architecture of the image
it uploads.
2025-06-07 12:29:18 +00:00
Michael Vogt
2c017fc630 upload: default to boot-mode uefi-preferred when unset
When using `image-builder upload --to=aws` we do not know
the bootmode. Ideally we would introspect the image for
the boot mode but that is not trivial right now.

So for now just default to platform.BOOT_HYBRID which
translated to `uefi-preferred` in the AWS API calls
which should offer the widest compatbility and should
fix the issue that aarch64 does not boot currently
when uploaded via ibcli.
2025-06-07 12:29:18 +00:00
Michael Vogt
62bf88cc62 bib: pass the boot-mode to AWS when doing combined build/upload
This commit passes the boot mode to AWS when doing a combined
build/upload. Here we know what boot mode to use and we can
pass it easily.

This also adds a "XXX" to think about how to handle what to
do when uploading a pre-existing image where we do not know
the boot mode.
2025-06-07 12:29:18 +00:00
Michael Vogt
2996bbc0d1 image-builder: fix cross-arch uploading
This commit fixes the cross-arch uploading in the most simple
case by reading the `--arch` when `image-builder build --upload`
is used. Note that this is not a complete fix as it will not
take boot mode into account nor will it (by default) DTRT when
`image-builder upload` is used on a previously build images
for a different architecture.

Thanks to `FrostyX` for reporting the issue.
2025-06-07 12:29:18 +00:00
Simon de Vlieger
f4f8b557a5 packit: rename epel9-next
We've had issues proposing downstream for epel9-next due to branch name
failures. Let's see if this resolves that.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-05 07:45:58 +00:00
schutzbot
06930c3af1 Post release version bump
[skip ci]
2025-05-30 14:01:37 +00:00
Simon de Vlieger
26bf19373a test/main: update types used
Image types were renamed [1] in images for the Fedora distribution.
While aliases were left behind for compatibility those are not used
when directly requesting manifests it seems.

Let's rename them to their canonical names.

[1]: 65194a4bf

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-05-28 08:19:05 +00:00
Simon de Vlieger
33f7822c28 test/main: update registrations test
There was previously a bug in the Insights client configuration stage
which omitted a key [1]. A testcase hardcoded this invalid format. Let's
update it to the expected value.

[1]: 389b629ce2

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-05-28 08:19:05 +00:00
Simon de Vlieger
89ce20101b test/main: no more fedora-40
Fedora 40 was removed from `images` as it is EOL, we can no longer use
it in our test cases. Bump to Fedora 42.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-05-28 08:19:05 +00:00
Simon de Vlieger
92095eac06 deps: update
Update dependencies to get the latest images into `image-builder`; this
includes Alma Linux, a Vagrant image type for Fedora, and WSL
improvements for Fedora.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-05-28 08:19:05 +00:00
schutzbot
de4879d4e6 Post release version bump
[skip ci]
2025-05-14 08:21:06 +00:00
Lukas Zapletal
392a04fd12 refactor: use standard logger instead of logrus 2025-05-12 18:21:37 +00:00
schutzbot
48cd004bed Post release version bump
[skip ci]
2025-04-30 08:21:01 +00:00
Michael Vogt
7af1a8d8b3 README.md: add a section about adding "registrations"
This is a small followup for
https://github.com/osbuild/image-builder-cli/pull/201
to include information about how to use the new
`--registrations` option.
2025-04-28 09:51:43 +00:00
Lukas Zapletal
4c9f2b4ba4 manifest: use Sync instead of Close 2025-04-24 06:18:10 +00:00