Download Linus's latest git tree
Hi, I want to download the latest kernel version using git. Trying following command git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git it takes very long time and tries to download whole repository. But i need only latest stable version. Any way to get it?? Thanks Regards Anurudh
On Mon, May 26, 2014 at 7:50 PM, Anurudh Tiwari <anurudhtripathi@gmail.com> wrote:
Hi,
I want to download the latest kernel version using git. Trying following command
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
it takes very long time and tries to download whole repository. But i need only latest stable version. Any way to get it??
Thanks
Regards Anurudh
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi, You can try at www.kernel.org Regards, Bojan
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git -- Lucas Tanure +55 (19) 988176559
On Mon, 26 May 2014 15:04:17 -0300, Lucas Tanure said:
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Note that '--depth 1' results in a faster initial download, but it has a number of disadvatages - you can't clone it into another tree of yours, nor can you push or pull from it. And most notably, you can't use it for a git bisect. I'd recommend biting the bullet, and doing a full clone (you only have to do that the first time - the next time, even if you need a new copy of the tree, you can clone your original for the basis and not have to refetch it).
Hi All, You can try following steps to checkout to the latest stable kernel. # First clone to the current release. git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-stable cd linux-stable # Create local branch stable git checkout -b stable # Added a remote git tree to the .git/config using following command. git remote add stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git # Now fetch the changes to the current stable release. Will checkout the changes to v3.14.y stable. git fetch stable v3.14.y # Now this kernel will merge the changes in to stable branch. git merge FETCH_HEAD Please share your thoughts on this. -Anand Moon On Tuesday, May 27, 2014 7:48 AM, "Valdis.Kletnieks@vt.edu" <Valdis.Kletnieks@vt.edu> wrote: On Mon, 26 May 2014 15:04:17 -0300, Lucas Tanure said:
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Note that '--depth 1' results in a faster initial download, but it has a number of disadvatages - you can't clone it into another tree of yours, nor can you push or pull from it. And most notably, you can't use it for a git bisect. I'd recommend biting the bullet, and doing a full clone (you only have to do that the first time - the next time, even if you need a new copy of the tree, you can clone your original for the basis and not have to refetch it). _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On Tue, 27 May 2014 00:16:52 -0700, Anand Moon said:
Please share your thoughts on this.
I'd do it slightly differently, by keeping a master copy of Linus's tree, and a separate tree for the -stable additions (and other separate trees for linux-next or whatever else you feel like...) I keep my git trees under /usr/src - feel free to stick them elsewhere if that makes your workflow or disk management easier. Just remember to fix any pathnames.. :) 1) Get yourself a copy of Linus's tree, almost same as before: cd /usr/src git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux Note we called it 'linux', not 'linux-stable'. Remember the full path for this (I keep this one in /usr/src/linux, so that's what I'll use below) Note - this tree should be updated via this. The other trees are different cd /usr/src/linux git pull 2) Make a clone of that tree to use as 'stable': cd /usr/src git clone --local /usr/src/linux linux-stable You now have a copy in /usr/src/linux-stable. Also, *this* clone is local only, so you don't have to re-fetch Linus's tree. git remote add stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git git fetch stable git fetch --tags stable This tree you should *NOT* use 'git pull' - use 'git remote update' or 'git fetch v3.specifictag' 3) If you want to get a copy of the linux-next tree as well, it's easy, almost the same workflow: cd /usr/src/ git clode --local /usr/src/linux linux-next git remote add linux-next git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch linux-next (And again, update via 'git remote update' or 'git fetch'....) Now the interesting part is that you can do 'git checkout' on all 3 trees *and they're independent* - so you can (for instance) have 3 different 'git bisects' in different stages of completion. Or check out the Linus 3.10 kernel to see how code *used* to be, and the linux-stable 3.14.5 to see how it is *now*, and so on. Or you can check out the Linus v3.15-rc7 or the current linux-next, and see what patches *aren't* in the current linux-stable... or whatever else you feel like doing....
Hi Validis, Thanks for this new approach. -Anand Moon On Tuesday, May 27, 2014 2:07 PM, "Valdis.Kletnieks@vt.edu" <Valdis.Kletnieks@vt.edu> wrote: On Tue, 27 May 2014 00:16:52 -0700, Anand Moon said:
Please share your thoughts on this.
I'd do it slightly differently, by keeping a master copy of Linus's tree, and a separate tree for the -stable additions (and other separate trees for linux-next or whatever else you feel like...) I keep my git trees under /usr/src - feel free to stick them elsewhere if that makes your workflow or disk management easier. Just remember to fix any pathnames.. :) 1) Get yourself a copy of Linus's tree, almost same as before: cd /usr/src git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux Note we called it 'linux', not 'linux-stable'. Remember the full path for this (I keep this one in /usr/src/linux, so that's what I'll use below) Note - this tree should be updated via this. The other trees are different cd /usr/src/linux git pull 2) Make a clone of that tree to use as 'stable': cd /usr/src git clone --local /usr/src/linux linux-stable You now have a copy in /usr/src/linux-stable. Also, *this* clone is local only, so you don't have to re-fetch Linus's tree. git remote add stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git git fetch stable git fetch --tags stable This tree you should *NOT* use 'git pull' - use 'git remote update' or 'git fetch v3.specifictag' 3) If you want to get a copy of the linux-next tree as well, it's easy, almost the same workflow: cd /usr/src/ git clode --local /usr/src/linux linux-next git remote add linux-next git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch linux-next (And again, update via 'git remote update' or 'git fetch'....) Now the interesting part is that you can do 'git checkout' on all 3 trees *and they're independent* - so you can (for instance) have 3 different 'git bisects' in different stages of completion. Or check out the Linus 3.10 kernel to see how code *used* to be, and the linux-stable 3.14.5 to see how it is *now*, and so on. Or you can check out the Linus v3.15-rc7 or the current linux-next, and see what patches *aren't* in the current linux-stable... or whatever else you feel like doing.... _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On Tue, May 27, 2014 at 04:35:13AM -0400, Valdis.Kletnieks@vt.edu wrote:
On Tue, 27 May 2014 00:16:52 -0700, Anand Moon said:
Please share your thoughts on this.
I'd do it slightly differently, by keeping a master copy of Linus's tree, and a separate tree for the -stable additions (and other separate trees for linux-next or whatever else you feel like...)
I keep my git trees under /usr/src - feel free to stick them elsewhere if that makes your workflow or disk management easier. Just remember to fix any pathnames.. :)
So are you doing this as root? Because you should never do kernel development as root, just put kernel source trees in your home directory somewhere, like under ~/linux/ thanks, greg k-h
On Tue, 27 May 2014 07:28:34 -0700, Greg KH said:
So are you doing this as root? Because you should never do kernel development as root, just put kernel source trees in your home directory somewhere, like under ~/linux/
No, I'm not doing the builds as root. /usr/src has been fixed to be owned by source:source like God intended. (And yes, that works just fine because any RPMs that yum wants to scribble under that are scribbled as root so the ownership doesn't matter. :)
Have you try the git archive instead of git clone? , if you do not need the history this git option rocks On Tue, May 27, 2014 at 11:16 AM, <Valdis.Kletnieks@vt.edu> wrote:
On Tue, 27 May 2014 07:28:34 -0700, Greg KH said:
So are you doing this as root? Because you should never do kernel development as root, just put kernel source trees in your home directory somewhere, like under ~/linux/
No, I'm not doing the builds as root. /usr/src has been fixed to be owned by source:source like God intended. (And yes, that works just fine because any RPMs that yum wants to scribble under that are scribbled as root so the ownership doesn't matter. :)
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi All, I just want to improve om my approch as my preview approch failed with git merger conflict. So I did some reverse engg. And came up with this approch. # First clone to the current release. git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux cd linux # Added a remote git tree to the .git/config using following command. git remote add stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git # Merge the tags from the stable tree to current tree # this will resolve all the conflict and diff and tags git fetch stable master --tags # After this you will be able to chose to checkout any stable # release using particular tags in different branchs. # checkout the stable release v3.14.4 into stable314y branch. git checkout tags/v3.14.4 -b stable314y # Simpilarly you can checkout v3.10.40 int stable310y branch git checkout tags/v3.10.40 -b stable310y # You local repository will have git branch --list master --this branch point to mainline: 3.15-rc7 * stable310y --this branch point to longterm: 3.10.40 stable314y --this branch point to stable: 3.14.4 tutorial # Note but dont use 'git pull' in these sub branchs # You can switch among these branches. git checkout stable314y -f git describe v3.14.4 git checkout stable310y -f git describe v3.10.40 git checkout master -f git describe v3.15-rc7-40-gcd79bde # Note : You can maintain the kernel in the same linux directory. # Note you can do 'git reset --hard HEAD' only on the *master branch. Please share your thought on this. -Anand Moon On Tuesday, May 27, 2014 10:58 PM, "Valdis.Kletnieks@vt.edu" <Valdis.Kletnieks@vt.edu> wrote: On Tue, 27 May 2014 11:28:19 -0500, Victor Rodriguez said:
Have you try the git archive instead of git clone? , if you do not need the history this git option rocks
That has the same problem as 'clone --depth 1' - you can't bisect using the resulting tree. _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
participants (7)
-
Anand Moon -
Anurudh Tiwari -
bojan prtvar -
Greg KH -
Lucas Tanure -
Valdis.Kletnieks@vt.edu -
Victor Rodriguez