public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/dnf5] rawhide: Fix building on i686 with fmt-12.1.0
@ 2026-07-08 13:38
0 siblings, 0 replies; only message in thread
From: @ 2026-07-08 13:38 UTC (permalink / raw)
To: git-commits
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-08 13:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-08 13:38 [rpms/dnf5] rawhide: Fix building on i686 with fmt-12.1.0
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox