Emdebian Policy is based on Debian Policy and is intended to cover the needs of the cross-built Emdebian Crush distribution. Due to the state of cross-building support in Debian Squeeze, Emdebian Crush is only available as Emdebian Crush 1.0 (based on Debian 5.0 'Lenny'). This table shows sections of Debian Policy that need modification for Emdebian:
Policy changes common to Grip, Baked and Crush
3.8 Essential - Packages MUST NOT include the Essential tag.
4.4 Debian changelog : debian/changelog - Debian Policy applies with a footnote that debian/changelog is not included into Emdebian packages, only retained in the source package.
5.6.9 Essential - Prohibited. No package is permitted to use this control field.
12.1 Manual pages - Emdebian packages must not include manual pages.
12.2 Info documents - Emdebian packages must not include info documents.
12.3 Additional documentation - Most additional documentation needs to be removed. Special consideration might be available for some packages but the expectation is that all help available to the user is context-sensitive and localised via gettext and implemented within the application C code.
12.4 Preferred documentation formats - context-sensitive tooltips implemented by the C code within the application and localised using gettext via Emdebian TDebs.
12.6 Examples - Packages must not include examples.
12.7 Changelogs - Packages must not carry any changelog files except in the source package. Changelogs (Debian or upstream) must not be installed.
12.5 Copyright information - Copyright information must be compressed with gzip -9. Licences should not be installed by default. The option to install compressed licences could be provided.
Policy changes specific to cross-built Emdebian Crush
3.9 Maintainer Scripts - Scripts must neither use any interpreter except POSIX shell (specifically busybox dash) nor attempt to call any program that uses a non-shell interpreter unless a C replacement is already available, update-alternatives is not available and must not be referenced in the scripts.
3.9.1 Prompting in maintainer scripts - Replace debconf with cdebconf
6.1 Introduction to maintainer scripts - Include reliance on only using POSIX shell scripts.
9.3.2 Writing the scripts - Footnote that only a POSIX shell interpreter is available.
9.10 Registering Documents using doc-base - Footnote that doc-base is not available on Emdebian.
10.4 Scripts - Scripts must not use any interpreter other than POSIX shell (specifically busybox dash). In the future, a minimal perl interpreter might be available.
10.9.1 The use of dpkg-statoverride - dpkg-statoverride is a Perl script in Debian Lenny.
11.9 Perl programs and modules - Until a suitable perl interpreter becomes available for Emdebian, Perl is not supported. The Debian Perl Policy is void until perl becomes available.
11.10 Emacs lisp policy - Lisp is not available in Emdebian. The Debian Emacs Policy is void.
Policy changes specific to pre-configured Emdebian Baked
3.9 Maintainer Scripts - Packages must not include maintainer scripts for any reason.
6.1 Introduction to maintainer scripts - Dropped.
9.3.2 Writing the scripts - Dropped.
10.4 Scripts - Prohibited.
Baked is generated from packages otherwise compatible with either Emdebian Grip or Emdebian Crush. Where there is a conflict in Policy regarding a Baked package, the Policy for Baked will always overrule any other Policy. Where there is no conflict, the Policy for Grip or Crush will apply as determined by the methods used to create the relevant package.
- Emdebian Crush will continue to use a subset of Debian packages so the above changes only apply to those packages needed by Emdebian.
Wherever possible, all changes from Debian Policy are to be implemented via use of DEB_BUILD_OPTIONS and supporting changes in Debian packages.
Implementation of Policy is principally to be achieved using the Grip support scripts to post-process the binaries from either Crush or Debian. Where compliance cannot be achieved via emgrip, packages cross-built for Crush will need to implement patches and Emdebian needs to seek a method of compliance that can be implemented within Debian. (e.g. by modifying the behaviour of update-alternatives or install-info in Debian - see 518737.)
Regarding Policy 9.8 Keyboard configuration , this relates to the runtime operation of packages providing terminals and does not need to affect Emdebian as long as installation-time prompting is done in a Policy-compliant manner, i.e. debconf.
These are preliminary lintian checks that emdebian-tools can support. Automated tests will use lintian -C em $changes_file so that only these checks are run so that lintian errors that also exist in the Debian package do not complicate the build. Normal operations of lintian $changes_file are not affected - the script checks for an Emdebian version string (with the emN suffix).
Lintian errors will cause a FTBFS (fail to build from source) build failure in emdebuild in automated builds for Crush.
Lintian warnings are issues that differ from Debian but which may or may not be applicable to all Emdebian packages.
Lintian warnings are not currently sub-divided for the different variants of Emdebian.
Check-Script: emdebian Author: Neil Williams <firstname.lastname@example.org> Abbrev: em Type: binary, udeb, source Unpack-Level: 1 Needs-Info: objdump-info, file-info Info: This script checks binaries and object files for bugs.
Standard lintian prefix content, based on /usr/share/lintian/checks/binaries.
Tag: binary-or-shlib-omits-rpath Type: warning Info: The binary or shared library fails to set RPATH.
RPATH is an important issue in Debian and Emdebian but for opposite reasons and with opposite emphasis. More information is needed in this area with more testing to establish the role and importance of RPATH in Emdebian packages.
Tag: binary-is-wrong-architecture Type: error Info: The binary or shared library is the wrong architecture. This is usually a failure of the Emdebian patches to set the correct compiler.
This is a critical error and lintian makes a much better job of this check than the previous support in emdebuild. Allowing packages to install binaries built for the build architecture (e.g. amd64) instead of the host architecture (e.g. ARM) will cause disastrous errors at runtime, especially if the binary concerned is part of the boot process. The error appears if debian/rules does not set the cross-compiler for all (or any) part of the build. Sometimes this can happen if the Emdebian patch for debian/rules fails to apply and the package tries to build anyway.
Tag: unsupported-interpreter-in-maintainer-script Type: error Info: The maintainer script needs an unsupported interpreter. Maintainer scripts in Emdebian must not try to use perl or python, no matter what dependencies are specified.
At some future point, some form of interpreter may be supported in Emdebian but the presence of perl (and python) is so engrained within Debian that it needs to be a definite error until such time as a sane perl installation can be made available for embedded devices.
Maintainer scripts are particularly bad because the lack of /usr/bin/perl means that packages will fail to install or be impossible to remove.
Tag: unsupported-interpreter-in-binary Type: error Info: The binary package includes an interpreted script. Interpreted languages like perl and python are not supported in Emdebian.
Still an error in case the binary in question ends up being called during the boot process or system installation.
Tag: maintainer-scripts-calls-install-info Type: error Info: Maintainer pages in Emdebian must not call install-info info pages are not present in Emdebian packages and install-info itself does not exist. Maintainer scripts must be patched to remove calls to install-info. Tag: maintainer-scripts-calls-update-alternatives Type: error Info: Maintainer pages in Emdebian must not call update-alternatives Tag: maintainer-scripts-tries-to-process-a-manpage Type: error Info: Maintainer pages in Emdebian must not process manpages Tag: emdebian-tdeb-without-messages Type: error Info: The Emdebian TDeb does not contain a matching messages file. Tag: emdebian-package-contains-translations Type: error Info: All translations must be in Emdebian TDeb packages. Tag: emdebian-package-contains-manpages Type: error Info: All manpages must be removed from Emdebian packages. Tag: emdebian-package-contains-docs Type: error Info: The package contains files in /usr/share/doc/ Only copyright.gz is allowed in /usr/share/doc/.
Tag: emdebian-copyright-not-compressed Type: warning Info: copyright files should be compressed for Emdebian.