#include "system.h"
#include <rpmio_internal.h>
#include <rpmbuild.h>
#include "debug.h"
Go to the source code of this file.
Functions | |
static int | checkOwners (const char *urlfn) |
Check that file owner and group are known. | |
static char * | doPatch (Spec spec, int c, int strip, const char *db, int reverse, int removeEmpties, int fuzz) |
Expand patchN macro into prep scriptlet. | |
static const char * | doUntar (Spec spec, int c, int quietly) |
Expand setup macro into prep scriptlet. | |
static int | doSetupMacro (Spec spec, char *line) |
Parse setup macro. | |
static int | doPatchMacro (Spec spec, char *line) |
Parse patch line. | |
int | parsePrep (Spec spec) |
Parse %prep section of a spec file. | |
Variables | |
static int | leaveDirs |
static int | skipDefaultAction |
static int | createDir |
static int | quietly |
static const char * | dirName = NULL |
static struct poptOption | optionsTable [] |
Definition in file parsePrep.c.
static int checkOwners | ( | const char * | urlfn | ) | [static] |
Check that file owner and group are known.
urlfn | file url |
Definition at line 38 of file parsePrep.c.
References _, errno, getGname(), getUname(), Lstat(), RPMERR_BADSPEC, rpmError, and strerror.
static char* doPatch | ( | Spec | spec, | |
int | c, | |||
int | strip, | |||
const char * | db, | |||
int | reverse, | |||
int | removeEmpties, | |||
int | fuzz | |||
) | [static] |
Expand patchN macro into prep scriptlet.
spec | build info | |
c | patch index | |
strip | patch level (i.e. patch -p argument) | |
db | saved file suffix (i.e. patch --suffix argument) | |
reverse | include -R? | |
fuzz | include -F? | |
removeEmpties | include -E? |
Definition at line 70 of file parsePrep.c.
References _, _free(), checkOwners(), COMPRESSED_BZIP2, COMPRESSED_NOT, Source::flags, Spec_s::force, isCompressed(), Source::next, Source::num, RPMBUILD_ISPATCH, RPMERR_BADSPEC, rpmError, rpmGetPath(), Source::source, Spec_s::sources, stpcpy(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().
Referenced by doPatchMacro().
static int doPatchMacro | ( | Spec | spec, | |
char * | line | |||
) | [static] |
Parse patch line.
spec | build info | |
line | current line from spec file |
Definition at line 448 of file parsePrep.c.
References _, appendLineStringBuf, doPatch(), Spec_s::line, Spec_s::lineNum, parseNum(), Spec_s::prep, RPMERR_BADSPEC, and rpmError.
Referenced by parsePrep().
static int doSetupMacro | ( | Spec | spec, | |
char * | line | |||
) | [static] |
Parse setup macro.
spec | build info | |
line | current line from spec file |
Definition at line 292 of file parsePrep.c.
References _, _free(), addMacro(), appendLineStringBuf, appendStringBuf, argv, Spec_s::buildSubdir, createDir, dirName, doUntar(), freeStringBuf(), getStringBuf(), Package_s::header, headerNVR(), leaveDirs, Spec_s::lineNum, Spec_s::macros, MKDIR_P, newStringBuf(), optionsTable, Spec_s::packages, parseNum(), Spec_s::prep, quietly, RMIL_SPEC, Spec_s::rootURL, RPMERR_BADSPEC, rpmError, rpmExpand(), rpmGenPath(), skipDefaultAction, urlPath(), and xstrdup().
Referenced by parsePrep().
static const char* doUntar | ( | Spec | spec, | |
int | c, | |||
int | quietly | |||
) | [static] |
Expand setup macro into prep scriptlet.
spec | build info | |
c | source index | |
quietly | should -vv be omitted from tar? |
Definition at line 169 of file parsePrep.c.
References _, _free(), checkOwners(), COMPRESSED_BZIP2, COMPRESSED_NOT, COMPRESSED_OTHER, COMPRESSED_ZIP, errno, Source::flags, Spec_s::force, ftpStrerror(), Source::fullSource, isCompressed(), Lstat(), Source::next, Source::num, RPMBUILD_ISSOURCE, RPMERR_BADFILENAME, RPMERR_BADSPEC, rpmError, rpmGetPath(), rpmIsVerbose, RPMTAG_NOSOURCE, Source::source, Spec_s::sources, stpcpy(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, urlGetFile(), and urlPath().
Referenced by doSetupMacro().
int createDir [static] |
const char* dirName = NULL [static] |
Definition at line 20 of file parsePrep.c.
Referenced by doSetupMacro(), rpmalAllFileSatisfiesDepend(), rpmdbFindByFile(), and rpmGetFilesystemUsage().
int leaveDirs [static] |
struct poptOption optionsTable[] [static] |
Initial value:
{ { NULL, 'a', POPT_ARG_STRING, NULL, 'a', NULL, NULL}, { NULL, 'b', POPT_ARG_STRING, NULL, 'b', NULL, NULL}, { NULL, 'c', 0, &createDir, 0, NULL, NULL}, { NULL, 'D', 0, &leaveDirs, 0, NULL, NULL}, { NULL, 'n', POPT_ARG_STRING, &dirName, 0, NULL, NULL}, { NULL, 'T', 0, &skipDefaultAction, 0, NULL, NULL}, { NULL, 'q', 0, &quietly, 0, NULL, NULL}, { 0, 0, 0, 0, 0, NULL, NULL} }
Definition at line 22 of file parsePrep.c.
int quietly [static] |
int skipDefaultAction [static] |