public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/dnf5] rawhide: Fix building on i686 with fmt-12.1.0
Date: Wed, 08 Jul 2026 13:38:38 GMT [thread overview]
Message-ID: <178351791819.1.1683344322457214323.rpms-dnf5-b26108c8d163@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/dnf5
Branch : rawhide
Commit : b26108c8d16361109c61d0d3a33e463e72334b46
Author : Petr Písař <ppisar@redhat.com>
Date : 2026-07-08T15:00:49+02:00
Stats : +39/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/dnf5/c/b26108c8d16361109c61d0d3a33e463e72334b46?branch=rawhide
Log:
Fix building on i686 with fmt-12.1.0
---
diff --git a/0002-transaction-use-system_clock-to_time_t-for-start-tim.patch b/0002-transaction-use-system_clock-to_time_t-for-start-tim.patch
new file mode 100644
index 0000000..a82438a
--- /dev/null
+++ b/0002-transaction-use-system_clock-to_time_t-for-start-tim.patch
@@ -0,0 +1,34 @@
+From 0f7fcde0bf281b8bf7a2aa5fdabb9e24496df6bf Mon Sep 17 00:00:00 2001
+From: Kefu Chai <tchaikov@gmail.com>
+Date: Mon, 29 Jun 2026 11:23:52 +0800
+Subject: [PATCH] transaction: use system_clock::to_time_t for start time
+
+On i686, time_t is a 32-bit long, so deriving the start time via
+duration_cast<seconds>(now().time_since_epoch()).count() narrows the
+64-bit count and trips GCC 16's -Wconversion, failing the build under
+-Werror. system_clock::to_time_t() returns a time_t directly, so the
+narrowing is gone and the intent reads more clearly.
+
+For: https://github.com/rpm-software-management/dnf5/issues/2798
+Signed-off-by: Kefu Chai <tchaikov@gmail.com>
+---
+ libdnf5/base/transaction.cpp | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/libdnf5/base/transaction.cpp b/libdnf5/base/transaction.cpp
+index ac6ee089..089e9ba0 100644
+--- a/libdnf5/base/transaction.cpp
++++ b/libdnf5/base/transaction.cpp
+@@ -967,8 +967,7 @@ Transaction::TransactionRunResult Transaction::Impl::_run(
+ info.set_description(description);
+ info.set_comment(comment);
+ info.set_pid(getpid());
+- info.set_start_time(
+- std::chrono::duration_cast<std::chrono::seconds>(std::chrono::system_clock::now().time_since_epoch()).count());
++ info.set_start_time(std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()));
+
+ // acquire the lock
+ std::filesystem::path lock_file_path = config.get_installroot_option().get_value();
+--
+2.55.0
+
diff --git a/dnf5.spec b/dnf5.spec
index fae818e..46f4c1a 100644
--- a/dnf5.spec
+++ b/dnf5.spec
@@ -7,12 +7,13 @@
Name: dnf5
Version: %{project_version_prime}.%{project_version_major}.%{project_version_minor}.%{project_version_micro}
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Command-line package manager
License: GPL-2.0-or-later
URL: https://github.com/rpm-software-management/dnf5
Source0: %{url}/archive/%{version}/dnf5-%{version}.tar.gz
Patch0: 0001-copr-update-detection-of-ELN.patch
+Patch1: 0002-transaction-use-system_clock-to_time_t-for-start-tim.patch
Requires: libdnf5%{?_isa} = %{version}-%{release}
Requires: libdnf5-cli%{?_isa} = %{version}-%{release}
@@ -1145,6 +1146,9 @@ mkdir -p %{buildroot}%{_libdir}/libdnf5/plugins
%ldconfig_scriptlets
%changelog
+* Wed Jul 08 2026 Petr Pisar <ppisar@redhat.com> - 5.4.2.1-6
+- Fix building on i686 with fmt-12.1.0
+
* Thu Jun 25 2026 František Zatloukal <fzatlouk@redhat.com> - 5.4.2.1-5
- Rebuilt for fmt/spdlog
reply other threads:[~2026-07-08 13:38 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=178351791819.1.1683344322457214323.rpms-dnf5-b26108c8d163@fedoraproject.org \
--to=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