|
rpm
5.4.10
|
This is the only module users of librpmbuild should need to include. More...
#include <rpmiotypes.h>#include <rpmmacro.h>#include <rpmtypes.h>#include <rpmtag.h>#include <rpmfi.h>#include <rpmcli.h>#include "rpmspec.h"

Go to the source code of this file.
Macros | |
| #define | SKIPSPACE(s) { while (*(s) && xisspace(*(s))) (s)++; } |
| #define | SKIPNONSPACE(s) { while (*(s) && !xisspace(*(s))) (s)++; } |
| #define | PART_SUBNAME 0 |
| #define | PART_NAME 1 |
| #define | PART_BASE 100 |
| Spec file parser states. | |
| #define | freePackage(_pkg) ((Package)rpmioFreePoolItem((rpmioItem)(_pkg), __FUNCTION__, __FILE__, __LINE__)) |
Typedefs | |
| typedef enum rpmBuildFlags_e | rpmBuildFlags |
| Bit(s) to control buildSpec() operation. | |
| typedef enum rpmParseState_e | rpmParseState |
| typedef enum rpmStripFlags_e | rpmStripFlags |
| Spec file parser stripping flags. | |
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 * | buildHost (void) |
| Return build hostname. | |
| rpmuint32_t * | getBuildTime (void) |
| Return build time stamp. | |
| int | readLine (Spec spec, rpmStripFlags 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 (Spec spec) |
| Check line for section separator, return next parser state. | |
| int | parseNum (const char *line, rpmuint32_t *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, int verify) |
| Parse %prep section of a spec file. | |
| rpmRC | parseRCPOT (Spec spec, Package pkg, const char *field, rpmTag tagN, rpmuint32_t 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. | |
| rpmRC | doScript (Spec spec, int what, const char *name, rpmiob iob, int test) |
| Run a build script, assembled from spec file scriptlet section. | |
| rpmRC | lookupPackage (Spec spec, const char *name, int flag, Package *pkg) |
| Find sub-package control structure by name. | |
| Package | freePackages (Package packages) |
| Destroy all packages associated with spec file. | |
| Package | freePackage (Package pkg) |
| Destroy a package control structure. | |
| Package | newPackage (Spec spec) |
| Create and initialize package control structure. | |
| int | addReqProv (Spec spec, Header h, rpmTag tagN, const char *N, const char *EVR, rpmsenseFlags Flags, rpmuint32_t index) |
| Add dependency to header, filtering duplicates. | |
| rpmRC | processScriptFiles (Spec spec, Package pkg) |
| Append files (if any) to scriptlet tags. | |
| void | providePackageNVR (Header h) |
| Retrofit an explicit Provides: N = E:V-R dependency into package headers. | |
| int | rpmlibNeedsFeature (Header h, const char *feature, const char *featureEVR) |
| Add rpmlib feature dependency. | |
| rpmRC | processBinaryFiles (Spec spec, int installSpecialDoc, int test) |
| Post-build processing for binary package(s). | |
| int | initSourceHeader (Spec spec, rpmiob *sfp) |
| Create and initialize header for source package. | |
| int | processSourceFiles (Spec spec) |
| Post-build processing for source package. | |
| int | parseSpec (rpmts ts, const char *specFile, const char *rootURL, int recursing, const char *passPhrase, const char *cookie, int anyarch, int force, int verify) |
| Parse spec file into spec control structure. | |
| rpmRC | buildSpec (rpmts ts, Spec spec, int what, int test) |
| Build stages state machine driver. | |
| rpmRC | packageBinaries (Spec spec) |
| Generate binary package(s). | |
| rpmRC | packageSources (Spec spec) |
| Generate source package. | |
Variables | |
| int | _rpmbuildFlags |
This is the only module users of librpmbuild should need to include.
Definition in file rpmbuild.h.
| #define freePackage | ( | _pkg | ) | ((Package)rpmioFreePoolItem((rpmioItem)(_pkg), __FUNCTION__, __FILE__, __LINE__)) |
Definition at line 432 of file rpmbuild.h.
| #define PART_NAME 1 |
Definition at line 49 of file rpmbuild.h.
Referenced by parseDescription(), parseFiles(), parseScript(), and parseSimplePart().
| #define PART_SUBNAME 0 |
Definition at line 48 of file rpmbuild.h.
Referenced by lookupPackage(), parseDescription(), parseFiles(), parsePreamble(), parseScript(), and parseSimplePart().
| #define SKIPNONSPACE | ( | s | ) | { while (*(s) && !xisspace(*(s))) (s)++; } |
Definition at line 46 of file rpmbuild.h.
Referenced by handlePreambleTag(), matchTok(), and readLine().
| #define SKIPSPACE | ( | s | ) | { while (*(s) && xisspace(*(s))) (s)++; } |
Definition at line 45 of file rpmbuild.h.
Referenced by addSource(), findPreambleTag(), handleComments(), handlePreambleTag(), matchTok(), parseForAttr(), parseForConfig(), parseForDev(), parseForLang(), parseForVerify(), parsePreamble(), processPackageFiles(), processSourceFiles(), and readLine().
| typedef enum rpmParseState_e rpmParseState |
| enum rpmParseState_e |
Definition at line 55 of file rpmbuild.h.
Append files (if any) to scriptlet tags.
| spec | spec file control structure |
| pkg | package control structure |
Definition at line 212 of file pack.c.
References _, addFileToArrayTag(), addFileToTag(), alloca(), _HE_s::append, rpmDataType_u::argv, _HE_s::c, TriggerFileEntry::fileName, Package_s::header, headerPut(), TriggerFileEntry::next, _HE_s::p, Package_s::postInFile, Package_s::postTransFile, Package_s::postUnFile, Package_s::preInFile, Package_s::preTransFile, Package_s::preUnFile, TriggerFileEntry::prog, RPM_STRING_ARRAY_TYPE, rpmlog(), RPMLOG_ERR, RPMRC_FAIL, RPMRC_OK, RPMTAG_POSTIN, RPMTAG_POSTTRANS, RPMTAG_POSTUN, RPMTAG_PREIN, RPMTAG_PRETRANS, RPMTAG_PREUN, RPMTAG_SANITYCHECK, RPMTAG_TRIGGERSCRIPTPROG, RPMTAG_TRIGGERSCRIPTS, RPMTAG_VERIFYSCRIPT, Package_s::sanityCheckFile, TriggerFileEntry::script, _HE_s::t, _HE_s::tag, Package_s::triggerFiles, and Package_s::verifyFile.
Referenced by processBinaryFiles().
| void providePackageNVR | ( | Header | h | ) |
Retrofit an explicit Provides: N = E:V-R dependency into package headers.
Up to rpm 3.0.4, packages implicitly provided their own name-version-release.
| h | header |
Definition at line 452 of file pack.c.
References _free(), alloca(), _HE_s::append, rpmDataType_u::argv, _HE_s::c, headerGet(), headerNEVRA(), headerPut(), _HE_s::p, rpmDataType_u::ptr, RPM_STRING_ARRAY_TYPE, RPM_UINT32_TYPE, RPMSENSE_EQUAL, RPMTAG_DISTEPOCH, RPMTAG_EPOCH, RPMTAG_PROVIDEFLAGS, RPMTAG_PROVIDENAME, RPMTAG_PROVIDEVERSION, stpcpy(), rpmDataType_u::str, _HE_s::t, _HE_s::tag, and rpmDataType_u::ui32p.
Referenced by processBinaryFiles().
| int _rpmbuildFlags |
Definition at line 53 of file poptBT.c.
Referenced by genCpioListAndHeader(), newPackage(), packageBinaries(), and rpmlibMarkers().
1.8.1.2