unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: "Ludovic Courtès" <ludovic.courtes@inria.fr>, 30785@debbugs.gnu.org
Subject: bug#30785: Man pages truncated, repeated
Date: Wed, 16 Jan 2019 20:57:28 +0100	[thread overview]
Message-ID: <20190116205728.616a0b7b@scratchpost.org> (raw)
In-Reply-To: <877ef479f0.fsf@ambrevar.xyz>


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

Apparently, man-db has groff-minimal as a regular input, so I guess we are lucky.
So we could adapt groff-minimal only if we wanted to.

But that would mean that even after that, the "groff" package would still
contain a memory corruption bug in preconv - which is arguably a security
problem.  Should we use grafts instead?

Patch for the former is attached.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-groff-minimal-Disable-relocatability.patch --]
[-- Type: text/x-patch, Size: 2928 bytes --]

From adc9e7940b54e467732ec923c6a3fcec810dce48 Mon Sep 17 00:00:00 2001
From: Danny Milosavljevic <dannym@scratchpost.org>
Date: Wed, 16 Jan 2019 15:00:04 +0100
Subject: [PATCH] gnu: groff-minimal: Disable relocatability.
Tags: patch

* gnu/packages/groff.scm (groff-minimal)[arguments]<#:phases>
[disable-relocatability]: New phase.
---
 gnu/packages/groff.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm
index 77728a5d7..cf392f546 100644
--- a/gnu/packages/groff.scm
+++ b/gnu/packages/groff.scm
@@ -96,6 +96,36 @@ is usually the formatter of \"man\" documentation pages.")
        ,@(substitute-keyword-arguments (package-arguments groff)
            ((#:phases phases)
             `(modify-phases ,phases
+               (add-after 'unpack 'disable-relocatability
+                 (lambda _
+                   ;; Groff contains a Rube Goldberg-esque relocator for the
+                   ;; file "charset.alias".
+                   ;; It tries to find the current executable using realpath,
+                   ;; a do-it-yourself search in $PATH and so on.
+                   ;; Furthermore, the routine that does the search is buggy
+                   ;; in that it doesn't handle error cases when they arise.
+                   ;; This causes preconv to segfault when trying to look up
+                   ;; the file "charset.alias" in the NULL location.
+                   ;; The "charset.alias" parser is a copy of gnulib's, and a
+                   ;; non-broken version of gnulib's "charset.alias" parser
+                   ;; is part of glibc's libcharset.
+                   ;; However, groff unconditionally uses their own
+                   ;; "charset.alias" parser, but then DOES NOT INSTALL the
+                   ;; file "charset.alias" when glibc is too new.
+                   ;; In Guix, our file "charset.alias" only contains an
+                   ;; obscure alias for ASCII and nothing else.
+                   ;; So just disable relocation and make the entire
+                   ;; "charset.alias" lookup fail.
+                   ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30785>
+                   ;; for details.
+                   (substitute* "src/libs/libgroff/Makefile.sub"
+                    (("-DENABLE_RELOCATABLE=1") ""))
+                   ;; That file contains a crash bug--so make sure that
+                   ;; its contents are not there.
+                   (call-with-output-file "src/libs/libgroff/relocate.cpp"
+                     (lambda (port)
+                       #t))
+                   #t))
                (add-after 'install 'remove-non-essential-programs
                  (lambda* (#:key outputs #:allow-other-keys)
                    ;; Keep only the programs that man-db needs at run time,

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-01-16 19:58 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
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 [this message]
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=20190116205728.616a0b7b@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=30785@debbugs.gnu.org \
    --cc=ludovic.courtes@inria.fr \
    --cc=mail@ambrevar.xyz \
    /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).