You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
348 lines
14 KiB
XML
348 lines
14 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<refentry id="empdebuild">
|
|
<refentryinfo>
|
|
<productname>empdebuild</productname>
|
|
<productnumber/>
|
|
</refentryinfo>
|
|
<refmeta>
|
|
<refentrytitle>empdebuild</refentrytitle>
|
|
<manvolnum>1</manvolnum>
|
|
<refmiscinfo class="source">EMDEBIAN-TOOLS</refmiscinfo>
|
|
<refmiscinfo class="manual">EMDEBIAN-TOOLS</refmiscinfo>
|
|
</refmeta>
|
|
<refnamediv id="name">
|
|
<refname>empdebuild</refname>
|
|
<refpurpose>chroot tool for Emdebian cross compiling</refpurpose>
|
|
</refnamediv>
|
|
<refsynopsisdiv>
|
|
<cmdsynopsis>
|
|
<command>empdebuild</command>
|
|
<group>
|
|
<arg>-a</arg>
|
|
<arg>--arch </arg>
|
|
<replaceable> ARCHITECTURE</replaceable>
|
|
</group>
|
|
<group>
|
|
<arg>--testing</arg>
|
|
</group>
|
|
<group>
|
|
<arg>--login-after-fail</arg>
|
|
</group>
|
|
<group>
|
|
<arg>--build</arg>
|
|
<arg>build</arg>
|
|
</group>
|
|
</cmdsynopsis>
|
|
<cmdsynopsis>
|
|
<command>empdebuild</command>
|
|
<group>
|
|
<arg>-a</arg>
|
|
<arg>--arch </arg>
|
|
<replaceable> ARCHITECTURE</replaceable>
|
|
</group>
|
|
<group>
|
|
<arg>--testing</arg>
|
|
</group>
|
|
<group>
|
|
<arg>--create</arg>
|
|
<arg>create</arg>
|
|
</group>
|
|
</cmdsynopsis>
|
|
<cmdsynopsis>
|
|
<command>empdebuild</command>
|
|
<group>
|
|
<arg>-a</arg>
|
|
<arg>--arch </arg>
|
|
<replaceable> ARCHITECTURE</replaceable>
|
|
</group>
|
|
<group>
|
|
<arg>--testing</arg>
|
|
</group>
|
|
<group>
|
|
<arg>--save-after-login</arg>
|
|
</group>
|
|
<group>
|
|
<arg>--login</arg>
|
|
<arg>login </arg>
|
|
</group>
|
|
</cmdsynopsis>
|
|
<cmdsynopsis>
|
|
<command>empdebuild</command>
|
|
<group>
|
|
<arg>-a</arg>
|
|
<arg>--arch </arg>
|
|
<replaceable> ARCHITECTURE</replaceable>
|
|
</group>
|
|
<group>
|
|
<arg>--testing</arg>
|
|
</group>
|
|
<group>
|
|
<arg>--update</arg>
|
|
<arg>update</arg>
|
|
</group>
|
|
</cmdsynopsis>
|
|
<cmdsynopsis>
|
|
<command>empdebuild</command>
|
|
<group>
|
|
<arg>-a</arg>
|
|
<arg>--arch </arg>
|
|
<replaceable> ARCHITECTURE</replaceable>
|
|
</group>
|
|
<group>
|
|
<arg>--login-after-fail</arg>
|
|
</group>
|
|
<group>
|
|
<arg>--autobuild</arg>
|
|
<arg>autobuild</arg>
|
|
</group>
|
|
</cmdsynopsis>
|
|
<cmdsynopsis>
|
|
<command>empdebuild</command>
|
|
<group>
|
|
<arg>-a</arg>
|
|
<arg>--arch </arg>
|
|
<replaceable> ARCHITECTURE</replaceable>
|
|
</group>
|
|
<group>
|
|
<arg>--clean</arg>
|
|
<arg>clean</arg>
|
|
</group>
|
|
</cmdsynopsis>
|
|
</refsynopsisdiv>
|
|
<refsect1 id="description">
|
|
<title>DESCRIPTION</title>
|
|
<para>Note that <command>empdebuild</command> does not support all the
|
|
options available to <command>pbuilder</command>.
|
|
</para>
|
|
<para><command>empdebuild</command> is an Emdebian version of pdebuild, building
|
|
Emdebian packages in a chroot using code from pbuilder. The Emdebian chroot includes the
|
|
cross-building toolchain from Emdebian for the requested architecture and includes
|
|
support for installing cross versions of package dependencies via
|
|
<command>apt-cross</command> with all the advantages of a chroot - identification of
|
|
missing dependencies and the ability to build packages without installing the dependencies
|
|
on the main system, e.g. to support a buildd.
|
|
</para>
|
|
<note>
|
|
<title>empdebuild is a build chroot</title>
|
|
<para><command>empdebuild</command> creates a chroot for the same architecture as
|
|
the system running <command>empdebuild</command> and then installs a cross-building
|
|
toolchain from Emdebian using the <command>dpkg-cross</command> default
|
|
architecture or the specified architecture. This has some important results:
|
|
</para>
|
|
<orderedlist>
|
|
<listitem>
|
|
<para>The chroot is a Debian system running <filename>emdebian-tools</filename>
|
|
and is equivalent to a typical installation of emdebian-tools
|
|
<emphasis>after</emphasis> <command>emsetup</command> has been completed
|
|
successfully. This includes installing perl and debconf inside the chroot.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>A suitable Emdebian toolchain will be installed in the chroot.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>The same cache files are needed inside the chroot as would be needed on the
|
|
main system - cross-built binaries <emphasis role="bold">cannot</emphasis> be run
|
|
within the the chroot. All the normal emdebian patch files will be needed.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>This is a full build system with native and cross compilers, development
|
|
packages, autotools and subversion. It is <emphasis role="bold">NOT</emphasis>
|
|
suitable for installation on any device. Use <command>emsandbox</command>
|
|
instead.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>The chroot disables the installation of recommended packages by
|
|
apt using the Install-Recommends "false" option.
|
|
</para>
|
|
</listitem>
|
|
</orderedlist>
|
|
</note>
|
|
<para>Use <command>emsandbox</command> to create cross chroots (where the
|
|
chroot is built for a different architecture to the system running the chroot),
|
|
e.g. to prepare a rootfs for installation on an arm device using emdebian-tools
|
|
installed on i386, amd64 etc. See <command>emsandbox</command> (1).
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 id="commands">
|
|
<title>COMMANDS</title>
|
|
<para>Options for <command>dpkg-buildpackage</command> can be given
|
|
after the <option>--</option> option. The default options are
|
|
<option>-uc -us</option> which cannot be overridden. Also certain
|
|
commands do not make sense in this context,
|
|
e.g. <option>-a</option> for architecture will be silently dropped.
|
|
</para>
|
|
<variablelist remap="TP">
|
|
<varlistentry>
|
|
<term><option>--build</option>|<option>build</option></term>
|
|
<listitem>
|
|
<para>(to provide) similar functionality to pdebuild for Emdebian -
|
|
copies the source into the chroot and runs a build using
|
|
<command>emdebuild</command>.
|
|
</para>
|
|
<para>Use <option>--login-after-fail</option> to debug a failed build.
|
|
If <command>emdebuild</command> fails inside the chroot,
|
|
<command>empdebuild</command> will then open a shell at the point
|
|
of failure, allowing you to debug the build session with the active data.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><option>--create</option>|<option>create</option></term>
|
|
<listitem>
|
|
<para>Runs <command>debootstrap</command> with a modified suite rule
|
|
set to create a basic Emdebian environment, including emdebian-tools and
|
|
an Emdebian toolchain for the default or specified architecture.
|
|
</para>
|
|
<para>Checks for an existing chroot and exits if one is found - either use
|
|
<option>--update</option> or move the old chroot out of the way.
|
|
</para>
|
|
<para>If <option>--create</option> fails after debootstrap has
|
|
completed, <option>--update</option> should be able to recover
|
|
and create the necessary tarball.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><option>--login</option>|<option>login</option></term>
|
|
<listitem>
|
|
<para>Login to the chroot. Unless <option>--save-after-login</option> is used,
|
|
changes made within the chroot will be lost.
|
|
</para>
|
|
<para>When setting up any chroot, debconf is set to use the default values
|
|
and this leads to <command>dpkg-cross</command> being set to
|
|
<userinput>None</userinput> as the default cross building architecture.
|
|
When logged into the chroot, always specify the <option>--arch</option>
|
|
option to <command>apt-cross</command> and all
|
|
<emphasis>emdebian-tools</emphasis> scripts.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><option>--update</option>|<option>update</option></term>
|
|
<listitem>
|
|
<para>Updates the Emdebian environment, including emdebian-tools and
|
|
an Emdebian toolchain for the default or specified architecture. Depending on
|
|
the status of gcc-?.? in Debian, there can be problems updating the cross
|
|
building toolchain at this stage. If you get reports of broken packages
|
|
or toolchain packages that fail to install, allow the update to continue as
|
|
normal, then login to the chroot with the <option>--save-after-login</option>
|
|
option. If the problem relates to a package named <filename>$PACKAGE-$ARCH-cross</filename>
|
|
not <filename>$PACKAGE-$ARCHTYPE</filename> ($ARCHTYPE for arm = arm-linux-gnu), this
|
|
package is handled by <command>dpkg-cross</command> and <command>apt-cross</command>.
|
|
Use <command>apt-cross -a $ARCH -v -i $PACKAGE</command> (omit the -$ARCH-cross suffix)
|
|
to update such packages ahead of the Emdebian repository. Use
|
|
<command>apt-get dist-upgrade</command> and <command>emsetup -a $ARCH --yes</command>
|
|
to complete the upgrade. Type 'exit' or use 'Ctrl-D' to exit from the chroot and
|
|
the updated packages will be saved alongside the updated chroot.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><option>--clean</option>|<option>clean</option></term>
|
|
<listitem>
|
|
<para>Uses pbuilder functions to clean the chroot build place,
|
|
removing any previous build environments. In some situations, a stale
|
|
build environment may still contain active mounts for
|
|
<computeroutput>proc</computeroutput> or <computeroutput>dev/pts</computeroutput>
|
|
and these will result in <emphasis>Device or resource busy</emphasis> errors.
|
|
To umount the relevant points, look for your Emdebian working directory being
|
|
listed in the output of <computeroutput>mount</computeroutput> and pass that
|
|
directory name to:
|
|
<programlisting>
|
|
$ sudo umount PATH
|
|
</programlisting>
|
|
Once umounted, either remove the files manually or run <command>sudo empdebuild</command>
|
|
<option>--clean</option> again.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
<refsect1 id="options">
|
|
<title>OPTIONS</title>
|
|
<variablelist remap="TP">
|
|
<varlistentry>
|
|
<term><option>-a</option>|<option>--arch</option><replaceable> ARCHITECTURE</replaceable></term>
|
|
<listitem>
|
|
<para>Override the <command>dpkg-cross</command> default architecture
|
|
for this operation on the chroot. The Emdebian toolchain in the chroot
|
|
will be upgraded (or installed if the chroot contains a toolchain for a
|
|
different architecture).
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>
|
|
<option>--testing</option>
|
|
</term>
|
|
<listitem>
|
|
<para>Create, update, login or build a package within a chroot based on
|
|
Debian testing, not Debian unstable. This is a fallback option for the times
|
|
when Debian unstable transitions make it impossible to install a cross-building
|
|
toolchain or update the existing toolchain.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>
|
|
<option>--save-after-login</option>
|
|
</term>
|
|
<listitem>
|
|
<para>Login to the chroot and allow changes made within the chroot to persist
|
|
into subsequent sessions. Only supported in conjunction with
|
|
<option>login</option>|<option>--login</option>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>
|
|
<option>--login-after-fail</option>
|
|
</term>
|
|
<listitem>
|
|
<para>Login to the chroot if <command>emdebuild</command> fails
|
|
within the chroot, at the point where the build failed. Chroot cross builds
|
|
can involve a protracted setup phase which can be hard to replicate
|
|
outside the chroot. Use this option to find out why a chroot build failed
|
|
when a normal build succeeded. Only supported in conjunction with
|
|
<option>build</option>|<option>--build</option>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><option>-h</option>|<option>--help</option></term>
|
|
<listitem>
|
|
<para>print the usage message and exit.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>
|
|
<option>--version</option>
|
|
</term>
|
|
<listitem>
|
|
<para>print the usage message and exit.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
<refsect1>
|
|
<title>Author</title>
|
|
<para><command>empdebuild</command> was written
|
|
by Neil Williams <email>codehelp@debian.org</email>.
|
|
</para>
|
|
<para>This manual page was written by Neil Williams
|
|
<email>codehelp@debian.org</email>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 id="seealso">
|
|
<title>SEE ALSO</title>
|
|
<para>See also <filename>apt-cross</filename> (1), <filename>em_make</filename> (1),
|
|
<filename>dpkg-cross</filename> (1), <emphasis>emdebian-tools</emphasis> (1),
|
|
<filename>emsandbox</filename> (1).
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|