From nobody Thu Nov 25 14:52:03 2021 X-Original-To: dev-commits-src-main@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 62F1C188BABC; Thu, 25 Nov 2021 14:53:16 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0LTm1djVz3nxq; Thu, 25 Nov 2021 14:53:16 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: by mail-qk1-f171.google.com with SMTP id i9so11948863qki.3; Thu, 25 Nov 2021 06:53:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EggQSsFUFQe14CEB7qZr45MFa5l+x9ypRMvNae9fK/Q=; b=zgmy8FVU1/a7BMFvUiFr2jvLq4SzU+mtuWNfmhgP3DRZCR0Fp/J04sBxzmapSbm09y EoYqzRminNDSEs2jqndRhZecnjGowzKXNrAQl9Drb1P9zvTUFRCNlsSXhrhZ6n1Ixgu/ mY9a4ru3g89AuAo68PWE1cLjbROlCsms3c5U28z3RAqX8aHSRn/q2Rjdp2G7nyGFz56N lssENs8w+vMDZX45ooxohGOdwuFJgzLMoix5rRE5QzYnMPvmmRZ3T4gqCkEZHiGTAXLk yBu4RR3CEZ/JQ4PIjNJp5Uc4zjjkrbtfFVMQC1v3RWx+HXK9DszYDrlm1Dn3Xwj0gA1B Dw8w== X-Gm-Message-State: AOAM5321v0YGrYphg0GWQOPi0BJ7t3v4JRVFEGL2Hl+wCT9lCHhoBuS7 3wMl9PmIfwDCfmhzjqeDmmK7JTi/E50QKw== X-Google-Smtp-Source: ABdhPJxulumAiY/6jD3rEd/bp3GRkscW9ELf6HaPRyxBXQ0NfEV3mOueBWLiEWq1yDq6S9GKVgC7dA== X-Received: by 2002:a05:620a:1587:: with SMTP id d7mr15922299qkk.126.1637851988716; Thu, 25 Nov 2021 06:53:08 -0800 (PST) Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com. [209.85.219.173]) by smtp.gmail.com with ESMTPSA id v1sm1691089qtw.65.2021.11.25.06.53.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Nov 2021 06:53:08 -0800 (PST) Received: by mail-yb1-f173.google.com with SMTP id f186so12479563ybg.2; Thu, 25 Nov 2021 06:53:08 -0800 (PST) X-Received: by 2002:a25:4c9:: with SMTP id 192mr7118446ybe.260.1637851988308; Thu, 25 Nov 2021 06:53:08 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 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: <4a53cb13-1a9c-22c3-c3ee-27790927f4e3@FreeBSD.org> From: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= Date: Thu, 25 Nov 2021 15:52:03 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures To: Andriy Gapon Cc: Baptiste Daroussin , Ed Maste , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4J0LTm1djVz3nxq X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N 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 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. 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 Cheers. > > > -- > Andriy Gapon