rpm
5.4.14
|
This is the only module users of librpmbuild should need to include. More...
#include <rpmiotypes.h>
#include <rpmio.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. More... | |
#define | freePackage(_pkg) ((Package)rpmioFreePoolItem((rpmioItem)(_pkg), __FUNCTION__, __FILE__, __LINE__)) |
Typedefs | |
typedef enum rpmBuildFlags_e | rpmBuildFlags |
Bit(s) to control buildSpec() operation. More... | |
typedef enum rpmParseState_e | rpmParseState |
typedef enum rpmStripFlags_e | rpmStripFlags |
Spec file parser stripping flags. More... | |
Functions | |
void | freeNames (void) |
Destroy uid/gid caches. More... | |
const char * | getUname (uid_t uid) |
Return cached user name from user id. More... | |
const char * | getUnameS (const char *uname) |
Return cached user name. More... | |
uid_t | getUidS (const char *uname) |
Return cached user id. More... | |
const char * | getGname (gid_t gid) |
Return cached group name from group id. More... | |
const char * | getGnameS (const char *gname) |
Return cached group name. More... | |
gid_t | getGidS (const char *gname) |
Return cached group id. More... | |
const char * | buildHost (void) |
Return build hostname. More... | |
rpmuint32_t * | getBuildTime (void) |
Return build time stamp. More... | |
int | readLine (Spec spec, rpmStripFlags strip) |
Read next line from spec file. More... | |
void | closeSpec (Spec spec) |
Stop reading from spec file, freeing resources. More... | |
void | handleComments (char *s) |
Truncate comment lines. More... | |
rpmParseState | isPart (Spec spec) |
Check line for section separator, return next parser state. More... | |
int | parseNum (const char *line, rpmuint32_t *res) |
Parse a number. More... | |
void | addChangelogEntry (Header h, time_t time, const char *name, const char *text) |
Add changelog entry to header. More... | |
int | parseBuildInstallClean (Spec spec, rpmParseState parsePart) |
Parse %build/%install/%clean section(s) of a spec file. More... | |
int | parseChangelog (Spec spec) |
Parse %changelog section of a spec file. More... | |
int | parseDescription (Spec spec) |
Parse %description section of a spec file. More... | |
int | parseFiles (Spec spec) |
Parse %files section of a spec file. More... | |
int | parsePreamble (Spec spec, int initialPackage) |
Parse tags from preamble of a spec file. More... | |
int | parsePrep (Spec spec, int verify) |
Parse %prep section of a spec file. More... | |
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. More... | |
int | parseScript (Spec spec, int parsePart) |
Parse %pre et al scriptlets from a spec file. More... | |
int | parseExpressionBoolean (Spec spec, const char *expr) |
Evaluate boolean expression. More... | |
char * | parseExpressionString (Spec spec, const char *expr) |
Evaluate string expression. More... | |
rpmRC | doScript (Spec spec, int what, const char *name, rpmiob iob, int test) |
Run a build script, assembled from spec file scriptlet section. More... | |
rpmRC | lookupPackage (Spec spec, const char *name, int flag, Package *pkg) |
Find sub-package control structure by name. More... | |
Package | freePackages (Package packages) |
Destroy all packages associated with spec file. More... | |
Package | freePackage (Package pkg) |
Destroy a package control structure. More... | |
Package | newPackage (Spec spec) |
Create and initialize package control structure. More... | |
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. More... | |
rpmRC | processScriptFiles (Spec spec, Package pkg) |
Append files (if any) to scriptlet tags. More... | |
void | providePackageNVR (Header h) |
Retrofit an explicit Provides: N = E:V-R dependency into package headers. More... | |
int | rpmlibNeedsFeature (Header h, const char *feature, const char *featureEVR) |
Add rpmlib feature dependency. More... | |
rpmRC | processBinaryFiles (Spec spec, int installSpecialDoc, int test) |
Post-build processing for binary package(s). More... | |
int | initSourceHeader (Spec spec, rpmiob *sfp) |
Create and initialize header for source package. More... | |
int | processSourceFiles (Spec spec) |
Post-build processing for source package. More... | |
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. More... | |
rpmRC | buildSpec (rpmts ts, Spec spec, int what, int test) |
Build stages state machine driver. More... | |
rpmRC | packageBinaries (Spec spec) |
Generate binary package(s). More... | |
rpmRC | packageSources (Spec spec) |
Generate source package. More... | |
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 433 of file rpmbuild.h.
#define PART_NAME 1 |
Definition at line 50 of file rpmbuild.h.
Referenced by parseDescription(), parseFiles(), parseScript(), and parseSimplePart().
#define PART_SUBNAME 0 |
Definition at line 49 of file rpmbuild.h.
Referenced by lookupPackage(), parseDescription(), parseFiles(), parsePreamble(), parseScript(), and parseSimplePart().
Definition at line 47 of file rpmbuild.h.
Referenced by handlePreambleTag(), matchTok(), and readLine().
Definition at line 46 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 56 of file rpmbuild.h.
Append files (if any) to scriptlet tags.
spec | spec file control structure |
pkg | package control structure |
Definition at line 214 of file pack.c.
References _, addFileToArrayTag(), addFileToTag(), alloca(), _HE_s::append, rpmDataType_u::argv, _HE_s::c, TriggerFileEntry::fileName, Package_s::header, headerPut(), memset(), TriggerFileEntry::next, NULL, p, _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, Package_s::verifyFile, and xx.
Referenced by processBinaryFiles().
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 454 of file pack.c.
References _free(), alloca(), _HE_s::append, rpmDataType_u::argv, _HE_s::c, exit, headerGet(), headerNEVRA(), headerPut(), i, memset(), N, nb, NULL, p, _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, sprintf(), stpcpy(), rpmDataType_u::str, strcmp(), _HE_s::t, _HE_s::tag, rpmDataType_u::ui32p, and xx.
Referenced by processBinaryFiles().
int _rpmbuildFlags |
Definition at line 53 of file poptBT.c.
Referenced by genCpioListAndHeader(), newPackage(), packageBinaries(), and rpmlibMarkers().