Rpmbuild command

From 탱이의 잡동사니
Jump to navigation Jump to search

Overview

rpmbuild command 내용 정리.

Options

-bb

Binary 패키지 파일들만 생성한다. <source lang=bash> $ rpmbuild -bb test.spec </source>

-D, --define

-D, --define='MACRO EXPR'

매크로를 정의한다. topdir 과 같이 내부적으로 이미 정의되어 있는 매크로 내용들을 cli 로 변경하고자 할 때 사용하면 좋다<ref>http://stackoverflow.com/questions/416983/why-is-topdir-set-to-its-default-value-when-rpmbuild-called-from-tcl</ref>.

<source lang=bash> $ rpmbuild --define '_topdir /tmp/rpmbuild' -ba build_test.spec </source>

--showrc

설정된 모든 rpmrc 와 매크로 내용을 나타낸다.

$ rpmbuild --showrc
ARCHITECTURE AND OS:
build arch            : x86_64
compatible build archs: x86_64 noarch
build os              : Linux
compatible build os's : Linux
install arch          : x86_64
install os            : Linux
compatible archs      : x86_64 amd64 athlon noarch i686 i586 i486 i386 fat
compatible os's       : Linux

RPMRC VALUES:
optflags              : -O2 -g

Features supported by rpmlib:
    rpmlib(BuiltinLuaScripts) = 4.2.2-1
    rpmlib(CompressedFileNames) = 3.0.4-1
    rpmlib(ConcurrentAccess) = 4.1-1
...
-14: _texmf_vendor	/usr/share/texmf
-14: _tmppath	%{_var}/tmp
-14: _topdir	%{getenv:HOME}/rpmbuild
-14: _transaction_color	3
...

Appendix

The rpmrc Files

rpmrc 파일은 RPM 에서 사용되는 옵션 파일이다. rpmbuild 시 적용되는 모든 기본 매크로, 변수들이 이 파일들에 설정된다.

Reference

<references />