rpm  5.4.14
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
hdrfmt.c File Reference
#include "system.h"
#include "rpmio_internal.h"
#include <rpmbc.h>
#include <rpmcb.h>
#include <rpmmacro.h>
#include <rpmuuid.h>
#include <argv.h>
#include <ugid.h>
#include <rpmtag.h>
#include <rpmevr.h>
#include <rpmns.h>
#include <rpmdb.h>
#include <rpmtypes.h>
#include "misc.h"
#include <rpmfi.h>
#include "legacy.h"
#include "debug.h"
Include dependency graph for hdrfmt.c:

Go to the source code of this file.

Data Structures

struct  spew_s
 
struct  key_s
 
struct  sprintfTag_s
 
struct  sprintfToken_s
 
struct  headerSprintfArgs_s
 

Macros

#define _MIRE_INTERNAL
 
#define _RPMTAG_INTERNAL
 
#define _RPMEVR_INTERNAL
 
#define PARSER_BEGIN   0
 
#define PARSER_IN_ARRAY   1
 
#define PARSER_IN_EXPR   2
 
#define isSEP(_c)   ((_c) == ':' || (_c) == '|')
 

Typedefs

typedef struct spew_sspew_t
 
typedef struct key_s KEY
 
typedef struct sprintfTag_ssprintfTag
 
typedef struct sprintfToken_ssprintfToken
 Destroy headerSprintf format array. More...
 
typedef struct
headerSprintfArgs_s
headerSprintfArgs
 

Enumerations

enum  keyStat_e {
  STAT_KEYS_NONE = 0, STAT_KEYS_DEV = (1U << 0), STAT_KEYS_INO = (1U << 1), STAT_KEYS_MODE = (1U << 2),
  STAT_KEYS_NLINK = (1U << 3), STAT_KEYS_UID = (1U << 4), STAT_KEYS_GID = (1U << 5), STAT_KEYS_RDEV = (1U << 6),
  STAT_KEYS_SIZE = (1U << 7), STAT_KEYS_BLKSIZE = (1U << 8), STAT_KEYS_BLOCKS = (1U << 9), STAT_KEYS_ATIME = (1U << 10),
  STAT_KEYS_CTIME = (1U << 11), STAT_KEYS_MTIME = (1U << 12), STAT_KEYS_SLINK = (1U << 14), STAT_KEYS_DIGEST = (1U << 15),
  STAT_KEYS_UNAME = (1U << 17), STAT_KEYS_GNAME = (1U << 18)
}
 Bit field enum for stat(2) keys. More...
 
enum  keyUuids_e {
  UUID_KEYS_NONE = (0U << 0), UUID_KEYS_V1 = (1U << 0), UUID_KEYS_V3 = (3U << 0), UUID_KEYS_V4 = (4U << 0),
  UUID_KEYS_V5 = (5U << 0)
}
 Bit field enum for stat(2) keys. More...
 
enum  sprintfToken_e {
  PTOK_NONE = 0, PTOK_TAG = 1, PTOK_ARRAY = 2, PTOK_STRING = 3,
  PTOK_COND = 4
}
 

Functions

static char * intFormat (HE_t he, const char **av, const char *fmt)
 Convert tag data representation. More...
 
static char * octFormat (HE_t he, const char **av)
 Return octal formatted data. More...
 
static char * hexFormat (HE_t he, const char **av)
 Return hex formatted data. More...
 
static char * decFormat (HE_t he, const char **av)
 Return decimal formatted data. More...
 
static char * realDateFormat (HE_t he, const char **av, const char *strftimeFormat)
 Return strftime formatted data. More...
 
static char * dateFormat (HE_t he, const char **av)
 Return date formatted data. More...
 
static char * dayFormat (HE_t he, const char **av)
 Return day formatted data. More...
 
static char * shescapeFormat (HE_t he, const char **av)
 Return shell escape formatted data. More...
 
static size_t xmlstrlen (const char *s, int lvl)
 Return length of string represented with xml characters substituted. More...
 
static char * xmlstrcpy (char *t, const char *s, int lvl)
 Copy source string to target, substituting for xml characters. More...
 
static size_t yamlstrlen (const char *s, int lvl)
 Return length of string represented with yaml indentation. More...
 
static char * yamlstrcpy (char *t, const char *s, int lvl)
 Copy source string to target, indenting for yaml. More...
 
static size_t jsonstrlen (const char *s, int lvl)
 Return length of string represented with single quotes doubled. More...
 
static char * jsonstrcpy (char *t, const char *s, int lvl)
 Copy source string to target, doubling single quotes. More...
 
static size_t sqlstrlen (const char *s, int lvl)
 Return length of string represented with single quotes doubled. More...
 
static char * sqlstrcpy (char *t, const char *s, int lvl)
 Copy source string to target, doubling single quotes. More...
 
static char * rpmPermsString (int mode)
 
static char * triggertypeFormat (HE_t he, const char **av)
 Identify type of trigger. More...
 
static char * permsFormat (HE_t he, const char **av)
 Format file permissions for display. More...
 
static char * fflagsFormat (HE_t he, const char **av)
 Format file flags for display. More...
 
static char * armorFormat (HE_t he, const char **av)
 Wrap a pubkey in ascii armor for display. More...
 
static char * base64Format (HE_t he, const char **av)
 Encode binary data in base64 for display. More...
 
static char * strdup_iconv_check (const char *buffer, const char *tocode)
 
static char * cdataFormat (HE_t he, const char **av)
 Encode string for use in XML CDATA. More...
 
static char * iconvFormat (HE_t he, const char **av)
 Convert string encoding. More...
 
static char * xmlFormat (HE_t he, const char **av)
 Wrap tag data in simple header xml markup. More...
 
static char * yamlFormat (HE_t he, const char **av)
 Wrap tag data in simple header yaml markup. More...
 
static char * jsonFormat (HE_t he, const char **av)
 Wrap tag data in simple header json markup. More...
 
static char * pgpsigFormat (HE_t he, const char **av)
 Display signature fingerprint and time. More...
 
static char * depflagsFormat (HE_t he, const char **av)
 Format dependency flags for display. More...
 
static char * deptypeFormat (HE_t he, const char **av)
 Format dependency type for display. More...
 
static char * hintFormat (HE_t he, const char **av)
 Format dependency flags for display. More...
 
static int instprefixTag (Header h, HE_t he)
 Retrieve install prefixes. More...
 
static int tv2uuidv1 (Header h, HE_t he, struct timeval *tv)
 Convert unix timeval to UUIDv1. More...
 
static int tag2uuidv1 (Header h, HE_t he)
 Retrieve time and convert to UUIDv1. More...
 
static int installtime_uuidTag (Header h, HE_t he)
 Retrieve install time and convert to UUIDv1. More...
 
static int buildtime_uuidTag (Header h, HE_t he)
 Retrieve build time and convert to UUIDv1. More...
 
static int origintime_uuidTag (Header h, HE_t he)
 Retrieve origin time and convert to UUIDv1. More...
 
static int installtid_uuidTag (Header h, HE_t he)
 Retrieve install tid and convert to UUIDv1. More...
 
static int removetid_uuidTag (Header h, HE_t he)
 Retrieve remove tid and convert to UUIDv1. More...
 
static int origintid_uuidTag (Header h, HE_t he)
 Retrieve origin tid and convert to UUIDv1. More...
 
static int str2uuid (HE_t he, const char **av, rpmuint32_t version, char *val)
 Convert tag string to UUID. More...
 
static int tag2uuidv5 (Header h, HE_t he)
 Retrieve tag and convert to UUIDv5. More...
 
static int pkguuidTag (Header h, HE_t he)
 Retrieve pkgid and convert to UUIDv5. More...
 
static int sourcepkguuidTag (Header h, HE_t he)
 Retrieve sourcepkgid and convert to UUIDv5. More...
 
static int hdruuidTag (Header h, HE_t he)
 Retrieve hdrid and convert to UUIDv5. More...
 
static int triggercondsTag (Header h, HE_t he)
 Retrieve trigger info. More...
 
static int triggertypeTag (Header h, HE_t he)
 Retrieve trigger type info. More...
 
static int i18nTag (Header h, HE_t he)
 Retrieve i18n text. More...
 
static int localeTag (Header h, HE_t he)
 Retrieve text and convert to locale. More...
 
static int summaryTag (Header h, HE_t he)
 Retrieve summary text. More...
 
static int descriptionTag (Header h, HE_t he)
 Retrieve description text. More...
 
static int changelognameTag (Header h, HE_t he)
 
static int changelogtextTag (Header h, HE_t he)
 
static int groupTag (Header h, HE_t he)
 Retrieve group text. More...
 
static int dbinstanceTag (Header h, HE_t he)
 Retrieve db instance from header. More...
 
static int headerstartoffTag (Header h, HE_t he)
 Retrieve starting byte offset of header. More...
 
static int headerendoffTag (Header h, HE_t he)
 Retrieve ending byte offset of header. More...
 
static int pkgoriginTag (Header h, HE_t he)
 Retrieve package origin from header. More...
 
static int pkgbaseurlTag (Header h, HE_t he)
 Retrieve package baseurl from header. More...
 
static int pkgdigestTag (Header h, HE_t he)
 Retrieve package digest from header. More...
 
static int pkgmtimeTag (Header h, HE_t he)
 Retrieve *.rpm package st->st_mtime from header. More...
 
static int pkgsizeTag (Header h, HE_t he)
 Retrieve *.rpm package st->st_size from header. More...
 
static char * hGetNVRA (Header h)
 Return (malloc'd) header name-version-release.arch string. More...
 
static int nvraTag (Header h, HE_t he)
 Retrieve N-V-R.A compound string from header. More...
 
static void rpmfiBuildFNames (Header h, rpmTag tagN, const char ***fnp, rpmTagCount *fcp)
 Retrieve file names from header. More...
 
static int _fnTag (Header h, HE_t he, rpmTag tag)
 Retrieve file paths. More...
 
static int filenamesTag (Header h, HE_t he)
 
static int filepathsTag (Header h, HE_t he)
 
static int origpathsTag (Header h, HE_t he)
 
static int debevrfmtTag (Header h, HE_t he, HE_t Nhe, HE_t EVRhe, HE_t Fhe)
 Return Debian formatted dependencies as string array. More...
 
static int debevrTag (Header h, HE_t he, rpmTag tagN, rpmTag tagEVR, rpmTag tagF)
 Retrieve and return Debian formatted dependecies for –deb:control. More...
 
static int debconflictsTag (Header h, HE_t he)
 Retrieve Depends: and Conflicts: for –deb:control. More...
 
static int debdependsTag (Header h, HE_t he)
 
static int debobsoletesTag (Header h, HE_t he)
 
static int debprovidesTag (Header h, HE_t he)
 
static int debmd5sumsTag (Header h, HE_t he)
 Retrieve digest/path pairs for –deb:md5sums. More...
 
static int filestatTag (Header h, HE_t he)
 
static int wnlookupTag (Header h, rpmTag tagNVRA, ARGV_t *avp, ARGI_t *hitp, HE_t PNhe, HE_t PEVRhe, HE_t PFhe)
 
static int whatneedsTag (Header h, HE_t he)
 
static int nwlookupTag (Header h, rpmTag tagNVRA, ARGV_t *avp, ARGI_t *hitp, HE_t RNhe, HE_t REVRhe, HE_t RFhe)
 
static int needswhatTag (Header h, HE_t he)
 
static int PRCOSkip (rpmTag tag, rpmTagData N, rpmTagData EVR, rpmTagData F, uint32_t i)
 
static int PRCOxmlTag (Header h, HE_t he, rpmTag EVRtag, rpmTag Ftag)
 
static int PxmlTag (Header h, HE_t he)
 
static int RxmlTag (Header h, HE_t he)
 
static int CxmlTag (Header h, HE_t he)
 
static int OxmlTag (Header h, HE_t he)
 
static char * spewescapeFormat (HE_t he, const char **av, spew_t spew, int lvl)
 Encode string for use by SQL/JSON markup. More...
 
static char * jsonescapeFormat (HE_t he, const char **av)
 
static char * sqlescapeFormat (HE_t he, const char **av)
 
static int PRCOsqlTag (Header h, HE_t he, rpmTag EVRtag, rpmTag Ftag)
 
static int PsqlTag (Header h, HE_t he)
 
static int RsqlTag (Header h, HE_t he)
 
static int CsqlTag (Header h, HE_t he)
 
static int OsqlTag (Header h, HE_t he)
 
static int PRCOyamlTag (Header h, HE_t he, rpmTag EVRtag, rpmTag Ftag)
 
static int PyamlTag (Header h, HE_t he)
 
static int RyamlTag (Header h, HE_t he)
 
static int CyamlTag (Header h, HE_t he)
 
static int OyamlTag (Header h, HE_t he)
 
static int FDGSkip (rpmTagData DN, rpmTagData BN, rpmTagData DI, rpmuint32_t i)
 
static int FDGxmlTag (Header h, HE_t he, int lvl)
 
static int F1xmlTag (Header h, HE_t he)
 
static int F2xmlTag (Header h, HE_t he)
 
static int FDGsqlTag (Header h, HE_t he, int lvl)
 
static int F1sqlTag (Header h, HE_t he)
 
static int F2sqlTag (Header h, HE_t he)
 
static int FDGyamlTag (Header h, HE_t he, int lvl)
 
static int F1yamlTag (Header h, HE_t he)
 
static int F2yamlTag (Header h, HE_t he)
 
static char * bncdataFormat (HE_t he, const char **av)
 Encode the basename of a string for use in XML CDATA. More...
 
 if (name &&*name)
 
static char * digestFormat (HE_t he, const char **av)
 Return digest of tag data. More...
 
static char * statFormat (HE_t he, const char **av)
 Return file info. More...
 
static char * uuidFormat (HE_t he, const char **av)
 Reformat tag string as a UUID. More...
 
static char * rpnFormat (HE_t he, const char **av)
 Return arithmetic expressions of input. More...
 
static char * strsubFormat (HE_t he, const char **av)
 Replace string values. More...
 
void rpmDisplayQueryTags (FILE *fp, headerTagTableEntry _rpmTagTable, headerSprintfExtension _rpmHeaderFormats)
 Display list of tags that can be used in –queryformat. More...
 
static char escapedChar (const char ch)
 
static HE_t rpmheClean (HE_t he)
 Clean a tag container, free'ing attached malloc's. More...
 
 if (format==NULL)
 
static headerSprintfArgs hsaInit (headerSprintfArgs hsa)
 Initialize an hsa iteration. More...
 
static sprintfToken hsaNext (headerSprintfArgs hsa)
 Return next hsa iteration item. More...
 
static headerSprintfArgs hsaFini (headerSprintfArgs hsa)
 Finish an hsa iteration. More...
 
static char * hsaReserve (headerSprintfArgs hsa, size_t need)
 Reserve sufficient buffer space for next output value. More...
 
static const char * myTagName (headerTagTableEntry tbl, rpmuint32_t val, rpmuint32_t *typep)
 Return tag name from value. More...
 
static rpmuint32_t myTagValue (headerTagTableEntry tbl, const char *name)
 Return tag value from name. More...
 
static int findTag (headerSprintfArgs hsa, sprintfToken token, const char *name)
 Search extensions and tags for a name. More...
 
static int parseExpression (headerSprintfArgs hsa, sprintfToken token, char *str, char **endPtr)
 Parse a headerSprintf expression. More...
 
static int parseFormat (headerSprintfArgs hsa, char *str, sprintfToken *formatPtr, size_t *numTokensPtr, char **endPtr, int state)
 Parse a headerSprintf term. More...
 
static int getExtension (headerSprintfArgs hsa, headerTagTagFunction fn, HE_t he, HE_t ec)
 Call a header extension only once, saving results. More...
 
static char * formatValue (headerSprintfArgs hsa, sprintfTag tag, size_t element)
 Format a single item's value. More...
 
static char * singleSprintf (headerSprintfArgs hsa, sprintfToken token, size_t element)
 Format a single headerSprintf item. More...
 
 for (ext=exts, extNum=0;ext!=NULL &&ext->type!=HEADER_EXT_LAST;ext=(ext->type==HEADER_EXT_MORE?*ext->u.more:ext+1), extNum++)
 
char * headerSprintf (Header h, const char *fmt, headerTagTableEntry tags, headerSprintfExtension exts, errmsg_t *errmsg)
 Return formatted output string from header tags. More...
 

Variables

int _hdrqf_debug
 
static struct
headerSprintfExtension_s 
_headerDefaultFormats []
 
headerSprintfExtension headerDefaultFormats = &_headerDefaultFormats[0]
 Supported default header tag output formats. More...
 
static struct spew_s _xml_spew
 
static struct spew_s _yaml_spew
 
static struct spew_s _json_spew
 
static struct spew_s _sql_spew
 
static const char * _iconv_tocode = "UTF-8"
 
static const char * _iconv_fromcode = NULL
 
static const char uuid_ns [] = "ns:URL"
 
static const char uuid_auth [] = "%{?_uuid_auth}%{!?_uuid_auth:http://rpm5.org}"
 
static const char uuid_path [] = "%{?_uuid_path}%{!?_uuid_path:/package}"
 
static rpmuint32_t uuid_version = 5
 
static const char * language = "LANGUAGE"
 
static const char * _macro_i18ndomains = "%{?_i18ndomains}"
 
static KEY keyDigests []
 
static size_t nkeyDigests = sizeof(keyDigests) / sizeof(keyDigests[0])
 
static KEY keyStat []
 
static size_t nkeyStat = sizeof(keyStat) / sizeof(keyStat[0])
 
static KEY keyUuids []
 
static size_t nkeyUuids = sizeof(keyUuids) / sizeof(keyUuids[0])
 
static int
 
static rpmuint32_t
 
return keyval
 
static struct
headerSprintfExtension_s 
_headerCompoundFormats []
 
headerSprintfExtension headerCompoundFormats = &_headerCompoundFormats[0]
 Supported default header extension/tag output formats. More...
 
 format = _free(format)
 
return NULL
 
static HE_t
 Create an extension cache. More...
 
HE_t ec = (HE_t) xcalloc(extNum+1, sizeof(*ec))
 
int extNum = 0
 
necp = extNum
 

Macro Definition Documentation

#define _MIRE_INTERNAL

Definition at line 38 of file hdrfmt.c.

#define _RPMEVR_INTERNAL

Definition at line 49 of file hdrfmt.c.

#define _RPMTAG_INTERNAL

Definition at line 47 of file hdrfmt.c.

#define isSEP (   _c)    ((_c) == ':' || (_c) == '|')

Referenced by parseFormat().

#define PARSER_BEGIN   0

Definition at line 5368 of file hdrfmt.c.

Referenced by headerSprintf().

#define PARSER_IN_ARRAY   1

Definition at line 5369 of file hdrfmt.c.

Referenced by parseFormat().

#define PARSER_IN_EXPR   2

Definition at line 5370 of file hdrfmt.c.

Referenced by parseExpression(), and parseFormat().

Typedef Documentation

typedef struct key_s KEY
typedef struct spew_s* spew_t

Definition at line 331 of file hdrfmt.c.

Enumeration Type Documentation

enum keyStat_e

Bit field enum for stat(2) keys.

Enumerator
STAT_KEYS_NONE 
STAT_KEYS_DEV 

st_dev

STAT_KEYS_INO 

st_ino

STAT_KEYS_MODE 

st_mode

STAT_KEYS_NLINK 

st_nlink

STAT_KEYS_UID 

st_uid

STAT_KEYS_GID 

st_gid

STAT_KEYS_RDEV 

st_rdev

STAT_KEYS_SIZE 

st_size

STAT_KEYS_BLKSIZE 

st_blksize

STAT_KEYS_BLOCKS 

st_blocks

STAT_KEYS_ATIME 

st_atime

STAT_KEYS_CTIME 

st_ctime

STAT_KEYS_MTIME 

st_mtime

STAT_KEYS_SLINK 

symlink

STAT_KEYS_DIGEST 

digest

STAT_KEYS_UNAME 

user name

STAT_KEYS_GNAME 

group name

Definition at line 4458 of file hdrfmt.c.

enum keyUuids_e

Bit field enum for stat(2) keys.

Enumerator
UUID_KEYS_NONE 
UUID_KEYS_V1 
UUID_KEYS_V3 
UUID_KEYS_V4 
UUID_KEYS_V5 

Definition at line 4535 of file hdrfmt.c.

Function Documentation

static int _fnTag ( Header  h,
HE_t  he,
rpmTag  tag 
)
static

Retrieve file paths.

Parameters
hheader
Return values
*hetag container
Parameters
tagRPMTAG_BASENAMES or RPMTAG_ORIGBASENAMES
Returns
0 on success

Definition at line 2735 of file hdrfmt.c.

References _free(), rpmDataType_u::argv, _HE_s::c, _HE_s::freeData, _HE_s::p, rpmDataType_u::ptr, RPM_STRING_ARRAY_TYPE, rpmfiBuildFNames(), and _HE_s::t.

Referenced by filenamesTag(), filepathsTag(), filestatTag(), and origpathsTag().

static char* armorFormat ( HE_t  he,
const char **  av 
)
static

Wrap a pubkey in ascii armor for display.

Todo:
Permit selectable display formats (i.e. binary).
Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 751 of file hdrfmt.c.

References _, _free(), assert(), _HE_s::c, ix, _HE_s::ix, ns, NULL, _HE_s::p, PGPARMOR_PUBKEY, PGPARMOR_SIGNATURE, pgpArmorWrap(), 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, s, rpmDataType_u::str, _HE_s::t, rpmDataType_u::ui8p, val, and xstrdup().

static char* base64Format ( HE_t  he,
const char **  av 
)
static

Encode binary data in base64 for display.

Todo:
Permit selectable display formats (i.e. binary).
Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 804 of file hdrfmt.c.

References _, _free(), assert(), _HE_s::c, exit, ix, _HE_s::ix, ns, NULL, _HE_s::p, rpmDataType_u::ptr, RPM_BIN_TYPE, RPM_STRING_TYPE, RPM_UINT64_TYPE, stpcpy(), rpmDataType_u::str, _HE_s::t, t, rpmDataType_u::ui64p, val, xcalloc(), and xstrdup().

Referenced by jsonFormat(), xmlFormat(), and yamlFormat().

static char* bncdataFormat ( HE_t  he,
const char **  av 
)
static

Encode the basename of a string for use in XML CDATA.

Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 4389 of file hdrfmt.c.

References _, _free(), _xml_spew, assert(), nb, NULL, _HE_s::p, RPM_STRING_TYPE, s, spew_s::spew_strcpy, spew_s::spew_strlen, rpmDataType_u::str, strdup_iconv_check(), _HE_s::t, t, val, xmalloc, and xstrdup().

static int buildtime_uuidTag ( Header  h,
HE_t  he 
)
static

Retrieve build time and convert to UUIDv1.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 1762 of file hdrfmt.c.

References RPMTAG_BUILDTIME, _HE_s::tag, and tag2uuidv1().

static char* cdataFormat ( HE_t  he,
const char **  av 
)
static

Encode string for use in XML CDATA.

Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 963 of file hdrfmt.c.

References _, _free(), _xml_spew, assert(), ix, _HE_s::ix, nb, NULL, _HE_s::p, RPM_STRING_TYPE, s, spew_s::spew_strcpy, spew_s::spew_strlen, rpmDataType_u::str, strdup_iconv_check(), _HE_s::t, t, val, xmalloc, and xstrdup().

static int changelognameTag ( Header  h,
HE_t  he 
)
static

Definition at line 2348 of file hdrfmt.c.

References localeTag(), RPMTAG_CHANGELOGNAME, and _HE_s::tag.

static int changelogtextTag ( Header  h,
HE_t  he 
)
static

Definition at line 2356 of file hdrfmt.c.

References localeTag(), RPMTAG_CHANGELOGTEXT, and _HE_s::tag.

static int CsqlTag ( Header  h,
HE_t  he 
)
static
static int CxmlTag ( Header  h,
HE_t  he 
)
static
static int CyamlTag ( Header  h,
HE_t  he 
)
static
static char* dateFormat ( HE_t  he,
const char **  av 
)
static

Return date formatted data.

Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 234 of file hdrfmt.c.

References _, and realDateFormat().

static char* dayFormat ( HE_t  he,
const char **  av 
)
static

Return day formatted data.

Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 246 of file hdrfmt.c.

References _, and realDateFormat().

static int dbinstanceTag ( Header  h,
HE_t  he 
)
static

Retrieve db instance from header.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 2384 of file hdrfmt.c.

References _HE_s::c, _HE_s::freeData, headerGetInstance(), _HE_s::p, RPM_UINT32_TYPE, RPMTAG_DBINSTANCE, _HE_s::t, _HE_s::tag, rpmDataType_u::ui32p, and xmalloc.

static int debconflictsTag ( Header  h,
HE_t  he 
)
static

Retrieve Depends: and Conflicts: for –deb:control.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 2879 of file hdrfmt.c.

References debevrTag(), RPMTAG_CONFLICTFLAGS, RPMTAG_CONFLICTNAME, RPMTAG_CONFLICTVERSION, _HE_s::tag, and tagValue().

static int debdependsTag ( Header  h,
HE_t  he 
)
static
static int debevrfmtTag ( Header  h,
HE_t  he,
HE_t  Nhe,
HE_t  EVRhe,
HE_t  Fhe 
)
static

Return Debian formatted dependencies as string array.

Parameters
hheader
Return values
*hetag container
Parameters
Nhedependency name container
EVRhedependency epoch:version-release container
Fhedependency flags container
Returns
0 on success

Definition at line 2783 of file hdrfmt.c.

References _free(), rpmDataType_u::argv, _HE_s::c, for(), _HE_s::freeData, _HE_s::ix, nb, NULL, op, _HE_s::p, rc, RPM_STRING_ARRAY_TYPE, rpmExpand(), RPMSENSE_EQUAL, RPMSENSE_GREATER, RPMSENSE_LESS, stpcpy(), _HE_s::t, t, te, rpmDataType_u::ui32p, and xmalloc.

Referenced by debevrTag().

static int debevrTag ( Header  h,
HE_t  he,
rpmTag  tagN,
rpmTag  tagEVR,
rpmTag  tagF 
)
static

Retrieve and return Debian formatted dependecies for –deb:control.

Parameters
hheader
Return values
*hetag container
Parameters
tagNdependency tag name
tagEVRdependency tag epoch:version-release
tagFdependency tag flags
Returns
0 on success

Definition at line 2842 of file hdrfmt.c.

References _free(), alloca(), assert(), _HE_s::c, debevrfmtTag(), exit, Fhe, headerGet(), memset(), _HE_s::p, rpmDataType_u::ptr, rc, _HE_s::tag, and xx.

Referenced by debconflictsTag(), debdependsTag(), debobsoletesTag(), and debprovidesTag().

static int debmd5sumsTag ( Header  h,
HE_t  he 
)
static

Retrieve digest/path pairs for –deb:md5sums.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 2921 of file hdrfmt.c.

References _free(), alloca(), rpmDataType_u::argv, assert(), _HE_s::c, exit, for(), _HE_s::freeData, headerGet(), _HE_s::ix, memset(), nb, NULL, _HE_s::p, rpmDataType_u::ptr, rc, RPM_STRING_ARRAY_TYPE, rpmExpand(), RPMTAG_FILEDIGESTS, RPMTAG_FILEPATHS, stpcpy(), _HE_s::t, t, _HE_s::tag, tagValue(), te, xmalloc, and xx.

static int debobsoletesTag ( Header  h,
HE_t  he 
)
static
static int debprovidesTag ( Header  h,
HE_t  he 
)
static
static char* decFormat ( HE_t  he,
const char **  av 
)
static

Return decimal formatted data.

Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 189 of file hdrfmt.c.

References intFormat().

static char* depflagsFormat ( HE_t  he,
const char **  av 
)
static

Format dependency flags for display.

Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 1473 of file hdrfmt.c.

References _, alloca(), assert(), ix, _HE_s::ix, _HE_s::p, RPM_UINT64_TYPE, RPMSENSE_EQUAL, RPMSENSE_GREATER, RPMSENSE_LESS, RPMSENSE_SENSEMASK, stpcpy(), _HE_s::t, t, te, rpmDataType_u::ui64p, val, and xstrdup().

Referenced by triggercondsTag().

static char* deptypeFormat ( HE_t  he,
const char **  av 
)
static

Format dependency type for display.

Todo:
There's more sense bits, and the bits are attributes, not exclusive.
Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 1525 of file hdrfmt.c.

References _, alloca(), assert(), ix, _HE_s::ix, _HE_s::p, RPM_UINT64_TYPE, stpcpy(), _HE_s::t, t, te, rpmDataType_u::ui64p, val, and xstrdup().

static int descriptionTag ( Header  h,
HE_t  he 
)
static

Retrieve description text.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 2340 of file hdrfmt.c.

References i18nTag(), RPMTAG_DESCRIPTION, and _HE_s::tag.

static char* digestFormat ( HE_t  he,
const char **  av 
)
static

Return digest of tag data.

Parameters
hetag container
avparameter list (NULL uses md5)
Returns
formatted string

Definition at line 4597 of file hdrfmt.c.

References _, assert(), _HE_s::c, ctx, exit, ix, _HE_s::ix, ns, NULL, _HE_s::p, PGPHASHALGO_SHA1, rpmDataType_u::ptr, RPM_BIN_TYPE, RPM_STRING_TYPE, RPM_UINT64_TYPE, rpmDigestFinal(), rpmDigestInit(), rpmDigestUpdate(), rpmDataType_u::str, _HE_s::t, rpmDataType_u::ui64p, val, xstrdup(), and xx.

static char escapedChar ( const char  ch)
static

Definition at line 5474 of file hdrfmt.c.

References fprintf().

Referenced by parseFormat().

static int F1sqlTag ( Header  h,
HE_t  he 
)
static

Definition at line 4221 of file hdrfmt.c.

References FDGsqlTag(), RPMTAG_BASENAMES, and _HE_s::tag.

static int F1xmlTag ( Header  h,
HE_t  he 
)
static

Definition at line 4066 of file hdrfmt.c.

References FDGxmlTag(), RPMTAG_BASENAMES, and _HE_s::tag.

static int F1yamlTag ( Header  h,
HE_t  he 
)
static

Definition at line 4367 of file hdrfmt.c.

References FDGyamlTag(), RPMTAG_BASENAMES, and _HE_s::tag.

static int F2sqlTag ( Header  h,
HE_t  he 
)
static

Definition at line 4229 of file hdrfmt.c.

References FDGsqlTag(), RPMTAG_BASENAMES, and _HE_s::tag.

static int F2xmlTag ( Header  h,
HE_t  he 
)
static

Definition at line 4074 of file hdrfmt.c.

References FDGxmlTag(), RPMTAG_BASENAMES, and _HE_s::tag.

static int F2yamlTag ( Header  h,
HE_t  he 
)
static

Definition at line 4375 of file hdrfmt.c.

References FDGyamlTag(), RPMTAG_BASENAMES, and _HE_s::tag.

static int FDGSkip ( rpmTagData  DN,
rpmTagData  BN,
rpmTagData  DI,
rpmuint32_t  i 
)
static

Definition at line 3913 of file hdrfmt.c.

References rpmDataType_u::argv, assert(), i, NULL, strcmp(), and rpmDataType_u::ui32p.

Referenced by FDGsqlTag(), FDGxmlTag(), and FDGyamlTag().

static int FDGsqlTag ( Header  h,
HE_t  he,
int  lvl 
)
static
static int FDGxmlTag ( Header  h,
HE_t  he,
int  lvl 
)
static
static int FDGyamlTag ( Header  h,
HE_t  he,
int  lvl 
)
static
static char* fflagsFormat ( HE_t  he,
const char **  av 
)
static

Format file flags for display.

Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 709 of file hdrfmt.c.

References _, assert(), buf, ix, _HE_s::ix, _HE_s::p, RPM_UINT64_TYPE, RPMFILE_CONFIG, RPMFILE_DOC, RPMFILE_GHOST, RPMFILE_LICENSE, RPMFILE_MISSINGOK, RPMFILE_NOREPLACE, RPMFILE_README, RPMFILE_SPECFILE, _HE_s::t, rpmDataType_u::ui64p, val, and xstrdup().

static int filenamesTag ( Header  h,
HE_t  he 
)
static

Definition at line 2750 of file hdrfmt.c.

References _fnTag(), RPMTAG_BASENAMES, _HE_s::tag, and tagValue().

static int filepathsTag ( Header  h,
HE_t  he 
)
static

Definition at line 2758 of file hdrfmt.c.

References _fnTag(), RPMTAG_BASENAMES, RPMTAG_FILEPATHS, and _HE_s::tag.

static int filestatTag ( Header  h,
HE_t  he 
)
static
static int findTag ( headerSprintfArgs  hsa,
sprintfToken  token,
const char *  name 
)
static

Search extensions and tags for a name.

Parameters
hsaheaderSprintf args
tokenparsed fields
namename to find
Returns
0 on success, 1 on not found

Definition at line 5738 of file hdrfmt.c.

References alloca(), argvCount(), sprintfTag_s::av, sprintfToken_s::cond, sprintfTag_s::ext, sprintfTag_s::extNum, extNum, headerSprintfArgs_s::exts, sprintfTag_s::fmtfuncs, i, myTagValue(), name, NULL, PTOK_COND, stpcpy(), strcmp(), t, sprintfToken_s::tag, sprintfTag_s::tagno, headerSprintfArgs_s::tags, tagValue(), sprintfToken_s::type, sprintfToken_s::u, void, xcalloc(), and xstrcasecmp().

Referenced by parseExpression(), and parseFormat().

for ( ext  = exts,
extNum  = 0; ext != NULL && ext->type != HEADER_EXT_LAST; ext = (ext->type == HEADER_EXT_MORE ? *ext->u.more : ext+1),
extNum++   
)

Definition at line 6714 of file hdrfmt.c.

static char* formatValue ( headerSprintfArgs  hsa,
sprintfTag  tag,
size_t  element 
)
static
static int getExtension ( headerSprintfArgs  hsa,
headerTagTagFunction  fn,
HE_t  he,
HE_t  ec 
)
static

Call a header extension only once, saving results.

Parameters
hsaheaderSprintf args
fnfunction
Return values
hetag container
ecextension cache
Returns
1 on success, 0 on failure

Definition at line 6253 of file hdrfmt.c.

References _HE_s::avail, ec, fn, _HE_s::freeData, headerSprintfArgs_s::h, rc, and rpmheClean().

Referenced by formatValue(), and singleSprintf().

static int groupTag ( Header  h,
HE_t  he 
)
static

Retrieve group text.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 2370 of file hdrfmt.c.

References i18nTag(), RPMTAG_GROUP, and _HE_s::tag.

static int hdruuidTag ( Header  h,
HE_t  he 
)
static

Retrieve hdrid and convert to UUIDv5.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 1963 of file hdrfmt.c.

References RPMTAG_HDRID, _HE_s::tag, and tag2uuidv5().

static int headerendoffTag ( Header  h,
HE_t  he 
)
static

Retrieve ending byte offset of header.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 2420 of file hdrfmt.c.

References _HE_s::c, _HE_s::freeData, headerGetEndOff(), _HE_s::p, RPM_UINT64_TYPE, RPMTAG_HEADERENDOFF, _HE_s::t, _HE_s::tag, rpmDataType_u::ui64p, and xmalloc.

static int headerstartoffTag ( Header  h,
HE_t  he 
)
static

Retrieve starting byte offset of header.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 2402 of file hdrfmt.c.

References _HE_s::c, _HE_s::freeData, headerGetStartOff(), _HE_s::p, RPM_UINT64_TYPE, RPMTAG_HEADERSTARTOFF, _HE_s::t, _HE_s::tag, rpmDataType_u::ui64p, and xmalloc.

static char* hexFormat ( HE_t  he,
const char **  av 
)
static

Return hex formatted data.

Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 177 of file hdrfmt.c.

References intFormat().

static char* hGetNVRA ( Header  h)
static

Return (malloc'd) header name-version-release.arch string.

Parameters
hheader
Returns
name-version-release.arch string

Definition at line 2554 of file hdrfmt.c.

References _free(), A, headerNEVRA(), N, nb, NULL, stpcpy(), t, void, and xmalloc.

Referenced by nvraTag().

static char* hintFormat ( HE_t  he,
const char **  av 
)
static

Format dependency flags for display.

Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 1626 of file hdrfmt.c.

References _, alloca(), assert(), buf, ix, _HE_s::ix, _HE_s::p, RPM_UINT64_TYPE, stpcpy(), _HE_s::t, t, rpmDataType_u::ui64p, val, and xstrdup().

static headerSprintfArgs hsaFini ( headerSprintfArgs  hsa)
static

Finish an hsa iteration.

Parameters
hsaheaderSprintf args
Returns
headerSprintf args

Definition at line 5634 of file hdrfmt.c.

References headerFini(), headerSprintfArgs_s::hi, and headerSprintfArgs_s::i.

Referenced by headerSprintf().

static headerSprintfArgs hsaInit ( headerSprintfArgs  hsa)
static

Initialize an hsa iteration.

Parameters
hsaheaderSprintf args
Returns
headerSprintf args

Definition at line 5569 of file hdrfmt.c.

References sprintfToken_s::array, headerSprintfArgs_s::format, headerSprintfArgs_s::h, headerInit(), headerSprintfArgs_s::hi, headerSprintfArgs_s::i, NULL, PTOK_ARRAY, PTOK_TAG, tag, sprintfToken_s::tag, sprintfTag_s::tagno, sprintfToken_s::type, and sprintfToken_s::u.

Referenced by headerSprintf().

static sprintfToken hsaNext ( headerSprintfArgs  hsa)
static
static char* hsaReserve ( headerSprintfArgs  hsa,
size_t  need 
)
static

Reserve sufficient buffer space for next output value.

Parameters
hsaheaderSprintf args
needno. of bytes to reserve
Returns
pointer to reserved space

Definition at line 5654 of file hdrfmt.c.

References headerSprintfArgs_s::alloced, headerSprintfArgs_s::val, headerSprintfArgs_s::vallen, and xrealloc.

Referenced by formatValue(), headerSprintf(), and singleSprintf().

static int i18nTag ( Header  h,
HE_t  he 
)
static

Retrieve i18n text.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 2165 of file hdrfmt.c.

References _free(), alloca(), _HE_s::c, dgettext, _HE_s::freeData, getenv(), headerGet(), HEADERGET_NOEXTENSION, memset(), nb, NULL, _HE_s::p, rpmDataType_u::ptr, rc, RPM_STRING_TYPE, rpmExpand(), RPMTAG_NAME, setenv(), snprintf(), rpmDataType_u::str, _HE_s::t, _HE_s::tag, tagName(), unsetenv(), void, xstrdup(), xstrtolocale(), and xx.

Referenced by descriptionTag(), groupTag(), and summaryTag().

static char* iconvFormat ( HE_t  he,
const char **  av 
)
static

Convert string encoding.

Parameters
hetag container
avparameter list (NULL assumes UTF-8)
Returns
formatted string

Definition at line 994 of file hdrfmt.c.

References _, assert(), ix, _HE_s::ix, NULL, _HE_s::p, RPM_STRING_TYPE, rpmDataType_u::str, strdup_iconv_check(), _HE_s::t, val, and xstrdup().

if ( name &&*  name)

Definition at line 4582 of file hdrfmt.c.

References name, key_s::name, and key_s::value.

if ( format  = NULL)
static int installtid_uuidTag ( Header  h,
HE_t  he 
)
static

Retrieve install tid and convert to UUIDv1.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 1790 of file hdrfmt.c.

References RPMTAG_INSTALLTID, _HE_s::tag, and tag2uuidv1().

static int installtime_uuidTag ( Header  h,
HE_t  he 
)
static

Retrieve install time and convert to UUIDv1.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 1748 of file hdrfmt.c.

References RPMTAG_INSTALLTIME, _HE_s::tag, and tag2uuidv1().

static int instprefixTag ( Header  h,
HE_t  he 
)
static

Retrieve install prefixes.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 1657 of file hdrfmt.c.

References _free(), rpmDataType_u::argv, _HE_s::c, _HE_s::freeData, headerGet(), _HE_s::p, rpmDataType_u::ptr, RPM_STRING_TYPE, RPMTAG_INSTALLPREFIX, RPMTAG_INSTPREFIXES, rpmDataType_u::str, _HE_s::t, _HE_s::tag, and xstrdup().

static char* intFormat ( HE_t  he,
const char **  av,
const char *  fmt 
)
static

Convert tag data representation.

Parameters
hetag container
avparameter list (or NULL)
fmtoutput radix (NULL or "" assumes d)
Returns
formatted string

Definition at line 87 of file hdrfmt.c.

References _, alloca(), rpmDataType_u::argv, b, c, _HE_s::c, i, ix, _HE_s::ix, nb, NULL, _HE_s::p, RPM_BIN_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, RPM_UINT16_TYPE, RPM_UINT32_TYPE, RPM_UINT64_TYPE, RPM_UINT8_TYPE, s, rpmDataType_u::str, _HE_s::t, t, rpmDataType_u::ui16p, rpmDataType_u::ui32p, rpmDataType_u::ui64p, rpmDataType_u::ui8p, unsigned, xstrdup(), and xx.

Referenced by decFormat(), formatValue(), hexFormat(), octFormat(), and rpnFormat().

static char* jsonescapeFormat ( HE_t  he,
const char **  av 
)
static

Definition at line 3563 of file hdrfmt.c.

References spewescapeFormat().

static char* jsonFormat ( HE_t  he,
const char **  av 
)
static
static char* jsonstrcpy ( char *  t,
const char *  s,
int  lvl 
)
static

Copy source string to target, doubling single quotes.

Parameters
ttarget json string
ssource string
lvlindentation level
Returns
target json string

Definition at line 508 of file hdrfmt.c.

References c, t, and te.

static size_t jsonstrlen ( const char *  s,
int  lvl 
)
static

Return length of string represented with single quotes doubled.

Parameters
sstring
lvlindentation level
Returns
length of json string

Definition at line 479 of file hdrfmt.c.

References c, and len.

static int localeTag ( Header  h,
HE_t  he 
)
static
static const char* myTagName ( headerTagTableEntry  tbl,
rpmuint32_t  val,
rpmuint32_t typep 
)
static

Return tag name from value.

Parameters
tbltag table
valtag value to find
Return values
*typeptag type (or NULL)
Returns
tag name, NULL on not found

Definition at line 5674 of file hdrfmt.c.

References name, NULL, rpmTagTable, s, t, tagName(), tagType(), and xtolower().

Referenced by singleSprintf().

static rpmuint32_t myTagValue ( headerTagTableEntry  tbl,
const char *  name 
)
static

Return tag value from name.

Parameters
tbltag table
nametag name to find
Returns
tag value, 0 on not found

Definition at line 5713 of file hdrfmt.c.

References NULL, rpmTagTable, tagValue(), val, and xstrcasecmp().

Referenced by findTag().

static int needswhatTag ( Header  h,
HE_t  he 
)
static
static int nvraTag ( Header  h,
HE_t  he 
)
static

Retrieve N-V-R.A compound string from header.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 2606 of file hdrfmt.c.

References _HE_s::c, _HE_s::freeData, hGetNVRA(), _HE_s::p, RPM_STRING_TYPE, rpmDataType_u::str, and _HE_s::t.

static int nwlookupTag ( Header  h,
rpmTag  tagNVRA,
ARGV_t avp,
ARGI_t hitp,
HE_t  RNhe,
HE_t  REVRhe,
HE_t  RFhe 
)
static
static char* octFormat ( HE_t  he,
const char **  av 
)
static

Return octal formatted data.

Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 165 of file hdrfmt.c.

References intFormat().

static int origintid_uuidTag ( Header  h,
HE_t  he 
)
static

Retrieve origin tid and convert to UUIDv1.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 1818 of file hdrfmt.c.

References RPMTAG_ORIGINTID, _HE_s::tag, and tag2uuidv1().

static int origintime_uuidTag ( Header  h,
HE_t  he 
)
static

Retrieve origin time and convert to UUIDv1.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 1776 of file hdrfmt.c.

References RPMTAG_ORIGINTIME, _HE_s::tag, and tag2uuidv1().

static int origpathsTag ( Header  h,
HE_t  he 
)
static

Definition at line 2766 of file hdrfmt.c.

References _fnTag(), RPMTAG_ORIGBASENAMES, RPMTAG_ORIGPATHS, and _HE_s::tag.

static int OsqlTag ( Header  h,
HE_t  he 
)
static
static int OxmlTag ( Header  h,
HE_t  he 
)
static
static int OyamlTag ( Header  h,
HE_t  he 
)
static
static int parseExpression ( headerSprintfArgs  hsa,
sprintfToken  token,
char *  str,
char **  endPtr 
)
static

Parse a headerSprintf expression.

Parameters
hsaheaderSprintf args
token
str
Return values
*endPtr
Returns
0 on success

Definition at line 6142 of file hdrfmt.c.

References _, sprintfToken_s::cond, headerSprintfArgs_s::errmsg, findTag(), fprintf(), NULL, parseFormat(), PARSER_IN_EXPR, PTOK_COND, sprintfToken_s::type, sprintfToken_s::u, and void.

Referenced by parseFormat().

static int parseFormat ( headerSprintfArgs  hsa,
char *  str,
sprintfToken formatPtr,
size_t *  numTokensPtr,
char **  endPtr,
int  state 
)
static
static char* permsFormat ( HE_t  he,
const char **  av 
)
static

Format file permissions for display.

Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 686 of file hdrfmt.c.

References _, assert(), ix, _HE_s::ix, _HE_s::p, RPM_UINT64_TYPE, rpmPermsString(), _HE_s::t, rpmDataType_u::ui64p, val, and xstrdup().

static char* pgpsigFormat ( HE_t  he,
const char **  av 
)
static

Display signature fingerprint and time.

Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 1366 of file hdrfmt.c.

References _, assert(), dig, int, ix, _HE_s::ix, nb, NULL, _HE_s::p, pgpDigFree(), pgpDigNew(), pgpGetSignature(), pgpGrab(), PGPHASHALGO_MD5, PGPHASHALGO_SHA1, pgpHexStr(), pgpLen(), pgpPrtPkts(), PGPPUBKEYALGO_DSA, PGPPUBKEYALGO_RSA, PGPTAG_SIGNATURE, pkt, pktlen, RPM_BIN_TYPE, RPMVSF_DEFAULT, sigp, snprintf(), stpcpy(), _HE_s::t, t, tag, rpmDataType_u::ui8p, unsigned, val, void, xrealloc, and xstrdup().

static int pkgbaseurlTag ( Header  h,
HE_t  he 
)
static

Retrieve package baseurl from header.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 2464 of file hdrfmt.c.

References _HE_s::c, _HE_s::freeData, headerGet(), HEADERGET_NOEXTENSION, headerGetBaseURL(), NULL, _HE_s::p, rc, RPM_STRING_TYPE, RPMTAG_PACKAGEBASEURL, rpmDataType_u::str, _HE_s::t, _HE_s::tag, and xstrdup().

static int pkgdigestTag ( Header  h,
HE_t  he 
)
static

Retrieve package digest from header.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 2490 of file hdrfmt.c.

References _HE_s::c, digest, _HE_s::freeData, headerGetDigest(), NULL, _HE_s::p, rc, RPM_STRING_TYPE, RPMTAG_PACKAGEDIGEST, rpmDataType_u::str, _HE_s::t, _HE_s::tag, and xstrdup().

static int pkgmtimeTag ( Header  h,
HE_t  he 
)
static

Retrieve *.rpm package st->st_mtime from header.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 2514 of file hdrfmt.c.

References _HE_s::c, _HE_s::freeData, headerGetStatbuf(), _HE_s::p, RPM_UINT64_TYPE, RPMTAG_PACKAGETIME, st, _HE_s::t, _HE_s::tag, rpmDataType_u::ui64p, and xmalloc.

static int pkgoriginTag ( Header  h,
HE_t  he 
)
static

Retrieve package origin from header.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 2438 of file hdrfmt.c.

References _HE_s::c, _HE_s::freeData, headerGet(), HEADERGET_NOEXTENSION, headerGetOrigin(), NULL, _HE_s::p, rc, RPM_STRING_TYPE, RPMTAG_PACKAGEORIGIN, rpmDataType_u::str, _HE_s::t, _HE_s::tag, and xstrdup().

static int pkgsizeTag ( Header  h,
HE_t  he 
)
static

Retrieve *.rpm package st->st_size from header.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 2535 of file hdrfmt.c.

References _HE_s::c, _HE_s::freeData, headerGetStatbuf(), _HE_s::p, RPM_UINT64_TYPE, RPMTAG_PACKAGESIZE, st, _HE_s::t, _HE_s::tag, rpmDataType_u::ui64p, and xmalloc.

static int pkguuidTag ( Header  h,
HE_t  he 
)
static

Retrieve pkgid and convert to UUIDv5.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 1935 of file hdrfmt.c.

References RPMTAG_PKGID, _HE_s::tag, and tag2uuidv5().

static int PRCOSkip ( rpmTag  tag,
rpmTagData  N,
rpmTagData  EVR,
rpmTagData  F,
uint32_t  i 
)
static

Definition at line 3358 of file hdrfmt.c.

References rpmDataType_u::argv, assert(), b, NULL, rc, RPMTAG_REQUIRENAME, strcmp(), and rpmDataType_u::ui32p.

Referenced by PRCOsqlTag(), PRCOxmlTag(), and PRCOyamlTag().

static int PRCOsqlTag ( Header  h,
HE_t  he,
rpmTag  EVRtag,
rpmTag  Ftag 
)
static
static int PRCOxmlTag ( Header  h,
HE_t  he,
rpmTag  EVRtag,
rpmTag  Ftag 
)
static
static int PRCOyamlTag ( Header  h,
HE_t  he,
rpmTag  EVRtag,
rpmTag  Ftag 
)
static
static int PsqlTag ( Header  h,
HE_t  he 
)
static
static int PxmlTag ( Header  h,
HE_t  he 
)
static
static int PyamlTag ( Header  h,
HE_t  he 
)
static
static char* realDateFormat ( HE_t  he,
const char **  av,
const char *  strftimeFormat 
)
static

Return strftime formatted data.

Parameters
hetag container
avparameter list (or NULL)
strftimeFormatstrftime(3) format
Returns
formatted string

Definition at line 202 of file hdrfmt.c.

References _, buf, _HE_s::p, RPM_UINT64_TYPE, _HE_s::t, rpmDataType_u::ui64p, val, void, and xstrdup().

Referenced by dateFormat(), and dayFormat().

static int removetid_uuidTag ( Header  h,
HE_t  he 
)
static

Retrieve remove tid and convert to UUIDv1.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 1804 of file hdrfmt.c.

References RPMTAG_REMOVETID, _HE_s::tag, and tag2uuidv1().

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

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

Parameters
fpfile handle to use for display (NULL uses stdout)
_rpmTagTablerpm tag table (NULL uses rpmTagTable)
_rpmHeaderFormatsrpm tag extensions & formats (NULL uses headerCompoundFormats)

Definition at line 5301 of file hdrfmt.c.

References _rpmHeaderFormats, extNum, fprintf(), 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, t, and tagValue().

Referenced by rpmcliAllArgCallback().

static void rpmfiBuildFNames ( Header  h,
rpmTag  tagN,
const char ***  fnp,
rpmTagCount fcp 
)
static

Retrieve file names from header.

The representation of file names in package headers changed in rpm-4.0. Originally, file names were stored as an array of absolute paths. In rpm-4.0, file names are stored as separate arrays of dirname's and basename's, * with a dirname index to associate the correct dirname with each basename.

This function is used to retrieve file names independent of how the file names are represented in the package header.

Parameters
hheader
tagNRPMTAG_BASENAMES | PMTAG_ORIGBASENAMES
Return values
*fnparray of file names
*fcpnumber of files

Definition at line 2634 of file hdrfmt.c.

References _free(), alloca(), rpmDataType_u::argv, _HE_s::c, count, for(), headerGet(), headerIsEntry(), i, if(), memset(), NULL, _HE_s::p, rpmDataType_u::ptr, RPMTAG_ARCH, RPMTAG_BASENAMES, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, RPMTAG_OLDFILENAMES, RPMTAG_ORIGBASENAMES, RPMTAG_ORIGDIRINDEXES, RPMTAG_ORIGDIRNAMES, RPMTAG_SOURCERPM, size, stpcpy(), t, _HE_s::tag, rpmDataType_u::ui32p, unsigned, urlPath(), void, xcalloc(), xmalloc, and xx.

Referenced by _fnTag().

static HE_t rpmheClean ( HE_t  he)
static

Clean a tag container, free'ing attached malloc's.

Parameters
hetag container

Definition at line 5498 of file hdrfmt.c.

References _free(), _HE_s::freeData, memset(), _HE_s::p, and rpmDataType_u::ptr.

Referenced by formatValue(), getExtension(), hsaNext(), if(), and singleSprintf().

static char* rpmPermsString ( int  mode)
static

Definition at line 601 of file hdrfmt.c.

References S_ISLNK, S_ISSOCK, and xstrdup().

static char* rpnFormat ( HE_t  he,
const char **  av 
)
static

Return arithmetic expressions of input.

Parameters
hetag container
avparameter list (NULL uses sha1)
Returns
formatted string

Definition at line 4935 of file hdrfmt.c.

References _, ac, alloca(), argvCount(), _HE_s::c, exit, i, int, intFormat(), ix, len, memset(), NULL, _HE_s::p, RPM_STRING_TYPE, RPM_UINT64_TYPE, rpmDataType_u::str, _HE_s::t, _HE_s::tag, rpmDataType_u::ui64p, val, xisdigit(), and xstrdup().

static int RsqlTag ( Header  h,
HE_t  he 
)
static
static int RxmlTag ( Header  h,
HE_t  he 
)
static
static int RyamlTag ( Header  h,
HE_t  he 
)
static
static char* shescapeFormat ( HE_t  he,
const char **  av 
)
static

Return shell escape formatted data.

Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 258 of file hdrfmt.c.

References _, c, nb, _HE_s::p, RPM_STRING_TYPE, RPM_UINT32_TYPE, RPM_UINT64_TYPE, s, snprintf(), rpmDataType_u::str, _HE_s::t, t, rpmDataType_u::ui32p, rpmDataType_u::ui64p, val, xmalloc, xstrdup(), and xx.

static char* singleSprintf ( headerSprintfArgs  hsa,
sprintfToken  token,
size_t  element 
)
static
static int sourcepkguuidTag ( Header  h,
HE_t  he 
)
static

Retrieve sourcepkgid and convert to UUIDv5.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 1949 of file hdrfmt.c.

References RPMTAG_SOURCEPKGID, _HE_s::tag, and tag2uuidv5().

static char* spewescapeFormat ( HE_t  he,
const char **  av,
spew_t  spew,
int  lvl 
)
static

Encode string for use by SQL/JSON markup.

Parameters
hetag container
avparameter list (or NULL)
spewspew primitives
lvlindentation level
Returns
formatted string

Definition at line 3539 of file hdrfmt.c.

References _, _free(), assert(), ix, _HE_s::ix, nb, NULL, _HE_s::p, RPM_STRING_TYPE, spew_s::spew_strcpy, spew_s::spew_strlen, rpmDataType_u::str, strdup_iconv_check(), _HE_s::t, t, val, xmalloc, and xstrdup().

Referenced by jsonescapeFormat(), and sqlescapeFormat().

static char* sqlescapeFormat ( HE_t  he,
const char **  av 
)
static

Definition at line 3570 of file hdrfmt.c.

References spewescapeFormat().

static char* sqlstrcpy ( char *  t,
const char *  s,
int  lvl 
)
static

Copy source string to target, doubling single quotes.

Parameters
ttarget sql string
ssource string
lvlindentation level
Returns
target sql string

Definition at line 572 of file hdrfmt.c.

References c, t, and te.

static size_t sqlstrlen ( const char *  s,
int  lvl 
)
static

Return length of string represented with single quotes doubled.

Parameters
sstring
lvlindentation level
Returns
length of sql string

Definition at line 550 of file hdrfmt.c.

References c, and len.

static char* statFormat ( HE_t  he,
const char **  av 
)
static
static int str2uuid ( HE_t  he,
const char **  av,
rpmuint32_t  version,
char *  val 
)
static

Convert tag string to UUID.

Parameters
hetag container
avparameter list (or NULL)
versionUUID version
Return values
valUUID string
Returns
0 on success

Definition at line 1843 of file hdrfmt.c.

References _free(), alloca(), assert(), _HE_s::c, _HE_s::freeData, ns, NULL, _HE_s::p, rpmDataType_u::ptr, rc, RPM_BIN_TYPE, RPM_STRING_TYPE, rpmGetPath(), rpmuuidMake(), rpmDataType_u::str, strcmp(), _HE_s::t, _HE_s::tag, tagName(), rpmDataType_u::ui8p, uuid_ns, uuid_version, and xcalloc().

Referenced by tag2uuidv5(), and uuidFormat().

static char* strdup_iconv_check ( const char *  buffer,
const char *  tocode 
)
static
static char* strsubFormat ( HE_t  he,
const char **  av 
)
static

Replace string values.

Parameters
hetag container
avparameter list (NULL is an error)
Returns
formatted string

Definition at line 5033 of file hdrfmt.c.

References _, _free(), ac, argvCount(), exit, i, mireAppend(), mireFreeAll(), mireRegexec(), mireSetEOptions(), nb, NULL, _HE_s::p, RPM_STRING_TYPE, rpmExpand(), RPMMIRE_REGEX, s, se, stpcpy(), stpncpy(), rpmDataType_u::str, _HE_s::t, t, te, val, xmalloc, xstrdup(), and xx.

static int summaryTag ( Header  h,
HE_t  he 
)
static

Retrieve summary text.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 2326 of file hdrfmt.c.

References i18nTag(), RPMTAG_SUMMARY, and _HE_s::tag.

static int tag2uuidv1 ( Header  h,
HE_t  he 
)
static

Retrieve time and convert to UUIDv1.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 1728 of file hdrfmt.c.

References _free(), _HE_s::c, headerGet(), _HE_s::p, rpmDataType_u::ptr, tv2uuidv1(), and rpmDataType_u::ui32p.

Referenced by buildtime_uuidTag(), installtid_uuidTag(), installtime_uuidTag(), origintid_uuidTag(), origintime_uuidTag(), and removetid_uuidTag().

static int tag2uuidv5 ( Header  h,
HE_t  he 
)
static

Retrieve tag and convert to UUIDv5.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 1895 of file hdrfmt.c.

References _free(), assert(), _HE_s::c, _HE_s::freeData, headerGet(), i, int, NULL, _HE_s::p, rpmDataType_u::ptr, RPM_BIN_TYPE, RPM_STRING_TYPE, str2uuid(), _HE_s::t, t, te, rpmDataType_u::ui8p, and xmalloc.

Referenced by hdruuidTag(), pkguuidTag(), and sourcepkguuidTag().

static int triggercondsTag ( Header  h,
HE_t  he 
)
static
static char* triggertypeFormat ( HE_t  he,
const char **  av 
)
static

Identify type of trigger.

Parameters
hetag container
avparameter list (or NULL)
Returns
formatted string

Definition at line 655 of file hdrfmt.c.

References _, assert(), ix, _HE_s::ix, _HE_s::p, RPM_UINT64_TYPE, _HE_s::t, rpmDataType_u::ui64p, val, and xstrdup().

static int triggertypeTag ( Header  h,
HE_t  he 
)
static

Retrieve trigger type info.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 2075 of file hdrfmt.c.

References _free(), alloca(), rpmDataType_u::argv, _HE_s::c, exit, flags, _HE_s::freeData, headerGet(), i, j, memset(), NULL, _HE_s::p, rpmDataType_u::ptr, rc, RPM_STRING_ARRAY_TYPE, RPMTAG_TRIGGERFLAGS, RPMTAG_TRIGGERINDEX, RPMTAG_TRIGGERSCRIPTS, _HE_s::t, _HE_s::tag, rpmDataType_u::ui32p, unsigned, xmalloc, xstrdup(), and xx.

static int tv2uuidv1 ( Header  h,
HE_t  he,
struct timeval *  tv 
)
static

Convert unix timeval to UUIDv1.

Parameters
hheader
Return values
*hetag container
Parameters
tvunix timeval
Returns
0 on success

Definition at line 1685 of file hdrfmt.c.

References _free(), _HE_s::c, _HE_s::freeData, NULL, _HE_s::p, rpmDataType_u::ptr, RPM_BIN_TYPE, rpmuuidMake(), _HE_s::t, rpmDataType_u::ui8p, and xcalloc().

Referenced by tag2uuidv1(), and uuidFormat().

static char* uuidFormat ( HE_t  he,
const char **  av 
)
static
static int whatneedsTag ( Header  h,
HE_t  he 
)
static
static int wnlookupTag ( Header  h,
rpmTag  tagNVRA,
ARGV_t avp,
ARGI_t hitp,
HE_t  PNhe,
HE_t  PEVRhe,
HE_t  PFhe 
)
static
static char* xmlFormat ( HE_t  he,
const char **  av 
)
static
static char* xmlstrcpy ( char *  t,
const char *  s,
int  lvl 
)
static

Copy source string to target, substituting for xml characters.

Parameters
ttarget xml string
ssource string
lvlindentation level
Returns
target xml string

Definition at line 374 of file hdrfmt.c.

References c, stpcpy(), t, and te.

static size_t xmlstrlen ( const char *  s,
int  lvl 
)
static

Return length of string represented with xml characters substituted.

Parameters
sstring
lvlindentation level
Returns
length of xml string

Definition at line 350 of file hdrfmt.c.

References c, and len.

static char* yamlFormat ( HE_t  he,
const char **  av 
)
static
static char* yamlstrcpy ( char *  t,
const char *  s,
int  lvl 
)
static

Copy source string to target, indenting for yaml.

Parameters
ttarget yaml string
ssource string
lvlindentation level
Returns
target yaml string

Definition at line 437 of file hdrfmt.c.

References c, i, indent, int, t, and te.

static size_t yamlstrlen ( const char *  s,
int  lvl 
)
static

Return length of string represented with yaml indentation.

Parameters
sstring
lvlindentation level
Returns
length of yaml string

Definition at line 410 of file hdrfmt.c.

References c, indent, int, and len.

Variable Documentation

int _hdrqf_debug

Definition at line 69 of file hdrfmt.c.

struct headerSprintfExtension_s _headerCompoundFormats[]
static

Definition at line 5133 of file hdrfmt.c.

struct headerSprintfExtension_s _headerDefaultFormats[]
static
Initial value:
= {
{ HEADER_EXT_FORMAT, "octal",
{ .fmtFunction = octFormat } },
{ HEADER_EXT_FORMAT, "oct",
{ .fmtFunction = octFormat } },
{ HEADER_EXT_FORMAT, "hex",
{ .fmtFunction = hexFormat } },
{ HEADER_EXT_FORMAT, "decimal",
{ .fmtFunction = decFormat } },
{ HEADER_EXT_FORMAT, "dec",
{ .fmtFunction = decFormat } },
{ HEADER_EXT_FORMAT, "date",
{ .fmtFunction = dateFormat } },
{ HEADER_EXT_FORMAT, "day",
{ .fmtFunction = dayFormat } },
{ HEADER_EXT_FORMAT, "shescape",
{ .fmtFunction = shescapeFormat } },
{ HEADER_EXT_LAST, NULL, { NULL } }
}
static char * dayFormat(HE_t he, const char **av)
Return day formatted data.
Definition: hdrfmt.c:246
static char * octFormat(HE_t he, const char **av)
Return octal formatted data.
Definition: hdrfmt.c:165
static char * dateFormat(HE_t he, const char **av)
Return date formatted data.
Definition: hdrfmt.c:234
static char * decFormat(HE_t he, const char **av)
Return decimal formatted data.
Definition: hdrfmt.c:189
return NULL
Definition: poptALL.c:613
static char * hexFormat(HE_t he, const char **av)
Return hex formatted data.
Definition: hdrfmt.c:177
static char * shescapeFormat(HE_t he, const char **av)
Return shell escape formatted data.
Definition: hdrfmt.c:258

Definition at line 308 of file hdrfmt.c.

const char* _iconv_fromcode = NULL
static

Definition at line 878 of file hdrfmt.c.

Referenced by strdup_iconv_check().

const char* _iconv_tocode = "UTF-8"
static

Definition at line 876 of file hdrfmt.c.

Referenced by strdup_iconv_check().

struct spew_s _json_spew
static
Initial value:
= {
.spew_name = "json",
.spew_init = "db.%{?__mongodb_collection}%{!?__mongodb_collection:packages}.save({\n",
.spew_fini = "});\n",
.spew_strlen = jsonstrlen,
.spew_strcpy = jsonstrcpy
}
static char * jsonstrcpy(char *t, const char *s, int lvl)
Copy source string to target, doubling single quotes.
Definition: hdrfmt.c:508
static size_t jsonstrlen(const char *s, int lvl)
Return length of string represented with single quotes doubled.
Definition: hdrfmt.c:479

Definition at line 533 of file hdrfmt.c.

Referenced by jsonFormat().

const char* _macro_i18ndomains = "%{?_i18ndomains}"
static

Definition at line 2157 of file hdrfmt.c.

struct spew_s _sql_spew
static
Initial value:
= {
.spew_name = "sql",
.spew_init = "",
.spew_fini = "",
.spew_strlen = sqlstrlen,
.spew_strcpy = sqlstrcpy
}
static char * sqlstrcpy(char *t, const char *s, int lvl)
Copy source string to target, doubling single quotes.
Definition: hdrfmt.c:572
static size_t sqlstrlen(const char *s, int lvl)
Return length of string represented with single quotes doubled.
Definition: hdrfmt.c:550

Definition at line 590 of file hdrfmt.c.

struct spew_s _xml_spew
static
Initial value:
= {
.spew_name = "xml",
.spew_init = "<rpmHeader>\n",
.spew_fini = "</rpmHeader>\n",
.spew_strlen = xmlstrlen,
.spew_strcpy = xmlstrcpy
}
static size_t xmlstrlen(const char *s, int lvl)
Return length of string represented with xml characters substituted.
Definition: hdrfmt.c:350
static char * xmlstrcpy(char *t, const char *s, int lvl)
Copy source string to target, substituting for xml characters.
Definition: hdrfmt.c:374

Definition at line 394 of file hdrfmt.c.

Referenced by bncdataFormat(), cdataFormat(), FDGxmlTag(), PRCOxmlTag(), and xmlFormat().

struct spew_s _yaml_spew
static
Initial value:
= {
.spew_name = "yaml",
.spew_init = "- !!omap\n",
.spew_fini = "\n",
.spew_strlen = yamlstrlen,
.spew_strcpy = yamlstrcpy
}
static size_t yamlstrlen(const char *s, int lvl)
Return length of string represented with yaml indentation.
Definition: hdrfmt.c:410
static char * yamlstrcpy(char *t, const char *s, int lvl)
Copy source string to target, indenting for yaml.
Definition: hdrfmt.c:437

Definition at line 463 of file hdrfmt.c.

Referenced by FDGyamlTag(), PRCOyamlTag(), and yamlFormat().

return ec = (HE_t) xcalloc(extNum+1, sizeof(*ec))
int extNum = 0

Definition at line 6711 of file hdrfmt.c.

Referenced by addRpmTags(), findTag(), headerGet(), and rpmDisplayQueryTags().

format = _free(format)

Definition at line 5560 of file hdrfmt.c.

Referenced by parseFormat().

HE_t
static
Initial value:
{
struct headerSprintfExtension_s * headerSprintfExtension
Definition: rpmtag.h:134

Create an extension cache.

Destroy an extension cache.

Parameters
extsheaderSprintf extensions
Return values
*necpno. of elements (or NULL)
Returns
new extension cache
Parameters
extsheaderSprintf extensions
ecextension cache
Returns
NULL always

Definition at line 6708 of file hdrfmt.c.

int
static
Initial value:
{
return strcmp(((KEY *)a)->name, ((KEY *)b)->name)
Definition: db3.c:181
return strcmp(ame->name, bme->name)
static const char * name
char * b
Definition: macro.c:746

Definition at line 4570 of file hdrfmt.c.

KEY keyDigests[]
static
Initial value:
= {
{ "adler32", PGPHASHALGO_ADLER32 },
{ "crc32", PGPHASHALGO_CRC32 },
{ "crc64", PGPHASHALGO_CRC64 },
{ "haval160", PGPHASHALGO_HAVAL_5_160 },
{ "jlu32", PGPHASHALGO_JLU32 },
{ "md2", PGPHASHALGO_MD2 },
{ "md4", PGPHASHALGO_MD4 },
{ "md5", PGPHASHALGO_MD5 },
{ "rmd128", PGPHASHALGO_RIPEMD128 },
{ "rmd160", PGPHASHALGO_RIPEMD160 },
{ "rmd256", PGPHASHALGO_RIPEMD256 },
{ "rmd320", PGPHASHALGO_RIPEMD320 },
{ "salsa10", PGPHASHALGO_SALSA10 },
{ "salsa20", PGPHASHALGO_SALSA20 },
{ "sha1", PGPHASHALGO_SHA1 },
{ "sha224", PGPHASHALGO_SHA224 },
{ "sha256", PGPHASHALGO_SHA256 },
{ "sha384", PGPHASHALGO_SHA384 },
{ "sha512", PGPHASHALGO_SHA512 },
{ "tiger192", PGPHASHALGO_TIGER192 },
}

Definition at line 4430 of file hdrfmt.c.

KEY keyStat[]
static

Definition at line 4486 of file hdrfmt.c.

KEY keyUuids[]
static
Initial value:
= {
{ "v1", UUID_KEYS_V1 },
{ "v3", UUID_KEYS_V3 },
{ "v4", UUID_KEYS_V4 },
{ "v5", UUID_KEYS_V5 },
}

Definition at line 4550 of file hdrfmt.c.

return keyval

Definition at line 4588 of file hdrfmt.c.

Referenced by rpmtsEraseDebuginfo().

const char* language = "LANGUAGE"
static

Definition at line 2154 of file hdrfmt.c.

* necp = extNum

Definition at line 6720 of file hdrfmt.c.

size_t nkeyDigests = sizeof(keyDigests) / sizeof(keyDigests[0])
static

Definition at line 4453 of file hdrfmt.c.

size_t nkeyStat = sizeof(keyStat) / sizeof(keyStat[0])
static

Definition at line 4530 of file hdrfmt.c.

size_t nkeyUuids = sizeof(keyUuids) / sizeof(keyUuids[0])
static

Definition at line 4563 of file hdrfmt.c.

return NULL

Definition at line 5561 of file hdrfmt.c.

rpmuint32_t
static
Initial value:
{
unsigned int rpmuint32_t
Definition: rpmiotypes.h:28
return keyval
Definition: hdrfmt.c:4588

Definition at line 4579 of file hdrfmt.c.

const char uuid_auth[] = "%{?_uuid_auth}%{!?_uuid_auth:http://rpm5.org}"
static

Definition at line 1829 of file hdrfmt.c.

const char uuid_ns[] = "ns:URL"
static

Definition at line 1827 of file hdrfmt.c.

Referenced by doFoo(), rpmuuidMake(), and str2uuid().

const char uuid_path[] = "%{?_uuid_path}%{!?_uuid_path:/package}"
static

Definition at line 1831 of file hdrfmt.c.

rpmuint32_t uuid_version = 5
static

Definition at line 1833 of file hdrfmt.c.

Referenced by doFoo(), and str2uuid().