[PATCH] gnu: gnucash: Update to 3.2.

  • Done
  • quality assurance status badge
Details
2 participants
  • Kei Kebreau
  • Ludovic Courtès
Owner
unassigned
Submitted by
Kei Kebreau
Severity
normal

Debbugs page

Kei Kebreau wrote 6 years ago
(address . guix-patches@gnu.org)(name . Kei Kebreau)(address . kkebreau@posteo.net)
20180922052514.25030-1-kkebreau@posteo.net
* gnu/packages/patches/gnucash-disable-failing-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/gnucash.scm (gnucash): Update to 3.2.
[source]: Add patch.
[arguments]: Add 'glib-or-gtk-compile-schemas' and 'glib-or-gtk-wrap' phases..
---
gnu/local.mk | 1 +
gnu/packages/gnucash.scm | 28 ++++++++-----
.../gnucash-disable-failing-tests.patch | 39 +++++++++++++++++++
.../patches/gnucash-price-quotes-perl.patch | 5 ++-
4 files changed, 62 insertions(+), 11 deletions(-)
create mode 100644 gnu/packages/patches/gnucash-disable-failing-tests.patch

Toggle diff (150 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index daf96ea4b..f1bda31e1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -761,6 +761,7 @@ dist_patch_DATA = \
%D%/packages/patches/gnome-todo-libical-compat.patch \
%D%/packages/patches/gnome-tweak-tool-search-paths.patch \
%D%/packages/patches/gnucash-price-quotes-perl.patch \
+ %D%/packages/patches/gnucash-disable-failing-tests.patch \
%D%/packages/patches/gnutls-skip-trust-store-test.patch \
%D%/packages/patches/gnutls-skip-pkgconfig-test.patch \
%D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \
diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index fc8a9b6bf..f87a8c3ee 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -50,7 +50,7 @@
(define-public gnucash
(package
(name "gnucash")
- (version "3.0")
+ (version "3.2")
(source
(origin
(method url-fetch)
@@ -58,11 +58,9 @@
version "/gnucash-" version ".tar.bz2"))
(sha256
(base32
- "1ffvf1rryg5yin86fnf1zvy6hnpwzrjarbdfmjmrf2mqlmv48xac"))
-
- ;; TODO: rebase this patch
-; (patches (search-patches "gnucash-price-quotes-perl.patch"))
- ))
+ "0li4b6pvlahgh5n9v91yxfgm972a1kky80xw3q1ggl4f2h6b1rb3"))
+ (patches (search-patches "gnucash-price-quotes-perl.patch"
+ "gnucash-disable-failing-tests.patch"))))
(build-system cmake-build-system)
(inputs
`(("guile" ,guile-2.2)
@@ -90,6 +88,12 @@
#:configure-flags
(list "-DWITH_OFX=OFF" ; libofx is not available yet
"-DWITH_SQL=OFF") ; without dbi.h
+ #:modules ((guix build cmake-build-system)
+ ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
+ (guix build utils))
+ #:imported-modules (,@%gnu-build-system-modules
+ (guix build cmake-build-system)
+ (guix build glib-or-gtk-build-system))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'unpack-gmock
@@ -105,8 +109,10 @@
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((docs (assoc-ref inputs "gnucash-docs"))
(doc-output (assoc-ref outputs "doc")))
+ (mkdir-p (string-append doc-output "/share"))
(symlink (string-append docs "/share/gnome")
- (string-append doc-output "/share/gnome")))))
+ (string-append doc-output "/share/gnome"))
+ #t)))
(add-after
'install-docs 'wrap-programs
(lambda* (#:key inputs outputs #:allow-other-keys)
@@ -134,7 +140,11 @@
'("gnucash"
"gnc-fq-check"
"gnc-fq-helper"
- "gnc-fq-dump")))))))
+ "gnc-fq-dump"))))
+ (add-after 'install 'glib-or-gtk-compile-schemas
+ (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
+ (add-after 'install 'glib-or-gtk-wrap
+ (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
(home-page "https://www.gnucash.org/")
(synopsis "Personal and small business financial accounting software")
(description
@@ -158,7 +168,7 @@ financial calculations or scheduled transactions.")
version "/gnucash-docs-" version ".tar.gz"))
(sha256
(base32
- "0yq65s3z3dwdwdf2nq1d1w9ckdjdyjwkfpmvhzyib54b66q65xh5"))))
+ "1763m6d8gkhllwb9rnr9ifch39brmh7kr2m6icqfbc53a91m56j6"))))
(build-system gnu-build-system)
;; These are native-inputs because they are only required for building the
;; documentation.
diff --git a/gnu/packages/patches/gnucash-disable-failing-tests.patch b/gnu/packages/patches/gnucash-disable-failing-tests.patch
new file mode 100644
index 000000000..8f7f3c289
--- /dev/null
+++ b/gnu/packages/patches/gnucash-disable-failing-tests.patch
@@ -0,0 +1,39 @@
+diff -ur gnucash-3.2.old/libgnucash/backend/xml/test/CMakeLists.txt gnucash-3.2/libgnucash/backend/xml/test/CMakeLists.txt
+--- gnucash-3.2.old/libgnucash/backend/xml/test/CMakeLists.txt 2018-09-16 22:07:42.445865806 -0400
++++ gnucash-3.2/libgnucash/backend/xml/test/CMakeLists.txt 2018-09-16 22:08:29.246608711 -0400
+@@ -95,14 +95,3 @@
+ if (${CMAKE_VERSION} VERSION_GREATER 3.1)
+ set(CMAKE_COMMAND_TMP ${CMAKE_COMMAND} -E env)
+ endif()
+-
+-set(test-real-data-env
+- SRCDIR=${CMAKE_CURRENT_SOURCE_DIR}
+- VERBOSE=yes
+- TEST_PATH=${CMAKE_BINARY_DIR}/bin
+-)
+-add_test(NAME test-real-data
+- COMMAND ${CMAKE_COMMAND_TMP}
+- ${SHELL} ${CMAKE_CURRENT_SOURCE_DIR}/test-real-data.sh
+-)
+-set_tests_properties(test-real-data PROPERTIES ENVIRONMENT "${test-real-data-env}")
+diff -ur gnucash-3.2.old/libgnucash/engine/test/CMakeLists.txt gnucash-3.2/libgnucash/engine/test/CMakeLists.txt
+--- gnucash-3.2.old/libgnucash/engine/test/CMakeLists.txt 2018-09-16 22:07:42.485866441 -0400
++++ gnucash-3.2/libgnucash/engine/test/CMakeLists.txt 2018-09-16 22:09:32.243609266 -0400
+@@ -55,8 +55,6 @@
+ # This test does not run on Win32
+ if (NOT WIN32)
+ set(SOURCES ${test_qof_SOURCES} ${CMAKE_SOURCE_DIR}/common/test-core/unittest-support.c)
+- add_engine_test(test-qof "${SOURCES}")
+- target_compile_definitions(test-qof PRIVATE TESTPROG=test_qof)
+
+ set(SOURCES ${test_engine_SOURCES} ${CMAKE_SOURCE_DIR}/common/test-core/unittest-support.c)
+ add_engine_test(test-engine "${SOURCES}")
+@@ -182,8 +180,6 @@
+ ${MODULEPATH}/gnc-timezone.cpp
+ gtest-gnc-timezone.cpp
+ ${GTEST_SRC})
+-gnc_add_test(test-gnc-timezone "${test_gnc_timezone_SOURCES}"
+- gtest_engine_INCLUDES gtest_old_engine_LIBS)
+
+ set(test_gnc_datetime_SOURCES
+ ${MODULEPATH}/gnc-datetime.cpp
diff --git a/gnu/packages/patches/gnucash-price-quotes-perl.patch b/gnu/packages/patches/gnucash-price-quotes-perl.patch
index 982763f0e..3101ddb00 100644
--- a/gnu/packages/patches/gnucash-price-quotes-perl.patch
+++ b/gnu/packages/patches/gnucash-price-quotes-perl.patch
@@ -1,8 +1,9 @@
After wrapping gnc-fq-check and gnc-fq-helper we can no longer execute them
with perl, so execute them directly instead.
---- gnucash-2.6.6/src/scm/price-quotes.scm.orig 2014-04-27 17:42:28.000000000 -0500
-+++ gnucash-2.6.6/src/scm/price-quotes.scm 2015-07-09 16:12:11.196218472 -0500
+diff -ur gnucash-3.2.old/libgnucash/scm/price-quotes.scm gnucash-3.2/libgnucash/scm/price-quotes.scm
+--- gnucash-3.2.old/libgnucash/scm/price-quotes.scm 2018-09-15 00:48:33.718389646 -0400
++++ gnucash-3.2/libgnucash/scm/price-quotes.scm 2018-09-15 13:51:49.249862724 -0400
@@ -74,7 +74,7 @@
(define (start-program)
(if (not (string-null? gnc:*finance-quote-check*))
--
2.19.0
Ludovic Courtès wrote 6 years ago
(name . Kei Kebreau)(address . kkebreau@posteo.net)(address . 32802@debbugs.gnu.org)
87a7o7w07f.fsf@gnu.org
Hello,

Kei Kebreau <kkebreau@posteo.net> skribis:

Toggle quote (6 lines)
> * gnu/packages/patches/gnucash-disable-failing-tests.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Register it.
> * gnu/packages/gnucash.scm (gnucash): Update to 3.2.
> [source]: Add patch.
> [arguments]: Add 'glib-or-gtk-compile-schemas' and 'glib-or-gtk-wrap' phases..

[...]

Toggle quote (7 lines)
> --- /dev/null
> +++ b/gnu/packages/patches/gnucash-disable-failing-tests.patch
> @@ -0,0 +1,39 @@
> +diff -ur gnucash-3.2.old/libgnucash/backend/xml/test/CMakeLists.txt gnucash-3.2/libgnucash/backend/xml/test/CMakeLists.txt
> +--- gnucash-3.2.old/libgnucash/backend/xml/test/CMakeLists.txt 2018-09-16 22:07:42.445865806 -0400
> ++++ gnucash-3.2/libgnucash/backend/xml/test/CMakeLists.txt 2018-09-16 22:08:29.246608711 -0400

Please add couple of lines at the top explaining what the patch does and
roughly what the problem is with these tests.

Toggle quote (3 lines)
> +-gnc_add_test(test-gnc-timezone "${test_gnc_timezone_SOURCES}"
> +- gtest_engine_INCLUDES gtest_old_engine_LIBS)

Could it be that you need ‘tzdata-for-tests’ as an input, with TZDIR set
accordingly?

Otherwise LGTM, thanks!

Ludo’.
Kei Kebreau wrote 6 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 32802@debbugs.gnu.org)
874le08f1x.fsf@posteo.net
ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (26 lines)
> Hello,
>
> Kei Kebreau <kkebreau@posteo.net> skribis:
>
>> * gnu/packages/patches/gnucash-disable-failing-tests.patch: New file.
>> * gnu/local.mk (dist_patch_DATA): Register it.
>> * gnu/packages/gnucash.scm (gnucash): Update to 3.2.
>> [source]: Add patch.
>> [arguments]: Add 'glib-or-gtk-compile-schemas' and 'glib-or-gtk-wrap' phases..
>
> [...]
>
>> --- /dev/null
>> +++ b/gnu/packages/patches/gnucash-disable-failing-tests.patch
>> @@ -0,0 +1,39 @@
>> +diff -ur gnucash-3.2.old/libgnucash/backend/xml/test/CMakeLists.txt
>> gnucash-3.2/libgnucash/backend/xml/test/CMakeLists.txt
>> +--- gnucash-3.2.old/libgnucash/backend/xml/test/CMakeLists.txt
>> 2018-09-16 22:07:42.445865806 -0400
>> ++++ gnucash-3.2/libgnucash/backend/xml/test/CMakeLists.txt
>> 2018-09-16 22:08:29.246608711 -0400
>
> Please add couple of lines at the top explaining what the patch does and
> roughly what the problem is with these tests.
>

Done!

Toggle quote (7 lines)
>> +-gnc_add_test(test-gnc-timezone "${test_gnc_timezone_SOURCES}"
>> +- gtest_engine_INCLUDES gtest_old_engine_LIBS)
>
> Could it be that you need ‘tzdata-for-tests’ as an input, with TZDIR set
> accordingly?
>

Yes, this fixed the "test-real-data" test.

Toggle quote (4 lines)
> Otherwise LGTM, thanks!
>
> Ludo’.

Pushed to master with the newly-released GnuCash 3.3!
Kei Kebreau wrote 6 years ago
(address . 32802-done@debbugs.gnu.org)
87pnwnt5da.fsf@posteo.net
Done.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 32802@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 32802
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help