Scroll to navigation

LIVE-BUILD(7) Live システムプロジェクト LIVE-BUILD(7)

名前

live-build - Live システムツール集

概要

lb コマンド [-h|--help] [-u|--usage] [-v|--version] [--breakpoints] [--conffile] [--debug] [--force] [--quiet] [--verbose]

説明

live-build は Live システムのイメージをビルドするためのスクリプト集です。live-build の背景となる考え方は、設定ディレクトリを使って Live イメージのビルドに関するあらゆる面を完全に自動化、独自化するツール集ということです。

コマンドは live-build コマンドの名前です (以下参照)。

More documentation about how to use live-build is available in the individual manpages for each helper and in the manual at <https://debian-live.alioth.debian.org/manual/>.

オプション

live-build 共有オプション

以下のコマンドラインオプションは全 live-build プログラムでサポートされています。
-h, --help
ヘルプを表示して終了します。
-u, --usage
使用方法を表示して終了します。
-v, --version
バージョン情報を表示して終了します。

live-build 共通オプション

以下のコマンドラインオプションはほとんどの live-build プログラムでサポートされています。各オプションの完全な説明については各プログラムの man ページを見てください。
--breakpoints
ブレークポイントをたどります。
--conffile
独自の設定ファイルを使います。
--debug
デバッグ情報を表示します。
--force
段階ファイルが存在する場合でも強制的にヘルパーを実行します。
--quiet
出力するメッセージを少なくします。
--verbose
出力するメッセージを多くします。

LIVE-BUILD コマンド

live-build は高レベル (「porcelain」) コマンドと低レベル (「plumbing」) コマンドに分割されています。

利用可能な全 live-build コマンドの一覧です。詳しくはそれぞれの man ページを見てください。

高レベルコマンド (PORCELAIN)

高レベルコマンドは主要コマンドといくらかの副次的なユーザ向けユーティリティに分けられています。

主要コマンド

lb config(1)
creates configuration for live-build
lb bootstrap(1)
executes the first build stage, creating (bootstraping) a basic Debian root filesystem
lb chroot(1)
executes the second build stage, building the live OS filesystem
lb installer(1)
executes the third build stage, obtaining installer components (optional)
lb binary(1)
executes the fourth build stage, generating a binary image
lb source(1)
executes the fifth build stage, generating a source image (optional)
lb clean(1)
cleans up system build directories

副次的なコマンド

lb(1)
generic live-build script execution wrapper
lb build(1)
alias for all build stages

LOW-LEVEL COMMANDS (PLUMBING) - BUILD STAGE COMPONENTS

live-build の実際の作業は低レベルコマンドにより実装されています。低レベルコマンドはエンドユーザが直接実行することは想定していません。高レベルの主要コマンドに操作させることにより、様々な低レベルコマンドを必ず正しい順で実行するようにしています。しかし、live-build コマンドを自分のスクリプトで再利用したい場合はこの低レベルコマンドが対象となるかもしれません。

この低レベルコマンドへのインターフェイス (オプション群やセマンティクス) は高レベルの主要コマンドよりもはるかに安定していることが求められることに注意してください。それに対して高レベルの主要コマンドへのインターフェイスは、エンドユーザの使い勝手改善のために変更される対象となります。

Bootstrap stage specific commands

lb bootstrap_archives(1)
applies apt archive configuration
lb bootstrap_cache(1)
in save mode, saves to cache a copy of the generated bootstrap directory, and in restore mode, restores from cache a previously generated copy
lb bootstrap_debootstrap(1)
creates (bootstrap) a basic Debian root filesystem using debootstrap(8)

Chroot stage specific commands

Note: The following chroot_ prefixed commands are used in building the live OS filesystem. Another set of similarly prefixed files are listed separately (see further down).
lb chroot_cache(1)
in save mode, saves to cache a copy of the chroot directory, and in restore mode, restores from cache a previously generated copy
lb chroot_firmware(1)
compiles a list of firmware packages to be installed in the live OS root filesystem
lb chroot_hacks(1)
executes local hacks against the live OS root filesystem, if any are provided
lb chroot_hooks(1)
executes local hooks against the live OS root filesystem, if any are provided
lb chroot_includes(1)
copies a set of local files from the config directory into the live OS root filesystem, if any are provided
lb chroot_install-packages(1)
installs into the live OS root filesystem any packages listed in local package lists
lb chroot_interactive(1)
pauses the build process and starts an interactive shell from the live OS root filesystem, providing an oportunity for manual modifications or testing; note that this is (currently) usually executed with several chroot prep modifications applied (see description of these further down)
lb chroot_linux-image(1)
compiles a list of kernel images to be installed in the live OS root filesystem
lb chroot_live-packages(1)
installs a set of live system specific packages to the live OS root filesystem
lb chroot_package-lists(1)
compiles a list of packages provided in the user´ local config to be installed in the live OS root filesystem
lb chroot_preseed(1)
installs pre-configured answers to certain install prompts into the live OS root filesystem

Installer stage specific commands

lb installer_debian-installer(1)
obtains and sets up Debian installer(d-i) components
lb installer_preseed(1)
installs pre-configured answers to certain install prompts

Binary stage specific commands

lb binary_checksums(1)
creates checksums (md5, sha1, and/or sha256) for live image content
lb binary_chroot(1)
duplicates the chroot directory, to place a copy of what whould be the completed live OS root filesystem to one side, allowing the original to continue to be used in executing certain parts of the remainder of the build process
lb binary_disk(1)
creates disk information files to be added to live image
lb binary_grub(1)
installs grub into live image to provide image boot capability
lb binary_grub2(1)
installs grub2 into live image to provide image boot capability
lb binary_hdd(1)
compiles the final live image into an hdd image file
lb binary_hooks(1)
executes local hooks against the live image, if any are provided
lb binary_includes(1)
copies a set of local files from the config directory into the live image, if any are provided
lb binary_iso(1)
compiles the final live image into an iso file
lb binary_linux-image(1)
copies the linux-image into the live image
lb binary_loadlin(1)
bundles a copy of loadlin into the live image
lb binary_manifest(1)
creates manifest of packages installed into live OS filesystem, and list of packages to be excluded by a persistence mechanism installing the live OS to disk
lb binary_memtest(1)
bundles a copy of memtest into the live image
lb binary_netboot(1)
compiles the final live image into a netboot tar archive
lb binary_package-lists(1)
processes local lists of packages to obtain and bundle into image (from which they could later be installed if not already)
lb binary_rootfs(1)
wraps up the completed live OS root filesystem into a virtual file system image
lb binary_syslinux(1)
installs syslinux into live image to provide image boot capability
lb binary_tar(1)
compiles the final live image into a tar archive
lb binary_win32-loader(1)
bundles a copy of win32-loader into the live image and creates an autorun.inf file
lb binary_zsync(1)
builds zsync control files

Source stage specific commands

lb source_checksums(1)
creates checksums (md5, sha1, and/or sha256) for source image content
lb source_debian(1)
downloads source packages for bundling into source image
lb source_disk(1)
creates disk information files to be added to source image
lb source_hdd(1)
compiles the final source image into an hdd image file
lb source_hooks(1)
executes local hooks against the source image, if any are provided
lb source_iso(1)
compiles the final source image into an iso file
lb source_live(1)
copies live-build config into source
lb source_tar(1)
compiles the final source image into a tar archive

LOW-LEVEL COMMANDS (PLUMBING) - CHROOT PREP COMPONENTS

The notes above under the section regarding build-stage specific low-level plumbing commands also apply here.

The following chroot_ prefixed commands are used throughout the various primary stages of the build process to apply and remove modifications to a chroot root filesystem. Generally these are used to apply modification that setup the chroot for use (execution of programs within it) during the build process, and later to remove those modification, unmounting things that were mounted, and making the chroot suitable for use as the root filesystem of the live OS to be bundled into the live image.

lb chroot_apt(1)
manages apt configuration; in apply mode it applies configuration for use during build process, and in remove mode removes that configuration
lb chroot_archives(1)
manages apt archive source lists; in apply mode it applies source list configurations suitable for use of the chroot in the build process, and in remove mode replaces that with a configuration suitable for the final live OS
lb chroot_debianchroot(1)
manages a /etc/debian_chroot file
lb chroot_devpts(1)
manages mounting of /dev/pts
lb chroot_dpkg(1)
manages dpkg; in apply mode disabling things like the start-stop-daemon, and in remove mode enabling them again
lb chroot_hostname(1)
manages the hostname configuration
lb chroot_hosts(1)
manages the /etc/hosts file
lb chroot_proc(1)
manages mounting of /proc
lb chroot_resolv(1)
manages configuration of the /etc/resolv.conf file
lb chroot_selinuxfs(1)
manages mounting of /sys/fs/selinux
lb chroot_sysfs(1)
manages mounting of /sys
lb chroot_sysv-rc(1)
manages the /usr/sbin/policy-rc.d file
lb chroot_tmpfs(1)
manages configuration of dpkg to use a tmpfs filesystem
lb chroot_upstart(1)
manages use of upstart /sbin/initctl program; in apply mode blocking execution through a dpkg diversion, and in remove mode enabling execution again

設定ファイル

例えば lb_bootstrap_debootstrap は利用するオプションを読み取るのに config/bootstrap 及び config/bootstrap_debootstrap という名のファイルを使います。利用するファイルの名前やフォーマットの詳細については個々のコマンドの man ページを見てください。こういったファイルには一般的に、変数とそれに指定する値を1行に1件ずつ収録します。live-build の一部のプログラムでは組にした値や、変数の指定にわずかに複雑な方法を採っているものがあります。

For example, lb bootstrap_debootstrap uses files named config/bootstrap and config/bootstrap_debootstrap to read the options it will use. See the man pages of individual commands for details about the names and formats of the files they use. Generally, these files contain variables with values assigned, one variable per line. Some programs in live-build use pairs of values or slightly more complicated variable assignments.

live-build は実行中のシェルに存在する環境変数を尊重することに注意してください。変数が設定ファイルから読み取れる場合にはそれが環境変数より優先され、コマンドラインオプションで指定された場合にはそれが設定ファイルの値より優先されます。ある変数が見つからない、つまり値がセットされていない場合は live-build が自動的にデフォルト値をセットします。

一部のまれな状況で、そういったファイルにアーキテクチャやディストリビューションにより異なるものを使いたいことがあるかもしれません。「config/段階.アーキテクチャ」または「config/段階_補助.アーキテクチャ」、それと「config/段階.ディストリビューション」または「config/段階_補助.ディストリビューション」(「アーキテクチャ」には「dpkg --print-architecture」の出力と同じもの、「ディストリビューション」には対象ディストリビューションのコード名と同じものが入ります) という名のファイルが存在する場合には他のそれよりも一般的な名前のファイルに優先してそのファイルが利用されます。

設定ファイルは全て、live-build プログラムにより作成されたシェルスクリプトです。それはつまり、通常のシェル構文に従う必要があるということです。また、設定ファイルにはコメントを残しておくこともできます。「#」で始まる行は無視されます。

ファイル

/etc/live/build.conf
/etc/live/build/*

関連項目

live-boot(7)

live-config(7)

このプログラムは live-build の一部です。

ホームページ

More information about live-build and the Live Systems project can be found on the homepage at <https://debian-live.alioth.debian.org/>.

バグ

バグは <http://bugs.debian.org/> にあるバグ追跡システムに live-build パッケージのバグ報告として提出するか、<debian-live@lists.debian.org> にある Live システムのメーリングリスト宛てにメールを書くことにより報告できます。

作者

live-build は Daniel Baumann さん <mail@daniel-baumann.ch> により書かれました。
2019-03-11 1:20190311