Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jun 2022 01:34:09 +0200
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= <fernape@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org,  dev-commits-src-main@freebsd.org
Subject:   Re: git: df90aeac24c9 - main - Fix build with -DNO_ROOT
Message-ID:  <CAGudoHGCb_DGq-eQ8zC4Ox6S6%2B4=VLzTqAamUea2AMbcyM9W9Q@mail.gmail.com>
In-Reply-To: <202111261152.1AQBqO2l001185@gitrepo.freebsd.org>
References:  <202111261152.1AQBqO2l001185@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I bisected an error to this commit:

# make -sssss 'DESTDIR=3D/mnt/tmp' distribution
ls: amd64/.8: No such file or directory
make[3]: "/bin/sh -c "/bin/ls amd64/.8"" returned non-zero status

On 11/26/21, Fernando Apestegu=C3=ADa <fernape@freebsd.org> wrote:
> The branch main has been updated by fernape (doc, ports committer):
>
> URL:
> https://cgit.FreeBSD.org/src/commit/?id=3Ddf90aeac24c9d3621f294e6638a3149=
9b56f4f6b
>
> commit df90aeac24c9d3621f294e6638a31499b56f4f6b
> Author:     Fernando Apestegu=C3=ADa <fernape@FreeBSD.org>
> AuthorDate: 2021-11-26 10:55:50 +0000
> Commit:     Fernando Apestegu=C3=ADa <fernape@FreeBSD.org>
> CommitDate: 2021-11-26 11:51:08 +0000
>
>     Fix build with -DNO_ROOT
>
>     The inclusion of 0a0f7486413c broke the build with the -DNO_ROOT
> option.
>     Specifically, that commit adds some relative paths (with `..`) to
> METALOG
>     that make other tools using that log, fail afterwards (tar, makefs...=
).
>
>     It's been argued[1] if this is really something mtree(8) should handl=
e
> more
>     graciously. In the meantime, fix the breakage but changing the order =
in
> which
>     the links are created: first in the parent directory, then in the
>     architecture-specific one.
>
>     We keep the architecture-specific directories an the links to the
> parent
>     directories. This is something that we might want to change in the
> future.
>
>     This commit is based on a concept patch by avg@.
>
>     [1]
> https://lists.freebsd.org/archives/dev-commits-src-all/2021-November/inde=
x.html
>
>     Reported by: bapt@, emaste@
>     Approved by: avg@
>     Fixes: 0a0f7486413c
>     Differential Revision: https://reviews.freebsd.org/D33126
> ---
>  share/man/man4/man4.aarch64/Makefile | 26 ++++++++++++++++----------
>  share/man/man4/man4.arm/Makefile     | 10 ++++++----
>  share/man/man4/man4.i386/Makefile    | 10 ++++++----
>  share/man/man4/man4.powerpc/Makefile | 10 ++++++----
>  usr.sbin/Makefile.amd64              |  5 +++++
>  usr.sbin/apm/Makefile                |  4 ----
>  6 files changed, 39 insertions(+), 26 deletions(-)
>
> diff --git a/share/man/man4/man4.aarch64/Makefile
> b/share/man/man4/man4.aarch64/Makefile
> index 6d0e427e6b28..d1fbced3b0a8 100644
> --- a/share/man/man4/man4.aarch64/Makefile
> +++ b/share/man/man4/man4.aarch64/Makefile
> @@ -4,6 +4,17 @@
>
>  MAN=3D	\
>  	armv8crypto.4 \
> +	enetc.4 \
> +	felix.4 \
> +	rk_gpio.4 \
> +	rk_grf.4 \
> +	rk_i2c.4 \
> +	rk_pinctrl.4 \
> +
> +# Install manpages shared with arm only if not installing manpages
> +# for all architectures, otherwise arm takes care of installing them.
> +.if !empty(MAN_ARCH) && ${MAN_ARCH} !=3D "all"
> +MAN+=3D	\
>  	aw_gpio.4 \
>  	aw_mmc.4 \
>  	aw_rtc.4 \
> @@ -11,18 +22,13 @@ MAN=3D	\
>  	aw_spi.4 \
>  	aw_syscon.4 \
>  	bcm283x_pwm.4 \
> -	enetc.4 \
> -	felix.4 \
> -	rk_gpio.4 \
> -	rk_grf.4 \
> -	rk_i2c.4 \
> -	rk_pinctrl.4 \
>
> -# Link files to the parent directory
> +.endif
> +
> +# Link files to the architecture directory.
> +_ARCH_SUBDIR=3Daarch64
>  .for _manpage in ${MAN}
> -MLINKS+=3D${_manpage} ../${_manpage}
> +MLINKS+=3D${_manpage} ${_ARCH_SUBDIR}/${_manpage}
>  .endfor
>
> -MANSUBDIR=3D/aarch64
> -
>  .include <bsd.prog.mk>
> diff --git a/share/man/man4/man4.arm/Makefile
> b/share/man/man4/man4.arm/Makefile
> index 2ac8dbb5fd81..76146f4ebdb7 100644
> --- a/share/man/man4/man4.arm/Makefile
> +++ b/share/man/man4/man4.arm/Makefile
> @@ -18,11 +18,13 @@ MAN=3D	\
>  MLINKS=3D imx_wdog.4 imxwdt.4
>  MLINKS+=3D mge.4 if_mge.4
>
> -# Link files to the parent directory
> +# Link files to the architecture directory
> +_ARCH_SUBDIR=3Darm
> +.for _manpage _link in ${MLINKS}
> +MLINKS+=3D${_link} ${_ARCH_SUBDIR}/${_link}
> +.endfor
>  .for _manpage in ${MAN}
> -MLINKS+=3D${_manpage} ../${_manpage}
> +MLINKS+=3D${_manpage} ${_ARCH_SUBDIR}/${_manpage}
>  .endfor
>
> -MANSUBDIR=3D/arm
> -
>  .include <bsd.prog.mk>
> diff --git a/share/man/man4/man4.i386/Makefile
> b/share/man/man4/man4.i386/Makefile
> index e3d2e66ca78d..3dfc5f151f9f 100644
> --- a/share/man/man4/man4.i386/Makefile
> +++ b/share/man/man4/man4.i386/Makefile
> @@ -21,11 +21,13 @@ MLINKS=3D	CPU_ELAN.4 CPU_SOEKRIS.4
>  MLINKS+=3Dpae.4 PAE.4
>  MLINKS+=3Dsbni.4 if_sbni.4
>
> -# Link files to the parent directory
> +# Link files to the architecture directory
> +_ARCH_SUBDIR=3Di386
> +.for _manpage _link in ${MLINKS}
> +MLINKS+=3D${_link} ${_ARCH_SUBDIR}/${_link}
> +.endfor
>  .for _manpage in ${MAN}
> -MLINKS+=3D${_manpage} ../${_manpage}
> +MLINKS+=3D${_manpage} ${_ARCH_SUBDIR}/${_manpage}
>  .endfor
>
> -MANSUBDIR=3D/i386
> -
>  .include <bsd.prog.mk>
> diff --git a/share/man/man4/man4.powerpc/Makefile
> b/share/man/man4/man4.powerpc/Makefile
> index aa0e137fcedd..e6ade9778db3 100644
> --- a/share/man/man4/man4.powerpc/Makefile
> +++ b/share/man/man4/man4.powerpc/Makefile
> @@ -15,11 +15,13 @@ MAN=3D	adb.4 \
>  	snd_davbus.4 \
>  	tsec.4
>
> -# Link files to the parent directory
> +# Link files to the architecture directory
> +_ARCH_SUBDIR=3Dpowerpc
> +.for _manpage _link in ${MLINKS}
> +MLINKS+=3D${_link} ${_ARCH_SUBDIR}/${_link}
> +.endfor
>  .for _manpage in ${MAN}
> -MLINKS+=3D${_manpage} ../${_manpage}
> +MLINKS+=3D${_manpage} ${_ARCH_SUBDIR}/${_manpage}
>  .endfor
>
> -MANSUBDIR=3D/powerpc
> -
>  .include <bsd.prog.mk>
> diff --git a/usr.sbin/Makefile.amd64 b/usr.sbin/Makefile.amd64
> index d4d185414f41..1f15259eb1ac 100644
> --- a/usr.sbin/Makefile.amd64
> +++ b/usr.sbin/Makefile.amd64
> @@ -2,11 +2,16 @@
>
>  # mptable: broken (not 64 bit clean)
>  # pnpinfo: crashes (not really useful anyway)
> +_ARCH_SUBDIR=3Damd64
>  .if ${MK_ACPI} !=3D "no"
>  SUBDIR+=3D	acpi
>  .endif
>  .if ${MK_APM} !=3D "no"
>  SUBDIR+=3D	apm
> +# Link files to the architecture directory
> +.for _manpage in ${:!/bin/sh -c "/bin/ls ${_ARCH_SUBDIR}/.8"!:E}
> +MLINKS+=3D${_manpage} ${_ARCH_SUBDIR}/${_manpage}
> +.endfor
>  .endif
>  .if ${MK_BHYVE} !=3D "no"
>  SUBDIR+=3D	bhyve
> diff --git a/usr.sbin/apm/Makefile b/usr.sbin/apm/Makefile
> index 27fa0c37d5cf..f52453c62522 100644
> --- a/usr.sbin/apm/Makefile
> +++ b/usr.sbin/apm/Makefile
> @@ -5,10 +5,6 @@ MAN=3D	apm.8
>  MLINKS=3D	apm.8 apmconf.8
>  MANSUBDIR=3D /${MACHINE_CPUARCH}
>
> -# Link files to the parent directory
> -MLINKS+=3D apm.8 ../apm.8
> -MLINKS+=3D apmconf.8 ../apmconf.8
> -
>  PACKAGE=3Dapm
>
>  .include <bsd.prog.mk>
>


--=20
Mateusz Guzik <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGudoHGCb_DGq-eQ8zC4Ox6S6%2B4=VLzTqAamUea2AMbcyM9W9Q>