← Back to team overview

ubuntu-bugcontrol team mailing list archive

Re: Proposed update for https://wiki.ubuntu.com/Kernel/KernelBisection inquiry

 

Andy, thank you for your quick response.

>> -START-
>> = Testing a patch from upstream =
>>
>> Lets assume you may have identified an upstream patch that hasn't been
>> commited to an upstream branch, and you would like to test it out. Let
>> us take as an example the following upstream patch:
>>
>> testfix.patch
>> http://www.spinics.net/lists/linux-acpi/msg47755.html
>>
>> Start copying from the line where it notes:
>> diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
>>
>> to the last code line before the double dash:
>>  static int register_count;
>>
>> Your patch file should exactly as shown, honoring all spaces, or lack thereof:
>
> You shuldn't need to rip the above and below bits as git should understand
> it in full (as patch has always done too).  Indeed if it has a 'diff
> --git' header then it is in git email format.  Saving the email as a
> file and applying it with 'git am <filename>' will apply it including
> the right ownership.

Given the situation of a new bisector (I'll lump myself in this as
well), how would one looking at the mailing list post through a web
browser (where domains are hidden by the archive system) save the
e-mail as a file as you are suggesting? For example:
Copy from what points?
Save as what file extension specifically?

As wel, I'm not sure what the gain would be given all one would want
to do is quickly test the patch, and then discard the commit
immediately afterwards. It could be mentioned as a suggestion at the
end to reset their tree back to the defaults via:
git fetch origin;git fetch origin master;git reset --hard FETCH_HEAD

>> save this file to your Desktop as testfix.patch. Then execute at a terminal:
>> git config --global user.email "you@xxxxxxxxxxx" && git config
>> --global user.name "Your Name" && git clone
>> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
>> ~/Desktop/linux-stable && patch
>> ~/Desktop/linux-stable/drivers/acpi/video.c ~/Desktop/testfix.patch &&
>> git add . && git commit

I made a slight error here. It should be:
git config --global user.email "you@xxxxxxxxxxx" && git config
--global user.name "Your Name" && git clone
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
~/Desktop/linux-stable && patch
~/Desktop/linux-stable/drivers/acpi/video.c ~/Desktop/testfix.patch &&
cd ~/Desktop/linux-stable && git add . && git commit

>>
>> which should post the commit:
>> commit <COMMIT>
>>
>> Use this commit in the below terminal command:
>> git checkout <COMMIT> && cp /boot/config-`uname -r` .config && yes ''
>
> If you just committed the patch it would be the currnet commit, so there
> would be no reason to check it out again.

Good point!

Christopher M. Penalver
E-Mail: christopher.m.penalver@xxxxxxxxx


References