Provided by:
multistrap_2.1.6ubuntu3_all 
Nome
multistrap - multiple repository bootstraps
Sinopse
multistrap [-a ARQUITECTURA] [-d DIRECTORIO] -f FICHEIRO_CONFIGURACAO
multistrap [--simulate] -f FICHEIRO_CONFIGURACAO
multistrap -?|-h|--help|--version
Op,c~oes
-?|-h|--help|--version - output the help text and exit successfully.
--dry-run - recolhe todas as definicoes de configuracao e gera um
sumario a descoberto.
--simulate - o mesmo que --dry-run
(As seguintes opcoes tambem podem ser definidas no ficheiro de
configuracao.)
-a|--arch - architecture of the packages to put into the multistrap.
-d|--dir - directory into which the bootstrap will be installed.
-f|--file - configuration file for multistrap [required]
--tidy-up - remove dados da cache do apt, ficheiros de pacotes
descarregados e a cache de pacotes do apt. O mesmo que cleanup=true.
--no-auth - permite o uso de repositorios nao autenticados. O mesmo que
noauth=true
--source-dir DIR - move the contents of var/cache/apt/archives/ from
inside the chroot to the specified external directory, then add the
Debian source packages for each used binary. Same as retainsources=DIR
If the specified directory does not exist, nothing is done. Requires
--tidy-up in order to calculate the full list of source packages,
including dependencies.
Descri,c~ao
multistrap provides a debootstrap-like method based on apt and extended
to provide support for multiple repositories, using a configuration
file to specify the relevant suites, architecture, extra packages and
the mirror to use for each bootstrap.
O objectivo e criar um sistema de ficheiros bootstrap / raiz completo
com todos os pacotes instalados e configurados, em vez de apenas o
sistema base.
Exemplo de configuracao:
[General]
arch=armel
directory=/opt/multistrap/
# same as --tidy-up option if set to true
cleanup=true
# same as --no-auth option if set to true
# keyring packages listed in each bootstrap will
# still be installed.
noauth=false
# extract all downloaded archives (default is true)
unpack=true
# whether to add the /suite to be explicit about where apt
# needs to look for packages. Default is false.
explicitsuite=false
# aptsources is a list of sections to be used
# the /etc/apt/sources.list.d/multistrap.sources.list
# of the target. Order is not important
aptsources=Debian
# the bootstrap option determines which repository
# is used to calculate the list of Priority: required packages
# and which packages go into the rootfs.
# The order of sections is not important.
bootstrap=Debian
[Debian]
packages=
source=http://ftp.pt.debian.org/debian
keyring=debian-archive-keyring
suite=lenny
This will result in a completely normal debootstrap of Debian lenny
from the specified mirror, for armel in '/opt/multistrap/'. (This
configuration is retained in the package as
/usr/share/multistrap/lenny.conf)
Specify a package to extend the multistrap to include that package and
all dependencies of that package.
Specify more repositories for the bootstrap by adding new sections.
Section names need to be listed in the bootstrap general option for the
packages to be included in the bootstrap.
Specify which repositories will be available to the final system at
boot by listing the section names in the aptsources general option,
e.g. to exclude some internal sources or when using a local mirror when
building the rootfs.
Os nomes das seccoes sao insensiveis a maiusculas/minusculas.
All dependencies are resolved only by apt, using all bootstrap
repositories, to use only the most recent and most suitable
dependencies. Note that multistrap turns off Install-Recommends so if
the multistrap needs a package that is only a Recommended dependency,
the recommended package needs to be specified in the packages line
explicitly. See "Explicit suite specification" for more information on
getting specific packages from specific suites.
'Architecture' and 'directory' can be overridden on the command line.
Some other general options also have command line options.
Repositories
"aptsources" lista as seccoes que devem ser usadas para criar as
/etc/apt/sources.list.d/multistrap.list sources do apt no sistema
final. Nem todas as "aptsources" tem de aparecer na seccao "bootstrap"
se voce tiver algumas sources internas ou locais que nao estao
acessiveis ao sistema de ficheiros raiz instalado.
"bootstrap" lista as seccoes que serao usadas para criar o proprio
multistrap. Apenas os pacotes listados em "bootstrap" serao
descarregados e desempacotados pelo multistrap.
Certifica que "bootstrap" lista todas as seccoes que precisa para o apt
ser capaz de encontrar todos os pacotes a serem desempacotados para o
multistrap.
(Older versions of multistrap supported the same option under the
"debootstrap" name - this spelling is still supported but new
configuration files should be "bootstrap" instead.
Defini,c~oes gerais:
'arch' can be overridden on the command line using the "--arch" option.
'directory' specifies the top level directory where the bootstrap will
be created - it is not packed into a .tgz once complete.
'bootstrap' lists the Sections which will be used to specify the
packages which will be downloaded (and optionally unpacked) into the
bootstrap.
'aptsources' lists the Sections which will be used to specify the apt
sources in the final system, e.g. if you need to use a local repository
to generate the rootfs which will not be available to the device at
runtime, list that section in "bootstrap" but not in "aptsources".
If you want a package to be in the rootfs, it must be specified in the
"bootstrap" list under General.
The order of section names in either list is not important.
As with debootstrap, multistrap will continue after errors, as long as
the configuration file can be correctly parsed.
O multistrap tambem implementa o suporte a machine:variant usado
originalmente em Emdebian Crush, apesar de ser uma implementacao
diferente. Usando o suporte de configuracao em cascata, podem ser
suportadas combinacoes particulares de machine:variant atraves de
alteracoes simples na linha de comandos.
Definir "tarballname" para verdadeiro tambem empacota o sistema de
ficheiros final num tarball.
Note that multistrap ignores any unrecognised options in the config
file - this allows for backwards-compatible behaviour as well as
overloading the multistrap config files to support other tools (like
pbuilder). Use the "--simulate" option to see the combined
configuration settings.
Section settings
[Debian]
packages=
source=http://ftp.pt.debian.org/debian
keyring=debian-archive-keyring
suite=lenny
The section name (in [] brackets) needs to be unique for this
configuration file and any configuration files which this file
includes. Section names are case insensitive (all comparisons happen
after conversion to lower case).
'packages' is the list of packages to be added when this Section is
listed in "bootstrap".
'source' is the apt source to use for this Section. (To use a local
source on the same machine, ensure you use "copy://" not "file://", so
that apt is told to copy the packages into the rootfs instead of
assuming it can try to download them later - because that "later" will
never actually happen.
'keyring' lists the package which contains the key used by the source
listed in this Section. If no keyring is specified, the "noauth" option
must be set to true. See Secure Apt.
'suite' is the suite to use from this source. Note that this must be
the suite, not the codename.
Suites change from time to time: (oldstable, stable, testing, sid) The
codename (etch, lenny, squeeze, sid) does not change.
Seguran,ca do Apt
To use authenticated apt repositories, multistrap either needs to be
able to install an appropriate keyring package from the existing apt
sources outside the multistrap environment or have the relevant keys
already configured using apt-key on the host system.
Se existirem pacotes relevantes, especifique-os na opcao 'keyring' para
cada repositorio. O multistrap ira entao verificar se o apt ja instalou
este pacote para que o repositorio possa ser autenticado antes que
quaisquer pacotes sejam descarregados dele.
Note that all repositories to be used with multistrap must be
authenticated or apt will fail. Similarly, secure apt can only be
disabled for all repositories (by using the --no-auth command line
option or setting the general noauth option in the configuration file),
even if only one repository does not have a suitable keyring available.
Not all packages need keyring packages, if you configure apt-key
appropriately.
O(s) pacote(s) chaveiro (keyring) serao tambem instalados dentro do
ambiente multistrap para coincidir com as fontes apt instaladas para o
multistrap.
Todas as configuracoes do apt-key precisam ser feitas para a maquina
correndo o proprio multistrap.
Estado
O multistrap nao tem estado - se o directorio existir, ira simplesmente
prosseguir como normalmente e o apt ira tentar prosseguir de onde
ficou.
Root Filesystem Configuration
o multistrap desempacota os pacotes descarregados mas nao serao
tentados outros estagios da configuracao do sistema. Os exemplos
incluem:
/etc/inittab
/etc/fstab
/etc/hosts
/etc/securetty
/etc/modules
/etc/hostname
/etc/network/interfaces
/etc/init.d
/etc/dhcp3
Any device-specific device nodes will also need to be created using
MAKEDEV or "device-table.pl" - a helper script that can work around
some of the issues with MAKEDEV. device-table.pl requires a device
table file along the lines of the one in the mtd-utils source package.
See /usr/share/doc/multistrap/examples/device_table.txt
Apos o multistrap ter criado com sucesso a disposicao basica de
ficheiros e oesquema de directorios, sao necessarios outros scripts
especificos do dispositivo antes que o sistema de ficheiros possa ser
empacotado e instalado no dispositivo de destino.
Apos instalados, os proprios pacotes precisam de ser configurados
usando os scripts do responsavel do pacote e "dpkg --configure -a", a
menos que isto seja um multistrap nativo.
Para que o "dpkg" funcione, /proc e /sysfs precisam de estar montados
(ou serem montaveis), tambem e recomendado /dev/pts.
Veja tambem: http://wiki.debian.org/Multistrap
Ambiente
Para configurar os pacotes desempacotados (seja em modo nativo ou
cruzado), sao necessarias certas variaveis de ambiente:
O debconf precisa que lho digam para aceitar que a interaccao com o
utilizador nao e desejada:
DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true
O Perl precisa que lho digam para aceitar que nao ha locales
disponiveis dentro da chroot e nao se queixar:
LC_ALL=C LANGUAGE=C LANG=C
Depois, o dpkg pode configurar os pacotes.
metodo de chroot (PATH = directorio de topo da chroot):
DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
LC_ALL=C LANGUAGE=C LANG=C chroot /PATH/ dpkg --configure -a
numa shell de login:
# export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true
# export LC_ALL=C LANGUAGE=C LANG=C
# dpkg --configure -a
(Como em cima, o dpkg precisa de /proc e /sysfs montados primeiro.)
Modo nativo - multistrap
o multistrap nao foi destinado a suporte nativo, foi desenvolvido para
suporte a compilacao de outras arquitecturas. De modo a se usar
multiplos repositorios, o multistrap apenas desempacota os pacotes
seleccionados pelo apt.
Em modo nativo, e provavel serem necessarias varias operacoes post-
multistrap que o debootstrap faria por si:
1. copiar /etc/hosts para a chroot
2. limpar o ambiente para apagar as variaveis LANGUAGE, LC_ALL e LANG
para silenciar avisos sem sentido do perl que escondem outros erros
(Uma alternativa a apagar as variaveis de localizacao e adicionar
locales ao seu ficheiro de configuracao multistrap na opcao
'packages').
Um multistrap nativo pode ser usado directamente com a chroot, de modo
a que "multistrap" corra "dpkg --configure -a" no final do processo
multistrap.
Configura,c~ao em cascata
Para suportar multiplas variantes duma configuracao basica (comum),
"multistrap" permite ficheiros de configuracao para incluir outros
ficheiros de configuracao (mais gerais). Isto e, o ficheiro de
configuracao mais detalhado / especifico e especificado na linha de
comandos e esse ficheiro inclui outro ficheiro que e partilhado por
outras configuracoes.
Ficheiro base:
/usr/share/multistrap/crosschroot.conf
Variacoes:
/usr/share/multistrap/armel.conf
Especificar apenas o ficheiro armel.conf ira obter o resto das
definicoes de crosschroot.conf para que as alteracoes comuns so
precisem ser feitas num unico ficheiro.
E fortemente recomendado que quaisquer modificacoes nos ficheiros de
configuracao envolvidas em qualquer cascata particular sejam testadas
usando a opcao "--simulate" do multistrap o que ira gerar um sumario
das opcoes que foram definidas apos a cascata estar completa. Note que
o multistrap n~ao o avisa se um ficheiro de configuracao conter uma
opcao nao reconhecida (para compatibilidade futura com configuracoes
backport), portanto um simples erro de escrita pode resultar numa opcao
nao definida.
Suporte a Machine:variant
As variaveis packages-conf antigas de emsandbox podem ser convertidas
em variaveis de configuracao "multistrap". O suporte a machine:variant
em "multistrap" concentra-se nos scripts config.sh e setup.sh
Once "multistrap" has unpacked the downloaded packages, the "setup.sh"
can be called, passing the location and architecture of the root
filesystem, so that other fine tuning can take place. At this stage,
any operations inside the rootfs must not try to execute any binaries
within the rootfs. As the final stage of the multistrap process,
"config.sh" is copied into the root directory of the rootfs.
Uma vantagem de usar suporte a machine:variant e que o sistema de
ficheiros raiz completo pode ser gerido por uma unica chamada ao
multistrap - isto e util quando se constroi sistemas de ficheiros raiz
no espaco do utilizador.
Para activar suporte a machine:variant, especifique o caminho para os
scripts a serem chamados no ficheiro de configuracao de variantes
(seccao General):
[General]
include=/path/to/general.conf
setupscript=/path/to/setup.sh
configscript=/path/to/config.sh
Restringindo a selec,c~ao de pacotes
"multistrap" inclui os pacotes necessarios (Required) por predefinicao,
a lista actual de pacotes pode ser vista usando:
grep-available -FPriority 'required' -sPackage
Se a opcao OmitRequired for definida para true, estes pacotes nao serao
adicionados - embora util, esta opcao pode levar facilmente a um rootfs
inutil. Apenas os pacotes especificados manualmente nos ficheiros de
configuracao serao usados nos calculos - as dependencias desses pacotes
serao adicionadas mas mais nenhuns.
Packages with Priority: important or standard are never included by
"multistrap" unless specifically included in a "packages=" option in a
section specified in the "bootstrap" general option.
Recommends behaviour
The Debian default behaviour after the Lenny release was to consider
recommended packages as extra packages to be installed when any one
package is selected. Recommended packages are those which the
maintainer considers that would be present on "most" installations of
that package and allowing Recommends means allowing Recommends of
recommended packages and so on.
The multistrap default is to turn recommends OFF.
Set the allowrecommends option to true in the General section to use
typical Debian behaviour.
Explicit suite specification
Sometimes, apt needs to be told to get a particular package from a
particular suite, ignoring a more recent version in another suite in
the same set of sources.
"multistrap" can operate with and without the explicit suite option,
the default is to let apt use the most recent version from the
collection of specified bootstrap sources.
Explicit suite specification has no effect on the final installed
system - if your aptsources includes a repository which in turn
includes a newer version of the package(s) specified explicitly, the
next "apt-get upgrade" on the device will bring in the newer version.
Also, when specifying packages to get from a specific suite, apt will
also try and ensure that the dependencies for that package are also
from the same suite and this can cause apt to be unable to resolve the
complete set of dependencies. In this situation, being explicit about
one package selection may require being explicit about some (not
necessarily all) of the dependencies of that package as well.
When using this support in Lenny, ensure that each section uses the
suite (oldstable, stable, testing, sid) and not the codename (etch,
lenny, squeeze, sid) in the "suite" configuration item as the version
of apt in Lenny and previous cannot use the codename.
To test, on Lenny, try:
$ sudo apt-get install apt/stable
Compare with
$ sudo apt-get install apt/lenny
Omitting deb-src listings
Some multistrap environments do not need access to the Debian sources
of packages being installed, typically this is required when preparing
a build (or cross-build) chroot using multistrap.
To turn off this additional source (and save both download time and
apt-cache size), use the omitdebsrc field in each Section.
[Baked]
packages=
source=http://www.emdebian.org/baked
keyring=emdebian-archive-keyring
suite=testing
omitdebsrc=true
fakeroot
Foreign architecture bootstraps can operate under "fakeroot"
("multistrap" is designed to do as much as it can within a single call
to make this easier) but the configuration stage which normally happens
with a native architecture bootstrap requires "chroot" and "chroot"
itself will not operate under "fakeroot".
Therefore, if "multistrap" detects that "fakeroot" is in use, native
mode configuration is skipped with a reminder warning.
The same problem applies to "apt-get install" and therefore the
installation of the keyring package on the host system is also skipped
if fakeroot is detected.