public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] rawhide: Make default package format switchable with a bcond
@ 2026-11-19 8:12 Panu Matilainen
0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-19 8:12 UTC (permalink / raw)
To: git-commits
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)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-19 8:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-19 8:12 [rpms/rpm] rawhide: Make default package format switchable with a bcond Panu Matilainen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox