Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Sep 2021 15:08:49 +0200
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        FreeBSD Current <current@FreeBSD.org>, doc@FreeBSD.org, fernape@FreeBSD.org
Subject:   Re: installworld with NO_ROOT produces paths with .. for man pages
Message-ID:  <20210923130849.xu3dnggm6gdcfple@aniel.nours.eu>
In-Reply-To: <e0c2a007-12fd-5d48-07ba-88b8f02bc451@FreeBSD.org>
References:  <ec39b732-664f-4ccc-2806-b13aa5c6c015@FreeBSD.org> <e0c2a007-12fd-5d48-07ba-88b8f02bc451@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 23, 2021 at 02:38:27PM +0300, Andriy Gapon wrote:
> On 28/08/2021 17:28, Andriy Gapon wrote:
> > 
> > This seems to be related to the recent change to install manual pages
> > for all platforms.
> > 
> > My method of creating a cross-platform installation image is to install
> > with NO_ROOT and then to tar up with @METALOG argument.
> > On the destination I simply untar the archive into a destination
> > directory (typically a fresh ZFS BE).
> > 
> > Today I noticed some complaints when extracting the archive, here is a few:
> > ./usr/share/man/man4/i386/../smapi.4.gz: Path contains '..'
> > ./usr/share/man/man4/i386/../vpd.4.gz: Path contains '..'
> > ./usr/share/man/man4/powerpc/../adb.4.gz: Path contains '..'
> > ./usr/share/man/man4/powerpc/../akbd.4.gz: Path contains '..'
> > 
> > This is a not a big deal but would be nice to "straighten" the
> > installation paths when installing such manual pages.
> > 
> > P.S.
> > NO_ROOT does not seem to be documented outside of the source code.
> > 
> 
> I think that it would be nice to fix that .. issue.
> Any suggestions?


MLINKS+=${_manpage} ../${_manpage}

so install(1) does what it is asked to do and write it do the metalog as such.

First it is a bad idea to have .. in mlink as we are creating hardlinks, so we
could have a cross device issue.

The issue was reported when those links were added: 0a0f7486413c

https://lists.freebsd.org/pipermail/dev-commits-src-all/2021-July/009164.html

imho the right way to do this would be to have a new kind of macros which would
create relative symlinks using ${INSTALL_RSYMLINK} to replace MLINKS

Best regards,
Bapt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210923130849.xu3dnggm6gdcfple>