From af27d1d8777457114139435886e9c921559a2170 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Thu, 4 Sep 2025 15:53:18 -0400 Subject: [PATCH 1/3] Packit/RPM: Epoch and version fetching fixes 1. Packit config includes a `get-current-version` action to fetch the version from `version/version.go` and not from the default `git describe`. So, the copr rpm version will always be ahead of what's in the official repos. 2. The absurdly high RPM Epoch is now limited to builds from rhcontainerbot/podman-next copr. So, copr builds on PR jobs will use the default Epoch value. These two changes will make it easier for testers to fetch the scratch copr builds from upstream PRs and it should allow for seamless upgrades. (official rpm -> test copr rpm for bugfix -> upgrade to new official rpm) Signed-off-by: Lokesh Mandvekar --- .packit.yaml | 2 ++ rpm/skopeo.spec | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.packit.yaml b/.packit.yaml index ed64d93e..ae7b2770 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -19,7 +19,9 @@ packages: skopeo-eln: specfile_path: rpm/skopeo.spec +# https://packit.dev/docs/configuration/actions actions: + get-current-version: bash -c 'grep "^const Version" version/version.go | cut -f2 -d\" | tr \- \~' prepare-files: >- bash -c "sed -i 's/^\(\s*\)ref: .*/\1ref: \"${PACKIT_PROJECT_TAG}\"/' ${PACKIT_DOWNSTREAM_REPO}/plans/main.fmf" diff --git a/rpm/skopeo.spec b/rpm/skopeo.spec index d7510fdd..9e0dfd07 100644 --- a/rpm/skopeo.spec +++ b/rpm/skopeo.spec @@ -26,8 +26,13 @@ %define conditional_epoch 2 %endif +# set higher Epoch only for podman-next builds +%if %{defined copr_username} && "%{copr_username}" == "rhcontainerbot" && "%{copr_projectname}" == "podman-next" +%define next_build 1 +%endif + Name: skopeo -%if %{defined copr_username} +%if %{defined next_build} Epoch: 102 %else Epoch: %{conditional_epoch} From 85e4414c43aa203ce7714353f26a8de3e442c548 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Thu, 4 Sep 2025 16:13:51 -0400 Subject: [PATCH 2/3] RPM: Re-org distro conditionals Signed-off-by: Lokesh Mandvekar --- rpm/skopeo.spec | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/rpm/skopeo.spec b/rpm/skopeo.spec index 9e0dfd07..40916bbe 100644 --- a/rpm/skopeo.spec +++ b/rpm/skopeo.spec @@ -9,21 +9,15 @@ %global gomodulesmode GO111MODULE=on -# No btrfs on RHEL +# Distro and environment conditionals %if %{defined fedora} +# Fedora conditionals %define build_with_btrfs 1 -%endif - -%if %{defined rhel} -%define fips 1 -%endif - -# Only used in official koji builds -# Copr builds set a separate epoch for all environments -%if %{defined fedora} %define conditional_epoch 1 %else +# RHEL conditionals %define conditional_epoch 2 +%define fips 1 %endif # set higher Epoch only for podman-next builds From 53bba51c2f354c627d52aaf2e576c0359780a4e6 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Thu, 4 Sep 2025 16:15:01 -0400 Subject: [PATCH 3/3] RPM: build with sequoia for F43+ Signed-off-by: Lokesh Mandvekar --- rpm/skopeo.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rpm/skopeo.spec b/rpm/skopeo.spec index 40916bbe..91ba10a2 100644 --- a/rpm/skopeo.spec +++ b/rpm/skopeo.spec @@ -14,6 +14,9 @@ # Fedora conditionals %define build_with_btrfs 1 %define conditional_epoch 1 +%if %{?fedora} >= 43 +%define sequoia 1 +%endif %else # RHEL conditionals %define conditional_epoch 2 @@ -66,6 +69,9 @@ BuildRequires: make BuildRequires: shadow-utils-subid-devel BuildRequires: sqlite-devel Requires: containers-common >= 4:1-21 +%if %{defined sequoia} +Requires: podman-sequoia +%endif %description Command line utility to inspect images and repositories directly on Docker @@ -124,6 +130,10 @@ export BUILDTAGS="$BASEBUILDTAGS exclude_graphdriver_btrfs" export BUILDTAGS="$BUILDTAGS libtrust_openssl" %endif +%if %{defined sequoia} +export BUILDTAGS="$BUILDTAGS containers_image_sequoia" +%endif + # unset LDFLAGS earlier set from set_build_flags LDFLAGS=''