|
|
emdebian-crush & emdebian-buildsupport
Debian cross-building support
Emdebian Crush is now based mainly on pdebuild-cross,
multistrap and Emdebian Grip. Only
selected Debian source packages are cross-built, the rest of the
packages come directly from Emdebian Grip.
The emdebian-buildsupport package contains a few helper
scripts to process cross-built Debian packages for Emdebian Crush,
then pass the modified packages through the Emdebian lintian checks.
Reasons to cross-build packages
Remove unwanted dependencies - involves switching
off compile time options supported upstream.
Allow busybox to replace coreutils - involves
modifying certain packages to not use specific options that are not
supported by busybox in Crush.
Remove calls to unsupported progams - some packages
look for scripts and programs which cannot be supported in Crush,
e.g. perl or python.
The emdebian-crush package
- emsetup : Check your system for cross-build support and
determine some defaults for other emdebian-tools scripts. Run this
first, using the simulate option, to see what changes may be needed.
- emchain : Toolchain builder for cross compiling. If a
pre-built toolchain is not found or not available, emchain can build
a custom toolchain for your needs using the current Debian version of
gcc.
- emdebuild : Emdebian version of debuild that handles
cross-building the emdebianised tree. Requires a suitable cross-building
toolchain to be installed for the requested architecture, e.g.
gcc-4.1-arm-linux-gnu, available from the emdebian tools repository via
emsetup or built for your particular configuration using emchain.
See the HowTo guide for information
on using the tools to build packages.
Quality Assurance checks
Lintian support scripts are included in the emdebian-buildsupport
binary package. The checks are used to implement
Emdebian Policy.
multistrap support
Root filesystem and Installation tools
emdebian-rootfs is a separate package for users who only need
to use binary packages from Emdebian, rather than build new ones or modify
existing ones from Debian sources and Emdebian patches.
- emsandbox : native chroot tool for Emdebian testing.
emsandbox is a wrapper for debootstrap to prepare an Emdebian
root filesystem, using Emdebian packages and a native chroot via
'debootstrap --foreign' and code from pbuilder. The native chroot
is intended to support testing of a rootfs and package installability.
- emdebian-rootfs also includes three "suite scripts"
that are used with debootstrap
to prepare the root filesystems. The suite scripts extend the package set of
the minimal root filesystem to include a basic Gtk+ environment and then again
to include a full GNOME Palmtop
Environment.
Installation Changes
emdebian-tools makes two changes to the apt configuration of
your Debian installation to cross-build successfully. The first is
to allow apt to use the Emdebian toolchain repository, the second is
to ensure that apt can provide useful cross-building information to
emdebian-tools during cross-build operations by ensuring that you have
at least one apt source that is a primary Debian mirror. These changes
are reverted if the emdebian-tools package is purged.
Newer versions of emdebian-tools
Interim bug fix releases of emdebian-tools and other packages like
apt-cross are regularly made to the Emdebian repository and
updates are available alongside the toolchains. Generally, version
x.x.0 is uploaded to Debian and allowed to migrate into Debian
testing. Versions x.x.x are uploaded to Emdebian whilst waiting
for the migration. Sometimes, the Debian package needs an update, hence
the version of emdebian-tools in Debian Lenny is 1.4.3.
During a release freeze, it is not uncommon for many interim releases to
be made to Emdebian so that the packages can be as close as possible to
the latest subversion code. Check the latest version of emdebian-tools
via the
toolchain repository data on the Emdebian website.
For these reasons, it is important to update your apt or aptitude
cache data after installing emdebian-tools and then upgrade your
installation.
$ sudo apt-get update
$ sudo apt-get upgrade
Note that the dependencies of emdebian-tools will continue
to change as the toolset develops so sometimes you will need to add
new packages and it can be better to use:
$ sudo apt-get update
$ sudo apt-get dist-upgrade
Installing emdebian-tools in a lenny chroot
There are a few issues worth noting when preparing a Lenny
chroot for emdebian-tools:
locales
emdebian-tools and associated scripts are mostly
perl and perl gets very noisy and annoying if suitable locales are
requested but not configured. Typically, chroot will inherit
the environment variables requesting your configured locales, resulting
in noisy warnings like:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
These can easily hide any other more useful messages output by the
installation process or the scripts themselves. Fix the issue either
by installing and configuring locales inside the chroot or by
unsetting the necessary environment variable(s) in a wrapper script
which then calls chroot.
Recommends:
emdebian-tools has few recommended packages but some of
the dependencies of emdebian-tools packages can have troublesome
recommended dependencies that usually end up requiring most of the Xorg
libraries to be installed. This is not necessary for Emdebian
support.
Disable the installation of recommended packages inside the chroot
by placing the following file into /etc/apt/apt.conf.d/
inside the chroot:
# cat /path/to/chroot/etc/apt/apt.conf.d/10disablerecommends
APT
{
Install-Recommends "false"
};
targetsuite=unstable
The default targetsuite for emdebian-tools is
unstable, in accordance with usual Debian practice of building all
packages against unstable ready for an upload to unstable.
debootstrap sets some debconf defaults and you
will likely find that emdebian-tools has been configured
with such defaults after installation inside a debootstrap chroot. The
default for targetsuite is unstable.
targetsuite is also used to set the suite used to access
the Emdebian toolchains and updates of emdebian-tools packages.
Whilst this can be useful in that it allows you to immediately upgrade
to the latest version of emdebian-tools, you probably want to
change the targetsuite before building packages. You can do
this using dpkg-reconfigure emdebian-tools (or dpkg-reconfigure
libemdebian-tools-perl for versions 1.4.16 or later) and selecting
stable as the preferred suite for package building. Always
run apt-get update after changing targetsuite.
You should then end up with:
# apt-cache policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://www.emdebian.org stable/main Packages
release v=1.0,o=Debian,a=stable,l=Emdebian-toolchains,c=main
origin www.emdebian.org
500 http://ftp.uk.debian.org lenny/main Packages
release v=5.0,o=Debian,a=stable,l=Debian,c=main
origin ftp.uk.debian.org
Pinned packages:
Configuring things this way means that you do not have to wait
for a backport of emdebian-tools to Lenny but you should
change targetsuite before running emsetup or
attempting to install a cross-building toolchain.
emdebian-tools (1.5.1) will be available via the
Emdebian toolchain stable repository and other backports that may
become necessary will also be made via Emdebian.
emdebian-buildsupport
If you prefer to configure your own toolchain and only want to
cross-build packages using Emdebian support, you can install just the
emdebian-buildsupport package instead of the full
emdebian-tools suite.
autoremove
emdebian-tools 1.5.0 has modified the dependencies such
that certain packages previously selected by installing
emdebian-tools are now no longer necessary. You can remove
these packages using:
# apt-get --purge autoremove
Example output:
The following packages will be REMOVED
autoconf* automake* autotools-dev* cdbs* dbs* dpatch* g++* g++-4.3*
libstdc++6-4.3-dev* m4* quilt*
0 upgraded, 0 newly installed, 11 to remove and 0 not upgraded.
After this operation, 26.7MB disk space will be freed.
Note that emdebuild --build-dep may need to reinstall some
of those packages, depending on which packages you need to build.
Colour
emdebian-tools support colourised output to supporting terminals
using Text::ANSIColor. This can be disabled by setting the environment
variable ANSI_COLORS_DISABLED. In general, colour is used when the
scripts are called in verbose mode or when performing actions that may
be unfamiliar to new users of the package. Blue indicates a general
status message from the script itself. Green indicates that the script
has modified a file or performed an action that modifies data external
to the current process - e.g. adding a file to Emdebian SVN. Red
indicates errors. Programs and scripts called by emdebian-tools are
left to output their own colours or simply output to the terminal default.
Colours are implemented via escape sequences and do not affect copying
textual output from the terminal into other applications.
Roadmap
Future changes in emdebian-tools
Main area of change: a full implementation of tdebs
in Debian as well as Emdebian (planned for DebConf8 and/or Extremadura).
Other changes involve persuading Debian maintainers to fix the
cross-building bugs reported from Emdebian builds. This is being done
using the existing
long term mass bug filing for cross build support and the Emdebian Code Audit.
|