HEADER.
Collaboration diagram for HEADER.:

## Files

file | formats.c
file | package.c
file | rpmlib.h
| In Memoriam: Steve Taylor stayl.nosp@m.or@r.nosp@m.edhat.nosp@m..com was here, now he's not.
file | hdrfmt.c
file | header.c
file | header_internal.c
file | header_internal.h
file | rpmtag.h

## Data Structures

struct | sprintfTag_s
struct | sprintfToken_s
struct | headerSprintfArgs_s
struct | headerToken_s
| The Header data structure. More...
union | rpmDataType_u
struct | _HE_s

## Typedefs

typedef struct sprintfTag_s * | sprintfTag
typedef struct sprintfToken_s * | sprintfToken
typedef struct headerSprintfArgs_s * | headerSprintfArgs
typedef struct entryInfo_s * | entryInfo
| Description of tag data. More...
typedef struct indexEntry_s * | indexEntry
| A single tag from a Header. More...
typedef const char * | errmsg_t
typedef struct headerToken_s * | Header
typedef enum rpmTagType_e | rpmTagType
typedef union rpmDataType_u | rpmTagData
typedef rpmuint32_t | rpmTagCount
typedef struct _HE_s * | HE_t
typedef enum rpmSubTagType_e | rpmSubTagType
typedef enum rpmTagReturnType_e | rpmTagReturnType
| Identify how to return the header data type. More...
typedef struct headerIterator_s * | HeaderIterator
typedef struct headerTagIndices_s * | headerTagIndices
typedef struct headerSprintfExtension_s * | headerSprintfExtension
typedef enum rpmTag_e | rpmTag
typedef enum rpmSigTag_e | rpmSigTag

## Enumerations

enum | rpmTagType_e { RPM_UINT8_TYPE = 2, RPM_UINT16_TYPE = 3, RPM_UINT32_TYPE = 4, RPM_UINT64_TYPE = 5, RPM_STRING_TYPE = 6, RPM_BIN_TYPE = 7, RPM_STRING_ARRAY_TYPE = 8, RPM_I18NSTRING_TYPE = 9 }
| The basic types of data in tags from headers. More...
enum | rpmSubTagType_e { RPM_REGION_TYPE = -10, RPM_BIN_ARRAY_TYPE = -11, RPM_XREF_TYPE = -12 }

enum

rpmTagReturnType_e {
RPM_ANY_RETURN_TYPE = 0, RPM_SCALAR_RETURN_TYPE = 0x00010000, RPM_ARRAY_RETURN_TYPE = 0x00020000, RPM_MAPPING_RETURN_TYPE = 0x00040000,
RPM_PROBE_RETURN_TYPE = 0x00100000, RPM_TREE_RETURN_TYPE = 0x00200000, RPM_OPENPGP_RETURN_TYPE = 0x00400000, RPM_X509_RETURN_TYPE = 0x00800000,
RPM_ASN1_RETURN_TYPE = 0x01000000, RPM_OPAQUE_RETURN_TYPE = 0x10000000, RPM_MASK_RETURN_TYPE = 0xffff0000
}

| Identify how to return the header data type. More...

enum

rpmTag_e {
RPMTAG_HEADERIMAGE = 61, RPMTAG_HEADERSIGNATURES = 62, RPMTAG_HEADERIMMUTABLE = 63, RPMTAG_HEADERREGIONS = 64,
RPMTAG_HEADERI18NTABLE = 100, RPMTAG_SIG_BASE = 256, RPMTAG_SIGSIZE = RPMTAG_SIG_BASE+1, RPMTAG_SIGLEMD5_1 = RPMTAG_SIG_BASE+2,
RPMTAG_SIGPGP = RPMTAG_SIG_BASE+3, RPMTAG_SIGLEMD5_2 = RPMTAG_SIG_BASE+4, RPMTAG_SIGMD5 = RPMTAG_SIG_BASE+5, RPMTAG_SIGGPG = RPMTAG_SIG_BASE+6,
RPMTAG_SIGPGP5 = RPMTAG_SIG_BASE+7, RPMTAG_BADSHA1_1 = RPMTAG_SIG_BASE+8, RPMTAG_BADSHA1_2 = RPMTAG_SIG_BASE+9, RPMTAG_PUBKEYS = RPMTAG_SIG_BASE+10,
RPMTAG_DSAHEADER = RPMTAG_SIG_BASE+11, RPMTAG_RSAHEADER = RPMTAG_SIG_BASE+12, RPMTAG_SHA1HEADER = RPMTAG_SIG_BASE+13, RPMTAG_NAME = 1000,
RPMTAG_VERSION = 1001, RPMTAG_RELEASE = 1002, RPMTAG_EPOCH = 1003, RPMTAG_SUMMARY = 1004,
RPMTAG_DESCRIPTION = 1005, RPMTAG_BUILDTIME = 1006, RPMTAG_BUILDHOST = 1007, RPMTAG_INSTALLTIME = 1008,
RPMTAG_SIZE = 1009, RPMTAG_DISTRIBUTION = 1010, RPMTAG_VENDOR = 1011, RPMTAG_GIF = 1012,
RPMTAG_XPM = 1013, RPMTAG_LICENSE = 1014, RPMTAG_PACKAGER = 1015, RPMTAG_GROUP = 1016,
RPMTAG_CHANGELOG = 1017, RPMTAG_SOURCE = 1018, RPMTAG_PATCH = 1019, RPMTAG_URL = 1020,
RPMTAG_OS = 1021, RPMTAG_ARCH = 1022, RPMTAG_PREIN = 1023, RPMTAG_POSTIN = 1024,
RPMTAG_PREUN = 1025, RPMTAG_POSTUN = 1026, RPMTAG_OLDFILENAMES = 1027, RPMTAG_FILESIZES = 1028,
RPMTAG_FILESTATES = 1029, RPMTAG_FILEMODES = 1030, RPMTAG_FILEUIDS = 1031, RPMTAG_FILEGIDS = 1032,
RPMTAG_FILERDEVS = 1033, RPMTAG_FILEMTIMES = 1034, RPMTAG_FILEDIGESTS = 1035, RPMTAG_FILELINKTOS = 1036,
RPMTAG_FILEFLAGS = 1037, RPMTAG_ROOT = 1038, RPMTAG_FILEUSERNAME = 1039, RPMTAG_FILEGROUPNAME = 1040,
RPMTAG_EXCLUDE = 1041, RPMTAG_EXCLUSIVE = 1042, RPMTAG_ICON = 1043, RPMTAG_SOURCERPM = 1044,
RPMTAG_FILEVERIFYFLAGS = 1045, RPMTAG_ARCHIVESIZE = 1046, RPMTAG_PROVIDENAME = 1047, RPMTAG_REQUIREFLAGS = 1048,
RPMTAG_REQUIRENAME = 1049, RPMTAG_REQUIREVERSION = 1050, RPMTAG_NOSOURCE = 1051, RPMTAG_NOPATCH = 1052,
RPMTAG_CONFLICTFLAGS = 1053, RPMTAG_CONFLICTNAME = 1054, RPMTAG_CONFLICTVERSION = 1055, RPMTAG_DEFAULTPREFIX = 1056,
RPMTAG_BUILDROOT = 1057, RPMTAG_INSTALLPREFIX = 1058, RPMTAG_EXCLUDEARCH = 1059, RPMTAG_EXCLUDEOS = 1060,
RPMTAG_EXCLUSIVEARCH = 1061, RPMTAG_EXCLUSIVEOS = 1062, RPMTAG_AUTOREQPROV = 1063, RPMTAG_RPMVERSION = 1064,
RPMTAG_TRIGGERSCRIPTS = 1065, RPMTAG_TRIGGERNAME = 1066, RPMTAG_TRIGGERVERSION = 1067, RPMTAG_TRIGGERFLAGS = 1068,
RPMTAG_TRIGGERINDEX = 1069, RPMTAG_VERIFYSCRIPT = 1079, RPMTAG_CHANGELOGTIME = 1080, RPMTAG_CHANGELOGNAME = 1081,
RPMTAG_CHANGELOGTEXT = 1082, RPMTAG_BROKENMD5 = 1083, RPMTAG_PREREQ = 1084, RPMTAG_PREINPROG = 1085,
RPMTAG_POSTINPROG = 1086, RPMTAG_PREUNPROG = 1087, RPMTAG_POSTUNPROG = 1088, RPMTAG_BUILDARCHS = 1089,
RPMTAG_OBSOLETENAME = 1090, RPMTAG_VERIFYSCRIPTPROG = 1091, RPMTAG_TRIGGERSCRIPTPROG = 1092, RPMTAG_DOCDIR = 1093,
RPMTAG_COOKIE = 1094, RPMTAG_FILEDEVICES = 1095, RPMTAG_FILEINODES = 1096, RPMTAG_FILELANGS = 1097,
RPMTAG_PREFIXES = 1098, RPMTAG_INSTPREFIXES = 1099, RPMTAG_TRIGGERIN = 1100, RPMTAG_TRIGGERUN = 1101,
RPMTAG_TRIGGERPOSTUN = 1102, RPMTAG_AUTOREQ = 1103, RPMTAG_AUTOPROV = 1104, RPMTAG_CAPABILITY = 1105,
RPMTAG_SOURCEPACKAGE = 1106, RPMTAG_OLDORIGFILENAMES = 1107, RPMTAG_BUILDPREREQ = 1108, RPMTAG_BUILDREQUIRES = 1109,
RPMTAG_BUILDCONFLICTS = 1110, RPMTAG_BUILDMACROS = 1111, RPMTAG_PROVIDEFLAGS = 1112, RPMTAG_PROVIDEVERSION = 1113,
RPMTAG_OBSOLETEFLAGS = 1114, RPMTAG_OBSOLETEVERSION = 1115, RPMTAG_DIRINDEXES = 1116, RPMTAG_BASENAMES = 1117,
RPMTAG_DIRNAMES = 1118, RPMTAG_ORIGDIRINDEXES = 1119, RPMTAG_ORIGBASENAMES = 1120, RPMTAG_ORIGDIRNAMES = 1121,
RPMTAG_OPTFLAGS = 1122, RPMTAG_DISTURL = 1123, RPMTAG_PAYLOADFORMAT = 1124, RPMTAG_PAYLOADCOMPRESSOR = 1125,
RPMTAG_PAYLOADFLAGS = 1126, RPMTAG_INSTALLCOLOR = 1127, RPMTAG_INSTALLTID = 1128, RPMTAG_REMOVETID = 1129,
RPMTAG_SHA1RHN = 1130, RPMTAG_RHNPLATFORM = 1131, RPMTAG_PLATFORM = 1132, RPMTAG_PATCHESNAME = 1133,
RPMTAG_PATCHESFLAGS = 1134, RPMTAG_PATCHESVERSION = 1135, RPMTAG_CACHECTIME = 1136, RPMTAG_CACHEPKGPATH = 1137,
RPMTAG_CACHEPKGSIZE = 1138, RPMTAG_CACHEPKGMTIME = 1139, RPMTAG_FILECOLORS = 1140, RPMTAG_FILECLASS = 1141,
RPMTAG_CLASSDICT = 1142, RPMTAG_FILEDEPENDSX = 1143, RPMTAG_FILEDEPENDSN = 1144, RPMTAG_DEPENDSDICT = 1145,
RPMTAG_SOURCEPKGID = 1146, RPMTAG_FILECONTEXTS = 1147, RPMTAG_FSCONTEXTS = 1148, RPMTAG_RECONTEXTS = 1149,
RPMTAG_POLICIES = 1150, RPMTAG_PRETRANS = 1151, RPMTAG_POSTTRANS = 1152, RPMTAG_PRETRANSPROG = 1153,
RPMTAG_POSTTRANSPROG = 1154, RPMTAG_DISTTAG = 1155, RPMTAG_SUGGESTSNAME = 1156, RPMTAG_SUGGESTSVERSION = 1157,
RPMTAG_SUGGESTSFLAGS = 1158, RPMTAG_ENHANCESNAME = 1159, RPMTAG_ENHANCESVERSION = 1160, RPMTAG_ENHANCESFLAGS = 1161,
RPMTAG_PRIORITY = 1162, RPMTAG_CVSID = 1163, RPMTAG_BLINKPKGID = 1164, RPMTAG_BLINKHDRID = 1165,
RPMTAG_BLINKNEVRA = 1166, RPMTAG_FLINKPKGID = 1167, RPMTAG_FLINKHDRID = 1168, RPMTAG_FLINKNEVRA = 1169,
RPMTAG_PACKAGEORIGIN = 1170, RPMTAG_TRIGGERPREIN = 1171, RPMTAG_BUILDSUGGESTS = 1172, RPMTAG_BUILDENHANCES = 1173,
RPMTAG_SCRIPTSTATES = 1174, RPMTAG_SCRIPTMETRICS = 1175, RPMTAG_BUILDCPUCLOCK = 1176, RPMTAG_FILEDIGESTALGOS = 1177,
RPMTAG_VARIANTS = 1178, RPMTAG_XMAJOR = 1179, RPMTAG_XMINOR = 1180, RPMTAG_REPOTAG = 1181,
RPMTAG_KEYWORDS = 1182, RPMTAG_BUILDPLATFORMS = 1183, RPMTAG_PACKAGECOLOR = 1184, RPMTAG_PACKAGEPREFCOLOR = 1185,
RPMTAG_XATTRSDICT = 1186, RPMTAG_FILEXATTRSX = 1187, RPMTAG_DEPATTRSDICT = 1188, RPMTAG_CONFLICTATTRSX = 1189,
RPMTAG_OBSOLETEATTRSX = 1190, RPMTAG_PROVIDEATTRSX = 1191, RPMTAG_REQUIREATTRSX = 1192, RPMTAG_BUILDPROVIDES = 1193,
RPMTAG_BUILDOBSOLETES = 1194, RPMTAG_DBINSTANCE = 1195, RPMTAG_NVRA = 1196, RPMTAG_FILEPATHS = 1197,
RPMTAG_ORIGPATHS = 1198, RPMTAG_RPMLIBVERSION = 1199, RPMTAG_RPMLIBTIMESTAMP = 1200, RPMTAG_RPMLIBVENDOR = 1201,
RPMTAG_CLASS = 1202, RPMTAG_TRACK = 1203, RPMTAG_TRACKPROG = 1204, RPMTAG_SANITYCHECK = 1205,
RPMTAG_SANITYCHECKPROG = 1206, RPMTAG_FILESTAT = 1207, RPMTAG_STAT = 1208, RPMTAG_ORIGINTID = 1209,
RPMTAG_ORIGINTIME = 1210, RPMTAG_HEADERSTARTOFF = 1211, RPMTAG_HEADERENDOFF = 1212, RPMTAG_PACKAGETIME = 1213,
RPMTAG_PACKAGESIZE = 1214, RPMTAG_PACKAGEDIGEST = 1215, RPMTAG_PACKAGESTAT = 1216, RPMTAG_PACKAGEBASEURL = 1217,
RPMTAG_DISTEPOCH = 1218, RPMTAG_FILEDIGESTALGO = 5011, RPMTAG_FIRSTFREE_TAG, RPMTAG_PACKAGETRANSFLAGS = 0x4efaafd9,
RPMTAG_PACKAGEDEPFLAGS = 0x748a8314, RPMTAG_BUILDPREPPROG = 0x4ba37c9e, RPMTAG_BUILDPREP = 0x799c0b4d, RPMTAG_BUILDBUILDPROG = 0x6fb46014,
RPMTAG_BUILDBUILD = 0x5bae1a5a, RPMTAG_BUILDINSTALLPROG = 0x70d4ab6f, RPMTAG_BUILDINSTALL = 0x567f5983, RPMTAG_BUILDCHECKPROG = 0x488a60ce,
RPMTAG_BUILDCHECK = 0x7f3b97b5, RPMTAG_BUILDCLEANPROG = 0x42c93d41, RPMTAG_BUILDCLEAN = 0x566042bf, RPMTAG_LASTARBITRARY_TAG = 0x80000000
}

| Tags identify data in package headers. More...

## Functions

static void | headerSort (Header h)
| Sort tags in header. More...
static void | headerUnsort (Header h)
| Restore tags in header to original ordering. More...
static unsigned char * | tagSwab (unsigned char *t, const HE_t he, size_t nb)
| Swab rpmuint64_t/rpmuint32_t/rpmuint16_t arrays within header region. More...
static rpmuint32_t | regionSwab (indexEntry entry, rpmuint32_t il, rpmuint32_t dl, entryInfo pe, unsigned char *dataStart, const unsigned char *dataEnd, rpmint32_t regionid)
| Swab rpmuint64_t/rpmuint32_t/rpmuint16_t arrays within header region. More...
static int | headerRemoveEntry (Header h, rpmTag tag)
| Delete tag in header. More...
static int | copyEntry (const indexEntry entry, HE_t he, int minMem)
| Retrieve data from header entry. More...
static int | headerAddEntry (Header h, HE_t he)
| Add tag to header. More...
static int | headerAppendEntry (Header h, HE_t he)
| Append element to tag array in header. More...
static int | headerAddOrAppendEntry (Header h, HE_t he)
| Add or append element to tag array in header. More...
static int | headerModifyEntry (Header h, HE_t he)
| Modify tag in header. More...
static int | headerUsageCount (Header h)
| Return header reference count. More...
static rpmRC | rpmWriteHeader (FD_t fd, Header h, const char **msg)
| Write (with unload) header to file handle. More...
char * | headerSprintf (Header h, const char *fmt, headerTagTableEntry tags, headerSprintfExtension exts, errmsg_t *errmsg)
| Return formatted output string from header tags. More...
int | headerGet (Header h, HE_t he, unsigned int flags)
| Retrieve extension or tag value from a header. More...
int | headerPut (Header h, HE_t he, unsigned int flags)
| Add or append tag container to header. More...
int | headerDel (Header h, HE_t he, unsigned int flags)
| Remove tag container from header. More...
int | headerMod (Header h, HE_t he, unsigned int flags)
| Modify tag container in header. More...
HeaderIterator | headerFini (HeaderIterator hi)
| Destroy header tag container iterator. More...
HeaderIterator | headerInit (Header h)
| Create header tag iterator. More...
int | headerNext (HeaderIterator hi, HE_t he, unsigned int flags)
| Return next tag from header. More...
Header | headerLink (Header h)
| Reference a header instance. More...
Header | headerUnlink (Header h)
| Dereference a header instance. More...
Header | headerFree (Header h)
| Dereference a header instance. More...
Header | headerNew (void)
| Create new (empty) header instance. More...
size_t | headerSizeof (Header h)
| Return size of on-disk header representation in bytes. More...
void * | headerUnload (Header h, size_t *lenp)
| headerUnload. More...
Header | headerReload (Header h, int tag)
| Convert header to on-disk representation, and then reload. More...
Header | headerCopy (Header h)
| Duplicate a header. More...
Header | headerLoad (void *uh)
| Convert header to in-memory representation. More...
Header | headerCopyLoad (const void *uh)
| Make a copy and convert header to in-memory representation. More...
int | headerIsEntry (Header h, rpmTag tag)
| Check if tag is in header. More...
int | headerAddI18NString (Header h, rpmTag tag, const char *string, const char *lang)
| Add locale specific tag to header. More...
void | headerCopyTags (Header headerFrom, Header headerTo, rpmTag *tagstocopy)
| Duplicate tag values from one header into another. More...
int | headerGetMagic (Header h, unsigned char **magicp, size_t *nmagicp)
| Return header magic. More...
int | headerSetMagic (Header h, unsigned char *magic, size_t nmagic)
| Store header magic. More...
const char * | headerGetOrigin (Header h)
| Return header origin (e.g path or URL). More...
int | headerSetOrigin (Header h, const char *origin)
| Store header origin (e.g path or URL). More...
const char * | headerGetBaseURL (Header h)
| Return header base URL (e.g path or URL). More...
int | headerSetBaseURL (Header h, const char *baseurl)
| Store header base URL (e.g path or URL). More...
struct stat * | headerGetStatbuf (Header h)
| Return header stat(2) buffer (of origin *.rpm file). More...
int | headerSetStatbuf (Header h, struct stat *st)
| Copy into header stat(2) buffer (of origin *.rpm file). More...
const char * | headerGetDigest (Header h)
| Return digest of origin *.rpm file. More...
int | headerSetDigest (Header h, const char *digest)
| Store digest of origin *.rpm file. More...
void * | headerGetRpmdb (Header h)
| Return rpmdb pointer. More...
void * | headerSetRpmdb (Header h, void *rpmdb)
| Store rpmdb pointer. More...
rpmuint32_t | headerGetInstance (Header h)
| Return header instance (if from rpmdb). More...
rpmuint32_t | headerSetInstance (Header h, rpmuint32_t instance)
| Store header instance (e.g path or URL). More...
rpmuint32_t | headerGetStartOff (Header h)
| Return header starting byte offset. More...
rpmuint32_t | headerSetStartOff (Header h, rpmuint32_t startoff)
| Store header starting byte offset. More...
rpmuint32_t | headerGetEndOff (Header h)
| Return header ending byte offset. More...
rpmuint32_t | headerSetEndOff (Header h, rpmuint32_t endoff)
| Store header ending byte offset. More...
void * | headerGetStats (Header h, int opx)
| Return header stats accumulator structure. More...
int | headerNEVRA (Header h, const char **np, const char **ep, const char **vp, const char **rp, const char **ap)
| Return name, epoch, version, release, arch strings from header. More...
void | headerMergeLegacySigs (Header h, const Header sigh)
| Translate and merge legacy signature tags into header. More...
Header | headerRegenSigHeader (const Header h, int noArchiveSize)
| Regenerate signature header. More...

## Variables

static unsigned char | header_magic [8]
static int | typeSizes [16]
| Size of header data types. More...
static size_t | headerMaxbytes = (1024*1024*1024)
| Maximum no. More...
headerSprintfExtension | headerDefaultFormats
| Supported default header tag output formats. More...
headerSprintfExtension | headerCompoundFormats
| Supported default header extension/tag output formats. More...

## Detailed Description

## Typedef Documentation

typedef struct entryInfo_s* entryInfo

Description of tag data.

Definition at line 55 of file header_internal.h.

typedef const char* errmsg_t

Definition at line 17 of file rpmtag.h.

typedef struct _HE_s* HE_t

tag container.

Definition at line 58 of file rpmtag.h.

typedef struct headerToken_s* Header

Definition at line 21 of file rpmtag.h.

typedef struct headerIterator_s* HeaderIterator

Definition at line 125 of file rpmtag.h.

typedef struct headerSprintfArgs_s* headerSprintfArgs

Definition at line 4990 of file hdrfmt.c.

typedef struct headerSprintfExtension_s* headerSprintfExtension

Definition at line 133 of file rpmtag.h.

typedef struct headerTagIndices_s* headerTagIndices

Definition at line 129 of file rpmtag.h.

typedef struct indexEntry_s* indexEntry

A single tag from a Header.

Definition at line 73 of file header_internal.h.

typedef enum rpmSigTag_e rpmSigTag

Definition at line 478 of file rpmtag.h.

typedef enum rpmSubTagType_e rpmSubTagType

typedef enum rpmTag_e rpmTag

Definition at line 474 of file rpmtag.h.

typedef rpmuint32_t rpmTagCount

tag data element count.

Definition at line 54 of file rpmtag.h.

typedef union rpmDataType_u rpmTagData

tag data.

Definition at line 50 of file rpmtag.h.

typedef enum rpmTagReturnType_e rpmTagReturnType

Identify how to return the header data type.

typedef enum rpmTagType_e rpmTagType

tag data type.

Definition at line 46 of file rpmtag.h.

typedef struct sprintfTag_s* sprintfTag

Definition at line 4926 of file hdrfmt.c.

typedef struct sprintfToken_s* sprintfToken

Definition at line 4952 of file hdrfmt.c.

## Enumeration Type Documentation

enum rpmSubTagType_e

Enumerator
RPM_REGION_TYPE |
RPM_BIN_ARRAY_TYPE |
RPM_XREF_TYPE |

Definition at line 84 of file rpmtag.h.

enum rpmTag_e

Tags identify data in package headers.

Note
  tags should not have value 0!

Enumerator
RPMTAG_HEADERIMAGE | internal Current image.
RPMTAG_HEADERSIGNATURES | internal Signatures.
RPMTAG_HEADERIMMUTABLE | x Original image.
RPMTAG_HEADERREGIONS | internal Regions.
RPMTAG_HEADERI18NTABLE | s[] I18N string locales.
RPMTAG_SIG_BASE |
RPMTAG_SIGSIZE |
RPMTAG_SIGLEMD5_1 |
RPMTAG_SIGPGP |
RPMTAG_SIGLEMD5_2 |
RPMTAG_SIGMD5 |
RPMTAG_SIGGPG |
RPMTAG_SIGPGP5 |
RPMTAG_BADSHA1_1 |
RPMTAG_BADSHA1_2 |
RPMTAG_PUBKEYS |
RPMTAG_DSAHEADER |
RPMTAG_RSAHEADER |
RPMTAG_SHA1HEADER |
RPMTAG_NAME |
RPMTAG_VERSION |
RPMTAG_RELEASE |
RPMTAG_EPOCH |
RPMTAG_SUMMARY |
RPMTAG_DESCRIPTION |
RPMTAG_BUILDTIME |
RPMTAG_BUILDHOST |
RPMTAG_INSTALLTIME |
RPMTAG_SIZE |
RPMTAG_DISTRIBUTION |
RPMTAG_VENDOR |
RPMTAG_GIF |
RPMTAG_XPM |
RPMTAG_LICENSE |
RPMTAG_PACKAGER |
RPMTAG_GROUP |
RPMTAG_CHANGELOG |
RPMTAG_SOURCE |
RPMTAG_PATCH |
RPMTAG_URL |
RPMTAG_OS |
RPMTAG_ARCH |
RPMTAG_PREIN |
RPMTAG_POSTIN |
RPMTAG_PREUN |
RPMTAG_POSTUN |
RPMTAG_OLDFILENAMES |
RPMTAG_FILESIZES |
RPMTAG_FILESTATES |
RPMTAG_FILEMODES |
RPMTAG_FILEUIDS |
RPMTAG_FILEGIDS |
RPMTAG_FILERDEVS |
RPMTAG_FILEMTIMES |
RPMTAG_FILEDIGESTS |
RPMTAG_FILELINKTOS |
RPMTAG_FILEFLAGS |
RPMTAG_ROOT |
RPMTAG_FILEUSERNAME |
RPMTAG_FILEGROUPNAME |
RPMTAG_EXCLUDE |
RPMTAG_EXCLUSIVE |
RPMTAG_ICON |
RPMTAG_SOURCERPM |
RPMTAG_FILEVERIFYFLAGS |
RPMTAG_ARCHIVESIZE |
RPMTAG_PROVIDENAME |
RPMTAG_REQUIREFLAGS |
RPMTAG_REQUIRENAME |
RPMTAG_REQUIREVERSION |
RPMTAG_NOSOURCE |
RPMTAG_NOPATCH |
RPMTAG_CONFLICTFLAGS |
RPMTAG_CONFLICTNAME |
RPMTAG_CONFLICTVERSION |
RPMTAG_DEFAULTPREFIX |
RPMTAG_BUILDROOT |
RPMTAG_INSTALLPREFIX |
RPMTAG_EXCLUDEARCH |
RPMTAG_EXCLUDEOS |
RPMTAG_EXCLUSIVEARCH |
RPMTAG_EXCLUSIVEOS |
RPMTAG_AUTOREQPROV |
RPMTAG_RPMVERSION |
RPMTAG_TRIGGERSCRIPTS |
RPMTAG_TRIGGERNAME |
RPMTAG_TRIGGERVERSION |
RPMTAG_TRIGGERFLAGS |
RPMTAG_TRIGGERINDEX |
RPMTAG_VERIFYSCRIPT |
RPMTAG_CHANGELOGTIME |
RPMTAG_CHANGELOGNAME |
RPMTAG_CHANGELOGTEXT |
RPMTAG_BROKENMD5 |
RPMTAG_PREREQ |
RPMTAG_PREINPROG |
RPMTAG_POSTINPROG |
RPMTAG_PREUNPROG |
RPMTAG_POSTUNPROG |
RPMTAG_BUILDARCHS |
RPMTAG_OBSOLETENAME |
RPMTAG_VERIFYSCRIPTPROG |
RPMTAG_TRIGGERSCRIPTPROG |
RPMTAG_DOCDIR |
RPMTAG_COOKIE |
RPMTAG_FILEDEVICES |
RPMTAG_FILEINODES |
RPMTAG_FILELANGS |
RPMTAG_PREFIXES |
RPMTAG_INSTPREFIXES |
RPMTAG_TRIGGERIN |
RPMTAG_TRIGGERUN |
RPMTAG_TRIGGERPOSTUN |
RPMTAG_AUTOREQ |
RPMTAG_AUTOPROV |
RPMTAG_CAPABILITY |
RPMTAG_SOURCEPACKAGE |
RPMTAG_OLDORIGFILENAMES |
RPMTAG_BUILDPREREQ |
RPMTAG_BUILDREQUIRES |
RPMTAG_BUILDCONFLICTS |
RPMTAG_BUILDMACROS |
RPMTAG_PROVIDEFLAGS |
RPMTAG_PROVIDEVERSION |
RPMTAG_OBSOLETEFLAGS |
RPMTAG_OBSOLETEVERSION |
RPMTAG_DIRINDEXES |
RPMTAG_BASENAMES |
RPMTAG_DIRNAMES |
RPMTAG_ORIGDIRINDEXES |
RPMTAG_ORIGBASENAMES |
RPMTAG_ORIGDIRNAMES |
RPMTAG_OPTFLAGS |
RPMTAG_DISTURL |
RPMTAG_PAYLOADFORMAT |
RPMTAG_PAYLOADCOMPRESSOR |
RPMTAG_PAYLOADFLAGS |
RPMTAG_INSTALLCOLOR |
RPMTAG_INSTALLTID |
RPMTAG_REMOVETID |
RPMTAG_SHA1RHN |
RPMTAG_RHNPLATFORM |
RPMTAG_PLATFORM |
RPMTAG_PATCHESNAME |
RPMTAG_PATCHESFLAGS |
RPMTAG_PATCHESVERSION |
RPMTAG_CACHECTIME |
RPMTAG_CACHEPKGPATH |
RPMTAG_CACHEPKGSIZE |
RPMTAG_CACHEPKGMTIME |
RPMTAG_FILECOLORS |
RPMTAG_FILECLASS |
RPMTAG_CLASSDICT |
RPMTAG_FILEDEPENDSX |
RPMTAG_FILEDEPENDSN |
RPMTAG_DEPENDSDICT |
RPMTAG_SOURCEPKGID |
RPMTAG_FILECONTEXTS |
RPMTAG_FSCONTEXTS |
RPMTAG_RECONTEXTS |
RPMTAG_POLICIES |
RPMTAG_PRETRANS |
RPMTAG_POSTTRANS |
RPMTAG_PRETRANSPROG |
RPMTAG_POSTTRANSPROG |
RPMTAG_DISTTAG |
RPMTAG_SUGGESTSNAME |
RPMTAG_SUGGESTSVERSION |
RPMTAG_SUGGESTSFLAGS |
RPMTAG_ENHANCESNAME |
RPMTAG_ENHANCESVERSION |
RPMTAG_ENHANCESFLAGS |
RPMTAG_PRIORITY |
RPMTAG_CVSID |
RPMTAG_BLINKPKGID |
RPMTAG_BLINKHDRID |
RPMTAG_BLINKNEVRA |
RPMTAG_FLINKPKGID |
RPMTAG_FLINKHDRID |
RPMTAG_FLINKNEVRA |
RPMTAG_PACKAGEORIGIN |
RPMTAG_TRIGGERPREIN |
RPMTAG_BUILDSUGGESTS |
RPMTAG_BUILDENHANCES |
RPMTAG_SCRIPTSTATES |
RPMTAG_SCRIPTMETRICS |
RPMTAG_BUILDCPUCLOCK |
RPMTAG_FILEDIGESTALGOS |
RPMTAG_VARIANTS |
RPMTAG_XMAJOR |
RPMTAG_XMINOR |
RPMTAG_REPOTAG |
RPMTAG_KEYWORDS |
RPMTAG_BUILDPLATFORMS |
RPMTAG_PACKAGECOLOR |
RPMTAG_PACKAGEPREFCOLOR |
RPMTAG_XATTRSDICT |
RPMTAG_FILEXATTRSX |
RPMTAG_DEPATTRSDICT |
RPMTAG_CONFLICTATTRSX |
RPMTAG_OBSOLETEATTRSX |
RPMTAG_PROVIDEATTRSX |
RPMTAG_REQUIREATTRSX |
RPMTAG_BUILDPROVIDES |
RPMTAG_BUILDOBSOLETES |
RPMTAG_DBINSTANCE |
RPMTAG_NVRA |
RPMTAG_FILEPATHS |
RPMTAG_ORIGPATHS |
RPMTAG_RPMLIBVERSION |
RPMTAG_RPMLIBTIMESTAMP |
RPMTAG_RPMLIBVENDOR |
RPMTAG_CLASS |
RPMTAG_TRACK |
RPMTAG_TRACKPROG |
RPMTAG_SANITYCHECK |
RPMTAG_SANITYCHECKPROG |
RPMTAG_FILESTAT |
RPMTAG_STAT |
RPMTAG_ORIGINTID |
RPMTAG_ORIGINTIME |
RPMTAG_HEADERSTARTOFF |
RPMTAG_HEADERENDOFF |
RPMTAG_PACKAGETIME |
RPMTAG_PACKAGESIZE |
RPMTAG_PACKAGEDIGEST |
RPMTAG_PACKAGESTAT |
RPMTAG_PACKAGEBASEURL |
RPMTAG_DISTEPOCH |
RPMTAG_FILEDIGESTALGO |
RPMTAG_FIRSTFREE_TAG | internal
RPMTAG_PACKAGETRANSFLAGS |
RPMTAG_PACKAGEDEPFLAGS |
RPMTAG_BUILDPREPPROG |
RPMTAG_BUILDPREP |
RPMTAG_BUILDBUILDPROG |
RPMTAG_BUILDBUILD |
RPMTAG_BUILDINSTALLPROG |
RPMTAG_BUILDINSTALL |
RPMTAG_BUILDCHECKPROG |
RPMTAG_BUILDCHECK |
RPMTAG_BUILDCLEANPROG |
RPMTAG_BUILDCLEAN |
RPMTAG_LASTARBITRARY_TAG | internal

Definition at line 152 of file rpmtag.h.

enum rpmTagReturnType_e

Identify how to return the header data type.

Enumerator
RPM_ANY_RETURN_TYPE |
RPM_SCALAR_RETURN_TYPE |
RPM_ARRAY_RETURN_TYPE |
RPM_MAPPING_RETURN_TYPE |
RPM_PROBE_RETURN_TYPE |
RPM_TREE_RETURN_TYPE |
RPM_OPENPGP_RETURN_TYPE |
RPM_X509_RETURN_TYPE |
RPM_ASN1_RETURN_TYPE |
RPM_OPAQUE_RETURN_TYPE |
RPM_MASK_RETURN_TYPE |

Definition at line 95 of file rpmtag.h.

enum rpmTagType_e

The basic types of data in tags from headers.

Enumerator
RPM_UINT8_TYPE |
RPM_UINT16_TYPE |
RPM_UINT32_TYPE |
RPM_UINT64_TYPE |
RPM_STRING_TYPE |
RPM_BIN_TYPE |
RPM_STRING_ARRAY_TYPE |
RPM_I18NSTRING_TYPE |

Definition at line 26 of file rpmtag.h.

## Function Documentation

static int copyEntry | ( | const indexEntry | entry,
|  | HE_t | he,
|  | int | minMem
| ) |  |

static

Retrieve data from header entry.

Todo:
  Permit retrieval of regions other than HEADER_IMUTABLE.

Parameters

  entry | header entry

Return values

  *he | tag container

Parameters

  minMem | string pointers refer to header memory?

Returns
  1 on success, otherwise error.

Definition at line 1383 of file header.c.

References rpmDataType_u::argv, _HE_s::c, entryInfo_s::count, indexEntry_s::data, ENTRY_IS_REGION, HEADER_IMAGE, indexEntry_s::info, indexEntry_s::length, entryInfo_s::offset, _HE_s::p, rpmDataType_u::ptr, indexEntry_s::rdlen, REGION_TAG_COUNT, RPM_BIN_TYPE, RPM_I18NSTRING_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, rpmDataType_u::str, _HE_s::t, entryInfo_s::tag, entryInfo_s::type, rpmDataType_u::ui32p, and xmalloc().

Referenced by headerNext(), and intGetEntry().

static int headerAddEntry | ( | Header | h,
|  | HE_t | he
| ) |  |

static

Add tag to header.

Duplicate tags are okay, but only defined for iteration (with the exceptions noted below). While you are allowed to add i18n string arrays through this function, you probably don't mean to. See headerAddI18NString() instead.

Parameters

  h | header
  he | tag container

Returns
  1 on success, 0 on failure

< Are header entries sorted?

Definition at line 1729 of file header.c.

References _HE_s::c, entryInfo_s::count, indexEntry_s::data, headerToken_s::flags, grabData(), hdrchkData, hdrchkType, HEADERFLAG_SORTED, headerToken_s::index, INDEX_MALLOC_SIZE, headerToken_s::indexAlloced, headerToken_s::indexUsed, indexEntry_s::info, indexEntry_s::length, entryInfo_s::offset, rpmDataType_u::ptr, _HE_s::t, entryInfo_s::tag, _HE_s::tag, entryInfo_s::type, and xrealloc().

Referenced by headerAddI18NString(), headerAddOrAppendEntry(), headerCopy(), and headerPut().

int headerAddI18NString | ( | Header | h,
|  | rpmTag | tag,
|  | const char * | string,
|  | const char * | lang
| ) |  |

Add locale specific tag to header.

A NULL lang is interpreted as the C locale. Here are the rules:

    *       - If the tag isn't in the header, it's added with the passed string
    *          as new value.
    *       - If the tag occurs multiple times in entry, which tag is affected
    *          by the operation is undefined.
    *       - If the tag is in the header w/ this language, the entry is
    *          *replaced* (like headerModifyEntry()).
    *

This function is intended to just "do the right thing". If you need more fine grained control use headerAddEntry() and headerModifyEntry().

Parameters

  h | header
  tag | tag
  string | tag value
  lang | locale

Returns
  1 on success, 0 on failure

Definition at line 1840 of file header.c.

References _free(), alloca(), rpmDataType_u::argv, _HE_s::c, entryInfo_s::count, indexEntry_s::data, ENTRY_IN_REGION, findEntry(), HEADER_I18NTABLE, headerAddEntry(), indexEntry_s::info, lang, indexEntry_s::length, entryInfo_s::offset, _HE_s::p, rpmDataType_u::ptr, RPM_I18NSTRING_TYPE, RPM_STRING_ARRAY_TYPE, _HE_s::t, _HE_s::tag, xmalloc(), and xrealloc().

Referenced by handlePreambleTag(), parseDescription(), and rpmcliImportPubkey().

static int headerAddOrAppendEntry | ( | Header | h,
|  | HE_t | he
| ) |  |

static

Add or append element to tag array in header.

Parameters

  h | header
  he | tag container

Returns
  1 on success, 0 on failure

Definition at line 1832 of file header.c.

References findEntry(), headerAddEntry(), headerAppendEntry(), _HE_s::t, and _HE_s::tag.

Referenced by headerPut().

static int headerAppendEntry | ( | Header | h,
|  | HE_t | he
| ) |  |

static

Append element to tag array in header.

Appends item p to entry w/ tag and type as passed. Won't work on RPM_STRING_TYPE.

Parameters

  h | header
  he | tag container

Returns
  1 on success, 0 on failure

Definition at line 1783 of file header.c.

References _HE_s::c, copyData(), entryInfo_s::count, indexEntry_s::data, dataLength(), ENTRY_IN_REGION, findEntry(), indexEntry_s::info, indexEntry_s::length, entryInfo_s::offset, _HE_s::p, rpmDataType_u::ptr, RPM_I18NSTRING_TYPE, RPM_STRING_TYPE, _HE_s::t, _HE_s::tag, xmalloc(), and xrealloc().

Referenced by headerAddOrAppendEntry().

Header headerCopy | ( | Header | h | ) |

Duplicate a header.

Parameters

  h | header

Returns
  new header instance

Definition at line 2101 of file header.c.

References _free(), alloca(), HEADER_IMAGE, headerAddEntry(), headerFini(), headerInit(), headerNew(), headerNext(), headerReload(), _HE_s::p, and rpmDataType_u::ptr.

Referenced by hdrUnload(), and rpmdbRebuild().

Header headerCopyLoad | ( | const void * | uh | ) |

Make a copy and convert header to in-memory representation.

Parameters

  uh | on-disk header blob (i.e. with offsets)

Returns
  header

Definition at line 1362 of file header.c.

References headerMap().

Referenced by rpmmiNext(), rpmpsmStage(), and rpmReSign().

void headerCopyTags | ( | Header | headerFrom,
|  | Header | headerTo,
|  | rpmTag * | tagstocopy
| ) |  |

Duplicate tag values from one header into another.

Parameters

  headerFrom | source header
  headerTo | destination header
  tagstocopy | array of tags that are copied

Definition at line 2118 of file header.c.

References _free(), alloca(), headerGet(), headerIsEntry(), headerPut(), _HE_s::p, rpmDataType_u::ptr, and _HE_s::tag.

Referenced by packageBinaries(), and parsePreamble().

int headerDel | ( | Header | h,
|  | HE_t | he,
|  | unsigned int | flags
| ) |  |

Remove tag container from header.

Parameters

  h | header
  he | tag container
  flags | (unused)

Returns
  1 on success, 0 on failure

Definition at line 2220 of file header.c.

References headerRemoveEntry(), and _HE_s::tag.

Referenced by addFileToTag(), compressFilelist(), parseDescription(), rpmdbAdd(), rpmfcGenerateDepends(), and rpmReSign().

HeaderIterator headerFini | ( | HeaderIterator | hi | ) |

Destroy header tag container iterator.

Parameters

  hi | header tag container iterator

Returns
  NULL always

Definition at line 2041 of file header.c.

References _free(), headerIterator_s::h, and headerFree().

Referenced by checkForDuplicates(), hdrKeyList(), headerCopy(), headerMergeLegacySigs(), headerRegenSigHeader(), hsaFini(), initSourceHeader(), rpmpsmStage(), rpmReSign(), and rpmVerifySignatures().

Header headerFree | ( | Header | h | ) |

Dereference a header instance.

Parameters

  h | header

Returns
  NULL on last dereference

Referenced by ckHeader(), delTE(), freeItem(), freePackage(), freeSpec(), hdr_dealloc(), hdrLoad(), hdrUnload(), headerFini(), headerReload(), headerSprintf(), IDTXfree(), IDTXglob(), makeHDRSignature(), miFreeHeader(), rdSignature(), readFile(), repoReadHeader(), repoWriteMetadataDocs(), rpmcliImportPubkey(), rpmcliInstall(), rpmdb_subscript(), rpmdbRebuild(), rpmdbRemove(), rpmdsFini(), rpmfiFini(), rpmfiNew(), rpmfiSetHeader(), rpmgiFini(), rpmgiLoadReadHeader(), rpmgiNext(), rpmgiReadHeader(), rpmgiWalkReadHeader(), rpmInstallSourcePackage(), rpmmiNext(), rpmpsmStage(), rpmReadHeader(), rpmReadHeaders(), rpmReadPackageFile(), rpmReSign(), rpmRollback(), rpmSingleHeaderFromFD(), rpmteSetHeader(), rpmts_HdrFromFdno(), rpmtsEraseDebuginfo(), rpmtsNotify(), rpmtsRun(), rpmtsSolve(), rpmVerifySignatures(), and writeRPM().

int headerGet | ( | Header | h,
|  | HE_t | he,
|  | unsigned int | flags
| ) |  |

Retrieve extension or tag value from a header.

Parameters

  h | header
  he | tag container
  flags | tag retrieval flags

Returns
  1 on success, 0 on failure

Definition at line 2138 of file header.c.

References _hdr_debug, _HE_s::c, _HE_s::freeData, headerCompoundFormats, HEADERGET_NOEXTENSION, headerGetStats(), intGetEntry(), name, _HE_s::p, rpmDataType_u::ptr, rpmheRealloc(), rpmswEnter(), rpmswExit(), _HE_s::t, _HE_s::tag, tagName(), and xstrcasecmp().

Referenced by addFileToTag(), addReqProv(), addTE(), checkPackageSet(), compressFilelist(), debevrTag(), debmd5sumsTag(), ensureOlder(), FDGsqlTag(), FDGxmlTag(), FDGyamlTag(), fiIntersect(), findErases(), formatValue(), fssizesTag(), ftsCacheUpdate(), getSignid(), handleInstInstalledFiles(), handleOneTrigger(), handlePreambleTag(), handleRmvdInstalledFiles(), hCopyTag(), hdr_subscript(), headerCopyTags(), headerMacrosLoad(), headerMacrosUnload(), headerNEVRA(), hGetColor(), hLoadTID(), i18nTag(), IDTXglob(), IDTXload(), instprefixTag(), isMemberInEntry(), localeTag(), lookupPackage(), main(), makeHDRSignature(), markReplacedFiles(), mireSkip(), needswhatTag(), nwlookupTag(), packageBinaries(), parseDescription(), parsePreamble(), parseSpec(), pkgbaseurlTag(), pkgoriginTag(), pkgUnpackagedSubdirs(), PRCOsqlTag(), PRCOxmlTag(), PRCOyamlTag(), printNewSpecfile(), processBinaryFiles(), processPackageFiles(), providePackageNVR(), rdSignature(), readFile(), relocateFileList(), rpmcliInstall(), rpmdbAdd(), rpmdbExportInfo(), rpmdbFindByFile(), rpmdbFindFpList(), rpmdbRemove(), rpmdsNew(), rpmdsNVRMatchesDep(), rpmdsThis(), rpmfcGenerateScriptletDeps(), rpmfiBuildFNames(), rpmfiNew(), rpmHeadersIdentical(), rpmInstallSourcePackage(), rpmpsmStage(), rpmReadPackageFile(), rpmReSign(), rpmteChain(), rpmteNew(), rpmtsAddInstallElement(), rpmtsAddUpgrades(), rpmtsCallback(), rpmtsEraseDebuginfo(), rpmtsFindPubkey(), rpmtsSolve(), rpmVerifySignatures(), rpmVersionCompare(), runImmedTriggers(), runInstScript(), runScript(), singleSprintf(), stashSt(), tag2uuidv1(), tag2uuidv5(), timeCheck(), triggercondsTag(), triggertypeTag(), whatneedsTag(), wnlookupTag(), and writeRPM().

const char* headerGetBaseURL | ( | Header | h | ) |

Return header base URL (e.g path or URL).

Parameters

  h | header

Returns
  header origin

Definition at line 1161 of file header.c.

References headerToken_s::baseurl.

Referenced by pkgbaseurlTag().

const char* headerGetDigest | ( | Header | h | ) |

Return digest of origin *.rpm file.

Parameters

  h | header

Returns
  header digest

Definition at line 1191 of file header.c.

References headerToken_s::digest.

Referenced by pkgdigestTag(), and populateInstallHeader().

rpmuint32_t headerGetEndOff | ( | Header | h | ) |

Return header ending byte offset.

Parameters

  h | header

Returns
  header ending byte offset

Definition at line 1247 of file header.c.

References headerToken_s::endoff.

Referenced by headerendoffTag().

rpmuint32_t headerGetInstance | ( | Header | h | ) |

Return header instance (if from rpmdb).

Parameters

  h | header

Returns
  header instance

Definition at line 1223 of file header.c.

References headerToken_s::instance.

Referenced by dbinstanceTag(), FDGsqlTag(), PRCOsqlTag(), rpmgiNext(), rpmpsmStage(), and verifyDependencies().

int headerGetMagic | ( | Header | h,
|  | unsigned char ** | magicp,
|  | size_t * | nmagicp
| ) |  |

Return header magic.

Parameters

  h | header
  *magicp | magic array
  *nmagicp | no. bytes of magic

Returns
  0 always

Definition at line 1125 of file header.c.

References header_magic, and headerToken_s::magic.

Referenced by headerCheck(), makeHDRSignature(), rdSignature(), readFile(), rpmReadHeader(), rpmReadPackageFile(), and rpmWriteHeader().

const char* headerGetOrigin | ( | Header | h | ) |

Return header origin (e.g path or URL).

Parameters

  h | header

Returns
  header origin

Definition at line 1147 of file header.c.

References headerToken_s::origin.

Referenced by hdrGetOrigin(), IDTXglob(), pkgoriginTag(), and populateInstallHeader().

void* headerGetRpmdb | ( | Header | h | ) |

Return rpmdb pointer.

Parameters

  h | header

Returns
  rpmdb pointer

Definition at line 1207 of file header.c.

References headerToken_s::rpmdb.

Referenced by nwlookupTag(), and wnlookupTag().

rpmuint32_t headerGetStartOff | ( | Header | h | ) |

Return header starting byte offset.

Parameters

  h | header

Returns
  header starting byte offset

Definition at line 1235 of file header.c.

References headerToken_s::startoff.

Referenced by headerstartoffTag().

struct stat* headerGetStatbuf | ( | Header | h | ) |

read

Return header stat(2) buffer (of origin *.rpm file).

Parameters

  h | header

Returns
  header stat(2) buffer

Definition at line 1177 of file header.c.

References headerToken_s::sb.

Referenced by pkgmtimeTag(), pkgsizeTag(), populateInstallHeader(), and rpmReadHeader().

void* headerGetStats | ( | Header | h,
|  | int | opx
| ) |  |

Return header stats accumulator structure.

Parameters

  h | header
  opx | per-header accumulator index (aka rpmtsOpX)

Returns
  per-header accumulator pointer

Definition at line 86 of file header.c.

References _hdr_stats, headerToken_s::h_getops, and headerToken_s::h_loadops.

Referenced by headerGet(), headerLoad(), headerNext(), headerScrub(), and headerUnload().

HeaderIterator headerInit | ( | Header | h | ) |

Create header tag iterator.

Parameters

  h | header

Returns
  header tag iterator

Definition at line 2051 of file header.c.

References headerIterator_s::h, headerLink(), headerSort(), headerIterator_s::next_index, and xmalloc().

Referenced by checkForDuplicates(), hdrKeyList(), headerCopy(), headerMergeLegacySigs(), headerRegenSigHeader(), hsaInit(), initSourceHeader(), rpmpsmStage(), rpmReSign(), and rpmVerifySignatures().

int headerIsEntry | ( | Header | h,
|  | rpmTag | tag
| ) |  |

Check if tag is in header.

Parameters

  h | header
  tag | tag

Returns
  1 on success, 0 on failure

Definition at line 1368 of file header.c.

References findEntry().

Referenced by addTE(), checkForRequired(), compressFilelist(), fillOutMainPackage(), headerCopyTags(), headerMergeLegacySigs(), headerNEVRA(), headerRegenSigHeader(), IDTXglob(), initSourceHeader(), makeHDRSignature(), parseScript(), parseSpec(), readFile(), relocateFileList(), rpmdbAdd(), rpmdbRebuild(), rpmfiBuildFNames(), rpmfiNew(), rpmInstallSourcePackage(), rpmmiNext(), rpmpsmStage(), rpmReadPackageFile(), rpmtsAddInstallElement(), rpmVerifySignatures(), showVerifyPackage(), singleSprintf(), unsatisfiedDepend(), and writeRPM().

Header headerLink | ( | Header | h | ) |

Reference a header instance.

Parameters

  h | header

Returns
  referenced header instance

Referenced by cacheStashLatest(), hdr_Wrap(), hdrUnload(), headerInit(), headerLoad(), headerNew(), headerSprintf(), IDTXglob(), IDTXload(), rdSignature(), relocateFileList(), rpmcliInstall(), rpmdbRemove(), rpmdsDup(), rpmfiNew(), rpmfiSetHeader(), rpmgiLoadReadHeader(), rpmgiNext(), rpmgiWalkReadHeader(), rpmInstallSourcePackage(), rpmpsmStage(), rpmReadHeader(), rpmReadPackageFile(), rpmReSign(), rpmteHeader(), rpmteSetHeader(), rpmtsEraseDebuginfo(), rpmtsNotify(), rpmtsSolve(), and writeRPM().

Header headerLoad | ( | void * | uh | ) |

Convert header to in-memory representation.

Parameters

  uh | on-disk header blob (i.e. with offsets)

Returns
  header

< Are header entries sorted?

< Header came from legacy source?

< Header came from legacy source?

< Are header entries sorted?

Definition at line 940 of file header.c.

References _free(), headerToken_s::_item, alloca(), headerToken_s::baseurl, headerToken_s::blob, headerToken_s::bloblen, entryInfo_s::count, indexEntry_s::data, headerToken_s::digest, headerToken_s::endoff, headerToken_s::flags, headerToken_s::h_getops, headerToken_s::h_loadops, hdrchkData, hdrchkTags, hdrchkType, HEADER_BASENAMES, HEADER_I18NTABLE, HEADER_IMAGE, header_magic, HEADER_OLDFILENAMES, HEADERFLAG_LEGACY, HEADERFLAG_SORTED, headerGetPool(), headerGetStats(), headerLink(), headerRemoveEntry(), headerSort(), headerToken_s::index, headerToken_s::indexAlloced, headerToken_s::indexUsed, indexEntry_s::info, headerToken_s::instance, indexEntry_s::length, headerToken_s::magic, entryInfo_s::offset, headerToken_s::origin, indexEntry_s::rdlen, REGION_TAG_COUNT, REGION_TAG_TYPE, regionSwab(), headerToken_s::rpmdb, rpmioPutPool(), rpmswEnter(), rpmswExit(), headerToken_s::sb, headerToken_s::startoff, entryInfo_s::tag, entryInfo_s::type, rpmioItem_s::use, and xcalloc().

Referenced by ckHeader(), hdrLoad(), headerMap(), headerReload(), rdSignature(), rpmmiNext(), and rpmReadHeader().

void headerMergeLegacySigs | ( | Header | h,
|  | const Header | sigh
| ) |  |

Translate and merge legacy signature tags into header.

Todo:
  Remove headerSort() through headerInitIterator() modifies sig.

Parameters

  h | header
  sigh | signature header

Definition at line 236 of file hdrNVR.c.

References _free(), alloca(), _HE_s::c, hdrchkData, hdrchkType, HEADER_SIGBASE, HEADER_TAGBASE, headerFini(), headerInit(), headerIsEntry(), headerNext(), headerPut(), _HE_s::p, rpmDataType_u::ptr, RPM_BIN_TYPE, RPM_I18NSTRING_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, RPM_UINT16_TYPE, RPM_UINT32_TYPE, RPM_UINT64_TYPE, RPM_UINT8_TYPE, RPMSIGTAG_DSA, RPMSIGTAG_MD5, RPMSIGTAG_PAYLOADSIZE, RPMSIGTAG_RSA, RPMSIGTAG_SHA1, RPMSIGTAG_SIZE, RPMTAG_ARCHIVESIZE, RPMTAG_SIGMD5, RPMTAG_SIGSIZE, _HE_s::t, and _HE_s::tag.

Referenced by rpmReadPackageFile(), and writeRPM().

int headerMod | ( | Header | h,
|  | HE_t | he,
|  | unsigned int | flags
| ) |  |

Modify tag container in header.

If there are multiple entries with this tag, the first one gets replaced.

Parameters

  h | header
  he | tag container
  flags | (unused)

Returns
  1 on success, 0 on failure

Definition at line 2226 of file header.c.

References headerModifyEntry().

Referenced by relocateFileList().

static int headerModifyEntry | ( | Header | h,
|  | HE_t | he
| ) |  |

static

Modify tag in header.

If there are multiple entries with this tag, the first one gets replaced.

Parameters

  h | header
  he | tag container

Returns
  1 on success, 0 on failure

Definition at line 1995 of file header.c.

References _free(), _HE_s::c, entryInfo_s::count, indexEntry_s::data, ENTRY_IN_REGION, findEntry(), grabData(), headerToken_s::index, indexEntry_s::info, indexEntry_s::length, entryInfo_s::offset, rpmDataType_u::ptr, _HE_s::t, entryInfo_s::tag, _HE_s::tag, and entryInfo_s::type.

Referenced by headerMod().

int headerNEVRA | ( | Header | h,
|  | const char ** | np,
|  | const char ** | ep,
|  | const char ** | vp,
|  | const char ** | rp,
|  | const char ** | ap
| ) |  |

Return name, epoch, version, release, arch strings from header.

Parameters

  h | header

Return values

  *np | name pointer (or NULL)
  *ep | epoch pointer (or NULL)
  *vp | version pointer (or NULL)
  *rp | release pointer (or NULL)
  *ap | arch pointer (or NULL)

Returns
  0 always

Definition at line 156 of file hdrNVR.c.

References _free(), alloca(), _HE_s::c, headerGet(), headerIsEntry(), _HE_s::p, rpmDataType_u::ptr, RPM_STRING_TYPE, RPMTAG_ARCH, RPMTAG_NAME, RPMTAG_RELEASE, RPMTAG_SOURCERPM, RPMTAG_VERSION, rpmDataType_u::str, _HE_s::t, _HE_s::tag, and xstrdup().

Referenced by doSetupMacro(), genSourceRpmName(), hGetNVRA(), providePackageNVR(), rpmdbRebuild(), rpmdsNVRMatchesDep(), rpmdsThis(), and writeRPM().

Header headerNew | ( | void |  | ) |

Create new (empty) header instance.

Returns
  header

< Are header entries sorted?

Definition at line 165 of file header.c.

References headerToken_s::baseurl, headerToken_s::blob, headerToken_s::bloblen, headerToken_s::digest, headerToken_s::endoff, headerToken_s::flags, headerToken_s::h_getops, headerToken_s::h_loadops, header_magic, HEADERFLAG_SORTED, headerGetPool(), headerLink(), headerToken_s::index, INDEX_MALLOC_SIZE, headerToken_s::indexAlloced, headerToken_s::indexUsed, headerToken_s::instance, headerToken_s::magic, headerToken_s::origin, headerToken_s::rpmdb, headerToken_s::sb, headerToken_s::startoff, and xcalloc().

Referenced by headerCopy(), headerRegenSigHeader(), newPackage(), newSpec(), rpmcliImportPubkey(), rpmpsmStage(), rpmReSign(), and writeRPM().

int headerNext | ( | HeaderIterator | hi,
|  | HE_t | he,
|  | unsigned int | flags
| ) |  |

Return next tag from header.

Parameters

  hi | header tag iterator
  he | tag container
  flags | (unused)

Returns
  1 on success, 0 on failure

Definition at line 2065 of file header.c.

References copyEntry(), ENTRY_IS_REGION, headerIterator_s::h, headerGetStats(), headerToken_s::index, headerToken_s::indexUsed, indexEntry_s::info, headerIterator_s::next_index, rpmheRealloc(), rpmswEnter(), rpmswExit(), entryInfo_s::tag, and _HE_s::tag.

Referenced by checkForDuplicates(), hdrKeyList(), headerCopy(), headerMergeLegacySigs(), headerRegenSigHeader(), hsaNext(), initSourceHeader(), rpmpsmStage(), rpmReSign(), and rpmVerifySignatures().

int headerPut | ( | Header | h,
|  | HE_t | he,
|  | unsigned int | flags
| ) |  |

Add or append tag container to header.

Parameters

  h | header
  he | tag container
  flags | (unused)

Returns
  1 on success, 0 on failure

Definition at line 2201 of file header.c.

References _HE_s::append, headerAddEntry(), and headerAddOrAppendEntry().

Referenced by addChangelogEntry(), addFileToArrayTag(), addFileToTag(), addOrAppendListEntry(), addReqProv(), compressFilelist(), doIcon(), fillOutMainPackage(), ftsCacheUpdate(), genCpioListAndHeader(), getDigestAlgo(), handlePreambleTag(), hCopyTag(), headerCopyTags(), headerMergeLegacySigs(), headerRegenSigHeader(), hSaveBlinks(), hSaveFlinks(), initSourceHeader(), initSourceHeaderScriptlet(), makeHDRSignature(), packageBinaries(), packageSources(), parsePreamble(), parseScript(), parseSpec(), populateInstallHeader(), postPopulateInstallHeader(), processMetadataFile(), processScriptFiles(), providePackageNVR(), relocateFileList(), rpmAddSignature(), rpmcliImportPubkey(), rpmdbAdd(), rpmdbRemove(), rpmfcGenerateDepends(), rpmlibMarkers(), rpmpsmStage(), rpmReSign(), and writeRPM().

Header headerRegenSigHeader | ( | const Header | h,
|  | int | noArchiveSize
| ) |  |

Regenerate signature header.

Todo:
  Remove headerSort() through headerInitIterator() modifies h.

Parameters

  h | header
  noArchiveSize | don't copy archive size tag (pre rpm-4.1)

Returns
  regenerated signature header

Definition at line 303 of file hdrNVR.c.

References _free(), alloca(), HEADER_SIGBASE, HEADER_TAGBASE, headerFini(), headerInit(), headerIsEntry(), headerNew(), headerNext(), headerPut(), _HE_s::p, rpmDataType_u::ptr, RPMSIGTAG_MD5, RPMSIGTAG_PAYLOADSIZE, RPMSIGTAG_SIZE, RPMTAG_ARCHIVESIZE, RPMTAG_DSAHEADER, RPMTAG_RSAHEADER, RPMTAG_SHA1HEADER, RPMTAG_SIGMD5, RPMTAG_SIGSIZE, and _HE_s::tag.

Referenced by rpmpsmStage().

Header headerReload | ( | Header | h,
|  | int | tag
| ) |  |

Convert header to on-disk representation, and then reload.

This is used to insure that all header data is in a single contiguous memory allocation.

Parameters

  h | header (with pointers)
  tag | region tag

Returns
  on-disk header (with offsets)

< Is 1st header region allocated?

Definition at line 1259 of file header.c.

References _free(), headerToken_s::baseurl, headerToken_s::digest, ENTRY_IS_REGION, headerToken_s::flags, HEADER_IMMUTABLE, HEADER_SIGNATURES, HEADERFLAG_ALLOCATED, headerFree(), headerLoad(), headerSetBaseURL(), headerSetDigest(), headerSetInstance(), headerSetOrigin(), headerSetRpmdb(), headerUnload(), headerToken_s::index, indexEntry_s::info, headerToken_s::instance, headerToken_s::origin, headerToken_s::rpmdb, headerToken_s::sb, entryInfo_s::tag, and xstrdup().

Referenced by headerCopy(), rpmpsmStage(), rpmReSign(), and writeRPM().

static int headerRemoveEntry | ( | Header | h,
|  | rpmTag | tag
| ) |  |

static

Delete tag in header.

Removes all entries of type tag from the header, returns 1 if none were found.

Parameters

  h | header
  tag | tag

Returns
  0 on success, 1 on failure (INCONSISTENT)

Definition at line 902 of file header.c.

References _free(), indexEntry_s::data, ENTRY_IN_REGION, findEntry(), headerToken_s::index, headerToken_s::indexUsed, indexEntry_s::info, indexEntry_s::length, and entryInfo_s::tag.

Referenced by headerDel(), and headerLoad().

int headerSetBaseURL | ( | Header | h,
|  | const char * | baseurl
| ) |  |

Store header base URL (e.g path or URL).

Parameters

  h | header
  baseurl | new header baseurl

Returns
  0 always

Definition at line 1168 of file header.c.

References _free(), headerToken_s::baseurl, and xstrdup().

Referenced by headerReload(), and repoReadHeader().

int headerSetDigest | ( | Header | h,
|  | const char * | digest
| ) |  |

Store digest of origin *.rpm file.

Parameters

  h | header
  st | new header digest

Returns
  0 always

Definition at line 1198 of file header.c.

References _free(), headerToken_s::digest, and xstrdup().

Referenced by headerReload(), and repoReadHeader().

rpmuint32_t headerSetEndOff | ( | Header | h,
|  | rpmuint32_t | endoff
| ) |  |

Store header ending byte offset.

Parameters

  h | header
  startoff | new header ending byte offset

Returns
  0 always

Definition at line 1252 of file header.c.

References headerToken_s::endoff.

Referenced by rdSignature(), and rpmReadHeader().

rpmuint32_t headerSetInstance | ( | Header | h,
|  | rpmuint32_t | instance
| ) |  |

Store header instance (e.g path or URL).

Parameters

  h | header
  instance | new header instance

Returns
  0 always

Definition at line 1228 of file header.c.

References headerToken_s::instance.

Referenced by headerReload(), repoWriteMetadataDocs(), rpmdbAdd(), rpmmiNext(), and rpmpsmStage().

int headerSetMagic | ( | Header | h,
|  | unsigned char * | magic,
|  | size_t | nmagic
| ) |  |

Store header magic.

Parameters

  h | header
  magic | magic array
  nmagic | no. bytes of magic

Returns
  0 always

Definition at line 1135 of file header.c.

References headerToken_s::magic.

int headerSetOrigin | ( | Header | h,
|  | const char * | origin
| ) |  |

Store header origin (e.g path or URL).

Parameters

  h | header
  origin | new header origin

Returns
  0 always

Definition at line 1152 of file header.c.

References _free(), headerToken_s::origin, and xstrdup().

Referenced by hdrSetOrigin(), headerReload(), rpmmiNext(), and rpmReadHeader().

void* headerSetRpmdb | ( | Header | h,
|  | void * | rpmdb
| ) |  |

Store rpmdb pointer.

Parameters

  h | header
  rpmdb | new rpmdb pointer (or NULL to unset)

Returns
  NULL always

Definition at line 1214 of file header.c.

References headerToken_s::rpmdb.

Referenced by headerReload(), and showQueryPackage().

rpmuint32_t headerSetStartOff | ( | Header | h,
|  | rpmuint32_t | startoff
| ) |  |

Store header starting byte offset.

Parameters

  h | header
  startoff | new header starting byte offset

Returns
  0 always

Definition at line 1240 of file header.c.

References headerToken_s::startoff.

Referenced by rdSignature(), and rpmReadHeader().

int headerSetStatbuf | ( | Header | h,
|  | struct stat * | st
| ) |  |

Copy into header stat(2) buffer (of origin *.rpm file).

Parameters

  h | header
  st | new header stat(2) buffer

Returns
  0 always

Definition at line 1184 of file header.c.

References headerToken_s::sb.

size_t headerSizeof | ( | Header | h | ) |

Return size of on-disk header representation in bytes.

Parameters

  h | header

Returns
  size of on-disk header

< Header came from legacy source?

Definition at line 250 of file header.c.

References entryInfo_s::count, ENTRY_IS_REGION, headerToken_s::flags, header_magic, HEADERFLAG_LEGACY, headerSort(), headerToken_s::index, indexEntry_s::info, indexEntry_s::length, entryInfo_s::offset, entryInfo_s::type, and typeSizes.

Referenced by rdSignature(), readFile(), and wrSignature().

static void headerSort | ( | Header | h | ) |

static

Sort tags in header.

Parameters

  h | header

< Are header entries sorted?

< Are header entries sorted?

Definition at line 211 of file header.c.

References headerToken_s::flags, HEADERFLAG_SORTED, headerToken_s::index, indexCmp(), and headerToken_s::indexUsed.

Referenced by findEntry(), headerInit(), headerLoad(), headerSizeof(), and headerUnload().

char* headerSprintf | ( | Header | h,
|  | const char * | fmt,
|  | headerTagTableEntry | tags,
|  | headerSprintfExtension | exts,
|  | errmsg_t * | errmsg
| ) |  |

Return formatted output string from header tags.

The returned string must be free()d.

Parameters

  h | header
  fmt | format to use
  tags | array of tag name/value/type triples (NULL uses default)
  exts | formatting extensions chained table (NULL uses default)

Return values

  errmsg | error message (if any)

Returns
  formatted output string (malloc'ed)

Definition at line 6261 of file hdrfmt.c.

References _free(), _hdrqf_debug, alloca(), headerSprintfArgs_s::alloced, sprintfToken_s::array, sprintfTag_s::av, headerSprintfArgs_s::ec, headerSprintfArgs_s::errmsg, headerSprintfArgs_s::exts, headerSprintfArgs_s::fmt, headerSprintfArgs_s::format, freeFormat(), headerSprintfArgs_s::h, headerCompoundFormats, headerFree(), headerLink(), hsaFini(), hsaInit(), hsaNext(), hsaReserve(), headerSprintfArgs_s::nec, headerSprintfArgs_s::numTokens, parseFormat(), PARSER_BEGIN, rpmecFree(), rpmecNew(), rpmTagTable, singleSprintf(), stpcpy(), sprintfToken_s::tag, sprintfTag_s::tagno, headerSprintfArgs_s::tags, sprintfToken_s::type, sprintfToken_s::u, headerSprintfArgs_s::val, headerSprintfArgs_s::vallen, xrealloc(), and xstrdup().

Referenced by hdrSprintf(), packageBinaries(), parseForSimple(), printNewSpecfile(), queryHeader(), rfileHeaderSprintf(), rpmcliImportPubkey(), rpmfiNew(), rpmpsmStage(), rpmShowProgress(), and rpmtsSolve().

Header headerUnlink | ( | Header | h | ) |

Dereference a header instance.

Parameters

  h | header

Returns
  NULL on last dereference

void* headerUnload | ( | Header | h,
|  | size_t * | lenp
| ) |  |

headerUnload.

Parameters

  h | header

Return values

  *lenp | no. bytes in unloaded header blob

Returns
  unloaded header blob (NULL on error)

< Header came from legacy source?

< Header came from legacy source?

< Are header entries sorted?

Definition at line 618 of file header.c.

References _free(), entryInfo_s::count, indexEntry_s::data, ENTRY_IS_REGION, headerToken_s::flags, hdrchkData, hdrchkTags, HEADERFLAG_LEGACY, HEADERFLAG_SORTED, headerGetStats(), headerSort(), headerUnsort(), headerToken_s::index, headerToken_s::indexUsed, indexEntry_s::info, indexEntry_s::length, entryInfo_s::offset, indexEntry_s::rdlen, rpmswEnter(), rpmswExit(), entryInfo_s::tag, entryInfo_s::type, typeSizes, and xmalloc().

Referenced by hdrUnload(), headerReload(), miFreeHeader(), rpmdbAdd(), rpmWriteHeader(), and writeRPM().

static void headerUnsort | ( | Header | h | ) |

static

Restore tags in header to original ordering.

Parameters

  h | header

Definition at line 244 of file header.c.

References headerToken_s::index, headerToken_s::indexUsed, and offsetCmp().

Referenced by headerUnload().

static int headerUsageCount | ( | Header | h | ) |

inline static

Return header reference count.

Parameters

  h | header

Returns
  no. of references

Definition at line 146 of file header_internal.h.

References headerToken_s::_item, and rpmioItem_s::use.

static rpmuint32_t regionSwab | ( | indexEntry | entry,
|  | rpmuint32_t | il,
|  | rpmuint32_t | dl,
|  | entryInfo | pe,
|  | unsigned char * | dataStart,
|  | const unsigned char * | dataEnd,
|  | rpmint32_t | regionid
| ) |  |

static

Swab rpmuint64_t/rpmuint32_t/rpmuint16_t arrays within header region.

This code is way more twisty than I would like.

A bug with RPM_I18NSTRING_TYPE in rpm-2.5.x (fixed in August 1998) causes the offset and length of elements in a header region to disagree regarding the total length of the region data.

The "fix" is to compute the size using both offset and length and return the larger of the two numbers as the size of the region. Kinda like computing left and right Riemann sums of the data elements to determine the size of a data structure, go figger :-).

There's one other twist if a header region tag is in the set to be swabbed, as the data for a header region is located after all other tag data.

Parameters

  entry | header entry
  il | no. of entries
  dl | start no. bytes of data
  pe | header physical entry pointer (swapped)
  dataStart | header data start
  dataEnd | header data end
  regionid | region offset

Returns
  no. bytes of data in region, 0 on error

Definition at line 496 of file header.c.

References alloca(), entryInfo_s::count, indexEntry_s::data, dataLength(), hdrchkAlign, hdrchkData, hdrchkType, HEADER_I18NTABLE, HEADER_IMAGE, indexEntry_s::info, indexEntry_s::length, entryInfo_s::offset, rpmDataType_u::ptr, indexEntry_s::rdlen, REGION_TAG_COUNT, RPM_I18NSTRING_TYPE, entryInfo_s::tag, entryInfo_s::type, typeSizes, and rpmDataType_u::ui8p.

Referenced by headerLoad().

static rpmRC rpmWriteHeader | ( | FD_t | fd,
|  | Header | h,
|  | const char ** | msg
| ) |  |

static

Write (with unload) header to file handle.

Parameters

  fd | file handle
  h | header

Return values

  *msg | failure msg

Returns
  RPMRC_OK on success

Definition at line 70 of file pkgio.c.

References _, _free(), _pkgio_debug, Ferror(), Fstrerror(), Fwrite(), headerGetMagic(), headerUnload(), RPMRC_FAIL, RPMRC_OK, and xstrdup().

Referenced by wrHeader(), and wrSignature().

static unsigned char* tagSwab | ( | unsigned char * | t,
|  | const HE_t | he,
|  | size_t | nb
| ) |  |

static

Swab rpmuint64_t/rpmuint32_t/rpmuint16_t arrays within header region.

Definition at line 370 of file header.c.

References _HE_s::c, _HE_s::p, rpmDataType_u::ptr, RPM_UINT16_TYPE, RPM_UINT32_TYPE, RPM_UINT64_TYPE, _HE_s::t, rpmDataType_u::ui16p, and rpmDataType_u::ui32p.

Referenced by copyData(), and rpmheRealloc().

## Variable Documentation

unsigned char header_magic[8]

static

Initial value:
= {
0x8e, 0xad, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00
}

Definition at line 35 of file header.c.

Referenced by headerGetMagic(), headerLoad(), headerNew(), and headerSizeof().

headerSprintfExtension headerCompoundFormats

Supported default header extension/tag output formats.

Definition at line 4849 of file hdrfmt.c.

Referenced by headerGet(), headerSprintf(), queryHeader(), and rpmDisplayQueryTags().

headerSprintfExtension headerDefaultFormats

Supported default header tag output formats.

Definition at line 322 of file hdrfmt.c.

size_t headerMaxbytes = (1024*1024*1024)

static

Maximum no.

of bytes permitted in a header.

Definition at line 67 of file header.c.

Referenced by headerMap().

int typeSizes[16]

static

Initial value:
= {
0,
1,
1,
2,
4,
8,
-1,
1,
-1,
-1,
0,
0,
0,
0,
0,
0
}

Size of header data types.

Definition at line 44 of file header.c.

Referenced by dataLength(), headerSizeof(), headerUnload(), and regionSwab().