Hook scripts for pdebuild
Quality assurance hook scripts for pdebuild users
Do you build Debian packages inside pbuilder-managed chroot environments?
Do you use the pbuilder package to build Debian packages inside clean chroot environments? If you do, you will probably want to perform some quality assurance tests, after building a package.
The /usr/share/doc/pbuilder/examples directory includes a number of example hook scripts that may be used to perform various actions at different stages of the build process. However, most of them seem to be designed to work well when invoked by the pbuilder build command.
When building packages with the pdebuild command, different hook scripts are needed: the following scripts attempt to fill this gap. They are designed for a sid chroot environment, and are distributed under the terms of the Expat license.
Pdeb_common
Pdeb_common version 0.1 is a small library of common functions and variables for the hook scripts. It is used by the other hook script that cannot work correctly without it.
Prepare_pdeb
Prepare_pdeb version 0.8 is a hook script that optionally prepares the chroot environment before other hook scripts are executed. It reads an appropriate configuration file, where a list of package/distribution pairs (or groups of pairs) may be placed: packages from the specified distributions (stable, testing, and so forth) are installed (upgrades or downgrades are performed, if needed). This may be useful, e.g., to work around unfixed bugs in package versions that would otherwise be present in the chroot environment when other hook scripts are run.
CleanUp_pdeb
CleanUp_pdeb version 0.4 is a hook script that cleans up the pdebuild environment (e.g. by purging the build-dependencies of the built packages). It is intended to be run after a successful build and before running other hook scripts.
Lintian_pdeb
Lintian_pdeb version 0.8 is a hook script that runs lintian on the built packages.
TestInst_pdeb
TestInst_pdeb version 0.15 is a hook script that tests the installation, removal, purging, upgrade, downgrade, and re-installation of each built binary package. It also compares each binary package with its official version (that is to say, the one currently present in the Debian distribution used by the chroot environment), if any. In order to do this, it sets up a temporary local APT repository to use along with the official Debian mirror.
Shell_pdeb
Shell_pdeb version 0.7 is a hook script that invokes a shell in order to let the user perform additional tests by hand.
This work can be redistributed and/or modified under the terms of the Expat license. It comes with absolutely no warranty. See the permission notice for details.