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