Files | |
file | build.c |
Top-level build dispatcher. | |
file | buildio.h |
Routines to read and write packages. | |
file | expression.c |
Simple logical expression parser. | |
file | files.c |
The post-build, pre-packaging file tree walk to assemble the package manifest. | |
file | misc.c |
file | myftw.c |
Modified ftw() -- uses Lstat() instead of stat(). | |
file | myftw.h |
Portable ftw(3) using lstat() instead of stat(). | |
file | names.c |
Simple user/group name/id cache (plus hostname and buildtime). | |
file | pack.c |
Assemble components of an RPM package. | |
file | parseBuildInstallClean.c |
Parse build/install/clean section from spec file. | |
file | parseChangelog.c |
Parse changelog section from spec file. | |
file | parseDescription.c |
Parse description section from spec file. | |
file | parseFiles.c |
Parse files section from spec file. | |
file | parsePreamble.c |
Parse tags in global section from spec file. | |
file | parsePrep.c |
Parse prep section from spec file. | |
file | parseReqs.c |
Parse dependency tag from spec file or from auto-dependency generator. | |
file | parseScript.c |
Parse install-time script section from spec file. | |
file | parseSpec.c |
Top level dispatcher for spec file parsing. | |
file | reqprov.c |
Add dependency tags to package header(s). | |
file | rpmbuild.h |
This is the *only* module users of librpmbuild should need to include. | |
file | rpmspec.h |
The Spec and Package data structures used during build. | |
file | spec.c |
Handle spec data structure. | |
file | rpmcli.h |
Data Structures | |
struct | TriggerFileEntry |
struct | Source |
struct | ReadLevelEntry |
struct | OpenFileInfo |
struct | spectag_s |
struct | spectags_s |
struct | speclines_s |
struct | SpecStruct |
The structure used to store values parsed from a spec file. More... | |
struct | PackageStruct |
The structure used to store values for a package. More... | |
Typedefs | |
typedef enum rpmBuildFlags_e | rpmBuildFlags |
Bit(s) to control buildSpec() operation. | |
typedef enum rpmParseState_e | rpmParseState |
Spec file parser states. | |
typedef struct SpecStruct * | Spec |
typedef struct ReadLevelEntry | RLE_t |
typedef struct OpenFileInfo | OFI_t |
typedef struct spectag_s * | spectag |
typedef struct spectags_s * | spectags |
typedef struct speclines_s * | speclines |
typedef struct PackageStruct * | Package |
Enumerations | |
enum | rpmBuildFlags_e { RPMBUILD_NONE = 0, RPMBUILD_PREP = (1 << 0), RPMBUILD_BUILD = (1 << 1), RPMBUILD_INSTALL = (1 << 2), RPMBUILD_CLEAN = (1 << 3), RPMBUILD_FILECHECK = (1 << 4), RPMBUILD_PACKAGESOURCE = (1 << 5), RPMBUILD_PACKAGEBINARY = (1 << 6), RPMBUILD_RMSOURCE = (1 << 7), RPMBUILD_RMBUILD = (1 << 8), RPMBUILD_STRINGBUF = (1 << 9), RPMBUILD_RMSPEC = (1 << 10) } |
Bit(s) to control buildSpec() operation. More... | |
enum | rpmParseState_e { PART_NONE = 0, PART_PREAMBLE = 1, PART_PREP = 2, PART_BUILD = 3, PART_INSTALL = 4, PART_CLEAN = 5, PART_FILES = 6, PART_PRE = 7, PART_POST = 8, PART_PREUN = 9, PART_POSTUN = 10, PART_DESCRIPTION = 11, PART_CHANGELOG = 12, PART_TRIGGERIN = 13, PART_TRIGGERUN = 14, PART_VERIFYSCRIPT = 15, PART_BUILDARCHITECTURES = 16, PART_TRIGGERPOSTUN = 17, PART_LAST = 18 } |
Spec file parser states. More... | |
Functions | |
void | freeNames (void) |
Destroy uid/gid caches. | |
const char * | getUname (uid_t uid) |
Return cached user name from user id. | |
const char * | getUnameS (const char *uname) |
Return cached user name. | |
uid_t | getUidS (const char *uname) |
Return cached user id. | |
const char * | getGname (gid_t gid) |
Return cached group name from group id. | |
const char * | getGnameS (const char *gname) |
Return cached group name. | |
gid_t | getGidS (const char *gname) |
Return cached group id. | |
const char *const | buildHost (void) |
Return build hostname. | |
int_32 *const | getBuildTime (void) |
Return build time stamp. | |
int | readLine (Spec spec, int strip) |
Read next line from spec file. | |
void | closeSpec (Spec spec) |
Stop reading from spec file, freeing resources. | |
void | handleComments (char *s) |
Truncate comment lines. | |
rpmParseState | isPart (const char *line) |
Check line for section separator, return next parser state. | |
int | parseNum (const char *line, int *res) |
Parse a number. | |
void | addChangelogEntry (Header h, time_t time, const char *name, const char *text) |
Add changelog entry to header. | |
int | parseBuildInstallClean (Spec spec, rpmParseState parsePart) |
Parse %build/%install/%clean section(s) of a spec file. | |
int | parseChangelog (Spec spec) |
Parse %changelog section of a spec file. | |
int | parseDescription (Spec spec) |
Parse %description section of a spec file. | |
int | parseFiles (Spec spec) |
Parse %files section of a spec file. | |
int | parsePreamble (Spec spec, int initialPackage) |
Parse tags from preamble of a spec file. | |
int | parsePrep (Spec spec) |
Parse %prep section of a spec file. | |
int | parseRCPOT (Spec spec, Package pkg, const char *field, int tag, int index, rpmsenseFlags tagflags) |
Parse dependency relations from spec file and/or autogenerated output buffer. | |
int | parseScript (Spec spec, int parsePart) |
Parse %pre et al scriptlets from a spec file. | |
int | parseExpressionBoolean (Spec spec, const char *expr) |
Evaluate boolean expression. | |
char * | parseExpressionString (Spec spec, const char *expr) |
Evaluate string expression. | |
int | doScript (Spec spec, int what, const char *name, StringBuf sb, int test) |
Run a build script, assembled from spec file scriptlet section. | |
int | lookupPackage (Spec spec, const char *name, int flag, Package *pkg) |
Find sub-package control structure by name. | |
Package | newPackage (Spec spec) |
Create and initialize package control structure. | |
Package | freePackages (Package packages) |
Destroy all packages associated with spec file. | |
Package | freePackage (Package pkg) |
Destroy package control structure. | |
int | addReqProv (Spec spec, Header h, rpmsenseFlags depFlags, const char *depName, const char *depEVR, int index) |
Add dependency to header, filtering duplicates. | |
int | rpmlibNeedsFeature (Header h, const char *feature, const char *featureEVR) |
Add rpmlib feature dependency. | |
int | processBinaryFiles (Spec spec, int installSpecialDoc, int test) |
Post-build processing for binary package(s). | |
void | initSourceHeader (Spec spec) |
Create and initialize header for source package. | |
int | processSourceFiles (Spec spec) |
Post-build processing for source package. | |
int | parseSpec (Spec *specp, const char *specFile, const char *rootURL, const char *buildRootURL, int recursing, const char *passPhrase, char *cookie, int anyarch, int force) |
Parse spec file into spec control structure. | |
int | buildSpec (Spec spec, int what, int test) |
Build stages state machine driver. | |
int | packageBinaries (Spec spec) |
Generate binary package(s). | |
int | packageSources (Spec spec) |
Generate source package. | |
Spec | newSpec (void) |
Create and initialize Spec structure. | |
Spec | freeSpec (Spec spec) |
Destroy Spec structure. | |
struct OpenFileInfo * | newOpenFileInfo (void) |
spectag | stashSt (Spec spec, Header h, int tag, const char *lang) |
int | addSource (Spec spec, Package pkg, const char *field, int tag) |
int | parseNoSource (Spec spec, const char *field, int tag) |
Variables | |
int(* | parseSpecVec )(Spec *specp, const char *specFile, const char *rootdir, const char *buildRoot, int recursing, const char *passPhrase, char *cookie, int anyarch, int force) |
Spec(* | freeSpecVec )(Spec spec) |
typedef struct OpenFileInfo OFI_t |
typedef struct PackageStruct* Package |
typedef struct ReadLevelEntry RLE_t |
typedef enum rpmBuildFlags_e rpmBuildFlags |
Bit(s) to control buildSpec() operation.
typedef enum rpmParseState_e rpmParseState |
Spec file parser states.
typedef struct SpecStruct* Spec |
typedef struct speclines_s * speclines |
typedef struct spectags_s * spectags |
enum rpmBuildFlags_e |
Bit(s) to control buildSpec() operation.
RPMBUILD_NONE | |
RPMBUILD_PREP | Execute %prep. |
RPMBUILD_BUILD | Execute %build. |
RPMBUILD_INSTALL | Execute %install. |
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 | only for doScript() |
RPMBUILD_RMSPEC | Remove spec file. |
Definition at line 22 of file rpmbuild.h.
enum rpmParseState_e |
Spec file parser states.
Definition at line 51 of file rpmbuild.h.
void addChangelogEntry | ( | Header | h, | |
time_t | time, | |||
const char * | name, | |||
const char * | text | |||
) |
Add changelog entry to header.
h | header | |
time | time of change | |
name | person who made the change | |
text | description of change |
Definition at line 11 of file parseChangelog.c.
int addReqProv | ( | Spec | spec, | |
Header | h, | |||
rpmsenseFlags | depFlags, | |||
const char * | depName, | |||
const char * | depEVR, | |||
int | index | |||
) |
const char* const buildHost | ( | void | ) |
int buildSpec | ( | Spec | spec, | |
int | what, | |||
int | test | |||
) |
void closeSpec | ( | Spec | spec | ) |
Stop reading from spec file, freeing resources.
spec | spec file control structure |
Definition at line 358 of file parseSpec.c.
Run a build script, assembled from spec file scriptlet section.
spec | spec file control structure | |
what | type of script | |
name | name of scriptlet section | |
sb | lines that compose script body | |
test | don't execute scripts or package if testing |
int_32* const getBuildTime | ( | void | ) |
gid_t getGidS | ( | const char * | gname | ) |
const char* getGname | ( | gid_t | gid | ) |
const char* getGnameS | ( | const char * | gname | ) |
uid_t getUidS | ( | const char * | uname | ) |
const char* getUname | ( | uid_t | uid | ) |
const char* getUnameS | ( | const char * | uname | ) |
void handleComments | ( | char * | s | ) |
Truncate comment lines.
s | skip white space, truncate line at '#' |
Definition at line 97 of file parseSpec.c.
void initSourceHeader | ( | Spec | spec | ) |
rpmParseState isPart | ( | const char * | line | ) |
Check line for section separator, return next parser state.
line | from spec file |
Definition at line 54 of file parseSpec.c.
struct OpenFileInfo* newOpenFileInfo | ( | void | ) | [read] |
Spec newSpec | ( | void | ) |
int packageBinaries | ( | Spec | spec | ) |
int packageSources | ( | Spec | spec | ) |
int parseBuildInstallClean | ( | Spec | spec, | |
rpmParseState | parsePart | |||
) |
Parse %build/%install/%clean section(s) of a spec file.
spec | spec file control structure | |
parsePart | current rpmParseState |
Definition at line 12 of file parseBuildInstallClean.c.
int parseChangelog | ( | Spec | spec | ) |
Parse %changelog section of a spec file.
spec | spec file control structure |
Definition at line 205 of file parseChangelog.c.
int parseDescription | ( | Spec | spec | ) |
Parse %description section of a spec file.
spec | spec file control structure |
Definition at line 29 of file parseDescription.c.
int parseExpressionBoolean | ( | Spec | spec, | |
const char * | expr | |||
) |
Evaluate boolean expression.
spec | spec file control structure | |
expr | expression to parse |
Definition at line 674 of file expression.c.
char* parseExpressionString | ( | Spec | spec, | |
const char * | expr | |||
) |
Evaluate string expression.
spec | spec file control structure | |
expr | expression to parse |
Definition at line 721 of file expression.c.
int parseFiles | ( | Spec | spec | ) |
Parse %files section of a spec file.
spec | spec file control structure |
Definition at line 26 of file parseFiles.c.
int parseNoSource | ( | Spec | spec, | |
const char * | field, | |||
int | tag | |||
) |
int parseNum | ( | const char * | line, | |
int * | res | |||
) |
int parsePreamble | ( | Spec | spec, | |
int | initialPackage | |||
) |
Parse tags from preamble of a spec file.
spec | spec file control structure | |
initialPackage |
Definition at line 835 of file parsePreamble.c.
int parsePrep | ( | Spec | spec | ) |
Parse %prep section of a spec file.
spec | spec file control structure |
Definition at line 543 of file parsePrep.c.
int parseRCPOT | ( | Spec | spec, | |
Package | pkg, | |||
const char * | field, | |||
int | tag, | |||
int | index, | |||
rpmsenseFlags | tagflags | |||
) |
Parse dependency relations from spec file and/or autogenerated output buffer.
spec | spec file control structure | |
pkg | package control structure | |
field | text to parse (e.g. "foo < 0:1.2-3, bar = 5:6.7") | |
tag | tag, identifies type of dependency | |
index | (0 always) | |
tagflags | dependency flags already known from context |
Definition at line 35 of file parseReqs.c.
int parseScript | ( | Spec | spec, | |
int | parsePart | |||
) |
Parse %pre et al scriptlets from a spec file.
spec | spec file control structure | |
parsePart | current rpmParseState |
Definition at line 69 of file parseScript.c.
int parseSpec | ( | Spec * | specp, | |
const char * | specFile, | |||
const char * | rootURL, | |||
const char * | buildRootURL, | |||
int | recursing, | |||
const char * | passPhrase, | |||
char * | cookie, | |||
int | anyarch, | |||
int | force | |||
) |
Parse spec file into spec control structure.
specp | spec file control structure |
specFile | ||
rootURL | ||
buildRootURL | ||
recursing | parse is recursive? | |
passPhrase | ||
cookie | ||
anyarch | ||
force |
Definition at line 377 of file parseSpec.c.
int processBinaryFiles | ( | Spec | spec, | |
int | installSpecialDoc, | |||
int | test | |||
) |
int processSourceFiles | ( | Spec | spec | ) |
int readLine | ( | Spec | spec, | |
int | strip | |||
) |
Read next line from spec file.
spec | spec file control structure | |
strip | truncate comments? |
Definition at line 179 of file parseSpec.c.
int rpmlibNeedsFeature | ( | Header | h, | |
const char * | feature, | |||
const char * | featureEVR | |||
) |
Spec(* freeSpecVec)(Spec spec) |
spec | spec file control structure |
int(* parseSpecVec)(Spec *specp, const char *specFile, const char *rootdir,const char *buildRoot, int recursing,const char *passPhrase,char *cookie, int anyarch, int force) |
specp | spec file control structure |
specFile | ||
rootdir | ||
buildRoot | ||
recursing | parse is recursive? | |
passPhrase | ||
cookie | ||
anyarch | ||
force |