rpm  5.2.1
Data Structures | Defines | Typedefs | Enumerations | Functions | Variables
build/files.c File Reference

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 <rpmcb.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"
Include dependency graph for files.c:

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

Defines

#define MYALLPERMS   07777
#define _RPMIOB_INTERNAL
#define _RPMTAG_INTERNAL
#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')

Typedefs

typedef enum specdFlags_e specdFlags
typedef struct FileListRec_sFileListRec
typedef struct AttrRec_sAttrRec
typedef struct FileList_sFileList
 Package file tree walk data.
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.
static void timeCheck (int tc, Header h)
static rpmRC parseForVerify (char *buf, FileList fl)
 Parse verify and defverify from file manifest.
static rpmRC parseForDev (char *buf, FileList fl)
 Parse dev from file manifest.
static rpmRC parseForAttr (char *buf, FileList fl)
 Parse attr and defattr from file manifest.
static rpmRC parseForConfig (char *buf, FileList fl)
 Parse config from file manifest.
static int langCmp (const void *ap, const void *bp)
static rpmRC parseForLang (char *buf, FileList fl)
 Parse lang from file manifest.
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.
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.
static int checkHardLinks (FileList fl)
 Verify that file attributes scope over hardlinks correctly.
static int dncmp (const void *a, const void *b)
static void compressFilelist (Header h)
 Convert absolute path tag to (dirname,basename,dirindex) tags.
static rpmuint32_t getDigestAlgo (Header h, int isSrc)
static void genCpioListAndHeader (FileList fl, rpmfi *fip, Header h, int isSrc)
 Add file entries to header.
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.
static int addFile (FileList fl, const char *diskURL, struct stat *statp)
 Add a file to the package manifest.
static rpmRC processMetadataFile (Package pkg, FileList fl, const char *fileURL, rpmTag tag)
 Add a pubkey/policy/icon to a binary package.
static rpmRC processBinaryFile (Package pkg, FileList fl, const char *fileURL)
 Add a file to a binary package.
static rpmRC processPackageFiles (Spec spec, Package pkg, int installSpecialDoc, int test)
int initSourceHeader (Spec spec, rpmiob *sfp)
 Create and initialize header for source package.
int processSourceFiles (Spec spec)
 Post-build processing for source package.
static int checkUnpackagedFiles (Spec spec)
 Check for unpackaged files against what's in the build root.
static int fiIntersect (rpmfi fi1, rpmfi fi2, Header h1, Header h2)
static int checkDuplicateFiles (Spec spec)
 Check if the same files are packaged into a few sub-packages.
static int packagedDir (Package pkg, const char *d)
static int pkgUnpackagedSubdirs (Package pkg)
static int checkUnpackagedSubdirs (Spec spec)
 Check for unpackaged subdirectories.
rpmRC processBinaryFiles (Spec spec, int installSpecialDoc, int test)
 Post-build processing for binary package(s).

Variables

static struct AttrRec_s root_ar = { NULL, NULL, "root", "root", 0, 0 }
static VFA_t verifyAttrs []
static VFA_t virtualFileAttributes []

Detailed Description

The post-build, pre-packaging file tree walk to assemble the package manifest.

Definition in file files.c.


Define Documentation

#define _RPMFI_INTERNAL

Definition at line 26 of file files.c.

#define _RPMIOB_INTERNAL

Definition at line 17 of file files.c.

#define _RPMTAG_INTERNAL

Definition at line 25 of file files.c.

#define _RPMTE_INTERNAL

Definition at line 29 of file files.c.

#define fl_dev   fl_st.st_dev

Definition at line 69 of file files.c.

#define fl_gid   fl_st.st_gid

Definition at line 74 of file files.c.

#define fl_ino   fl_st.st_ino

Definition at line 70 of file files.c.

#define fl_mode   fl_st.st_mode

Definition at line 71 of file files.c.

#define fl_mtime   fl_st.st_mtime

Definition at line 77 of file files.c.

#define fl_nlink   fl_st.st_nlink

Definition at line 72 of file files.c.

#define fl_rdev   fl_st.st_rdev

Definition at line 75 of file files.c.

#define fl_size   fl_st.st_size

Definition at line 76 of file files.c.

#define fl_uid   fl_st.st_uid

Definition at line 73 of file files.c.

#define isAttrDefault (   _ars)    ((_ars)[0] == '-' && (_ars)[1] == '\0')

Definition at line 412 of file files.c.

Referenced by parseForAttr().

#define MAXDOCDIR   1024

Definition at line 47 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 45 of file files.c.

Referenced by parseForAttr(), parseForConfig(), parseForDev(), parseForLang(), and parseForVerify().

#define SKIPWHITE (   _x)    {while(*(_x) && (xisspace(*_x) || *(_x) == ',')) (_x)++;}

Definition at line 44 of file files.c.

Referenced by parseForAttr(), parseForConfig(), parseForDev(), parseForLang(), and parseForVerify().


Typedef Documentation

typedef struct AttrRec_s * AttrRec
typedef struct FileList_s * FileList

Package file tree walk data.

typedef struct FileListRec_s * FileListRec
typedef enum specdFlags_e specdFlags
typedef struct VFA VFA_t

Enumeration Type Documentation

Enumerator:
SPECD_DEFFILEMODE 
SPECD_DEFDIRMODE 
SPECD_DEFUID 
SPECD_DEFGID 
SPECD_DEFVERIFY 
SPECD_FILEMODE 
SPECD_DIRMODE 
SPECD_UID 
SPECD_GID 
SPECD_VERIFY 

Definition at line 51 of file files.c.


Function Documentation

static int addFile ( FileList  fl,
const char *  diskURL,
struct stat *  statp 
) [static]
static int checkDuplicateFiles ( Spec  spec) [static]

Check if the same files are packaged into a few sub-packages.

Parameters:
specspec file control structure
Returns:
number of duplicate files

Definition at line 2955 of file files.c.

References fiIntersect(), Package_s::header, Package_s::next, Spec_s::packages, rpmfiFree(), and rpmfiNew().

Referenced by processBinaryFiles().

static int checkHardLinks ( FileList  fl) [static]

Verify that file attributes scope over hardlinks correctly.

If partial hardlink sets are possible, then add tracking dependency.

Parameters:
flpackage file tree walk data
Returns:
1 if partial hardlink sets can exist, 0 otherwise.

Definition at line 1104 of file files.c.

References FileList_s::fileList, FileList_s::fileListRecsUsed, FileListRec_s::flags, RPMFILE_EXCLUDE, and RPMFILE_GHOST.

Referenced by processPackageFiles().

static int checkUnpackagedFiles ( Spec  spec) [static]

Check for unpackaged files against what's in the build root.

Parameters:
specspec file control structure
Returns:
-1 if skipped, 0 on OK, 1 on error

Definition at line 2830 of file files.c.

References _, _free(), FileList_s::fileList, Package_s::header, Package_s::next, Spec_s::packages, rpmExpand(), rpmExpandNumeric(), rpmfcExec(), rpmfiFN(), rpmfiFree(), rpmfiInit(), rpmfiNew(), rpmfiNext(), rpmiobAppend(), rpmiobFree(), rpmiobNew(), rpmiobStr(), rpmlog(), RPMLOG_ERR, RPMLOG_NOTICE, and RPMLOG_WARNING.

Referenced by processBinaryFiles().

static int checkUnpackagedSubdirs ( Spec  spec) [static]

Check for unpackaged subdirectories.

Parameters:
specspec file control structure
Returns:
number of unpackaged subdirectories

Definition at line 3097 of file files.c.

References Package_s::next, Spec_s::packages, and pkgUnpackagedSubdirs().

Referenced by processBinaryFiles().

static int compareFileListRecs ( const void *  ap,
const void *  bp 
) [static]

Definition at line 1067 of file files.c.

References urlPath().

Referenced by genCpioListAndHeader().

static void compressFilelist ( Header  h) [static]

Convert absolute path tag to (dirname,basename,dirindex) tags.

Parameters:
hheader

Definition at line 1151 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, _HE_s::t, _HE_s::tag, rpmDataType_u::ui32p, and urlPath().

Referenced by genCpioListAndHeader().

static int dncmp ( const void *  a,
const void *  b 
) [static]

Definition at line 1135 of file files.c.

References urlPath().

Referenced by compressFilelist().

static void dupAttrRec ( const AttrRec  oar,
AttrRec  nar 
) [static]
static int fiIntersect ( rpmfi  fi1,
rpmfi  fi2,
Header  h1,
Header  h2 
) [static]
static void freeAttrRec ( AttrRec  ar) [static]
static FileListRec freeFileList ( FileListRec  fileList,
int  count 
) [static]
static void genCpioListAndHeader ( FileList  fl,
rpmfi fip,
Header  h,
int  isSrc 
) [static]

Add file entries to header.

Todo:

Should directories have doc/config attributes? (#14531)

Remove RPMTAG_OLDFILENAMES, add dirname/basename instead.

Parameters:
flpackage file tree walk data
Return values:
*fipfile info for package
Parameters:
h
isSrc

Definition at line 1317 of file files.c.

References _, _free(), _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, freecon, getDigestAlgo(), FileListRec_s::gname, headerPut(), IOSM_FOLLOW_SYMLINKS, IOSM_MAP_GID, IOSM_MAP_MODE, IOSM_MAP_PATH, IOSM_MAP_TYPE, IOSM_MAP_UID, isDoc(), FileListRec_s::langs, matchpathcon, matchpathcon_fini, matchpathcon_init, _HE_s::p, FileList_s::prefix, FileList_s::processingFailed, Readlink(), RPM_STRING_ARRAY_TYPE, RPM_UINT16_TYPE, RPM_UINT32_TYPE, rpmfiFree(), RPMFILE_CONFIG, RPMFILE_DOC, RPMFILE_EXCLUDE, RPMFILE_GHOST, rpmfiNew(), rpmGetPath(), rpmlibNeedsFeature(), rpmlog(), RPMLOG_ERR, RPMLOG_WARNING, RPMVERIFY_FILESIZE, RPMVERIFY_LINKTO, RPMVERIFY_MD5, RPMVERIFY_MTIME, S_ISLNK, 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 rpmuint32_t getDigestAlgo ( Header  h,
int  isSrc 
) [static]
static int isDoc ( FileList  fl,
const char *  fileName 
) [static]

Test if file is located in a docdir.

Parameters:
flpackage file tree walk data
fileNamefile path
Returns:
1 if doc file, 0 if not

Definition at line 1084 of file files.c.

References FileList_s::docDirCount, and FileList_s::docDirs.

Referenced by genCpioListAndHeader().

static int langCmp ( const void *  ap,
const void *  bp 
) [static]

Definition at line 711 of file files.c.

Referenced by parseForLang().

static void nullAttrRec ( AttrRec  ar) [static]
static int packagedDir ( Package  pkg,
const char *  d 
) [static]

Definition at line 2976 of file files.c.

References Package_s::header, rpmfiFMode(), rpmfiFN(), rpmfiFree(), rpmfiInit(), rpmfiNew(), and rpmfiNext().

Referenced by pkgUnpackagedSubdirs().

static rpmRC parseForAttr ( char *  buf,
FileList  fl 
) [static]

Parse attr and defattr from file manifest.

Parameters:
bufcurrent spec file line
flpackage file tree walk data
Returns:
RPMRC_OK on success

Definition at line 520 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, and SPECD_UID.

Referenced by processPackageFiles(), and processSourceFiles().

static rpmRC parseForConfig ( char *  buf,
FileList  fl 
) [static]

Parse config from file manifest.

Parameters:
bufcurrent spec file line
flpackage file tree walk data
Returns:
RPMRC_OK on success

Definition at line 651 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().

static rpmRC parseForDev ( char *  buf,
FileList  fl 
) [static]

Parse dev from file manifest.

Parameters:
bufcurrent spec file line
flpackage file tree walk data
Returns:
RPMRC_OK on success

Definition at line 420 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().

static rpmRC parseForLang ( char *  buf,
FileList  fl 
) [static]

Parse lang from file manifest.

Parameters:
bufcurrent spec file line
flpackage file tree walk data
Returns:
RPMRC_OK on success

Definition at line 723 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 int parseForRegexLang ( const char *  fileName,
char **  lang 
) [static]

Definition at line 812 of file files.c.

References _free(), and rpmExpand().

Referenced by addFile().

static rpmRC parseForSimple ( Spec  spec,
Package  pkg,
char *  buf,
FileList  fl,
const char **  fileName 
) [static]

Parse simple attributes (e.g.

dir) from file manifest.

Parameters:
specspec file control structure
pkgpackage control structure
bufcurrent spec file line
flpackage file tree walk data
Return values:
*fileNamefile name
Returns:
RPMRC_OK on success

Definition at line 891 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().

static rpmRC parseForVerify ( char *  buf,
FileList  fl 
) [static]

Parse verify and defverify from file manifest.

Parameters:
bufcurrent spec file line
flpackage file tree walk data
Returns:
RPMRC_OK on success

Definition at line 324 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_NONE, SKIPNONWHITE, SKIPSPACE, SKIPWHITE, and SPECD_VERIFY.

Referenced by processPackageFiles().

static int pkgUnpackagedSubdirs ( Package  pkg) [static]
static rpmRC processBinaryFile ( Package  pkg,
FileList  fl,
const char *  fileURL 
) [static]

Add a file to a binary package.

Parameters:
pkgpackage control structure
flpackage file tree walk data
fileURL
Returns:
RPMRC_OK on success

Definition at line 2160 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().

static rpmRC processMetadataFile ( Package  pkg,
FileList  fl,
const char *  fileURL,
rpmTag  tag 
) [static]

Add a pubkey/policy/icon to a binary package.

Parameters:
pkgpackage control structure
flpackage file tree walk data
fileURLpath to file, relative is builddir, absolute buildroot.
tagtag to add
Returns:
RPMRC_OK on success

Definition at line 2073 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, pgpArmorWrap(), pgpReadPkts(), FileList_s::processingFailed, RPM_STRING_ARRAY_TYPE, rpmGenPath(), rpmiobFree(), rpmiobSlurp(), rpmlog(), RPMLOG_ERR, RPMRC_FAIL, RPMRC_OK, _HE_s::t, _HE_s::tag, urlPath(), and xcalloc().

Referenced by processPackageFiles().

static rpmRC processPackageFiles ( Spec  spec,
Package  pkg,
int  installSpecialDoc,
int  test 
) [static]

Definition at line 2241 of file files.c.

References _, _free(), alloca(), argvFree(), argvSplit(), FileList_s::buildRootURL, Spec_s::buildSubdir, checkHardLinks(), Package_s::cpioList, 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(), 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, RPMVERIFY_ALL, SKIPSPACE, Package_s::specialDoc, rpmDataType_u::str, _HE_s::tag, Spec_s::timeCheck, timeCheck(), FileList_s::totalFileSize, and xstrdup().

Referenced by processBinaryFiles().

static rpmRC recurseDir ( FileList  fl,
const char *  diskURL 
) [static]

Add directory (and all of its files) to the package manifest.

Parameters:
flpackage file tree walk data
diskURLpath to file
Returns:
RPMRC_OK on success

Definition at line 2016 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().

static char* strtokWithQuotes ( char *  s,
const char *  delim 
) [static]

Strip quotes from strtok(3) string.

Parameters:
sstring
delimtoken delimiters

Definition at line 224 of file files.c.

Referenced by parseForSimple().

static void timeCheck ( int  tc,
Header  h 
) [static]

Variable Documentation

struct AttrRec_s root_ar = { NULL, NULL, "root", "root", 0, 0 } [static]

Definition at line 111 of file files.c.

VFA_t verifyAttrs[] [static]
Initial value:
 {
    { "md5",    0,      RPMVERIFY_MD5 },
    { "size",   0,      RPMVERIFY_FILESIZE },
    { "link",   0,      RPMVERIFY_LINKTO },
    { "user",   0,      RPMVERIFY_USER },
    { "group",  0,      RPMVERIFY_GROUP },
    { "mtime",  0,      RPMVERIFY_MTIME },
    { "mode",   0,      RPMVERIFY_MODE },
    { "rdev",   0,      RPMVERIFY_RDEV },
    { NULL, 0,  0 }
}

Definition at line 305 of file files.c.

Initial value:
 {
        { "%dir",       0,      0 },    
        { "%doc",       0,      RPMFILE_DOC },
        { "%ghost",     0,      RPMFILE_GHOST },
        { "%exclude",   0,      RPMFILE_EXCLUDE },
        { "%readme",    0,      RPMFILE_README },
        { "%license",   0,      RPMFILE_LICENSE },
        { "%pubkey",    0,      RPMFILE_PUBKEY },
        { "%policy",    0,      RPMFILE_POLICY },
        { "%optional",  0,      RPMFILE_OPTIONAL },
        { "%remove",    0,      RPMFILE_REMOVE },









        { NULL, 0, 0 }
}

Definition at line 858 of file files.c.