rpm 4.10.0

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

Data Structures | Files | Typedefs | Enumerations | Functions
Build API.
Collaboration diagram for Build API.:

## Data Structures
struct | rpmBuildArguments_s
| Describe build request. More...
## Files
file | rpmcli.h
file | rpmbuild.h
| This is the *only* module users of librpmbuild should need to include.
file | rpmfc.h
| Structures and methods for build-time file classification.
file | rpmspec.h
| The rpmSpec and Package data structures used during build.
## Typedefs
typedef struct rpmBuildArguments_s * | BTA_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_NOBUILD = (1 << 31) }
| Bit(s) to control rpmSpecBuild() operation. More...
enum | rpmBuildPkgFlags_e { RPMBUILD_PKG_NONE = 0, RPMBUILD_PKG_NODIRTOKENS = (1 << 0) }
| Bit(s) to control package generation. More...
## Functions
rpmSpec | rpmSpecParse (const char *specFile, rpmSpecFlags flags, const char *buildRoot)
| Parse spec file into spec control structure.
Header | rpmSpecSourceHeader (rpmSpec spec)
| Return the headers of the SRPM that would be built from the spec file.
rpmps | rpmSpecCheckDeps (rpmts ts, rpmSpec spec)
| Verify build depencies of a spec against.
rpmds | rpmSpecDS (rpmSpec spec, rpmTagVal tag)
| Retrieve build dependency set from spec.
rpmRC | rpmSpecBuild (rpmSpec spec, BTA_t buildArgs)
| Spec build stages state machine driver.
rpmSpec | rpmSpecFree (rpmSpec spec)
| Destroy Spec structure.
int | rpmspecQuery (rpmts ts, QVA_t qva, const char *arg)
| Function to query spec file(s).

## Typedef Documentation

typedef struct rpmBuildArguments_s* BTA_t

Definition at line 63 of file rpmbuild.h.

typedef struct Package_s* rpmSpecPkg

Definition at line 18 of file rpmspec.h.

## Enumeration Type Documentation

enum rpmBuildFlags_e

Bit(s) to control rpmSpecBuild() operation.

Enumerator:

  RPMBUILD_NONE |
  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_NOBUILD | Don't execute or package.

Definition at line 20 of file rpmbuild.h.

enum rpmBuildPkgFlags_e

Bit(s) to control package generation.

Enumerator:

  RPMBUILD_PKG_NONE |
  RPMBUILD_PKG_NODIRTOKENS | Legacy filename layout

Definition at line 43 of file rpmbuild.h.

## Function Documentation

rpmRC rpmSpecBuild | ( | rpmSpec | spec,
|  | BTA_t | buildArgs
| ) |  |

Spec build stages state machine driver.

Parameters:

  spec | spec file control structure
  buildArgs | build arguments

Returns:
  RPMRC_OK on success

Referenced by buildForTarget().

rpmps rpmSpecCheckDeps | ( | rpmts | ts,
|  | rpmSpec | spec
| ) |  |

Verify build depencies of a spec against.

Parameters:

  ts | (empty) transaction set
  spec | parsed spec control structure

Returns:
  rpm problem set or NULL on no problems

Referenced by checkSpec().

rpmds rpmSpecDS | ( | rpmSpec | spec,
|  | rpmTagVal | tag
| ) |  |

Retrieve build dependency set from spec.

Parameters:

  spec | parsed spec control structure
  tag | dependency tag

Returns:
  dependency set of tag (or NULL)

rpmSpec rpmSpecFree | ( | rpmSpec | spec | ) |

Destroy Spec structure.

Parameters:

  spec | spec file control structure

Returns:
  NULL always

Referenced by buildForTarget(), and main().

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:

  specFile | path to spec file
  flags | flags to control operation
  buildRoot | buildRoot override or NULL for default

Returns:
  new spec control structure

Referenced by buildForTarget(), and main().

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

Function to query spec file(s).

Parameters:

  ts | transaction set
  qva | parsed query/verify options
  arg | query argument

Returns:
  0 on success, else no. of failures

Referenced by main().

Header rpmSpecSourceHeader | ( | rpmSpec | spec | ) |

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

Parameters:

  spec | path to spec file

Returns:
  Header