rpm 4.15.1

Data Structures | Macros | Typedefs | Enumerations | Functions
rpmfiles.h File Reference
`#include <sys/types.h>`
`#include <sys/stat.h>`
`#include <unistd.h>`
`#include <rpm/rpmtypes.h>`
`#include <rpm/rpmpgp.h>`
Include dependency graph for rpmfiles.h:

Go to the source code of this file.

## Data Structures
struct | rpmRelocation_s
| We pass these around as an array with a sentinel. More...

## Macros
#define | RPMFILE_IS_INSTALLED(_x) ((_x) == RPMFILE_STATE_NORMAL || (_x) == RPMFILE_STATE_NETSHARED)
#define | RPMFILE_ALL ~(RPMFILE_NONE)
#define | RPMVERIFY_ALL ~(RPMVERIFY_NONE)
#define | RPMVERIFY_FAILURES (RPMVERIFY_LSTATFAIL|RPMVERIFY_READFAIL|RPMVERIFY_READLINKFAIL|RPMVERIFY_LGETFILECONFAIL)
#define | XFA_SKIPPING(_a) ((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPCOLOR)
#define | RPMFI_FLAGS_ERASE
#define | RPMFI_FLAGS_INSTALL (RPMFI_NOFILECLASS | RPMFI_NOFILEVERIFYFLAGS)
#define | RPMFI_FLAGS_VERIFY
#define | RPMFI_FLAGS_QUERY
#define | RPMFI_FLAGS_FILETRIGGER
#define | RPMFI_FLAGS_ONLY_FILENAMES (RPMFI_FLAGS_FILETRIGGER | RPMFI_NOFILESTATES)
#define | RPMFILEITERMAX 6

## Typedefs
typedef enum rpmFileTypes_e | rpmFileTypes
typedef enum rpmfileState_e | rpmfileState
| File States (when installed). More...
typedef rpmFlags | rpmfileAttrs
typedef rpmFlags | rpmVerifyAttrs
typedef enum rpmFileAction_e | rpmFileAction
typedef rpmFlags | rpmfiFlags
typedef enum rpmFileIter_e | rpmFileIter

## Enumerations
enum | rpmFileTypes_e { PIPE = 1, CDEV = 2, XDIR = 4, BDEV = 6, REG = 8, LINK = 10, SOCK = 12 }
enum | rpmfileState_e { RPMFILE_STATE_MISSING = -1, RPMFILE_STATE_NORMAL = 0, RPMFILE_STATE_REPLACED = 1, RPMFILE_STATE_NOTINSTALLED = 2, RPMFILE_STATE_NETSHARED = 3, RPMFILE_STATE_WRONGCOLOR = 4 }
| File States (when installed). More...
enum | rpmfileAttrs_e { RPMFILE_NONE = 0, RPMFILE_CONFIG = (1 << 0), RPMFILE_DOC = (1 << 1), RPMFILE_ICON = (1 << 2), RPMFILE_MISSINGOK = (1 << 3), RPMFILE_NOREPLACE = (1 << 4), RPMFILE_SPECFILE = (1 << 5), RPMFILE_GHOST = (1 << 6), RPMFILE_LICENSE = (1 << 7), RPMFILE_README = (1 << 8), RPMFILE_PUBKEY = (1 << 11), RPMFILE_ARTIFACT = (1 << 12) }
| Exported File Attributes (ie RPMTAG_FILEFLAGS) More...
enum | rpmVerifyAttrs_e { RPMVERIFY_NONE = 0, RPMVERIFY_MD5 = (1 << 0), RPMVERIFY_FILEDIGEST = (1 << 0), RPMVERIFY_FILESIZE = (1 << 1), RPMVERIFY_LINKTO = (1 << 2), RPMVERIFY_USER = (1 << 3), RPMVERIFY_GROUP = (1 << 4), RPMVERIFY_MTIME = (1 << 5), RPMVERIFY_MODE = (1 << 6), RPMVERIFY_RDEV = (1 << 7), RPMVERIFY_CAPS = (1 << 8), RPMVERIFY_CONTEXTS = (1 << 15), RPMVERIFY_READLINKFAIL = (1 << 28), RPMVERIFY_READFAIL = (1 << 29), RPMVERIFY_LSTATFAIL = (1 << 30), RPMVERIFY_LGETFILECONFAIL = (1 << 31) }
enum | rpmFileAction_e { FA_UNKNOWN = 0, FA_CREATE = 1, FA_COPYIN = 2, FA_COPYOUT = 3, FA_BACKUP = 4, FA_SAVE = 5, FA_SKIP = 6, FA_ALTNAME = 7, FA_ERASE = 8, FA_SKIPNSTATE = 9, FA_SKIPNETSHARED = 10, FA_SKIPCOLOR = 11, FA_TOUCH = 12 }
enum | rpmfiFlags_e { RPMFI_NOHEADER = 0, RPMFI_KEEPHEADER = (1 << 0), RPMFI_NOFILECLASS = (1 << 1), RPMFI_NOFILEDEPS = (1 << 2), RPMFI_NOFILELANGS = (1 << 3), RPMFI_NOFILEUSER = (1 << 4), RPMFI_NOFILEGROUP = (1 << 5), RPMFI_NOFILEMODES = (1 << 6), RPMFI_NOFILESIZES = (1 << 7), RPMFI_NOFILECAPS = (1 << 8), RPMFI_NOFILELINKTOS = (1 << 9), RPMFI_NOFILEDIGESTS = (1 << 10), RPMFI_NOFILEMTIMES = (1 << 11), RPMFI_NOFILERDEVS = (1 << 12), RPMFI_NOFILEINODES = (1 << 13), RPMFI_NOFILESTATES = (1 << 14), RPMFI_NOFILECOLORS = (1 << 15), RPMFI_NOFILEVERIFYFLAGS = (1 << 16), RPMFI_NOFILEFLAGS = (1 << 17), RPMFI_NOFILESIGNATURES = (1 << 18) }
enum | rpmFileIter_e { RPMFI_ITER_FWD = 0, RPMFI_ITER_BACK = 1, RPMFI_ITER_WRITE_ARCHIVE = 2, RPMFI_ITER_READ_ARCHIVE = 3, RPMFI_ITER_READ_ARCHIVE_CONTENT_FIRST = 4, RPMFI_ITER_READ_ARCHIVE_OMIT_HARDLINKS = 5, RPMFI_ITER_INTERVAL = 6 }

## Functions
rpmfiles | rpmfilesNew (rpmstrPool pool, Header h, rpmTagVal tagN, rpmfiFlags flags)
rpmfiles | rpmfilesLink (rpmfiles fi)
rpmfiles | rpmfilesFree (rpmfiles fi)
rpm_count_t | rpmfilesFC (rpmfiles fi)
rpm_count_t | rpmfilesDC (rpmfiles fi)
int | rpmfilesFindFN (rpmfiles files, const char *fn)
int | rpmfilesFindOFN (rpmfiles files, const char *fn)
rpmfi | rpmfilesIter (rpmfiles files, int itype)
int | rpmfilesDigestAlgo (rpmfiles fi)
rpm_color_t | rpmfilesColor (rpmfiles files)
int | rpmfilesCompare (rpmfiles afi, int aix, rpmfiles bfi, int bix)
const char * | rpmfilesBN (rpmfiles fi, int ix)
const char * | rpmfilesDN (rpmfiles fi, int jx)
int | rpmfilesDI (rpmfiles fi, int ix)
char * | rpmfilesFN (rpmfiles fi, int ix)
int | rpmfilesODI (rpmfiles fi, int ix)
const char * | rpmfilesOBN (rpmfiles fi, int ix)
const char * | rpmfilesODN (rpmfiles fi, int jx)
char * | rpmfilesOFN (rpmfiles fi, int ix)
rpmVerifyAttrs | rpmfilesVFlags (rpmfiles fi, int ix)
rpmfileState | rpmfilesFState (rpmfiles fi, int ix)
const char * | rpmfilesFLink (rpmfiles fi, int ix)
rpm_loff_t | rpmfilesFSize (rpmfiles fi, int ix)
rpm_color_t | rpmfilesFColor (rpmfiles fi, int ix)
const char * | rpmfilesFClass (rpmfiles fi, int ix)
uint32_t | rpmfilesFDepends (rpmfiles fi, int ix, const uint32_t **fddictp)
uint32_t | rpmfilesFNlink (rpmfiles fi, int ix)
uint32_t | rpmfilesFLinks (rpmfiles fi, int ix, const int **files)
const char * | rpmfilesFLangs (rpmfiles fi, int ix)
rpmfileAttrs | rpmfilesFFlags (rpmfiles fi, int ix)
rpm_mode_t | rpmfilesFMode (rpmfiles fi, int ix)
const unsigned char * | rpmfilesFDigest (rpmfiles fi, int ix, int *algo, size_t *len)
const unsigned char * | rpmfilesFSignature (rpmfiles fi, int ix, size_t *len)
rpm_rdev_t | rpmfilesFRdev (rpmfiles fi, int ix)
rpm_ino_t | rpmfilesFInode (rpmfiles fi, int ix)
rpm_time_t | rpmfilesFMtime (rpmfiles fi, int ix)
const char * | rpmfilesFUser (rpmfiles fi, int ix)
const char * | rpmfilesFGroup (rpmfiles fi, int ix)
const char * | rpmfilesFCaps (rpmfiles fi, int ix)
int | rpmfilesStat (rpmfiles fi, int ix, int flags, struct stat *sb)
rpmVerifyAttrs | rpmfilesVerify (rpmfiles fi, int ix, rpmVerifyAttrs omitMask)

## Detailed Description

File info set API.

Definition in file rpmfiles.h.

## Macro Definition Documentation

## ◆ RPMFI_FLAGS_ERASE

#define RPMFI_FLAGS_ERASE

Value:
(RPMFI_NOFILECLASS | RPMFI_NOFILELANGS | \
RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | \
RPMFI_NOFILEVERIFYFLAGS)

Definition at line 157 of file rpmfiles.h.

## ◆ RPMFI_FLAGS_FILETRIGGER

#define RPMFI_FLAGS_FILETRIGGER

Value:
(RPMFI_NOFILECLASS | RPMFI_NOFILEDEPS | RPMFI_NOFILELANGS | \
RPMFI_NOFILEUSER | RPMFI_NOFILEGROUP | RPMFI_NOFILEMODES | \
RPMFI_NOFILESIZES | RPMFI_NOFILECAPS | RPMFI_NOFILELINKTOS | \
RPMFI_NOFILEDIGESTS | RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | \
RPMFI_NOFILEINODES | RPMFI_NOFILECOLORS | \
RPMFI_NOFILEVERIFYFLAGS | RPMFI_NOFILEFLAGS)

Definition at line 173 of file rpmfiles.h.

## ◆ RPMFI_FLAGS_INSTALL

#define RPMFI_FLAGS_INSTALL (RPMFI_NOFILECLASS | RPMFI_NOFILEVERIFYFLAGS)

Definition at line 162 of file rpmfiles.h.

## ◆ RPMFI_FLAGS_ONLY_FILENAMES

#define RPMFI_FLAGS_ONLY_FILENAMES (RPMFI_FLAGS_FILETRIGGER | RPMFI_NOFILESTATES)

Definition at line 181 of file rpmfiles.h.

## ◆ RPMFI_FLAGS_QUERY

#define RPMFI_FLAGS_QUERY

Value:
(RPMFI_NOFILECLASS | RPMFI_NOFILEDEPS | RPMFI_NOFILELANGS | \
RPMFI_NOFILECOLORS | RPMFI_NOFILEVERIFYFLAGS)

Definition at line 169 of file rpmfiles.h.

## ◆ RPMFI_FLAGS_VERIFY

#define RPMFI_FLAGS_VERIFY

Value:
(RPMFI_NOFILECLASS | RPMFI_NOFILEDEPS | RPMFI_NOFILELANGS | \
RPMFI_NOFILECOLORS)

Definition at line 165 of file rpmfiles.h.

## ◆ RPMFILE_ALL

#define RPMFILE_ALL ~(RPMFILE_NONE)

Definition at line 67 of file rpmfiles.h.

## ◆ RPMFILE_IS_INSTALLED

#define RPMFILE_IS_INSTALLED | ( |  | _x | ) | ((_x) == RPMFILE_STATE_NORMAL || (_x) == RPMFILE_STATE_NETSHARED)

Definition at line 44 of file rpmfiles.h.

## ◆ RPMFILEITERMAX

#define RPMFILEITERMAX 6

Definition at line 194 of file rpmfiles.h.

## ◆ RPMVERIFY_ALL

#define RPMVERIFY_ALL ~(RPMVERIFY_NONE)

Definition at line 97 of file rpmfiles.h.

## ◆ RPMVERIFY_FAILURES

#define RPMVERIFY_FAILURES (RPMVERIFY_LSTATFAIL|RPMVERIFY_READFAIL|RPMVERIFY_READLINKFAIL|RPMVERIFY_LGETFILECONFAIL)

Definition at line 98 of file rpmfiles.h.

## ◆ XFA_SKIPPING

#define XFA_SKIPPING | ( |  | _a | ) | ((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPCOLOR)

Definition at line 121 of file rpmfiles.h.

## Typedef Documentation

## ◆ rpmfiFlags

typedef rpmFlags rpmfiFlags

Definition at line 155 of file rpmfiles.h.

## ◆ rpmfileAttrs

typedef rpmFlags rpmfileAttrs

Definition at line 65 of file rpmfiles.h.

## ◆ rpmFileIter

typedef enum rpmFileIter_e rpmFileIter

## ◆ rpmfileState

typedef enum rpmfileState_e rpmfileState

File States (when installed).

## ◆ rpmVerifyAttrs

typedef rpmFlags rpmVerifyAttrs

Definition at line 95 of file rpmfiles.h.

## Enumeration Type Documentation

## ◆ rpmfiFlags_e

enum rpmfiFlags_e

Enumerator
RPMFI_NOHEADER |
RPMFI_KEEPHEADER |
RPMFI_NOFILECLASS |
RPMFI_NOFILEDEPS |
RPMFI_NOFILELANGS |
RPMFI_NOFILEUSER |
RPMFI_NOFILEGROUP |
RPMFI_NOFILEMODES |
RPMFI_NOFILESIZES |
RPMFI_NOFILECAPS |
RPMFI_NOFILELINKTOS |
RPMFI_NOFILEDIGESTS |
RPMFI_NOFILEMTIMES |
RPMFI_NOFILERDEVS |
RPMFI_NOFILEINODES |
RPMFI_NOFILESTATES |
RPMFI_NOFILECOLORS |
RPMFI_NOFILEVERIFYFLAGS |
RPMFI_NOFILEFLAGS |
RPMFI_NOFILESIGNATURES |

Definition at line 132 of file rpmfiles.h.

## ◆ rpmfileAttrs_e

enum rpmfileAttrs_e

Exported File Attributes (ie RPMTAG_FILEFLAGS)

Enumerator
RPMFILE_NONE |
RPMFILE_CONFIG | from %config
RPMFILE_DOC | from %doc
RPMFILE_ICON | from %donotuse.
RPMFILE_MISSINGOK | from %config(missingok)
RPMFILE_NOREPLACE | from %config(noreplace)
RPMFILE_SPECFILE | Todo: (unnecessary) marks 1st file in srpm.
RPMFILE_GHOST | from %ghost
RPMFILE_LICENSE | from %license
RPMFILE_README | from %readme
RPMFILE_PUBKEY | from %pubkey
RPMFILE_ARTIFACT | from %artifact

Definition at line 49 of file rpmfiles.h.

## ◆ rpmFileIter_e

enum rpmFileIter_e

Enumerator
RPMFI_ITER_FWD |
RPMFI_ITER_BACK |
RPMFI_ITER_WRITE_ARCHIVE |
RPMFI_ITER_READ_ARCHIVE |
RPMFI_ITER_READ_ARCHIVE_CONTENT_FIRST |
RPMFI_ITER_READ_ARCHIVE_OMIT_HARDLINKS |
RPMFI_ITER_INTERVAL |

Definition at line 184 of file rpmfiles.h.

## ◆ rpmfileState_e

enum rpmfileState_e

File States (when installed).

Enumerator
RPMFILE_STATE_MISSING |
RPMFILE_STATE_NORMAL |
RPMFILE_STATE_REPLACED |
RPMFILE_STATE_NOTINSTALLED |
RPMFILE_STATE_NETSHARED |
RPMFILE_STATE_WRONGCOLOR |

Definition at line 35 of file rpmfiles.h.

## Function Documentation

## ◆ rpmfilesIter()

rpmfi rpmfilesIter | ( | rpmfiles | files,
|  | int | itype
| ) |  |

RPMFI_NOFILECLASS
@ RPMFI_NOFILECLASS
Definition: rpmfiles.h:135
RPMFI_NOFILELINKTOS
@ RPMFI_NOFILELINKTOS
Definition: rpmfiles.h:143
RPMFI_NOFILECAPS
@ RPMFI_NOFILECAPS
Definition: rpmfiles.h:142
RPMFI_NOFILEGROUP
@ RPMFI_NOFILEGROUP
Definition: rpmfiles.h:139
RPMFI_NOFILEMODES
@ RPMFI_NOFILEMODES
Definition: rpmfiles.h:140
RPMFI_NOFILEVERIFYFLAGS
@ RPMFI_NOFILEVERIFYFLAGS
Definition: rpmfiles.h:150
RPMFI_NOFILELANGS
@ RPMFI_NOFILELANGS
Definition: rpmfiles.h:137
RPMFI_NOFILEFLAGS
@ RPMFI_NOFILEFLAGS
Definition: rpmfiles.h:151
RPMFI_NOFILEDEPS
@ RPMFI_NOFILEDEPS
Definition: rpmfiles.h:136
RPMFI_NOFILERDEVS
@ RPMFI_NOFILERDEVS
Definition: rpmfiles.h:146
RPMFI_NOFILEMTIMES
@ RPMFI_NOFILEMTIMES
Definition: rpmfiles.h:145
RPMFI_NOFILECOLORS
@ RPMFI_NOFILECOLORS
Definition: rpmfiles.h:149