public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michal Domonkos <mdomonko@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Temporarily disable the clamp deprecation warning
Date: Mon, 23 Nov 2026 09:35:20 GMT [thread overview]
Message-ID: <179542652032.1.13427431264489145620.rpms-rpm-4146c7398cd2@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 4146c7398cd2d3d1c155987ff2de671318e0b75c
Author : Michal Domonkos <mdomonko@redhat.com>
Date : 2024-05-23T17:02:35+02:00
Stats : +123/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/4146c7398cd2d3d1c155987ff2de671318e0b75c?branch=pmatilai-v6
Log:
Temporarily disable the clamp deprecation warning
There's no point in bothering packagers with this spurious warning, it
has to be handled on the distro level, i.e. in redhat-rpm-config, see:
https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/298
---
diff --git a/0001-Revert-Add-a-deprecation-warning-for-clamp_mtime_to_.patch b/0001-Revert-Add-a-deprecation-warning-for-clamp_mtime_to_.patch
new file mode 100644
index 0000000..b05fe1f
--- /dev/null
+++ b/0001-Revert-Add-a-deprecation-warning-for-clamp_mtime_to_.patch
@@ -0,0 +1,118 @@
+From fd89ba7f95d6f21fa6e54e3c1c9ff7ce0ba16d58 Mon Sep 17 00:00:00 2001
+From: Michal Domonkos <mdomonko@redhat.com>
+Date: Thu, 23 May 2024 17:00:35 +0200
+Subject: [PATCH] Revert "Add a deprecation warning for
+ clamp_mtime_to_source_date_epoch"
+
+This reverts commit 4965331a55cedda5e423fe050e8da1245ab8b069.
+---
+ build/files.c | 2 --
+ tests/data/SPECS/source_date_epoch.spec | 4 ++++
+ tests/pinned/common/buildrepr.sh | 2 +-
+ tests/rpmbuild.at | 28 +++----------------------
+ 4 files changed, 8 insertions(+), 28 deletions(-)
+
+diff --git a/build/files.c b/build/files.c
+index 2f7d1261a..eb0c26300 100644
+--- a/build/files.c
++++ b/build/files.c
+@@ -1044,8 +1044,6 @@ static void genCpioListAndHeader(FileList fl, rpmSpec spec, Package pkg, int isS
+ if (srcdate && rpmExpandNumeric("%{?clamp_mtime_to_source_date_epoch}")) {
+ free(mtime_policy_str);
+ mtime_policy_str = xstrdup("clamp_to_source_date_epoch");
+- rpmlog(RPMLOG_WARNING,
+- _("%%clamp_mtime_to_source_date_epoch is deprecated, please use %%build_mtime_policy\n"));
+ }
+ }
+
+diff --git a/tests/data/SPECS/source_date_epoch.spec b/tests/data/SPECS/source_date_epoch.spec
+index 3436b243f..77f87cc02 100644
+--- a/tests/data/SPECS/source_date_epoch.spec
++++ b/tests/data/SPECS/source_date_epoch.spec
+@@ -5,6 +5,10 @@ Summary: test SOURCE_DATE_EPOCH
+ License: GPLv2
+ BuildArch: noarch
+
++%global source_date_epoch_from_changelog 0
++%global clamp_mtime_to_source_date_epoch 1
++%global use_source_date_epoch_as_buildtime 1
++
+ %description
+
+ %build
+diff --git a/tests/pinned/common/buildrepr.sh b/tests/pinned/common/buildrepr.sh
+index f1cdd5174..e4bacb2db 100644
+--- a/tests/pinned/common/buildrepr.sh
++++ b/tests/pinned/common/buildrepr.sh
+@@ -6,7 +6,7 @@ runroot rpmbuild -bb --quiet \
+ --define "_buildhost localhost" \
+ --define "use_source_date_epoch_as_buildtime 1" \
+ --define "source_date_epoch_from_changelog 1" \
+- --define "build_mtime_policy clamp_to_source_date_epoch" \
++ --define "clamp_mtime_to_source_date_epoch 1" \
+ --define "_use_weak_usergroup_deps 0" \
+ /data/SPECS/attrtest.spec
+
+diff --git a/tests/rpmbuild.at b/tests/rpmbuild.at
+index 0e1c628d6..ecd5c09b4 100644
+--- a/tests/rpmbuild.at
++++ b/tests/rpmbuild.at
+@@ -618,7 +618,7 @@ runroot \
+ rpmbuild \
+ -bb --quiet \
+ --define "use_source_date_epoch_as_buildtime 1" \
+- --define "build_mtime_policy clamp_to_source_date_epoch" \
++ --define "clamp_mtime_to_source_date_epoch 1" \
+ /data/SPECS/attrtest.spec
+
+ RPMTEST_CHECK([[
+@@ -689,7 +689,7 @@ runroot \
+ rpmbuild \
+ -bb --quiet \
+ --define "use_source_date_epoch_as_buildtime 1" \
+- --define "build_mtime_policy clamp_to_source_date_epoch" \
++ --define "clamp_mtime_to_source_date_epoch 1" \
+ /data/SPECS/source_date_epoch.spec
+
+ runroot rpm -q --dump /build/RPMS/noarch/test-1-1.noarch.rpm
+@@ -710,7 +710,7 @@ runroot \
+ rpmbuild \
+ -bb --quiet \
+ --define "use_source_date_epoch_as_buildtime 1" \
+- --define "build_mtime_policy clamp_to_source_date_epoch" \
++ --define "clamp_mtime_to_source_date_epoch 1" \
+ /data/SPECS/source_date_epoch.spec
+
+ runroot rpm -q --dump /build/RPMS/noarch/test-1-1.noarch.rpm
+@@ -721,28 +721,6 @@ runroot rpm -q --dump /build/RPMS/noarch/test-1-1.noarch.rpm
+ [])
+ RPMTEST_CLEANUP
+
+-AT_SETUP([rpmbuild _buildtime macro])
+-AT_KEYWORDS([build])
+-RPMTEST_CHECK([
+-RPMDB_INIT
+-
+-runroot \
+- rpmbuild \
+- -bb --quiet \
+- --define "_buildtime 1699460418" \
+- --define "build_mtime_policy clamp_to_buildtime" \
+- /data/SPECS/source_date_epoch.spec
+-
+-runroot rpm -q --dump /build/RPMS/noarch/test-1-1.noarch.rpm
+-runroot rpm -q --qf '%{BUILDTIME}\n' /build/RPMS/noarch/test-1-1.noarch.rpm
+-],
+-[0],
+-[/0.txt 15 1699460418 91751cee0a1ab8414400238a761411daa29643ab4b8243e9a91649e25be53ada 0100644 root root 0 0 0 X
+-1699460418
+-],
+-[])
+-RPMTEST_CLEANUP
+-
+ AT_SETUP([rpmbuild unpackaged files])
+ AT_KEYWORDS([build])
+ RPMDB_INIT
+--
+2.45.1
+
diff --git a/rpm.spec b/rpm.spec
index 766f839..693291f 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -142,6 +142,11 @@ rpm-4.9.90-no-man-dirs.patch
rpm-4.18.92-disable-sysusers.patch
rpm-4.19.91-weak-user-group.patch
+# Temporarily disable the deprecation warning for
+# %%clamp_mtime_to_source_date_epoch, details here:
+# https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/298
+0001-Revert-Add-a-deprecation-warning-for-clamp_mtime_to_.patch
+
# Patches already upstream:
0001-Ensure-noarch-packages-don-t-get-debuginfo.patch
0001-Fix-noprep-regression-from-introducing-mkbuilddir.patch
reply other threads:[~2026-11-23 9:35 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=179542652032.1.13427431264489145620.rpms-rpm-4146c7398cd2@fedoraproject.org \
--to=mdomonko@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