1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
|
<?xml version="1.0" encoding="UTF-8"?>
<refentry id="empbuilderlib">
<refentryinfo>
<productname>empbuilderlib</productname>
<productnumber/>
</refentryinfo>
<refmeta>
<refentrytitle>empbuilderlib</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo class="source">EMDEBIAN-TOOLS</refmiscinfo>
<refmiscinfo class="manual">EMDEBIAN-TOOLS</refmiscinfo>
</refmeta>
<refnamediv id="name">
<refname>empbuilderlib</refname>
<refpurpose>Common functions for Emdebian chroots</refpurpose>
</refnamediv>
<refsect1 id="description">
<title>DESCRIPTION</title>
<para><emphasis>empbuilderlib</emphasis> is intended solely for use on
the build machine. Do not use these functions in second_stage_install !
<emphasis>empbuilderlib</emphasis> requires <emphasis role="bold">perl</emphasis>!
</para>
</refsect1>
<refsect1 id="autoclean_aptcache">
<title>autoclean_aptcache</title>
<para>Same as the pbuilder option but run by default in <command>empdebuild</command>
to remove obsolete .deb archives from the apt cache directories used by
<command>empdebuild</command>.
</para>
</refsect1>
<refsect1 id="basic_etc_fstab">
<title>basic_etc_fstab</title>
<para>Removing packages from the normal Debian debootstrap set can
mean that certain critical files can be omitted. basic_etc_fstab
creates a basic version of $TARGET/etc/fstab where it does not
already exist.
</para>
</refsect1>
<refsect1 id="basic_group_setup">
<title>basic_group_setup</title>
<para>Removing packages from the normal Debian debootstrap set can
mean that certain critical files can be omitted. basic_group_setup
creates a basic version of $TARGET/etc/group where it does not
already exist.
</para>
</refsect1>
<refsect1 id="basic_passwd_setup">
<title>basic_passwd_setup</title>
<para>Removing packages from the normal Debian debootstrap set can
mean that certain critical files can be omitted. basic_passwd_setup
creates a basic version of $TARGET/etc/passwd where it does not
already exist.
</para>
</refsect1>
<refsect1 id="busybox_inittab">
<title>busybox_inittab</title>
<para>Note: this function overwrites an existing $TARGET/etc/inittab
</para>
<para>busybox does not support runlevels and so the /etc/inittab
file needs to be modified to support busybox. Currently, this function
overwrites an existing $TARGET/etc/inittab - this is likely to change
in future versions.
</para>
</refsect1>
<refsect1 id="busybox_rcS">
<title>busybox_rcS</title>
<para>Note: this function overwrites an existing $TARGET/etc/init.d/rcS
</para>
<para>busybox does not support runlevels and so the /etc/init.d/rcS
script needs to be modified to support busybox. Currently, this function
overwrites an existing $TARGET/etc/init.d/rcS - this is likely to change
in future versions.
</para>
</refsect1>
<refsect1 id="check_dirs">
<title>check_dirs</title>
<para>Check that the $BUILDPLACE, $BUILDRESULT and $APTCACHE directories
exist (used by empdebuild).</para>
</refsect1>
<refsect1 id="checkarch">
<title>checkarch</title>
<para>Calls check_arch from Debian::DpkgCross using perl.
The perl call dies if the specified string does not match a
supported architecture.</para>
</refsect1>
<refsect1 id="copy_host_configuration">
<title>copy_host_configuration</title>
<para>Copy hosts, hostname and resolv.conf from the system /etc/
directory and adapts /etc/hostname to use a different
name (emdebian-$ARCH).
</para>
</refsect1>
<refsect1 id="create_emdebiantgz">
<title>create_emdebiantgz</title>
<para>Modified version of the equivalent function in pbuilder-modules
to extract the compressed chroot (used by empdebuild).</para>
</refsect1>
<refsect1 id="disable_apt_recommends">
<title>disable_apt_recommends</title>
<para>Enforces a default of not installing recommended packages inside the
chroot.
</para>
</refsect1>
<refsect1 id="extra_etc_rcd">
<title>extra_etc_rcd</title>
<para>Removing packages from the normal Debian debootstrap set can
mean that certain critical files can be omitted. extra_etc_rcd
creates a basic version of $TARGET/etc/rcS.d where it does not
already exist.
</para>
</refsect1>
<refsect1 id="extractembuildplace">
<title>extractembuildplace</title>
<para>Modified version of the equivalent function in pbuilder-modules
to extract the compressed chroot (used by empdebuild).</para>
</refsect1>
<refsect1 id="make_dpkg_dirs">
<title>make_dpkg_dirs</title>
<para>Prepare for unpacking and general dpkg work by setting up
$TARGET/var/lib/dpkg/status and $TARGET/var/lib/dpkg/available.
</para>
</refsect1>
<refsect1 id="prepare_proc">
<title>prepare_proc</title>
<para>Ensure that $TARGET/proc and $TARGET/sys exist so that
proc and sys can be mounted automatically.
</para>
</refsect1>
<refsect1 id="prepare_var">
<title>prepare_var</title>
<para>Ensure that $TARGET/var/log/ and $TARGET/var/spool exist so
that various installation routines can proceed.
</para>
</refsect1>
<refsect1 id="set_approx_time">
<title>set_approx_time</title>
<para>Normal Debian installations have a network connection and
typical Debian desktop boxes also have a backup battery. Some
embedded machines do not have either of these systems, making
it impossible to store or retrieve even a vaguely close indication
of the current time.
</para>
<para>set_approx_time uses the systems available on the build
machine to store an approximate indication of the time that the
root filesystem was created and write that time to a file in the
root filesystem itself. For most purposes, this is sufficient for
the purposes of setting up the root filesystem to the point where
a network connection can be created and a call can be made to an
internet clock using <command>ntpdate-debian</command>.
</para>
</refsect1>
<refsect1 id="set_cdebconf_default">
<title>set_cdebconf_default</title>
<para>Adds "export DEBCONF_USE_CDEBCONF=true" to
$TARGET/etc/profile for cdebconf support.
</para>
</refsect1>
<refsect1 id="symlink_rcS">
<title>symlink_rcS</title>
<para>Call repeatedly to create init symlinks, using the template
$TARGET/etc/rcS.d/S$number$file
</para>
<variablelist remap="TP">
<varlistentry>
<term>
<option>file</option>
</term>
<listitem>
<para>file is the filename in $TARGET/etc/init.d/
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>number</option>
</term>
<listitem>
<para>number is the number for the link in the init sequence.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="unpack_debootstrap">
<title>unpack_debootstrap</title>
<para>Specialized routine that replaces the normal second stage of
debootstrap (you may consider it a series of hacks if you prefer).
unpack uses dpkg to extract the files from the .deb package and
process the control information. Unlike <command>dpkg</command>
<option>--unpack</option>, the unpack routine does
<emphasis role="bold">NOT</emphasis> run any maintainer scripts which
would inevitably fail in a cross built environment.
Instead, it updates the relevant dpkg status and database files
in the root filesystem and leaves the package in the unpacked state.
</para>
<para>unpack_debootstrap also sets up the busybox applets - future
versions may split this functionality into a separate function.
</para>
<para>unpack_debootstrap also performs checks on /usr/sbin/invoke-rc.d
and /usr/sbin/update-rc.d - future versions may split this functionality
into a separate function.
</para>
<para>Finally, unpack_debootstrap removes all .deb package files
from /var/cache/apt/archives. The remaining task (dpkg --configure -a)
is performed via emsecondstage.</para>
</refsect1>
<refsect1 id="x_feign_install">
<title>x_feign_install</title>
<para>Copied from debootstrap suite scripts to make a basic
installation of a .deb package - although this is the basis of
unpack_debootstrap, it is only really used for dpkg itself.
</para>
</refsect1>
<refsect1>
<title>Author</title>
<para><emphasis>empbuilderlib</emphasis> 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>dpkg-cross</filename> (1), <emphasis>emdebian-tools</emphasis> (1).
</para>
</refsect1>
</refentry>
|