Upstream packaging and Debian: Drupal third-party libraries API
Many large, successful, de-centralised software projects have a suite of their own packages maintained with their own platform-independent tools. Typical examples are Drupal's collection of module and theme packages, the R Project packages (CRAN) and the Central Repository for Maven packages (Java).
In the case of Drupal:
- Debian only really packages the core Drupal system and not the modules and themes
- Gunnar's dh-make-drupal can easily Debianize many of the modules from Drupal's collection
- Drupal has strict rules about the contents of packages distributed from their official collection. In particular, they must all be 100% compatible with the GPL v2 or later.
- Another rule that is particularly exciting for Debian is that Drupal's hosted modules may not duplicate code (particularly JavaScript) from other projects/repositories: everyone installing a module must download and unpack the required JavaScript, often adding many steps to the module installation.
This is a particular opportunity for Debian to demonstrate it's strengths.
Debian's pkg-javascript team has been busy packaging a huge collection of popular JavaScript libraries in a 100% free manner that guarantees adherence to the Debian Free Software Guidelines. This means that they have already done a lot of the groundwork to weed out minified (obfuscated) code that isn't accompanied by readable source code and ensure that there is a mechanism for conveniently and promptly distributing security fixes.
The Drupal Libraries API module has now been packaged for Debian and is available in the unstable archive. The goal of this package is to facilitate the automated use of Debian's high-quality JavaScript packages to fulfill the dependency requirements of Drupal modules.
Exact details of how these components fit together is currently explained in the README.Debian file distributed in the package. People packaging JavaScript for use by Drupal modules need to consider making a small `glue' package to help Drupal's Libraries API discover the JavaScript. In many cases the glue package needs to do little more than creating a symlink from /usr/share/javascript to /usr/share/drupal7/libraries - this process can also potentially be automated by a future version of dh-make-drupal