|
rpm
5.4.10
|
Parse prep section from spec file. More...
#include "system.h"#include <rpmio.h>#include <rpmiotypes.h>#include <argv.h>#include <rpmcb.h>#include <rpmurl.h>#include <rpmbuild.h>#include "misc.h"#include "debug.h"
Go to the source code of this file.
Functions | |
| static rpmRC | checkOwners (const char *urlfn) |
| Check that file owner and group are known. | |
| static char * | doPatch (Spec spec, rpmuint32_t c, int strip, const char *db, int reverse, int removeEmpties, int fuzz, const char *subdir) |
| Expand patchN macro into prep scriptlet. | |
| static const char * | doUntar (Spec spec, rpmuint32_t c, int quietly) |
| Expand setup macro into prep scriptlet. | |
| static int | doSetupMacro (Spec spec, const char *line) |
| Parse setup macro. | |
| static rpmRC | doPatchMacro (Spec spec, const char *line) |
| Parse patch line. | |
| static void | prepFetchVerbose (struct Source *sp, struct stat *st) |
| static int | prepFetch (Spec spec) |
| Check that all sources/patches/icons exist locally, fetching if necessary. | |
| int | parsePrep (Spec spec, int verify) |
| 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 [] |
Parse prep section from spec file.
Definition in file parsePrep.c.
|
static |
Check that file owner and group are known.
| urlfn | file url |
Definition at line 46 of file parsePrep.c.
References _, errno, getGname(), getUname(), Lstat(), rpmlog(), RPMLOG_ERR, RPMRC_FAIL, and RPMRC_OK.
|
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? |
| removeEmpties | include -E? |
| fuzz | include -F? (fuzz<0 means no) |
| subdir | sub-directory (i.e patch -d argument); |
Definition at line 79 of file parsePrep.c.
References _, _free(), checkOwners(), COMPRESSED_BZIP2, COMPRESSED_LZMA, COMPRESSED_LZOP, COMPRESSED_NOT, COMPRESSED_OTHER, COMPRESSED_XZ, COMPRESSED_ZIP, Source::flags, Spec_s::force, isCompressed(), Source::next, Source::num, rpmExpand(), RPMFILE_PATCH, rpmGenPath(), rpmGetPath(), rpmlog(), RPMLOG_ERR, Source::source, Spec_s::sources, stpcpy(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_MONGO, URL_IS_PATH, URL_IS_UNKNOWN, urlPath(), and xstrdup().
Referenced by doPatchMacro().
Parse patch line.
| spec | build info |
| line | current line from spec file |
Definition at line 577 of file parsePrep.c.
References _, doPatch(), Spec_s::line, Spec_s::lineNum, parseNum(), Spec_s::prep, rpmExpandNumeric(), rpmiobAppend(), rpmlog(), RPMLOG_ERR, RPMRC_FAIL, and RPMRC_OK.
Referenced by parsePrep().
|
static |
Parse setup macro.
| spec | build info |
| line | current line from spec file |
Definition at line 400 of file parsePrep.c.
References _, _free(), addMacro(), Spec_s::buildSubdir, createDir, dirName, doUntar(), Source::flags, Package_s::header, headerNEVRA(), leaveDirs, Spec_s::lineNum, Spec_s::macros, Source::next, Source::num, optionsTable, Spec_s::packages, parseNum(), Spec_s::prep, quietly, RMIL_SPEC, Spec_s::rootURL, rpmExpand(), RPMFILE_SOURCE, rpmGenPath(), rpmiobAppend(), rpmiobFree(), rpmiobNew(), rpmiobStr(), rpmioMkpath(), rpmlog(), RPMLOG_ERR, RPMRC_FAIL, RPMRC_OK, skipDefaultAction, snprintf(), Source::source, Spec_s::sources, urlPath(), and xstrdup().
Referenced by parsePrep().
|
static |
Expand setup macro into prep scriptlet.
| spec | build info |
| c | source index |
| quietly | should -vv be omitted from tar? |
Definition at line 216 of file parsePrep.c.
References _, _free(), _rpmmg_debug, checkOwners(), COMPRESSED_7ZIP, COMPRESSED_BZIP2, COMPRESSED_LRZIP, COMPRESSED_LZIP, COMPRESSED_LZMA, COMPRESSED_LZOP, COMPRESSED_NOT, COMPRESSED_OTHER, COMPRESSED_XZ, COMPRESSED_ZIP, Source::flags, Spec_s::force, getSourceDir(), isCompressed(), Source::next, Source::num, RPMFILE_SOURCE, rpmGenPath(), rpmGetPath(), rpmIsVerbose, rpmlog(), RPMLOG_ERR, rpmmgFile(), rpmmgFree(), rpmmgNew(), Source::source, Spec_s::sources, stpcpy(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_MONGO, URL_IS_PATH, URL_IS_UNKNOWN, urlPath(), and xstrdup().
Referenced by doSetupMacro().
|
static |
Check that all sources/patches/icons exist locally, fetching if necessary.
Definition at line 744 of file parsePrep.c.
References _, _free(), rpmBuildArguments_s::buildAmount, errno, Source::flags, ftpStrerror(), Source::fullSource, getSourceDir(), Lstat(), Source::next, Source::num, prepFetchVerbose(), quietly, rpmBTArgs, RPMBUILD_FETCHSOURCE, rpmExpand(), RPMFILE_ICON, RPMFILE_PATCH, RPMFILE_SOURCE, rpmGenPath(), rpmIsVerbose, rpmlog(), RPMLOG_ERR, RPMLOG_NOTICE, rpmMkdirPath(), RPMRC_OK, Source::source, Spec_s::sources, and urlGetFile().
Referenced by parsePrep().
|
static |
Definition at line 712 of file parsePrep.c.
References _free(), rpmBuildArguments_s::buildAmount, Source::flags, Source::num, quietly, rpmBTArgs, RPMBUILD_FETCHSOURCE, RPMFILE_SOURCE, rpmIsVerbose, rpmlog(), RPMLOG_NOTICE, snprintf(), and Source::source.
Referenced by prepFetch().
|
static |
Definition at line 26 of file parsePrep.c.
Referenced by doSetupMacro().
|
static |
Definition at line 28 of file parsePrep.c.
Referenced by doLookup(), doSetupMacro(), rpmGetFilesystemUsage(), and rpmtsCheckInstalledFiles().
|
static |
Definition at line 24 of file parsePrep.c.
Referenced by doSetupMacro().
|
static |
Definition at line 30 of file parsePrep.c.
Referenced by doSetupMacro().
|
static |
Definition at line 26 of file parsePrep.c.
Referenced by doSetupMacro(), prepFetch(), and prepFetchVerbose().
|
static |
Definition at line 24 of file parsePrep.c.
Referenced by doSetupMacro().
1.8.1.2