rpmtag.h File Reference
HEADER.
`#include <rpmiotypes.h>`
`#include <rpmsw.h>`
Include dependency graph for rpmtag.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

union | rpmDataType_u
struct | _HE_s

## Macros

#define | RPM_MIN_TYPE 2
#define | RPM_MAX_TYPE 9
#define | RPM_MASK_TYPE 0x0000ffff
#define | HEADER_IMAGE 61
| Header private tags. More...
#define | HEADER_SIGNATURES 62
#define | HEADER_IMMUTABLE 63
#define | HEADER_REGIONS 64
#define | HEADER_I18NTABLE 100
#define | HEADER_SIGBASE 256
#define | HEADER_TAGBASE 1000
#define | RPMDBI_PACKAGES 0 /* Installed package headers. */
| Pseudo-tags used by the rpmdb and rpmgi iterator API's. More...
#define | RPMDBI_DEPENDS 1 /* Dependency resolution cache. */
#define | RPMDBI_LABEL 2 /* Fingerprint search marker. */
#define | RPMDBI_ADDED 3 /* Added package headers. */
#define | RPMDBI_REMOVED 4 /* Removed package headers. */
#define | RPMDBI_AVAILABLE 5 /* Available package headers. */
#define | RPMDBI_HDLIST 6 /* (rpmgi) Header list. */
#define | RPMDBI_ARGLIST 7 /* (rpmgi) Argument list. */
#define | RPMDBI_FTSWALK 8 /* (rpmgi) File tree walk. */
#define | RPMTAG_PKGID RPMTAG_SIGMD5 /* x */
#define | RPMTAG_HDRID RPMTAG_SHA1HEADER /* s */
#define | RPMTAG_N RPMTAG_NAME /* s */
#define | RPMTAG_V RPMTAG_VERSION /* s */
#define | RPMTAG_R RPMTAG_RELEASE /* s */
#define | RPMTAG_E RPMTAG_EPOCH /* i */
#define | RPMTAG_FILEMD5S RPMTAG_FILEDIGESTS /* s[] */
#define | RPMTAG_PROVIDES RPMTAG_PROVIDENAME /* s[] */
#define | RPMTAG_P RPMTAG_PROVIDENAME /* s[] */
#define | RPMTAG_REQUIRES RPMTAG_REQUIRENAME /* s[] */
#define | RPMTAG_CONFLICTS RPMTAG_CONFLICTNAME /* s[] */
#define | RPMTAG_C RPMTAG_CONFLICTNAME /* s[] */
#define | RPMTAG_OBSOLETES RPMTAG_OBSOLETENAME /* s[] */
#define | RPMTAG_O RPMTAG_OBSOLETENAME /* s[] */
#define | RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME /* s[] */
#define | RPMTAG_ENHANCES RPMTAG_ENHANCESNAME /* s[] */
#define | RPMTAG_SVNID RPMTAG_CVSID /* s */
#define | RPMTAG_D RPMTAG_DISTEPOCH /* s */
#define | RPMTAG_EXTERNAL_TAG 1000000
#define | HEADERGET_NOEXTENSION (1 << 0)
#define | HEADERGET_NOI18NSTRING (1 << 1)
#define | headerLink(_h) ((Header)rpmioLinkPoolItem((rpmioItem)(_h), __FUNCTION__, __FILE__, __LINE__))
#define | headerUnlink(_h) ((Header)rpmioUnlinkPoolItem((rpmioItem)(_h), __FUNCTION__, __FILE__, __LINE__))
#define | headerFree(_h) ((Header)rpmioFreePoolItem((rpmioItem)(_h), __FUNCTION__, __FILE__, __LINE__))

## Typedefs

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
typedef struct _HE_s | HE_s
typedef struct tagStore_s * | tagStore_t
typedef struct headerTagTableEntry_s * | headerTagTableEntry

## 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...

enum

rpmSigTag_e {
RPMSIGTAG_SIZE = 1000, RPMSIGTAG_LEMD5_1 = 1001, RPMSIGTAG_PGP = 1002, RPMSIGTAG_LEMD5_2 = 1003,
RPMSIGTAG_MD5 = 1004, RPMSIGTAG_GPG = 1005, RPMSIGTAG_PGP5 = 1006, RPMSIGTAG_PAYLOADSIZE = 1007,
RPMSIGTAG_BADSHA1_1 = RPMTAG_BADSHA1_1, RPMSIGTAG_BADSHA1_2 = RPMTAG_BADSHA1_2, RPMSIGTAG_SHA1 = RPMTAG_SHA1HEADER, RPMSIGTAG_DSA = RPMTAG_DSAHEADER,
RPMSIGTAG_RSA = RPMTAG_RSAHEADER, RPMSIGTAG_PADDING = 0x3fffffff
}

| Tags found in signature header from package. More...

## Functions

const char * | tagName (rpmTag tag)
| Return tag name from value. More...
unsigned int | tagType (rpmTag tag)
| Return tag data type from value. More...
rpmTag | tagValue (const char *tagstr)
| Return tag value from name. More...
char * | tagCanonicalize (const char *s)
| Canonicalize a rpmTag string. More...
rpmTag | tagGenerate (const char *s)
| Generate a tag from arbitrary string. More...
void | tagClean (headerTagIndices _rpmTags)
| Free memory in header tag indices. More...
tagStore_t | tagStoreFree (tagStore_t dbiTags, size_t dbiNTags)
| Destroy tagStore array. More...
void | rpmDisplayQueryTags (FILE *fp, headerTagTableEntry _rpmTagTable, headerSprintfExtension _rpmHeaderFormats)
| Display list of tags that can be used in –queryformat. 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 | headerMacrosLoad (Header h)
| Define per-header macros. More...
int | headerMacrosUnload (Header h)
| Define per-header macros. 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...
rpmuint32_t | hGetColor (Header h)
| Return header color. 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

headerTagTableEntry | rpmTagTable
| Automatically generated table of tag name/value pairs. More...
int | rpmTagTableSize
| Number of entries in rpmTagTable. More...
headerTagIndices | rpmTags
headerSprintfExtension | headerDefaultFormats
| Supported default header tag output formats. More...
headerSprintfExtension | headerCompoundFormats
| Supported default header extension/tag output formats. More...

## Macro Definition Documentation

#define HEADER_I18NTABLE 100

Definition at line 119 of file rpmtag.h.

Referenced by hdrKeyList(), headerAddI18NString(), headerFindI18NString(), headerLoad(), initSourceHeader(), and regionSwab().

#define HEADER_IMAGE 61

Header private tags.

Note
  General use tags should start at 1000 (RPM's tag space starts there).

Definition at line 115 of file rpmtag.h.

Referenced by copyEntry(), headerCopy(), headerLoad(), and regionSwab().

#define HEADER_IMMUTABLE 63

Definition at line 117 of file rpmtag.h.

Referenced by headerReload().

#define HEADER_REGIONS 64

Definition at line 118 of file rpmtag.h.

#define HEADER_SIGBASE 256

Definition at line 120 of file rpmtag.h.

Referenced by headerMergeLegacySigs(), and headerRegenSigHeader().

#define HEADER_SIGNATURES 62

Definition at line 116 of file rpmtag.h.

Referenced by headerReload().

#define HEADER_TAGBASE 1000

Definition at line 121 of file rpmtag.h.

Referenced by headerMergeLegacySigs(), and headerRegenSigHeader().

#define headerFree | ( |  | _h | ) | ((Header)rpmioFreePoolItem((rpmioItem)(_h), __FUNCTION__, __FILE__, __LINE__))

Definition at line 854 of file rpmtag.h.

#define HEADERGET_NOEXTENSION (1 << 0)

Extension search disabler.

Definition at line 757 of file rpmtag.h.

Referenced by headerGet(), i18nTag(), localeTag(), pkgbaseurlTag(), and pkgoriginTag().

#define HEADERGET_NOI18NSTRING (1 << 1)

Return i18n strings as argv.

Definition at line 758 of file rpmtag.h.

Referenced by intGetEntry().

#define headerLink | ( |  | _h | ) | ((Header)rpmioLinkPoolItem((rpmioItem)(_h), __FUNCTION__, __FILE__, __LINE__))

Definition at line 832 of file rpmtag.h.

#define headerUnlink | ( |  | _h | ) | ((Header)rpmioUnlinkPoolItem((rpmioItem)(_h), __FUNCTION__, __FILE__, __LINE__))

Definition at line 843 of file rpmtag.h.

#define RPM_MASK_TYPE 0x0000ffff

Definition at line 42 of file rpmtag.h.

Referenced by rpmDisplayQueryTags(), sql_bind_key(), sql_copen(), and sql_initDB().

#define RPM_MAX_TYPE 9

Definition at line 41 of file rpmtag.h.

Referenced by rpmDisplayQueryTags().

#define RPM_MIN_TYPE 2

Definition at line 40 of file rpmtag.h.

#define RPMDBI_ADDED 3 /* Added package headers. */

Definition at line 141 of file rpmtag.h.

Referenced by _tagName(), _tagType(), _tagValue(), rpmdbAdd(), rpmdbMoveDatabase(), rpmdbOpenAll(), rpmdbOpenDatabase(), rpmdbRemove(), and rpmgiNext().

#define RPMDBI_ARGLIST 7 /* (rpmgi) Argument list. */

Definition at line 145 of file rpmtag.h.

Referenced by _tagName(), _tagType(), _tagValue(), rpmcliArgIter(), rpmcliInstall(), rpmcliSign(), rpmgiGlobArgv(), rpmgiNext(), and rpmReSign().

#define RPMDBI_AVAILABLE 5 /* Available package headers. */

Definition at line 143 of file rpmtag.h.

Referenced by _tagName(), _tagType(), _tagValue(), rpmdbAdd(), rpmdbMoveDatabase(), rpmdbOpenAll(), rpmdbOpenDatabase(), and rpmdbRemove().

#define RPMDBI_DEPENDS 1 /* Dependency resolution cache. */

Definition at line 139 of file rpmtag.h.

Referenced by _tagName(), _tagType(), _tagValue(), rpmdbAdd(), rpmdbMoveDatabase(), rpmdbOpenAll(), rpmdbOpenDatabase(), rpmdbRemove(), rpmgiNext(), rpmtsCheck(), and unsatisfiedDepend().

#define RPMDBI_FTSWALK 8 /* (rpmgi) File tree walk. */

Definition at line 146 of file rpmtag.h.

Referenced by _tagName(), _tagType(), _tagValue(), main(), rpmcliArgIter(), rpmcliInstall(), rpmcliSign(), rpmgiGlobArgv(), rpmgiNext(), and rpmReSign().

#define RPMDBI_HDLIST 6 /* (rpmgi) Header list. */

Definition at line 144 of file rpmtag.h.

Referenced by _tagName(), _tagType(), _tagValue(), rpmcliArgIter(), rpmgiGlobArgv(), and rpmgiNext().

#define RPMDBI_LABEL 2 /* Fingerprint search marker. */

Definition at line 140 of file rpmtag.h.

Referenced by rpmcliArgIter(), rpmcliEraseElement(), rpmErase(), rpmmiInit(), rpmQueryVerify(), rpmts_AddErase(), and rpmtsInitIterator().

#define RPMDBI_PACKAGES 0 /* Installed package headers. */

Pseudo-tags used by the rpmdb and rpmgi iterator API's.

Definition at line 138 of file rpmtag.h.

Referenced by _tagName(), _tagType(), _tagValue(), dbiFindMatches(), dbiOpen(), dbiTagsInit(), handleInstInstalledFiles(), handleRmvdInstalledFiles(), init_rpm(), markReplacedFiles(), rpmcliArgIter(), rpmdb_length(), rpmdb_Match(), rpmdb_subscript(), rpmdbAdd(), rpmdbFindByFile(), rpmdbOpenDatabase(), rpmdbRebuild(), rpmdbRemove(), rpmgiInitFilter(), rpmgiNext(), rpmmiFini(), rpmmiInit(), rpmmiNext(), rpmpsmStage(), rpmQueryVerify(), rpmts_AddErase(), rpmts_Match(), sql_bind_key(), sql_cget(), sql_initDB(), and unsatisfiedDepend().

#define RPMDBI_REMOVED 4 /* Removed package headers. */

Definition at line 142 of file rpmtag.h.

Referenced by _tagName(), _tagType(), _tagValue(), rpmdbAdd(), rpmdbMoveDatabase(), rpmdbOpenAll(), rpmdbOpenDatabase(), rpmdbRemove(), and rpmgiNext().

#define RPMTAG_C RPMTAG_CONFLICTNAME /* s[] */

Definition at line 254 of file rpmtag.h.

#define RPMTAG_CONFLICTS RPMTAG_CONFLICTNAME /* s[] */

Definition at line 253 of file rpmtag.h.

Referenced by _tagName().

#define RPMTAG_D RPMTAG_DISTEPOCH /* s */

Definition at line 425 of file rpmtag.h.

#define RPMTAG_E RPMTAG_EPOCH /* i */

Definition at line 191 of file rpmtag.h.

#define RPMTAG_ENHANCES RPMTAG_ENHANCESNAME /* s[] */

Definition at line 364 of file rpmtag.h.

#define RPMTAG_EXTERNAL_TAG 1000000

Definition at line 450 of file rpmtag.h.

#define RPMTAG_FILEMD5S RPMTAG_FILEDIGESTS /* s[] */

Definition at line 226 of file rpmtag.h.

Referenced by hdr_subscript().

#define RPMTAG_HDRID RPMTAG_SHA1HEADER /* s */

Definition at line 182 of file rpmtag.h.

Referenced by _tagName(), addTE(), hdruuidTag(), rpmHeadersIdentical(), and rpmteChain().

#define RPMTAG_N RPMTAG_NAME /* s */

Definition at line 185 of file rpmtag.h.

#define RPMTAG_O RPMTAG_OBSOLETENAME /* s[] */

Definition at line 285 of file rpmtag.h.

#define RPMTAG_OBSOLETES RPMTAG_OBSOLETENAME /* s[] */

Definition at line 284 of file rpmtag.h.

#define RPMTAG_P RPMTAG_PROVIDENAME /* s[] */

Definition at line 244 of file rpmtag.h.

#define RPMTAG_PKGID RPMTAG_SIGMD5 /* x */

Definition at line 172 of file rpmtag.h.

Referenced by addTE(), pkguuidTag(), rpmQueryVerify(), and rpmteChain().

#define RPMTAG_PROVIDES RPMTAG_PROVIDENAME /* s[] */

Definition at line 243 of file rpmtag.h.

Referenced by rpmdsELF().

#define RPMTAG_R RPMTAG_RELEASE /* s */

Definition at line 189 of file rpmtag.h.

#define RPMTAG_REQUIRES RPMTAG_REQUIRENAME /* s[] */

Definition at line 247 of file rpmtag.h.

#define RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME /* s[] */

Definition at line 360 of file rpmtag.h.

#define RPMTAG_SVNID RPMTAG_CVSID /* s */

Definition at line 369 of file rpmtag.h.

#define RPMTAG_V RPMTAG_VERSION /* s */

Definition at line 187 of file rpmtag.h.

## Typedef Documentation

typedef struct _HE_s HE_s

Definition at line 499 of file rpmtag.h.

typedef struct headerTagTableEntry_s* headerTagTableEntry

Definition at line 507 of file rpmtag.h.

## Function Documentation

int headerMacrosLoad | ( | Header | h | ) |

Define per-header macros.

Parameters

  h | header

Returns
  0 always

Definition at line 36 of file hdrNVR.c.

References _free(), addMacro(), alloca(), headerGet(), tagMacro::macroname, _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, rpmExpand(), rpmDataType_u::str, _HE_s::t, tagMacro::tag, _HE_s::tag, tagMacros, rpmDataType_u::ui16p, rpmDataType_u::ui32p, rpmDataType_u::ui64p, and rpmDataType_u::ui8p.

Referenced by processBinaryFiles(), rpmfiNew(), and rpmInstallSourcePackage().

int headerMacrosUnload | ( | Header | h | ) |

Define per-header macros.

Parameters

  h | header

Returns
  0 always

Definition at line 108 of file hdrNVR.c.

References _free(), alloca(), delMacro(), headerGet(), tagMacro::macroname, _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, rpmExpand(), _HE_s::t, tagMacro::tag, _HE_s::tag, and tagMacros.

Referenced by processBinaryFiles(), and rpmfiNew().

rpmuint32_t hGetColor | ( | Header | h | ) |

Return header color.

Parameters

  h | header

Returns
  header color

Definition at line 217 of file hdrNVR.c.

References _free(), alloca(), _HE_s::c, headerGet(), _HE_s::p, rpmDataType_u::ptr, RPMTAG_FILECOLORS, _HE_s::tag, and rpmDataType_u::ui32p.

Referenced by rpmdbAdd(), rpmtsAddInstallElement(), rpmtsAddObsoletes(), and rpmtsAddUpgrades().

void rpmDisplayQueryTags | ( | FILE * | fp,
|  | headerTagTableEntry | _rpmTagTable,
|  | headerSprintfExtension | _rpmHeaderFormats
| ) |  |

Display list of tags that can be used in –queryformat.

Parameters

  fp | file handle to use for display (NULL uses stdout)
  _rpmTagTable | rpm tag table (NULL uses rpmTagTable)
  _rpmHeaderFormats | rpm tag extensions & formats (NULL uses headerCompoundFormats)

Definition at line 4853 of file hdrfmt.c.

References _rpmHeaderFormats, headerCompoundFormats, RPM_ARRAY_RETURN_TYPE, RPM_ASN1_RETURN_TYPE, RPM_MAPPING_RETURN_TYPE, RPM_MASK_TYPE, RPM_MAX_TYPE, RPM_OPAQUE_RETURN_TYPE, RPM_OPENPGP_RETURN_TYPE, RPM_PROBE_RETURN_TYPE, RPM_TREE_RETURN_TYPE, RPM_X509_RETURN_TYPE, rpmIsVerbose, rpmTagTable, and tagValue().

Referenced by rpmcliAllArgCallback().

char* tagCanonicalize | ( | const char * | s | ) |

Canonicalize a rpmTag string.

Parameters

  s | string

Returns
  canonicalized string

Definition at line 410 of file tagname.c.

Referenced by fillOutMainPackage(), findPreambleTag(), and isPart().

void tagClean | ( | headerTagIndices | _rpmTags | ) |

Free memory in header tag indices.

Parameters

  _rpmTags | header tag indices (NULL uses rpmTags)

Definition at line 420 of file tagname.c.

References _free(), argvFree(), and rpmTags.

Referenced by main(), and rpmcliFini().

rpmTag tagGenerate | ( | const char * | s | ) |

Generate a tag from arbitrary string.

Parameters

  s | string

Returns
  generated tag value

Definition at line 415 of file tagname.c.

Referenced by fillOutMainPackage(), findPreambleTag(), and isPart().

const char* tagName | ( | rpmTag | tag | ) |

Return tag name from value.

Parameters

  tag | tag value

Returns
  tag name, "(unknown)" on not found

Definition at line 395 of file tagname.c.

Referenced by checkForDuplicates(), checkForRequired(), dbiFindMatches(), dbiOpen(), findPreambleTag(), handlePreambleTag(), headerGet(), i18nTag(), isPart(), mapTagName(), miFreeHeader(), myTagName(), printNewSpecfile(), rpmdbAdd(), rpmdbCount(), rpmdbFindByFile(), rpmdbGrowIterator(), rpmdbMireApply(), rpmdbMoveDatabase(), rpmdbRemove(), rpmdbRemoveDatabase(), rpmdsTagName(), rpmfcMergePR(), rpmgiInitFilter(), rpmgiNext(), rpmmiInit(), rpmQueryVerify(), sql_copen(), sql_initDB(), sql_open(), stashSt(), str2uuid(), and tagValidate().

tagStore_t tagStoreFree | ( | tagStore_t | dbiTags,
|  | size_t | dbiNTags
| ) |  |

Destroy tagStore array.

Parameters

  dbiTags | dbi tag storage
  dbiNTags | no. of dbi tags

Returns
  NULL always

Definition at line 432 of file tagname.c.

References _free(), and rpmiobFree().

Referenced by dbiTagsInit(), freeSpec(), rpmdbClose(), and rpmdbRebuild().

unsigned int tagType | ( | rpmTag | tag | ) |

Return tag data type from value.

Todo:
  Return rpmTagType-like, not unsigned int. There's no clear typedef yet.

Parameters

  tag | tag value

Returns
  tag data type, 0 on not found.

Definition at line 400 of file tagname.c.

Referenced by formatValue(), myTagName(), sql_bind_key(), sql_copen(), and sql_initDB().

rpmTag tagValue | ( | const char * | tagstr | ) |

Return tag value from name.

Parameters

  tagstr | name of tag

Returns
  tag value, 0xffffffff on not found

Definition at line 405 of file tagname.c.

Referenced by dbiTagsInit(), debconflictsTag(), debdependsTag(), debmd5sumsTag(), debobsoletesTag(), debprovidesTag(), doIcon(), filenamesTag(), findTag(), initSourceHeader(), initSourceHeaderScriptlets(), myTagValue(), rpmDisplayQueryTags(), rpmdsSysinfo(), rpmgiInitFilter(), and tagNumFromPyObject().

## Variable Documentation

headerTagIndices rpmTags

Definition at line 179 of file tagname.c.

Referenced by findPreambleTag(), isPart(), and tagClean().

headerTagTableEntry rpmTagTable

Automatically generated table of tag name/value pairs.

Definition at line 233 of file tagtbl.c.

Referenced by addRpmTags(), headerSprintf(), myTagName(), myTagValue(), rpmDisplayQueryTags(), rpmpsmStage(), and tagLoadIndex().

int rpmTagTableSize

Number of entries in rpmTagTable.

Definition at line 236 of file tagtbl.c.

Referenced by tagLoadIndex().