使い方: rpmbuild [オプション...]
--quiet
[
Usage: rpmbuild [OPTION...]
--quiet
Build options with [
RPMBUILD(8) RPMBUILD(8)
名前
rpmbuils - RPM パッケージのビルド
書式
パッケージのビルド:
rpmbuild {-ba|-bb|-bp|-bc|-bi|-bl|-bs} [rpmbuild-options] SPECFILE ...
rpmbuild {-ta|-tb|-tp|-tc|-ti|-tl|-ts} [rpmbuild-options] TARBALL ...
rpmbuild {--rebuild|--recompile} SOURCEPKG ...
その他:
rpmbuild --showrc
rpmbuild のオプション
[--buildroot DIRECTORY] [--clean] [--nobuild]
[--rmsource] [--rmspec] [--short-circuit] [--sign]
[--target PLATFORM]
説明
rpmbuild は、バイナリパッケージとソースパッケージの両方のビルド(作成)に
利用される。 パッケージはファイルのアーカイブと、アーカイブされたファイ
ルのインストール・アンインストールに使われるメタデータから構成される 。
メ タデータは補助スクリプト、ファイル属性、パッケージの説明に関する情報
からなる。 パッケージには 2 種類あり、インストールするためのソフトウ ェ
ア をカプセル化するのに使われるバイナリパッケージと、バイナリパッケージ
を作成するのに必要なレシピとソースコードからなるソースパッケージとが あ
る。
次 の基本モードからいずれか一つを選択しなければならない: パッケージのビ
ルド、tar アーカイブからのパッケージのビルド、 パッケージの再コンパイル
、設定の表示。
一般的なオプション
以下のオプションはすべてのモードで使用可能である。
-?, --help
使い方を通常よりも詳しく表示する。
--version
使用中の rpm のバージョン番号を 1 行で表示する。
--quiet
表示をできるだけ少なくする。通常は、エラーメッセージだけが表示さ
れる。
-v より多くの情報を表示する。通常は、ルーチンの進捗メッセージが表示
される。
-vv 沢山の汚いデバッグ情報を表示する。
--rcfile FILELIST
rpm は、コロン(‘:’)で区切られた FILELIST の各ファイルを設定情報
として読み込む。読み込みは FILELIST に指定された順番で行われる。
FILELIST の デ フォルトは /usr/lib/rpm/rpmrc:/usr/lib/rpm/red-
hat/rpmrc:~/.rpmrc である。
--pipe CMD
rpm コマンドの出力を CMD へパイプする。
--dbpath DIRECTORY
データベースのパスとして、デフォルトの /var/lib/rpm で は な く
DIRECTORY を使う。
--root DIRECTORY
す べての操作において、 DIRECTORY をルートとしたファイルシステム
を使う。つまり、 DIRECTORY 内にあるデータベースが依存性のチェ ッ
クに使用され、 DIRECTORY に chroot(2) した後で、すべてのスクリプ
ト (例えば、パッケージインストール時の %post や、パッケージビ ル
ド時の %prep など) が実行される。
ビルドオプション
rpm のビルド・コマンドの一般的な形式は以下の通りである:
rpmbuild -bSTAGE|-tSTAGE [ rpmbuild-options ] FILE ...
パッケージのビルドに spec ファイルを使用するのであれば -b を、 rpmbuild
が spec ファイルを使うために (圧縮されていることもある) tar ファイル の
内 部から使用する spec ファイルを探すのであれば -t を、それぞれ引数に指
定する。最初の引数の後ろにある、次の文字 (STAGE) はビルドとパッケージ化
の 段階を指定するのに使われ、以下のいずれかが指定される (訳注: 以下のも
のは spec ファイル、すなわち -b が指定された場合であり、 tar ファイルか
らビルドする場合は -ta, -tb, ... となる)。
-ba (%prep, %build, %install を実行した後に) バイナリパッケージとソ
ースパッケージをビルドする。
-bb (%prep, %build, %install を実行した後に) バイナリパッケージを ビ
ルドする。
-bp spec ファイルから "%prep" 段階を実行する。通常、ソースを展開しパ
ッチを適用することを意味する。
-bc (%prep を実行した後に) spec ファイルから "%build" 段階を実行する
。一般的には "make" と等価である。
-bi (%prep, %build を実行した後に) spec ファイルから "%install" 段階
を実行する。一般的には "make install" と等価である。
-bl "list check" を実行する。 spec ファイルの "%files" セクション の
マクロが展開され、各ファイルが存在するかの検証をするためのチェッ
クが行われる。
-bs ソースパッケージだけをビルドする。
さらに、以下のオプションが利用可能である:
--buildroot DIRECTORY
パッケージビルド時に BuildRoot タグを DIRECTORY ディレクトリに上
書きする。
--clean
パッケージが作成された後にビルドツリーを削除する。
--nobuild
何 のビルドも実行しない。spec ファイルの検査を行う場合に便利であ
る。
--rmsource
ビルド後にソースを削除する (単独で使用してもよい。例: "rpmbuild
--rmsource foo.spec")。
--rmspec
ビ ルド後に spec ファイルを削除する。 (単独で使用してもよい。例:
"rpmbuild --rmspec foo.spec")。
--short-circuit
指定された段階へ直接すすむ(すなわち、指定された段階までの全て の
段階が飛ばされる)。 -bc と -bi (訳注: -tc と -tiも) でのみ使用で
きる。
--sign パッケージに GPG 署名を埋め込む。この署名は、パッケージの出所 と
完 全 性 を 検証するのに用いることができる。設定の詳細については
rpm(8) の「GPG 署名」の節を参照のこと。
--target PLATFORM
パッケージビルド時に PLATFORM を arch-vendor-os と解釈し、それに
応じてマクロ %_target, %_target_arch, %_target_os を設定する。
ビルドと再コンパイルのオプション
rpm を使ってビルドするには、他にも 2 つのやり方がある。
rpmbuild --rebuild|--recompile SOURCEPKG ...
こ の方法で起動された場合、 rpmbuild は指定されたソースパッケージをイン
ストールし、準備、コンパイル、インストールを行う。さらに、 --rebuild の
場 合、新たなバイナリパッケージをビルドする。ビルドか完了したらビルドデ
ィレクトリは (--clean を指定した場合と同様に)削除され、パッケージのソー
スと spec ファイルも削除される。
SHOWRC
コマンド
rpmbuild --showrc
は rpmbuild が使う設定ファイル、 rpmrc と macros で現在セットされている
オプションすべての値を表示する。
ファイル
rpmrc の設定
/usr/lib/rpm/rpmrc
/usr/lib/rpm/redhat/rpmrc
/etc/rpmrc
~/.rpmrc
マクロの設定
/usr/lib/rpm/macros
/usr/lib/rpm/redhat/macros
/etc/rpm/macros
~/.rpmmacros
データベース
/var/lib/rpm/Basenames
/var/lib/rpm/Conflictname
/var/lib/rpm/Dirnames
/var/lib/rpm/Filemd5s
/var/lib/rpm/Group
/var/lib/rpm/Installtid
/var/lib/rpm/Name
/var/lib/rpm/Packages
/var/lib/rpm/Providename
/var/lib/rpm/Provideversion
/var/lib/rpm/Pubkeys
/var/lib/rpm/Removed
/var/lib/rpm/Requirename
/var/lib/rpm/Requireversion
/var/lib/rpm/Sha1header
/var/lib/rpm/Sigmd5
/var/lib/rpm/Triggername
一時ファイル
/var/tmp/rpm*
関連項目
popt(3), rpm2cpio(8), gendiff(1), rpm(8),
http://www.rpm.org/
著者
Marc Ewing
RPMBUILD(8) RPMBUILD(8)
NAME
rpmbuild - Build RPM Package(s)
SYNOPSIS
BUILDING PACKAGES:
rpmbuild {-ba|-bb|-bp|-bc|-bi|-bl|-bs} [rpmbuild-options] SPECFILE ...
rpmbuild {-ta|-tb|-tp|-tc|-ti|-tl|-ts} [rpmbuild-options] TARBALL ...
rpmbuild {--rebuild|--recompile} SOURCEPKG ...
MISCELLANEOUS:
rpmbuild --showrc
rpmbuild-options
[--buildroot DIRECTORY] [--clean] [--nobuild]
[--rmsource] [--rmspec] [--short-circuit] [--sign]
[--target PLATFORM]
DESCRIPTION
rpmbuild is used to build both binary and source software packages. A
package consists of an archive of files and meta-data used to install
and erase the archive files. The meta-data includes helper scripts,
file attributes, and descriptive information about the package. Pack-
ages come in two varieties: binary packages, used to encapsulate soft-
ware to be installed, and source packages, containing the source code
and recipe necessary to produce binary packages.
One of the following basic modes must be selected: Build Package, Build
Package from Tarball, Recompile Package, Show Configuration.
GENERAL OPTIONS
These options can be used in all the different modes.
-?, --help
Print a longer usage message then normal.
--version
Print a single line containing the version number of rpm being
used.
--quiet
Print as little as possible - normally only error messages will
be displayed.
-v Print verbose information - normally routine progress messages
will be displayed.
-vv Print lots of ugly debugging information.
--rcfile FILELIST
Each of the files in the colon separated FILELIST is read
sequentially by rpm for configuration information. Only the
first file in the list must exist, and tildes will be expanded
to the value of $HOME. The default FILELIST is
/usr/lib/rpm/rpmrc:/usr/lib/rpm/red-
hat/rpmrc:/etc/rpmrc:~/.rpmrc.
--pipe CMD
Pipes the output of rpm to the command CMD.
--dbpath DIRECTORY
Use the database in DIRECTORY rather than the default path
/var/lib/rpm
--root DIRECTORY
Use the file system tree rooted at DIRECTORY for all operations.
Note that this means the database within DIRECTORY will be used
for dependency checks and any scriptlet(s) (e.g. %post if
installing, or %prep if building, a package) will be run after a
chroot(2) to DIRECTORY.
BUILD OPTIONS
The general form of an rpm build command is
rpmbuild -bSTAGE|-tSTAGE [ rpmbuild-options
] FILE ...
The argument used is -b if a spec file is being used to build the pack-
age and -t if rpmbuild should look inside of a (possibly compressed)
tar file for the spec file to use. After the first argument, the next
character (STAGE) specifies the stages of building and packaging to be
done and is one of:
-ba Build binary and source packages (after doing the %prep, %build,
and %install stages).
-bb Build a binary package (after doing the %prep, %build, and
%install stages).
-bp Executes the "%prep" stage from the spec file. Normally this
involves unpacking the sources and applying any patches.
-bc Do the "%build" stage from the spec file (after doing the %prep
stage). This generally involves the equivalent of a "make".
-bi Do the "%install" stage from the spec file (after doing the
%prep and %build stages). This generally involves the equiva-
lent of a "make install".
-bl Do a "list check". The "%files" section from the spec file is
macro expanded, and checks are made to verify that each file
exists.
-bs Build just the source package.
The following options may also be used:
--buildroot DIRECTORY
When building a package, override the BuildRoot tag with direc-
tory DIRECTORY.
--clean
Remove the build tree after the packages are made.
--nobuild
Do not execute any build stages. Useful for testing out spec
files.
--nodeps
Do not verify build dependencies.
--rmsource
Remove the sources after the build (may also be used standalone,
e.g. "rpmbuild --rmsource foo.spec").
--rmspec
Remove the spec file after the build (may also be used stan-
dalone, eg. "rpmbuild --rmspec foo.spec").
--short-circuit
Skip straight to specified stage (i.e., skip all stages leading
up to the specified stage). Only valid with -bc and -bi.
--sign Embed a GPG signature in the package. This signature can be used
to verify the integrity and the origin of the package. See the
section on GPG SIGNATURES in rpm(8) for configuration details.
--target PLATFORM
When building the package, interpret PLATFORM as arch-vendor-os
and set the macros %_target, %_target_cpu, and %_target_os
accordingly.
REBUILD AND RECOMPILE OPTIONS
There are two other ways to invoke building with rpm:
rpmbuild --rebuild|--recompile SOURCEPKG ...
When invoked this way, rpmbuild installs the named source package, and
does a prep, compile and install. In addition, --rebuild builds a new
binary package. When the build has completed, the build directory is
removed (as in --clean) and the the sources and spec file for the pack-
age are removed.
SHOWRC
The command
rpmbuild --showrc
shows the values rpmbuild will use for all of the options are currently
set in rpmrc and macros configuration file(s).
FILES
rpmrc Configuration
/usr/lib/rpm/rpmrc
/usr/lib/rpm/redhat/rpmrc
/etc/rpmrc
~/.rpmrc
Macro Configuration
/usr/lib/rpm/macros
/usr/lib/rpm/redhat/macros
/etc/rpm/macros
~/.rpmmacros
Database
/var/lib/rpm/Basenames
/var/lib/rpm/Conflictname
/var/lib/rpm/Dirnames
/var/lib/rpm/Filemd5s
/var/lib/rpm/Group
/var/lib/rpm/Installtid
/var/lib/rpm/Name
/var/lib/rpm/Packages
/var/lib/rpm/Providename
/var/lib/rpm/Provideversion
/var/lib/rpm/Pubkeys
/var/lib/rpm/Removed
/var/lib/rpm/Requirename
/var/lib/rpm/Requireversion
/var/lib/rpm/Sha1header
/var/lib/rpm/Sigmd5
/var/lib/rpm/Triggername
Temporary
/var/tmp/rpm*
SEE ALSO
popt(3),
rpm2cpio(8),
gendiff(1),
rpm(8),
rpmbuild --help - as rpm supports customizing the options via popt
aliases it’s impossible to guarantee that what’s described in the man-
ual matches what’s available.
http://www.rpm.org/
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa