[Pkg-crosswire-devel] Automated Sword module packaging: it works

Jonathan Morgan jonmmorgan at gmail.com
Mon Jan 26 12:36:19 GMT 2009


On Mon, Jan 26, 2009 at 10:28 PM, Jonathan Marsden <jmarsden at fastmail.fm> wrote:
> Today I have been able to script the process of converting Sword modules
> into Debian packages.  While the script is, shall we say, not
> necessarily bulletproof (!), it *is* packaging a pile of Sword modules
> for me as I type this.
>
> The resulting modules are likely to benefit from manual checking and
> probably some manual edits to control files etc. before release, of
> course, and Matthew has privately suggested some interesting ideas about
> automatically generating lucene indexes to go with them... but I think
> the basic principle of automated module to package conversion can now be
> considered to be proven.
>
> Below are module2deb which does the conversion/packaging, and
> package-modules.sh, a script that grabs the Crosswire archive of Sword
> modules and then packages all of them which are labelled as being
> "Public Domain".  I hope word-wrap won't destroy them beyond all
> recognition.
>
> module2deb expects that whoever runs it has a normal packaging
> environment set up, complete with $DEBFULLNAME and $DEBEMAIL, and by
> default it does do package signing, so for bulk use you have to set up
> gpg-agent or seahorse or whatever so that you don't have to type your
> GPG passphrase twice for each package build!  It generates module names
> including a component based on ModDrv, so the names try to distinguish
> between text and commentary and so forth.  How useful that feature is,
> is definitely up for discussion...!
>
> [I see that module2deb seems to have at least one bug; it is not
> handling lines in the module *.conf files that contain parentheses
> sanely at the moment... probably a quoting issue somewhere.]
>
> The build has now finished, and I have 130 sword-*.deb (and *.dsc, etc)
> files!  I'm not about to upload them to my PPA, though.
>
> The lintian warnings are almost all about the changelogs not closing an
> ITP bug (impossible to 100% automate that!), and then a few (which I'll
> try to check up on) about the description and synopsis fields in the
> control file (which module2deb tries to generate from the Description
> and About fields in the module .conf file).
>
> NOTE: Please do *not* run package-modules.sh if you do not intend to
> work on this stuff, as it will download around 270MB of modules from
> Crosswire the first time you run it.  The Crosswire archive does not
> seem to have an obvious way to download just the metadata (just the
> *.conf files), so one can then download only the Public Domain
> modules... so the script downloads all of them, but then only builds the
> PD ones.  If there is a better way to do this, please let me know.

The install manager works from FTP repositories, and will download
conf files only to show you what is available (in general, anyway).
There is a command line install manager tool, installmgr, and it looks
like installmgr -rl (list remote sources) will give you what you want.
 I'm afraid I can't get mine to spit out a usage message, so I'm
working from the source code here, but it looks like that is what it
does, and it would I assume only get the .conf files (in fact, some
repos are set up to have all the conf files in one tarball, meaning
only one download).

Jon




More information about the Pkg-crosswire-devel mailing list