rpm 4.19.92
The RPM Package Manager
Loading...
Searching...
No Matches
Files | Data Structures | Typedefs | Enumerations | Functions

API for building packages. More...

Collaboration diagram for Build API.:

Files

file  rpmbuild.h
 
file  rpmcli.h
 
file  rpmfc.h
 
file  rpmspec.h
 

Data Structures

struct  rpmBuildArguments_s
 

Typedefs

typedef struct rpmBuildArguments_sBTA_t
 
typedef struct Package_s * rpmSpecPkg
 

Enumerations

enum  rpmBuildFlags_e {
  RPMBUILD_NONE = 0 , RPMBUILD_PREP = (1 << 0) , RPMBUILD_BUILD = (1 << 1) , RPMBUILD_INSTALL = (1 << 2) ,
  RPMBUILD_CHECK = (1 << 3) , RPMBUILD_CLEAN = (1 << 4) , RPMBUILD_FILECHECK = (1 << 5) , RPMBUILD_PACKAGESOURCE = (1 << 6) ,
  RPMBUILD_PACKAGEBINARY = (1 << 7) , RPMBUILD_RMSOURCE = (1 << 8) , RPMBUILD_RMBUILD = (1 << 9) , RPMBUILD_STRINGBUF = (1 << 10) ,
  RPMBUILD_RMSPEC = (1 << 11) , RPMBUILD_FILE_FILE = (1 << 16) , RPMBUILD_FILE_LIST = (1 << 17) , RPMBUILD_POLICY = (1 << 18) ,
  RPMBUILD_CHECKBUILDREQUIRES = (1 << 19) , RPMBUILD_BUILDREQUIRES = (1 << 20) , RPMBUILD_DUMPBUILDREQUIRES = (1 << 21) , RPMBUILD_CONF = (1 << 22) ,
  RPMBUILD_MKBUILDDIR = (1 << 23) , RPMBUILD_NOBUILD = (1 << 31)
}
 
enum  rpmBuildPkgFlags_e { RPMBUILD_PKG_NONE = 0 , RPMBUILD_PKG_NODIRTOKENS = (1 << 0) }
 

Functions

rpmSpec rpmSpecParse (const char *specFile, rpmSpecFlags flags, const char *buildRoot)
 
Header rpmSpecSourceHeader (rpmSpec spec)
 
rpmps rpmSpecCheckDeps (rpmts ts, rpmSpec spec)
 
rpmds rpmSpecDS (rpmSpec spec, rpmTagVal tag)
 
int rpmSpecBuild (rpmts ts, rpmSpec spec, BTA_t buildArgs)
 
rpmSpec rpmSpecFree (rpmSpec spec)
 
int rpmspecQuery (rpmts ts, QVA_t qva, const char *arg)
 

Detailed Description

API for building packages.

Enumeration Type Documentation

◆ rpmBuildFlags_e

Bit(s) to control rpmSpecBuild() operation. Also used as argument to rpmSpecGetSection and rpmSpecPkgGetSection.

Enumerator
RPMBUILD_PREP 

Execute %prep.

RPMBUILD_BUILD 

Execute %build.

RPMBUILD_INSTALL 

Execute %install.

RPMBUILD_CHECK 

Execute %check.

RPMBUILD_CLEAN 

Execute %clean.

RPMBUILD_FILECHECK 

Check %files manifest.

RPMBUILD_PACKAGESOURCE 

Create source package.

RPMBUILD_PACKAGEBINARY 

Create binary package(s).

RPMBUILD_RMSOURCE 

Remove source(s) and patch(s).

RPMBUILD_RMBUILD 

Remove build sub-tree.

RPMBUILD_STRINGBUF 

Internal use only

RPMBUILD_RMSPEC 

Remove spec file.

RPMBUILD_FILE_FILE 

rpmSpecPkgGetSection: files -f

RPMBUILD_FILE_LIST 

rpmSpecPkgGetSection: files

RPMBUILD_POLICY 

rpmSpecPkgGetSection: policy

RPMBUILD_CHECKBUILDREQUIRES 

Check %buildrequires.

RPMBUILD_BUILDREQUIRES 

Execute %buildrequires.

RPMBUILD_DUMPBUILDREQUIRES 

Write buildrequires.nosrc.rpm.

RPMBUILD_CONF 

Execute %conf.

RPMBUILD_MKBUILDDIR 

Internal use only

RPMBUILD_NOBUILD 

Don't execute or package.

◆ rpmBuildPkgFlags_e

Bit(s) to control package generation

Enumerator
RPMBUILD_PKG_NODIRTOKENS 

Legacy filename layout

Function Documentation

◆ rpmSpecBuild()

int rpmSpecBuild ( rpmts  ts,
rpmSpec  spec,
BTA_t  buildArgs 
)

Spec build stages state machine driver.

Parameters
tsrpm transaction set
specspec file control structure
buildArgsbuild arguments
Returns
0 on success, 1 on build error, RPMRC_MISSINGBUILDREQUIRES on missing build requirements

◆ rpmSpecCheckDeps()

rpmps rpmSpecCheckDeps ( rpmts  ts,
rpmSpec  spec 
)

Verify build depencies of a spec against.

Parameters
ts(empty) transaction set
specparsed spec control structure
Returns
rpm problem set or NULL on no problems

◆ rpmSpecDS()

rpmds rpmSpecDS ( rpmSpec  spec,
rpmTagVal  tag 
)

Retrieve build dependency set from spec.

Parameters
specparsed spec control structure
tagdependency tag
Returns
dependency set of tag (or NULL)

◆ rpmSpecFree()

rpmSpec rpmSpecFree ( rpmSpec  spec)

Destroy Spec structure.

Parameters
specspec file control structure
Returns
NULL always

◆ rpmSpecParse()

rpmSpec rpmSpecParse ( const char *  specFile,
rpmSpecFlags  flags,
const char *  buildRoot 
)

Parse spec file into spec control structure.

Todo:
Eliminate buildRoot from here, its a build, not spec property
Parameters
specFilepath to spec file
flagsflags to control operation
buildRootbuildRoot override or NULL for default
Returns
new spec control structure

◆ rpmspecQuery()

int rpmspecQuery ( rpmts  ts,
QVA_t  qva,
const char *  arg 
)

Function to query spec file(s).

Parameters
tstransaction set
qvaparsed query/verify options
argquery argument
Returns
0 on success, else no. of failures

◆ rpmSpecSourceHeader()

Header rpmSpecSourceHeader ( rpmSpec  spec)

Return the headers of the SRPM that would be built from the spec file

Parameters
specpath to spec file
Returns
Header