Pages

Friday, July 6, 2018

Adopting the sql-ledger Debian package

I had already been involved with the sql-package because LedgerSMB was originally forked from that application and the original packaging efforts were done as a sub-project of the SQL-Ledger project on the old alioth service (which is no longer around). In May of 2017, the then Debian maintainer orphaned the package when he created  the Debian bug #862963.  I changed that one to an ITA (Intend To Adopt) at the end of July of 2017.  Yes, that was almost a year ago, but there were issues that blocked simply taking over the package which I was finally able to overcome.



One issue was the version discrepancy between the upstream release version and the version that was actually in Debian at that time.  The most recent version of it in Debian was 3.0.8 (which was the last version of the package that the old maintainer uploaded, back in June of 2015), while the most recent upstream version at that time was 3.2.5.  A Debian bug had been opened regarding that in May of 2017, #862953,  requesting that the package be updated to the more recent upstream version.  I changed that to a wishlist bug in August of 2017, and in January of 2018 I updated it's title to reflect that a 3.2.6 version of SQL-Ledger had been released. 

There were some issues that came up when I started working on upgrading the packaging to the 3.2.x upstream, but the most important issue for updating the package was the need to resolve the "Can't locate bin/mozilla/login.pl in @INC" bug on Perl 5.26 or above (#869994), which ended up keeping the package from being released with Debian v9 ('Stretch').  There is a write up in the documentation for Perl 5.26 regarding the removal of the current directory (".") from @INC and what can be done for code that does not already take that into account.  Referencing that, I created a patch that added code to all of the scripts in order to safely add '/usr/share/sql-ledger' (which is where the package installs to) as the 'current' directory for the script.  That seems to have worked when testing in a Debian sid LXC container (which is what I generally use these days for testing), at least enough that I was able to create a dataset and user, then log into the application with those. Note that although upstream has not yet made any coding changes to mitigate the issue, he does now have a note in the SQL-Ledger FAQ about it.

Another issue that came up for the upgrading the packaging for 3.2.x versions (3.2.5 then 3.2.6) was the addition of a new file named js/calendar.js with those newer upstream versions. This file is noted as being public-domain, so there i=was that to be accounted for.  More importantly, it caused a Lintian source-is-missing error which turned out to be more about a "line length is 1212 characters (>512)"  issue which was also part of the reported error. This was resolved by creating a patch that broke the file up into shorter lines without otherwise changing the code in the file.

To sum up, the following is the changelog for the 3.2.6-1 package version uploaded to Debian:

  * New upstream. (Closes: #862953)(LP: #1537461)
  * Bump the Debhelper version from '9' to '10'.
  * Use an HTTPS URL in the debian/watch file.
  * Add the following Lintian override files: debian/source/lintian-overrides
    and debian/sql-ledger.lintian-overrides.
  * Removed the debian/patches/latex-cmdline-option patch file as it does not
    apply to the new upstream.
  * Add a debian/patches/FixINCissue.patch file. (Closes: #869994)
  * Add a debian/patches/MitigateLintianError.patch file.
  * Redo 'templates' install info in the debian/sql-ledger.install file.
  * Rewrite debian/copyright, following copyright-format v1.0 guidelines.
  * Changes in debian/control:
    + Declare compliance with Debian Policy 4.1.4.
    + Add 'Rules-Requires-Root: binary-targets' to the source stanza.
    + Set 'Robert James Clay <jame@rocasa.us>' as the new Maintainer.
      (Closes: #862963)
    + Update Vcs-Git & Vcs-Browser entries to the new URLs at salsa.debian.org.


No comments:

Post a Comment