367 Commits
Author SHA1 Message Date
Gaëtan Lehmann c5a1fc0444 pkg_in_pipe: generate a draft of the release post from the report
Add release_post.py, which writes the "What changed" and "Versions"
sections of the XCP-ng release post from the json report, with the
change descriptions for the users taken from the related pull requests.

Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-10-08 09:47:47 +02:00
Gaëtan Lehmann 3b4e925eee pkg_in_pipe: log the progress, the cache usage and the source problems during the generation (#849)
* Fix plane connection error blocking the script execution

It's meant to generate a message in the report, not block the report
generation

Signed-off-by: Gaëtan Lehmann <[email protected]>

* pkg_in_pipe: log the progress, the cache usage and the source problems during the generation

Add a --debug option and log the koji tag and the build being processed, whether
values come from the cache or are fetched again, and warn when the plane tickets
or github can't be reached, using the same logger setup as gen-dnf-proxy.py.

Signed-off-by: Gaëtan Lehmann <[email protected]>

---------

Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-10-08 09:47:25 +02:00
Gaëtan Lehmann e6ecec2c73 pkg_in_pipe: write a machine readable version of the report (#839)
The report is written as a json file that other scripts can consume,
e.g. to generate the release post or to move the plane cards of the
builds to another state.

Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-10-02 13:53:25 +02:00
Vincent Michel 6a7cc5ec1d Add missing_sources.toml in the pkg_in_pipe dockerfile
This change was missing from the following PR:
https://github.com/xcp-ng/xcp/pull/847

Signed-off-by: Vincent Michel <[email protected]>
2026-09-22 16:32:45 +02:00
Vincent Michel 22e1dec174 [pkg_in_pipe] Add a missing sources toml dictionary for koji builds
It might happen that the previous tag build for a package does not have
its source field filled in with the corresponding git commit (this
typically happens for security updates that did not go through the
standard release procedure). In order to avoid reporting extra PRs and
plane cards, those missing sources can now be listed in the
`missing_sources.toml` dictionary.

Signed-off-by: Vincent Michel <[email protected]>
2026-09-18 14:12:52 +02:00
Vincent Michel 80a2a5b44d [pkg_in_pipe] Try all the koji tagged builds in order until we find a source
It might happen that the previous tag build for a package does not have
its source field filled in with the corresponding git commit (this
typically happens for security updates that did not go through the
standard release procedure). By trying again with the build before
it until we find a source, we limit the amount of PRs and Plane cards
that will be included in the reports (if no source is provided by
`find_previous_build_commit`, all the PRs and cards are listed).

Signed-off-by: Vincent Michel <[email protected]>
2026-09-18 12:58:14 +02:00
Philippe Coval 51a766d5ad s/koji-helper.py: Refactor session to handle local koji conf
Signed-off-by: Philippe Coval <[email protected]>
2026-09-01 10:32:46 +02:00
Philippe Coval 271aa4a80e s/koji-helper.py: Add type hints to all functions, refactor
Introduce PackageInfo TypedDict for all package data structures

Replace all dict[str, dict[str, Any]] with dict[str, PackageInfo]
and use PackageInfo | None for base_version throughout the file.

Introduce Packages type alias for dict[str, PackageInfo]

Replace all dict[str, PackageInfo] occurrences with the new
Packages type alias for shorter, cleaner annotations.

Fix flake8 E501 line-too-long errors

- Split long print() call across multiple lines
- Split long lines.append() call across multiple lines
- Split do_list_update() def signature across two lines

Signed-off-by: Philippe Coval <[email protected]>
2026-09-01 10:32:46 +02:00
Philippe Coval 146780e7e9 s/koji-helper.py: Lookup on several repos (one or more)
Example:

    uv run koji-helper.py --no-verify-ssl list-update v8.3-ci \
      v8.3-testing v8.3-candidates v8.3-updates v8.3-base \
      | sed -e 's|UNKNOWN -> ||g'

Output:

    perl-Archive-Tar: 1.92-3.el7
    zlib: 1.2.7-17.el7 -> 1.2.7-17.1.xcpng8.3

Signed-off-by: Philippe Coval <[email protected]>
2026-09-01 10:32:46 +02:00
Philippe Coval b8d75763fd s/koji-helper.py: Remove unnecessary genai stuff
This script is used to generated versions updates:

    uv run koji-helper.py --no-verify-ssl list-update v8.3-ci v8.3-updates \
    | sed -e 's|\([^:]*\)\(.*\)|* \1\2|g'

It produces this kind of output:

    * `xen`: 4.17.6-9.3.1.xcpng8.3 -> 4.17.6-12.2.xcpng8.3

Signed-off-by: Philippe Coval <[email protected]>
2026-09-01 10:32:46 +02:00
Philippe Coval e3b502f85c s/koji-helper.py: Add version and release fields to package results
- Add version and release to list_source_packages results
- Update list-update output to show version-release format
- Include base_version and base_release for comparison

Signed-off-by: Philippe Coval <[email protected]>
2026-09-01 10:32:46 +02:00
Philippe Coval 99be7f19b3 s/koji-helper.py: Add list_update_source_packages function with CLI support
Adds:
- list_update_source_packages() function to find updated packages between tags
- Reuse list_source_packages() for both tag lookups
- list-update CLI command with old_nvr -> new_nvr output format

Signed-off-by: Philippe Coval <[email protected]>
2026-09-01 10:32:46 +02:00
Philippe Coval 35824d82c9 s/koji-helper.py: Add a Python script to list source packages from a Koji tag.
Features:
- Uses python-koji library for Koji CLI API access
- Supports SSL verification toggle and debug mode
- Configurable server and web URLs

Signed-off-by: Philippe Coval <[email protected]>
2026-09-01 10:32:46 +02:00
Gaëtan Lehmann da0d6919e3 Remove report.json, it shouldn't have been commited
Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-08-27 11:48:47 +02:00
Gaëtan Lehmann 43a3e12e71 Merge pull request #838 from xcp-ng/gln/pkg-in-pipe-updates-psmx
pkg_in_pipe: keep PRs merged by rebase or squash
2026-08-26 17:31:03 +02:00
Gaëtan Lehmann 26db50c008 pkg_in_pipe: keep PRs merged by rebase or squash
Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-08-26 17:07:13 +02:00
Samuel Verschelde e9941c9b8b Merge pull request #824 from xcp-ng/asv/fix-snapshot-fixer
scripts/snapshot-fixer: Bring xapi back up if it was stopped before running the script
2026-08-20 19:49:26 +02:00
Samuel Verschelde 30df2c8c48 Merge pull request #740 from xcp-ng/gln/srpm-url-source-qxor
import_srpm: allow to pass a url as source file
2026-08-14 12:05:43 +02:00
Gaëtan Lehmann a19a828264 Also move PRs to the new branch
Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-08-14 11:48:19 +02:00
Gaëtan Lehmann e8a51c4c71 Add a script to copy a branch to another branch in all our rpm repositories
Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-08-14 11:48:19 +02:00
Gaëtan Lehmann 81859cdf57 Add XCP-ng 9.0 in the report (#832)
Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-08-06 11:38:39 +02:00
Thierry Escande 6885103dda Merge pull request #834 from xcp-ng/tee/rpm_owners/qlogic-fastlinq-alt_8_42
RPM owners: Rename package qlogic-fastlinq-alt_8_42
2026-08-04 13:27:36 +02:00
Samuel Verschelde e830ce223a Merge pull request #748 from xcp-ng/gln/koji-build-cache-qtkz
Cache koji builds
2026-08-04 12:57:47 +02:00
Thierry Escande 62248cbc66 RPM owners: Rename package qlogic-fastlinq-alt_8_42
The disk creation tool does not support the '.' character in package
name so rename it from 'qlogic-fastlinq-alt_8.42' to
'qlogic-fastlinq-alt_8_42'.

Signed-off-by: Thierry Escande <[email protected]>
2026-08-04 11:25:54 +02:00
Gaëtan Lehmann 04e0cc01b6 Drop 8.2 from pkg_in_pipe
Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-08-04 10:17:50 +02:00
Gaëtan Lehmann 08078e0f99 Cache koji builds
in order to decrease the load on koji. With what's currently in the pipe, we
decrease the number of koji calls from 65 to 37 with the cache.

Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-08-03 16:48:57 +02:00
Gaëtan Lehmann 0c05fd4cd3 Use KOJI and GITHUB object as global variable
in order to simply the cache usage in a next commit

Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-08-03 16:48:57 +02:00
Philippe Coval a959284277 packages.json: Relocate libidn2
Sort alphabetically

Signed-off-by: Philippe Coval <[email protected]>
2026-08-03 15:39:19 +02:00
Gaëtan Lehmann 74d6cc8b84 Add linstor-testing in the observed tags
Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-07-31 11:02:25 +02:00
Gaëtan Lehmann e6319535ea Fix repo parsing for unusual repository name
namely xcp-ng-rpms/qlogic-fastlinq-alt_8.42

Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-07-30 15:02:05 +02:00
Thierry Escande 58b8f00ddf RPM owners: Add qlogic-fastlinq-alt_8.42 package
This package provides an older version of the qlogic-fastlinq driver
than the ones in the main and alt package. This older version 8.42.10.0
is know to work with some old hardware not well supported by newer
versions of the driver.

Signed-off-by: Thierry Escande <[email protected]>
2026-07-28 16:04:19 +02:00
Tu Dinh b1efcb9013 Add the xcp-efivar-utils package
This package contains an assortment of useful Python functions for
manipulating UEFI variables on XCP-ng pools and VMs.

Signed-off-by: Tu Dinh <[email protected]>
2026-07-17 10:26:13 +00:00
Gaëtan Lehmann c4047304fa Fix open() not used as a context manager
Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-07-15 15:22:47 +02:00
Gaëtan Lehmann e96db35369 Fix unreachable code
Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-07-15 15:22:47 +02:00
Gaëtan Lehmann 4c1654da85 Don't use bare except
Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-07-15 15:22:47 +02:00
Gaëtan Lehmann 923f1b63fc Fix style
Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-07-15 15:22:47 +02:00
Gaëtan Lehmann 3937ec5be4 import_srpm: allow to pass a url as source file
Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-07-15 15:22:47 +02:00
Philippe Coval 3e6ae47a19 packages.json: Add libidn2
This is a new build-dependency of gnutls

Related-to: XCPNG-2698
Related-to: https://github.com/xcp-ng-rpms/libidn2/pull/1
Signed-off-by: Philippe Coval <[email protected]>
2026-07-15 14:12:38 +02:00
Andrii Sultanov 4a277e62c1 scripts: Add helper script to list possibly leftover VBDs due to VM.revert regression
A regression was introduced to VM.revert in xapi-26.1.4-3.3, which left VBDs
attached to the VM when they are not present in the reverted-to
snapshot (instead of destroying such VBDs, as was done before).

VMs that were reverted to their snapshots after xapi-26.1.4-3.3 may have
such "leftover" VBDs. This script can be used to detect possible cases in
pools. Sadly, there is no way to automatically distinguish a VBD that
was created after a VM.revert from a VBD that survived the VM.revert,
so this script relies on the user to determine if the suspicious VBDs are
indeed affected or not.

Therefore, tbis is not a destructive script, it just uses the API to find the
affected VBDs and presents them to the user, as in this example output:

    VM e2678368-596d-1b6e-7211-9ee45f60dec1 ("Alpine minimal for CI") has
    VBDs that are not present in the snapshot it was reverted to
    (303ead66-9515-b1c8-0dc5-d33b7644b161 "Alpine minimal for CI_snapshot1"):
    xvdb (ca8610d2-76e3-6c54-4378-ee599619b4bb))

The script follows this algorithm:

1. Find all VMs that are children of snapshots
   (i.e. were reverted to a particular snapshot at some point in time)
2. Find VBDs that are currently present in such VMs but are
   not present in the snapshot

Signed-off-by: Andrii Sultanov <[email protected]>
2026-07-13 11:45:35 +00:00
Andrii Sultanov dd7487100a scripts/snapshot-fixer: Bring xapi back up if it was stopped before running the script
If xapi was manually stopped before running the script, then it
would fail:

    $ python3 snapshot-fixer.py rewrite
    INFO:root:Check HA...
    Traceback (most recent call last):
      File "snapshot-fixer.py", line 237, in <module>
        main()
      File "snapshot-fixer.py", line 234, in main
        args.func(args)
      File "snapshot-fixer.py", line 177, in rewrite
        ha_enabled = query_and_stop_ha()
      File "snapshot-fixer.py", line 96, in query_and_stop_ha
        pool_uuid = r.stdout.strip().split()[-1].decode('utf-8')
    IndexError: list index out of range

Handle this failure and start xapi back up to check HA instead:

    $ python3 snapshot-fixer.py rewrite
    INFO:root:Check HA...
    INFO:root:Xapi was down, bringing it up to check HA
    INFO:root:Starting up xapi...
    INFO:root:Shutting down xapi...
    INFO:root:Regenerating database...
    INFO:root:Writing database to /var/lib/xcp/state.db
    INFO:root:Starting up xapi...

Signed-off-by: Andrii Sultanov <[email protected]>
2026-07-10 14:58:04 +00:00
Samuel Verschelde 2c8d071329 Merge pull request #821 from xcp-ng/asv/xapi-build
koji_build: Add --source-build subcommand
2026-07-08 14:48:44 +02:00
Andrii Sultanov c9818743b2 fixup! koji_build: Add --source-build subcommand
Signed-off-by: Andrii Sultanov <[email protected]>
2026-07-07 15:14:04 +00:00
Andrii Sultanov 361910432b koji_build: Add --source-build subcommand
This allows building straight from source, without generating patches and
modifying the specfile manually.

The script will replace the current tarball with the one generated from the
git hash in the source repository. It will also increment the release tag
(following the rules for --test-build), with the commit hash used as a unique
reference.

Note that the new tarball might conflict with the patches generated on top
of the current tarball, or require new dependencies etc., so this is not a
catch-all solution, just a usability improvement for some simpler cases.

Like --pre-build or --test-build, the subcommand takes an additional
argument - the hash of the commit in source repository to generate the
tarball from. It can be called from rpms-xsconsole like this, for example:

    koji_build.py --source-build 6f7d91f8 v8.3-u-asultanov2 .

I've specified two automatic spec->source mappings for xapi and
xsconsole in this commit, this can be expanded in the future.
For other repositories, --source-repo has to be specified manually:

    koji_build.py --source-build 4e0cae33f7 --source-repo xapi-project/varstored v8.3-u-asultanov2 .

Signed-off-by: Andrii Sultanov <[email protected]>
2026-07-07 14:05:50 +00:00
Yann Dirson 65499b3e35 iso-remaster: add zstd support for v9
Signed-off-by: Yann Dirson <[email protected]>
2026-07-06 10:56:45 +02:00
Yann Dirson 68581e3d39 iso-remaster: properly implement -z
Original implementation took care of the flag, but did not apply the
selected compression algorithm.

Signed-off-by: Yann Dirson <[email protected]>
2026-07-06 10:56:45 +02:00
Samuel Verschelde 32916e864c Merge pull request #791 from xcp-ng/gln/fix-koji-release-number-pyvm
Fix non-incremented release when using test builds
2026-07-03 12:47:00 +02:00
Samuel Verschelde 3b8cb38078 Merge pull request #809 from xcp-ng/fallen-patch-1
Update README.md
2026-06-21 22:09:05 +02:00
Samuel Verschelde 11deb8b732 Merge pull request #818 from xcp-ng/gln/show-milestones-in-builds-zuus
Show the milestones (from the associated issues) for each build
2026-06-18 10:50:55 +02:00
Samuel Verschelde 7fc9a1834f Revert "Merge pull request #814 from Danp2/dp_enhance"
There were issues found after the merge.

This reverts commit 554c833f6e, reversing
changes made to 60d9eebce1.
2026-06-18 09:43:31 +02:00
Gaëtan Lehmann b882e04423 Show the milestones (from the associated issues) for each build
Signed-off-by: Gaëtan Lehmann <[email protected]>
2026-06-17 21:00:11 +02:00