public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] rawhide: Make default package format switchable with a bcond
Date: Thu, 19 Nov 2026 08:12:20 GMT [thread overview]
Message-ID: <179507594028.1.2719798557506034491.rpms-rpm-8f587f11307f@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : rawhide
Commit : 8f587f11307fe6716678665d7199f0472f44fa03
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2026-11-19T10:07:12+02:00
Stats : +18/-14 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/8f587f11307fe6716678665d7199f0472f44fa03?branch=rawhide
Log:
Make default package format switchable with a bcond
Use sed instead of a patch for format swapping for better control.
Set %_rpmformat accordingly for the build of rpm itself to avoid having
to rebuild rpm twice whenever the format changes.
This only changes the mechanism, the default remains in v4.
---
diff --git a/rpm-6.0-rpmformat.patch b/rpm-6.0-rpmformat.patch
deleted file mode 100644
index f5f4700..0000000
--- a/rpm-6.0-rpmformat.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up rpm-5.99.91/macros.in.rpmformat rpm-5.99.91/macros.in
---- rpm-5.99.91/macros.in.rpmformat 2025-07-02 10:35:25.595849666 +0300
-+++ rpm-5.99.91/macros.in 2025-07-02 10:35:38.956370457 +0300
-@@ -258,7 +258,7 @@ Supplements: (%{name} = %{version}-%{r
- %_rpmfilename %{_build_name_fmt}
-
- # Which rpm format go generate (4 or 6)
--%_rpmformat 6
-+%_rpmformat 4
-
- # The directory where sources/patches from a source package will be
- # installed. This is also where sources/patches are found when building.
diff --git a/rpm.spec b/rpm.spec
index 4e8182d..424b16c 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -24,6 +24,17 @@
# Upstream defaults to enforcing in >= 6.0, this is backwards compat switch
%bcond legacy_verify 0
+# https://fedoraproject.org/wiki/Changes/RPMv6_package_format
+# Upstream defaults to v6 format in >= 6.0, this is a backwards compat switch
+%bcond legacy_v4format 1
+
+# Avoid double-rebuilds of rpm when switching
+%if %{with legacy_v4format}
+%define _rpmformat 4
+%else
+%define _rpmformat 6
+%endif
+
%define rpmhome /usr/lib/rpm
%global rpmver 6.1.0
@@ -117,8 +128,6 @@ rpm-4.9.90-no-man-dirs.patch
# Use systemd-sysusers due to https://github.com/shadow-maint/shadow/issues/940
rpm-4.20-sysusers.patch
-# Back out to v4 package format by default until the infra is updated
-rpm-6.0-rpmformat.patch
# Temporarily disable the deprecation warning for
# %%clamp_mtime_to_source_date_epoch, details here:
@@ -354,6 +363,10 @@ change.
sed -i -e "s:%%_pkgverify_level all:%%_pkgverify_level digest:g" macros.in
%endif
+%if %{with legacy_v4format}
+sed -i -e "s:%%_rpmformat 6:%%_rpmformat 4:g" macros.in
+%endif
+
%build
%set_build_flags
@@ -638,6 +651,9 @@ fi
%doc %{_defaultdocdir}/rpm/API/
%changelog
+* Thu Nov 19 2026 Panu Matilainen <pmatilai@redhat.com> - 6.1.0-2
+- Make default package format switchable with a bcond
+
* Thu Aug 20 2026 Michal Domonkos <mdomonko@redhat.com - 6.1.0-1
- Rebase to 6.1.0 (https://rpm.org/releases/6.1.0)
reply other threads:[~2026-11-19 8:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179507594028.1.2719798557506034491.rpms-rpm-8f587f11307f@fedoraproject.org \
--to=pmatilai@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox