Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Mar 2025 12:41:35 +0000
From:      "Dave Cottlehuber" <dch@skunkwerks.at>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        current@freebsd.org
Subject:   Re: installworld runs git again
Message-ID:  <c1bbb201-7638-4807-9591-8f0f3199863b@app.fastmail.com>
In-Reply-To: <3p5pq042-95n8-0s53-178n-n07s8400rs03@yvfgf.mnoonqbm.arg>
References:  <3p5pq042-95n8-0s53-178n-n07s8400rs03@yvfgf.mnoonqbm.arg>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 10 Mar 2025, at 23:13, Bjoern A. Zeeb wrote:
> Hi,
>
> make installworld runs git again but if build as user and owning the
> files as user and installing as root that gives the obvious warning:
>
> make[1]: "/usr/obj/usr/src/amd64.amd64/toolchain-metadata.mk" line 1: 
> Using cached toolchain metadata from build at lab-top on Mon Mar 10 
> 22:35:33 UTC 2025
> fatal: detected dubious ownership in repository at '/usr/src'
> To add an exception for this directory, call:
>
>          git config --global --add safe.directory /usr/src
> make[1]: "/usr/src/Makefile.inc1" line 601: warning: Command 
> "/usr/local/bin/git -C /usr/src show -s --format=%ct HEAD" exited with 
> status 128

We can use:

/usr/local/bin/git -c safe.directory=/usr/src \
  -C /usr/src show -s --format=%ct HEAD

which would avoid that, https://reviews.freebsd.org/D49316

> What do we need these timestamps for when doing an installworld?

I guess its reproducible builds, hence basing it off the commit's
timestamp, not the filesystem.

> People used to have /usr/src ro and and the obj directories once build 
> is done too.  We've long lost that but given we are so much after 
> reproducability maybe people should try this again...

This works for me today, at least with beinstall.sh its how I upgrade
my arm64 router from its bigger server, over RO nfs.

A+
Dave



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c1bbb201-7638-4807-9591-8f0f3199863b>