46 #define SKIPSPACE(s) { while (*(s) && xisspace(*(s))) (s)++; }
47 #define SKIPNONSPACE(s) { while (*(s) && !xisspace(*(s))) (s)++; }
49 #define PART_SUBNAME 0
117 extern const char *
getUname(uid_t uid)
127 extern const char *
getUnameS(
const char * uname)
137 uid_t
getUidS(
const char * uname)
147 extern const char *
getGname(gid_t gid)
157 extern const char *
getGnameS(
const char * gname)
167 gid_t
getGidS(
const char * gname)
433 #define freePackage(_pkg) \
434 ((Package)rpmioFreePoolItem((rpmioItem)(_pkg), __FUNCTION__, __FILE__, __LINE__))
546 const char * rootURL,
gid_t getGidS(const char *gname)
Return cached group id.
enum rpmBuildFlags_e rpmBuildFlags
Bit(s) to control buildSpec() operation.
void addChangelogEntry(Header h, time_t time, const char *name, const char *text)
Add changelog entry to header.
void handleComments(char *s)
Truncate comment lines.
rpmRC doScript(Spec spec, int what, const char *name, rpmiob iob, int test)
Run a build script, assembled from spec file scriptlet section.
enum rpmStripFlags_e rpmStripFlags
Spec file parser stripping flags.
char * parseExpressionString(Spec spec, const char *expr)
Evaluate string expression.
int parseNum(const char *line, rpmuint32_t *res)
Parse a number.
int parseBuildInstallClean(Spec spec, rpmParseState parsePart)
Parse %build/%install/%clean section(s) of a spec file.
const char * getGnameS(const char *gname)
Return cached group name.
Structure(s) used for file info tag sets.
struct rpmts_s * rpmts
The RPM Transaction Set.
int parseExpressionBoolean(Spec spec, const char *expr)
Evaluate boolean expression.
const char * buildHost(void)
Return build hostname.
rpmBuildFlags_e
Bit(s) to control buildSpec() operation.
const char * getUname(uid_t uid)
Return cached user name from user id.
rpmRC lookupPackage(Spec spec, const char *name, int flag, Package *pkg)
Find sub-package control structure by name.
rpmStripFlags_e
Spec file parser stripping flags.
int parsePrep(Spec spec, int verify)
Parse %prep section of a spec file.
int processSourceFiles(Spec spec)
Post-build processing for source package.
uid_t getUidS(const char *uname)
Return cached user id.
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 packageBinaries(Spec spec)
Generate binary package(s).
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.
enum rpmRC_e rpmRC
RPM return codes.
int parsePreamble(Spec spec, int initialPackage)
Parse tags from preamble of a spec file.
Package newPackage(Spec spec)
Create and initialize package control structure.
#define PART_BASE
Spec file parser states.
rpmParseState isPart(Spec spec)
Check line for section separator, return next parser state.
int initSourceHeader(Spec spec, rpmiob *sfp)
Create and initialize header for source package.
enum evrFlags_e rpmsenseFlags
rpmuint32_t * getBuildTime(void)
Return build time stamp.
int parseChangelog(Spec spec)
Parse %changelog section of a spec file.
rpmRC processBinaryFiles(Spec spec, int installSpecialDoc, int test)
Post-build processing for binary package(s).
The structure used to store values parsed from a spec file.
void freeNames(void)
Destroy uid/gid caches.
int parseScript(Spec spec, int parsePart)
Parse %pre et al scriptlets from a spec file.
void closeSpec(Spec spec)
Stop reading from spec file, freeing resources.
int parseDescription(Spec spec)
Parse %description section of a spec file.
rpmRC packageSources(Spec spec)
Generate source package.
Package freePackages(Package packages)
Destroy all packages associated with spec file.
rpmRC processScriptFiles(Spec spec, Package pkg)
Append files (if any) to scriptlet tags.
enum rpmParseState_e rpmParseState
const char * getUnameS(const char *uname)
Return cached user name.
#define freePackage(_pkg)
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.
The structure used to store values for a package.
int parseFiles(Spec spec)
Parse %files section of a spec file.
The Spec and Package data structures used during build.
const char * getGname(gid_t gid)
Return cached group name from group id.
int rpmlibNeedsFeature(Header h, const char *feature, const char *featureEVR)
Add rpmlib feature dependency.
int readLine(Spec spec, rpmStripFlags strip)
Read next line from spec file.
void providePackageNVR(Header h)
Retrofit an explicit Provides: N = E:V-R dependency into package headers.
rpmRC buildSpec(rpmts ts, Spec spec, int what, int test)
Build stages state machine driver.