12 #include <rpm/rpmtypes.h>
13 #include <rpm/rpmpgp.h>
44 #define RPMFILE_IS_INSTALLED(_x) ((_x) == RPMFILE_STATE_NORMAL || (_x) == RPMFILE_STATE_NETSHARED)
67 #define RPMFILE_ALL ~(RPMFILE_NONE)
97 #define RPMVERIFY_ALL ~(RPMVERIFY_NONE)
98 #define RPMVERIFY_FAILURES \
99 (RPMVERIFY_LSTATFAIL|RPMVERIFY_READFAIL|RPMVERIFY_READLINKFAIL|RPMVERIFY_LGETFILECONFAIL)
121 #define XFA_SKIPPING(_a) \
122 ((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPCOLOR)
124 #define XFA_CREATING(_a) \
125 ((_a) == FA_CREATE || (_a) == FA_BACKUP || (_a) == FA_SAVE || (_a) == FA_ALTNAME)
161 #define RPMFI_FLAGS_ERASE \
162 (RPMFI_NOFILECLASS | RPMFI_NOFILELANGS | \
163 RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | \
164 RPMFI_NOFILEVERIFYFLAGS)
166 #define RPMFI_FLAGS_INSTALL \
167 (RPMFI_NOFILECLASS | RPMFI_NOFILEVERIFYFLAGS)
169 #define RPMFI_FLAGS_VERIFY \
170 (RPMFI_NOFILECLASS | RPMFI_NOFILEDEPS | RPMFI_NOFILELANGS | \
173 #define RPMFI_FLAGS_QUERY \
174 (RPMFI_NOFILECLASS | RPMFI_NOFILEDEPS | RPMFI_NOFILELANGS | \
175 RPMFI_NOFILECOLORS | RPMFI_NOFILEVERIFYFLAGS)
177 #define RPMFI_FLAGS_FILETRIGGER \
178 (RPMFI_NOFILECLASS | RPMFI_NOFILEDEPS | RPMFI_NOFILELANGS | \
179 RPMFI_NOFILEUSER | RPMFI_NOFILEGROUP | RPMFI_NOFILEMODES | \
180 RPMFI_NOFILESIZES | RPMFI_NOFILECAPS | RPMFI_NOFILELINKTOS | \
181 RPMFI_NOFILEDIGESTS | RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | \
182 RPMFI_NOFILEINODES | RPMFI_NOFILECOLORS | \
183 RPMFI_NOFILEVERIFYFLAGS | RPMFI_NOFILEFLAGS)
185 #define RPMFI_FLAGS_ONLY_FILENAMES \
186 (RPMFI_FLAGS_FILETRIGGER | RPMFI_NOFILESTATES)
198 #define RPMFILEITERMAX 6
int rpmfilesStat(rpmfiles fi, int ix, int flags, struct stat *sb)
Map file stat(2) info.
rpm_count_t rpmfilesDC(rpmfiles fi)
Return directory count from file info set.
rpmVerifyAttrs rpmfilesVFlags(rpmfiles fi, int ix)
Return file verify flags from file info set.
char * rpmfilesFN(rpmfiles fi, int ix)
Return file name from file info set.
const char * rpmfilesFUser(rpmfiles fi, int ix)
Return file owner from file info set.
enum rpmFileTypes_e rpmFileTypes
File types.
const char * rpmfilesFGroup(rpmfiles fi, int ix)
Return file group from file info set.
rpm_mode_t rpmfilesFMode(rpmfiles fi, int ix)
Return file mode from file info set.
rpm_ino_t rpmfilesFInode(rpmfiles fi, int ix)
Return file inode from file info set.
int rpmfilesFindFN(rpmfiles files, const char *fn)
Return file index of the given file name or -1 if file is not in the rpmfi.
rpmfiles rpmfilesLink(rpmfiles fi)
Reference a file info set instance.
rpmfiles rpmfilesNew(rpmstrPool pool, Header h, rpmTagVal tagN, rpmfiFlags flags)
Create and load a file info set.
const char * rpmfilesFLink(rpmfiles fi, int ix)
Return file linkto (i.e.
const char * rpmfilesODN(rpmfiles fi, int jx)
Return original directory name from file info set.
const char * rpmfilesFClass(rpmfiles fi, int ix)
Return file class from file info set.
const char * rpmfilesFCaps(rpmfiles fi, int ix)
Return textual representation of file capabilities from file info set.
rpmfileState rpmfilesFState(rpmfiles fi, int ix)
Return file state from file info set.
const unsigned char * rpmfilesFSignature(rpmfiles fi, int ix, size_t *len)
Return file (binary) digest of file info set.
uint32_t rpmfilesFLinks(rpmfiles fi, int ix, const int **files)
Return (calculated) file nlink count from file info set.
rpm_color_t rpmfilesFColor(rpmfiles fi, int ix)
Return file color bits from file info set.
rpmfileAttrs rpmfilesFFlags(rpmfiles fi, int ix)
Return file flags from file info set.
enum rpmFileAction_e rpmFileAction
File disposition(s) during package install/erase transaction.
rpm_rdev_t rpmfilesFRdev(rpmfiles fi, int ix)
Return file rdev from file info set.
const unsigned char * rpmfilesFDigest(rpmfiles fi, int ix, int *algo, size_t *len)
Return file (binary) digest of file info set.
int rpmfilesDI(rpmfiles fi, int ix)
Return directory index from file info set.
rpmFileAction_e
File disposition(s) during package install/erase transaction.
int rpmfilesCompare(rpmfiles afi, int aix, rpmfiles bfi, int bix)
Return file info comparison.
int rpmfilesDigestAlgo(rpmfiles fi)
Return digest algorithm of a file info set.
rpmVerifyAttrs rpmfilesVerify(rpmfiles fi, int ix, rpmVerifyAttrs omitMask)
Verify file attributes (including digest).
rpm_loff_t rpmfilesFSize(rpmfiles fi, int ix)
Return file size from file info set.
int rpmfilesFindOFN(rpmfiles files, const char *fn)
Return file index of the given original file name or -1 if file is not in the rpmfi.
rpmfiles rpmfilesFree(rpmfiles fi)
Destroy a file info set.
int rpmfilesODI(rpmfiles fi, int ix)
Return original directory index from file info set.
const char * rpmfilesFLangs(rpmfiles fi, int ix)
Return file language(s) from file info set.
const unsigned char * rpmfilesVSignature(rpmfiles fi, int ix, size_t *len, uint16_t *algo)
Return file verity signature (binary)
char * rpmfilesOFN(rpmfiles fi, int ix)
Return original file name from file info set.
rpmFileTypes_e
File types.
rpm_count_t rpmfilesFC(rpmfiles fi)
Return file count from file info set.
uint32_t rpmfilesFNlink(rpmfiles fi, int ix)
Return (calculated) file nlink count from file info set.
const char * rpmfilesBN(rpmfiles fi, int ix)
Return base name from file info set.
uint32_t rpmfilesFDepends(rpmfiles fi, int ix, const uint32_t **fddictp)
Return file depends dictionary from file info set.
const char * rpmfilesOBN(rpmfiles fi, int ix)
Return original base name from file info set.
rpm_time_t rpmfilesFMtime(rpmfiles fi, int ix)
Return file modify time from file info set.
const char * rpmfilesDN(rpmfiles fi, int jx)
Return directory name from file info set.
rpm_color_t rpmfilesColor(rpmfiles files)
Return union of all file color bits from file info set.
struct rpmfiles_s * rpmfiles
struct headerToken_s * Header
RPM header and data retrieval types.
rpmVerifyAttrs_e
Exported file verify attributes (ie RPMTAG_FILEVERIFYFLAGS) + bits used for reporting failures.
@ RPMVERIFY_LGETFILECONFAIL
@ RPMFI_ITER_READ_ARCHIVE_CONTENT_FIRST
@ RPMFI_ITER_WRITE_ARCHIVE
@ RPMFI_ITER_READ_ARCHIVE_OMIT_HARDLINKS
@ RPMFI_ITER_READ_ARCHIVE
@ RPMFI_NOVERITYSIGNATURES
@ RPMFI_NOFILEVERIFYFLAGS
enum rpmFileIter_e rpmFileIter
rpmfileAttrs_e
Exported File Attributes (ie RPMTAG_FILEFLAGS)
enum rpmfileState_e rpmfileState
File States (when installed).
rpmfileState_e
File States (when installed).
@ RPMFILE_STATE_NOTINSTALLED
@ RPMFILE_STATE_NETSHARED
@ RPMFILE_STATE_WRONGCOLOR
rpmfi rpmfilesIter(rpmfiles files, int itype)
struct rpmstrPool_s * rpmstrPool
We pass these around as an array with a sentinel.