Re: Getting /usr/src to match specific git hash?

From: Warner Losh <imp_at_bsdimp.com>
Date: Mon, 25 Jan 2021 16:04:14 -0700
On Mon, Jan 25, 2021 at 3:57 PM tech-lists <tech-lists_at_zyxst.net> wrote:

> On Sun, Jan 24, 2021 at 01:08:05PM +0900, Yasuhiro Kimura wrote:
> >From: Steve Kargl <sgk_at_troutmask.apl.washington.edu>
> >Subject: Getting /usr/src to match specific git hash?
> >Date: Sat, 23 Jan 2021 19:58:52 -0800
> >
> >> Suppose one has an empty /usr/src.
> >>
> >> Suppose further that one had to re-install a 32-bit
> >> i386-*-freebsd with the 24 Dec 2020 image available
> >> from freebsd.org.
> >>
> >> uname -a for the booted kernel shows
> >>
> >> % uname -a
> >> FreeBSD mobile 13.0-CURRENT FreeBSD 13.0-CURRENT #0 \
> >> 3cc0c0d66a0-c255241(main)-dirty: Thu Dec 24 05:43:23 UTC 2020 \
> >> root_at_releng1.nyi.freebsd.org:/usr/obj/usr/src/i386.i386/sys/GENERIC
> i386
> >>
> >> How does one use git to pull the exact sources that match
> >> this specifc kernel?
> >
> >cd /usr
> >git clone https://git.freebsd.org/src.git
> >cd src
> >git checkout 3cc0c0d66a0
>
> I have the exact same issue. The installation I have is:
>
> 13.0-CURRENT #0 2ed50808d2b-c254384(main): Thu Nov 12 10:03:35 UTC 2020
>
> The method described doesn't work for me for some reason:
>
> [...]
> root_at_rpi4:/usr # git clone https://git.freebsd.org/src.git
> Cloning into 'src'...
> remote: Enumerating objects: 377505, done.
> remote: Counting objects: 100% (377505/377505), done.
> remote: Compressing objects: 100% (26583/26583), done.
> remote: Total 3831969 (delta 371848), reused 350922 (delta 350922),
> pack-reused 3454464
> Receiving objects: 100% (3831969/3831969), 1.14 GiB | 6.28 MiB/s, done.
> Resolving deltas: 100% (3034679/3034679), done.
> Updating files: 100% (85162/85162), done.
> root_at_rpi4:/usr # cd src
> root_at_rpi4:/usr/src # git checkout 2ed50808d2b
> error: pathspec '2ed50808d2b' did not match any file(s) known to git
>

For the archives, this is because this hash is from the old beta hashes
that we got rid of. there's another thread that has all the details.

Warner
Received on Mon Jan 25 2021 - 22:04:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:26 UTC