public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/ledger] rawhide: feat: update to 3.4.1 (fixes rb#2405925, rb#2380701)
Date: Thu, 16 Jul 2026 11:09:54 GMT [thread overview]
Message-ID: <178420019458.1.5671989251923083805.rpms-ledger-de29fa98954f@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/ledger
Branch : rawhide
Commit : de29fa98954f31347601725cf839fcc84100c8b6
Author : Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com>
Date : 2026-07-16T11:08:23+00:00
Stats : +58/-268 in 5 file(s)
URL : https://src.fedoraproject.org/rpms/ledger/c/de29fa98954f31347601725cf839fcc84100c8b6?branch=rawhide
Log:
feat: update to 3.4.1 (fixes rb#2405925, rb#2380701)
---
diff --git a/.gitignore b/.gitignore
index f4d3ccb..e9f3d8d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ ledger-2.6.3.tar.gz
/ledger-2ca3d69.tar.gz
/v3.2.1.tar.gz
/v3.3.2.tar.gz
+/v3.4.1.tar.gz
diff --git a/0001-disable-cmake-test.patch b/0001-disable-cmake-test.patch
new file mode 100644
index 0000000..fc0d2b4
--- /dev/null
+++ b/0001-disable-cmake-test.patch
@@ -0,0 +1,47 @@
+From 3c5572df749bcee5ba9a256afe9b6512bc809bca Mon Sep 17 00:00:00 2001
+From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
+Date: Sat, 21 Feb 2026 13:22:28 +0000
+Subject: [PATCH] disable cmake test
+
+gmp.h does not define these parameters in Fedora's install.
+They're in gmp-${arch}.h
+---
+ CMakeLists.txt | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 20dc3533..323eaf29 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -231,17 +231,17 @@ macro(find_req_library_and_header _header_var _header _lib_var _lib)
+ endmacro()
+
+ find_req_library_and_header(GMP_PATH gmp.h GMP_LIB gmp)
+-if(GMP_PATH AND EXISTS "${GMP_PATH}/gmp.h")
+- file(STRINGS "${GMP_PATH}/gmp.h" gmp_header_str REGEX "^#define[\t ]+__GNU_MP_VERSION(_MINOR|_PATCHLEVEL)?[\t ]+[0-9]+")
+- string(REGEX REPLACE ".*#define __GNU_MP_VERSION[\t ]+([0-9]+).*" "\\1" GMP_VERSION_MAJOR "${gmp_header_str}")
+- string(REGEX REPLACE ".*#define __GNU_MP_VERSION_MINOR[\t ]+([0-9]+).*" "\\1" GMP_VERSION_MINOR "${gmp_header_str}")
+- string(REGEX REPLACE ".*#define __GNU_MP_VERSION_PATCHLEVEL[\t ]+([0-9]+).*" "\\1" GMP_VERSION_PATCH "${gmp_header_str}")
+- unset(gmp_header_str)
+- set(GMP_VERSION_STRING "${GMP_VERSION_MAJOR}.${GMP_VERSION_MINOR}.${GMP_VERSION_PATCH}")
+- if("${GMP_VERSION_STRING}" VERSION_LESS ${Required_Gmp_Version})
+- message(FATAL_ERROR "Ledger requires GMP version ${Expected_Gmp_Version} or greater, but only GMP version ${GMP_VERSION_STRING} was found")
+- endif()
+-endif()
++#if(GMP_PATH AND EXISTS "${GMP_PATH}/gmp.h")
++# file(STRINGS "${GMP_PATH}/gmp.h" gmp_header_str REGEX "^#define[\t ]+__GNU_MP_VERSION(_MINOR|_PATCHLEVEL)?[\t ]+[0-9]+")
++# string(REGEX REPLACE ".*#define __GNU_MP_VERSION[\t ]+([0-9]+).*" "\\1" GMP_VERSION_MAJOR "${gmp_header_str}")
++# string(REGEX REPLACE ".*#define __GNU_MP_VERSION_MINOR[\t ]+([0-9]+).*" "\\1" GMP_VERSION_MINOR "${gmp_header_str}")
++# string(REGEX REPLACE ".*#define __GNU_MP_VERSION_PATCHLEVEL[\t ]+([0-9]+).*" "\\1" GMP_VERSION_PATCH "${gmp_header_str}")
++# unset(gmp_header_str)
++# set(GMP_VERSION_STRING "${GMP_VERSION_MAJOR}.${GMP_VERSION_MINOR}.${GMP_VERSION_PATCH}")
++# if("${GMP_VERSION_STRING}" VERSION_LESS ${Required_Gmp_Version})
++# message(FATAL_ERROR "Ledger requires GMP version ${Expected_Gmp_Version} or greater, but only GMP version ${GMP_VERSION_STRING} was found")
++# endif()
++#endif()
+
+ find_req_library_and_header(MPFR_PATH mpfr.h MPFR_LIB mpfr)
+ if(MPFR_PATH AND EXISTS "${MPFR_PATH}/mpfr.h")
+--
+2.53.0
+
diff --git a/ledger-boost190.patch b/ledger-boost190.patch
deleted file mode 100644
index 2bb13da..0000000
--- a/ledger-boost190.patch
+++ /dev/null
@@ -1,257 +0,0 @@
-From 1da89f6ffb44a44257b9774c4ceb71e7b495d677 Mon Sep 17 00:00:00 2001
-From: Michael Cho <michael@michaelcho.dev>
-Date: Thu, 25 Apr 2024 11:29:49 -0400
-Subject: [PATCH] Fix build with Boost 1.85.0
-
-Signed-off-by: Michael Cho <michael@michaelcho.dev>
----
- src/system.hh.in | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/src/system.hh.in b/src/system.hh.in
-index 05f28fc24..070f1cd4a 100644
---- a/src/system.hh.in
-+++ b/src/system.hh.in
-@@ -140,7 +140,6 @@
- #include <boost/date_time/posix_time/posix_time_io.hpp>
- #include <boost/date_time/gregorian/gregorian_io.hpp>
-
--#include <boost/filesystem/convenience.hpp>
- #include <boost/filesystem/exception.hpp>
- #include <boost/filesystem/fstream.hpp>
- #include <boost/filesystem/operations.hpp>
-
-From ad93c185644cfcb14fe4a673e74a0cb5c954a4b4 Mon Sep 17 00:00:00 2001
-From: dbear496 <70439542+dbear496@users.noreply.github.com>
-Date: Mon, 9 Sep 2024 23:42:52 -0400
-Subject: [PATCH 1/3] update to Boost 1.86.0
-
-fixes #2378
----
- src/filters.cc | 4 ++--
- src/utils.h | 12 ++++++------
- 2 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/src/filters.cc b/src/filters.cc
-index b5b7fb19f..eb397232d 100644
---- a/src/filters.cc
-+++ b/src/filters.cc
-@@ -238,7 +238,7 @@ void anonymize_posts::render_commodity(amount_t& amt)
- void anonymize_posts::operator()(post_t& post)
- {
- boost::uuids::detail::sha1 sha;
-- unsigned int message_digest[5];
-+ unsigned char message_digest[20];
- bool copy_xact_details = false;
-
- if (last_xact != post.xact) {
-@@ -1269,7 +1269,7 @@ void budget_posts::report_budget_items(const date_t& date)
- foreach (pending_posts_list::iterator& i, posts_to_erase)
- pending_posts.erase(i);
- }
--
-+
- if (pending_posts.size() == 0)
- return;
-
-diff --git a/src/utils.h b/src/utils.h
-index bc05ff4f9..09dd09939 100644
---- a/src/utils.h
-+++ b/src/utils.h
-@@ -578,14 +578,14 @@ inline int peek_next_nonws(std::istream& in) {
- *_p = '\0'; \
- }
-
--inline string to_hex(unsigned int * message_digest, const int len = 1)
-+inline string to_hex(unsigned char * message_digest, const int len = 4)
- {
- std::ostringstream buf;
-
-- for(int i = 0; i < 5 ; i++) {
-- buf.width(8);
-+ for(int i = 0; i < 20 ; i++) {
-+ buf.width(2);
- buf.fill('0');
-- buf << std::hex << message_digest[i];
-+ buf << std::hex << (int)message_digest[i];
- if (i + 1 >= len)
- break; // only output the first LEN dwords
- }
-@@ -598,9 +598,9 @@ inline string sha1sum(const string& str)
-
- sha.process_bytes(str.c_str(), str.length());
-
-- unsigned int message_digest[5];
-+ unsigned char message_digest[20];
- sha.get_digest(message_digest);
-- return to_hex(message_digest, 5);
-+ return to_hex(message_digest, 20);
- }
-
- extern const string version;
-
-From 4f4cc1688a8e8a7c03f18603cc5a4159d9c89ca3 Mon Sep 17 00:00:00 2001
-From: dbear496 <70439542+dbear496@users.noreply.github.com>
-Date: Sat, 14 Sep 2024 17:44:18 -0400
-Subject: [PATCH 2/3] promote compatability with Boost <1.86.0
-
----
- src/filters.cc | 6 +++---
- src/utils.h | 40 +++++++++++++++++++++++++---------------
- 2 files changed, 28 insertions(+), 18 deletions(-)
-
-diff --git a/src/filters.cc b/src/filters.cc
-index eb397232d..71d835e6f 100644
---- a/src/filters.cc
-+++ b/src/filters.cc
-@@ -238,7 +238,7 @@ void anonymize_posts::render_commodity(amount_t& amt)
- void anonymize_posts::operator()(post_t& post)
- {
- boost::uuids::detail::sha1 sha;
-- unsigned char message_digest[20];
-+ boost::uuids::detail::sha1::digest_type message_digest;
- bool copy_xact_details = false;
-
- if (last_xact != post.xact) {
-@@ -260,7 +260,7 @@ void anonymize_posts::operator()(post_t& post)
- sha.process_bytes(buf.str().c_str(), buf.str().length());
- sha.get_digest(message_digest);
-
-- xact.payee = to_hex(message_digest);
-+ xact.payee = digest_to_hex(message_digest, 8);
- xact.note = none;
- } else {
- xact.journal = post.xact->journal;
-@@ -278,7 +278,7 @@ void anonymize_posts::operator()(post_t& post)
- sha.process_bytes(buf.str().c_str(), buf.str().length());
- sha.get_digest(message_digest);
-
-- account_names.push_front(to_hex(message_digest));
-+ account_names.push_front(digest_to_hex(message_digest, 8));
- }
-
- account_t * new_account =
-diff --git a/src/utils.h b/src/utils.h
-index 09dd09939..e09c603d1 100644
---- a/src/utils.h
-+++ b/src/utils.h
-@@ -578,29 +578,39 @@ inline int peek_next_nonws(std::istream& in) {
- *_p = '\0'; \
- }
-
--inline string to_hex(unsigned char * message_digest, const int len = 4)
--{
-+inline string digest_to_hex(
-+ const boost::uuids::detail::sha1::digest_type& message_digest,
-+ size_t len = sizeof(boost::uuids::detail::sha1::digest_type) * 2
-+) {
- std::ostringstream buf;
--
-- for(int i = 0; i < 20 ; i++) {
-- buf.width(2);
-- buf.fill('0');
-- buf << std::hex << (int)message_digest[i];
-- if (i + 1 >= len)
-- break; // only output the first LEN dwords
-+ buf.setf(std::ios_base::hex, std::ios_base::basefield);
-+ buf.fill('0');
-+
-+ // sha1::digest_type is an array type and may change between Boost versions
-+ const size_t count = std::min(
-+ sizeof(message_digest) / sizeof(message_digest[0]),
-+ (len - 1) / (sizeof(message_digest[0]) * 2) + 1
-+ );
-+ for(size_t i = 0; i < count; i++) {
-+ buf.width(sizeof(message_digest[i]) * 2);
-+ buf << (unsigned int)message_digest[i];
- }
-- return buf.str();
-+ string hex = buf.str();
-+ hex.resize(len, '0'); // in case a partial element is requested
-+ return hex;
- }
-
--inline string sha1sum(const string& str)
--{
-+inline string sha1sum(
-+ const string& str,
-+ size_t len = sizeof(boost::uuids::detail::sha1::digest_type) * 2
-+) {
- boost::uuids::detail::sha1 sha;
-+ boost::uuids::detail::sha1::digest_type message_digest;
-
-+ sha.reset();
- sha.process_bytes(str.c_str(), str.length());
--
-- unsigned char message_digest[20];
- sha.get_digest(message_digest);
-- return to_hex(message_digest, 20);
-+ return digest_to_hex(message_digest, len);
- }
-
- extern const string version;
-
-From 5320c9f719a309ddacdbe77181cabeb351949013 Mon Sep 17 00:00:00 2001
-From: dbear496 <70439542+dbear496@users.noreply.github.com>
-Date: Sat, 14 Sep 2024 18:21:29 -0400
-Subject: [PATCH 3/3] use sha1sum in anonymize_posts::operator()
-
----
- src/filters.cc | 16 ++--------------
- src/utils.h | 2 +-
- 2 files changed, 3 insertions(+), 15 deletions(-)
-
-diff --git a/src/filters.cc b/src/filters.cc
-index 71d835e6f..523fa7959 100644
---- a/src/filters.cc
-+++ b/src/filters.cc
-@@ -237,8 +237,6 @@ void anonymize_posts::render_commodity(amount_t& amt)
-
- void anonymize_posts::operator()(post_t& post)
- {
-- boost::uuids::detail::sha1 sha;
-- boost::uuids::detail::sha1::digest_type message_digest;
- bool copy_xact_details = false;
-
- if (last_xact != post.xact) {
-@@ -255,12 +253,7 @@ void anonymize_posts::operator()(post_t& post)
- std::ostringstream buf;
- buf << reinterpret_cast<boost::uintmax_t>(post.xact->payee.c_str())
- << integer_gen() << post.xact->payee.c_str();
--
-- sha.reset();
-- sha.process_bytes(buf.str().c_str(), buf.str().length());
-- sha.get_digest(message_digest);
--
-- xact.payee = digest_to_hex(message_digest, 8);
-+ xact.payee = sha1sum(buf.str(), 8);
- xact.note = none;
- } else {
- xact.journal = post.xact->journal;
-@@ -273,12 +266,7 @@ void anonymize_posts::operator()(post_t& post)
- acct = acct->parent) {
- std::ostringstream buf;
- buf << integer_gen() << acct << acct->fullname();
--
-- sha.reset();
-- sha.process_bytes(buf.str().c_str(), buf.str().length());
-- sha.get_digest(message_digest);
--
-- account_names.push_front(digest_to_hex(message_digest, 8));
-+ account_names.push_front(sha1sum(buf.str(), 8));
- }
-
- account_t * new_account =
-diff --git a/src/utils.h b/src/utils.h
-index e09c603d1..13cf26f63 100644
---- a/src/utils.h
-+++ b/src/utils.h
-@@ -604,7 +604,7 @@ inline string sha1sum(
- const string& str,
- size_t len = sizeof(boost::uuids::detail::sha1::digest_type) * 2
- ) {
-- boost::uuids::detail::sha1 sha;
-+ static boost::uuids::detail::sha1 sha;
- boost::uuids::detail::sha1::digest_type message_digest;
-
- sha.reset();
diff --git a/ledger.spec b/ledger.spec
index 50a097b..457f604 100644
--- a/ledger.spec
+++ b/ledger.spec
@@ -1,13 +1,14 @@
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
Name: ledger
-Version: 3.3.2
+Version: 3.4.1
Release: %autorelease
Summary: A powerful command-line double-entry accounting system
License: BSD-3-Clause
URL: https://ledger-cli.org/
Source0: https://github.com/ledger/ledger/archive/v%{version}.tar.gz
-Patch0: ledger-boost190.patch
+
+Patch: 0001-disable-cmake-test.patch
BuildRequires: boost-devel
BuildRequires: cmake
@@ -61,7 +62,7 @@ rm -r lib/utfcpp
%cmake \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_SKIP_RPATH:BOOL=ON \
- -DUSE_PYTHON:BOOL=ONF \
+ -DUSE_PYTHON:BOOL=ON \
-DUSE_DOXYGEN:BOOL=ON \
-DBUILD_WEB_DOCS:BOOL=ON
@@ -72,9 +73,9 @@ rm -r lib/utfcpp
%cmake_install
# Bash completion
-mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
+mkdir -p %{buildroot}%{bash_completions_dir}
install -p -m0644 contrib/ledger-completion.bash \
- %{buildroot}%{_sysconfdir}/bash_completion.d/ledger
+ %{buildroot}%{bash_completions_dir}
# Install documentation manually to a convenient directory layout
rm -rf %{buildroot}%{_docdir}
@@ -84,10 +85,8 @@ rm -rf %{buildroot}%{_infodir}/*
cp -p %{__cmake_builddir}/doc/ledger3.info* %{buildroot}%{_infodir}
# Contrib scripts
-mkdir -p %{buildroot}%{_pkgdocdir}/contrib
-for i in bal bal-huquq compilation-ledger.el entry getquote.pl getquote-uk.py ledger-du README repl.sh report tc ti to trend; do
- install -p -m0644 contrib/${i} %{buildroot}%{_pkgdocdir}/contrib/${i}
-done
+mkdir -p %{buildroot}%{_pkgdocdir}
+mv %{buildroot}%{_datadir}/contrib %{buildroot}%{_pkgdocdir}/contrib
# Input samples
mkdir -p %{buildroot}%{_pkgdocdir}/samples
@@ -111,7 +110,7 @@ export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
%{_infodir}/ledger3.info*
%{_libdir}/libledger.so.3
%{_mandir}/man1/ledger.1*
-%config(noreplace) %{_sysconfdir}/bash_completion.d/ledger
+%{bash_completions_dir}
%license LICENSE.md
%files -n python3-%{name}
diff --git a/sources b/sources
index 2bfd4b8..e043607 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (v3.3.2.tar.gz) = d5d7058f0e9a02ad1d46e6780675d446070824b321f0f4c1ea6ac0c3dd4f11f259113bc36cbc796e4bb6d0a7898d6a68a25cce639e27a2b2434eec11a612ecb0
+SHA512 (v3.4.1.tar.gz) = e6e3565e422d720d6d35cae17f334e9f66a969be96a8e6e99afcae31d25f34bfce6d55c516267d1d1d459f00b492cc606d7cd8493f9c5e8520cb460d45ac9fab
reply other threads:[~2026-07-16 11:09 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=178420019458.1.5671989251923083805.rpms-ledger-de29fa98954f@fedoraproject.org \
--to=sanjay.ankur@gmail.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