unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: Tobias Geerinckx-Rice <me@tobias.gr>, 30785@debbugs.gnu.org
Subject: bug#30785: Man pages truncated, repeated
Date: Sat, 05 May 2018 23:40:51 +0200	[thread overview]
Message-ID: <878t8xhjbw.fsf@fastmail.com> (raw)
In-Reply-To: <87zi3advd9.fsf@fastmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 820 bytes --]

Marius Bakke <mbakke@fastmail.com> writes:

> Tobias Geerinckx-Rice <me@tobias.gr> writes:
>
>> Guix,
>>
>> Perhaps he's just getting old, but our man has a tendency to forget 
>> where he was, start over from the beginning, and repeat himself several 
>> times:
>>
>>    $ guix package -i knot rofi
>>    $ man 5 knot.conf | grep -E '^(NAME|DESCRIPTION)'
>>    NAME
>>    DESCRIPTION
>>    NAME
>>    DESCRIPTION
>>    NAME
>>    DESCRIPTION
>>    NAME
>>    DESCRIPTION
>>    NAME
>>    $
>
> One thing rofi.1 and knot.conf.5 have in common is that they are both
> unicode.  Whereas working pages are ASCII.

This ultimately turned out to be due to man-db not finding "preconv".

The attached patches fixes it.

Adding preconv adds ~0.1 MiB to the groff-minimal closure size.

WDYT?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: bug-30785.patch --]
[-- Type: text/x-patch, Size: 3040 bytes --]

From 42b43fca11ab1f9417499aea252ae7a871a53b1b Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Sat, 5 May 2018 23:13:16 +0200
Subject: [PATCH 1/2] gnu: groff-minimal: Preserve 'preconv' executable.

* gnu/packages/groff.scm (groff-minimal)[arguments]: Add 'preconv' to the list
of kept programs.
---
 gnu/packages/groff.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm
index 5f1b8d0ed..77728a5d7 100644
--- a/gnu/packages/groff.scm
+++ b/gnu/packages/groff.scm
@@ -101,7 +101,7 @@ is usually the formatter of \"man\" documentation pages.")
                    ;; Keep only the programs that man-db needs at run time,
                    ;; and make sure we don't pull in Perl.
                    (let ((out  (assoc-ref outputs "out"))
-                         (kept '("eqn" "neqn" "pic" "tbl" "refer"
+                         (kept '("eqn" "neqn" "pic" "tbl" "refer" "preconv"
                                  "nroff" "groff" "troff" "grotty")))
                      (for-each (lambda (file)
                                  (unless (member (basename file) kept)
-- 
2.17.0


From 095d0db7db77261f59e6582af3a9b18b61dcb630 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Sat, 5 May 2018 23:30:04 +0200
Subject: [PATCH 2/2] gnu: man-db: Embed absolute reference to 'preconv'.

Fixes <https://bugs.gnu.org/30785>.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>.

* gnu/packages/man.scm (man-db)[arguments]: Rename 'patch-iconv-path' to
'patch-absolute-paths'.  Add substitution for "preconv".
---
 gnu/packages/man.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm
index ca6fd351d..f0bb2b66e 100644
--- a/gnu/packages/man.scm
+++ b/gnu/packages/man.scm
@@ -80,11 +80,19 @@ a flexible and convenient way.")
                               (string-append "#!" (which "sh")))))
                          (remove file-is-directory?
                                  (find-files "src/tests" ".*"))))))
-         (add-after 'unpack 'patch-iconv-path
+         (add-after 'unpack 'patch-absolute-paths
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "src/man.c"
                (("\"iconv\"")
                 (string-append "\"" (which "iconv") "\"")))
+             ;; Embed an absolute reference to "preconv", otherwise it
+             ;; falls back to searching in PATH and ultimately fails
+             ;; to render unicode data (see <https://bugs.gnu.org/30785>).
+             (substitute* "lib/encodings.c"
+               (("groff_preconv = NULL")
+                (string-append "groff_preconv = \""
+                               (assoc-ref inputs "groff-minimal")
+                               "/bin/preconv\"")))
              #t)))
        #:configure-flags
        (let ((groff (assoc-ref %build-inputs "groff"))
-- 
2.17.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2018-05-05 21:41 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12 21:24 bug#30785: Man pages truncated, repeated Tobias Geerinckx-Rice
2018-03-13 21:34 ` Ludovic Courtès
2018-03-13 22:01   ` Tobias Geerinckx-Rice
2018-03-14 13:22     ` Ludovic Courtès
2018-03-14 13:43 ` Andreas Enge
2018-03-15  0:40 ` Marius Bakke
2018-05-05 21:40   ` Marius Bakke [this message]
2018-05-06 13:53     ` Marius Bakke
2018-05-06 22:06       ` Marius Bakke
2018-05-05  1:31 ` Vagrant Cascadian
2018-08-20 10:32 ` Pierre Neidhardt
2019-01-13 16:09 ` Pierre Neidhardt
2019-01-13 16:15   ` Pierre Neidhardt
2019-01-13 17:00     ` Ludovic Courtès
2019-01-13 17:31       ` Pierre Neidhardt
2019-01-13 17:43         ` Pierre Neidhardt
2019-01-13 20:27           ` Ludovic Courtès
2019-01-13 20:37             ` Pierre Neidhardt
2019-01-14  8:36               ` Ludovic Courtès
2019-01-14  8:49                 ` Pierre Neidhardt
2019-01-14 10:19                   ` Pierre Neidhardt
2019-01-14 10:59                     ` Gábor Boskovits
2019-01-14 15:06                       ` Pierre Neidhardt
2019-01-14 16:10                         ` Ludovic Courtès
2019-01-14 16:24                           ` Pierre Neidhardt
2019-01-14 16:42                             ` Danny Milosavljevic
2019-01-14 16:57                               ` Pierre Neidhardt
2019-01-14 17:46                                 ` Danny Milosavljevic
2019-01-14 17:48                                 ` Danny Milosavljevic
2019-01-14 17:50                                   ` Danny Milosavljevic
2019-01-14 18:19                                     ` Pierre Neidhardt
2019-01-14 20:27                                     ` Ludovic Courtès
2019-01-14 21:42                                       ` Danny Milosavljevic
2019-01-14 21:59                                         ` Pierre Neidhardt
2019-01-14 22:14                                         ` Danny Milosavljevic
2019-01-14 22:39                                           ` Pierre Neidhardt
2019-01-15 12:29                                           ` Ludovic Courtès
2019-01-16 10:01                                             ` Pierre Neidhardt
2019-01-16 10:56                                               ` Danny Milosavljevic
2019-01-16 13:02                                                 ` Pierre Neidhardt
2019-01-16 14:17                                                   ` Danny Milosavljevic
2019-01-16 17:39                                                     ` Pierre Neidhardt
2019-01-16 18:12                                                       ` Efraim Flashner
2019-01-16 18:18                                                         ` Pierre Neidhardt
2019-01-16 19:57                                                           ` Danny Milosavljevic
2019-01-16 22:32                                                             ` Ludovic Courtès
2019-01-16 22:45                                                               ` Danny Milosavljevic
2019-01-17  7:31                                                                 ` Pierre Neidhardt
2019-01-17  8:43                                                                   ` Ludovic Courtès
2019-01-17  9:39                                                                     ` Pierre Neidhardt
2019-01-17  9:42                                                                       ` Pierre Neidhardt
2019-01-17 11:32                                                                         ` Pierre Neidhardt
2019-11-28  0:13                                                                           ` Marius Bakke
2019-01-17  9:10                                                                   ` Danny Milosavljevic
2019-01-17  8:33                                                       ` Ludovic Courtès
2019-01-17  8:41                                                         ` Pierre Neidhardt
2021-04-22 18:53 ` G. Branden Robinson

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878t8xhjbw.fsf@fastmail.com \
    --to=mbakke@fastmail.com \
    --cc=30785@debbugs.gnu.org \
    --cc=me@tobias.gr \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).