From nobody Thu Nov 09 04:32:14 2023 X-Original-To: freebsd-current@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 4SQpw14Y0Tz50j3V for ; Thu, 9 Nov 2023 04:32:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (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 4SQpw12yLNz4JZf for ; Thu, 9 Nov 2023 04:32:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-9c41e95efcbso70809166b.3 for ; Wed, 08 Nov 2023 20:32:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1699504347; x=1700109147; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1FSpFXXMc9tDOxB4s8UfOv1O4cs78FoH8Gb9I+OgTFw=; b=vxk2V2QGed1S02hzeUAHBPtjHxuSdttseX+SSpQsTejAEU+xcWdJ0CiGBdBts1xMz5 Ijnii6tXy6Tjy5vTkcfYPAXgemKxOfK7GNZKNf0cFwEW9FWQIysldelvskHkJhCSEjXR 2/8qtDM43nsNPy0Dsv0xUFK93SW8AX1PUZ0bZCqNsNpaErhjE5eEVcHeoL+Af4DtwkgZ 3aWvnNaEkf+daxREIYyOkbpbsxKMeq5WCY3d8oq1e7gI/maEPeTidM1rwuCG9Pn5lqfu RvPQwD2UNVrigntymnyUPDeSjsbGUPfE8/ojn7stP0Og0DJIZ9aMYaO4Knww5LlvZqK6 edvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699504347; x=1700109147; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1FSpFXXMc9tDOxB4s8UfOv1O4cs78FoH8Gb9I+OgTFw=; b=bngvVl4fufD2hd2IAuPY0RTqI14+5v1montCHJwvdHy6tgFoR+a/1jbpPZH3rEvu6L DXiEfhfNGt2zMYACAIsH3mAzABFYRrUqlDR+S123Sp+nUiMqTtPbIZa+u6yxDfa0r+/f VJsv5W0cob0acYpx3wOf3GUq8SGrI3VfJSRweKZUzapDjg/sHsqnVI+gCgyEsoCYX4Ag joSW4VeTky+6xhPWc7U761iRyk3fx6ih+j0gflOf2f5LAnaz8gw3wMfJFXtt11+PZdQf ZJLJyh3pX9+HE1KibMFBL8gM1UjWbcx2ZZ6kLWV1N9PgKoKSRxWCykv5In821hasjdWl LoAg== X-Gm-Message-State: AOJu0YzB0l6C3xjnk0BYf9G6EaU0lyANAIOwJ+TOpHxGggRrBmAL6Pr9 U5RjDjUtmbi9bJYBcThC6QU0ZAVxvl4RIoxrlHHa88uddKLeBgZl X-Google-Smtp-Source: AGHT+IF/78xEwAfQ+ZUMtcdTWS7rDo5HJ+6NP695kWPJMRtjqRgSai84MPiya3jhMESrff8OEfqh3IZkuEQTTxFAhC0= X-Received: by 2002:a17:907:9343:b0:9ae:52fb:2202 with SMTP id bv3-20020a170907934300b009ae52fb2202mr2928290ejc.40.1699504346375; Wed, 08 Nov 2023 20:32:26 -0800 (PST) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <202309260107.38Q17Vp0047265@kx.truefc.org> <202309260629.38Q6T018051416@kx.truefc.org> <20230926181845.539e5816fbef80efda6162ec@dec.sakura.ne.jp> <202309261130.38QBUsLF053699@kx.truefc.org> <4c348f85-d99c-c7c3-5e1a-a435983b720b@plan-b.pwste.edu.pl> <20230926231431.20f42fec1075c3980446c50a@dec.sakura.ne.jp> <20230926221946.4F2C1623@slippy.cwsent.com> <20230927080723.f5157f938803c47a4185d431@dec.sakura.ne.jp> <1e2eb5a6-d728-efed-2b5d-b4a67ba9c861@plan-b.pwste.edu.pl> <14057457-119e-6bb1-ff00-a59cc9ad9680@plan-b.pwste.edu.pl> <20231108200308.4d51b67c@slippy> In-Reply-To: <20231108200308.4d51b67c@slippy> From: Warner Losh Date: Wed, 8 Nov 2023 21:32:14 -0700 Message-ID: Subject: Re: revision not displayed in a2440348eed7 To: Cy Schubert Cc: Marek Zarychta , FreeBSD Current Content-Type: multipart/alternative; boundary="000000000000dc38080609b0b0e5" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4SQpw12yLNz4JZf --000000000000dc38080609b0b0e5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Do you have WITHOUT_REPRODUCEABLE_BUILDS=3DYES in your src.conf? Warner On Wed, Nov 8, 2023, 9:03 PM Cy Schubert wrote: > On Wed, 8 Nov 2023 15:14:34 +0100 > Marek Zarychta wrote: > > > W dniu 8.11.2023 o 14:10, Marek Zarychta pisze: > > > > > > W dniu 27.09.2023 o 01:07, Tomoaki AOKI pisze: > > >> On Tue, 26 Sep 2023 15:19:46 -0700 > > >> Cy Schubert wrote: > > >> > > >>> In message <20230926231431.20f42fec1075c3980446c50a@dec.sakura.ne.j= p > >, > > >>> Tomoaki > > >>> AOKI writes: > > >>>> On Tue, 26 Sep 2023 15:48:50 +0200 > > >>>> Marek Zarychta wrote: > > >>>> > > >>>>> W dniu 26.09.2023 o=C3=82 13:30, KIRIYAMA Kazuhiko pisze: > > >>>>>> At least up to 15.0-CURRENT, nothing has happend by > > >>>>>> WITHOUT_REPRODUCIBLE_BUILD=3Dyes. Something has changed in > > >>>>>> 15.0-CURRENT at some time. I've rebuilded with 3fb80f1476c7, > > >>>>>> but revision not showed by `uname -a' ;-( > > >>>>>> > > >>>>>> What changed ???? > > >>>>> Nothing changed. Perhaps your build system can't check git hash ? > If > > >>>>> your sources are from git repository, you need at least git-lite > > >>>>> installed and full git repository available on build machine. If > you > > >>>>> checked out the repository with gitup and have gitup installed, i= t > > >>>>> should also work. It won't work if your build machine has access= =C3=82 > to > > >>>>> only a part of the repository like worktree. > > >>>>> > > >>>>> Cheers > > >>>>> > > >>>>> -- > > >>>>> Marek Zarychta > > >>>> Just a possibility, but copying src tree to directory other than t= he > > >>>> directory where checked out from git repo and building there could > > >>>> lose track with git hash. > > >>>> > > >>>> Another possibility is that if you build src with any user other > than > > >>>> the one owning local (pulled) git repo could also lose track with > git > > >>>> hash. For example, if I `git log HEAD` with regular user and the > local > > >>>> repo is pulled by root, it fails. No special configuration is done= . > > >>>> > > >>>> % git log HEAD > > >>>> 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 > > >>>> > > >>>> > > >>> This could be due to e6dc6a27230, which was committed this morning. > > >>> There > > >>> is discussion on the src commits ML (dev-commits-src-all, > > >>> dev-commits-src-main) about reverting the change. > > >>> > > >>> > > >>> -- > > >>> Cheers, > > >>> Cy Schubert > > >>> FreeBSD UNIX: Web: https://FreeBSD.org > > >>> NTP: Web: https://nwtime.org > > >>> > > >>> e^(i*pi)+1=3D0 > > >> Would be unrelated here, unfortunately. > > >> As the subject says, the commit the original reporter is bitten at > (not > > >> bi-sected) is at a2440348eed7, which is before e6dc6a27230. > > > > > > Let's refresh this thread. It looks like (at least for stable/14) > > > build system doesn't hardcode revision into the kernel anymore. Last > > > time it worked to me was just after branching stable/14. Today I trie= d > > > to build kernel from sources mounted over NFS and I ened with: > > > > > > # strings /usr/obj/usr/src/amd64.amd64/sys/BSDONDELL/kernel | grep > > > 14.0-STABLE > > > @(#)FreeBSD 14.0-STABLE #6 -dirty: Tue Nov 7 14:04:35 CET 2023 > > > FreeBSD 14.0-STABLE #6 -dirty: Tue Nov 7 14:04:35 CET 2023 > > > 14.0-STABLE > > > > > > the source repository is updated, consisted, but mounted read-only > > > over NFS > > > > > > /usr/src# git status > > > On branch stable/14 > > > Your branch is up to date with 'origin/stable/14'. > > > > > > Untracked files: > > > (use "git add ..." to include in what will be committed) > > > sys/amd64/conf/BSDONDELL > > > > > > It took 2.53 seconds to enumerate untracked files. > > > See 'git help status' for information on how to improve this. > > > > > > nothing added to commit but untracked files present (use "git add" to > > > track) > > > > > > > > > Any clues what could be wrong ? Does /usr/src/ require write > > > permissions now ? > > > > > > I am sorry for the false alarm. It looks like using META MODE prevented > > updating this info. After cleaning obj dir and rebuilding revision is > > visible: > > # strings /usr/obj/usr/src/amd64.amd64/sys/BSDONDELL/kernel | grep > > 14.0-STABLE > > @(#)FreeBSD 14.0-STABLE #0 stable/14-n265707-d2c65a1c9486: Wed Nov 8 > > 14:16:31 CET 2023 > > FreeBSD 14.0-STABLE #0 stable/14-n265707-d2c65a1c9486: Wed Nov 8 > > 14:16:31 CET 2023 > > > > sys/conf/newvers.sh is responsible for getting the git hash into the > kernel. If it finds a .git directory it will extract the hash to insert > it into the kernel. > > I suspect there is something about your source tree that causes it to > think there is no .git directory. In sys/conf/newvers.sh you will see > where it sets $git_cmd when a .git directory exists. It subsequently > tests for a non-zero $git_cmd string whereby it extracts the git hash. > > You might want to look through newvers.sh. Understanding what it does > might point you to the cause of your problem, should it be that your > tree is missing a .git directory or if your .git directory isn't quite > right. > > That's the hypothesis ATM. > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > e^(i*pi)+1=3D0 > > --000000000000dc38080609b0b0e5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Do you have WITHOUT_REPRODUCEABLE_BUILDS=3DYES in your sr= c.conf?

Warner

=
On Wed, No= v 8, 2023, 9:03 PM Cy Schubert <Cy.Schubert@cschubert.com> wrote:
On Wed, 8 Nov 2023 15:14:34 +0100
Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> wrote:=

> W dniu 8.11.2023 o=C2=A014:10, Marek Zarychta pisze:
> >
> > W dniu 27.09.2023 o=C2=A001:07, Tomoaki AOKI pisze:=C2=A0
> >> On Tue, 26 Sep 2023 15:19:46 -0700
> >> Cy Schubert <Cy.Schubert@cschubert.com> wrot= e:
> >>=C2=A0
> >>> In message <2023= 0926231431.20f42fec1075c3980446c50a@dec.sakura.ne.jp>,
> >>> Tomoaki
> >>> AOKI writes:=C2=A0
> >>>> On Tue, 26 Sep 2023 15:48:50 +0200
> >>>> Marek Zarychta <zarychtam@plan-b.pwste.= edu.pl> wrote:
> >>>>=C2=A0
> >>>>> W dniu 26.09.2023 o=C3=82=C2=A013:30, KIRIYAMA Ka= zuhiko pisze:=C2=A0
> >>>>>> At least up to 15.0-CURRENT, nothing has happ= end by
> >>>>>> WITHOUT_REPRODUCIBLE_BUILD=3Dyes. Something h= as changed in
> >>>>>> 15.0-CURRENT at some time. I've rebuilded= with 3fb80f1476c7,
> >>>>>> but revision not showed by `uname -a' ;-(=
> >>>>>>
> >>>>>> What changed ????=C2=A0
> >>>>> Nothing changed. Perhaps your build system can= 9;t check git hash ? If
> >>>>> your sources are from git repository, you need at= least git-lite
> >>>>> installed and full git repository available on bu= ild machine. If you
> >>>>> checked out the repository with gitup and have gi= tup installed, it
> >>>>> should also work. It won't work if your build= machine has access=C3=82=C2=A0 to
> >>>>> only a part of the repository like worktree.
> >>>>>
> >>>>> Cheers
> >>>>>
> >>>>> --
> >>>>> Marek Zarychta=C2=A0
> >>>> Just a possibility, but copying src tree to directory= other than the
> >>>> directory where checked out from git repo and buildin= g there could
> >>>> lose track with git hash.
> >>>>
> >>>> Another possibility is that if you build src with any= user other than
> >>>> the one owning local (pulled) git repo could also los= e track with git
> >>>> hash. For example, if I `git log HEAD` with regular u= ser and the local
> >>>> repo is pulled by root, it fails. No special configur= ation is done.
> >>>>
> >>>> % git log HEAD
> >>>> fatal: detected dubious ownership in repository at &#= 39;/usr/src'
> >>>> To add an exception for this directory, call:
> >>>>
> >>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 git = config --global --add safe.directory /usr/src
> >>>>
> >>>>=C2=A0
> >>> This could be due to e6dc6a27230, which was committed thi= s morning.
> >>> There
> >>> is discussion on the src commits ML (dev-commits-src-all,=
> >>> dev-commits-src-main) about reverting the change.
> >>>
> >>>
> >>> --
> >>> Cheers,
> >>> Cy Schubert <Cy.Schubert@cschubert.com><= br> > >>> FreeBSD UNIX:=C2=A0 <cy@FreeBSD.org>=C2=A0=C2=A0 We= b: https://FreeBSD.org
> >>> NTP:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 <cy@nwtime.org>=C2=A0=C2=A0=C2=A0 Web: https://nwtime.or= g
> >>>
> >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 e^(i*pi)+1=3D0=C2=A0
> >> Would be unrelated here, unfortunately.
> >> As the subject says, the commit the original reporter is bitt= en at (not
> >> bi-sected) is at a2440348eed7, which is before e6dc6a27230.= =C2=A0
> >
> > Let's refresh this thread. It looks like (at least for stable= /14)
> > build system doesn't hardcode revision into the kernel anymor= e. Last
> > time it worked to me was just after branching stable/14. Today I = tried
> > to build kernel from sources mounted over NFS and I ened with: > >
> > # strings /usr/obj/usr/src/amd64.amd64/sys/BSDONDELL/kernel | gre= p
> > 14.0-STABLE
> > @(#)FreeBSD 14.0-STABLE #6 -dirty: Tue Nov=C2=A0 7 14:04:35 CET 2= 023
> > FreeBSD 14.0-STABLE #6 -dirty: Tue Nov=C2=A0 7 14:04:35 CET 2023<= br> > > 14.0-STABLE
> >
> > the source repository is updated, consisted, but mounted read-onl= y
> > over NFS
> >
> > /usr/src# git status
> > On branch stable/14
> > Your branch is up to date with 'origin/stable/14'.
> >
> > Untracked files:
> > =C2=A0 (use "git add <file>..." to include in wha= t will be committed)
> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sys/amd64/conf/BSDONDE= LL
> >
> > It took 2.53 seconds to enumerate untracked files.
> > See 'git help status' for information on how to improve t= his.
> >
> > nothing added to commit but untracked files present (use "gi= t add" to
> > track)
> >
> >
> > Any clues what could be wrong ? Does /usr/src/=C2=A0 require writ= e
> > permissions now ?=C2=A0
>
>
> I am sorry for the false alarm. It looks like using META MODE prevente= d
> updating this info. After cleaning obj dir and rebuilding revision is =
> visible:
> # strings /usr/obj/usr/src/amd64.amd64/sys/BSDONDELL/kernel | grep > 14.0-STABLE
> @(#)FreeBSD 14.0-STABLE #0 stable/14-n265707-d2c65a1c9486: Wed Nov=C2= =A0 8
> 14:16:31 CET 2023
> FreeBSD 14.0-STABLE #0 stable/14-n265707-d2c65a1c9486: Wed Nov=C2=A0 8=
> 14:16:31 CET 2023
>

sys/conf/newvers.sh is responsible for getting the git hash into the
kernel. If it finds a .git directory it will extract the hash to insert
it into the kernel.

I suspect there is something about your source tree that causes it to
think there is no .git directory. In sys/conf/newvers.sh you will see
where it sets $git_cmd when a .git directory exists. It subsequently
tests for a non-zero $git_cmd string whereby it extracts the git hash.

You might want to look through newvers.sh. Understanding what it does
might point you to the cause of your problem, should it be that your
tree is missing a .git directory or if your .git directory isn't quite<= br> right.

That's the hypothesis ATM.

--
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:=C2=A0 <cy@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 ht= tps://FreeBSD.org
NTP:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<cy@nwtime.org>=C2=A0 =C2= =A0 Web:=C2=A0 https://nwtime.org

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 e^(i*pi)+1=3D0

--000000000000dc38080609b0b0e5--