Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Dec 2022 08:08:58 -0700
From:      "Edward Sanford Sutton, III" <mirror176@hotmail.com>
To:        stable@freebsd.org
Subject:   Re: Help with git - fetch earlier src version
Message-ID:  <CO1PR11MB4770B5F73728B2C986C6B36FE6EB9@CO1PR11MB4770.namprd11.prod.outlook.com>
In-Reply-To: <3eae7bee-d0e2-da47-bd15-cf9f72d583ff@nethead.se>
References:  <3eae7bee-d0e2-da47-bd15-cf9f72d583ff@nethead.se>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12/21/22 05:56, Per olof Ljungmark wrote:
> I am facing the same issue as in
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268492
> or possibly
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267421
> with a T490 laptop.
> 
> Can someone please help with the git command to fetch an earlier 
> version, for example the one for the amd64 December 9th. snapshot?

   If you already have a checkout of stable/13, you made no local 
changes, you don't share that repo with anyone, and wanted to roll it 
back to a76fa7bb6cb721bcccc257ddbc4398d25dc8def8 which came 2022-12-08
01:18:32 +0000 just before a linuxkpi patch:

git reset --hard a76fa7bb6cb721bcccc257ddbc4398d25dc8def8

When you want to return to the previous state you can run:

git merge

   I thought --soft should work or excluding that parameter entirely to 
change your tree to that commit and that --hard destroys records of 
future commits from your git tree but that doesn't seem to be the case.
   You could also create another branch and revert just select commits 
from it so you can otherwise include useful changes (presuming they do 
not also depend on the reverted changes).
   Depending on the issue, there may be other commits involved so 
rolling back even further may be relevant. I thought I followed things 
from the new commits descriptions and emails here and what they were 
trying to undo to lead to undoing a patch from October 12th that altered 
ABI compatibility from 13.0.
   There have been several changes related to accidentally breaking ABI 
then trying to restore it. If you want to use recompiled packages then 
you need the ABI restored. If you build your own then you can get code 
after the breakage though code that later restores it will break 
relevant kernel modules which will need to be recompiled again after it 
is properly restored to 13.0 compatibility.
   You could browse commits by executing `git log` which has many 
parameters that help filter its output and that is also viewable at 
https://cgit.freebsd.org/src/log/?h=stable/13 where commit messages are 
clickable links; the end of the address of each of those links is 
&id=... where ... is the commit hash you can use to restore to that 
commit; make sure you grab something older than the commit that brought 
on your issues.
   If you want to locate commits that impacted 1 file, you can use 
something like:

git log sys/compat/linuxkpi/common/include/linux/rbtree.h

> Instead of
> git clone -b stable/13 --depth 1 https://git.freebsd.org/src.git /usr/src
> 
> (this of course if the issue is not already fixed with current 13-STABLE)
> 
> Thanks,
> Per
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CO1PR11MB4770B5F73728B2C986C6B36FE6EB9>