<div dir="ltr"><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Lars Wirzenius</b> <span dir="ltr"><<a href="mailto:liw@liw.fi">liw@liw.fi</a>></span><br>Date: Wed, Apr 30, 2014 at 12:21 PM<br>

Subject: On Koha Debian apt repository layout and package versions<br>To: <a href="mailto:tomascohen@gmail.com">tomascohen@gmail.com</a><br><br><br>Hi,<br>
<br>
I made some Debian packages for Koha in 2010, on contract to Catalyst,<br>
Ltd, and then left the Koha community. The packages are now maintained<br>
by Robin and others. I still lurk on the IRC channel, but I don't<br>
follow the mailing lists. I happened to notice recently that there was<br>
some discussion on maybe renaming the apt package repositories. I<br>
spoke up, and was directed to the mailing list thread starting at [0].<br>
It's a short thread. I offer the following thoughts on the topic, in<br>
the hope they're useful.<br>
<br>
[0] <a href="http://lists.koha-community.org/pipermail/koha-devel/2014-April/040428.html" target="_blank">http://lists.koha-community.org/pipermail/koha-devel/2014-April/040428.html</a><br>
<br>
First, a little background. Debian apt package repositories may<br>
contain many versions of a package, by grouping things into "pockets".<br>
The concept has various names in various corners within Debian, and<br>
the greater Debian derivatives community, but I'll use this name for<br>
simplicity. Each pocket has a name, which is a subdirectory under the<br>
"dists" directory in the apt repository. This provides a single<br>
dimension for supporting multiple versions, and is used for different<br>
Debian releases. Debian has the pockets "stable", "testing",<br>
"unstable", and "experimental", where "stable" is the release users<br>
are expected to use, unless they're interested in participating in<br>
Debian development.<br>
<br>
Those pockets are actually aliases (via symbolic links) for code names<br>
for Debian releases: "squeeze", "wheezy", and "jessie" are names of<br>
three Debian releases. The releases also have version numbers, but<br>
this is not evident in the apt repository.<br>
<br>
In addition to the major pockets (one per release), there are some<br>
additional ones, such as one for "backports" (e.g.,<br>
"wheezy-backports"). This allows the apt repository to allow more<br>
versions of a package, for different users. For example, the<br>
"wheezy" pocket might have version 1.1 of some application, and<br>
"wheezy-backports" might have version 2.0, but built for the "wheezy"<br>
release. This is different from having 2.0 in the "jessie" pocket,<br>
since the binary package is different depending on where it is built.<br>
For example, the build for "wheezy-backports" might depend on<br>
different versions of, say, some Perl modules, than the one in the<br>
"jessie" pocket.<br>
<br>
This structure works reasonably well for Debian.<br>
<br>
For Koha, I suggest that the following questions should be answered<br>
before changes are made to the repository structure.<br>
<br>
* Which versions of Koha does the community want to support? Do you<br>
  have stable versus alpha versus beta versus some other branches? Do<br>
  you have "long-term support" releases?<br>
<br>
* When do you want sysadmins to upgrade their Koha packages? Do you<br>
  want to give them maximum flexibility on this, or do you want to<br>
  force upgrades when you make a Koha release?<br>
<br>
* Do you care about producing builds for a variety of releases of<br>
  Debian or Debian derivatives? Do you care about building for more<br>
  than the current Debian stable release? Maybe the current stable,<br>
  and the previous stable release?<br>
<br>
My knowledge of Koha is years out of date, but from what I remember<br>
and from what I understand from lurking, here are my thoughts (and<br>
please excuse me if you know all of this already, and already do all<br>
of it):<br>
<br>
* I think it makes sense, if you can automate it, to build for the<br>
  current Debian release ("stable"), and the previous Debian release<br>
  ("oldstable"), and also the current Debian development version<br>
  ("unstable").<br>
<br>
  Building for the two releases means that those who install the<br>
  packages get to choose when they upgrade their operating system,<br>
  without Koha forcing an upgrade. If you only build for the current<br>
  Debian stable, you force Koha sysadmins to upgrade when Debian makes<br>
  a release.<br>
<br>
  Building for Debian unstable (or possibly testing) means that you<br>
  catch incoming changes in Debian sooner rather than later. For<br>
  example, when Debian upgrades their Perl, you'll learn soon if it<br>
  affects Koha.<br>
<br>
  These pockets should probably be named after the Debian releases.<br>
  Currently that would mean pockets named "squeeze", "wheezy", and<br>
  "unstable". That is, the pocket should be named according what the<br>
  user is running, not what version of Koha it contains. This keeps<br>
  things simple for the user, and keeps the number of pockets<br>
  manageable.<br>
<br>
* I think it makes sense to build at least two versions of Koha: the<br>
  current Koha release, and the current tip of the master branch.<br>
  These packages should have different names, so they do not conflict<br>
  in the apt repository. The apt repository keeps all package files in<br>
  "the pool", whereas the "dists" directory only contains lists of<br>
  packages and versions.<br>
<br>
  The stable Koha release should probably be called "koha". The<br>
  tip-of-master should be called something else, perhaps<br>
  "koha-dangerous" to scare people away from installing it without<br>
  knowing what they do. The two packages could be co-installable, if<br>
  that make sense for Koha.<br>
<br>
  The dangerous package would allow anyone to easily try out the<br>
  latest Koha, and if the package is built any time master changes,<br>
  it'll be easy to keep up to date. This may be easier than running<br>
  Koha directly from git.<br>
<br>
* If you think it is worth it, it may be worthwhile to have more than<br>
  one Koha release in each pocket. It might be to support the latest<br>
  release plus an LTS release, or to have several stable releases, for<br>
  example to release bug fixes to older releases as well.<br>
<br>
  If you decide to do this, the cleanest way, in my opinion, is to<br>
  have packages for each supported release or branch: "koha-3.10",<br>
  "koha-3.12", and "koha-3.14". These packages would have the latest<br>
  version of that branch. For example, there might be version 3.10.07<br>
  of the koha-3.10 package. This way, someone who wants to stay with<br>
  Koha 3.10, will install the koha-3.10 package. If there's a new bug<br>
  fix release of 3.10, the package is updated, and they upgrade to the<br>
  new package version in the usual way ("apt-get upgrade"). However,<br>
  they're not forced to upgrade to a newer version of Koha and can do<br>
  so when they're ready.<br>
<br>
  In addition, there would be an empty package "koha", which would<br>
  depend on the latest Koha release, for those who do want to have<br>
  that, with a minimum of fuss. This would allow one to install the<br>
  package koha, and then get the latest version, even when latest<br>
  version changes from 3.14 to 3.16.<br>
<br>
So, in summary, I recommend:<br>
<br>
* Have pockets "squeeze", "wheezy", and "unstable".<br>
* Have packages "koha", "koha-x.y" (for a set of versions you want to<br>
  provide), and "koha-dangerous" (for latest git commit).<br>
<br>
I hope this helps, and I apologise for the verbosity of this. I had<br>
some time while waiting for a train, but the train came before I had<br>
time to squeeze out the fluff from this.<br>
<br>
(Please Cc me on any replies you wish me to see, as I unfortunately do<br>
not have the cerebral cycles to follow the Koha mailing list at this<br>
time.)<br>
<br>
PS. Despite only participating in the community for three months, I<br>
remember it very fondly. You do good work, and you make the world a<br>
better place. And you're nice and polite while doing it.<br>
Inconceivable!<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
<a href="http://www.cafepress.com/trunktees" target="_blank">http://www.cafepress.com/trunktees</a> -- geeky funny T-shirts<br>
<a href="http://gtdfh.branchable.com/" target="_blank">http://gtdfh.branchable.com/</a> -- GTD for hackers<br>
</font></span></div><div><br></div>
</div>