Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Let The Music Play: Join EFF Today

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 134 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




       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

        [--buildroot DIRECTORY] [--clean] [--nobuild]
        [--rmsource] [--rmspec] [--short-circuit] [--sign]
        [--target PLATFORM]


       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.  Packages come
       in two varieties: binary  packages,  used  to  encapsulate
       software  to be installed, and source packages, containing
       the source code and recipe  necessary  to  produce  binary

       One  of  the following basic modes must be selected: Build
       Package, Build Package from  Tarball,  Recompile  Package,
       Show Configuration.

       These options can be used in all the different modes.

       -?, --help
              Print a longer usage message then normal.

              Print  a  single line containing the version number
              of rpm being used.

              Print as little as possible - normally  only  error

       --pipe CMD
              Pipes the output of rpm to the command CMD.

       --dbpath DIRECTORY
              Use the  database  in  DIRECTORY  rathen  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.

       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 package 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) spec­
       ifies 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. Nor­
              mally  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 equivalent of a "make install".

       -bl    Do  a  "list check".  The "%files" section from the
              spec file is macro expanded, and checks are made to
              Do not execute any build stages. Useful for testing
              out spec files.

              Remove the sources after the  build  (may  also  be
              used    standalone,   e.g.   "rpmbuild   --rmsource

              Remove the spec file after the build (may  also  be
              used standalone, eg. "rpmbuild --rmspec foo.spec").

              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  signa­
              ture  can  be  used to verify the integrity and the
              origin of the package.  See the section on GPG SIG­
              NATURES in rpm(8) for configuration details.

       --target PLATFORM
              When  building  the  package, interpret PLATFORM as
              arch-vendor-os and set the macros %_target,  %_tar­
              get_cpu, and %_target_os accordingly.

       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  addi­
       tion,  --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 package
       are removed.

       The command

       rpmbuild --showrc

       shows the values rpmbuild will use for all of the  options
       are  currently  set  in  rpmrc  and  macros  configuration





       http://www.rpm.org/ <URL:http://www.rpm.org/>


       Marc Ewing <marc@redhat.com>
       Jeff Johnson <jbj@redhat.com>
       Erik Troan <ewt@redhat.com>

Red Hat, Inc.              09 June 2002               RPMBUILD(8)



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can choose larger fonts by selecting a different themes.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.11 Seconds