4050
Comment: Adding some more info
|
4466
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
The repositories for the packaging in git is stored in a different manner than they are under svn. Each package has it's own git repository (and thus it's own directory) under the /git/pkg-games directory on the alioth servers. | The repositories for the packaging in git is stored in a different manner than they are under svn. Each package has its own git repository (and thus its own directory) under the /git/pkg-games directory on the alioth servers. |
Line 34: | Line 34: |
$ git-import-dsc <package>.dsc | $ git-import-dsc --pristine-tar <package>.dsc |
Line 36: | Line 36: |
(The --pristine-tar option is optional; if you have pristine-tar installed this will store enough information in the git repository to reproduce the pristine upstream tarball later.) |
|
Line 53: | Line 55: |
$ git-push alioth pristine-tar | |
Line 55: | Line 58: |
(Again the pristine-tar step is optional.) |
|
Line 100: | Line 105: |
$ git-buildpackage --git-tag | $ git-buildpackage --git-tag --pristine-tar |
Line 102: | Line 107: |
(As usual, the --pristine-tar bit is optional, but it will allow git-buildpackage to extract the pristine .orig.tar.gz.) |
Git
The repositories for the packaging in git is stored in a different manner than they are under svn. Each package has its own git repository (and thus its own directory) under the /git/pkg-games directory on the alioth servers.
This guide assumes that you are uploading the packaging files for a package for the first time.
A separate section will describe how to import the packaging that was stored in the svn repository in the future.
Creating a git repository
First, create a repository in the /git/pkg-games directory on the alioth servers.
$ mkdir <package>.git $ cd <package>.git $ git --bare init --shared
Now edit the 'description' file in the directory you just created to one that is appropriate for the package.
$ echo "Packaging for <package>" >description
Let's also enable the use of 'hooks/post-update'.
$ chmod a+x hooks/post-update
Now we're done creating a repository for the package. You could also use the 'setup-repository' script that's in the pkg-games directory. That script is really a symlink to the script that's used in the collab-maint directory.
./setup-repository <package> '<package description>'
Uploading a package to the repository
Now let's import the package into a git repository. This is easy using 'git-import-dsc' from the 'git-buildpackage' package.
$ git-import-dsc --pristine-tar <package>.dsc
(The --pristine-tar option is optional; if you have pristine-tar installed this will store enough information in the git repository to reproduce the pristine upstream tarball later.)
A directory with the name of the source package should have been made. Change into that directory.
$ cd <package>
Ensure the tags that are created reflect if a package has been released. git-buildpackage creates tags for the debian branch and the upstream branch. If the tag created for the debian branch reflects an unreleased version, you'll have to delete that "debian" tag.
$ git-tag -l $ git-tag -d 'debian/<unreleased version>'
Finally, push the repository up to the repository on alioth.
$ git-remote add alioth git+ssh://<username>@git.debian.org/git/pkg-games/<package>.git $ git-push alioth master $ git-push alioth upstream $ git-push alioth pristine-tar $ git-push alioth --tags
(Again the pristine-tar step is optional.)
Accessing a repository
To get a repository, do the following.
$ git-clone git+ssh://<username>@git.debian.org/git/pkg-games/<package>.git
You can also enjoy read-only access by using the following.
$ git-clone git://git.debian.org/git/pkg-games/<package>.git $ git-clone http://git.debian.org/git/pkg-games/<package>.git
To view a summary of the repository on your favorite web browser, go to the following address.
http://git.debian.org/?p=pkg-games/<package>.git
Committing changes
To commit a change, first commit into your local repository.
$ git-commit -m "<some comment>"
You could also do a commit of all files that were changed using the '-a' option.
$ git-commit -a -m "<some comment>"
Push your changes.
$ git-push #If you cloned the repository $ git-push alioth #If you created the repository using the above example
Updating
To keep updated simply do the following
$ git-pull #If you cloned the repository $ git-pull alioth #If you created the repository using the above exmple
Tagging
To tag a release, you could build it using 'git-buildpackage' with the '--git-tag' option.
$ git-buildpackage --git-tag --pristine-tar
(As usual, the --pristine-tar bit is optional, but it will allow git-buildpackage to extract the pristine .orig.tar.gz.)
You could also manually tag the package. Ensure that you are in the correct branch (should be 'master').
$ git-checkout master $ git-tag debian/<revision> -m "Debian release <revision>" #Please use this format
To tag an earlier revision, you'll need to find out it's commit object, then tag that object.
$ git-rev-list --pretty --since="1 month" --all #'1 month' is just an example of course $ git-tag debian/<revision> <commit object> -m "Debian release <revision>"
Finally, push the tags
$ git-push --tags
See Also
- [:Alioth/Git]