From nobody Thu Sep 23 13:08:49 2021 X-Original-To: doc@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 848F217C1F1C; Thu, 23 Sep 2021 13:08:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HFb8N3P1Qz4c7x; Thu, 23 Sep 2021 13:08:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from aniel.nours.eu (nours.eu [IPv6:2001:41d0:8:3a4d::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 3C26E23222; Thu, 23 Sep 2021 13:08:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 073D6B54AD; Thu, 23 Sep 2021 15:08:50 +0200 (CEST) Date: Thu, 23 Sep 2021 15:08:49 +0200 From: Baptiste Daroussin To: Andriy Gapon Cc: FreeBSD Current , 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> References: List-Id: Documentation project List-Archive: https://lists.freebsd.org/archives/freebsd-doc List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-doc@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ThisMailContainsUnwantedMimeParts: N 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