[PATCH] gnu: dbacl: Fix failing check phase.

  • Done
  • quality assurance status badge
Details
5 participants
  • Danny O'Brien
  • danny
  • Ludovic Courtès
  • Maxim Cournoyer
  • Tobias Geerinckx-Rice
Owner
unassigned
Submitted by
danny
Severity
normal
Merged with
D
D
danny wrote on 4 Feb 2023 06:08
(address . guix-patches@gnu.org)(name . Danny O'Brien)(address . danny@spesh.com)
2f81f17ea425ae674aedb7f92826e58c8bea4412.1675487305.git.danny@spesh.com
From: Danny O'Brien <danny@spesh.com>

* gnu/packages/textutils.scm (dbacl): New patch.
* gnu/packages/patches/dbacl-icheck-multiple-definitions.patch: New file.
---
.../dbacl-icheck-multiple-definitions.patch | 33 +++++
gnu/packages/textutils.scm | 114 +++++++++---------
2 files changed, 92 insertions(+), 55 deletions(-)
create mode 100644 gnu/packages/patches/dbacl-icheck-multiple-definitions.patch

Toggle diff (180 lines)
diff --git a/gnu/packages/patches/dbacl-icheck-multiple-definitions.patch b/gnu/packages/patches/dbacl-icheck-multiple-definitions.patch
new file mode 100644
index 0000000000..e82d0819bb
--- /dev/null
+++ b/gnu/packages/patches/dbacl-icheck-multiple-definitions.patch
@@ -0,0 +1,33 @@
+From f5df6813e305372e25b8a2124c491293a176e115 Mon Sep 17 00:00:00 2001
+From: Danny O'Brien <danny@spesh.com>
+Date: Fri, 3 Feb 2023 16:48:59 -0800
+Subject: [PATCH] Fix failing build of icheck.
+
+Building icheck fails with a duplicate symbol definition
+error. This allows the icheck executable to compile.
+
+Submitted upstream[1] but not yet moderated/accepted.
+
+[1] https://sourceforge.net/p/dbacl/discussion/239876/thread/87636b0114/
+
+---
+ src/icheck.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/icheck.c b/src/icheck.c
+index efbb6a5..12a3b7a 100644
+--- a/src/icheck.c
++++ b/src/icheck.c
+@@ -39,9 +39,6 @@ extern regex_count_t regex_count;
+ extern empirical_t empirical;
+
+ extern int cmd;
+-char *progname = "icheck";
+-char *inputfile = "";
+-long inputline = 0;
+
+ extern long system_pagesize;
+ extern void *in_iobuf;
+--
+2.39.1
+
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 151add964e..5ead8dec96 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -705,59 +705,63 @@ (define-public dbacl
(package
(name "dbacl")
(version "1.14.1")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "mirror://sourceforge/dbacl/dbacl/" version "/"
- "dbacl-" version ".tar.gz"))
- (sha256
- (base32 "1gas0112wqjvwn9qg3hxnawk7h3prr0w9b2h68f3p1ifd1kzn3gz"))
- (patches (search-patches "dbacl-include-locale.h.patch"))))
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/dbacl/dbacl/"
+ version
+ "/"
+ "dbacl-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "1gas0112wqjvwn9qg3hxnawk7h3prr0w9b2h68f3p1ifd1kzn3gz"))
+ (patches (search-patches "dbacl-include-locale.h.patch"
+ "dbacl-icheck-multiple-definitions.patch"))))
(build-system gnu-build-system)
(arguments
- `(#:make-flags
- (list
- (string-append "-I" (assoc-ref %build-inputs "slang")
- "/include/slang")
- (string-append "-I" (assoc-ref %build-inputs "ncurses")
- "/include/ncurses"))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'delete-sample6-and-japanese
- (lambda _
- (substitute* "doc/Makefile.am"
- (("sample6.txt") "")
- (("japanese.txt") ""))
- (delete-file "doc/sample6.txt")
- (delete-file "doc/japanese.txt")
- (substitute* (list "src/tests/Makefile.am"
- "src/tests/Makefile.in")
- (("dbacl-jap.shin") "")
- (("dbacl-jap.sh") ""))
- #t))
- (add-after 'unpack 'delete-test
- ;; See comments about the license.
- (lambda _
- (delete-file "src/tests/dbacl-jap.shin")
- #t))
- (add-after 'unpack 'fix-test-files
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin")))
- (substitute* (find-files "src/tests/" "\\.shin$")
- (("PATH=/bin:/usr/bin")
- "#PATH=/bin:/usr/bin")
- (("diff") (string-append (which "diff")))
- (("tr") (string-append (which "tr"))))
- #t)))
- (replace 'bootstrap
- (lambda _
- (invoke "autoreconf" "-vif")
- #t)))))
- (inputs
- (list ncurses perl readline slang))
- (native-inputs
- (list libtool autoconf automake pkg-config))
+ `(#:make-flags (list (string-append "-I"
+ (assoc-ref %build-inputs "slang")
+ "/include/slang")
+ (string-append "-I"
+ (assoc-ref %build-inputs "ncurses")
+ "/include/ncurses"))
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'delete-sample6-and-japanese
+ (lambda _
+ (substitute* "doc/Makefile.am"
+ (("sample6.txt")
+ "")
+ (("japanese.txt")
+ ""))
+ (delete-file "doc/sample6.txt")
+ (delete-file "doc/japanese.txt")
+ (substitute* (list "src/tests/Makefile.am"
+ "src/tests/Makefile.in")
+ (("dbacl-jap.shin")
+ "")
+ (("dbacl-jap.sh")
+ "")) #t))
+ (add-after 'unpack 'delete-test
+ ;; See comments about the license.
+ (lambda _
+ (delete-file "src/tests/dbacl-jap.shin") #t))
+ (add-after 'unpack 'fix-test-files
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (substitute* (find-files "src/tests/" "\\.shin$")
+ (("PATH=/bin:/usr/bin")
+ "#PATH=/bin:/usr/bin")
+ (("diff")
+ (string-append (which "diff")))
+ (("tr")
+ (string-append (which "tr")))) #t)))
+ (replace 'bootstrap
+ (lambda _
+ (invoke "autoreconf" "-vif") #t)))))
+ (inputs (list ncurses perl readline slang))
+ (native-inputs (list libtool autoconf automake pkg-config))
(home-page "https://www.lbreyer.com/dbacl.html")
(synopsis "Bayesian text and email classifier")
(description
@@ -768,13 +772,13 @@ (define-public dbacl
;; The software is licensed as GPLv3 or later, but
;; includes various sample texts in the doc dir:
;; - sample1.txt, sample3 and sampe5.txt are in the public domain,
- ;; by Mark Twain.
+ ;; by Mark Twain.
;; - sample2.txt, sample4.txt are in the public domain, by Aristotle.
;; - sample6.txt is a forwarded email, copyright unknown.
- ;; Guix does exclude sample6.txt.
+ ;; Guix does exclude sample6.txt.
;; - japanese.txt is a Japanese unoffical translation of the
- ;; GNU General Public License, (c) by the Free Software Foundation.
- ;; Guix excludes this file.
+ ;; GNU General Public License, (c) by the Free Software Foundation.
+ ;; Guix excludes this file.
(license (list license:gpl3+ license:public-domain))))
(define-public dotconf

base-commit: c3e50c731d8c175133cae1869e445cbb7a3b4d6f
--
2.39.1
T
T
Tobias Geerinckx-Rice wrote on 4 Feb 2023 10:47
(address . control@debbugs.gnu.org)
B1B33D7A-BE3C-48FF-989B-85207B3A8494@tobias.gr
merge 61263 61270
thanks

Kind regards,

T G-R

Sent on the go. Excuse or enjoy my brevity.
T
T
Tobias Geerinckx-Rice wrote on 4 Feb 2023 11:07
(name . Danny O'Brien)(address . danny@spesh.com)
1FBBFFA5-565C-4CD2-8744-518652E1DC53@tobias.gr
Hi Danny,

Low-quality review incoming.

I've merged the two duplicate-looking bugs 61263 & 61270. What happened?

When adding new patch files, you need also add them to gnu/local.mk's sorted dist_patch_DATA list. Thanks for submitting it upstream!

Reviewing the rest in K-9 is difficult because of the sweeping indentation changes. Could you submit a v2 without them?

I suspect I'm disagreeing with 'guix style' and not with you, but the 'source' , '#t', and comment changes are steps back IMO (that poor "/"!).

As a rule, there's no requirement to blanket reformat existing code in Guix. 'guix style' isn't there yet.

Removing the obsolete '#t's entirely is welcome though—in a separate commit.

Thanks!

T G-R

Sent on the go. Excuse or enjoy my brevity.
D
D
Danny O'Brien wrote on 5 Feb 2023 05:53
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)
CAAkY2sfwK1-4ZNgyzMkTQ5ZrPWtSfgeOuVQiq6abDBgq1yQpWQ@mail.gmail.com
On Sat, Feb 04, 2023 at 2:07 AM, Tobias Geerinckx-Rice <me@tobias.gr> wrote:

Toggle quote (8 lines)
> Hi Danny,
>
> Low-quality review incoming.
>
> I've merged the two duplicate-looking bugs 61263 & 61270. What happened?
>


I think I didn't spot that the earlier submission went through.


Toggle quote (4 lines)
> When adding new patch files, you need also add them to gnu/local.mk's
> sorted dist_patch_DATA list. Thanks for submitting it upstream!
>

Ah, will do!



Reviewing the rest in K-9 is difficult because of the sweeping indentation
Toggle quote (19 lines)
> changes. Could you submit a v2 without them?
>
> I suspect I'm disagreeing with 'guix style' and not with you, but the
> 'source' , '#t', and comment changes are steps back IMO (that poor "/"!).
>
> As a rule, there's no requirement to blanket reformat existing code in
> Guix. 'guix style' isn't there yet.
>
> Removing the obsolete '#t's entirely is welcome though—in a separate
> commit.
>
> Thanks!
>
> T G-R
>
> Sent on the go. Excuse or enjoy my brevity.
>


Yep, that was all due to `guix style` — the instructions say to run it, but
that may be different if it's just tweaking an existing hand-crafted
package description. I'll re-submit.

Thanks for your suggestions!

d.
Attachment: file
L
L
Ludovic Courtès wrote on 4 Mar 2023 17:37
Re: bug#61270: [PATCH] gnu: dbacl: Fix failing check phase.
(name . Danny O'Brien)(address . danny@spesh.com)
87ttz0scag.fsf_-_@gnu.org
Hi Danny,

"Danny O'Brien" <danny@spesh.com> skribis:

Toggle quote (4 lines)
> Yep, that was all due to `guix style` — the instructions say to run it, but
> that may be different if it's just tweaking an existing hand-crafted
> package description. I'll re-submit.

Did you get a chance to look into it? We’re close to the finish line!

TIA,
Ludo’.
D
D
Danny O'Brien wrote on 5 Mar 2023 08:24
(name . Ludovic Courtès)(address . ludo@gnu.org)
ZARDtUMqgtSR26h7@workboat.fil.org
On Sat, Mar 04, 2023 at 05:37:27PM +0100, Ludovic Courtès wrote:
Toggle quote (13 lines)
> Hi Danny,
>
> "Danny O'Brien" <danny@spesh.com> skribis:
>
> > Yep, that was all due to `guix style` — the instructions say to run it, but
> > that may be different if it's just tweaking an existing hand-crafted
> > package description. I'll re-submit.
>
> Did you get a chance to look into it? We’re close to the finish line!
>
> TIA,
> Ludo’.

Let's try this:


From a235a39729579a7b0f49326fcfc6f5a291074b01 Mon Sep 17 00:00:00 2001
Message-Id: <a235a39729579a7b0f49326fcfc6f5a291074b01.1678000253.git.danny@spesh.com>
From: Danny O'Brien <danny@spesh.com>
Date: Sat, 4 Mar 2023 23:09:27 -0800
Subject: [PATCH] gnu: dbacl: Fix failing check phase.

* gnu/packages/textutils.scm (dbacl): New patch.
* gnu/packages/patches/dbacl-icheck-multiple-definitions.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
.../dbacl-icheck-multiple-definitions.patch | 33 +++++++++++++++++++
gnu/packages/textutils.scm | 3 +-
3 files changed, 36 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/dbacl-icheck-multiple-definitions.patch

Toggle diff (74 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 415955bd3f..dfd0448502 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1027,6 +1027,7 @@ dist_patch_DATA = \
%D%/packages/patches/date-output-pkg-config-files.patch \
%D%/packages/patches/datefudge-gettimeofday.patch \
%D%/packages/patches/dbacl-include-locale.h.patch \
+ %D%/packages/patches/dbacl-icheck-multiple-definitions.patch \
%D%/packages/patches/dbus-helper-search-path.patch \
%D%/packages/patches/dbus-c++-gcc-compat.patch \
%D%/packages/patches/dbus-c++-threading-mutex.patch \
diff --git a/gnu/packages/patches/dbacl-icheck-multiple-definitions.patch b/gnu/packages/patches/dbacl-icheck-multiple-definitions.patch
new file mode 100644
index 0000000000..e82d0819bb
--- /dev/null
+++ b/gnu/packages/patches/dbacl-icheck-multiple-definitions.patch
@@ -0,0 +1,33 @@
+From f5df6813e305372e25b8a2124c491293a176e115 Mon Sep 17 00:00:00 2001
+From: Danny O'Brien <danny@spesh.com>
+Date: Fri, 3 Feb 2023 16:48:59 -0800
+Subject: [PATCH] Fix failing build of icheck.
+
+Building icheck fails with a duplicate symbol definition
+error. This allows the icheck executable to compile.
+
+Submitted upstream[1] but not yet moderated/accepted.
+
+[1] https://sourceforge.net/p/dbacl/discussion/239876/thread/87636b0114/
+
+---
+ src/icheck.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/icheck.c b/src/icheck.c
+index efbb6a5..12a3b7a 100644
+--- a/src/icheck.c
++++ b/src/icheck.c
+@@ -39,9 +39,6 @@ extern regex_count_t regex_count;
+ extern empirical_t empirical;
+
+ extern int cmd;
+-char *progname = "icheck";
+-char *inputfile = "";
+-long inputline = 0;
+
+ extern long system_pagesize;
+ extern void *in_iobuf;
+--
+2.39.1
+
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index e5d3a0efc0..1092f1860b 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -25,6 +25,7 @@
;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
;;; Copyright © 2022 Gabriel Wicki <gabriel@erlikon.ch>
+;;; Copyright © 2022 Danny O'Brien <danny@spesh.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -711,7 +712,7 @@ (define-public dbacl
"dbacl-" version ".tar.gz"))
(sha256
(base32 "1gas0112wqjvwn9qg3hxnawk7h3prr0w9b2h68f3p1ifd1kzn3gz"))
- (patches (search-patches "dbacl-include-locale.h.patch"))))
+ (patches (search-patches "dbacl-include-locale.h.patch" "dbacl-icheck-multiple-definitions.patch"))))
(build-system gnu-build-system)
(arguments
`(#:make-flags
--
2.39.1
From a235a39729579a7b0f49326fcfc6f5a291074b01 Mon Sep 17 00:00:00 2001
Message-Id: <a235a39729579a7b0f49326fcfc6f5a291074b01.1678000253.git.danny@spesh.com>
From: Danny O'Brien <danny@spesh.com>
Date: Sat, 4 Mar 2023 23:09:27 -0800
Subject: [PATCH] gnu: dbacl: Fix failing check phase.

* gnu/packages/textutils.scm (dbacl): New patch.
* gnu/packages/patches/dbacl-icheck-multiple-definitions.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
.../dbacl-icheck-multiple-definitions.patch | 33 +++++++++++++++++++
gnu/packages/textutils.scm | 3 +-
3 files changed, 36 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/dbacl-icheck-multiple-definitions.patch

Toggle diff (74 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 415955bd3f..dfd0448502 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1027,6 +1027,7 @@ dist_patch_DATA = \
%D%/packages/patches/date-output-pkg-config-files.patch \
%D%/packages/patches/datefudge-gettimeofday.patch \
%D%/packages/patches/dbacl-include-locale.h.patch \
+ %D%/packages/patches/dbacl-icheck-multiple-definitions.patch \
%D%/packages/patches/dbus-helper-search-path.patch \
%D%/packages/patches/dbus-c++-gcc-compat.patch \
%D%/packages/patches/dbus-c++-threading-mutex.patch \
diff --git a/gnu/packages/patches/dbacl-icheck-multiple-definitions.patch b/gnu/packages/patches/dbacl-icheck-multiple-definitions.patch
new file mode 100644
index 0000000000..e82d0819bb
--- /dev/null
+++ b/gnu/packages/patches/dbacl-icheck-multiple-definitions.patch
@@ -0,0 +1,33 @@
+From f5df6813e305372e25b8a2124c491293a176e115 Mon Sep 17 00:00:00 2001
+From: Danny O'Brien <danny@spesh.com>
+Date: Fri, 3 Feb 2023 16:48:59 -0800
+Subject: [PATCH] Fix failing build of icheck.
+
+Building icheck fails with a duplicate symbol definition
+error. This allows the icheck executable to compile.
+
+Submitted upstream[1] but not yet moderated/accepted.
+
+[1] https://sourceforge.net/p/dbacl/discussion/239876/thread/87636b0114/
+
+---
+ src/icheck.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/icheck.c b/src/icheck.c
+index efbb6a5..12a3b7a 100644
+--- a/src/icheck.c
++++ b/src/icheck.c
+@@ -39,9 +39,6 @@ extern regex_count_t regex_count;
+ extern empirical_t empirical;
+
+ extern int cmd;
+-char *progname = "icheck";
+-char *inputfile = "";
+-long inputline = 0;
+
+ extern long system_pagesize;
+ extern void *in_iobuf;
+--
+2.39.1
+
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index e5d3a0efc0..1092f1860b 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -25,6 +25,7 @@
;;; Copyright � 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright � 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
;;; Copyright � 2022 Gabriel Wicki <gabriel@erlikon.ch>
+;;; Copyright � 2022 Danny O'Brien <danny@spesh.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -711,7 +712,7 @@ (define-public dbacl
"dbacl-" version ".tar.gz"))
(sha256
(base32 "1gas0112wqjvwn9qg3hxnawk7h3prr0w9b2h68f3p1ifd1kzn3gz"))
- (patches (search-patches "dbacl-include-locale.h.patch"))))
+ (patches (search-patches "dbacl-include-locale.h.patch" "dbacl-icheck-multiple-definitions.patch"))))
(build-system gnu-build-system)
(arguments
`(#:make-flags
--
2.39.1
M
M
Maxim Cournoyer wrote on 22 Mar 2023 03:13
(name . Danny O'Brien)(address . danny@fil.org)
87sfdxildq.fsf_-_@gmail.com
Hi,

"Danny O'Brien" <danny@fil.org> writes:

Toggle quote (17 lines)
> On Sat, Mar 04, 2023 at 05:37:27PM +0100, Ludovic Courtès wrote:
>> Hi Danny,
>>
>> "Danny O'Brien" <danny@spesh.com> skribis:
>>
>> > Yep, that was all due to `guix style` — the instructions say to run it, but
>> > that may be different if it's just tweaking an existing hand-crafted
>> > package description. I'll re-submit.
>>
>> Did you get a chance to look into it? We’re close to the finish line!
>>
>> TIA,
>> Ludo’.
>
> Let's try this:
>

[...]

Toggle quote (22 lines)
> diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
> index e5d3a0efc0..1092f1860b 100644
> --- a/gnu/packages/textutils.scm
> +++ b/gnu/packages/textutils.scm
> @@ -25,6 +25,7 @@
> ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
> ;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
> ;;; Copyright © 2022 Gabriel Wicki <gabriel@erlikon.ch>
> +;;; Copyright © 2022 Danny O'Brien <danny@spesh.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -711,7 +712,7 @@ (define-public dbacl
> "dbacl-" version ".tar.gz"))
> (sha256
> (base32 "1gas0112wqjvwn9qg3hxnawk7h3prr0w9b2h68f3p1ifd1kzn3gz"))
> - (patches (search-patches "dbacl-include-locale.h.patch"))))
> + (patches (search-patches "dbacl-include-locale.h.patch" "dbacl-icheck-multiple-definitions.patch"))))
> (build-system gnu-build-system)
> (arguments
> `(#:make-flags

I've installed this change, but dropped your copyright line, as changes
smaller than 10-15 lines of new code are not subjected to copyright.

--
Thanks,
Maxim
Closed
?