Translation(s): none


Intro

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 debian gitlab service (Salsa.debian.org).

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.

A repo in your namespace is used instead ofruby-team at salsa.

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

It might be clearer there.

Salsa

Make an account at salsa. Create an ssh-key installing ssh-keys and add it to your gitlab account via web-interface.

In short you run:

ssh-keygen

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):

host salsa.debian.org
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/custom_name_gitlab_rsa

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

gbp import-dsc

First install git-buildpackage

apt-get install git-buildpackage

Above gem2deb

~/Build/diaspora

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 gitlab. 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
gbp import-dsc --author-is-committer --pristine-tar ~/Tmp/ruby-devise_2.1.2-1.dsc

This will create a folder named ruby-devise, which actually is a git repo. 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

~> 3.1.0 Go to the directory created by gbp 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/* . 

Add the changes to git and commit them:

git add changelog control copyright
git commit -m "adding changelog control copyright
similarly for all other changed files

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

From the new folder you run gbp import-dsc --author-is-committer --pristine-tar to import an unchanged dsc file from the temporary folder. You copy the changed files in debian folder (like changelog, control and copyright) from the old build-folder. Then commit them. 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 git@salsa.debian.org:<your salsa username>/ruby-devise.git

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 -u --all --follow-tags

gbp buildpackage

Note: To build your package from the git repo, use gbp buildpackage command.