Differences between revisions 7 and 8
Revision 7 as of 2006-10-31 18:23:42
Size: 7473
Editor: wookey
Comment: Correct/Update Linuxworld additions
Revision 8 as of 2006-11-02 22:13:30
Size: 7474
Editor: NeilWilliams
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
The issues have been developed in discussion with emdebian and debian developers at the Extremadura Work Session, Debconf and LinuxWorld Expo, in 2006. The issues have been developed in discussion with emdebian and debian developers at the Extremadura Work Session, Debconf and !LinuxWorld Expo, in 2006.

EmdebianMetaData

The biggest remaining issue in making Embedded Debian is how to store and control package metadata which describes how to reduce package size, increase granularity, reduce the size of the essential package set, etc.

This page tries to document the issues and the pros and cons of the current active proposals.

The issues have been developed in discussion with emdebian and debian developers at the Extremadura Work Session, Debconf and LinuxWorld Expo, in 2006.

Composite method.

emdebian diff contains changes. changes kept in svn as individual patches, managed with quilt. Emdebian diff applied after debian diff, then standard build tools used on the result.

pros

  • No changes to tools needed except dpkg-src (for packing/unpacking)
  • Avoids duplications of files/info - all changes are patches
  • Changed packages have changed names so no confusion over functionality
  • Changes clear to all, so easy to send upstream
  • keeping original and changes in svn and using quilt to manage patches. makes it easy to manage multiple version of packages and
  • uses standard, familiar tools yet provides flexibility

cons

  • Still needs implementing
  • not as simple to use/understand as some of the other schemes

Mechanisms:

  • 1 Use of an appended emdebian version string with the 'em' prefix and a sequential digit as well as a distinct file suffix: .mdeb Example: if epoch = 1, upstream version = 2.3.4, debian version = 5, NMU number = 6, emdebian version 7, built for emdebian on arm:

{{{ foo_1:2.3.4-5.6em7_arm.mdeb foo_1:2.3.4-5.6em7.diff.gz foo_1:2.3.4-5.6em7.dsc foo_1:2.3.4-5.6em7_arm.changes }}}

  • In common with Debian versioning itself, the emdebian version resets to 1 each time a new package is available. Emdebian considers Debian as upstream so a new Debian version is still a new package as far as emdebian is concerned. This achieves three distinct ends.
  • Separates the emdebian archive files from other Debian archives and associated files being built from the same source tree on the developer system.
  • Identifies the archive as an adapted, stripped out, archive that is not necessarily compatible with any other .deb or .udeb files or programs.

  • Allows emdebian developers to have a version number that is independent of the full Debian version string.

Status: Mostly already achievable with normal Debian tools - except that the final archive needs to be renamed to use the .mdeb suffix at the final stage.

Problems: May require small changes to some .deb handling programs like reprepro. There has been a request to separate the emdebian diff.gz contents from the Debian .diff.gz contents - treating Debian as upstream of emdebian. This needs tweaking in the build scripts, possibly via the wrapper script below. Note that building such a package from source would then need both .diff.gz files and this could require further changes to the debhelper scripts, e.g. in the generation of the .changes file. In some (most?) situations, the emdebian .diff.gz will be empty - most changes being implemented by the build scripts.

  1. Wherever possible, emdebian will use standard Debian packaging scripts - only tweaking those related to the content needing to be removed or ignored in emdebian packages. i.e. the burden of changes has moved from Debian developers to emdebian developers. Packages like cross-get and dpkg-cross can be further enhanced to ensure the correct versions of the debhelper tools are used. Overall, this leads to changes in fewer files than using the $DEBIAN_DIR approach, as well as less duplication.
  2. Those packages that need further customisation can have patches stored in the emdebian SVN repository. An emdebian build script - a wrapper for pdebuild - will checkout and apply the patches before debian/rules is called. This is vital because using existing patch methods like CDBS and dpatch relies on debian/rules being called to perform the patch. In order to successfully patch debian/rules itself, the patch process needs to begin before debian/rules is called. The repository needs to hold patches on a per-source basis.

Status: cross-get can become apt-cross with normal apt functionality so that it can support a wrapper for pdebuild (empbuild) that downloads, cross-builds and installs dependencies in the chroot when building emdebian packages. This is in current development (Nov 2006).

  1. Unlike Debian packages, emdebian packages will not have individual emdebian maintainers. Instead, any emdebian developer will be able to update the emdebian customisations for a particular Debian package, e.g. when a new version is uploaded to unstable.
  2. An emdebian buildd can then package and upload archives to the emdebian repository to remove the delay between packages reaching testing and being built for emdebian.

Overall, this method uses the best of each of the previous ideas but large amounts of work remain.

A useful thing to do would be set up an emdebian BTS. Repackaging Debian archives through automated systems can cause mysterious bugs.

$DEBIAN_DIR

<explanation/example> - used by STAGv2 and STAGE

con:

  • Needs updated tools (dpkg, debhelper, etc). This has been implemented (June 2006) but there is serious resistance to the concept from the maintainers of the existing Debian packages (dpkg, devscripts). Having to maintain these packages separately is a real disadvantage.
  • Repetition of info in two or more places
  • Generates packages with same names as standard packages but different files/functionality/interface - will cause problems if mixed with Debian proper, or with different distros using the same mechanism.
  • Debian packages will install, but may not work due to missing files.
  • Easy for package maintainers to ignore so will get bitrot

pro:

  • Flexible and hierarchical - easy to apply a set of local changes
  • Easy to build entirely standard packages when $DEBIAN_DIR is set to debian
  • Changes are cleanly separated from standard package
  • Quite easy to understand

udebs

<explanation/example> - used by Debian-installer

con:

  • Harder to make specific variants due to close integration with Debian proper / no overlay mechanism
  • Changed package names require different sets of packages for 'embedded' base system.
  • Debian packages will not install due to wrong deps (see pro)

pro:

  • Easy to get changes into standard packages - mechanism is accepted, separation is clear
  • Changed packages have changed names so no confusion over functionality
  • Good acceptance in Debian proper already due to Debian-Installer team work
  • Debian packages will not install due to wrong deps (see con)
  • Needs changed build tools to understand it (dpkg, debhelper etc) - such tools/changes are already in Debian

Just change /debian files

con:

  • Very difficult to push changes back into standard packages - most are not appropriate
  • Large maintenance effort (due to no mechanism for pushing back into standard Debian packages

pro:

<explanation/example> - used by SLIND

In fact this is really a variant of the $DEBIAN_DIR example and could be implmented that way too(this assertion needs testing)

  • Simple - easy to understand
  • Standard tools will work


CategoryEmdebian