Technocrazian Hack the Code

Debian GitLab Packaging Diaries #1 - rotp

Heya folks,
Last few days was a little tight as I am having my internal exams. However, I packaged the gem rotp with some great help from Cedric. This packaging made me do a variety of tasks. I'll list out them below

  1. Since the source code contained jquery embedded, lintian was unhappy in the first try and I had to repackage the gem with a -dfsg suffix. This involved adding a gbp.conf file for future releases, adding dversionmangles in watch file etc. Also, I had to add a links file entry to actually copy packaged jquery to the necessary location.
  2. Writing manpage - Since the package contained a binary script to be used as a command, I had to write a manpage in that. I actually missed some conventions like "name of the package should be bold in synopsis" and "options should be in italics" etc. Cedric pointed out them (In fact, he pointed out all the issues)
  3. It was a new information to me that I needed to add the repack info to the copyright file. So, I added it under the Source field
  4. Next came yardocs. It is a standard way of generating Ruby documentation. I had simple copied the upstream docs folder and had never heard about yard. This time, I had to run yardocs -o debian/yardocs to generate documentation from upstream one.
  5. The documentation, had some stuff that was loaded from remote sites. Like the build status from travis, gem version from rubytems, license info etc. And a qr code from github. I initally used sed to remove these stuff (It was one hell of a regex). But then, Cedric pointed out that I could just remove from the source docs before running yardocs. So, I quilted them out.
  6. I usually had the habit of checking if a file exists before removing them in override_dh_clean. But, since rm -rf returned 0 if the file didn't exist, there was no need for that.
  7. In the middle of my packaging, a new version was released and I had to import that.

Cedric was extremely patient in explaining and he did it in detail. Thanks to him.