rpm
5.4.10
|
The post-build, pre-packaging file tree walk to assemble the package manifest. More...
#include "system.h"
#include <regex.h>
#include <rpmiotypes.h>
#include <rpmio_internal.h>
#include <rpmbf.h>
#include <rpmcb.h>
#include <rpmsx.h>
#include <fts.h>
#include <argv.h>
#include "iosm.h"
#include <rpmbuild.h>
#include <rpmte.h>
#include "rpmfc.h"
#include "buildio.h"
#include "legacy.h"
#include "debug.h"
Go to the source code of this file.
Data Structures | |
struct | FileListRec_s |
struct | AttrRec_s |
struct | FileList_s |
Package file tree walk data. More... | |
struct | VFA |
Macros | |
#define | MYALLPERMS 07777 |
#define | _RPMIOB_INTERNAL |
#define | _RPMSX_INTERNAL /* XXX permit disabling. */ |
#define | _RPMTAG_INTERNAL /* XXX rpmTags->aTags */ |
#define | _RPMFI_INTERNAL |
#define | _RPMTE_INTERNAL |
#define | SKIPWHITE(_x) {while(*(_x) && (xisspace(*_x) || *(_x) == ',')) (_x)++;} |
#define | SKIPNONWHITE(_x) {while(*(_x) &&!(xisspace(*_x) || *(_x) == ',')) (_x)++;} |
#define | MAXDOCDIR 1024 |
#define | fl_dev fl_st.st_dev |
#define | fl_ino fl_st.st_ino |
#define | fl_mode fl_st.st_mode |
#define | fl_nlink fl_st.st_nlink |
#define | fl_uid fl_st.st_uid |
#define | fl_gid fl_st.st_gid |
#define | fl_rdev fl_st.st_rdev |
#define | fl_size fl_st.st_size |
#define | fl_mtime fl_st.st_mtime |
#define | isAttrDefault(_ars) ((_ars)[0] == '-' && (_ars)[1] == '\0') |
#define | _mask (RPMVERIFY_FDIGEST|RPMVERIFY_HMAC) |
Typedefs | |
typedef enum specdFlags_e | specdFlags |
typedef struct FileListRec_s * | FileListRec |
typedef struct AttrRec_s * | AttrRec |
typedef struct FileList_s * | FileList |
Package file tree walk data. More... | |
typedef struct VFA | VFA_t |
Enumerations | |
enum | specdFlags_e { SPECD_DEFFILEMODE = (1 << 0), SPECD_DEFDIRMODE = (1 << 1), SPECD_DEFUID = (1 << 2), SPECD_DEFGID = (1 << 3), SPECD_DEFVERIFY = (1 << 4), SPECD_FILEMODE = (1 << 8), SPECD_DIRMODE = (1 << 9), SPECD_UID = (1 << 10), SPECD_GID = (1 << 11), SPECD_VERIFY = (1 << 12) } |
Functions | |
static void | nullAttrRec (AttrRec ar) |
static void | freeAttrRec (AttrRec ar) |
static void | dupAttrRec (const AttrRec oar, AttrRec nar) |
static char * | strtokWithQuotes (char *s, const char *delim) |
Strip quotes from strtok(3) string. More... | |
static void | timeCheck (int tc, Header h) |
static rpmRC | parseForVerify (char *buf, FileList fl) |
Parse verify and defverify from file manifest. More... | |
static rpmRC | parseForDev (char *buf, FileList fl) |
Parse dev from file manifest. More... | |
static rpmRC | parseForAttr (char *buf, FileList fl) |
Parse attr and defattr from file manifest. More... | |
static rpmRC | parseForConfig (char *buf, FileList fl) |
Parse config from file manifest. More... | |
static int | langCmp (const void *ap, const void *bp) |
static rpmRC | parseForLang (char *buf, FileList fl) |
Parse lang from file manifest. More... | |
static int | parseForRegexLang (const char *fileName, char **lang) |
static rpmRC | parseForSimple (Spec spec, Package pkg, char *buf, FileList fl, const char **fileName) |
Parse simple attributes (e.g. More... | |
static int | compareFileListRecs (const void *ap, const void *bp) |
static int | isDoc (FileList fl, const char *fileName) |
Test if file is located in a docdir. More... | |
static int | checkHardLinks (FileList fl) |
Verify that file attributes scope over hardlinks correctly. More... | |
static int | dncmp (const void *a, const void *b) |
static void | compressFilelist (Header h) |
Convert absolute path tag to (dirname,basename,dirindex) tags. More... | |
static rpmuint32_t | getDigestAlgo (Header h, int isSrc) |
static int | isHardLink (FileListRec flp, FileListRec tlp) |
static int | seenHardLink (FileList fl, FileListRec flp, ino_t *fileid) |
static rpmRC | genCpioListAndHeader (FileList fl, rpmfi *fip, Header h, int isSrc) |
Add file entries to header. More... | |
static FileListRec | freeFileList (FileListRec fileList, int count) |
static rpmRC | recurseDir (FileList fl, const char *diskURL) |
Add directory (and all of its files) to the package manifest. More... | |
static int | addFile (FileList fl, const char *diskURL, struct stat *statp) |
Add a file to the package manifest. More... | |
static rpmRC | processMetadataFile (Package pkg, FileList fl, const char *fileURL, rpmTag tag) |
Add a pubkey/policy/icon to a binary package. More... | |
static rpmRC | processBinaryFile (Package pkg, FileList fl, const char *fileURL) |
Add a file to a binary package. More... | |
static rpmRC | processPackageFiles (Spec spec, Package pkg, int installSpecialDoc, int test) |
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... | |
static int | checkUnpackagedFiles (Spec spec) |
Check for unpackaged files against what's in the build root. More... | |
static int | fiIntersect (rpmfi fi1, rpmfi fi2, size_t buildrootL, int _duplicate_files_terminate_build) |
static int | checkDuplicateFiles (Spec spec, size_t buildrootL, int _duplicate_files_terminate_build) |
Check if the same files are packaged into a few sub-packages. More... | |
static int | packagedDir (Package pkg, const char *d) |
static int | pkgUnpackagedSubdirs (Package pkg, size_t buildrootL, int _unpackaged_subdirs_terminate_build) |
static int | checkUnpackagedSubdirs (Spec spec, size_t buildrootL, int _unpackaged_subdirs_terminate_build) |
Check for unpackaged subdirectories. More... | |
rpmRC | processBinaryFiles (Spec spec, int installSpecialDoc, int test) |
Post-build processing for binary package(s). More... | |
Variables | |
static struct AttrRec_s | root_ar = { NULL, NULL, "root", "root", 0, 0 } |
static VFA_t | verifyAttrs [] |
static VFA_t | virtualFileAttributes [] |
The post-build, pre-packaging file tree walk to assemble the package manifest.
Definition in file files.c.
#define _mask (RPMVERIFY_FDIGEST|RPMVERIFY_HMAC) |
Referenced by genCpioListAndHeader().
#define isAttrDefault | ( | _ars | ) | ((_ars)[0] == '-' && (_ars)[1] == '\0') |
Definition at line 427 of file files.c.
Referenced by parseForAttr().
#define MAXDOCDIR 1024 |
Definition at line 50 of file files.c.
Referenced by parseForSimple().
#define MYALLPERMS 07777 |
Definition at line 9 of file files.c.
Referenced by parseForAttr().
#define SKIPNONWHITE | ( | _x | ) | {while(*(_x) &&!(xisspace(*_x) || *(_x) == ',')) (_x)++;} |
Definition at line 48 of file files.c.
Referenced by parseForAttr(), parseForConfig(), parseForDev(), parseForLang(), and parseForVerify().
#define SKIPWHITE | ( | _x | ) | {while(*(_x) && (xisspace(*_x) || *(_x) == ',')) (_x)++;} |
Definition at line 47 of file files.c.
Referenced by parseForAttr(), parseForConfig(), parseForDev(), parseForLang(), and parseForVerify().
typedef struct FileList_s * FileList |
Package file tree walk data.
typedef struct FileListRec_s * FileListRec |
typedef enum specdFlags_e specdFlags |
enum specdFlags_e |
|
static |
Add a file to the package manifest.
fl | package file tree walk data |
diskURL | path to file |
statp | file stat (possibly NULL) |
Definition at line 1836 of file files.c.
References _, _free(), AttrRec_s::ar_dmode, AttrRec_s::ar_dmodestr, AttrRec_s::ar_fmode, AttrRec_s::ar_fmodestr, AttrRec_s::ar_group, AttrRec_s::ar_user, FileList_s::buildRootURL, FileList_s::cur_ar, FileList_s::currentFlags, FileList_s::currentLangs, FileList_s::currentSpecdFlags, FileList_s::currentVerifyFlags, FileList_s::devmajor, FileList_s::devminor, FileList_s::devtype, FileListRec_s::diskURL, FileList_s::fileCount, FileList_s::fileList, FileList_s::fileListRecsAlloced, FileList_s::fileListRecsUsed, FileListRec_s::fileURL, FileListRec_s::fl_st, FileListRec_s::flags, getGname(), getGnameS(), getUname(), getUnameS(), FileListRec_s::gname, FileList_s::inFtw, FileList_s::isDir, lang, FileListRec_s::langs, Lstat(), FileList_s::nLangs, parseForRegexLang(), FileList_s::prefix, FileList_s::processingFailed, recurseDir(), RPMFILE_OPTIONAL, rpmlog(), RPMLOG_ERR, RPMLOG_WARNING, RPMRC_FAIL, RPMRC_OK, FileListRec_s::specdFlags, FileListRec_s::uname, URL_IS_PATH, urlPath(), FileListRec_s::verifyFlags, xmalloc, xrealloc, and xstrdup().
Referenced by processBinaryFile(), processMetadataFile(), and recurseDir().
|
static |
Check if the same files are packaged into a few sub-packages.
spec | spec file control structure |
Definition at line 2984 of file files.c.
References Package_s::fi, fiIntersect(), Package_s::header, Package_s::next, Spec_s::packages, rpmfiFree(), rpmfiLink(), rpmfiNew(), rpmfiSetHeader(), and RPMTAG_BASENAMES.
Referenced by processBinaryFiles().
|
static |
Verify that file attributes scope over hardlinks correctly.
If partial hardlink sets are possible, then add tracking dependency.
fl | package file tree walk data |
Definition at line 1119 of file files.c.
References FileList_s::fileList, FileList_s::fileListRecsUsed, FileListRec_s::flags, RPMFILE_EXCLUDE, and RPMFILE_GHOST.
Referenced by processPackageFiles().
|
static |
Check for unpackaged files against what's in the build root.
spec | spec file control structure |
Definition at line 2853 of file files.c.
References _, _free(), Package_s::fi, FileList_s::fileList, Package_s::header, Package_s::next, Spec_s::packages, rpmExpand(), rpmExpandNumeric(), rpmfcExec(), rpmfiFN(), rpmfiFree(), rpmfiInit(), rpmfiLink(), rpmfiNew(), rpmfiNext(), rpmiobAppend(), rpmiobFree(), rpmiobNew(), rpmiobStr(), rpmlog(), RPMLOG_ERR, RPMLOG_NOTICE, RPMLOG_WARNING, and RPMTAG_BASENAMES.
Referenced by processBinaryFiles().
|
static |
Check for unpackaged subdirectories.
spec | spec file control structure |
Definition at line 3130 of file files.c.
References Package_s::next, Spec_s::packages, and pkgUnpackagedSubdirs().
Referenced by processBinaryFiles().
|
static |
Definition at line 1082 of file files.c.
References urlPath().
Referenced by genCpioListAndHeader().
|
static |
Convert absolute path tag to (dirname,basename,dirindex) tags.
h | header |
Definition at line 1166 of file files.c.
References _free(), alloca(), rpmDataType_u::argv, _HE_s::c, dncmp(), headerDel(), headerGet(), headerIsEntry(), headerPut(), _HE_s::p, RPM_STRING_ARRAY_TYPE, RPM_UINT32_TYPE, RPMTAG_BASENAMES, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, RPMTAG_OLDFILENAMES, _HE_s::t, _HE_s::tag, rpmDataType_u::ui32p, and urlPath().
Referenced by genCpioListAndHeader().
|
static |
Definition at line 190 of file files.c.
References AttrRec_s::ar_dmode, AttrRec_s::ar_dmodestr, AttrRec_s::ar_fmode, AttrRec_s::ar_fmodestr, AttrRec_s::ar_group, AttrRec_s::ar_user, freeAttrRec(), and xstrdup().
Referenced by parseForAttr(), and processPackageFiles().
|
static |
Definition at line 2928 of file files.c.
References _, _free(), alloca(), headerGet(), _HE_s::p, rpmfiFMode(), rpmfiFN(), rpmfiInit(), rpmfiNext(), rpmiobAppend(), rpmiobFree(), rpmiobNew(), rpmiobStr(), rpmlog(), RPMLOG_ERR, RPMLOG_WARNING, RPMTAG_NVRA, rpmDataType_u::str, and _HE_s::tag.
Referenced by checkDuplicateFiles().
|
static |
Definition at line 176 of file files.c.
References _free(), AttrRec_s::ar_dmodestr, AttrRec_s::ar_fmodestr, AttrRec_s::ar_group, and AttrRec_s::ar_user.
Referenced by dupAttrRec(), and processPackageFiles().
|
static |
Definition at line 1806 of file files.c.
References _free(), FileListRec_s::diskURL, FileListRec_s::fileURL, FileListRec_s::langs, and recurseDir().
Referenced by processPackageFiles(), and processSourceFiles().
Add file entries to header.
Should directories have doc/config attributes? (#14531)
Remove RPMTAG_OLDFILENAMES, add dirname/basename instead.
fl | package file tree walk data |
*fip | file info for package |
h | |
isSrc |
Definition at line 1352 of file files.c.
References _, _free(), _mask, _rpmbuildFlags, alloca(), _HE_s::append, rpmDataType_u::argv, FileList_s::buildRootURL, _HE_s::c, compareFileListRecs(), compressFilelist(), FileListRec_s::diskURL, dodigest(), FA_COPYOUT, FA_SKIP, FileList_s::fileList, FileList_s::fileListRecsUsed, FileListRec_s::fileURL, FileListRec_s::flags, getDigestAlgo(), FileListRec_s::gname, hashFunctionString(), headerPut(), IOSM_FOLLOW_SYMLINKS, IOSM_MAP_GID, IOSM_MAP_MODE, IOSM_MAP_PATH, IOSM_MAP_TYPE, IOSM_MAP_UID, isDoc(), FileListRec_s::langs, _HE_s::p, FileList_s::prefix, FileList_s::processingFailed, Readlink(), RPM_STRING_ARRAY_TYPE, RPM_UINT16_TYPE, RPM_UINT32_TYPE, rpmExpandNumeric(), rpmfiFree(), RPMFILE_CONFIG, RPMFILE_DOC, RPMFILE_EXCLUDE, RPMFILE_GHOST, rpmfiNew(), rpmlibNeedsFeature(), rpmlog(), RPMLOG_ERR, RPMLOG_WARNING, RPMRC_FAIL, RPMRC_OK, rpmsxFree(), rpmsxMatch(), rpmsxNew(), RPMTAG_BASENAMES, RPMTAG_FILECONTEXTS, RPMTAG_FILEDEVICES, RPMTAG_FILEDIGESTALGOS, RPMTAG_FILEDIGESTS, RPMTAG_FILEFLAGS, RPMTAG_FILEGROUPNAME, RPMTAG_FILEINODES, RPMTAG_FILELANGS, RPMTAG_FILELINKTOS, RPMTAG_FILEMODES, RPMTAG_FILEMTIMES, RPMTAG_FILERDEVS, RPMTAG_FILESIZES, RPMTAG_FILEUSERNAME, RPMTAG_FILEVERIFYFLAGS, RPMTAG_OLDFILENAMES, RPMTAG_SIZE, RPMVERIFY_FDIGEST, RPMVERIFY_FILESIZE, RPMVERIFY_HMAC, RPMVERIFY_LINKTO, RPMVERIFY_MTIME, S_ISLNK, seenHardLink(), SPECD_DEFDIRMODE, SPECD_DEFFILEMODE, SPECD_DEFGID, SPECD_DEFUID, SPECD_DEFVERIFY, SPECD_DIRMODE, SPECD_FILEMODE, SPECD_GID, SPECD_UID, SPECD_VERIFY, FileListRec_s::specdFlags, stpcpy(), _HE_s::t, _HE_s::tag, FileList_s::totalFileSize, TR_ADDED, rpmDataType_u::ui16p, rpmDataType_u::ui32p, FileListRec_s::uname, urlPath(), FileListRec_s::verifyFlags, xcalloc(), and xmalloc.
Referenced by processPackageFiles(), and processSourceFiles().
|
static |
Definition at line 1272 of file files.c.
References alloca(), _HE_s::c, headerPut(), _HE_s::p, PGPHASHALGO_ADLER32, PGPHASHALGO_CRC32, PGPHASHALGO_CRC64, PGPHASHALGO_HAVAL_5_160, PGPHASHALGO_MD2, PGPHASHALGO_MD4, PGPHASHALGO_MD5, PGPHASHALGO_RIPEMD128, PGPHASHALGO_RIPEMD160, PGPHASHALGO_SHA1, PGPHASHALGO_SHA256, PGPHASHALGO_SHA384, PGPHASHALGO_SHA512, PGPHASHALGO_TIGER192, RPM_UINT32_TYPE, rpmExpandNumeric(), rpmlibNeedsFeature(), RPMTAG_FILEDIGESTALGO, _HE_s::t, _HE_s::tag, and rpmDataType_u::ui32p.
Referenced by genCpioListAndHeader().
Create and initialize header for source package.
spec | spec file control structure |
*sfp | srpm file list (may be NULL) |
Definition at line 2552 of file files.c.
References _free(), alloca(), _HE_s::append, rpmDataType_u::argv, Spec_s::BACount, Spec_s::BANames, _HE_s::c, Source::flags, Spec_s::foo, getSourceDir(), Package_s::header, HEADER_I18NTABLE, headerFini(), headerInit(), headerIsEntry(), headerNext(), headerPut(), Source::next, Spec_s::nfoo, Source::num, _HE_s::p, Spec_s::packages, rpmDataType_u::ptr, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, RPM_UINT32_TYPE, rpmExpand(), RPMFILE_GHOST, RPMFILE_PATCH, RPMFILE_SOURCE, rpmGetPath(), rpmiobAppend(), rpmiobFree(), rpmiobNew(), rpmiobStr(), RPMTAG_ARCH, RPMTAG_BUGURL, RPMTAG_BUILDARCHS, RPMTAG_CHANGELOGNAME, RPMTAG_CHANGELOGTEXT, RPMTAG_CHANGELOGTIME, RPMTAG_DESCRIPTION, RPMTAG_DISTEPOCH, RPMTAG_DISTRIBUTION, RPMTAG_DISTURL, RPMTAG_EPOCH, RPMTAG_GIF, RPMTAG_GROUP, RPMTAG_ICON, RPMTAG_LICENSE, RPMTAG_NAME, RPMTAG_NOPATCH, RPMTAG_NOSOURCE, RPMTAG_OS, RPMTAG_PACKAGER, RPMTAG_PATCH, RPMTAG_PROVIDEFLAGS, RPMTAG_PROVIDENAME, RPMTAG_PROVIDEVERSION, RPMTAG_RELEASE, RPMTAG_SOURCE, RPMTAG_SUMMARY, RPMTAG_URL, RPMTAG_VENDOR, RPMTAG_VERSION, RPMTAG_XPM, Source::source, Spec_s::sourceHdrInit, Spec_s::sourceHeader, Spec_s::sources, Spec_s::specFile, rpmDataType_u::str, _HE_s::t, _HE_s::tag, tagValue(), rpmDataType_u::ui32p, and xstrcasecmp().
Referenced by _specQuery(), and processSourceFiles().
|
static |
Test if file is located in a docdir.
fl | package file tree walk data |
fileName | file path |
Definition at line 1099 of file files.c.
References FileList_s::docDirCount, and FileList_s::docDirs.
Referenced by genCpioListAndHeader().
|
static |
Definition at line 1323 of file files.c.
Referenced by seenHardLink().
|
static |
Definition at line 726 of file files.c.
Referenced by parseForLang().
|
static |
Definition at line 164 of file files.c.
References AttrRec_s::ar_dmode, AttrRec_s::ar_dmodestr, AttrRec_s::ar_fmode, AttrRec_s::ar_fmodestr, AttrRec_s::ar_group, and AttrRec_s::ar_user.
Referenced by parseForAttr(), and processPackageFiles().
|
inlinestatic |
Definition at line 3021 of file files.c.
References Package_s::fi, and rpmfiFNBF().
Referenced by pkgUnpackagedSubdirs().
Parse attr and defattr from file manifest.
buf | current spec file line |
fl | package file tree walk data |
Definition at line 535 of file files.c.
References _, alloca(), FileList_s::cur_ar, FileList_s::currentSpecdFlags, FileList_s::def_ar, FileList_s::defSpecdFlags, dupAttrRec(), isAttrDefault, MYALLPERMS, name, nullAttrRec(), FileList_s::processingFailed, rpmlog(), RPMLOG_ERR, RPMRC_FAIL, RPMRC_OK, SKIPNONWHITE, SKIPSPACE, SKIPWHITE, SPECD_DIRMODE, SPECD_FILEMODE, SPECD_GID, SPECD_UID, and FileListRec_s::specdFlags.
Referenced by processPackageFiles(), and processSourceFiles().
Parse config from file manifest.
buf | current spec file line |
fl | package file tree walk data |
Definition at line 666 of file files.c.
References _, alloca(), FileList_s::currentFlags, name, FileList_s::processingFailed, RPMFILE_CONFIG, RPMFILE_MISSINGOK, RPMFILE_NOREPLACE, rpmlog(), RPMLOG_ERR, RPMRC_FAIL, RPMRC_OK, SKIPNONWHITE, SKIPSPACE, and SKIPWHITE.
Referenced by processPackageFiles().
Parse dev from file manifest.
buf | current spec file line |
fl | package file tree walk data |
Definition at line 435 of file files.c.
References _, alloca(), FileList_s::devmajor, FileList_s::devminor, FileList_s::devtype, name, FileList_s::noGlob, FileList_s::processingFailed, rpmlog(), RPMLOG_ERR, RPMRC_FAIL, RPMRC_OK, SKIPNONWHITE, SKIPSPACE, SKIPWHITE, and xisdigit().
Referenced by processPackageFiles().
Parse lang from file manifest.
buf | current spec file line |
fl | package file tree walk data |
Definition at line 738 of file files.c.
References _, alloca(), FileList_s::currentLangs, langCmp(), name, FileList_s::nLangs, FileList_s::processingFailed, rpmlog(), RPMLOG_ERR, RPMRC_FAIL, RPMRC_OK, SKIPNONWHITE, SKIPSPACE, SKIPWHITE, xmalloc, and xrealloc.
Referenced by processPackageFiles().
|
static |
Definition at line 827 of file files.c.
References _free(), and rpmExpand().
Referenced by addFile().
|
static |
Parse simple attributes (e.g.
dir) from file manifest.
spec | spec file control structure |
pkg | package control structure |
buf | current spec file line |
fl | package file tree walk data |
*fileName | file name |
Definition at line 906 of file files.c.
References _, _free(), VFA::attribute, FileList_s::currentFlags, FileList_s::docDirCount, FileList_s::docDirs, VFA::flag, Package_s::header, headerSprintf(), FileList_s::isDir, FileList_s::isSpecialDoc, MAXDOCDIR, VFA::not, FileList_s::passedSpecialDoc, FileList_s::processingFailed, rpmExpand(), RPMFILE_DOC, RPMFILE_ICON, RPMFILE_POLICY, RPMFILE_PUBKEY, rpmGetPath(), rpmHeaderFormats, rpmiobAppend(), rpmiobNew(), rpmlog(), RPMLOG_CRIT, RPMLOG_ERR, RPMRC_FAIL, RPMRC_OK, Package_s::specialDoc, strtokWithQuotes(), URL_IS_PATH, urlPath(), and xstrdup().
Referenced by processPackageFiles().
Parse verify and defverify from file manifest.
buf | current spec file line |
fl | package file tree walk data |
Definition at line 329 of file files.c.
References _, alloca(), VFA::attribute, FileList_s::currentSpecdFlags, FileList_s::currentVerifyFlags, FileList_s::defSpecdFlags, FileList_s::defVerifyFlags, VFA::flag, name, FileList_s::processingFailed, rpmlog(), RPMLOG_ERR, RPMRC_FAIL, RPMRC_OK, RPMVERIFY_FDIGEST, RPMVERIFY_HMAC, RPMVERIFY_NONE, SKIPNONWHITE, SKIPSPACE, SKIPWHITE, SPECD_VERIFY, FileListRec_s::specdFlags, and FileListRec_s::verifyFlags.
Referenced by processPackageFiles().
|
static |
Definition at line 3036 of file files.c.
References _, _free(), alloca(), Package_s::fi, Package_s::header, headerGet(), _HE_s::p, packagedDir(), rpmfiFC(), rpmfiFN(), rpmfiFNMaxLen(), rpmfiFree(), rpmfiInit(), rpmfiLink(), rpmfiNew(), rpmfiNext(), rpmiobAppend(), rpmiobFree(), rpmiobNew(), rpmiobStr(), rpmlog(), RPMLOG_ERR, RPMLOG_WARNING, RPMTAG_BASENAMES, RPMTAG_NVRA, rpmDataType_u::str, _HE_s::tag, xrealloc, and xstrdup().
Referenced by checkUnpackagedSubdirs().
Add a file to a binary package.
pkg | package control structure |
fl | package file tree walk data |
fileURL |
Definition at line 2179 of file files.c.
References _, _free(), addFile(), FileList_s::buildRootURL, FileList_s::currentFlags, Glob_pattern_p(), FileList_s::noGlob, FileList_s::processingFailed, RPMFILE_OPTIONAL, rpmGenPath(), rpmGlob(), rpmlog(), RPMLOG_ERR, RPMLOG_WARNING, RPMRC_FAIL, RPMRC_OK, and urlPath().
Referenced by processPackageFiles().
Post-build processing for binary package(s).
spec | spec file control structure |
installSpecialDoc | |
test | don't execute scripts or package if testing |
Definition at line 3144 of file files.c.
References _, _free(), alloca(), checkDuplicateFiles(), checkUnpackagedFiles(), checkUnpackagedSubdirs(), Package_s::fileList, Package_s::header, headerGet(), headerMacrosLoad(), headerMacrosUnload(), Package_s::next, _HE_s::p, Spec_s::packages, processPackageFiles(), processScriptFiles(), providePackageNVR(), rpmDataType_u::ptr, rpmExpand(), rpmExpandNumeric(), rpmfcGenerateDepends(), rpmlog(), RPMLOG_NOTICE, RPMRC_FAIL, RPMRC_OK, RPMTAG_NVRA, rpmDataType_u::str, and _HE_s::tag.
Referenced by buildSpec().
|
static |
Add a pubkey/policy/icon to a binary package.
pkg | package control structure |
fl | package file tree walk data |
fileURL | path to file, relative is builddir, absolute buildroot. |
tag | tag to add |
Definition at line 2092 of file files.c.
References _, _free(), addFile(), alloca(), _HE_s::append, rpmDataType_u::argv, FileList_s::buildRootURL, _HE_s::c, Package_s::header, headerPut(), _HE_s::p, PGPARMOR_PUBKEY, pgpArmorWrap(), pgpReadPkts(), FileList_s::processingFailed, RPM_STRING_ARRAY_TYPE, rpmGenPath(), rpmiobFree(), rpmiobSlurp(), rpmlog(), RPMLOG_ERR, RPMRC_FAIL, RPMRC_OK, RPMTAG_POLICIES, RPMTAG_PUBKEYS, _HE_s::t, _HE_s::tag, urlPath(), and xcalloc().
Referenced by processPackageFiles().
Definition at line 2260 of file files.c.
References _, _free(), alloca(), argvFree(), argvSplit(), FileList_s::buildRootURL, Spec_s::buildSubdir, checkHardLinks(), FileList_s::cur_ar, FileList_s::currentFlags, FileList_s::currentLangs, FileList_s::currentSpecdFlags, FileList_s::currentVerifyFlags, FileList_s::def_ar, FileList_s::defSpecdFlags, FileList_s::defVerifyFlags, FileList_s::devmajor, FileList_s::devminor, FileList_s::devtype, FileList_s::docDirCount, FileList_s::docDirs, doScript(), dupAttrRec(), expandMacros(), Fclose(), fdGetFp(), Ferror(), Package_s::fi, FileList_s::fileCount, Package_s::fileFile, FileList_s::fileList, Package_s::fileList, FileList_s::fileListRecsAlloced, FileList_s::fileListRecsUsed, Fopen(), freeAttrRec(), freeFileList(), Fstrerror(), genCpioListAndHeader(), handleComments(), Package_s::header, headerGet(), FileList_s::inFtw, FileList_s::isDir, FileList_s::isSpecialDoc, Spec_s::macros, FileList_s::nLangs, FileList_s::noGlob, nullAttrRec(), _HE_s::p, parseForAttr(), parseForConfig(), parseForDev(), parseForLang(), parseForSimple(), parseForVerify(), FileList_s::passedSpecialDoc, FileList_s::prefix, processBinaryFile(), FileList_s::processingFailed, processMetadataFile(), Spec_s::rootURL, RPMBUILD_STRINGBUF, rpmExpandNumeric(), RPMFILE_POLICY, RPMFILE_PUBKEY, rpmGenPath(), rpmGetPath(), rpmiobAppend(), rpmiobStr(), rpmlibNeedsFeature(), rpmlog(), RPMLOG_ERR, RPMRC_FAIL, RPMRC_OK, RPMTAG_DEFAULTPREFIX, RPMTAG_POLICIES, RPMTAG_PUBKEYS, RPMVERIFY_ALL, SKIPSPACE, Package_s::specialDoc, rpmDataType_u::str, _HE_s::tag, Spec_s::timeCheck, timeCheck(), FileList_s::totalFileSize, and xstrdup().
Referenced by processBinaryFiles().
int processSourceFiles | ( | Spec | spec | ) |
Post-build processing for source package.
spec | spec file control structure |
Definition at line 2737 of file files.c.
References _, _free(), AttrRec_s::ar_fmode, AttrRec_s::ar_fmodestr, AttrRec_s::ar_group, AttrRec_s::ar_user, argvFree(), argvSplit(), FileList_s::buildRootURL, FileList_s::def_ar, FileListRec_s::diskURL, errno, Spec_s::fi, FileList_s::fileList, FileList_s::fileListRecsUsed, FileListRec_s::fileURL, FileListRec_s::fl_st, FileListRec_s::flags, freeFileList(), genCpioListAndHeader(), getGname(), getGnameS(), getUname(), getUnameS(), FileListRec_s::gname, initSourceHeader(), FileListRec_s::langs, Spec_s::numSources, parseForAttr(), FileList_s::prefix, FileList_s::processingFailed, rpmExpand(), RPMFILE_GHOST, RPMFILE_SPECFILE, rpmiobFree(), rpmiobNew(), rpmiobStr(), rpmlog(), RPMLOG_ERR, RPMVERIFY_ALL, SKIPSPACE, snprintf(), Spec_s::sourceHeader, Stat(), FileList_s::totalFileSize, FileListRec_s::uname, urlPath(), FileListRec_s::verifyFlags, xcalloc(), and xstrdup().
Referenced by buildSpec().
Add directory (and all of its files) to the package manifest.
fl | package file tree walk data |
diskURL | path to file |
Definition at line 2035 of file files.c.
References addFile(), _ftsent::fts_accpath, Fts_close(), FTS_COMFOLLOW, FTS_D, FTS_DC, FTS_DEFAULT, FTS_DNR, FTS_DOT, FTS_DP, FTS_ERR, FTS_F, _ftsent::fts_info, FTS_INIT, FTS_NOCHDIR, FTS_NS, FTS_NSOK, Fts_open(), FTS_PHYSICAL, Fts_read(), FTS_SL, FTS_SLNONE, _ftsent::fts_statp, FTS_W, ftsSet, FileList_s::inFtw, FileList_s::isDir, RPMRC_FAIL, and RPMRC_OK.
Referenced by addFile(), and freeFileList().
|
static |
Definition at line 1331 of file files.c.
References FileList_s::fileList, and isHardLink().
Referenced by genCpioListAndHeader().
|
static |
Strip quotes from strtok(3) string.
s | string |
delim | token delimiters |
Definition at line 227 of file files.c.
Referenced by parseForSimple().
|
static |
Definition at line 270 of file files.c.
References _, _free(), alloca(), rpmDataType_u::argv, _HE_s::c, headerGet(), _HE_s::p, rpmDataType_u::ptr, rpmlog(), RPMLOG_WARNING, RPMTAG_FILEMTIMES, RPMTAG_OLDFILENAMES, _HE_s::tag, and rpmDataType_u::ui32p.
Referenced by processPackageFiles().
|
static |
|
static |
|
static |