rpm  4.5
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables

In Memoriam: Steve Taylor stayl.nosp@m.or@r.nosp@m.edhat.nosp@m..com was here, now he's not. More...

#include "rpmio.h"
#include "rpmmessages.h"
#include "rpmerr.h"
#include "header.h"
#include "popt.h"
Include dependency graph for rpmlib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rpmRelocation_s
 
struct  rpmlead
 The lead data structure. More...
 

Macros

#define RPM_FORMAT_VERSION   4
 
#define RPM_MAJOR_VERSION   5
 
#define RPM_MINOR_VERSION   0
 
#define RPMAL_NOMATCH   ((alKey)-1L)
 
#define RPMDBI_PACKAGES   0 /* Installed package headers. */
 Pseudo-tags used by the rpmdb and rpmgi iterator API's.
 
#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_Buildbuild   0x5bae1a5a /* s internal arbitrary */
 
#define RPMTAG_Buildbuildprog   0x6fb46014 /* s internal arbitrary */
 
#define RPMTAG_Buildcheck   0x7f3b97b5 /* s internal arbitrary */
 
#define RPMTAG_Buildcheckprog   0x488a60ce /* s internal arbitrary */
 
#define RPMTAG_Buildclean   0x566042bf /* s internal arbitrary */
 
#define RPMTAG_Buildcleanprog   0x42c93d41 /* s internal arbitrary */
 
#define RPMTAG_Buildinstall   0x567f5983 /* s internal arbitrary */
 
#define RPMTAG_Buildinstallprog   0x70d4ab6f /* s internal arbitrary */
 
#define RPMTAG_Buildprep   0x799c0b4d /* s internal arbitrary */
 
#define RPMTAG_Buildprepprog   0x4ba37c9e /* s internal arbitrary */
 
#define RPMTAG_Buildtimeuuid   0x782eeb68 /* s internal arbitrary */
 
#define RPMTAG_Conflictsqlentry   0x7efaed0d /* s internal arbitrary */
 
#define RPMTAG_Conflictxmlentry   0x61333865 /* s internal arbitrary */
 
#define RPMTAG_Filenames   0x54aafb71 /* s internal arbitrary */
 
#define RPMTAG_Filessqlentry1   0x4493df20 /* s internal arbitrary */
 
#define RPMTAG_Filessqlentry2   0x515aae25 /* s internal arbitrary */
 
#define RPMTAG_Filesxmlentry1   0x42974275 /* s internal arbitrary */
 
#define RPMTAG_Filesxmlentry2   0x7f69e738 /* s internal arbitrary */
 
#define RPMTAG_Hdruuid   0x42cba9cf /* s internal arbitrary */
 
#define RPMTAG_Installprefix   0x67b450ec /* s internal arbitrary */
 
#define RPMTAG_Installtiduuid   0x59784ccd /* s internal arbitrary */
 
#define RPMTAG_Installtimeuuid   0x51b2ff6a /* s internal arbitrary */
 
#define RPMTAG_Obsoletesqlentry   0x4e0e61b0 /* s internal arbitrary */
 
#define RPMTAG_Obsoletexmlentry   0x5a7ce878 /* s internal arbitrary */
 
#define RPMTAG_Origintiduuid   0x5fde8cfd /* s internal arbitrary */
 
#define RPMTAG_Origintimeuuid   0x66bb891b /* s internal arbitrary */
 
#define RPMTAG_Pkguuid   0x44703c2c /* s internal arbitrary */
 
#define RPMTAG_Providesqlentry   0x599f1b4a /* s internal arbitrary */
 
#define RPMTAG_Providexmlentry   0x6569bce6 /* s internal arbitrary */
 
#define RPMTAG_Removetiduuid   0x6a884e83 /* s internal arbitrary */
 
#define RPMTAG_Requiresqlentry   0x723158aa /* s internal arbitrary */
 
#define RPMTAG_Requirexmlentry   0x54b25cd7 /* s internal arbitrary */
 
#define RPMTAG_Sourcepkguuid   0x4eedc6f9 /* s internal arbitrary */
 
#define RPMTAG_Trackprog   0x46c39442 /* s internal arbitrary */
 
#define RPMTAG_Triggerconds   0x46ced1cc /* s internal arbitrary */
 
#define RPMTAG_Triggertype   0x562d6086 /* s internal arbitrary */
 
#define RPMTAG_EXTERNAL_TAG   1000000
 
#define RPMFILE_STATE_MISSING   -1 /* XXX used for unavailable data */
 
#define RPMFILE_SPOOK   (RPMFILE_GHOST|RPMFILE_TYPED)
 
#define RPMFILE_ALL   ~(RPMFILE_NONE)
 
#define RPMLEAD_BINARY   0
 
#define RPMLEAD_SOURCE   1
 
#define RPMLEAD_MAGIC0   0xed
 
#define RPMLEAD_MAGIC1   0xab
 
#define RPMLEAD_MAGIC2   0xee
 
#define RPMLEAD_MAGIC3   0xdb
 
#define RPMLEAD_SIZE   96
 

Typedefs

typedef enum rpmRC_e rpmRC
 Package read return codes.
 
typedef struct rpmts_s * rpmts
 The RPM Transaction Set.
 
typedef struct Spec_sSpec
 
typedef void * alKey
 An added/available package retrieval key.
 
typedef int alNum
 An added/available package retrieval index.
 
typedef struct rpmds_s * rpmds
 Dependency tag sets from a header, so that a header can be discarded early.
 
typedef struct rpmPRCO_s * rpmPRCO
 Container for commonly extracted dependency set(s).
 
typedef struct rpmfi_s * rpmfi
 File info tag sets from a header, so that a header can be discarded early.
 
typedef struct rpmte_s * rpmte
 An element of a transaction set, i.e.
 
typedef struct rpmdb_s * rpmdb
 Database of headers and tag value indices.
 
typedef struct
_rpmdbMatchIterator
rpmdbMatchIterator
 Database iterator.
 
typedef struct rpmgi_s * rpmgi
 Generalized iterator.
 
typedef enum rpmTag_e rpmTag
 Tags identify data in package headers.
 
typedef enum rpmScriptID_e rpmScriptID
 Scriptlet identifiers.
 
typedef enum rpmScriptState_e rpmScriptState
 Scriptlet states (when installed).
 
typedef enum rpmfileState_e rpmfileState
 File States (when installed).
 
typedef enum rpmfileAttrs_e rpmfileAttrs
 File Attributes.
 

Enumerations

enum  rpmRC_e {
  RPMRC_OK = 0, RPMRC_NOTFOUND = 1, RPMRC_FAIL = 2, RPMRC_NOTTRUSTED = 3,
  RPMRC_NOKEY = 4
}
 Package read return codes. More...
 
enum  rpmTag_e {
  RPMTAG_HEADERIMAGE = HEADER_IMAGE, RPMTAG_HEADERSIGNATURES = HEADER_SIGNATURES, RPMTAG_HEADERIMMUTABLE = HEADER_IMMUTABLE, RPMTAG_HEADERREGIONS = HEADER_REGIONS,
  RPMTAG_HEADERI18NTABLE = HEADER_I18NTABLE, RPMTAG_SIG_BASE = HEADER_SIGBASE, 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_FIRSTFREE_TAG
}
 Tags identify data in package headers. More...
 
enum  rpmScriptID_e {
  RPMSCRIPT_UNKNOWN = 0, RPMSCRIPT_PRETRANS = 1, RPMSCRIPT_TRIGGERPREIN = 2, RPMSCRIPT_PREIN = 3,
  RPMSCRIPT_POSTIN = 4, RPMSCRIPT_TRIGGERIN = 5, RPMSCRIPT_TRIGGERUN = 6, RPMSCRIPT_PREUN = 7,
  RPMSCRIPT_POSTUN = 8, RPMSCRIPT_TRIGGERPOSTUN = 9, RPMSCRIPT_POSTTRANS = 10, RPMSCRIPT_VERIFY = 16,
  RPMSCRIPT_MAX = 32
}
 Scriptlet identifiers. More...
 
enum  rpmScriptState_e {
  RPMSCRIPT_STATE_UNKNOWN = 0, RPMSCRIPT_STATE_EXEC = (1 << 16), RPMSCRIPT_STATE_REAPED = (1 << 17), RPMSCRIPT_STATE_SELINUX = (1 << 24),
  RPMSCRIPT_STATE_EMULATOR = (1 << 25), RPMSCRIPT_STATE_LUA = (1 << 26)
}
 Scriptlet states (when installed). More...
 
enum  rpmfileState_e {
  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_EXCLUDE = (1 << 9), RPMFILE_UNPATCHED = (1 << 10),
  RPMFILE_PUBKEY = (1 << 11), RPMFILE_POLICY = (1 << 12), RPMFILE_EXISTS = (1 << 13), RPMFILE_SPARSE = (1 << 14),
  RPMFILE_TYPED = (1 << 15), RPMFILE_SOURCE = (1 << 16), RPMFILE_PATCH = (1 << 17)
}
 File Attributes. More...
 

Functions

void headerMergeLegacySigs (Header h, const Header sigh)
 Translate and merge legacy signature tags into header.
 
Header headerRegenSigHeader (const Header h, int noArchiveSize)
 Regenerate signature header.
 
static const char * tagName (int tag)
 Return tag name from value.
 
static int tagType (int tag)
 Return tag data type from value.
 
static int tagValue (const char *tagstr)
 Return tag value from name.
 

Variables

struct MacroContext_srpmGlobalMacroContext
 
struct MacroContext_srpmCLIMacroContext
 
const char * RPMVERSION
 
const char * rpmNAME
 
const char * rpmEVR
 
int rpmFLAGS
 
struct headerTagTableEntry_srpmTagTable
 Automatically generated table of tag name/value pairs.
 
const int rpmTagTableSize
 Number of entries in rpmTagTable.
 
headerTagIndices rpmTags
 
struct headerSprintfExtension_s rpmHeaderFormats []
 Table of query format extensions.
 

RPMRC

#define RPM_MACHTABLE_COUNT   4
 
enum  rpm_machtable_e { RPM_MACHTABLE_INSTARCH = 0, RPM_MACHTABLE_INSTOS = 1, RPM_MACHTABLE_BUILDARCH = 2, RPM_MACHTABLE_BUILDOS = 3 }
 Build and install arch/os table identifiers. More...
 
const char * rpmRcfiles
 The default rpmrc files to be read.
 
void * platpat
 
int nplatpat
 
int rpmReadConfigFiles (const char *file, const char *target)
 Read macro configuration file(s) for a target.
 
void rpmGetArchInfo (const char **name, int *num)
 
void rpmGetOsInfo (const char **name, int *num)
 
int rpmMachineScore (int type, const char *name)
 
int rpmPlatformScore (const char *platform, void *mi_re, int mi_nre)
 Return score of a platform string.
 
int rpmShowRC (FILE *fp)
 Display current rpmrc (and macro) configuration.
 
void rpmSetTables (int archTable, int osTable)
 
void rpmSetMachine (const char *arch, const char *os)
 Set current arch/os names.
 
void rpmFreeRpmrc (void)
 Destroy rpmrc arch/os compatibility tables.
 

RPMTS

#define XFA_SKIPPING(_a)   ((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPCOLOR)
 
#define _noTransScripts
 
#define _noTransTriggers
 
enum  rpmprobFilterFlags_e {
  RPMPROB_FILTER_NONE = 0, RPMPROB_FILTER_IGNOREOS = (1 << 0), RPMPROB_FILTER_IGNOREARCH = (1 << 1), RPMPROB_FILTER_REPLACEPKG = (1 << 2),
  RPMPROB_FILTER_FORCERELOCATE = (1 << 3), RPMPROB_FILTER_REPLACENEWFILES = (1 << 4), RPMPROB_FILTER_REPLACEOLDFILES = (1 << 5), RPMPROB_FILTER_OLDPACKAGE = (1 << 6),
  RPMPROB_FILTER_DISKSPACE = (1 << 7), RPMPROB_FILTER_DISKNODES = (1 << 8)
}
 
enum  fileAction_e {
  FA_UNKNOWN = 0, FA_CREATE, FA_COPYIN, FA_COPYOUT,
  FA_BACKUP, FA_SAVE, FA_SKIP, FA_ALTNAME,
  FA_ERASE, FA_SKIPNSTATE, FA_SKIPNETSHARED, FA_SKIPCOLOR
}
 File disposition(s) during package install/erase transaction. More...
 
enum  fileTypes_e {
  PIPE = 1, CDEV = 2, XDIR = 4, BDEV = 6,
  REG = 8, LINK = 10, SOCK = 12
}
 File types. More...
 
enum  rpmdepFlags_e {
  RPMDEPS_FLAG_NONE = 0, RPMDEPS_FLAG_NOUPGRADE = (1 << 0), RPMDEPS_FLAG_NOREQUIRES = (1 << 1), RPMDEPS_FLAG_NOCONFLICTS = (1 << 2),
  RPMDEPS_FLAG_NOOBSOLETES = (1 << 3), RPMDEPS_FLAG_NOPARENTDIRS = (1 << 4), RPMDEPS_FLAG_NOLINKTOS = (1 << 5), RPMDEPS_FLAG_ANACONDA = (1 << 6),
  RPMDEPS_FLAG_NOSUGGEST = (1 << 7), RPMDEPS_FLAG_ADDINDEPS = (1 << 8), RPMDEPS_FLAG_DEPLOOPS = (1 << 9)
}
 Bit(s) to control rpmtsCheck() and rpmtsOrder() operation. More...
 
enum  rpmtransFlags_e {
  RPMTRANS_FLAG_NONE = 0, RPMTRANS_FLAG_TEST = (1 << 0), RPMTRANS_FLAG_BUILD_PROBS = (1 << 1), RPMTRANS_FLAG_NOSCRIPTS = (1 << 2),
  RPMTRANS_FLAG_JUSTDB = (1 << 3), RPMTRANS_FLAG_NOTRIGGERS = (1 << 4), RPMTRANS_FLAG_NODOCS = (1 << 5), RPMTRANS_FLAG_ALLFILES = (1 << 6),
  RPMTRANS_FLAG_KEEPOBSOLETE = (1 << 7), RPMTRANS_FLAG_NOCONTEXTS = (1 << 8), RPMTRANS_FLAG_DIRSTASH = (1 << 9), RPMTRANS_FLAG_REPACKAGE = (1 << 10),
  RPMTRANS_FLAG_PKGCOMMIT = (1 << 11), RPMTRANS_FLAG_PKGUNDO = (1 << 12), RPMTRANS_FLAG_COMMIT = (1 << 13), RPMTRANS_FLAG_UNDO = (1 << 14),
  RPMTRANS_FLAG_NOTRIGGERPREIN = (1 << 16), RPMTRANS_FLAG_NOPRE = (1 << 17), RPMTRANS_FLAG_NOPOST = (1 << 18), RPMTRANS_FLAG_NOTRIGGERIN = (1 << 19),
  RPMTRANS_FLAG_NOTRIGGERUN = (1 << 20), RPMTRANS_FLAG_NOPREUN = (1 << 21), RPMTRANS_FLAG_NOPOSTUN = (1 << 22), RPMTRANS_FLAG_NOTRIGGERPOSTUN = (1 << 23),
  RPMTRANS_FLAG_NOPAYLOAD = (1 << 24), RPMTRANS_FLAG_APPLYONLY = (1 << 25), RPMTRANS_FLAG_NOFDIGESTS = (1 << 27), RPMTRANS_FLAG_NOCONFIGS = (1 << 30)
}
 Bit(s) to control rpmtsRun() operation. More...
 
typedef enum rpmprobFilterFlags_e rpmprobFilterFlags
 
typedef struct rpmRelocation_srpmRelocation
 We pass these around as an array with a sentinel.
 
typedef enum fileAction_e fileAction
 File disposition(s) during package install/erase transaction.
 
typedef enum fileTypes_e fileTypes
 File types.
 
typedef struct fsmIterator_sFSMI_t
 Iterator across package file info, forward on install, backward on erase.
 
typedef struct fsm_sFSM_t
 File state machine data.
 
typedef struct rpmpsm_srpmpsm
 Package state machine data.
 
typedef enum rpmdepFlags_e rpmdepFlags
 Bit(s) to control rpmtsCheck() and rpmtsOrder() operation.
 
typedef enum rpmtransFlags_e rpmtransFlags
 Bit(s) to control rpmtsRun() operation.
 
int rpmVersionCompare (Header first, Header second)
 Compare headers to determine which header is "newer".
 
int headerVerifyInfo (int il, int dl, const void *pev, void *iv, int negate)
 Perform simple sanity and range checks on header tag(s).
 
rpmRC headerCheck (rpmts ts, const void *uh, size_t uc, const char **msg)
 Check header consistency, performing headerGetEntry() the hard way.
 
rpmRC rpmReadHeader (rpmts ts, FD_t fd, Header *hdrp, const char **msg)
 Return checked and loaded header.
 
rpmRC rpmReadPackageFile (rpmts ts, FD_t fd, const char *fn, Header *hdrp)
 Return package header from file handle, verifying digests/signatures.
 
rpmRC rpmInstallSourcePackage (rpmts ts, FD_t fd, const char **specFilePtr, const char **cookie)
 Install source package.
 

RPMK

enum  rpmtagSignature {
  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...
 
rpmRC rpmVerifySignature (const rpmts ts, char *result)
 Verify a signature from a package.
 
Header rpmFreeSignature (Header sigh)
 Destroy signature header from package.
 

Detailed Description

In Memoriam: Steve Taylor stayl.nosp@m.or@r.nosp@m.edhat.nosp@m..com was here, now he's not.

Definition in file rpmlib.h.

Macro Definition Documentation

#define _noTransScripts
Value:
RPMTRANS_FLAG_NOPOST | \
RPMTRANS_FLAG_NOPREUN | \
RPMTRANS_FLAG_NOPOSTUN \
)

Definition at line 951 of file rpmlib.h.

Referenced by installArgCallback(), main(), and rpmtsRun().

#define _noTransTriggers
Value:
RPMTRANS_FLAG_NOTRIGGERIN | \
RPMTRANS_FLAG_NOTRIGGERUN | \
RPMTRANS_FLAG_NOTRIGGERPOSTUN \
)

Definition at line 958 of file rpmlib.h.

Referenced by installArgCallback(), main(), and rpmtsRun().

#define RPM_FORMAT_VERSION   4

Definition at line 17 of file rpmlib.h.

#define RPM_MACHTABLE_COUNT   4

No. of arch/os tables.

Definition at line 590 of file rpmlib.h.

Referenced by doReadRC(), and rpmFreeRpmrc().

#define RPM_MAJOR_VERSION   5

Definition at line 18 of file rpmlib.h.

#define RPM_MINOR_VERSION   0

Definition at line 19 of file rpmlib.h.

#define RPMAL_NOMATCH   ((alKey)-1L)
#define RPMDBI_ADDED   3 /* Added package headers. */
#define RPMDBI_ARGLIST   7 /* (rpmgi) Argument list. */

Definition at line 173 of file rpmlib.h.

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

#define RPMDBI_AVAILABLE   5 /* Available package headers. */
#define RPMDBI_DEPENDS   1 /* Dependency resolution cache. */
#define RPMDBI_FTSWALK   8 /* (rpmgi) File tree walk. */

Definition at line 174 of file rpmlib.h.

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

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

Definition at line 172 of file rpmlib.h.

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

#define RPMDBI_LABEL   2 /* Fingerprint search marker. */
#define RPMDBI_PACKAGES   0 /* Installed package headers. */
#define RPMDBI_REMOVED   4 /* Removed package headers. */
#define RPMFILE_ALL   ~(RPMFILE_NONE)

Definition at line 574 of file rpmlib.h.

#define RPMFILE_SPOOK   (RPMFILE_GHOST|RPMFILE_TYPED)

Definition at line 573 of file rpmlib.h.

#define RPMFILE_STATE_MISSING   -1 /* XXX used for unavailable data */

Definition at line 544 of file rpmlib.h.

Referenced by rpmfiFState(), and showQueryPackage().

#define RPMLEAD_BINARY   0

Definition at line 1013 of file rpmlib.h.

Referenced by packageBinaries(), rpmpsmStage(), and writeRPM().

#define RPMLEAD_MAGIC0   0xed

Definition at line 1016 of file rpmlib.h.

#define RPMLEAD_MAGIC1   0xab

Definition at line 1017 of file rpmlib.h.

#define RPMLEAD_MAGIC2   0xee

Definition at line 1018 of file rpmlib.h.

#define RPMLEAD_MAGIC3   0xdb

Definition at line 1019 of file rpmlib.h.

#define RPMLEAD_SIZE   96

Don't rely on sizeof(struct)

Definition at line 1021 of file rpmlib.h.

#define RPMLEAD_SOURCE   1

Definition at line 1014 of file rpmlib.h.

Referenced by packageSources(), and writeRPM().

#define RPMTAG_Buildbuild   0x5bae1a5a /* s internal arbitrary */

Definition at line 459 of file rpmlib.h.

Referenced by initSourceHeaderScriptlets().

#define RPMTAG_Buildbuildprog   0x6fb46014 /* s internal arbitrary */

Definition at line 460 of file rpmlib.h.

Referenced by initSourceHeaderScriptlets().

#define RPMTAG_Buildcheck   0x7f3b97b5 /* s internal arbitrary */

Definition at line 461 of file rpmlib.h.

Referenced by initSourceHeaderScriptlets().

#define RPMTAG_Buildcheckprog   0x488a60ce /* s internal arbitrary */

Definition at line 462 of file rpmlib.h.

Referenced by initSourceHeaderScriptlets().

#define RPMTAG_Buildclean   0x566042bf /* s internal arbitrary */

Definition at line 463 of file rpmlib.h.

Referenced by initSourceHeaderScriptlets().

#define RPMTAG_Buildcleanprog   0x42c93d41 /* s internal arbitrary */

Definition at line 464 of file rpmlib.h.

Referenced by initSourceHeaderScriptlets().

#define RPMTAG_Buildinstall   0x567f5983 /* s internal arbitrary */

Definition at line 465 of file rpmlib.h.

Referenced by initSourceHeaderScriptlets().

#define RPMTAG_Buildinstallprog   0x70d4ab6f /* s internal arbitrary */

Definition at line 466 of file rpmlib.h.

Referenced by initSourceHeaderScriptlets().

#define RPMTAG_Buildprep   0x799c0b4d /* s internal arbitrary */

Definition at line 467 of file rpmlib.h.

Referenced by initSourceHeaderScriptlets().

#define RPMTAG_Buildprepprog   0x4ba37c9e /* s internal arbitrary */

Definition at line 468 of file rpmlib.h.

Referenced by initSourceHeaderScriptlets().

#define RPMTAG_Buildtimeuuid   0x782eeb68 /* s internal arbitrary */

Definition at line 469 of file rpmlib.h.

#define RPMTAG_C   RPMTAG_CONFLICTNAME /* s[] */

Definition at line 283 of file rpmlib.h.

#define RPMTAG_CONFLICTS   RPMTAG_CONFLICTNAME /* s[] */

Definition at line 282 of file rpmlib.h.

Referenced by _tagName().

#define RPMTAG_Conflictsqlentry   0x7efaed0d /* s internal arbitrary */

Definition at line 470 of file rpmlib.h.

#define RPMTAG_Conflictxmlentry   0x61333865 /* s internal arbitrary */

Definition at line 471 of file rpmlib.h.

#define RPMTAG_E   RPMTAG_EPOCH /* i */

Definition at line 220 of file rpmlib.h.

#define RPMTAG_ENHANCES   RPMTAG_ENHANCESNAME /* s[] */

Definition at line 393 of file rpmlib.h.

#define RPMTAG_EXTERNAL_TAG   1000000

Definition at line 498 of file rpmlib.h.

#define RPMTAG_FILEMD5S   RPMTAG_FILEDIGESTS /* s[] */

Definition at line 255 of file rpmlib.h.

Referenced by hdr_subscript(), and rpmdbAdd().

#define RPMTAG_Filenames   0x54aafb71 /* s internal arbitrary */

Definition at line 472 of file rpmlib.h.

#define RPMTAG_Filessqlentry1   0x4493df20 /* s internal arbitrary */

Definition at line 473 of file rpmlib.h.

#define RPMTAG_Filessqlentry2   0x515aae25 /* s internal arbitrary */

Definition at line 474 of file rpmlib.h.

#define RPMTAG_Filesxmlentry1   0x42974275 /* s internal arbitrary */

Definition at line 475 of file rpmlib.h.

#define RPMTAG_Filesxmlentry2   0x7f69e738 /* s internal arbitrary */

Definition at line 476 of file rpmlib.h.

#define RPMTAG_HDRID   RPMTAG_SHA1HEADER /* s */

Definition at line 211 of file rpmlib.h.

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

#define RPMTAG_Hdruuid   0x42cba9cf /* s internal arbitrary */

Definition at line 477 of file rpmlib.h.

#define RPMTAG_Installprefix   0x67b450ec /* s internal arbitrary */

Definition at line 478 of file rpmlib.h.

#define RPMTAG_Installtiduuid   0x59784ccd /* s internal arbitrary */

Definition at line 479 of file rpmlib.h.

#define RPMTAG_Installtimeuuid   0x51b2ff6a /* s internal arbitrary */

Definition at line 480 of file rpmlib.h.

#define RPMTAG_N   RPMTAG_NAME /* s */

Definition at line 214 of file rpmlib.h.

#define RPMTAG_O   RPMTAG_OBSOLETENAME /* s[] */

Definition at line 314 of file rpmlib.h.

#define RPMTAG_OBSOLETES   RPMTAG_OBSOLETENAME /* s[] */

Definition at line 313 of file rpmlib.h.

#define RPMTAG_Obsoletesqlentry   0x4e0e61b0 /* s internal arbitrary */

Definition at line 481 of file rpmlib.h.

#define RPMTAG_Obsoletexmlentry   0x5a7ce878 /* s internal arbitrary */

Definition at line 482 of file rpmlib.h.

#define RPMTAG_Origintiduuid   0x5fde8cfd /* s internal arbitrary */

Definition at line 483 of file rpmlib.h.

#define RPMTAG_Origintimeuuid   0x66bb891b /* s internal arbitrary */

Definition at line 484 of file rpmlib.h.

#define RPMTAG_P   RPMTAG_PROVIDENAME /* s[] */

Definition at line 273 of file rpmlib.h.

#define RPMTAG_PKGID   RPMTAG_SIGMD5 /* x */

Definition at line 201 of file rpmlib.h.

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

#define RPMTAG_Pkguuid   0x44703c2c /* s internal arbitrary */

Definition at line 485 of file rpmlib.h.

#define RPMTAG_PROVIDES   RPMTAG_PROVIDENAME /* s[] */

Definition at line 272 of file rpmlib.h.

Referenced by rpmdsELF().

#define RPMTAG_Providesqlentry   0x599f1b4a /* s internal arbitrary */

Definition at line 486 of file rpmlib.h.

#define RPMTAG_Providexmlentry   0x6569bce6 /* s internal arbitrary */

Definition at line 487 of file rpmlib.h.

#define RPMTAG_R   RPMTAG_RELEASE /* s */

Definition at line 218 of file rpmlib.h.

#define RPMTAG_Removetiduuid   0x6a884e83 /* s internal arbitrary */

Definition at line 488 of file rpmlib.h.

#define RPMTAG_REQUIRES   RPMTAG_REQUIRENAME /* s[] */

Definition at line 276 of file rpmlib.h.

#define RPMTAG_Requiresqlentry   0x723158aa /* s internal arbitrary */

Definition at line 489 of file rpmlib.h.

#define RPMTAG_Requirexmlentry   0x54b25cd7 /* s internal arbitrary */

Definition at line 490 of file rpmlib.h.

#define RPMTAG_Sourcepkguuid   0x4eedc6f9 /* s internal arbitrary */

Definition at line 491 of file rpmlib.h.

#define RPMTAG_SUGGESTS   RPMTAG_SUGGESTSNAME /* s[] */

Definition at line 389 of file rpmlib.h.

#define RPMTAG_SVNID   RPMTAG_CVSID /* s */

Definition at line 398 of file rpmlib.h.

#define RPMTAG_Trackprog   0x46c39442 /* s internal arbitrary */

Definition at line 492 of file rpmlib.h.

#define RPMTAG_Triggerconds   0x46ced1cc /* s internal arbitrary */

Definition at line 493 of file rpmlib.h.

#define RPMTAG_Triggertype   0x562d6086 /* s internal arbitrary */

Definition at line 494 of file rpmlib.h.

#define RPMTAG_V   RPMTAG_VERSION /* s */

Definition at line 216 of file rpmlib.h.

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

Typedef Documentation

typedef enum fileAction_e fileAction

File disposition(s) during package install/erase transaction.

typedef enum fileTypes_e fileTypes

File types.

These are the file types used internally by rpm. The file type is determined by applying stat(2) macros like S_ISDIR to the file mode tag from a header. The values are arbitrary, but are identical to the linux stat(2) file types.

File Attributes.

File States (when installed).

Todo:
Generalize filter mechanism.
typedef enum rpmRC_e rpmRC

Package read return codes.

typedef struct rpmRelocation_s* rpmRelocation

We pass these around as an array with a sentinel.

Definition at line 736 of file rpmlib.h.

typedef enum rpmScriptID_e rpmScriptID

Scriptlet identifiers.

Scriptlet states (when installed).

Enumeration Type Documentation

File disposition(s) during package install/erase transaction.

Enumerator:
FA_UNKNOWN 

initial action for file ...

FA_CREATE 

... copy in from payload.

FA_COPYIN 

... copy in from payload.

FA_COPYOUT 

... copy out to payload.

FA_BACKUP 

... renamed with ".rpmorig" extension.

FA_SAVE 

... renamed with ".rpmsave" extension.

FA_SKIP 

... already replaced, don't remove.

FA_ALTNAME 

... create with ".rpmnew" extension.

FA_ERASE 

... to be removed.

FA_SKIPNSTATE 

... untouched, state "not installed".

FA_SKIPNETSHARED 

... untouched, state "netshared".

FA_SKIPCOLOR 

... untouched, state "wrong color".

Definition at line 759 of file rpmlib.h.

File types.

These are the file types used internally by rpm. The file type is determined by applying stat(2) macros like S_ISDIR to the file mode tag from a header. The values are arbitrary, but are identical to the linux stat(2) file types.

Enumerator:
PIPE 

pipe/fifo

CDEV 

character device

XDIR 

directory

BDEV 

block device

REG 

regular file

LINK 

hard link

SOCK 

socket

Definition at line 784 of file rpmlib.h.

File Attributes.

Enumerator:
RPMFILE_NONE 
RPMFILE_CONFIG 

from %config

RPMFILE_DOC 

from %doc

RPMFILE_ICON 

from Icon:

RPMFILE_MISSINGOK 

from %config(missingok)

RPMFILE_NOREPLACE 

from %config(noreplace)

RPMFILE_SPECFILE 

the specfile (srpm only).

RPMFILE_GHOST 

from %ghost

RPMFILE_LICENSE 

from %license

RPMFILE_README 

from %readme

RPMFILE_EXCLUDE 

from %exclude, internal

RPMFILE_UNPATCHED 

(deprecated) placeholder (SuSE)

RPMFILE_PUBKEY 

from %pubkey

RPMFILE_POLICY 

from %policy

RPMFILE_EXISTS 

did lstat(fn, st) succeed?

RPMFILE_SPARSE 

was ((512*st->st_blocks) < st->st_size) ?

RPMFILE_TYPED 

(unimplemented) from %spook

RPMFILE_SOURCE 

from SourceN: (srpm only).

RPMFILE_PATCH 

from PatchN: (srpm only).

Definition at line 549 of file rpmlib.h.

File States (when installed).

Enumerator:
RPMFILE_STATE_NORMAL 
RPMFILE_STATE_REPLACED 
RPMFILE_STATE_NOTINSTALLED 
RPMFILE_STATE_NETSHARED 
RPMFILE_STATE_WRONGCOLOR 

Definition at line 537 of file rpmlib.h.

Todo:
Generalize filter mechanism.
Enumerator:
RPMPROB_FILTER_NONE 
RPMPROB_FILTER_IGNOREOS 

from –ignoreos

RPMPROB_FILTER_IGNOREARCH 

from –ignorearch

RPMPROB_FILTER_REPLACEPKG 

from –replacepkgs

RPMPROB_FILTER_FORCERELOCATE 

from –badreloc

RPMPROB_FILTER_REPLACENEWFILES 

from –replacefiles

RPMPROB_FILTER_REPLACEOLDFILES 

from –replacefiles

RPMPROB_FILTER_OLDPACKAGE 

from –oldpackage

RPMPROB_FILTER_DISKSPACE 

from –ignoresize

RPMPROB_FILTER_DISKNODES 

from –ignoresize

Definition at line 720 of file rpmlib.h.

enum rpmRC_e

Package read return codes.

Enumerator:
RPMRC_OK 

Generic success code

RPMRC_NOTFOUND 

Generic not found code.

RPMRC_FAIL 

Generic failure code.

RPMRC_NOTTRUSTED 

Signature is OK, but key is not trusted.

RPMRC_NOKEY 

Public key is unavailable.

Definition at line 24 of file rpmlib.h.

Scriptlet identifiers.

Enumerator:
RPMSCRIPT_UNKNOWN 

unknown scriptlet

RPMSCRIPT_PRETRANS 

pretrans scriptlet

RPMSCRIPT_TRIGGERPREIN 

triggerprein scriptlet

RPMSCRIPT_PREIN 

pre scriptlet

RPMSCRIPT_POSTIN 

post scriptlet

RPMSCRIPT_TRIGGERIN 

triggerin scriptlet

RPMSCRIPT_TRIGGERUN 

triggerun scriptlet

RPMSCRIPT_PREUN 

preun scriptlet

RPMSCRIPT_POSTUN 

postun scriptlet

RPMSCRIPT_TRIGGERPOSTUN 

triggerpostun scriptlet

RPMSCRIPT_POSTTRANS 

posttrans scriptlet

RPMSCRIPT_VERIFY 

verify scriptlet

RPMSCRIPT_MAX 

Definition at line 503 of file rpmlib.h.

Scriptlet states (when installed).

Enumerator:
RPMSCRIPT_STATE_UNKNOWN 
RPMSCRIPT_STATE_EXEC 

scriptlet was exec'd

RPMSCRIPT_STATE_REAPED 

scriptlet was reaped

RPMSCRIPT_STATE_SELINUX 

scriptlet exec by SELinux

RPMSCRIPT_STATE_EMULATOR 

scriptlet exec in emulator

RPMSCRIPT_STATE_LUA 

scriptlet exec with lua

Definition at line 523 of file rpmlib.h.

Function Documentation

rpmRC headerCheck ( rpmts  ts,
const void *  uh,
size_t  uc,
const char **  msg 
)

Check header consistency, performing headerGetEntry() the hard way.

Sanity checks on the header are performed while looking for a header-only digest or signature to verify the blob. If found, the digest or signature is verified.

Parameters
tstransaction set
uhunloaded header blob
ucno. of bytes in blob (or 0 to disable)
Return values
*msgverification error message (or NULL)
Returns
RPMRC_OK on success

Sanity checks on the header are performed while looking for a header-only digest or signature to verify the blob. If found, the digest or signature is verified.

Parameters
tstransaction set
uhunloaded header blob
ucno. of bytes in blob (or 0 to disable)
Return values
*msgsignature verification msg
Returns
RPMRC_OK/RPMRC_NOTFOUND/RPMRC_FAIL

Definition at line 691 of file package.c.

References _, _free(), _print_pkts, alloca(), entryInfo_s::count, pgpDigParams_s::hash_algo, pgpDig_s::hdrmd5ctx, pgpDig_s::hdrsha1ctx, header_magic, headerVerifyInfo(), indexEntry_s::info, pgpDig_s::nbytes, entryInfo_s::offset, PGPHASHALGO_SHA1, pgpPrtPkts(), REGION_TAG_COUNT, RPM_BIN_TYPE, RPM_STRING_TYPE, RPMDIGEST_NONE, rpmDigestInit(), rpmDigestUpdate(), rpmIsDebug, RPMMESS_ERROR, rpmMessage, RPMRC_FAIL, RPMRC_NOTFOUND, RPMRC_OK, rpmswEnter(), rpmswExit(), RPMTAG_DSAHEADER, RPMTAG_HEADERIMMUTABLE, RPMTAG_RSAHEADER, RPMTAG_SHA1HEADER, RPMTS_OP_DIGEST, rpmtsCleanDig(), rpmtsDig(), rpmtsOp(), rpmtsSetSig(), rpmtsVSFlags(), rpmVerifySignature(), RPMVSF_NODSAHEADER, RPMVSF_NORSAHEADER, RPMVSF_NOSHA1HEADER, pgpDig_s::signature, snprintf(), entryInfo_s::tag, entryInfo_s::type, pgpDigParams_s::version, xmalloc(), and xstrdup().

Referenced by rpmpsmStage(), rpmReadHeader(), rpmts_HdrCheck(), rpmtsInitIterator(), and rpmtsRebuildDB().

int headerVerifyInfo ( int  il,
int  dl,
const void *  pev,
void *  iv,
int  negate 
)

Perform simple sanity and range checks on header tag(s).

Parameters
ilno. of tags in header
dlno. of bytes in header data.
pev1st element in tag array, big-endian
ivfailing (or last) tag element, host-endian
negatenegative offset expected?
Returns
-1 on success, otherwise failing tag element index

Definition at line 647 of file package.c.

References entryInfo_s::count, hdrchkAlign, hdrchkData, hdrchkRange, hdrchkType, entryInfo_s::offset, entryInfo_s::tag, and entryInfo_s::type.

Referenced by headerCheck(), and rpmReadSignature().

rpmRC rpmInstallSourcePackage ( rpmts  ts,
FD_t  fd,
const char **  specFilePtr,
const char **  cookie 
)
rpmRC rpmReadHeader ( rpmts  ts,
FD_t  fd,
Header hdrp,
const char **  msg 
)

Return checked and loaded header.

Parameters
tstransaction set
fdfile handle
Return values
hdrpaddress of header (or NULL)
*msgverification error message (or NULL)
Returns
RPMRC_OK on success

Definition at line 1016 of file package.c.

References _, _free(), block(), errno, fdGetOPath(), FDSTAT_READ, Fileno(), headerToken_s::flags, hdrchkData, hdrchkTags, header_magic, headerCheck(), HEADERFLAG_ALLOCATED, headerFree(), headerGetStatbuf(), headerLink(), headerLoad(), headerSetEndOff(), headerSetOrigin(), headerSetStartOff(), Realpath(), RPMRC_FAIL, RPMRC_OK, snprintf(), _FD_s::stats, timedRead(), urlPath(), xmalloc(), and xstrdup().

Referenced by rpmReadPackageFile().

rpmRC rpmReadPackageFile ( rpmts  ts,
FD_t  fd,
const char *  fn,
Header hdrp 
)

Return package header from file handle, verifying digests/signatures.

Parameters
tstransaction set
fdfile handle
fnfile name
Return values
hdrpaddress of header (or NULL)
Returns
RPMRC_OK on success
Todo:
Implement disable/enable/warn/error/anal policy.

Definition at line 1138 of file package.c.

References _, _chk, _free(), _print_pkts, alloca(), rpmop_s::count, _FD_s::digests, fdInitDigest(), fdstat_op(), FDSTAT_READ, Fileno(), Fread(), Fstrerror(), pgpDigParams_s::hash_algo, _FDDIGEST_s::hashalgo, _FDDIGEST_s::hashctx, pgpDig_s::hdrmd5ctx, pgpDig_s::hdrsha1ctx, header_magic, headerFree(), headerFreeData(), headerGetEntry(), headerIsEntry(), headerLink(), headerMergeLegacySigs(), rpmlead::major, pgpDig_s::md5ctx, pgpDig_s::nbytes, _FD_s::ndigests, PGPHASHALGO_MD5, PGPHASHALGO_RIPEMD160, PGPHASHALGO_SHA1, PGPHASHALGO_SHA256, PGPHASHALGO_SHA384, PGPHASHALGO_SHA512, pgpPrtPkts(), readLead(), rpm3to4(), RPMDIGEST_NONE, rpmDigestInit(), rpmDigestUpdate(), RPMERR_FREAD, RPMERR_NEWPACKAGE, RPMERR_SIGGEN, rpmError, rpmFreeSignature(), rpmIsDebug, RPMMESS_DEBUG, RPMMESS_ERROR, RPMMESS_WARNING, rpmMessage, RPMRC_FAIL, RPMRC_NOKEY, RPMRC_NOTFOUND, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadHeader(), rpmReadSignature(), RPMSIGTAG_DSA, RPMSIGTAG_GPG, RPMSIGTAG_MD5, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, RPMSIGTAG_RSA, RPMSIGTAG_SHA1, rpmswAdd(), rpmswEnter(), rpmswExit(), rpmswSub(), RPMTAG_HEADERIMMUTABLE, RPMTS_OP_DIGEST, RPMTS_OP_READHDR, RPMTS_OP_SIGNATURE, rpmtsCleanDig(), rpmtsDig(), rpmtsOp(), rpmtsSetSig(), rpmtsStashKeyid(), rpmtsVSFlags(), rpmVerifySignature(), RPMVSF_NEEDPAYLOAD, RPMVSF_NODSA, RPMVSF_NODSAHEADER, RPMVSF_NOMD5, RPMVSF_NORSA, RPMVSF_NORSAHEADER, RPMVSF_NOSHA1HEADER, pgpDig_s::sha1ctx, pgpDig_s::signature, rpmlead::signature_type, _FD_s::stats, and pgpDigParams_s::version.

Referenced by IDTXglob(), readRPM(), rpmgiReadHeader(), rpmInstall(), rpmInstallSourcePackage(), rpmts_HdrFromFdno(), rpmtsRun(), and rpmtsSolve().

int rpmVersionCompare ( Header  first,
Header  second 
)

Compare headers to determine which header is "newer".

Deprecated:
Use rpmdsCompare instead.
Parameters
first1st header
second2nd header
Returns
result of comparison

Definition at line 53 of file psm.c.

References headerGetEntry(), RPMTAG_EPOCH, RPMTAG_RELEASE, RPMTAG_VERSION, and rpmvercmp.

Referenced by hdr_compare(), and rpmInstall().

static const char* tagName ( int  tag)
inlinestatic

Return tag name from value.

Parameters
tagtag value
Returns
tag name, "(unknown)" on not found

Definition at line 975 of file rpmlib.h.

References headerTagIndices_s::tagName.

Referenced by checkForDuplicates(), checkForRequired(), handlePreambleTag(), i18nTag(), mapTagName(), printNewSpecfile(), rpmdsMergePRCO(), rpmdsTagName(), rpmfcMergePR(), rpmgiInitFilter(), rpmgiNext(), rpmHeaderGetEntry(), stashSt(), str2uuid(), XrpmgiLink(), and XrpmgiUnlink().

static int tagType ( int  tag)
inlinestatic

Return tag data type from value.

Parameters
tagtag value
Returns
tag data type, RPM_NULL_TYPE on not found.

Definition at line 990 of file rpmlib.h.

References headerTagIndices_s::tagType.

Referenced by writeRPM().

static int tagValue ( const char *  tagstr)
inlinestatic

Return tag value from name.

Parameters
tagstrname of tag
Returns
tag value, -1 on not found

Definition at line 1004 of file rpmlib.h.

References headerTagIndices_s::tagValue.

Referenced by dbiTagsInit(), rpmdsSysinfo(), and rpmgiInitFilter().

Variable Documentation

int nplatpat

Definition at line 38 of file rpmrc.c.

Referenced by rpmFreeRpmrc(), rpmPlatform(), rpmPlatformScore(), and rpmtsAddInstallElement().

void* platpat

Definition at line 36 of file rpmrc.c.

Referenced by rpmFreeRpmrc(), rpmPlatform(), rpmPlatformScore(), and rpmtsAddInstallElement().

struct MacroContext_s* rpmCLIMacroContext

Definition at line 95 of file macro.c.

Referenced by rpmcliAllArgCallback(), and rpmcliFini().

const char* rpmEVR

Definition at line 62 of file depends.c.

Referenced by printVersion().

int rpmFLAGS

Definition at line 65 of file depends.c.

struct MacroContext_s* rpmGlobalMacroContext
struct headerSprintfExtension_s rpmHeaderFormats[]
const char* rpmNAME

Definition at line 59 of file depends.c.

Definition at line 94 of file tagname.c.

Referenced by rpmcliFini().

struct headerTagTableEntry_s* rpmTagTable
const int rpmTagTableSize

Number of entries in rpmTagTable.

Definition at line 208 of file tagtbl.c.

Referenced by init_rpm(), rpmDisplayQueryTags(), tagLoadIndex(), and tagNumFromPyObject().

const char* RPMVERSION

Definition at line 8 of file misc.c.

Referenced by rpmcliImportPubkey().