KernelGitGuide

Differences between revisions 13 and 14
Revision 13 as of 2006-12-13 23:48:27
Size: 4440
Editor: cpc3-cwma2-0-0-cust739
Comment: Mention -updates git trees and web accessible version of unpacked git trees
Revision 14 as of 2007-02-07 22:01:26
Size: 3474
Editor: collinsap1
Comment:
Deletions are marked like this. Additions are marked like this.
Line 57: Line 57:
In order to have your git repo pulled automatically, follow these instructions. The kernel team has a private ''git'' repo located on ''rookery'' in /srv/kernel-team. Take care when pushing to this repository.
Line 59: Line 59:
First, login to rookery, and perform these commands:
{{{
  $ mkdir public_html/archives
  $ cd public_html/archives
  $ git clone -s -n -l /home/bcollins/public_html/archives/ubuntu-2.6.git ubuntu-2.6
  $ mv ubuntu-2.6/.git ubuntu-2.6.git
  $ rmdir ubuntu-2.6
}}}

This will create ~/public_html/archives/ubuntu-2.6.git. Note, this is not used for you to pull from (since you should always pull from rsync.kernel.org). However, you can let others pull from this repo if you have things you want them to test. The ''-s'' flag allows your repo to share objects with the main one. This helps reduce space used on rookery.

To push your repo to your rookery clone, do:
{{{
  git push ssh://rookery.ubuntu.com/home/<yourname>/public_html/archives/ubuntu-2.6.git
}}}

You must email the [mailto:kernel-team@lists.ubuntu.com kernel-team] mailing list with your username, in order to be added to the list of repo's to pull into the main repo.

Any work you do in the master (HEAD) will '''automatically''' be merged into the main repo. Any work that you perform that you wish to keep locally, should be done on a branch.
You can, if you want, create a clone for yourself in this directory, and just have your changes pulled when ready.

Summary

Git is the new SCM used by the Linux kernel developers. Ubuntu has adopted this tool for our own Linux kernel source code so that we can interact better with the community and the other kernel developers.

Current GIT Trees

  • devel: rsync://rsync.kernel.org/pub/scm/linux/kernel/git/bcollins/ubuntu-2.6.git
  • edgy: rsync://rsync.kernel.org/pub/scm/linux/kernel/git/bcollins/ubuntu-edgy.git
  • dapper: rsync://rsync.kernel.org/pub/scm/linux/kernel/git/bcollins/ubuntu-dapper.git

(actually there are a few more and of special note are the -updates git trees (nb: there can be more than one -updates tree per stable release). To find out what else is available try browsing http://kernel.org/git/ and searching for ubuntu)

Getting GIT

To obtain the git binaries, simply install the git-core package from dapper, e.g.:

sudo apt-get install git-core

Note that the git package is an entirely different tool which will not do what you want.

Getting the Ubuntu Linux kernel repo

The Ubuntu Linux kernel git repository is located at rsync://rsync.kernel.org/pub/scm/linux/kernel/git/bcollins/ubuntu-2.6.git. To download a local copy of the repo, use this command:

  git clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/bcollins/ubuntu-2.6.git ubuntu-2.6

This will take some time depending on your connection. There's around 110Megs of data to download currently (and this always increases).

Once this is complete, you can keep your tree up-to-date by running this command:

  git pull

Pushing changes to the main repo

Since the main repo is not publicly writable, the primary means for sending patches to the kernel team is using git-format-patch. The output from this command can then be sent to the [mailto:kernel-team@lists.ubuntu.com kernel-team] mailing list.

Alternatively, if you have a publicly available git repository for which changes can be pulled from, you can use git-request-pull to generate an email message to send to the [mailto:kernel-team@lists.ubuntu.com kernel-team] mailing list.

Commit templates

In debian/commit-templates/ there are several templates that must be used when commiting changes that you expect to be integrated with the Ubuntu kernel repo. The commit templates contain comments for how to fill out the required information. Also note that all commits must have a Signed-off-by line (the "-s" option to git-commit). A typical git-commit command will look like:

  git-commit -s -F debian/commit-templates/patch -e

Note that the -e (edit) option must follow the -F option, else git will not let you edit the commit-template before committing.

An example commit log will look like such:

  [UBUNTU:scsi] My cool change to the scsi subsystem

  UpstreamStatus: Merged with 2.6.15-rc3

  My cool change to the scsi subsystem makes scsi transfers increase
  magically to 124GiB/sec.

  Signed-off-by: Joe Cool Hacker <jch@reet.com>

Ubuntu kernel developers (with access to rookery)

The kernel team has a private git repo located on rookery in /srv/kernel-team. Take care when pushing to this repository.

You can, if you want, create a clone for yourself in this directory, and just have your changes pulled when ready.

More information

Please read the documentation included with the git source for more details on git commands.


CategoryKernel

KernelTeam/KernelGitGuide (last edited 2010-06-28 23:55:41 by c-76-105-148-120)