Differences between revisions 4 and 13 (spanning 9 versions)
Revision 4 as of 2006-10-31 13:28:35
Size: 6595
Editor: NeilWilliams
Comment: Reformat and include overview of LinuxWorld Expo discussions
Revision 13 as of 2009-03-26 00:10:52
Size: 6982
Editor: HectorOron
Comment: fix comment tag due to wiki migration errors
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
The biggest remaining issue in making Embedded Debian is how to store and control The biggest remaining issue in making [[Embedded_Debian|Embedded Debian]] is how to store and control
Line 9: Line 9:
The issues were discussed with various Debian Developers at LinuxWorld Expo 2006. The issues have been developed in discussion with emdebian and debian developers at the Extremadura Work Session, Debconf and !LinuxWorld Expo, in 2006 and further optimised at Fosdem 2007.
Line 13: Line 13:
=== Principles: === emdebian diff contains changes that are implemented via patch files kept in svn superimposed on the Debian diff, managed with emdebian-tools. Emdebian diff applied after debian diff, then standard build tools used on the result. i.e. The upstream .tar.gz needs to be debianised to make a working Debian package, then the Debian package can be emdebianised. Patch files can be reversed to regain the original Debian package.
Line 15: Line 15:
 1 Use of an appended emdebian version string with the 'em' prefix and a sequential digit as well as a distinct file suffix: .mdeb '''pros'''
 * No changes to tools. (Wrappers are available in emdebian-tools for a standardised approach.)
 * Avoids duplications of files/info - all changes are patches
 * Changed packages have changed version string so no confusion over functionality
 * Changes clear to all, so easy to send upstream
 * Build logs generated and stored in SVN, simple to compare against Debian logs.
 * keeping only patches in svn makes it easy to manage multiple version of packages and
 * uses standard, familiar tools yet provides flexibility

'''cons'''
 * 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:
Line 18: Line 32:
{{{ foo_1:2.3.4-5.6em7_arm.mdeb {{{
foo_1:2.3.4-5.6em7_arm.deb
Line 29: Line 44:
 a. Allows emdebian developers to have a version number that is independent of the *full* Debian version string.  a. Allows emdebian developers to have a version number that is independent of the '''full''' Debian version string.
Line 31: Line 46:
'''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. '''Status''': All already achievable with normal Debian tools. emdebian-tools scripts act as standardised wrappers.
Line 33: Line 48:
'''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. '''Problems''':
Line 35: Line 50:
 1.#2 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 less files than using the $DEBIAN_DIR approach, as well as less duplication.  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 apt-cross 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.
Line 37: Line 52:
 1. 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.  1. Those packages that need further customisation can have patches stored in the emdebian SVN repository. The emdebian build script - emdebuild - 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 holds patches on a per-source basis.
Line 39: Line 54:
'''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). '''Status''': Implemented in emdebian-tools, currently in Debian unstable.
Line 47: Line 62:
One necessary precursor for this approach is some form of emdebian BTS. Repackaging Debian archives through automated systems can cause mysterious bugs. A useful thing to do would be set up an emdebian BTS. Repackaging Debian archives through automated systems can cause mysterious bugs.
Line 51: Line 66:
<explanation/example> - used by STAG and STAGE <explanation/example> - used by STAGv2 and STAGE
Line 54: Line 69:
 * Needs updated tools (dpkg, debhelper, etc) This is a show-stopper. Too many packages will need changing and although the change appears minor, at LinuxWorld Expo 2006, discussions showed that $DEBIAN_DIR is unlikely to be supported by maintainers of the existing Debian package maintainers.  * 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.
Line 73: Line 88:
 * Debian packages will not install due to wrong deps (see pro)
Line 74: Line 90:
pro: '''pro:'''
Line 76: Line 92:
 * Ensures that changed packages have changed names so no confusion over functionality  * Changed packages have changed names so no confusion over functionality
Line 78: Line 94:
 * Debian packages will not install due to wrong deps
 * Needs changed tools to understand it (dpkg, debhelper etc) - such tools/changes are already in Debian
 * 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
Line 96: Line 112:
## This page is referenced from http://www.emdebian.org/packages/
CategoryPermalink

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 and further optimised at Fosdem 2007.

Composite method.

emdebian diff contains changes that are implemented via patch files kept in svn superimposed on the Debian diff, managed with emdebian-tools. Emdebian diff applied after debian diff, then standard build tools used on the result. i.e. The upstream .tar.gz needs to be debianised to make a working Debian package, then the Debian package can be emdebianised. Patch files can be reversed to regain the original Debian package.

pros

  • No changes to tools. (Wrappers are available in emdebian-tools for a standardised approach.)
  • Avoids duplications of files/info - all changes are patches
  • Changed packages have changed version string so no confusion over functionality
  • Changes clear to all, so easy to send upstream
  • Build logs generated and stored in SVN, simple to compare against Debian logs.
  • keeping only patches in svn makes it easy to manage multiple version of packages and
  • uses standard, familiar tools yet provides flexibility

cons

  • 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: 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.deb
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: All already achievable with normal Debian tools. emdebian-tools scripts act as standardised wrappers.

Problems:

  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 apt-cross 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. The emdebian build script - emdebuild - 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 holds patches on a per-source basis.

Status: Implemented in emdebian-tools, currently in Debian unstable.

  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


CategoryPermalink CategoryEmdebian