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 gitlab 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 gitlab 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.

gitlab

Make an account at gitlab. Create an ssh-key installing ssh-keys and add it to your gitlab account via web-interface. Ask someone from debian-ruby (Balasankar (balasankarc AT autistici DOT org) or Praveen (praveen AT debian DOT org)) to add you to the temporary group in ?GitLab so that you can host the package there until you get access to official repo.

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 gitlab.com
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

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@gitlab.com:debian-ruby/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 --all
git push --tags

gbp buildpackage

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