From nobody Thu Nov 25 15:34:02 2021 X-Original-To: dev-commits-src-all@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 6D71118AA73B; Thu, 25 Nov 2021 15:34:08 +0000 (UTC) (envelope-from avg@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 4J0MNw1gz6z4W1N; Thu, 25 Nov 2021 15:34:08 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from [192.168.0.88] (unknown [195.64.148.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 36F98BCEA; Thu, 25 Nov 2021 15:34:07 +0000 (UTC) (envelope-from avg@freebsd.org) Message-ID: Date: Thu, 25 Nov 2021 17:34:02 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.3.0 From: Andriy Gapon Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures Content-Language: en-US To: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Cc: Baptiste Daroussin , Ed Maste , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> <20211125142339.zxkjpbohkxk4hete@aniel.nours.eu> <9226a616-d279-9702-f13f-cee7299afc7a@FreeBSD.org> <20211125143145.5jajvx52p5ma347c@aniel.nours.eu> <4a53cb13-1a9c-22c3-c3ee-27790927f4e3@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637854448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kxg8o0XN4vK6jyMUn8RGY5W0a1CcjKx2eXSicbHCYR8=; b=gIW2gBe6mM4jaATuG5i637yb5U0hf4GDD7BQAezxf1yMc2PTlDJf+CyyWv7NBW7iKfU9Zp /royAtEnPxJvvNU3e7kbolcgee7u3sbC2T8juRy371d45ZghTD/zlbif1IWafwAcuBQV27 NSndAeLmyHKG5SB/rvEkU38BX8b4XJlpcgaf8tAx7j68oSUerduwD8nZtp12moARqn4nh8 RXZ1yoiNxU74nxPOsJr0GLp2m9SOysRLrnNiMmXHKQ4W59/H8pQvHvNs2HhqwD01+HkGBk cBrtmXhZJ0QAxBw/w0EG1UDd4nOLXiLuZRNTP4sPyHmX64zPK4F5yuZADMBLeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637854448; a=rsa-sha256; cv=none; b=S+IvyKZHw1lRUHtXUKnTzLfBobxE6Dv29H3lYUZDElOM+Oxil4UYD7dz2SiHsZwwlAYClF krBRy4gA8yH723bJiivhIagjd5dRTGTJbYEsw40CwSh6rQckoWNzAPu44IwGj+RDmEB/3X 1ZjNKtlDQeXFEUE0ltDbsj2S7OPfSLM/1tcG3kW+WvOeq8NaEbJ8NhA+j81ucMPb5MTqlO C+xTN/h2+MqC5wKyRr2sLl+gLhWiiyHuKfaVBQTbnmBR8xIawGa35WvbgruG7p6gxcHWO2 DhpDbY/K5CFKgs0oBv2cCx2Xg7kOHb8eSy+DZoLmuoP2w7kBik2jYLgTJ5b4Ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 25/11/2021 16:52, Fernando ApesteguĂ­a wrote: > On Thu, Nov 25, 2021 at 3:37 PM Andriy Gapon wrote: >> >> On 25/11/2021 16:31, Baptiste Daroussin wrote: >>> On Thu, Nov 25, 2021 at 04:30:35PM +0200, Andriy Gapon wrote: >>>> On 25/11/2021 16:23, Baptiste Daroussin wrote: >>>>> On Thu, Nov 25, 2021 at 03:57:41PM +0200, Andriy Gapon wrote: >>>>>> Looking at the output I got another thought: do we need architecture sub-dir >>>>>> links at all now that we install manpages to a main directory? >>>>>> Is there any benefit to having the same manpage in a directory (like man4) >>>>>> and its immediate subdirectory (like man4/arm) ? >>>>>> >>>>> Hardlink not in the same directory is imho a fragile setup anyway, what if a >>>>> user has different mount points here, the hardlink would be broken. while there >>>>> is little chances someone is doing that, history told me people are doing weird >>>>> things and if they haven't yet, they will soon. >>>>> >>>>> I continue to think this kind of links should be 1/ symlinks, 2/ relative >>>>> symlinks if they are in a situation which can become a cross device issue. >>>> >>>> Yeah... but are they needed at all? :-) >>>> >>>> I mean, whichever way we install manpages they are always installed into >>>> manX. I do not see a point / benefit of having another copy / link / >>>> whatever in manX/arch. >>>> >>>> P.S. >>>> Adding support for "MSYMLINKS" is not that hard. >>>> But I'd rather remove some stuff than add some new stuff. >>>> >>> >>> There I fully agree I don't see the point of the initial change in the first place :D >> >> Well, I do see the point of the change and I like it. >> But I don't understand why / how MANSUBDIR was / is useful. >> >> Perhaps people thought that hypothetically it would be a good idea if man foobar >> on amd64 and sparc64 had different content... >> But looks like it never happened and the idea (or strawman) is debatable too. > > How about removing the MLINKS in every man4.${arch}/Makefile and doing > something like this in the parent man4/Makefile? > > diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile > index dfef254bff5..46097319b06 100644 > --- a/share/man/man4/Makefile > +++ b/share/man/man4/Makefile > @@ -906,6 +906,9 @@ __arches= ${MAN_ARCH} > .for __arch in ${__arches:O:u} > .if exists(${.CURDIR}/man4.${__arch}) > SUBDIR+= man4.${__arch} > +.for __manpage in ${:!/bin/sh -c "/bin/ls -d ${.CURDIR}/man4.${__arch}*.4"!:E} > +MLINKS+= man4.${__arch}/${__manpage} ${__manpage} > +.endfor > .endif > .endfor I think that this should work. > About keeping the arch-specific directories I don't have a strong > opinion about it. It could be argued that it is a simple way to know > which man pages are related to a certain architecture. I am not sure if this is such an important thing. There is a number of other ways to figure that out. But it really should be documented in manpages themselves. > In the case of > the i386 most of the man pages have this information in the .Dt line: > > [fernape@vm-current /usr/src/share/man/man4/man4.i386]$ grep Dt *.4 > CPU_ELAN.4:.Dt CPU_ELAN 4 i386 > apm.4:.Dt APM 4 i386 > ce.4:.Dt CE 4 i386 > cp.4:.Dt CP 4 i386 > glxiic.4:.Dt GLXIIC 4 i386 > glxsb.4:.Dt GLXSB 4 i386 > longrun.4:.Dt LONGRUN 4 i386 > npx.4:.Dt NPX 4 i386 > pae.4:.Dt PAE 4 i386 > pbio.4:.Dt PBIO 4 i386 > perfmon.4:.Dt PERFMON 4 i386 > pnp.4:.Dt PNP 4 i386 > pnpbios.4:.Dt PNPBIOS 4 i386 > sbni.4:.Dt SBNI 4 i386 > smapi.4:.Dt SMAPI 4 i386 > vpd.4:.Dt VPD 4 i386 > > But it is not the case for other man pages: > > [fernape@vm-current /usr/src/share/man/man4/man4.powerpc]$ grep Dt *.4 > abtn.4:.Dt ABTN 4 > adb.4:.Dt ADB 4 > akbd.4:.Dt AKBD 4 > ams.4:.Dt AMS 4 > cuda.4:.Dt CUDA 4 > dtsec.4:.Dt DTSEC 4 > llan.4:.Dt LLAN 4 > ofw_console.4:.Dt OFW_CONSOLE 4 powerpc > pmu.4:.Dt PMU 4 > powermac_nvram.4:.Dt POWERMAC_NVRAM 4 powerpc > smu.4:.Dt SMU 4 > snd_ai2s.4:.Dt SND_AI2S 4 > snd_davbus.4:.Dt SND_DAVBUS 4 > tsec.4:.Dt TSEC 4 -- Andriy Gapon