Translation(s): none


After you have successfully built the package with dpkg-buildpackage and made sure it is lintian clean, checked with pbuilder if all depencies are added to debian/control and send an ITP, it is time to upload it to the gitorious account debian-diaspora. For that you will need to create a new dsc file in a temporary directory, so that all of your changes are listed in the git history. The gitorious repo is used instead ofpkg-ruby-extras at alioth.

The same problem is described at the ruby-team packaging page:

It might be clearer there.


Make an account at gitorious. Create an ssh-key installing ssh-keys and add it to your gitorious account via web-interface (manage ssh-keys).

In short you run:


to create an ssh-key, and upload the public key, which ends with .pub. If you have picked a custom name you can add the following to ~/.ssh/config (if it does not exist yet just create the file):

User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/custom_name_gitorious_rsa

Simply replace the path to your key in the last line.


First install git-buildpackage

apt-get install git-buildpackage

Above gem2deb


is used as the build directory for the package devise. After running dpkg-buildpackage the directory should look like this: ls ~/Build/diaspora

$ ls 
devise-2.1.2.gem     ruby-devise-2.1.2            ruby-devise_2.1.2-1.debian.tar.gz  ruby-devise_2.1.2-1_i386.changes
devise-2.1.2.tar.gz  ruby-devise_2.1.2-1_all.deb  ruby-devise_2.1.2-1.dsc

Create a directory to save all of your earlier work:

mkdir old_build_devise
mv * old_build_devise

Create a directory for the git repo you will use for gitorious. Use the correct Debian name:

mkdir ~/Buid/diaspora/ruby-devise

Go to a temporary folder and get a new dsc file. This will be imported from the new ruby-devise directory. By that all changes will be added to the history of git.

cd ~/Tmp
gem2deb devise

cd ~/Build/diaspora/ruby-devise
git-import-dsc --pristine-tar ~/Tmp/ruby-devise_2.1.2-1.dsc

If you forget to add --pristine-tar you will have to start from scratch.

Go to your old build directory:

cd ~/Build/diaspora/old_build_devise/ruby-devise-2.1.2/
fakeroot  debian/rules clean

Go to the directory created by git-import-dsc and copy all files you changed in the original build directory to the debian directory:

cd ~/Build/diaspora/ruby-devise/ruby-devise/debian
cp ~/Build/diaspora/old_build_devise/ruby-devise-2.1.2/debian/{changelog,control,copyright} . 

Add the changes to git and commit them:

git add changelog control copyright
git commit -m "adding changelog control copyright

This was very confusing. Keep in mind that you have three folders:

From the new folder you run git-import-dsc --pristine-tar to import an unchanged dsc file from the temporary folder. You copy changelog, control and copyright from the old build-folder. Now all of your changes are stored in git history.

git remote add

Create a repository add the team site via webinterface. Add it as remote to your git repo:

git remote add origin

Remove the debian tag:

git tag

to list it and

git tag -d debian/2.1.2-1 

to remove it (2.1.2-1 in this case. Use what git tag shows you)

push the changes to the git-repo at gitorius/debian-diaspora

git push --all
git push --tags


Note: To build your package from the git repo, use git-buildpackage tool.