Commit graph

3593 commits

Author SHA1 Message Date
Brian C. Lane
3f91723402 Tests/tox: Fedora 43 is now using python 3.14
Add testing on pythong 3.14 and keep testing on python 3.13 for the
current stable Fedora version (42 at this time).

Use osbuild-ci:latest-202506112350 for tests.yml
2025-06-17 00:21:21 -07:00
Simon de Vlieger
bc99513c0a stages/test: kickstart different messages
On Python 3.6 we're getting a *different* error message from other
versions in CI. Let's accept both versions.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-16 09:31:49 -07:00
Simon de Vlieger
3bbacb5703 solver/dnf5: switch base exception type
libdnf5 changed error types [1], [2], [3] and they no longer inherit from
`RuntimeError`; instead catch `Exception` which is the new common base
type.

This fixes issues in our CI.

[1]: https://github.com/rpm-software-management/dnf5/pull/2124
[2]: https://github.com/rpm-software-management/dnf5/pull/2118#issuecomment-2876601471
[3]: https://bugzilla.redhat.com/show_bug.cgi?id=2365689

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-16 09:23:25 -07:00
Simon de Vlieger
cde6e1e114 source/containers-storage: error message
An error message has changed in skopeo [1] (or one of it's underlying
libraries). This new version is now in our CI so let's fix our tests.

[1]: f423f01d1b

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-16 09:22:28 -07:00
schutzbot
83b1b48108 schutzfile: Update snapshots to 20250605 2025-06-16 13:39:30 +02:00
Simon de Vlieger
daed32e462 compat: ast.Str -> ast.Constant
Python 3.14 removed the long deprecated `ast.Str` [1]. Rewrite to use
`ast.Constant` conditionally for any version that isn't 3.6.

Since 3.6 is our lowest supported version we don't check for below.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-16 12:26:15 +02:00
Karolina Surma
010ceb6ba5 Avoid the multiprocessing forkserver method
The default method has changed in Python 3.14:
https://docs.python.org/dev/whatsnew/3.14.html#whatsnew314-multiprocessing-start-method
2025-06-16 12:06:34 +02:00
Karolina Surma
df2e83d417 Always assert the correct architecture in test_curl_user_agent 2025-06-13 09:54:28 -07:00
Achilleas Koutsou
0968ee8d81 stages/grub2: add compat_version for fixed behaviour
For the terminal_input, terminal_output, and serial variables in the
GRUB_CFG_TEMPLATE, the keys were not set when those variables were not
defined in the options.  This caused the template variables to show up
in the final file itself, which could break the config.  For example,
the following line was being generated for one of our images:

    serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1${terminal_input}${terminal_output}

Setting the keys to an empty string when they're not defined solves the
issue.

Since this is a stage behaviour change, the new behaviour is toggled by
an option that maintains backwards compatibility when not set.
This introduces a new convention of adding a `compat_version` number to
the stage options to control the behaviour.  The value defaults to 1,
which is the old (broken) behaviour.  Manifest generators should always
set it to 2 to get the correct behaviour.
2025-06-13 14:14:57 +02:00
Miro Hrončok
de26d79fee spec: Don't use tomli on Fedora, fix comment 2025-06-12 16:38:55 +02:00
Simon de Vlieger
42281231b0 stages/containers: don't validate keys
In Python 3.14 configparser started validating keys. We use hacky bits
to write duplicate keys which means we have delimiters in our keys which
is now no longer allowed.

Let's explicitly turn off key validation for now as suggested by
mhroncok in [1].

[1]: https://github.com/osbuild/osbuild/issues/2109#issuecomment-2964585958

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-12 15:31:34 +02:00
Simon de Vlieger
44cb7934db stages/systemd: don't validate keys
In Python 3.14 configparser started validating keys. We use hacky bits
to write duplicate keys which means we have delimiters in our keys which
is now no longer allowed.

Let's explicitly turn off key validation for now as suggested by
mhroncok in [1].

[1]: https://github.com/osbuild/osbuild/issues/2109#issuecomment-2964585958

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-12 15:31:34 +02:00
schutzbot
c3ea64e19e Schutzfile: Update images dependency ref to latest 2025-06-12 15:23:25 +02:00
Brian C. Lane
a828ef95d6 stages/erofs: Add exclude_paths support
Add the ability to exclude files and directories from the erofs
image. This uses the mkfs.erofs --exclude-regex feature, so simple
matches or regexes can be used.
2025-06-11 20:22:23 +02:00
Brian C. Lane
86c89a2421 stages/squashfs: Add exclude_paths support
Add the ability to exclude files and directories from the squashfs
image. This uses the mksquashfs -regex -e FILES... feature, so simple
matches or regexes can be used.

This also adds a new test for squashfs, based on the existing test for
erofs.
2025-06-11 20:22:23 +02:00
schutzbot
387806a8c3 Schutzfile: Update images dependency ref to latest 2025-06-11 10:28:45 +02:00
schutzbot
a6c21533c6 schutzfile: Update snapshots to 20250601 2025-06-04 13:03:06 +02:00
schutzbot
06d6772dca Post release version bump
[skip ci]
2025-06-04 08:35:40 +00:00
Michael Vogt
d8f38568c0 sources: add tiny unit test for inline source fechting
This commit adds a small unit test that the inline source
works as expected by creating some test_data and then
checking that it ends up in the cache.

Note that this is also already tested in the tests in
osbuild/test/run/test_sources.py but there its a lot more
indirect and in the spirit of tests-as-documentation having
an explicit test here seems useful (its also quicker to
run and easier to discover).

Small followup for https://github.com/osbuild/osbuild/pull/2090
where this was discussed originally.
2025-06-03 20:28:31 +02:00
Simon de Vlieger
a464815ea8 stages/tar: allow chosen compression
The `org.osbuild.tar` stage only supports auto compression which is
based on the filename. For several (newer) artifacts such as Vagrant
(`.box`) and WSL (`.wsl`) we want to explicitly give the compression
algorithm.

I've chosen a (few) commonly used compression algorithms. If others are
needed they are one-line followups away.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-03 18:18:23 +02:00
Simon de Vlieger
b5e4775b24 test: simplify git clone command
In some (ununderstood) cases the combination of `--no-single-branch` and
`--depth=1` leads to the revision we want to check out not being
available.

Achilleas suggested to change the command to this instead.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-02 16:00:25 +02:00
schutzbot
87f7b62316 Schutzfile: Update images dependency ref to latest 2025-06-02 16:00:09 +02:00
schutzbot
0cc6e5cf70 Post release version bump
[skip ci]
2025-05-21 08:35:09 +00:00
Tomáš Hozza
f30174d9ba Test/stages/rpm: add compatibility with RPM 6.0
RPM 6.0 (landed in F43, current rawhide), no longer uses short key ID
for the 'gpg-pubkey' pseudo-package, but to prevent any collision, it
uses full key ID.

This means that we can't consistently just compare the pipeline rpm
stage metadata from the test data with what we get from building the
test manifest. The reason is that we need to keep running the unit test
in upstream and downstream CI pipelines for OSes, which may ship RPM
6.0, but also older RPM version.

Extend the test case to do a special case check for any 'gpg-pubkey'
package in the metadata if the package version length differs between
the test data and data got from building the manifest.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-05-20 09:33:41 +02:00
schutzbot
e7b0705c1d Schutzfile: Update images dependency ref to latest 2025-05-19 17:59:06 +02:00
Achilleas Koutsou
3446b98adf schutbot: update terraform ref
Adds Fedora 42 AWS runners
2025-05-16 16:56:15 +02:00
Achilleas Koutsou
e5802d4eb6 github: drop Fedora 40, add Fedora 42 2025-05-16 16:56:15 +02:00
schutzbot
72e3e1699e schutzfile: Update snapshots to 20250515 2025-05-15 10:19:36 +02:00
Achilleas Koutsou
0ac83fd421 stages/kickstart: post-installation scripts
Add a new %post option to the kickstart stage that supports adding
multiple post blocks to a kickstart file, with all the options supported
by the directive.
2025-05-14 09:06:40 +02:00
Tomáš Hozza
68b2301daf Test/inline sources: add lzma+base64 success case
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-05-13 10:27:36 +02:00
Tomáš Hozza
c33dfcb43b Test/inline sources: update and rename the base64 success case
Rename the 'success' case to 'base64_success' as a preparation for
adding test case for other encodings.

The test case was originally embedding the tools/inline-source.py
script. Since the script has been updated, let's update the embedded
date in the test case as well.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-05-13 10:27:36 +02:00
Tomáš Hozza
1dc2cdcc14 Tools/inline-source.py: support specifying data encoding
Extend the script to support specifying the data encoding. Keep
'base64' as the default encoding.

Add support for 'lzma+base64' encoding.

Also use the 'base64' module, instead of 'binascii' module for base64
encoding. This is consistent with what the actual source implementation
uses.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-05-13 10:27:36 +02:00
Tomáš Hozza
e172e6e6f6 Sources/inline: support lzma+base64 encoded data
Extend the inline source to support lzma compressed and base64 encoded
'data'. This will allow us to reduce the potential manifest size when
embedding big files. The aim is specifically at eventually embedding
SBOMs of the image.

An example single SBOM can be a JSON file with size of about 1.9 MiB.
The lzma+base64 combination reduces the 'data' to embed to "only" around
250 KiB.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-05-13 10:27:36 +02:00
Tomáš Hozza
6c5c0aa462 CI: don't build F39 RPMs
These are no longer consumed by any dependent project AFAICT, so let's
drop the EOL Fedora 39 builds.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-05-13 10:17:55 +02:00
Michael Vogt
d068c6d91f dnfjson: detect/error if no repositories are defined
This commit adds an error message if no repositories are
defined in the dnfjson query. We had the issue in
https://github.com/osbuild/bootc-image-builder/issues/922
that in a RHEL bootc-container no repositories are defined.

Here the error is quite confusing, as it complains about
error marking packages which is technically correct but
hides the root of the problem.

With this detect we can construct a more useful error
message in the higher layers.
2025-05-12 20:51:57 +02:00
schutzbot
6c961552ce Schutzfile: Update images dependency ref to latest 2025-05-12 13:51:37 +02:00
schutzbot
3319173a1b Schutzfile: Update images dependency ref to latest 2025-05-09 15:48:38 +03:00
schutzbot
a602125f99 schutzfile: Update snapshots to 20250501 2025-05-09 15:48:23 +03:00
schutzbot
0e10c05172 Post release version bump
[skip ci]
2025-05-07 08:35:21 +00:00
Michael Vogt
ec3f70199c test: drop module_platform_id from depsolve tests
Drop `module_platform_id` as it is now optional and none of
our tests is using it (i.e. has any observable difference if
missing).

Once we start using it we need to add it (and maybe a
"with_platform_id" as parameter on top so that both with/without
platform_id is tested).
2025-05-07 10:28:47 +02:00
Michael Vogt
549136b1b0 tools: drop requirement for module_platform_id from request
The PLATFORM_ID got retired from fedora-43 [0] and it
seems like it was always kinda optional. So lets make
it optional for real to avoid failing to build fedora-43
images.

[0] https://fedoraproject.org/wiki/Changes/Drop_PLATFORM_ID
2025-05-07 10:28:47 +02:00
Brian C. Lane
59fe07a6ab solver: Call update_cache
DNF apparently doesn't check the expiration time on the cache unless you
call this first. It may help improve issues with the cache being out of
sync.

Internally dnf checks the mtime of the main repomd.xml file when using
baseurl, and it checks the hash values when using metalink so this
should not result in any noticeable extra slowdowns when things are
fresh.
2025-05-05 13:56:54 +03:00
schutzbot
841985691c Schutzfile: Update images dependency ref to latest 2025-04-29 12:48:01 +03:00
Benjamin A. Beasley
3932cc479c In Fedora 41+, depend on typer-slim rather than typer
This works around a file conflict on /usr/bin/typer between
python3-typer-cli and erlang-dialyzer until the problem can be fixed in
python-typer and/or erlang. See RHBZ#2359557, RHBZ#2359567.

After the file conflict is resolved, the python3-typer-slim dependency
will still be more precise and minimal than python3-typer, so no further
change will be required.

By depending on typer-slim[standard], we still get the nice-to-have
optional dependencies that plain typer would bring in (currently, rich
and shellingham), but without the generic typer command-line tool.
2025-04-28 14:38:58 +02:00
Brian C. Lane
d3dc07886c solver: Use load_repos instead of update_and_load_enabled_repos
The old function has been deprecated by dnf5, use load_repos directly
and only load the available repos (the ones osbuild has setup), not the
system repos.

Fixes #2080
2025-04-25 17:16:13 -07:00
schutzbot
68830eabe4 Schutzfile: Update images dependency ref to latest 2025-04-24 18:14:43 +02:00
schutzbot
025c8dd51d Post release version bump
[skip ci]
2025-04-23 08:33:27 +00:00
Nikita Dubrovskii
73e3544e86 stages/coreos.live-artifacts: fix kernel and initrd paths in s390x ISO
The `generic.ins` template uses:
  images/kernel.img
  images/initrd.img

However, kernel and initrd are currently stored as:
  images/pxeboot/vmlinuz
  images/pxeboot/initrd.img

This change ensures correct paths are used.
2025-04-23 08:01:11 +02:00
Tomáš Hozza
e294f38d9c Tests: fix packit config validation
Packit changed the command to validate its configuration, without
keeping backward compatibility.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-22 21:15:21 +02:00
schutzbot
50a6f2733e Post release version bump
[skip ci]
2025-04-16 13:57:25 +00:00