#include "system.h"
#include <regex.h>
#include <signal.h>
#include <rpmio_internal.h>
#include <rpmbuild.h>
#include "buildio.h"
#include "myftw.h"
#include "md5.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 |
struct | DepMsg_t |
Defines | |
#define | MYALLPERMS 07777 |
#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') |
Typedefs | |
typedef enum specdFlags_e | specdFlags |
typedef FileListRec_s * | FileListRec |
typedef AttrRec_s * | AttrRec |
typedef FileList_s * | FileList |
Package file tree walk data. | |
typedef 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, char *delim) |
static void | timeCheck (int tc, Header h) |
static int | parseForVerify (char *buf, FileList fl) |
static int | parseForDev (char *buf, FileList fl) |
Parse dev from file manifest. | |
static int | parseForAttr (char *buf, FileList fl) |
Parse attr and defattr from file manifest. | |
static int | parseForConfig (char *buf, FileList fl) |
static int | langCmp (const void *ap, const void *bp) |
static int | parseForLang (char *buf, FileList fl) |
static int | parseForRegexLang (const char *fileName, char **lang) |
static int | parseForRegexMultiLib (const char *fileName) |
static int | parseForSimple (Spec spec, Package pkg, char *buf, FileList fl, const char **fileName) |
static int | compareFileListRecs (const void *ap, const void *bp) |
static int | isDoc (FileList fl, const char *fileName) |
static int | checkHardLinks (FileList fl) |
Verify that file attributes scope over hardlinks correctly. | |
static void | genCpioListAndHeader (FileList fl, TFI_t *cpioList, Header h, int isSrc) |
static FileListRec | freeFileList (FileListRec fileList, int count) |
static int | addFile (FileList fl, const char *diskURL, struct stat *statp) |
static int | processBinaryFile (Package pkg, FileList fl, const char *fileURL) |
static int | processPackageFiles (Spec spec, Package pkg, int installSpecialDoc, int test) |
void | initSourceHeader (Spec spec) |
Create and initialize header for source package. | |
int | processSourceFiles (Spec spec) |
Post-build processing for source package. | |
static StringBuf | getOutputFrom (char *dir, char *argv[], const char *writePtr, int writeBytesLeft, int failNonZero) |
static int | generateDepends (Spec spec, Package pkg, TFI_t cpioList, int multiLib) |
static void | printDepMsg (DepMsg_t *dm, int count, const char **names, const char **versions, int *flags) |
static void | printDeps (Header h) |
int | processBinaryFiles (Spec spec, int installSpecialDoc, int test) |
Post-build processing for binary package(s). | |
Variables | |
int | _noDirTokens |
static int | multiLib = 0 |
VFA_t | verifyAttrs [] |
VFA_t | virtualFileAttributes [] |
DepMsg_t | depMsgs [] |
Definition in file files.c.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 31 of file files.c. Referenced by parseForSimple(). |
|
|
|
Definition at line 29 of file files.c. Referenced by parseForLang(), and parseNoSource(). |
|
Definition at line 28 of file files.c. Referenced by parseForLang(), parseNoSource(), and parseRCPOT(). |
|
|
|
Package file tree walk data.
|
|
|
|
|
|
|
|
|
|
Definition at line 1451 of file files.c. References _, AttrRec_s::ar_fmode, FileList_s::buildRootURL, FileList_s::cur_ar, FileList_s::devmajor, FileList_s::devminor, FileList_s::devtype, FileList_s::inFtw, lang, Lstat(), FileList_s::prefix, FileList_s::processingFailed, rpmError, and urlPath(). Referenced by processBinaryFile(). |
|
Verify that file attributes scope over hardlinks correctly. If partial hardlink sets are possible, then add tracking dependency.
Definition at line 1041 of file files.c. References FileList_s::fileList, FileList_s::fileListRecsUsed, and FileListRec_s::langs. |
|
Definition at line 1013 of file files.c. Referenced by genCpioListAndHeader(). |
|
Definition at line 162 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 processPackageFiles(). |
|
Definition at line 148 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(). |
|
Definition at line 1435 of file files.c. References _free(), FileListRec_s::diskURL, FileListRec_s::fileURL, and FileListRec_s::langs. |
|
|
Definition at line 2405 of file files.c. References PackageStruct::autoProv, PackageStruct::autoReq, CPIO_MULTILIB, transactionFileInfo_s::fc, transactionFileInfo_s::fmapflags, newStringBuf(), and xcalloc(). Referenced by processBinaryFiles(). |
|
Definition at line 2208 of file files.c. References _, appendStringBuf, errno, EXIT_FAILURE, newStringBuf(), RPMERR_EXEC, RPMERR_FORK, rpmError, and strerror(). |
|
Definition at line 1023 of file files.c. References FileList_s::docDirCount, and FileList_s::docDirs. Referenced by genCpioListAndHeader(). |
|
|
|
Definition at line 136 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 processPackageFiles(). |
|
Parse attr and defattr from file manifest.
Definition at line 498 of file files.c. References _, FileList_s::cur_ar, FileList_s::currentSpecdFlags, FileList_s::def_ar, FileList_s::defSpecdFlags, name, FileList_s::processingFailed, RPMERR_BADSPEC, rpmError, and SKIPSPACE. Referenced by processPackageFiles(). |
|
Definition at line 626 of file files.c. References _, FileList_s::currentFlags, name, FileList_s::processingFailed, RPMERR_BADSPEC, rpmError, RPMFILE_CONFIG, and SKIPSPACE. Referenced by processPackageFiles(). |
|
Parse dev from file manifest.
Definition at line 400 of file files.c. References name, RPMERR_BADSPEC, and SKIPSPACE. Referenced by processPackageFiles(). |
|
Definition at line 694 of file files.c. References _, alloca(), FileList_s::currentLangs, name, FileList_s::nLangs, FileList_s::processingFailed, RPMERR_BADSPEC, rpmError, SKIPNONWHITE, SKIPSPACE, and SKIPWHITE. Referenced by processPackageFiles(). |
|
Definition at line 783 of file files.c. References _free(), and rpmExpand(). |
|
Definition at line 827 of file files.c. References _free(), and rpmExpand(). |
|
Definition at line 885 of file files.c. References _, VFA::attribute, FileList_s::currentFlags, FileList_s::docDirCount, FileList_s::docDirs, VFA::flag, FileList_s::isDir, MAXDOCDIR, multiLib, FileList_s::processingFailed, RPMERR_INTERNAL, rpmError, strtokWithQuotes(), virtualFileAttributes, and xstrdup(). Referenced by processPackageFiles(). |
|
Definition at line 306 of file files.c. References _, FileList_s::currentSpecdFlags, FileList_s::currentVerifyFlags, FileList_s::defSpecdFlags, FileList_s::defVerifyFlags, name, FileList_s::processingFailed, RPMERR_BADSPEC, rpmError, and SKIPSPACE. Referenced by processPackageFiles(). |
|
Definition at line 2551 of file files.c. References DepMsg_t::mask, DepMsg_t::msg, RPMMESS_NORMAL, rpmMessage, and DepMsg_t::xor. |
|
Definition at line 2593 of file files.c. References depMsgs, headerFreeData(), headerGetEntryMinMemory(), DepMsg_t::msg, and DepMsg_t::ntag. Referenced by processBinaryFiles(). |
|
Definition at line 1668 of file files.c. References _, _free(), addFile(), FileList_s::buildRootURL, myGlobPatternP(), FileList_s::noGlob, rpmError, rpmGenPath(), rpmGlob(), and urlPath(). Referenced by processPackageFiles(). |
|
Definition at line 1743 of file files.c. References _, _free(), appendStringBuf, SpecStruct::buildRootURL, SpecStruct::buildSubdir, PackageStruct::cpioList, dupAttrRec(), expandMacros(), Fclose(), fdGetFp(), Ferror(), PackageStruct::fileFile, PackageStruct::fileList, Fopen(), Fstrerror(), getStringBuf(), handleComments(), PackageStruct::header, headerGetEntryMinMemory(), SpecStruct::macros, multiLib, nullAttrRec(), parseForAttr(), parseForConfig(), parseForDev(), parseForLang(), parseForSimple(), parseForVerify(), processBinaryFile(), SpecStruct::rootURL, RPMERR_BADFILENAME, rpmError, rpmExpandNumeric(), RPMFILE_MULTILIB, rpmGenPath(), rpmGetPath(), RPMTAG_DEFAULTPREFIX, RPMVERIFY_ALL, SKIPSPACE, splitString(), and xstrdup(). Referenced by processBinaryFiles(). |
|
Definition at line 214 of file files.c. Referenced by parseForSimple(). |
|
Definition at line 257 of file files.c. References _, headerFreeData(), headerGetEntryMinMemory(), RPMMESS_WARNING, rpmMessage, RPMTAG_FILEMTIMES, and RPMTAG_OLDFILENAMES. |
|
Definition at line 289 of file misc.c. Referenced by dbiUpdateRecord(), genCpioListAndHeader(), rpmdbAdd(), and rpmLeadVersion(). |
|
Definition at line 2362 of file files.c. Referenced by printDeps(). |
|
Definition at line 91 of file files.c. Referenced by parseForSimple(), and processPackageFiles(). |
|
Initial value: { { "md5", RPMVERIFY_MD5 }, { "size", RPMVERIFY_FILESIZE }, { "link", RPMVERIFY_LINKTO }, { "user", RPMVERIFY_USER }, { "group", RPMVERIFY_GROUP }, { "mtime", RPMVERIFY_MTIME }, { "mode", RPMVERIFY_MODE }, { "rdev", RPMVERIFY_RDEV }, { NULL, 0 } } |
|
Initial value: { { "%dir", 0 }, { "%doc", RPMFILE_DOC }, { "%ghost", RPMFILE_GHOST }, { "%exclude", RPMFILE_EXCLUDE }, { "%readme", RPMFILE_README }, { "%license", RPMFILE_LICENSE }, { "%multilib", 0 }, { NULL, 0 } } Definition at line 861 of file files.c. Referenced by parseForSimple(). |