metalog -> makefs is broken again in -HEAD

Adrian Chadd adrian at freebsd.org
Sun Aug 21 21:30:22 UTC 2016


On 21 August 2016 at 09:11, Sean Bruno <sbruno at freebsd.org> wrote:
> Ok, figured a hack for not installing the atheros tools:
> ----------------------------------------------------------------------
> diff --git a/build/bin/build_freebsd b/build/bin/build_freebsd
> index d7fe4c2..04169b4 100755
> --- a/build/bin/build_freebsd
> +++ b/build/bin/build_freebsd
> @@ -112,7 +112,7 @@ fi
>
>  while [ -n "$1" ]; do
>         echo "*** Stage         : $1"
> -       if [ "$1" = "installworld" ]; then
> +       if [ "$1" = "installworld" -a ${X_BUILD_BASE_CFG} = "mips_ap" ];
> then
>                 mkdir -p ${X_DESTDIR}/usr/local/bin/
>                 mkdir -p ${X_DESTDIR}/bsdbox/
>                 mkdir -p ${X_DESTDIR}/usr/local/libdata/athprom/
>

This happens because when adding LOCAL_TOOL_DIRS to install the ath
bits, it's installing it in /usr/local/* without doing an install -d
/usr/local/bin , /usr/local/libexec/, etc beforehand.

I bet doing a "make installworld" without /usr/local/ fully populated
(ie, no ports) won't create the /usr/local/ subdirectories.

> ---------------------------------------------------------------------
>
> I can't quite see how to fix the last two errors I'm seeing:
>
> *** Target              : fullroot
> *** Deleting old file system..
> install: open /home/sbruno/bsd/fbsd_head/../mfsroot/METALOG.malta.tmp:
> No such file or directory
> *** Creating new filesystem...
> **** Done.
> *** Target Done.
> *** Target              : fullfsimage
> *** Running makefs to build image ..
> *** from /home/sbruno/bsd/fbsd_head/../mfsroot/malta ..
> makefs: ./boot/kernel.MALTA: missing directory in specification
> makefs: failed at line 26663 of the specification
>

This happens because the option that sets the kernel directory for the
installworld/installkernel pass (KODIR and KMODDIR) doesn't first do
an install -d /boot/kernel.XXX/, so the metalog entry isn't populated.

I could write another tool like filter.pl that allows for entries to
be inserted before other entries, so we could say "hey, please
populate /boot/kernel.XXX before you populate /boot/kernel.XXX/YYY",
but I think I'd rather just fix it in -HEAD.



-adrian


More information about the freebsd-arch mailing list