|
|
Emdebian Quality Assurance
Cross building introduces a few specialised problems to do with
keeping the prebuilt packages installable and tracking issues in the
Debian to Emdebian progression of packages.
Causes of delays in keeping up with Debian
Delays in cross-building new versions are the most common
problem but can be due to a common set of reasons:
- New version in Debian : The initial state - delays at this stage
are to be handled via
em_autobuild, leading possibly to
other failure flags.
- Emdebian patches fail to apply : If the Emdebian patches affect
sections that are modified by the new Debian version, the patch will fail.
Sometimes, this is due to a crossbuilt bug being closed in the new
version. A progression of crossbuilt bug reports will gradually remove
the need for these patches.
- New version fails to cross build : A more serious error. Something in
the new version has introduced a crossbuilding failure, despite the
previous patches applying correctly or adds a build tool without using
CC_FOR_BUILD which then fails during the cross build.
- Lintian errors in the new version : Changes within the package could
add new documentation or new manpages or change the way that docs are installed.
See also
Emdebian Policy and lintian.
Dependency issues : Any of these problems can cause knock-on problems
in other packages that depend on the affected package. emdebcheck
uses edos-debcheck
to try to ensure that uploads to the Emdebian repository have the relevant
dependencies already available. There are still some issues with this step,
so a --skip option is implemented - principally for getting new
repositories off the ground or other problematic situations. The principle
is to add or replace the existing package description in the
Packages.gz file with the data from the new or updated package(s), then
checking the new data as if it was in the repository.
The problems of this approach in cross-building are mainly down to
testing all binary packages from a single source package, despite most
users never needing to install all packages, especially in an embedded
environment where development packages are unlikely to be necessary. This
can mean that automated testing of .changes files can lead emrecent to
create an error log when actually uploading the package and testing the
actual repository would still work.
These dependency issues can be quite complex and emrecent
keeps dedicated error log files rather than abbreviating the data as an
embug flag. emsource --status parses the
error log as well as the embug data. The emrecent error
log files need to be removed before emrecent can try to upload
the package again.
These issues are tracked via the embug utility. Currently,
the data from embug is local to the machine running
emdebian-tools but once the packages can be automatically
built by Emdebian, these logs can be parsed for HTML output. The logs
are arranged in a fixed hierarchy:
- Fails to crossbuild
embug --failed - a virtual
severity.
- Lintian errors
embug --lintian.
- Patches failed
embug -o.
- Newer in Debian
embug -d.
Failed is only set if the patches are up to date,
otherwise most packages listed as failed would just be failed
patches. Failed also replaces lintian if the patches
are up to date.
Setting flags automatically
- emdebuild will set failed if
dpkg-buildpackage
fails or lintian if lintian -ioC em produces errors.
- emsource will set patches out of date.
- emtargetcmp will set newer in Debian as well as
clear old flags from packages that are the same version in Debian
as in Emdebian (i.e. after an upload of the new version).
- emrecent will set lintian in case lintian support
in emdebian-tools has been updated between the build and the upload (e.g.
whilst waiting for a dependency to be cross built).
Tools support for Quality Assurance in Emdebian
- embug : maintains a list of open cross-building bug reports
in Debian via SOAP, keeps records of packages with problems but no bug
yet filed, patches that are out of date and packages that are newer in
Debian than in Emdebian.
emdebcheck : similar to the debcheck routines in Debian,
except this is run before the upload is made.
Whilst native packages can (more or less) rely on pbuilder to ensure that
dependencies are actually available prior to the upload, cross builds use build
dependencies from Debian but get uploaded to a separate repository so there is no
guarantee that the dependencies generated using -cross packages during the build are
actually present in the Emdebian repository, even when the package is cross built
within a chroot.
emdebcheck attempts to cover this gap by parsing the dependency
information from the built package, inserting this data into a copy of the apt cache
for the Emdebian target repository (replacing any data from the current package) and
runs the modified cache data against 'edos-debcheck'.
- emrecent : to assist when preparing cross-built packages for upload,
emrecent presents a list of recently cross built Emdebian packages (within
a configurable timeframe), displays the contents of the packages using
debc from the devscripts
package and runs emdebcheck on the .changes file. Each stage is
presented to the user via a whiptail
or zenity interface and packages are
flagged if errors are detected. If the package can be uploaded without breaking existing
dependencies within the Emdebian package sets, the updated package is uploaded
using dput. Also supports uploading
TDeb changes.
- emtargetcmp : Status tracker for Emdebian that checks each source package
in Emdebian and compares the version against the current Debian Sid source package.
Packages that are older in Emdebian than in Debian are logged using embug.
- embuildstats : Simple summary script that checks your Emdebian working
directory and presents a table showing which packages have been built, the number
of patches required, when the package was built with emdebuild or
empdebuild and when it was uploaded.
- lintian support : as a prelude to starting to create
Emdebian Policy,
emdebian-tools provides a basic set of lintian checks that can be added
to the normal lintian run or run explicitly.
|