Balasankar C

Balasankar C

Geek. Freedom. Privacy.

Home | Blog | Talks | Setup | Feed

Debian GitLab Packaging Diaries #0

Heyo folks,
Since last year, I am part of Debian Ruby team where we are packaging different ruby gems to make them apt-gettable (and save the users from learning rvm). As mentioned in earlier posts, I started with Diaspora packaging and have packaged some gems needed for that (mainly some redis-* gems and fog-* gems). Since, Diaspora packaging is almost over, I am slightly moving towards packaging GitLab for Debian. There was a discussion in debian-devel about using GitLab CE instead of Alioth for Debian projects. So, in short, I think GitLab packaging will surely be useful for Debian (and of course to all FS lovers out there).

So, I am starting a "diary" series for documenting the work I am doing (not only for the purpose of documentation, but also as a personal reference to some tricks used in packaging). There are some things that should be said first
1. The gems already packaged will not be mentioned in this series.
2. No guarantee this series will be regularly updated. As with other stuff, this idea was a spontaneous one and I may or maynot get enthusiastic about it in future.

To start, I am starting with the latest gem I packaged, which is delayed_job. The packaging was pretty straightforward.
1. Downloaded the version tarball from repo (as gem didn't contain any tests) and did dh-make-ruby
2. Running tests used spec helper which had simplecov used in it for code coverage. Patched that out.
3. Another issue with running tests was that one of the files inside lib (lib/delayed/backend/shared_spec.rb) folder required a file in spec (spec/sample_jobs.rb) folder to run. So, it had defined a relative path to the spec folder. Patched that to form a condition - first check whether relative path is accessible. If it is, use that. Else, use the one from /usr/share/ruby-delayed-job.
4.One of the scripts (lib/generators/delayed_job/templates/script) packaged with the gem had no execute permission. Added that in d/rules
5. Copied sample_jobs to package specific directory inside /usr/share
6. Added docs and changelog

I filed an RFS to which boutil responded and pointed out a missing runtime dependency. Note to self,Run a grep 'require' inside code directories to review there are no missing directories. Once I fixed that, he pushed it and it is currently in NEW queue.