The Debian Hamradio Maintainers team has a project on Alioth. You are encouraged to use this for managing git repositories for the source of your team packages. If you do not currently have an account on Alioth or have not requested to be added to the project, you will need to do that before you can use this facility. To request to be added to the project, send an email to the mailing list.
Contents
Anonymous access to git repositories
Anonymous access to git repositories is possible at the following URLs:
http://anonscm.debian.org/git/pkg-hamradio/<pkg-name>.git (Preferred for the Vcs-Git field) git://anonscm.debian.org/pkg-hamradio/<pkg-name>.git
Anonymous access to a web VCS browser is also available at the following URL:
http://anonscm.debian.org/cgit/pkg-hamradio/<pkg-name>.git
Importing an existing source package
You will need git-buildpackage installed on your local machine before following these steps.
If your package is not currently tracked with git, you can import the sources from a source package.
Begin by logging into Alioth and creating the new repository:
cd /git/pkg-hamradio/ ./setup-repository <pkg-name> "Packaging for <pkg-name> in Debian"
If you have the source package locally, you can skip this next step. If not, you will need to download the source package from the Debian archives:
cd /tmp apt-get source <pkg-name>
Then you need to create a local git repository on your machine and import the source package:
mkdir <pkg-name> cd <pkg-name> git init git import-dsc /tmp/<pkg-name>*.dsc
Finally, in your local git repository, add the remote and push all branches and tags:
git remote add origin git+ssh://alioth.debian.org/git/pkg-hamradio/<pkg-name>.git git push origin --all git push origin --tags
Please remember to update your Vcs-Git and Vcs-Browser fields in debian/control to match the URLs shown above for anonymous access.
Importing an existing git repository
You will need git-buildpackage installed on your local machine before following these steps.
If you've previously had a git repository elsewhere for your package, you can import it quite easily.
Begin by logging into Alioth and creating the new repository:
cd /git/pkg-hamradio/ ./setup-repository <pkg-name> "Packaging for <pkg-name> in Debian"
Then in your local git repository, add the remote and push all branches and tags:
git remote remove origin git remote add origin git+ssh://alioth.debian.org/git/pkg-hamradio/<pkg-name>.git git push origin --all git push origin --tags
This repository can now be cloned using git-buildpackage or you can continue to work in your local repository pushing changes to the new origin.
Please remember to update your Vcs-Git and Vcs-Browser fields in debian/control to match the URLs shown above for anonymous access.
Even if your existing repository is on Alioth, do NOT just copy the repository into /git/pkg-hamradio/. The setup-repository script adds commit hooks to the repository to aid in tracking commits.
Creating a new git repository for a new package
You will need git-buildpackage installed on your local machine before following these steps.
Begin by logging into Alioth and creating the new repository:
cd /git/pkg-hamradio/ ./setup-repository <pkg-name> "Packaging for <pkg-name> in Debian"
On your machine, download the upstream source tarball and keep it somewhere safe. You will need a tarball to import, so if upstream distributes source as a zip or other type of archive, you will need to repack it as a tarball.
Create a local git repository on your machine and import the tarball like so:
mkdir <pkg-name> cd <pkg-name> git init git import-orig --pristine-tar /path/to/upstream/source.tar.gz
You'll now find that the upstream source has been imported into your git repository.
You may optionally use the Debian Hamradio Maintainers template debian/ directory:
svn export svn://anonscm.debian.org/svn/pkg-hamradio/trunk/package_template debian
When you are ready to push your changes to Alioth, add the remote and push all branches and tags:
git remote add origin git+ssh://alioth.debian.org/git/pkg-hamradio/<pkg-name>.git git push --all git push --tags
Using git-buildpackage and git-pbuilder for building packages
git-pbuilder builds your package in a chroot which ensures that your package has the correct package dependencies and does not depend on any files outside of the repository. It is included in the git-buildpackage package.
In order to build your package from the git repository, run:
cd /path/to/repository git-buildpackage --builder=git-pbuilder
If your package is ready for upload, you can sign your package using debsign and then upload:
cd .. debsign <pkg>*.changes dput <target> <pkg>*.changes
If you're not a Debian Maintainer or Debian Developer, you will not be able to upload directly into the Debian archives. See the "Publishing your packages" section of the mentors.debian.org introduction to learn how to upload your package there and then send a mail to the mailing list requesting sponsorship for your package.
Tracking commit notifications
Commit notifications are displayed in the #debian-hams IRC channel on irc.debian.org and can also be found on the pkg-hamradio-commits@lists.alioth.debian.org mailing list (archives).
More information
For more information on using Git for packaging, see GitPackaging.