Differences between revisions 12 and 13
Revision 12 as of 2007-04-20 10:18:55
Size: 5388
Editor: NeilWilliams
Comment: Final tweaks of emlocale / dpkg loop rule.
Revision 13 as of 2007-04-20 11:00:00
Size: 5504
Editor: NeilWilliams
Comment:
Deletions are marked like this. Additions are marked like this.
Line 62: Line 62:
 1. '''perl-base''' Tries to run cross-built miniperlmain and possibly other generated binaries during {{{make}}}.

Emdebian Developer Guide

This is intended to provide tips and status information on the emdebianisation of Debian packages, problems encountered, solutions found and details of problematic packages. In due course, the advice here will be distilled into a dedicated Developer Guide and into the currently unformed Emdebian Policy documentation.

Anything that expands or clarifies issues in the emdebian-tools manpages can also be added here.

See also EmdebianQuickStart and ["Embedded_Debian"].

Cache Files

Packages consisting of compiled C code and using the autotools can support a cache file of values to help the ./configure script to identify settings for the target that differ from the architecture performing the build. Cache files can also be used to provide the answer when letting ./configure calculate the result would end in failure. Typically, this is due to ./configure trying to compile a test program on the build architecture using the target compiler - resulting in trying to run an arm binary on, say, amd64. To prevent such disasters, the value that the test program is trying to calculate can be provided in a cache file and autotools will skip the test program.

Currently, values for these cache files need to be elucidated the hard way: Let the build fail, work out where it failed, find the cache variable that would prevent the failing code from being run and then look up the value for that variable in the build logs of the native build in Debian.

dpkg-gencontrol: error

Packages that use CDBS handle emlocale automatically. Packages that use debhelper need minor tweaks to ensure that the new packages created for the translation files get populated correctly. The problem comes with something like a rootfs where packages use the dpkg commands directly. To create and populate the translation packages, manual editing of debian/rules is necessary.

You need to add a clean: rule and a loop to build:

e.g. for diff (source package name diffutils), the loop for the build target consists of:

srcpkg=diffutils \
POFILES=`cd po && ls *.po | sed -e 's/\.po$$//'` ; \
for po in $$POFILES; do \
        TMPPO=`basename $$po | cut -f1 -d.` ; \
        TMPPKG=`echo $$TMPPO | tr '_@A-Z' '-+a-z'` ; \
        install -d debian/$$srcpkg-locale-$$TMPPKG/DEBIAN ; \
        install -d debian/$$srcpkg-locale-$$TMPPKG/usr/share/locale/$$TMPPO/LC_MESSAGES/ ; \
        install po/$$TMPPO.gmo debian/$$srcpkg-locale-$$TMPPKG/usr/share/locale/$$TMPPO/LC_MESSAGES/$$srcpkg.mo ; \
        dpkg-gencontrol -p$$srcpkg-locale-$$TMPPKG -Pdebian/$$srcpkg-locale-$$TMPPKG ; \
        dpkg --build debian/$$srcpkg-locale-$$TMPPKG .. ; \
done

Take care : your web browser could have added a line break in the long install line in the loop. The installation of po/bar.gmo into debian/foo/usr/share/locale/bar/LC_MESSAGES is a single line in debian/rules. Try reducing the font size or zoom level in your browser to get the correct line wrapping.

Remember to set the SOURCE package name in srcpkg and be very careful to retain all the double dollars.

Now remove the locale files from the parent package:

${RM} -r debian/tmp/usr/share/locale/

(Watch for packages that use foo-common or foo-data instead of tmp and update as appropriate.)

And finally, add a clean target:

rm -rf debian/diffutils-locale-*

(Note here that $srcpkg is not available, you can move the variable elsewhere or just specify the source package name explicitly. The variable is only really to make it easy to migrate the loop between packages.)

Thanks to Julian Gilbey for the idea and fixes.

Problematic packages

  1. gnupg /usr/arm-linux-gnu/include/sys/types.h:72: error: two or more data types in declaration specifiers

  2. attr libtool error - unable to infer tagged configuration.

  3. acl libtool error - unable to infer tagged configuration.

  4. cdebconf Currently implements a GTK frontend - need to see if this can be split out into a separate package to reduce dependencies. (Does not appear to be an upstream option in ./configure --help.)

  5. perl-base Tries to run cross-built miniperlmain and possibly other generated binaries during make.

Incomplete build logs

It would be useful to have a place for incomplete build-logs - failure logs - but this service is not currently available on the emdebian server.

apt-cross

Until an equivalent to pbuilder is available for cross-building, the build host will need to install cross versions of the -dev packages required by the package being built. apt-cross -v -i libfoo-dev.

Status Table

A [http://buildd.emdebian.org/svn/file/current/emdebian/trunk/logs/buildstatus buildstatus] script is available in SVN which will update your emdebian working directory and then count the number of packages where work has started, show how many patches are present for each and whether a build log was found. Build logs are present even if the build failed so this is only indicative of whether a build has been attempted. The final arbiter of whether a build was successful is the presence of a build log in SVN and the presence of a package in the Emdebian target repository. Unfortunately, I haven't yet found a quick way of checking SVN for build logs - using svn list took too long.


CategoryEmdebian