KernelGitGuide

Differences between revisions 3 and 5 (spanning 2 versions)
Revision 3 as of 2005-10-22 19:18:39
Size: 2388
Editor: richmond-209-163-125-229
Comment: Add more information about submitting changesets.
Revision 5 as of 2005-10-23 17:17:21
Size: 3714
Editor: richmond-209-163-125-229
Comment:
Deletions are marked like this. Additions are marked like this.
Line 21: Line 21:
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. 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.
Line 23: Line 23:
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. 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.
Line 32: Line 32:
  My cool change to the scsi subsystem makes scsi transfers increase magically to 1.7Gb/sec.   My cool change to the scsi subsystem makes scsi transfers increase
 
magically to 1.7Gb/sec.
Line 36: Line 37:

= Ubuntu kernel developers (with access to rookery) =
In order to have your git repo pulled automatically, follow these instructions.

First, login to rookery, and perform these commands. In order to have the git commands in your PATH, you can either install your own version locally in your homedirectory, or use some already there (adding ''/home/bcollins/bin'' to your path should work). Then 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 your 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 ro your rookery clone, do:
{{{
  git push ssh://rookery.ubuntu.com/home/<yourname>/public_html/archives/ubuntu-2.6.git
}}}

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.

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.

Getting GIT

To obtain the git binaries, please go to [http://www.kernel.org/pub/software/scm/git-core kernel.org] and download the latest source. Folow the build instructions included, and make sure to install them in a location in your PATH.

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"). 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 1.7Gb/sec.

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

Ubuntu kernel developers (with access to rookery)

In order to have your git repo pulled automatically, follow these instructions.

First, login to rookery, and perform these commands. In order to have the git commands in your PATH, you can either install your own version locally in your homedirectory, or use some already there (adding /home/bcollins/bin to your path should work). Then 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 your 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 ro your rookery clone, do:

  git push ssh://rookery.ubuntu.com/home/<yourname>/public_html/archives/ubuntu-2.6.git

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.

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)