Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Nov 2023 21:32:14 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Cy Schubert <Cy.Schubert@cschubert.com>
Cc:        Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>,  FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: revision not displayed in a2440348eed7
Message-ID:  <CANCZdfriQ8-pr=neV__G_ZWt%2BKF8-HR8cvi-C-7U5cWkthBefA@mail.gmail.com>
In-Reply-To: <20231108200308.4d51b67c@slippy>
References:  <202309260107.38Q17Vp0047265@kx.truefc.org> <bcb843e0-a2ca-18d9-70cd-cb702467c72a@aetern.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>

next in thread | previous in thread | raw e-mail | index | archive | help
--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 <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 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 <Cy.Schubert@cschubert.com> wrote:
> > >>
> > >>> In message <20230926231431.20f42fec1075c3980446c50a@dec.sakura.ne.j=
p
> >,
> > >>> Tomoaki
> > >>> AOKI writes:
> > >>>> On Tue, 26 Sep 2023 15:48:50 +0200
> > >>>> Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> 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 <Cy.Schubert@cschubert.com>
> > >>> FreeBSD UNIX:  <cy@FreeBSD.org>   Web: https://FreeBSD.org
> > >>> NTP:           <cy@nwtime.org>    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 <file>..." 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 <Cy.Schubert@cschubert.com>
> FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
> NTP:           <cy@nwtime.org>    Web:  https://nwtime.org
>
>                         e^(i*pi)+1=3D0
>
>

--000000000000dc38080609b0b0e5
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">Do you have WITHOUT_REPRODUCEABLE_BUILDS=3DYES in your sr=
c.conf?<div dir=3D"auto"><br></div><div dir=3D"auto">Warner</div></div><br>=
<div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, No=
v 8, 2023, 9:03 PM Cy Schubert &lt;<a href=3D"mailto:Cy.Schubert@cschubert.=
com">Cy.Schubert@cschubert.com</a>&gt; wrote:<br></div><blockquote class=3D=
"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding=
-left:1ex">On Wed, 8 Nov 2023 15:14:34 +0100<br>
Marek Zarychta &lt;<a href=3D"mailto:zarychtam@plan-b.pwste.edu.pl" target=
=3D"_blank" rel=3D"noreferrer">zarychtam@plan-b.pwste.edu.pl</a>&gt; wrote:=
<br>
<br>
&gt; W dniu 8.11.2023 o=C2=A014:10, Marek Zarychta pisze:<br>
&gt; &gt;<br>
&gt; &gt; W dniu 27.09.2023 o=C2=A001:07, Tomoaki AOKI pisze:=C2=A0 <br>
&gt; &gt;&gt; On Tue, 26 Sep 2023 15:19:46 -0700<br>
&gt; &gt;&gt; Cy Schubert &lt;<a href=3D"mailto:Cy.Schubert@cschubert.com" =
target=3D"_blank" rel=3D"noreferrer">Cy.Schubert@cschubert.com</a>&gt; wrot=
e:<br>
&gt; &gt;&gt;=C2=A0 <br>
&gt; &gt;&gt;&gt; In message &lt;<a href=3D"mailto:20230926231431.20f42fec1=
075c3980446c50a@dec.sakura.ne.jp" target=3D"_blank" rel=3D"noreferrer">2023=
0926231431.20f42fec1075c3980446c50a@dec.sakura.ne.jp</a>&gt;,<br>
&gt; &gt;&gt;&gt; Tomoaki<br>
&gt; &gt;&gt;&gt; AOKI writes:=C2=A0 <br>
&gt; &gt;&gt;&gt;&gt; On Tue, 26 Sep 2023 15:48:50 +0200<br>
&gt; &gt;&gt;&gt;&gt; Marek Zarychta &lt;<a href=3D"mailto:zarychtam@plan-b=
.pwste.edu.pl" target=3D"_blank" rel=3D"noreferrer">zarychtam@plan-b.pwste.=
edu.pl</a>&gt; wrote:<br>
&gt; &gt;&gt;&gt;&gt;=C2=A0 <br>
&gt; &gt;&gt;&gt;&gt;&gt; W dniu 26.09.2023 o=C3=82=C2=A013:30, KIRIYAMA Ka=
zuhiko pisze:=C2=A0 <br>
&gt; &gt;&gt;&gt;&gt;&gt;&gt; At least up to 15.0-CURRENT, nothing has happ=
end by<br>
&gt; &gt;&gt;&gt;&gt;&gt;&gt; WITHOUT_REPRODUCIBLE_BUILD=3Dyes. Something h=
as changed in<br>
&gt; &gt;&gt;&gt;&gt;&gt;&gt; 15.0-CURRENT at some time. I&#39;ve rebuilded=
 with 3fb80f1476c7,<br>
&gt; &gt;&gt;&gt;&gt;&gt;&gt; but revision not showed by `uname -a&#39; ;-(=
<br>
&gt; &gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt;&gt; What changed ????=C2=A0 <br>
&gt; &gt;&gt;&gt;&gt;&gt; Nothing changed. Perhaps your build system can&#3=
9;t check git hash ? If<br>
&gt; &gt;&gt;&gt;&gt;&gt; your sources are from git repository, you need at=
 least git-lite<br>
&gt; &gt;&gt;&gt;&gt;&gt; installed and full git repository available on bu=
ild machine. If you<br>
&gt; &gt;&gt;&gt;&gt;&gt; checked out the repository with gitup and have gi=
tup installed, it<br>
&gt; &gt;&gt;&gt;&gt;&gt; should also work. It won&#39;t work if your build=
 machine has access=C3=82=C2=A0 to<br>
&gt; &gt;&gt;&gt;&gt;&gt; only a part of the repository like worktree.<br>
&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt; Cheers<br>
&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt; -- <br>
&gt; &gt;&gt;&gt;&gt;&gt; Marek Zarychta=C2=A0 <br>
&gt; &gt;&gt;&gt;&gt; Just a possibility, but copying src tree to directory=
 other than the<br>
&gt; &gt;&gt;&gt;&gt; directory where checked out from git repo and buildin=
g there could<br>
&gt; &gt;&gt;&gt;&gt; lose track with git hash.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; Another possibility is that if you build src with any=
 user other than<br>
&gt; &gt;&gt;&gt;&gt; the one owning local (pulled) git repo could also los=
e track with git<br>
&gt; &gt;&gt;&gt;&gt; hash. For example, if I `git log HEAD` with regular u=
ser and the local<br>
&gt; &gt;&gt;&gt;&gt; repo is pulled by root, it fails. No special configur=
ation is done.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; % git log HEAD<br>
&gt; &gt;&gt;&gt;&gt; fatal: detected dubious ownership in repository at &#=
39;/usr/src&#39;<br>
&gt; &gt;&gt;&gt;&gt; To add an exception for this directory, call:<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 git =
config --global --add safe.directory /usr/src<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;=C2=A0 <br>
&gt; &gt;&gt;&gt; This could be due to e6dc6a27230, which was committed thi=
s morning. <br>
&gt; &gt;&gt;&gt; There<br>
&gt; &gt;&gt;&gt; is discussion on the src commits ML (dev-commits-src-all,=
<br>
&gt; &gt;&gt;&gt; dev-commits-src-main) about reverting the change.<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; -- <br>
&gt; &gt;&gt;&gt; Cheers,<br>
&gt; &gt;&gt;&gt; Cy Schubert &lt;<a href=3D"mailto:Cy.Schubert@cschubert.c=
om" target=3D"_blank" rel=3D"noreferrer">Cy.Schubert@cschubert.com</a>&gt;<=
br>
&gt; &gt;&gt;&gt; FreeBSD UNIX:=C2=A0 &lt;cy@FreeBSD.org&gt;=C2=A0=C2=A0 We=
b: <a href=3D"https://FreeBSD.org" rel=3D"noreferrer noreferrer" target=3D"=
_blank">https://FreeBSD.org</a><br>;
&gt; &gt;&gt;&gt; NTP:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 &lt;<a href=3D"mailto:cy@nwtime.org" target=3D"_blank" rel=3D"nor=
eferrer">cy@nwtime.org</a>&gt;=C2=A0=C2=A0=C2=A0 Web: <a href=3D"https://nw=
time.org" rel=3D"noreferrer noreferrer" target=3D"_blank">https://nwtime.or=
g</a><br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; =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 <br>
&gt; &gt;&gt; Would be unrelated here, unfortunately.<br>
&gt; &gt;&gt; As the subject says, the commit the original reporter is bitt=
en at (not<br>
&gt; &gt;&gt; bi-sected) is at a2440348eed7, which is before e6dc6a27230.=
=C2=A0 <br>
&gt; &gt;<br>
&gt; &gt; Let&#39;s refresh this thread. It looks like (at least for stable=
/14) <br>
&gt; &gt; build system doesn&#39;t hardcode revision into the kernel anymor=
e. Last <br>
&gt; &gt; time it worked to me was just after branching stable/14. Today I =
tried <br>
&gt; &gt; to build kernel from sources mounted over NFS and I ened with:<br=
>
&gt; &gt;<br>
&gt; &gt; # strings /usr/obj/usr/src/amd64.amd64/sys/BSDONDELL/kernel | gre=
p <br>
&gt; &gt; 14.0-STABLE<br>
&gt; &gt; @(#)FreeBSD 14.0-STABLE #6 -dirty: Tue Nov=C2=A0 7 14:04:35 CET 2=
023<br>
&gt; &gt; FreeBSD 14.0-STABLE #6 -dirty: Tue Nov=C2=A0 7 14:04:35 CET 2023<=
br>
&gt; &gt; 14.0-STABLE<br>
&gt; &gt;<br>
&gt; &gt; the source repository is updated, consisted, but mounted read-onl=
y <br>
&gt; &gt; over NFS<br>
&gt; &gt;<br>
&gt; &gt; /usr/src# git status<br>
&gt; &gt; On branch stable/14<br>
&gt; &gt; Your branch is up to date with &#39;origin/stable/14&#39;.<br>
&gt; &gt;<br>
&gt; &gt; Untracked files:<br>
&gt; &gt; =C2=A0 (use &quot;git add &lt;file&gt;...&quot; to include in wha=
t will be committed)<br>
&gt; &gt; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sys/amd64/conf/BSDONDE=
LL<br>
&gt; &gt;<br>
&gt; &gt; It took 2.53 seconds to enumerate untracked files.<br>
&gt; &gt; See &#39;git help status&#39; for information on how to improve t=
his.<br>
&gt; &gt;<br>
&gt; &gt; nothing added to commit but untracked files present (use &quot;gi=
t add&quot; to <br>
&gt; &gt; track)<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Any clues what could be wrong ? Does /usr/src/=C2=A0 require writ=
e <br>
&gt; &gt; permissions now ?=C2=A0 <br>
&gt; <br>
&gt; <br>
&gt; I am sorry for the false alarm. It looks like using META MODE prevente=
d <br>
&gt; updating this info. After cleaning obj dir and rebuilding revision is =
<br>
&gt; visible:<br>
&gt; # strings /usr/obj/usr/src/amd64.amd64/sys/BSDONDELL/kernel | grep <br=
>
&gt; 14.0-STABLE<br>
&gt; @(#)FreeBSD 14.0-STABLE #0 stable/14-n265707-d2c65a1c9486: Wed Nov=C2=
=A0 8 <br>
&gt; 14:16:31 CET 2023<br>
&gt; FreeBSD 14.0-STABLE #0 stable/14-n265707-d2c65a1c9486: Wed Nov=C2=A0 8=
 <br>
&gt; 14:16:31 CET 2023<br>
&gt; <br>
<br>
sys/conf/newvers.sh is responsible for getting the git hash into the<br>
kernel. If it finds a .git directory it will extract the hash to insert<br>
it into the kernel.<br>
<br>
I suspect there is something about your source tree that causes it to<br>
think there is no .git directory. In sys/conf/newvers.sh you will see<br>
where it sets $git_cmd when a .git directory exists. It subsequently<br>
tests for a non-zero $git_cmd string whereby it extracts the git hash.<br>
<br>
You might want to look through newvers.sh. Understanding what it does<br>
might point you to the cause of your problem, should it be that your<br>
tree is missing a .git directory or if your .git directory isn&#39;t quite<=
br>
right.<br>
<br>
That&#39;s the hypothesis ATM.<br>
<br>
-- <br>
Cheers,<br>
Cy Schubert &lt;<a href=3D"mailto:Cy.Schubert@cschubert.com" target=3D"_bla=
nk" rel=3D"noreferrer">Cy.Schubert@cschubert.com</a>&gt;<br>
FreeBSD UNIX:=C2=A0 &lt;cy@FreeBSD.org&gt;=C2=A0 =C2=A0Web:=C2=A0 <a href=
=3D"https://FreeBSD.org" rel=3D"noreferrer noreferrer" target=3D"_blank">ht=
tps://FreeBSD.org</a><br>
NTP:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&lt;<a href=3D"mailto:cy@nwtim=
e.org" target=3D"_blank" rel=3D"noreferrer">cy@nwtime.org</a>&gt;=C2=A0 =C2=
=A0 Web:=C2=A0 <a href=3D"https://nwtime.org" rel=3D"noreferrer noreferrer"=
 target=3D"_blank">https://nwtime.org</a><br>;
<br>
=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<br>
<br>
</blockquote></div>

--000000000000dc38080609b0b0e5--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfriQ8-pr=neV__G_ZWt%2BKF8-HR8cvi-C-7U5cWkthBefA>