Note: This web site is only kept up to date for OSG Software 1.2 (VDT 2.0.0). If you are looking for information for the most recent release, the RPM-based OSG Software 3.0, please see the OSG documentation web site
This document contains the basic process for updating a LIGO Debian package, from start all the way through to putting the revised package into the development repository. Along the way, it documents many of the standand Debian and locally developed tools for doing Debian packaging work.
Except for locally developed scripts, the ultimate references for Debian packaging are the Debian New Maintainers’ Guide and the Debian Policy Manual.
Most of the locally developed helper scripts below are stored in Subversion at
SVNROOT/ligo/trunk/common/debian. Check out this directory and put it in your PATH. They
are not well documented, but all are short and simple enough to figure out if need be. In most cases, running the
script with no arguments will produce enough help information to run the script.
In the instructions below, PackageID is one of the following:
package_version — for a native Debian packagepackage_version-revision — for a package of upstream sourcesync-files /path/to/sync.data
This workflow assumes that you have a Subversion checkout of the LIGO trunk, and then separate working directories
for each (source) package. The sync-files script synchronizes files between a Subversion checkout
and a working directory; the given sync.data path, expected to be contained within the Subversion
checkout for the package, in the debian subdirectory, contains all the data needed to synchronize the
two areas. This step, here at the start of the process, is just to make sure all prior changes were synchronized
before making new changes to the working directory.
svn status --show-updates /path/to/subversion/checkout
Again, just to make sure that all prior changes were committed.
Debian package
package-versionsync.data to reference the new working directorysync-files on the package to populate the new working directoryUpstream package
package-version
package-version.orig.tar.gzsync.data to reference the new working directorysync-files on the package to populate the new working directorydch -i message
This command, a standard Debian tool, creates a new entry in the debian/changelog file. This is a
critical step, because the changelog is the only source of the package revision number. Use
the dch command, because it gets all the formatting right. But, check over the fields of the new
changelog entry to make sure they match the older changelog entries and your personal info.
debian directory:
changelogcontrolcopyrightrulesverify-build-dependencies /path/to/working/directory
If this script detects missing build dependencies, it will print a message describing how to get them. You may want to note the installed packages now, so that you can remove them later and leave the build machine in a clean state.
debian/rules build fakeroot debian/rules binary
If any step fails or produces bad output, go back and fix things until it is good.
Once the build and packaging is working correctly, clean up:
fakeroot debian/rules clean
check-build-and-clean /path/to/working/directory ... build binary ...
This locally made script exercises the build and clean targets of your rules file. For each target,
it snapshots the working directory, executes the target, cleans the target (with
clean-target), then diffs the working directory against the original snapshot. Fix any
problems that are detected.
sync-files /path/to/sync.data
This step is critical, because the next step will remove the debian directory and reconstruct it from
the Subversion directory. Thus, unsynchronized changes will be lost unless you do this step now!
prepare-for-build
This is a script that I have written for most of my working directories on vdt-debian-test. It would
be great to write a general-purpose version and put it in Subversion, but I have not done so yet. Essentially, it
makes sure the working directory is ready for a clean build and packaging by removing and repopulating it from
authoritative sources.
sudo /home/cat/pbuilder/update-amd64 sudo /home/cat/pbuilder/update-i386
The Debian pbuilder tool does clean builds in a chroot environment. First, you must
make sure that the pre-made pbuilder “images” are up-to-date. These commands take care
of all the details.
sudo final-build amd64 PackageID.dsc sudo final-build i386 PackageID.dsc
This simple wrapper script just makes sure that the right pbuilder commands are used to build the
package. Among other things, it tells pbuilder to use a RAM disk for its working files, to speed the
build process considerably.
klog.afs
upload-build PackageID
index-ligo-apt-repo development
You must have the passphrase for the Debian signing key in order to complete this step.