[PATCH] Update GnuCash to v3.4 and other improvements

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Maxim Cournoyer
Severity
normal
M
M
Maxim Cournoyer wrote on 5 Jan 2019 05:37
(name . guix-patches)(address . guix-patches@gnu.org)
87pntbpvmm.fsf@apteryx.i-did-not-set--mail-host-address--so-tickle-me
Hello,

This patch series improve our GnuCash package so that it relies less on
patches (which are harder to maintain), updates it to the latest 3.4
version, as well as clarify how the documentation output can be used.

Thanks,

Maxim
From 7bc2ef10c8be601eeed1800739a6c3f06617f02a Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Thu, 3 Jan 2019 18:07:16 -0500
Subject: [PATCH 2/5] gnu: gnucash: Convert price-quotes-perl patch to a phase.

* gnu/packages/patches/gnucash-price-quotes-perl.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Unregister it.
* gnu/packages/gnucash.scm (gnucash)[patches]: Remove it.
[phases]{fix-finance-quote-check}: Implement it using SUBSTITUTES*.
---
gnu/local.mk | 1 -
gnu/packages/gnucash.scm | 10 ++++++--
.../patches/gnucash-price-quotes-perl.patch | 24 -------------------
3 files changed, 8 insertions(+), 27 deletions(-)
delete mode 100644 gnu/packages/patches/gnucash-price-quotes-perl.patch

Toggle diff (72 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 6d4159e16..958e2cc96 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -774,7 +774,6 @@ dist_patch_DATA = \
%D%/packages/patches/gmp-faulty-test.patch \
%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/gnucash-fix-test-transaction-failure.patch \
%D%/packages/patches/gnutls-skip-trust-store-test.patch \
diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index e85a538c4..015e2b045 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -60,8 +60,7 @@
(sha256
(base32
"0grr5qi5rn1xvr7qx5d7mcxa2mcgycy2b325ry73bb485a6yv5l3"))
- (patches (search-patches "gnucash-price-quotes-perl.patch"
- "gnucash-disable-failing-tests.patch"
+ (patches (search-patches "gnucash-disable-failing-tests.patch"
"gnucash-fix-test-transaction-failure.patch"))))
(build-system cmake-build-system)
(inputs
@@ -119,6 +118,13 @@
(("set\\(SHELL /bin/bash\\)")
(string-append "set(SHELL " (which "bash") ")")))
#t)))
+ ;; After wrapping gnc-fq-check and gnc-fq-helper we can no longer
+ ;; execute them with perl, so execute them directly instead.
+ (add-after 'unpack 'fix-finance-quote-check
+ (lambda _
+ (substitute* "libgnucash/scm/price-quotes.scm"
+ (("\"perl\" \"-w\" ") ""))
+ #t))
;; There are about 100 megabytes of documentation.
(add-after 'install 'install-docs
(lambda* (#:key inputs outputs #:allow-other-keys)
diff --git a/gnu/packages/patches/gnucash-price-quotes-perl.patch b/gnu/packages/patches/gnucash-price-quotes-perl.patch
deleted file mode 100644
index 3101ddb00..000000000
--- a/gnu/packages/patches/gnucash-price-quotes-perl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-After wrapping gnc-fq-check and gnc-fq-helper we can no longer execute them
-with perl, so execute them directly instead.
-
-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*))
- (set! program (gnc-spawn-process-async
-- (list "perl" "-w" gnc:*finance-quote-check*) #t))))
-+ (list gnc:*finance-quote-check*) #t))))
-
- (define (get-sources)
- (if (not (null? program))
-@@ -158,7 +158,7 @@
- (define (start-quoter)
- (if (not (string-null? gnc:*finance-quote-helper*))
- (set! quoter (gnc-spawn-process-async
-- (list "perl" "-w" gnc:*finance-quote-helper*) #t))))
-+ (list gnc:*finance-quote-helper*) #t))))
-
- (define (get-quotes)
- (if (not (null? quoter))
--
2.20.1
From ffddd751ffed28523a2cfaadc200b9f90330fdfe Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Thu, 3 Jan 2019 18:26:43 -0500
Subject: [PATCH 4/5] gnu: gnucash: Update to 3.4.

* gnu/packages/gnucash.scm (gnucash): Update to 3.4.
[outputs]: Add debug.
(gnucash-docs): Update to 3.4-1.
[native-inputs]: Update docbook-xml to version 4.5 and drop older versions.
---
gnu/packages/gnucash.scm | 69 +++++++++++++++++++++-------------------
1 file changed, 37 insertions(+), 32 deletions(-)

Toggle diff (108 lines)
diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index 58b46243a..057ca709d 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -49,9 +49,11 @@
#:use-module (gnu packages xml))
(define-public gnucash
+ ;; TODO: Unbundle libraries such as guile-json found under the "borrowed/"
+ ;; directory.
(package
(name "gnucash")
- (version "3.3")
+ (version "3.4")
(source
(origin
(method url-fetch)
@@ -59,7 +61,7 @@
version "/gnucash-" version ".tar.bz2"))
(sha256
(base32
- "0grr5qi5rn1xvr7qx5d7mcxa2mcgycy2b325ry73bb485a6yv5l3"))
+ "1ms2wg4sh5gq3rpjmmnp85rh5nc9ahca1imxkvhz4d3yiwy8hm52"))
(patches (search-patches "gnucash-fix-test-transaction-failure.patch"))))
(build-system cmake-build-system)
(inputs
@@ -83,7 +85,7 @@
("googletest" ,googletest)
("gnucash-docs" ,gnucash-docs)
("pkg-config" ,pkg-config)))
- (outputs '("out" "doc"))
+ (outputs '("out" "doc" "debug"))
(arguments
`(#:test-target "check"
#:configure-flags
@@ -192,38 +194,41 @@ financial calculations or scheduled transactions.")
;; This package is not public, since we use it to build the "doc" output of
;; the gnucash package (see above). It would be confusing if it were public.
(define gnucash-docs
- (package
- (name "gnucash-docs")
- (version (package-version gnucash))
- (source
- (origin
- (method url-fetch)
- (uri (string-append "mirror://sourceforge/gnucash/gnucash%20%28stable%29/"
- version "/gnucash-docs-" version ".tar.gz"))
- (sha256
- (base32
- "10v4hw4lh888r8yv473pqrvzfjg8dwamk62sghs93rn88ndwm16c"))))
- (build-system gnu-build-system)
- ;; These are native-inputs because they are only required for building the
- ;; documentation.
- (native-inputs
- `(("libxml2" ,libxml2)
- ;; The "check" target needs the docbook xml packages for validating the
- ;; DocBook XML during the tests.
- ("docbook-xml-4.4" ,docbook-xml-4.4)
- ("docbook-xml-4.2" ,docbook-xml-4.2)
- ("docbook-xml-4.1.2" ,docbook-xml-4.1.2)
- ("libxslt" ,libxslt)
- ("docbook-xsl" ,docbook-xsl)
- ("scrollkeeper" ,scrollkeeper)))
- (home-page "https://www.gnucash.org/")
- (synopsis "Documentation for GnuCash")
- (description
- "User guide and other documentation for GnuCash in various languages.
+ (let ((revision "1")) ;set to the empty string when no revision
+ (package
+ (name "gnucash-docs")
+ (version (package-version gnucash))
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/gnucash/gnucash%20%28stable%29/"
+ version "/gnucash-docs-" version
+ (if (string-null? revision)
+ ""
+ (string-append "-" revision))
+ ".tar.gz"))
+ (sha256
+ (base32
+ "0bgjxpxgk7hy8ihn1kvd8p6vv191q5md2hz6jb9mqc4aykpvdlq7"))))
+ (build-system gnu-build-system)
+ ;; These are native-inputs because they are only required for building the
+ ;; documentation.
+ (native-inputs
+ `(("libxml2" ,libxml2)
+ ;; The "check" target needs the docbook xml package for validating the
+ ;; DocBook XML during the tests.
+ ("docbook-xml" ,docbook-xml)
+ ("libxslt" ,libxslt)
+ ("docbook-xsl" ,docbook-xsl)
+ ("scrollkeeper" ,scrollkeeper)))
+ (home-page "https://www.gnucash.org/")
+ (synopsis "Documentation for GnuCash")
+ (description
+ "User guide and other documentation for GnuCash in various languages.
This package exists because the GnuCash project maintains its documentation in
an entirely separate package from the actual GnuCash program. It is intended
to be read using the GNOME Yelp program.")
- (license (list license:fdl1.1+ license:gpl3+))))
+ (license (list license:fdl1.1+ license:gpl3+)))))
(define-public gwenhywfar
(package
--
2.20.1
From e65ecdc8e0f1ebd9c05ed9f06d623947cac5f9d9 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Fri, 4 Jan 2019 23:11:15 -0500
Subject: [PATCH 5/5] gnu: gnucash: Add information about how to use the
documentation.

It was not obvious that another application, Yelp, needed to be installed to
so that opening the help of GnuCash from within the application would work.


* gnu/packages/gnucash.scm (gnucash)[description]: Explain how to enable the
documentation.
---
gnu/packages/gnucash.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index 057ca709d..b22045eb8 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -188,7 +188,10 @@
It can be used to track bank accounts, stocks, income and expenses, based on
the double-entry accounting practice. It includes support for QIF/OFX/HBCI
import and transaction matching. It also automates several tasks, such as
-financial calculations or scheduled transactions.")
+financial calculations or scheduled transactions.
+
+To make the GnuCash documentation available, its doc output must be
+installed as well as Yelp, the Gnome help browser.")
(license license:gpl3+)))
;; This package is not public, since we use it to build the "doc" output of
--
2.20.1
L
L
Ludovic Courtès wrote on 21 Jan 2019 22:49
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 33985@debbugs.gnu.org)
877eexisu9.fsf@gnu.org
Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (4 lines)
> This patch series improve our GnuCash package so that it relies less on
> patches (which are harder to maintain), updates it to the latest 3.4
> version, as well as clarify how the documentation output can be used.

All five patches LGTM, thank you!

Ludo’.

PS: To all the committers reading this: please consider reviewing your
fellow hacker patches! :-)
M
M
Maxim Cournoyer wrote on 23 Jan 2019 13:53
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 33985-done@debbugs.gnu.org)
8736pjeds2.fsf@gmail.com
Hello!

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (10 lines)
> Hi Maxim,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> This patch series improve our GnuCash package so that it relies less on
>> patches (which are harder to maintain), updates it to the latest 3.4
>> version, as well as clarify how the documentation output can be used.
>
> All five patches LGTM, thank you!

Pushed to master, thanks for the review!

Toggle quote (5 lines)
> Ludo’.
>
> PS: To all the committers reading this: please consider reviewing your
> fellow hacker patches! :-)

I hear you! :-)

Have a nice day,

Maxim
Closed
?