Differences between revisions 4 and 5
Revision 4 as of 2008-04-06 07:39:07
Size: 7996
Editor: NeilWilliams
Comment:
Revision 5 as of 2008-04-06 23:08:30
Size: 8020
Editor: NeilWilliams
Comment:
Deletions are marked like this. Additions are marked like this.
Line 132: Line 132:
----
CategoryEmdebian

Policy

Emdebian Policy is based on Debian Policy - this table shows sections of Debian Policy that need modification for Emdebian:

  • 3.8 Essential - Packages MUST NOT include the Essential tag.

  • 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

  • 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.

  • 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.8 Keyboard configuration - Footnote that many Emdebian devices will not have a keyboard of any kind (except on-screen after installation), so packages should not use methods that prevent the use of a serial console or network console or use methods that rely on a physical keyboard.

  • 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 and no C replacement exists at this time. Emdebian packages will need to either work without it or be patched to not require it.

  • 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.

  • 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.5 Copyright information - Copyright information must be compressed with gzip -9. Common licences should also be compressed.

  • 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.

Notes

  • Emdebian 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.

Lintian

These are preliminary lintian checks that [wiki:emdebian-tools 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 ([http://www.emdebian.org/emdebian/intro.html#suffix with the emN suffix]).

Lintian errors will cause a FTBFS (fail to build from source) build failure in emdebuild in automated builds.

Lintian warnings are issues that differ from Debian but which may or may not be applicable to all Emdebian packages.

Check-Script: emdebian
Author: Neil Williams <codehelp@debian.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/.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=448615

Tag: emdebian-copyright-not-compressed
Type: warning
Info: copyright files should be compressed for Emdebian.


CategoryEmdebian