From 99619d28656816074e9b14acf2e934f52997b9d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= Date: Wed, 1 Apr 2026 13:18:27 +0200 Subject: [PATCH 1/2] Configure packit to use caret notation for postrelease snapshots This ensures the build of that specific version is considered newer than any other regular release of it. For rpm-software-management/ci-dnf-stack#1843 For epel7 keep old style since rpm doesn't support `^` in version there. --- .packit.yml | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/.packit.yml b/.packit.yml index f802583f..fc9bddbd 100644 --- a/.packit.yml +++ b/.packit.yml @@ -1,7 +1,19 @@ -specfile_path: fedora/libmodulemd.spec -upstream_package_name: libmodulemd -upstream_project_url: https://github.com/fedora-modularity/libmodulemd -downstream_package_name: libmodulemd +_: + project_settings: &project_settings + upstream_package_name: libmodulemd + upstream_project_url: https://github.com/fedora-modularity/libmodulemd + downstream_package_name: libmodulemd + specfile_path: fedora/libmodulemd.spec + +packages: + libmodulemd: + << : *project_settings + version_suffix: "^{PACKIT_PROJECT_SNAPSHOTID}" + update_release: false + + # rpmbuild doesn't allow '^' in version on rhel 7, don't use caret notation + libmodulemd-epel7: + << : *project_settings actions: get-current-version: ./get_version.sh @@ -16,6 +28,7 @@ jobs: - job: copr_build trigger: pull_request + packages: [libmodulemd] metadata: targets: - fedora-all @@ -24,7 +37,13 @@ jobs: - fedora-rawhide-ppc64le # fedora-rawhide-x86_64 is included in fedora-all # fedora-rawhide-s390x has too long wait queue - - epel-7 - epel-8 - centos-stream-9 - centos-stream-10 + +- job: copr_build + trigger: pull_request + packages: [libmodulemd-epel7] + metadata: + targets: + - epel-7 From 201d8773be03b7c1a7a8c93e76b548c6af7a0a1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= Date: Fri, 10 Apr 2026 20:47:18 +0200 Subject: [PATCH 2/2] Build only the snapshot packit libmodulemd package This ensures we don't also build `libmodulemd-epel7` packit package. --- .ci/fedora/ci-tasks.sh | 2 +- .github/workflows/ci.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/fedora/ci-tasks.sh b/.ci/fedora/ci-tasks.sh index 363b58f7..cfd611a5 100755 --- a/.ci/fedora/ci-tasks.sh +++ b/.ci/fedora/ci-tasks.sh @@ -64,7 +64,7 @@ fi arch=$(uname -m) mkdir -p rpmbuild/RPMS/ pushd rpmbuild/RPMS/ -packit --debug build locally ../.. +packit --debug build locally -p libmodulemd ../.. createrepo_c $arch $RETRY_CMD dnf -y install --nogpgcheck \ diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f6ebb695..1777f9ef 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -92,7 +92,7 @@ jobs: working-directory: ${{github.workspace}}/rpmbuild/RPMS run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" - packit --debug build locally ../.. + packit --debug build locally -p libmodulemd ../.. createrepo_c x86_64 - name: Install the packages @@ -197,7 +197,7 @@ jobs: working-directory: ${{github.workspace}}/rpmbuild/RPMS run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" - packit --debug build locally ../.. + packit --debug build locally -p libmodulemd ../.. createrepo_c x86_64 - name: Install the packages