gnucash: 5.8 -> 5.9

- Diff: https://github.com/Gnucash/gnucash/compare/5.8...5.9
- Update exec-fq-wrapper patch to apply cleanly
- Remove test-lots patch, fixed upstream
- Add patch to fix gnucash-cli -Q dump, remove on next release
This commit is contained in:
Yongun Seong 2024-10-01 00:01:05 +09:00
parent 23887af5ba
commit 138fd32a01
No known key found for this signature in database
3 changed files with 23 additions and 39 deletions

View File

@ -1,6 +1,6 @@
--- a/libgnucash/app-utils/gnc-quotes.cpp 2023-09-23 07:04:21.000000000 +0900
+++ b/libgnucash/app-utils/gnc-quotes.cpp 2023-09-25 11:58:46.482696433 +0900
@@ -125,7 +125,6 @@
--- a/libgnucash/app-utils/gnc-quotes.cpp 2023-09-23 07:04:21.000000000 +0900
+++ b/libgnucash/app-utils/gnc-quotes.cpp 2023-09-25 11:58:46.482696433 +0900
@@ -129,7 +129,6 @@
class GncFQQuoteSource final : public GncQuoteSource
{
@ -8,12 +8,12 @@
std::string c_fq_wrapper;
std::string m_version;
StrVec m_sources;
@@ -148,13 +147,12 @@
@@ -152,13 +151,12 @@
static const std::string empty_string{};
GncFQQuoteSource::GncFQQuoteSource() :
-c_cmd{bp::search_path("perl")},
m_version{}, m_sources{}, m_api_key{}
m_version{}, m_sources{}, m_env{boost::this_process::environment()}
{
char *bindir = gnc_path_get_bindir();
c_fq_wrapper = std::string(bindir) + "/finance-quote-wrapper";
@ -23,7 +23,7 @@
auto [rv, sources, errors] = run_cmd(args, empty_string);
if (rv)
{
@@ -200,7 +198,7 @@
@@ -192,7 +190,7 @@
QuoteResult
GncFQQuoteSource::get_quotes(const std::string& json_str) const
{
@ -32,21 +32,12 @@
return run_cmd(args, json_str);
}
@@ -218,7 +216,7 @@
@@ -209,7 +207,7 @@
auto input_buf = bp::buffer (json_string);
bp::child process;
if (m_api_key.empty())
- process = bp::child(c_cmd, args,
+ process = bp::child(c_fq_wrapper, args,
bp::std_out > out_buf,
bp::std_err > err_buf,
bp::std_in < input_buf,
@@ -227,7 +225,7 @@
#endif
svc);
else
- process = bp::child(c_cmd, args,
+ process = bp::child(c_fq_wrapper, args,
bp::std_out > out_buf,
bp::std_err > err_buf,
bp::std_in < input_buf,
- process = bp::child(c_cmd, args,
+ process = bp::child(c_fq_wrapper, args,
bp::std_out > out_buf,
bp::std_err > err_buf,
bp::std_in < input_buf,

View File

@ -1,11 +0,0 @@
--- a/libgnucash/engine/test/CMakeLists.txt 2024-02-23 09:05:19.000000000 +0900
+++ b/libgnucash/engine/test/CMakeLists.txt 2024-05-08 22:08:04.572060359 +0900
@@ -57,7 +57,6 @@
add_engine_test(test-account-object test-account-object.cpp)
add_engine_test(test-group-vs-book test-group-vs-book.cpp)
-add_engine_test(test-lots test-lots.cpp)
add_engine_test(test-querynew test-querynew.c)
add_engine_test(test-query test-query.cpp)
add_engine_test(test-split-vs-account test-split-vs-account.cpp)

View File

@ -2,6 +2,7 @@
, stdenv
, fetchFromGitHub
, fetchurl
, fetchpatch2
, aqbanking
, boost
, cmake
@ -27,12 +28,12 @@
stdenv.mkDerivation rec {
pname = "gnucash";
version = "5.8";
version = "5.9";
# raw source code doesn't work out of box; fetchFromGitHub not usable
src = fetchurl {
url = "https://github.com/Gnucash/gnucash/releases/download/${version}/gnucash-${version}.tar.bz2";
hash = "sha256-osgj+3ALnUWYaS7IE5SVm944jY7xke/k6iwCQmu1JZM=";
hash = "sha256-W+LlNk/DZGT8Msdo4qtGCmMPdNtq631EJm49q5giL9A=";
};
nativeBuildInputs = [
@ -75,9 +76,12 @@ stdenv.mkDerivation rec {
./0003-remove-valgrind.patch
# this patch makes gnucash exec the Finance::Quote wrapper directly
./0004-exec-fq-wrapper.patch
# this patch disables a flaky test
# see https://bugs.gnucash.org/show_bug.cgi?id=799289
./0005-disable-test-lots.patch
# this patch fixes gnucah-cli -Q dump, remove on next release
(fetchpatch2 {
name = "0005-fix-quote-report.patch";
url = "https://github.com/Gnucash/gnucash/commit/711554ecd5505004aee4808519d9d8e4e4ed7c9a.patch?full_index=1";
hash = "sha256-uRaUdSJu2LnYVp/3DqrK0rTnCpr7oZRtrgTPbKAHThk=";
})
];
# this needs to be an environment variable and not a cmake flag to suppress
@ -101,7 +105,7 @@ stdenv.mkDerivation rec {
owner = "Gnucash";
repo = "gnucash-docs";
rev = version;
hash = "sha256-3b1Nue3eEefDi4WI+o3ATfrsQ+H/I+QwTr4Nuc9J7Zg=";
hash = "sha256-uXpIAsucVUaAlqYTKfrfBg04Kb5Mza67l0ZU6fxkSUY=";
};
nativeBuildInputs = [ cmake ];