Commit Graph

3007 Commits

Author SHA1 Message Date
Lubomír Sedlář
e98dd56fce Remove forgotten multilib module for yum
There's no more yum anymore. This was also the only user of the
pathmatch module, which is thus also removed.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
(cherry picked from commit 989a9c2565ab9466b55d6edc056973c3080dfeae)
2025-09-29 18:23:44 +03:00
Lubomír Sedlář
4ff13b1993 Drop usage of six
We no longer need to support Python 2, so there's no point in this
compatibility layer.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>

(cherry picked from commit b34de57813187f1781aef733468c9745a144d9af)
2025-09-29 18:23:44 +03:00
Lubomír Sedlář
b044ebdba1 Ensure ostree phase threads are stopped
The ostree phase now runs in parallel with a lot of other stuff. If
there's any error while the phase is running, the compose would be
aborted but the ostree threads wouldn't be stopped automatically. With
the threads left alive, the process would never finish.

This patch makes sure that whatever happens in the other code, we always
stop the ostree phases.

Fixes: https://pagure.io/pungi/issue/1799
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
(cherry picked from commit 8558b74d7810dd92144924542a63bae7b1999bd3)
2025-09-29 18:19:15 +03:00
Lubomír Sedlář
f8932bc1f4 scm: Clone git submodules
If the repo contains .gitmodules file, run the commands to clone all
submodules.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
(cherry picked from commit 6d1428ab89de6ffa5c18466a469606887a0300b8)
2025-09-29 18:19:14 +03:00
Lubomír Sedlář
755004af02 Drop unittest2
The library is imported if available, but we never build it in any
environment where the package would be installed. It was last used for
RHEL 6 builds.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>

(cherry picked from commit d95d1f59e2ae243ea794c5f5613fef3249b4fad6)
2025-09-29 18:19:14 +03:00
Adam Williamson
567baed60f kiwibuild: extend productmd type/format detection for FEX images
Signed-off-by: Adam Williamson <awilliam@redhat.com>
(cherry picked from commit eb4ba5f637153f0037f05981adea8b35fc0f6b25)
2025-09-29 18:16:18 +03:00
Lubomír Sedlář
2e9baeaf51 Remove pungi/gather.py and associated code
This commit completly drops support for Yum as a depsolving/repoclosure
backend.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>

(cherry picked from commit f5702e4c9d0d5d9d31421d3d47200581e41f02bf)
2025-09-29 18:16:18 +03:00
Adam Williamson
4454619be6 Reduce legacy pungi script to gather phase only (#1792)
This reduces the legacy 'pungi' script to only its gather phase,
and removes related stuff in gather.py. The gather phase is used
in the yum path through phases/gather/methods/method_deps.py, so
it cannot be entirely removed until all users of that are gone.
But we can at least get rid of the non-Koji support for creating
install trees, ISOs and repos.

Merges: https://pagure.io/pungi/pull-request/1793
Signed-off-by: Adam Williamson <awilliam@redhat.com>
(cherry picked from commit 3bc35a9a271c50ca093b186938eae7cbc1bbd3de)
2025-09-29 18:15:21 +03:00
Adam Williamson
4f69f6c242 pkgset: optimize cache check (saves 20 minutes)
The pkgset phase takes around 35 minutes in current composes.
Around 20 minutes of that is spent creating these per-arch
subsets of the global package set. In a rather roundabout way
(see #1794 ), I figured out that almost all of this time is
spent in this cache check, which is broken for a subtle reason.

Python's `in` keyword works by first attempting to call the
container's magic `__contains__` method. If the container does
not implement `__contains__`, it falls back to iteration - it
tries to iterate over the container until it either hits what
it's looking for, or runs out. (If the container implements
neither, you get an error).

The FileCache instance's `file_cache` is a plain Python dict.
dicts have a very efficient `__contains__` implementation, so
doing `foo in (somedict)` is basically always very fast no matter
how huge the dict is. FileCache itself, though, implements
`__iter__` by returning an iterator over the `file_cache` dict's
keys, but it does *not* implement `__contains__`. So when we do
`foo in self.file_cache`, Python has to iterate over every key
in the dict until it hits foo or runs out. This is massively
slower than `foo in self.file_cache.file_cache`, which uses the
efficient `__contains__` method.

Because these package sets are so huge, and we're looping over
*one* huge set and checking each package from it against the cache
of another, increasingly huge, set, this effect becomes massive.
To make it even worse, I ran a few tests where I added a debug log
if we ever hit the cache, and it looks like we never actually do -
so every check has to iterate through the entire dict.

We could probably remove this entirely, but changing it to check
the dict instead of the FileCache instance makes it just about as
fast as taking it out, so I figured let's go with that in case
there's some unusual scenario in which the cache does work here.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
(cherry picked from commit c8fe99b1aa5a9a9b941b7515cda367d24829dedf)
2025-09-29 18:15:21 +03:00
Lubomír Sedlář
37f9f1fcaf Install dnf4 into test image
The fedora:latest image is now based on 41, and contains dnf5. This is
causing some tests to fail due to failing imports of dnf version 4.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
(cherry picked from commit bc60af794dc54c99bc295c742bbfba03393f7e0f)
2025-09-29 18:15:21 +03:00
Lubomír Sedlář
fdea2c88d9 Update phase diagram
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
(cherry picked from commit 83f56da0f17d5b9e400cfcc4678d176ce4b0f5b3)
2025-09-29 18:15:20 +03:00
Adam Williamson
0483f914c4 Don't block main image build phase on ostree_install phase
I did a time map of a Fedora compose today, and noticed that we
spend about an hour waiting for the ostree_install phase to
complete before we start up the compose_images_phase which does
all the other image builds.

This is unnecessary. Nothing else depends on ostree_install; it
should be fine to start up the extra_phase (which contains
compose_images_phase) while the ostree stuff is still running.

This implements that by splitting the ostree phases out of the
essentials_phase which contains the real precursors to the
extra_phase. We start the essentials and ostree phases together,
but only wait for the essentials phase to complete before
kicking off extra_phase, so it can start while the ostree
phase is still running.

One tweak we have to make to accommodate this is to move
image_checksum_phase out of extra_phase, to avoid it potentially
running before all ostree installer images are built. The
checksum phase is quite fast - it takes about five minutes -
and any time benefit of running it in parallel with the osbs and
repoclosure phases seems like it must be smaller than the time
loss of waiting for ostree_install before kicking off extra.

Merges: https://pagure.io/pungi/pull-request/1790
Signed-off-by: Adam Williamson <awilliam@redhat.com>
(cherry picked from commit 18bda22fcb842c00a606e5f357aeb9f3d02aa626)
2025-09-29 18:15:20 +03:00
Adam Williamson
a24c6d52ce ostree_container: make filename configurable, include arch
The default base name is probably fine in most cases, but there
are some where we might want to tweak it. We already allow this
for other phases (e.g. the livemedia phase).

Also, we should include the arch in the image filename. Not doing
this doesn't blow up the compose as, while they have identical
filenames, the images for different arches are in different paths,
but it's confusing for people who actually download and use the
images.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
(cherry picked from commit aea8da5225aeb31b4c5dd413f0a31b6ab395a9ac)
2025-09-29 18:15:19 +03:00
Adam Williamson
a0a155ebcd Correct subvariant handling for ostree_container phase
The image metadata construction code allows for subvariant to be
set in the image config dict, but checks.py doesn't expect it;
fix that. Also, when a subvariant is set, use it in the image
name template rather than the variant; otherwise you can't
build more than one subvariant in any variant (they will have
identical names, which isn't alllowed).

Signed-off-by: Adam Williamson <awilliam@redhat.com>
(cherry picked from commit 391a5eaed5198e5ee2941dac4ae43a2fe057eedd)
2025-09-29 18:15:19 +03:00
Adam Williamson
059995a200 image_build: drop .tar.gz as an expected extension for docker
Koji's image-build command has not been capable of producing a
docker image with .tar.gz as its extension since 2015:

https://pagure.io/koji/c/b489f282bee7a008108534404dd2e78efb2256e7?branch=master

as that commit message implies, the files have not actually been
gzip-compressed for even longer:

https://pagure.io/koji/c/82a405c7943192e3bba3340efe7a8d07a0e26b70?branch=master

so there's no point to having this any more. It is causing the
wrong productmd 'type' to be set for GCE cloud images, which *do*
have the .tar.gz extension - because docker appears in this dict
before tar-gz, their type is being set as 'docker' not 'tar-gz'.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
(cherry picked from commit 739062ed3c471e74ba9c5144c4047f67f9fbe8c8)
2025-09-29 18:15:19 +03:00
Adam Williamson
53c273f025 move osbuild/kiwi-specific EXTENSIONS to each phase
The image-build phase's EXTENSIONS dict is meant to exactly
mirror the 'formats' that exist in the context of the command
`koji image-build`, which is driven by this phase. That nice
association was lost, however, by adding a couple of items to it
which exist for the purposes of the osbuild phase (and in the
case of .iso, also the kiwibuild phase), which import this dict
and uses it for image identification.

To make the association 1:1 again and more clearly show what's
going on here, let's move those entries out into the osbuild and
kiwi phases. osbuild now has its own dict which starts out as a
copy of the image-build one before being extended. And let's
update the relevant comments.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
(cherry picked from commit 5338d3098ccd614a8fd32f837a393aed78b471bd)
2025-09-29 18:15:18 +03:00
Lubomír Sedlář
9594954287 Drop compatibility helper for dnf.Package.source_name
The bug that caused the attribute to have wrong value has been fixed in
DNF a long time ago.

Fixes: https://pagure.io/pungi/issue/1786
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
(cherry picked from commit 225f04cf43326c136e95356681f1461270673ca6)
2025-09-29 18:15:18 +03:00
Lubomír Sedlář
c586c0b03b kiwibuild: Allow setting metadata type explicitly
It is not possible to reliably detect what the type for an image should
be in the metadata. This commit adds an option for user to explicitly
provide it.

It can only be configured on the specific image, not globally.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
(cherry picked from commit cd2ae81e3c63316997b9617ff2e30e3148af14f2)
2025-09-29 18:15:17 +03:00
Lubomír Sedlář
6576ab9b32 kiwibuild: Fix location and metadata for ISOs
When Kiwi builds an ISO, it is always supposed to be bootable and should
be located in the iso/ subdirectory.

Any other kind of image should still land in images/ and be listed as
not bootable in the metadata.

Relates: https://pagure.io/pungi-fedora/issue/1342
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
(cherry picked from commit d9d21d3cf4eaad5cc7f2959a4abdafed781bb9cf)
2025-09-29 18:15:17 +03:00
Lubomír Sedlář
d93b358959 kiwibuild: Add options for version and repo_releasever
The version follows the same rules as versioning for live media etc.
That means it's always going to be set. The precedence goes like this:

 * image specific option
 * `kiwibuild_version`
 * `global_version`
 * `release_version` or `<release_version>_<label_milestone>`.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
(cherry picked from commit d351773dab7b3aa8e6de82bbe23058b6b3448dd4)
2025-09-29 18:15:17 +03:00
Lubomír Sedlář
d2fc85437b Release 4.10.1
(cherry picked from commit d14925b85c4f0e26eb4b097b6603f3dbc5d00d60)
2025-09-29 18:14:47 +03:00
Lubomír Sedlář
ca0984611b Release 4.10.0
(cherry picked from commit 79c630a8599978b3b073c9fbc17abf7df347bb40)
2025-09-29 18:14:37 +03:00
Fedora Release Engineering
4dd7ecf875 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
(cherry picked from commit 94ede558b3ac60de921095d23ec8d6ca762087b0)
2025-09-29 18:14:25 +03:00
Miro Hrončok
2f8ce9dbca Remove one generated runtime Requires
It's required by python3-pungi.

(cherry picked from commit 73e8998491ecb630eb31877692fe03b4eceaff3e)
2025-09-29 18:14:09 +03:00
Miro Hrončok
eaaa5a6a0c Remove generated runtime dependencies from BuildRequires
Those are handled by %pyproject_buildrequires

(cherry picked from commit 4af7eaba63f34cd84ee4dbe9e908068a6d89e354)
2025-09-29 18:14:09 +03:00
Lubomír Sedlář
e164c6ed14 Release 4.9.3
Merges: https://src.fedoraproject.org/rpms/pungi/pull-request/11

(cherry picked from commit e0a9959d1f7478a0357f76d8d31c96b9d8cda895)
2025-09-29 18:10:49 +03:00
Python Maint
e33373f74c Rebuilt for Python 3.14
(cherry picked from commit 280b98bf8383ae70aa07938d08c5291f9e872d96)
2025-09-29 18:08:30 +03:00
Lubomír Sedlář
8e5c545c22 Fix tests on Python 3.14
(cherry picked from commit 40a6fe451dab89ed180b89cadd4c32e3a9328700)
2025-09-29 18:08:19 +03:00
Lubomír Sedlář
1fda6afce9 Release 4.9.2
(cherry picked from commit 2d39cf9856893d0c9e718bb9b0ebf5b7134ac01c)
2025-09-29 18:08:09 +03:00
Lubomír Sedlář
4f5ca6ad18 Release 4.9.1
(cherry picked from commit 5639a4d5deb28dd98a13b8ce6ddf2264a73d82c4)
2025-09-29 18:07:59 +03:00
Lubomír Sedlář
afa2617a73 New release 4.9.0
(cherry picked from commit 5fbdefc5fc784a2ee632dc093c587e490c33593c)
2025-09-29 18:07:47 +03:00
Adam Williamson
e9b29c87d5 Backport PR #1812 to fix crash on subprocess unicode decode error
(cherry picked from commit 47f155d57038db0013eeff61b17380bc945b263a)
2025-09-29 18:07:35 +03:00
Adam Williamson
4137092e7f Backport PR #1810 to use new container types
(cherry picked from commit ddef475081f9efea390c60c2666d9e22536d70c1)
2025-09-29 18:07:16 +03:00
Lubomír Sedlář
80e22467e7 New upstream release 4.8.0
(cherry picked from commit 85b8b74f54cc6e1afd13c9608ad791d6ad103b61)
2025-09-29 18:06:51 +03:00
Adam Williamson
1fb0c8aa16 Backport #1798 to infer types/formats for new FEX backing images
(cherry picked from commit 92d7921cf1bbf816217e2c4945dc8f6ae7881a39)
2025-09-29 18:06:23 +03:00
Adam Williamson
cc5b039197 Backport #1796 to speed up compose some more
(cherry picked from commit 130e003364be879f91c3716f9e059f319376b89c)
2025-09-29 18:06:06 +03:00
Adam Williamson
3ec9bd0413 Rebuild with no changes to bump past release used in infra tag
(cherry picked from commit 2b05735da4ecb2a1a230c47c22f0fa18200f2972)
2025-09-29 18:05:50 +03:00
Adam Williamson
560916cd83 Backport patches for ostree_container, ostree compose speedup
PR #1789 improved various aspects of the ostree_container phase
regarding subvariant handling and filenames, this is mainly to
help us with how we want to handle bootc images (currently in
the IoT compose, but the generic base bootc image may move to
the Fedora compose).

PR #1790 rejigs the compose phase handling so the main image
build phase is not unnecessarily blocked on the ostree_install
phase. This should cut 60-90 minutes out of the main Fedora
compose time.

(cherry picked from commit 13884fef2c199b613442af03c24b737a7e3cb057)
2025-09-29 18:05:38 +03:00
Adam Williamson
2495771f59 Backport patches to fix GCE image format not to be 'docker'
(cherry picked from commit 80ddc0cf015d582ca21376c3ba97b38ba813f5e2)
2025-09-29 18:05:16 +03:00
Lubomír Sedlář
b3b4b894c7 Commit forgotten patch
(cherry picked from commit d672d5b724891363bf4f793e21e1993c6be07153)
2025-09-29 18:04:46 +03:00
Lubomír Sedlář
dac4df2438 Backport patch for setting kiwibuild image type in metadata
(cherry picked from commit 729586d0ed2cb9103ee89fca589208c8d3381861)
2025-09-29 18:04:46 +03:00
Lubomír Sedlář
8334b2f027 Backport upstream PR 1780
(cherry picked from commit 94c3195e7398d8f75720216676a87509e2177fc2)
2025-09-29 18:03:25 +03:00
e9ed4402e6 Merge pull request 'Add riscv64 to supported architectures' (#16) from add_riscv64 into master
Reviewed-on: #16
Reviewed-by: Stepan Oksanichenko <soksanichenko@noreply.localhost>
2025-09-02 15:03:06 +00:00
2ac29cf0d6 Release is bumped 2025-09-01 16:22:31 +00:00
9c1dfb3cbc changelog 2025-09-01 12:46:54 +00:00
d49e8278ea use noarch with riscv64 2025-09-01 12:04:36 +00:00
1856763163 Add riscv64 to supported architectures 2025-09-01 11:43:48 +00:00
e17a6d7f42
- Changelog date order
- Typo
2024-10-09 12:48:48 +03:00
5152dfa764
- Add x86_64_v2 to a lisf of exclusive arches if there is any arch with base x86_64
- Changelog
- Bumbed version
2024-09-27 15:43:27 +03:00
b61614969d - Add x86_64_v2 to arch list if x86_64 in list 2024-09-16 14:59:03 +03:00