help / color / mirror / Atom feed
From: Ingo Schwarze <>
Subject: Re: makewhatis: segfault in dbadd when using -a
Date: Thu, 19 Aug 2021 19:11:50 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Hi Lukas,

sternenseemann wrote on Thu, Aug 19, 2021 at 12:02:13AM +0200:
> On 8/11/21 5:09 PM, Ingo Schwarze wrote:

>> Does the following patch make sense to you and work for you?

> Yes, tested it with my real world case and it doesn't crash anymore!
> Sorry for the delay with testing.

No problem, thanks for testing.

The patch is now committed to OpenBSD-current and to HEAD.

> If a directory of the common manpath is only present in one
> store-sysroot, the script will symlink the directory instead
> of creating one and symlinking every file in it.
> Unfortunately, there is a few man sections which basically come
> exclusively from one package, so from one store path: man1p and man3p
> from Linux' man-pages-posix package. So for me
> $GLOBAL_MANPATH/share/man3p is a symlink to
> /nix/store/2fn4bf6xj9bxq3dpa6mznqbzqqanfdiv-man-pages-posix-2017a/share/man/man3p
> and makewhatis(8) can't index it.

Uh oh.  So there *is* a real-world use case for symlinks to

It doesn't matter that on first sight, this whole approach feels quite
fragile to me.  Isn't that going to blow up in horrible ways as soon as
somebody creates a package that also uses "man3p"?  For example, on
OpenBSD, "man3p" is used for manuals of Perl library functions.

  schwarze@isnote $ uname -a
  OpenBSD 6.9 GENERIC.MP#101 amd64
  schwarze@isnote $ man -f 3p warnings 
  encoding::warnings(3p) - Warn on implicit encoding conversions
  warnings(3p) - Perl pragma to control optional warnings
  warnings::register(3p) - warnings import function

Anyway, if systems use that, considering whether it can be supported
with resonable effort makes sense.  No guarantee, of course.
I'll think about it for a bit.

> This is, however, a bit of an edge case and there is a workaround
> (running a script which converts it into a proper directory), but still
> a bit annoying. For the standard man sections this will probably never
> happen.
> I also fear that traversing such symlinks is not easy to patch into the
> portable version since it would mean changing treescan quite
> significantly (which currently assumes that symlinks if they are "good"
> point to regular files)


> and you'd be hesitant to touch the in-tree one
> for something like this?!

Can't say without looking at the code in detail, so bear with me.

 To unsubscribe send an email to

  reply	other threads:[~2021-08-19 17:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06 23:53 sternenseemann
2021-08-11 15:09 ` Ingo Schwarze
2021-08-18 22:02   ` sternenseemann
2021-08-19 17:11     ` Ingo Schwarze [this message]
2021-09-06 14:50       ` Ingo Schwarze
2021-09-06 15:52         ` sternenseemann
2021-09-06 17:12           ` Ingo Schwarze

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:

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

  git send-email \ \ \ \ \

* 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.
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 NNTP newsgroup(s).