I'm working on a change in behaviour within emdebian-tools, more specifically emdebian-buildsupport and emdebuild. Previously, Crush relied on patches to implement Emdebian Policy with regard to documentation, manpages and translations. These are unreliable, problematic and generalised support for these changes as DEB_BUILD_OPTIONS is lacking, due mainly to a lack of consensus in Debian about what the various DEB_BUILD_OPTIONS really mean. Crush 1.0 did things that way because it was the right way to do it at the time, however, Grip is now available and can make things a lot simpler. Changes to building for Crush ============================= 1. Patches that are solely to remove documentation files, manpages and to support TDebs will be gradually removed from Emdebian SVN. 2. emdebuild will simply cross-build the package and then call emgrip with appropriate options to do the work of removing unwanted files. 3. lintian is still happy because emgrip is run between finishing the build and calling lintian. 4. It removes the need to duplicate the effect of emgrip as patches. 5. Like Grip, Crush would gain shortened package descriptions - this can be configurable if desired. 6. It becomes possible to use cross-building scripts other than emdebuild and convert the package to Crush later. Indeed, it becomes possible to use native-building scripts e.g. by using emsource to apply the functional changes or by implementing the functional changes by some other method. In effect, Crush is being migrated to a Grip foundation which in turn is based on Debian. The end result will be a simpler build and fewer, clearer patches. As the Code Audit [0] progresses, the only patches will be left will be for those changes required to modify the package dependencies or implement the functional changes we need within Crush. Some packages will be left with only the changelog patch (which itself is regenerated each time the Debian version changes). Patches for cross-build support will find their way into the relevant packages, patches for Policy compliance will be replaced by Grip processing. emgrip will then become the sole means of implementing Emdebian Policy, as checked by the Emdebian lintian support, allowing changes in emgrip to impact on the entire Crush archive yet retaining full control over which options are used. What I'm seeking to achieve is a clearer division-of-labour: 1. if a package fails to cross-build, file a bug in Debian. 2. if a package includes unwanted files, look at the emgrip options. 3. if a package depends on an unwanted package, use emsource patches. As part of this, emgrip has an extra set of options that it accepts in DEB_BUILD_OPTIONS - nosymbols, noperl and usecrush. "usecrush" implies "nosymbols", "noperl" and "usegrip", so it brings in all the normal Grip behaviour and flags packages as Crush rather than Grip. nosymbols drops the (sometimes) large /var/lib/dpkg/info/$package.symbols files that are only used when building packages on Crush. noperl is an experimental way of simplifying the removal of any file that appears to be a perl script when tested with 'file'. Like other emgrip options, this method will initially be brute force but will be modified to support Dpkg Classes when those exist. This also means that DEB_VENDOR support could be applied to emdebuild in future - simply by modifying the DEB_BUILD_OPTIONS passed to emgrip by emdebuild. As a by-product, it will also become possible to convert any Debian package directly into a Crush package of the same architecture, as long as there is no requirement for functional changes. As emgrip is still a perl script with development-based dependencies, this is probably not something you should consider doing on the device running Crush. However, being emgrip, the process is architecture-neutral so you don't need to do it on the device either. Just wrap the $command to emgrip: $ dpkg-architecture -q$arch -c '$command' (These commands can get v.long so you'll need a script anyway.) $ dpkg-architecture -qarm -c 'DEB_BUILD_OPTIONS="usecrush" emgrip -o ../base-passwd.grip/ ../base-passwd_3.5.20em1_arm.deb' [0] http://wiki.debian.org/EmdebianCodeAudit -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/
Attachment:
pgp36N6kT_ASD.pgp
Description: PGP signature