#1024997 install-info: dir entry for emacs is bolloxed

Package:
install-info
Source:
install-info
Description:
Manage installed documentation in info format
Submitter:
Brendan O'Dea
Date:
2023-07-10 22:09:02 UTC
Severity:
normal
Tags:
#1024997#5
Date:
2022-11-28 14:41:55 UTC
From:
To:
up, even after a clean regeneration.

Note the strange characters here that mess up the entry:

$ cat -v /usr/share/info/dir | egrep -2 '[(]emacs[)]'
* Magit: (magit).               Using Git from Emacs with Magit.
* With-Editor: (with-editor).   Using the Emacsclient as $EDITOR.
^ZM-^L}[^EM-^KM-6M-bd^E* Emacs: (emacs).               The extensible self-documenting text editor.
* Emacs FAQ: (efaq).            Frequently Asked Questions about Emacs.
* Haskell Mode: (haskell-mode). Haskell Development Environment for Emacs(en)

I'd also note that /usr/sbin/update-info-dir does not ignore *~ files,
but it *does* ignore symbolic links.

$ egrep find /usr/sbin/update-info-dir
find "$INFODIR" -type f | while read file ; do

$ ls -l /usr/share/info/emacs.info.gz
lrwxrwxrwx 1 root root 31 Sep 26  2019 /usr/share/info/emacs.info.gz -> /etc/alternatives/emacs.info.gz

In fact, one might wonder why the above "find" looks for anything other
than *.info.gz files.  One might also wonder whether install-info.c
needs to be rewritten from scratch in something sane, but I digress.

In any case, tracing through the construction of /usr/share/info/dir by
hot-wiring update-info-dir to pause after each invocation of
install-info, I found that the "bad" material is installed by processing
of /usr/share/info/mutt-alias.info.gz, which is installed because
emacs-goodies-el depends on elpa-mutt-alias, even though I do not have
mutt installed.

#1024997#10
Date:
2022-11-28 21:27:38 UTC
From:
To:
Am 28.11.2022 um 15:41 teilte Barak A. Pearlmutter mit:

Hi Barak,

I've uploaded texinfo 7.0 to experimental. Could you test if that
eventually solves the issue?

Hilmar
--
sigfault

#1024997#15
Date:
2022-11-28 22:28:25 UTC
From:
To:
Yes! That fixes it.
#1024997#20
Date:
2022-11-28 22:46:49 UTC
From:
To:
Am 28.11.2022 um 23:28 teilte Barak A. Pearlmutter mit:
Closing then.

Hilmar
--
sigfault

#1024997#25
Date:
2023-01-30 05:51:12 UTC
From:
To:
reopen 1024997 !
thanks

This is still present in the unstable version of the package.  You
should probably keep this open until 7.0 gets to unstable.

This can be reproduced reliably by running:

  rm -f /tmp/dir[12]
  install-info /usr/share/info/muttrc-mode.info.gz /tmp/dir1
  install-info /usr/share/info/mutt-alias.info.gz /tmp/dir2

The contents of both resulting files have garbage in them.  There may be
other info files which have this problem, but those were the two on my
system which were corrupting the directory.

Package versions:

  install-info     6.8-6+b1
  elpa-muttrc-mode 1.2.1-3
  elpa-mutt-alias  1.5-4

#1024997#38
Date:
2023-01-30 09:37:00 UTC
From:
To:
Am 30.01.2023 um 06:51 teilte Brendan O'Dea mit:

Hi Brendan,
IIRC the Debian BTS is based on versions, unless it is an RC bug. So
I'll probably forget about this bug. Please be so kind to close it, when
TInfo 7.0.x entered unstable. I'm not sure, if this will happen before
bookworm.

Hilmar
--
sigfault

#1024997#45
Date:
2023-01-30 10:09:37 UTC
From:
To:
There is no automatic promotion from experimental.

It is reasonable to mark a bug as fixed/closed on successful upload to
unstable, because over time that fix will make it to testing, stable,
old-stable, etc without further involvement from the maintainer.

You shouldn't mark a bug as fixed however when only the experimental
version works, since making that fix more widely available will take an
additional upload to unstable.  That unstable upload should be the one
which closes the bug.

https://www.debian.org/Bugs/Developer#closing says that problems are
considered fixed when "the bug fix enters the Debian archive".  The
experimental distribution is not "the Debian archive".

From https://www.debian.org/doc/manuals/debian-faq/ftparchives.en.html#dists:

  "Experimental is used for packages which are still being developed,
   and with a high risk of breaking your system." and "Users shouldn't
   be using packages from there [..]"

#1024997#50
Date:
2023-06-26 06:26:37 UTC
From:
To:
Hi,

From my guess it's some kind of buffer management issue; what was the bug and is there a minimal fix ?

#1024997#55
Date:
2023-06-30 21:35:06 UTC
From:
To:
On 26.06.2023 08:26, Junichi Uekawa wrote:

Hi Junichi,
To be honest: I don't really care. I know the issue is solved in texinfo
7.0.x, hence I perform no further investigation. Uploading TI 7.0 to
unstable however will break a few packages [1], currently I'm waiting
that at least the new version of octave hits unstable.

If you think this could be a security issue, let me know.

Hilmar

[1]
https://udd.debian.org/cgi-bin/bts-usertags.cgi?user=hille42%40web.de&tag=texinfo70

#1024997#60
Date:
2023-07-01 03:39:39 UTC
From:
To:
Hi,

On Sat, 01 Jul 2023 06:35:06 +0900, Preuße, Hilmar wrote:

As bookworm shipped with this bug which dumps some kind of corrupted
buffer content, I am concerned this can be a security issue.

#1024997#65
Date:
2023-07-10 22:04:59 UTC
From:
To:
Hello Junichi,
I've uploaded TeXInfo 7.0.x to unstable, so in theory on could close the
issue. If you think, we need a fix for 6.x (i.e. Debian (old)stable) I
guess we have to ask the upstream authors.

Hilmar