Data Structures | Files | Functions | Variables

# RPMCLI.

## Data Structures
struct | rpmQVKArguments_s
| Command line option information. More...
struct | rpmBuildArguments_s
| Describe build command line request. More...
## Files
file | poptBT.c

| Popt tables for build modes.
file | manifest.c
file | poptALL.c

| Popt tables for all rpm modes.
file | poptI.c

| Popt tables for install modes.
file | poptQV.c

| Popt tables for query/verify modes.
file | query.c

| Display tag values from package metadata.
file | rpmchecksig.c

| Verify the signature of a package.
file | rpmcli.h
file | rpminstall.c
file | rpmlib.h

| In Memoriam: Steve Taylor <staylor@redhat.com> was here, now he's not.
file | rpmrollback.c
file | verify.c

| Verify installed payload files from package metadata.
file | poptDB.c

| Popt tables for database modes.
## Functions
static int | checkSpec (rpmts ts, Header h)
| Parse spec file and build package.
static int | rpmReSign (rpmts ts, QVA_t qva, const char **argv)
| Create/modify elements in signature header.
static int | rpmcliImportPubkeys (const rpmts ts, QVA_t qva, const char **argv)
| Import public key(s).
rpmRC | rpmtsImportPubkey (const rpmts ts, const unsigned char *pkt, ssize_t pktlen)
| Import public key packet(s).
## Variables
int | _noDirTokens
| Should version 3 packages be produced?
struct poptOption | rpmcliAllPoptTable []
| Popt option table for options shared by all modes and executables.
struct rpmQVKArguments_s | rpmQVKArgs
struct rpmQVKArguments_s | rpmIArgs
struct rpmQVKArguments_s | rpmDBArgs
## RPMQV
enum | rpmQVSources_e { RPMQV_PACKAGE = 0, RPMQV_PATH, RPMQV_ALL, RPMQV_RPM, RPMQV_GROUP, RPMQV_WHATPROVIDES, RPMQV_WHATREQUIRES, RPMQV_TRIGGEREDBY, RPMQV_DBOFFSET, RPMQV_SPECFILE, RPMQV_PKGID, RPMQV_HDRID, RPMQV_FILEID, RPMQV_TID, RPMQV_HDLIST, RPMQV_FTSWALK, RPMQV_WHATNEEDS, RPMQV_SPECSRPM, RPMQV_SOURCEPKGID }
| Query/Verify argument qualifiers. More...
enum | rpmVerifyAttrs_e { RPMVERIFY_NONE = 0, RPMVERIFY_FDIGEST = (1 << 0), RPMVERIFY_FILESIZE = (1 << 1), RPMVERIFY_LINKTO = (1 << 2), RPMVERIFY_USER = (1 << 3), RPMVERIFY_GROUP = (1 << 4), RPMVERIFY_MTIME = (1 << 5), RPMVERIFY_MODE = (1 << 6), RPMVERIFY_RDEV = (1 << 7), RPMVERIFY_CONTEXTS = (1 << 15), RPMVERIFY_READLINKFAIL = (1 << 28), RPMVERIFY_READFAIL = (1 << 29), RPMVERIFY_LSTATFAIL = (1 << 30), RPMVERIFY_LGETFILECONFAIL = (1 << 31) }
| Bit(s) for rpmVerifyFile() attributes and result. More...
enum | rpmQueryFlags_e { QUERY_FOR_DEFAULT = 0, QUERY_FDIGEST = (1 << 0), QUERY_SIZE = (1 << 1), QUERY_LINKTO = (1 << 2), QUERY_USER = (1 << 3), QUERY_GROUP = (1 << 4), QUERY_MTIME = (1 << 5), QUERY_MODE = (1 << 6), QUERY_RDEV = (1 << 7), QUERY_CONTEXTS = (1 << 15), QUERY_FILES = (1 << 16), QUERY_DEPS = (1 << 17), QUERY_SCRIPT = (1 << 18), QUERY_DIGEST = (1 << 19), QUERY_SIGNATURE = (1 << 20), QUERY_PATCHES = (1 << 21), QUERY_HDRCHK = (1 << 22), QUERY_FOR_LIST = (1 << 23), QUERY_FOR_STATE = (1 << 24), QUERY_FOR_DOCS = (1 << 25), QUERY_FOR_CONFIG = (1 << 26), QUERY_FOR_DUMPFILES = (1 << 27) }
| Bit(s) to control rpmQuery() operation, stored in qva_flags. More...
enum | rpmVerifyFlags_e { VERIFY_DEFAULT = 0, VERIFY_FDIGEST = (1 << 0), VERIFY_SIZE = (1 << 1), VERIFY_LINKTO = (1 << 2), VERIFY_USER = (1 << 3), VERIFY_GROUP = (1 << 4), VERIFY_MTIME = (1 << 5), VERIFY_MODE = (1 << 6), VERIFY_RDEV = (1 << 7), VERIFY_CONTEXTS = (1 << 15), VERIFY_FILES = (1 << 16), VERIFY_DEPS = (1 << 17), VERIFY_SCRIPT = (1 << 18), VERIFY_DIGEST = (1 << 19), VERIFY_SIGNATURE = (1 << 20), VERIFY_PATCHES = (1 << 21), VERIFY_HDRCHK = (1 << 22), VERIFY_FOR_LIST = (1 << 23), VERIFY_FOR_STATE = (1 << 24), VERIFY_FOR_DOCS = (1 << 25), VERIFY_FOR_CONFIG = (1 << 26), VERIFY_FOR_DUMPFILES = (1 << 27) }
| Bit(s) to control rpmVerify() operation, stored in qva_flags. More...
typedef enum rpmQVSources_e | rpmQVSources
| Query/Verify argument qualifiers.
typedef enum rpmVerifyAttrs_e | rpmVerifyAttrs
| Bit(s) for rpmVerifyFile() attributes and result.
typedef enum rpmQueryFlags_e | rpmQueryFlags
| Bit(s) to control rpmQuery() operation, stored in qva_flags.
typedef enum rpmVerifyFlags_e | rpmVerifyFlags
| Bit(s) to control rpmVerify() operation, stored in qva_flags.
typedef struct rpmQVKArguments_s * | QVA_t
typedef int(* | QVF_t )(QVA_t qva, rpmts ts, Header h)
| Function to display iterator matches.
typedef int(* | QSpecF_t )(rpmts ts, QVA_t qva, const char *arg)
| Function to query spec file.
rpmQueryFlags | rpmcliQueryFlags
| Bit(s) from common command line options.
struct poptOption | rpmQVSourcePoptTable []
| Common query/verify mode options.
int | specedit
struct poptOption | rpmQueryPoptTable []
| Query mode options.
struct poptOption | rpmVerifyPoptTable []
| Verify mode options.
int | rpmcliShowMatches (QVA_t qva, rpmts ts)
| Display query/verify information for each header in iterator.
int | rpmQueryVerify (QVA_t qva, rpmts ts, const char *arg)
| Common query/verify source interface, called once for each CLI arg.
int | showQueryPackage (QVA_t qva, rpmts ts, Header h)
| Display results of package query.
int | rpmcliArgIter (rpmts ts, QVA_t qva, ARGV_t argv)
| Iterate over query/verify arg list.
int | rpmcliQuery (rpmts ts, QVA_t qva, const char **argv)
| Display package information.
int | rpmVerifyFile (const rpmts ts, rpmfi fi, rpmVerifyAttrs *res, rpmVerifyAttrs omitMask)
| Verify file attributes (including file digest).
int | showVerifyPackage (QVA_t qva, rpmts ts, Header h)
| Display results of package verify.
int | rpmcliVerify (rpmts ts, QVA_t qva, const char **argv)
| Verify package install.
## RPMEIU
enum | rpmInstallInterfaceFlags_e { INSTALL_NONE = 0, INSTALL_PERCENT = (1 << 0), INSTALL_HASH = (1 << 1), INSTALL_NODEPS = (1 << 2), INSTALL_NOORDER = (1 << 3), INSTALL_LABEL = (1 << 4), INSTALL_UPGRADE = (1 << 5), INSTALL_FRESHEN = (1 << 6), INSTALL_INSTALL = (1 << 7), INSTALL_ERASE = (1 << 8), INSTALL_ALLMATCHES = (1 << 9) }
| Bit(s) to control rpmcliInstall() and rpmErase() operation. More...
typedef enum rpmInstallInterfaceFlags_e | rpmInstallInterfaceFlags
| Bit(s) to control rpmcliInstall() and rpmErase() operation.
typedef struct IDT_s * | IDT
| A rollback transaction id element.
typedef struct IDTindex_s * | IDTX
| A rollback transaction id index.
struct poptOption | rpmInstallPoptTable []
int | rpmcliPackagesTotal
int | rpmcliHashesCurrent
int | rpmcliHashesTotal
uint64_t | rpmcliProgressCurrent
uint64_t | rpmcliProgressTotal
void * | rpmShowProgress (const void *arg, const rpmCallbackType what, const uint64_t amount, const uint64_t total, fnpyKey key, void *data)
| The rpm CLI generic transaction callback handler.
int | rpmInstallSource (rpmts ts, const char *arg, const char **specFilePtr, const char **cookie)
| Install source rpm package.
int | rpmcliInstallProblems (rpmts ts, const char *msg, int rc)
| Report package problems (if any).
int | rpmcliInstallSuggests (rpmts ts)
| Report packages(if any) that satisfy unresolved dependencies.
int | rpmcliInstallCheck (rpmts ts)
| Check package element dependencies in a transaction set, reporting problems.
int | rpmcliInstallOrder (rpmts ts)
| Order package elements in a transaction set, reporting problems.
int | rpmcliInstallRun (rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
| Install/erase package elements in a transaction set, reporting problems.
int | rpmcliInstall (rpmts ts, QVA_t ia, const char **argv)
| Install/upgrade/freshen binary rpm package.
int | rpmErase (rpmts ts, QVA_t ia, const char **argv)
| Erase binary rpm package.
int | rpmRollback (rpmts ts, QVA_t ia, const char **argv)
| Rollback transactions, erasing new, reinstalling old, package(s).
IDTX | IDTXfree (IDTX idtx)
| Destroy id index.
IDTX | IDTXnew (void)
| Create id index.
IDTX | IDTXgrow (IDTX idtx, int need)
| Insure that index has room for "need" elements.
IDTX | IDTXsort (IDTX idtx)
| Sort tag (instance,value) pairs.
IDTX | IDTXload (rpmts ts, rpmTag tag, uint32_t rbtid)
| Load tag (instance,value) pairs from rpm databse, and return sorted id index.
IDTX | IDTXglob (rpmts ts, const char *globstr, rpmTag tag, uint32_t rbtid)
| Load tag (instance,value) pairs from packages, and return sorted id index.
## RPMK
enum | rpmSignFlags_e { RPMSIGN_NONE = 0, RPMSIGN_CHK_SIGNATURE = 'K', RPMSIGN_NEW_SIGNATURE = 'R', RPMSIGN_ADD_SIGNATURE = 'A', RPMSIGN_DEL_SIGNATURE = 'D', RPMSIGN_IMPORT_PUBKEY = 'I' }
| Bit(s) to control rpmReSign() operation. More...
typedef enum rpmSignFlags_e | rpmSignFlags
| Bit(s) to control rpmReSign() operation.
struct poptOption | rpmSignPoptTable []
| Signature mode options.
rpmRC | rpmcliImportPubkey (const rpmts ts, const unsigned char *pkt, ssize_t pktlen)
| Import public key packet(s).
int | rpmcliSign (rpmts ts, QVA_t qva, const char **argv)
| Create/Modify/Check elements from signature header.
## RPMBT
typedef struct rpmBuildArguments_s * | BTA_t
struct rpmBuildArguments_s | rpmBTArgs
struct poptOption | rpmBuildPoptTable []
## RPMDB
struct poptOption | rpmDatabasePoptTable []

## Typedef Documentation

typedef struct rpmBuildArguments_s* BTA_t

Definition at line 876 of file rpmcli.h.

typedef struct IDT_s* IDT

A rollback transaction id element.

Definition at line 587 of file rpmcli.h.

typedef struct IDTindex_s* IDTX

A rollback transaction id index.

Definition at line 605 of file rpmcli.h.

typedef int(* QSpecF_t)(rpmts ts, QVA_t qva, const char *arg)

Function to query spec file.

Parameters:

  ts | transaction set
  qva | parsed query/verify options
  arg | query argument

Returns:
  0 on success

Definition at line 273 of file rpmcli.h.

typedef struct rpmQVKArguments_s* QVA_t

Definition at line 251 of file rpmcli.h.

typedef int(* QVF_t)(QVA_t qva, rpmts ts, Header h)

Function to display iterator matches.

Parameters:

  qva | parsed query/verify options
  ts | transaction set
  h | header to use for query/verify

Returns:
  0 on success

Definition at line 261 of file rpmcli.h.

typedef enum rpmInstallInterfaceFlags_e rpmInstallInterfaceFlags

Bit(s) to control rpmcliInstall() and rpmErase() operation.

typedef enum rpmQueryFlags_e rpmQueryFlags

Bit(s) to control rpmQuery() operation, stored in qva_flags.

Todo:
  Merge rpmQueryFlags, rpmVerifyFlags, and rpmVerifyAttrs?.

typedef enum rpmQVSources_e rpmQVSources

Query/Verify argument qualifiers.

Todo:
  Reassign to tag values.

typedef enum rpmSignFlags_e rpmSignFlags

Bit(s) to control rpmReSign() operation.

typedef enum rpmVerifyAttrs_e rpmVerifyAttrs

Bit(s) for rpmVerifyFile() attributes and result.

typedef enum rpmVerifyFlags_e rpmVerifyFlags

Bit(s) to control rpmVerify() operation, stored in qva_flags.

Todo:
  Merge rpmQueryFlags, rpmVerifyFlags, and rpmVerifyAttrs values?.

## Enumeration Type Documentation

enum rpmInstallInterfaceFlags_e

Bit(s) to control rpmcliInstall() and rpmErase() operation.

Enumerator:

  INSTALL_NONE |
  INSTALL_PERCENT | from --percent
  INSTALL_HASH | from --hash
  INSTALL_NODEPS | from --nodeps
  INSTALL_NOORDER | from --noorder
  INSTALL_LABEL | from --verbose (notify)
  INSTALL_UPGRADE | from --upgrade
  INSTALL_FRESHEN | from --freshen
  INSTALL_INSTALL | from --install
  INSTALL_ERASE | from --erase
  INSTALL_ALLMATCHES | from --allmatches (erase)

Definition at line 435 of file rpmcli.h.

enum rpmQueryFlags_e

Bit(s) to control rpmQuery() operation, stored in qva_flags.

Todo:
  Merge rpmQueryFlags, rpmVerifyFlags, and rpmVerifyAttrs?.

Enumerator:

  QUERY_FOR_DEFAULT |
  QUERY_FDIGEST | from --nofdigest
  QUERY_SIZE | from --nosize
  QUERY_LINKTO | from --nolink
  QUERY_USER | from --nouser)
  QUERY_GROUP | from --nogroup)
  QUERY_MTIME | from --nomtime)
  QUERY_MODE | from --nomode)
  QUERY_RDEV | from --nodev
  QUERY_CONTEXTS | verify: from --nocontexts
  QUERY_FILES | verify: from --nofiles
  QUERY_DEPS | verify: from --nodeps
  QUERY_SCRIPT | verify: from --noscripts
  QUERY_DIGEST | verify: from --nodigest
  QUERY_SIGNATURE | verify: from --nosignature
  QUERY_PATCHES | verify: from --nopatches
  QUERY_HDRCHK | verify: from --nohdrchk
  QUERY_FOR_LIST | query: from --list
  QUERY_FOR_STATE | query: from --state
  QUERY_FOR_DOCS | query: from --docfiles
  QUERY_FOR_CONFIG | query: from --configfiles
  QUERY_FOR_DUMPFILES | query: from --dump

Definition at line 169 of file rpmcli.h.

enum rpmQVSources_e

Query/Verify argument qualifiers.

Todo:
  Reassign to tag values.

Enumerator:

  RPMQV_PACKAGE | ... from package name db search.
  RPMQV_PATH | ... from file path db search.
  RPMQV_ALL | ... from each installed package.
  RPMQV_RPM | ... from reading binary rpm package.
  RPMQV_GROUP | ... from group db search.
  RPMQV_WHATPROVIDES | ... from provides db search.
  RPMQV_WHATREQUIRES | ... from requires db search.
  RPMQV_TRIGGEREDBY | ... from trigger db search.
  RPMQV_DBOFFSET | ... from database header instance.
  RPMQV_SPECFILE | ... from spec file parse (query only).
  RPMQV_PKGID | ... from package id (header+payload MD5).
  RPMQV_HDRID | ... from header id (immutable header SHA1).
  RPMQV_FILEID | ... from file id (file digest, usually MD5).
  RPMQV_TID | ... from install transaction id (time stamp).
  RPMQV_HDLIST | ... from system hdlist.
  RPMQV_FTSWALK | ... from fts(3) walk.
  RPMQV_WHATNEEDS | ... from requires using contained provides.
  RPMQV_SPECSRPM | ... srpm from spec file parse (query only).
  RPMQV_SOURCEPKGID | ... from source package id (header+payload MD5).

Definition at line 116 of file rpmcli.h.

enum rpmSignFlags_e

Bit(s) to control rpmReSign() operation.

Enumerator:

  RPMSIGN_NONE |
  RPMSIGN_CHK_SIGNATURE | from --checksig
  RPMSIGN_NEW_SIGNATURE | from --resign
  RPMSIGN_ADD_SIGNATURE | from --addsign
  RPMSIGN_DEL_SIGNATURE | from --delsign
  RPMSIGN_IMPORT_PUBKEY | from --import

Definition at line 731 of file rpmcli.h.

enum rpmVerifyAttrs_e

Bit(s) for rpmVerifyFile() attributes and result.

Enumerator:

  RPMVERIFY_NONE |
  RPMVERIFY_FDIGEST | from verify(digest)
  RPMVERIFY_FILESIZE | from verify(size)
  RPMVERIFY_LINKTO | from verify(link)
  RPMVERIFY_USER | from verify(user)
  RPMVERIFY_GROUP | from verify(group)
  RPMVERIFY_MTIME | from verify(mtime)
  RPMVERIFY_MODE | from verify(mode)
  RPMVERIFY_RDEV | from verify(rdev)
  RPMVERIFY_CONTEXTS | verify: from --nocontexts
  RPMVERIFY_READLINKFAIL | readlink failed
  RPMVERIFY_READFAIL | file read failed
  RPMVERIFY_LSTATFAIL | lstat failed
  RPMVERIFY_LGETFILECONFAIL | lgetfilecon failed

Definition at line 141 of file rpmcli.h.

enum rpmVerifyFlags_e

Bit(s) to control rpmVerify() operation, stored in qva_flags.

Todo:
  Merge rpmQueryFlags, rpmVerifyFlags, and rpmVerifyAttrs values?.

Enumerator:

  VERIFY_DEFAULT |
  VERIFY_FDIGEST | from --nofdigest
  VERIFY_SIZE | from --nosize
  VERIFY_LINKTO | from --nolinkto
  VERIFY_USER | from --nouser
  VERIFY_GROUP | from --nogroup
  VERIFY_MTIME | from --nomtime
  VERIFY_MODE | from --nomode
  VERIFY_RDEV | from --nodev
  VERIFY_CONTEXTS | verify: from --nocontexts
  VERIFY_FILES | verify: from --nofiles
  VERIFY_DEPS | verify: from --nodeps
  VERIFY_SCRIPT | verify: from --noscripts
  VERIFY_DIGEST | verify: from --nodigest
  VERIFY_SIGNATURE | verify: from --nosignature
  VERIFY_PATCHES | verify: from --nopatches
  VERIFY_HDRCHK | verify: from --nohdrchk
  VERIFY_FOR_LIST | query: from --list
  VERIFY_FOR_STATE | query: from --state
  VERIFY_FOR_DOCS | query: from --docfiles
  VERIFY_FOR_CONFIG | query: from --configfiles
  VERIFY_FOR_DUMPFILES | query: from --dump

Definition at line 211 of file rpmcli.h.

## Function Documentation

static int checkSpec | ( | rpmts | ts,
|  | Header | h
| ) |  | `[static]`

Parse spec file and build package.

Definition at line 24 of file build.c.

References _free(), F_OK, RPMFILE_ICON, RPMFILE_PATCH, RPMFILE_SOURCE, and rpmGetPath().

IDTX IDTXfree | ( | IDTX | idtx ) |

Destroy id index.

Parameters:

  idtx | id index

Returns:
  NULL always

Definition at line 40 of file rpmrollback.c.

References _free(), IDT_s::h, headerFree(), IDTindex_s::idt, IDT_s::key, and IDTindex_s::nidt.

Referenced by rpmRollback(), rpmts_IDTXglob(), and rpmts_IDTXload().

IDTX IDTXglob | ( | rpmts | ts,
|  | const char * | globstr,
|  | rpmTag | tag,
|  | uint32_t | rbtid
| ) |  |

Load tag (instance,value) pairs from packages, and return sorted id index.

Parameters:

  ts | transaction set
  globstr | glob expression
  tag | rpm tag
  rbtid | rollback goal

Returns:
  id index

Definition at line 137 of file rpmrollback.c.

References _, _free(), alloca(), IDT_s::done, Fclose(), Ferror(), Fopen(), Fstrerror(), IDT_s::h, headerFree(), headerGet(), headerGetOrigin(), headerIsEntry(), headerLink(), IDTindex_s::idt, IDTXgrow(), IDTXsort(), IDT_s::instance, IDT_s::key, IDTindex_s::nidt, _HE_s::p, rpmDataType_u::ptr, rpmgiEscapeSpaces(), rpmGlob(), rpmlog(), RPMLOG_ERR, RPMRC_NOKEY, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadPackageFile(), _HE_s::tag, IDT_s::u32, rpmDataType_u::ui32p, and IDT_s::val.

Referenced by rpmRollback(), and rpmts_IDTXglob().

IDTX IDTXgrow | ( | IDTX | idtx,
|  | int | need
| ) |  |

Insure that index has room for "need" elements.

Parameters:

  idtx | id index
  need | additional no. of elements needed

Returns:
  id index (with room for "need" elements)

Definition at line 64 of file rpmrollback.c.

References IDTindex_s::alloced, IDTindex_s::delta, IDTindex_s::idt, IDTXnew(), IDTindex_s::nidt, IDTindex_s::size, and xrealloc().

Referenced by IDTXglob(), and IDTXload().

IDTX IDTXload | ( | rpmts | ts,
|  | rpmTag | tag,
|  | uint32_t | rbtid
| ) |  |

Load tag (instance,value) pairs from rpm databse, and return sorted id index.

Parameters:

  ts | transaction set
  tag | rpm tag
  rbtid | rollback goal

Returns:
  id index

Definition at line 88 of file rpmrollback.c.

References _free(), alloca(), IDT_s::done, IDT_s::h, headerGet(), headerLink(), IDTindex_s::idt, IDTXgrow(), IDTXsort(), IDT_s::instance, IDT_s::key, IDTindex_s::nidt, _HE_s::p, rpmDataType_u::ptr, rpmdbFreeIterator(), rpmdbGetIteratorOffset(), rpmdbNextIterator(), rpmdbSetIteratorRE(), rpmtsInitIterator(), _HE_s::tag, IDT_s::u32, rpmDataType_u::ui32p, and IDT_s::val.

Referenced by rpmRollback(), and rpmts_IDTXload().

IDTX IDTXnew | ( | void | ) |

Create id index.

Returns:
  new id index

Definition at line 56 of file rpmrollback.c.

References IDTindex_s::delta, IDTindex_s::size, and xcalloc().

Referenced by IDTXgrow().

IDTX IDTXsort | ( | IDTX | idtx ) |

Sort tag (instance,value) pairs.

Parameters:

  idtx | id index

Returns:
  id index

Definition at line 81 of file rpmrollback.c.

References IDTindex_s::idt, IDTintcmp(), IDTindex_s::nidt, and IDTindex_s::size.

Referenced by IDTXglob(), and IDTXload().

int rpmcliArgIter | ( | rpmts | ts,
|  | QVA_t | qva,
|  | ARGV_t | argv
| ) |  |

Iterate over query/verify arg list.

Parameters:

  ts | transaction set
  qva | parsed query/verify options
  argv | query argument(s) (or NULL)

Returns:
  0 on success, else no. of failures

Definition at line 704 of file query.c.

References FTS_COMFOLLOW, FTS_LOGICAL, FTS_NOSTAT, ftsOpts, giFlags, rpmQVKArguments_s::qva_gi, rpmQVKArguments_s::qva_rc, rpmQVKArguments_s::qva_source, RPMDBI_ARGLIST, RPMDBI_FTSWALK, RPMDBI_HDLIST, RPMDBI_LABEL, RPMDBI_PACKAGES, RPMGI_NOGLOB, RPMGI_NOHEADER, RPMGI_NONE, RPMGI_TSADD, rpmgiFree(), rpmgiGetFlags(), rpmgiHdrPath(), rpmgiNew(), rpmgiNext(), rpmgiSetArgs(), rpmQueryVerify(), RPMQV_ALL, RPMQV_FTSWALK, RPMQV_HDLIST, RPMQV_RPM, RPMRC_NOTFOUND, RPMRC_OK, and rpmtsEmpty().

Referenced by rpmcliQuery(), and rpmcliVerify().

rpmRC rpmcliImportPubkey | ( | const rpmts | ts,
|  | const unsigned char * | pkt,
|  | ssize_t | pktlen
| ) |  |

Import public key packet(s).

Todo:
  Implicit --update policy for gpg-pubkey headers.

Parameters:

  ts | transaction set
  pkt | pgp pubkey packet(s)
  pktlen | pgp pubkey length

Returns:
  RPMRC_OK/RPMRC_FAIL

Definition at line 464 of file rpmchecksig.c.

References _free(), alloca(), _HE_s::append, rpmDataType_u::argv, _HE_s::c, headerAddI18NString(), headerFree(), headerNew(), headerPut(), headerSprintf(), _HE_s::p, pgpDigFree(), pgpDigNew(), pgpGetPubkey(), pgpHexStr(), pgpPrtPkts(), rpmDataType_u::ptr, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, RPM_UINT32_TYPE, rpmdbAdd(), rpmHeaderFormats, RPMRC_FAIL, RPMRC_OK, RPMSENSE_EQUAL, rpmtsGetRdb(), rpmtsGetTid(), rpmtsOpenDB(), RPMVERSION, stpcpy(), rpmDataType_u::str, _HE_s::t, _HE_s::tag, rpmDataType_u::ui32p, and xmalloc().

Referenced by rpmcliImportPubkeys().

static int rpmcliImportPubkeys | ( | const rpmts | ts,
|  | QVA_t | qva,
|  | const char ** | argv
| ) |  | `[static]`

Import public key(s).

Todo:
  Implicit --update policy for gpg-pubkey headers.

Parameters:

  ts | transaction set
  qva | mode flags and parameters
  argv | array of pubkey file names (NULL terminated)

Returns:
  0 on success

Definition at line 702 of file rpmchecksig.c.

References _, _free(), pgpReadPkts(), rpmcliImportPubkey(), rpmExpand(), rpmlog(), RPMLOG_ERR, RPMRC_OK, and rpmtsClean().

Referenced by rpmcliSign().

int rpmcliInstall | ( | rpmts | ts,
|  | QVA_t | ia,
|  | const char ** | argv
| ) |  |

Install/upgrade/freshen binary rpm package.

Todo:
  Use rpmdsCompare rather than rpmVersionCompare.

Parameters:

  ts | transaction set
  ia | mode flags and parameters
  argv | array of package file names (NULL terminated)

Returns:
  0 on success

Todo:
  Generalize --freshen policies.

Definition at line 311 of file rpminstall.c.

References _, _free(), _RPMVSF_NODIGESTS, _RPMVSF_NOSIGNATURES, alloca(), rpmQVKArguments_s::arbtid, rpmDataType_u::argv, argvAdd(), argvFree(), _HE_s::c, D_, rpmQVKArguments_s::depFlags, FTS_COMFOLLOW, FTS_LOGICAL, FTS_NOSTAT, ftsOpts, headerGet(), INSTALL_FRESHEN, INSTALL_LABEL, INSTALL_NODEPS, INSTALL_NOORDER, INSTALL_UPGRADE, rpmQVKArguments_s::installInterfaceFlags, matchpathcon_fini, matchpathcon_init, rpmRelocation_s::newPath, rpmRelocation_s::oldPath, _HE_s::p, rpmQVKArguments_s::probFilter, rpmDataType_u::ptr, rpmQVKArguments_s::qva_flags, rpmQVKArguments_s::qva_source, rpmQVKArguments_s::relocations, rpmcliInstallCheck(), rpmcliInstallOrder(), rpmcliInstallRun(), rpmcliInstallSuggests(), rpmcliPackagesTotal, rpmdbFreeIterator(), rpmdbGetIteratorCount(), RPMDBI_ARGLIST, RPMDBI_FTSWALK, rpmdbNextIterator(), rpmdsFree(), rpmdsSingle(), rpmExpandNumeric(), rpmGetPath(), RPMGI_NONE, rpmgiFree(), rpmgiHdrPath(), rpmgiHeader(), rpmgiNew(), rpmgiNext(), rpmgiSetArgs(), rpmIsVerbose, rpmlog(), RPMLOG_DEBUG, RPMLOG_ERR, RPMQV_FTSWALK, RPMRC_OK, rpmShowProgress(), RPMTRANS_FLAG_NOCONTEXTS, RPMTRANS_FLAG_REPACKAGE, rpmtsAddInstallElement(), rpmtsClean(), rpmtsEmpty(), rpmtsInitIterator(), rpmtsSELinuxEnabled(), rpmtsSetARBGoal(), rpmtsSetDFlags(), rpmtsSetFlags(), rpmtsSetGoal(), rpmtsSetNotifyCallback(), rpmtsSetVSFlags(), rpmtsSolve(), rpmVersionCompare(), RPMVSF_NEEDPAYLOAD, RPMVSF_NOHDRCHK, rpmDataType_u::str, _HE_s::tag, rpmQVKArguments_s::transFlags, TSM_INSTALL, VERIFY_DIGEST, VERIFY_HDRCHK, VERIFY_SIGNATURE, and xstrdup().

Referenced by main().

int rpmcliInstallCheck | ( | rpmts | ts ) |

Check package element dependencies in a transaction set, reporting problems.

Parameters:

  ts | transaction set

Returns:
  no. of (added) packages

Definition at line 287 of file rpminstall.c.

References _, rpmcliInstallProblems(), and rpmtsCheck().

Referenced by main(), rpmcliInstall(), and rpmErase().

int rpmcliInstallOrder | ( | rpmts | ts ) |

Order package elements in a transaction set, reporting problems.

Parameters:

  ts | transaction set

Returns:
  no. of (added) packages

Definition at line 294 of file rpminstall.c.

References _, rpmcliInstallProblems(), and rpmtsOrder().

Referenced by main(), rpmcliInstall(), and rpmErase().

int rpmcliInstallProblems | ( | rpmts | ts,
|  | const char * | msg,
|  | int | rc
| ) |  |

Report package problems (if any).

Parameters:

  ts | transaction set
  msg | problem context string to display
  rc | result of a tranbsaction operation

Returns:
  no. of (added) packages

Definition at line 255 of file rpminstall.c.

References rpmlog(), RPMLOG_ERR, rpmpsFree(), rpmpsNumProblems(), rpmpsPrint(), and rpmtsProblems().

Referenced by rpmcliInstallCheck(), rpmcliInstallOrder(), rpmcliInstallRun(), and rpmRollback().

int rpmcliInstallRun | ( | rpmts | ts,
|  | rpmps | okProbs,
|  | rpmprobFilterFlags | ignoreSet
| ) |  |

Install/erase package elements in a transaction set, reporting problems.

Parameters:

  ts | transaction set
  okProbs | previously known problems (or NULL)
  ignoreSet | bits to filter problem types

Returns:
  0 on success, -1 on error, >0 no, of failed elements

Definition at line 301 of file rpminstall.c.

References _, rpmcliInstallProblems(), and rpmtsRun().

Referenced by main(), rpmcliInstall(), and rpmErase().

int rpmcliInstallSuggests | ( | rpmts | ts ) |

Report packages(if any) that satisfy unresolved dependencies.

Parameters:

  ts | transaction set

Returns:
  0 always

Definition at line 270 of file rpminstall.c.

References _, _free(), rpmlog(), and RPMLOG_NOTICE.

Referenced by rpmcliInstall().

int rpmcliQuery | ( | rpmts | ts,
|  | QVA_t | qva,
|  | const char ** | argv
| ) |  |

Display package information.

Todo:
  hack: RPMQV_ALL can pass char ** arglist = NULL, not char * arg. Union?

Parameters:

  ts | transaction set
  qva | parsed query/verify options
  argv | query argument(s) (or NULL)

Returns:
  0 on success, else no. of failures

Definition at line 807 of file query.c.

References _free(), _QUERY_FOR_BITS, _RPMVSF_NODIGESTS, _RPMVSF_NOSIGNATURES, rpmQVKArguments_s::depFlags, rpmQVKArguments_s::qva_flags, rpmQVKArguments_s::qva_queryFormat, rpmQVKArguments_s::qva_showPackage, rpmcliArgIter(), rpmExpand(), rpmExpandNumeric(), rpmtsSetDFlags(), rpmtsSetFlags(), rpmtsSetVSFlags(), RPMVSF_NOHDRCHK, showQueryPackage(), rpmQVKArguments_s::transFlags, VERIFY_DIGEST, VERIFY_HDRCHK, VERIFY_SIGNATURE, and xstrdup().

Referenced by main().

int rpmcliShowMatches | ( | QVA_t | qva,
|  | rpmts | ts
| ) |  |

Display query/verify information for each header in iterator.

This routine uses:

- qva->qva_mi rpm database iterator
- qva->qva_showPackage query/verify display routine

Parameters:

  qva | parsed query/verify options
  ts | transaction set

Returns:
  result of last non-zero showPackage() return

Definition at line 403 of file query.c.

References rpmQVKArguments_s::qva_mi, rpmQVKArguments_s::qva_showFAIL, rpmQVKArguments_s::qva_showOK, rpmQVKArguments_s::qva_showPackage, rpmQVKArguments_s::qva_source, rpmdbFreeIterator(), rpmdbNextIterator(), and RPMQV_DBOFFSET.

Referenced by rpmQueryVerify().

int rpmcliSign | ( | rpmts | ts,
|  | QVA_t | qva,
|  | const char ** | argv
| ) |  |

Create/Modify/Check elements from signature header.

Parameters:

  ts | transaction set
  qva | mode flags and parameters
  argv | array of arguments (NULL terminated)

Returns:
  0 on success

Definition at line 1112 of file rpmchecksig.c.

References _, Fclose(), Ferror(), Fopen(), Fstrerror(), FTS_COMFOLLOW, FTS_LOGICAL, FTS_NOSTAT, ftsOpts, rpmQVKArguments_s::qva_mode, rpmQVKArguments_s::qva_source, rpmcliImportPubkeys(), RPMDBI_ARGLIST, RPMDBI_FTSWALK, RPMGI_NOHEADER, RPMGI_NONE, rpmgiFree(), rpmgiHdrPath(), rpmgiNew(), rpmgiNext(), rpmgiSetArgs(), rpmlog(), RPMLOG_ERR, RPMQV_FTSWALK, RPMRC_OK, rpmReSign(), RPMSIGN_ADD_SIGNATURE, RPMSIGN_CHK_SIGNATURE, RPMSIGN_DEL_SIGNATURE, RPMSIGN_IMPORT_PUBKEY, RPMSIGN_NEW_SIGNATURE, RPMSIGN_NONE, and rpmVerifySignatures().

Referenced by main().

int rpmcliVerify | ( | rpmts | ts,
|  | QVA_t | qva,
|  | const char ** | argv
| ) |  |

Verify package install.

Todo:
  hack: RPMQV_ALL can pass char ** arglist = NULL, not char * arg. Union?

Parameters:

  ts | transaction set
  qva | parsed query/verify options
  argv | verify argument(s) (or NULL)

Returns:
  0 on success, else no. of failures

Definition at line 509 of file verify.c.

References _RPMVSF_NODIGESTS, _RPMVSF_NOSIGNATURES, rpmQVKArguments_s::depFlags, rpmQVKArguments_s::qva_flags, rpmQVKArguments_s::qva_showPackage, rpmcliArgIter(), rpmExpandNumeric(), rpmtsEmpty(), rpmtsSetDFlags(), rpmtsSetFlags(), rpmtsSetVSFlags(), RPMVSF_NEEDPAYLOAD, RPMVSF_NOHDRCHK, showVerifyPackage(), rpmQVKArguments_s::transFlags, VERIFY_DIGEST, VERIFY_HDRCHK, and VERIFY_SIGNATURE.

Referenced by main().

int rpmErase | ( | rpmts | ts,
|  | QVA_t | ia,
|  | const char ** | argv
| ) |  |

Erase binary rpm package.

Parameters:

  ts | transaction set
  ia | control args/bits
  argv | array of package names (NULL terminated)

Returns:
  0 on success

Definition at line 521 of file rpminstall.c.

References _, _RPMVSF_NODIGESTS, _RPMVSF_NOSIGNATURES, rpmQVKArguments_s::arbtid, D_, rpmQVKArguments_s::depFlags, INSTALL_ALLMATCHES, INSTALL_LABEL, INSTALL_NODEPS, INSTALL_NOORDER, rpmQVKArguments_s::installInterfaceFlags, rpmQVKArguments_s::probFilter, rpmQVKArguments_s::qva_flags, rpmcliInstallCheck(), rpmcliInstallOrder(), rpmcliInstallRun(), rpmdbFreeIterator(), rpmdbGetIteratorOffset(), RPMDBI_LABEL, rpmdbNextIterator(), rpmExpandNumeric(), rpmIsVerbose, rpmlog(), RPMLOG_DEBUG, RPMLOG_ERR, RPMPROB_FILTER_DISKNODES, RPMPROB_FILTER_DISKSPACE, rpmShowProgress(), RPMTRANS_FLAG_REPACKAGE, rpmtsAddEraseElement(), rpmtsClean(), rpmtsEmpty(), rpmtsInitIterator(), rpmtsSetARBGoal(), rpmtsSetDFlags(), rpmtsSetFlags(), rpmtsSetGoal(), rpmtsSetNotifyCallback(), rpmtsSetVSFlags(), RPMVSF_NOHDRCHK, rpmQVKArguments_s::transFlags, TSM_ERASE, VERIFY_DIGEST, VERIFY_HDRCHK, and VERIFY_SIGNATURE.

Referenced by main().

int rpmInstallSource | ( | rpmts | ts,
|  | const char * | arg,
|  | const char ** | specFilePtr,
|  | const char ** | cookie
| ) |  |

Install source rpm package.

Parameters:

  ts | transaction set
  arg | source rpm file name

Return values:

  *specFilePtr | (installed) spec file name
  *cookie |

Returns:
  0 on success

Definition at line 620 of file rpminstall.c.

References _, _free(), Fclose(), Ferror(), Fopen(), Fstrerror(), rpmInstallSourcePackage(), rpmIsVerbose, rpmlog(), RPMLOG_ERR, RPMRC_OK, rpmtsSetVSFlags(), rpmtsVSFlags(), and RPMVSF_NEEDPAYLOAD.

Referenced by main().

int rpmQueryVerify | ( | QVA_t | qva,
|  | rpmts | ts,
|  | const char * | arg
| ) |  |

Common query/verify source interface, called once for each CLI arg.

This routine uses:

- qva->qva_mi rpm database iterator
- qva->qva_showPackage query/verify display routine

Parameters:

  qva | parsed query/verify options
  ts | transaction set
  arg | name of source to query/verify

Returns:
  showPackage() result, 1 if rpmdbInitIterator() is NULL

Definition at line 439 of file query.c.

References _, _free(), alloca(), currentDirectory(), D_, errno, Lstat(), nibble(), PATH_MAX, rpmQVKArguments_s::qva_mi, rpmQVKArguments_s::qva_showFAIL, rpmQVKArguments_s::qva_showOK, rpmQVKArguments_s::qva_showPackage, rpmQVKArguments_s::qva_source, rpmQVKArguments_s::qva_specQuery, realpath(), rpmCleanPath(), rpmcliShowMatches(), rpmdbCheckSignals(), RPMDBI_LABEL, RPMDBI_PACKAGES, rpmGetPath(), rpmgiShowMatches(), rpmlog(), RPMLOG_DEBUG, RPMLOG_ERR, RPMLOG_NOTICE, RPMQV_ALL, RPMQV_DBOFFSET, RPMQV_FILEID, RPMQV_FTSWALK, RPMQV_GROUP, RPMQV_HDLIST, RPMQV_HDRID, RPMQV_PACKAGE, RPMQV_PATH, RPMQV_PKGID, RPMQV_RPM, RPMQV_SOURCEPKGID, RPMQV_SPECFILE, RPMQV_SPECSRPM, RPMQV_TID, RPMQV_TRIGGEREDBY, RPMQV_WHATNEEDS, RPMQV_WHATPROVIDES, RPMQV_WHATREQUIRES, RPMTAG_PKGID, rpmtsInitIterator(), and xstrdup().

Referenced by rpmcliArgIter().

static int rpmReSign | ( | rpmts | ts,
|  | QVA_t | qva,
|  | const char ** | argv
| ) |  | `[static]`

Create/modify elements in signature header.

Parameters:

  ts | transaction set
  qva | mode flags and parameters
  argv | array of package file names (NULL terminated)

Returns:
  0 on success

Definition at line 173 of file rpmchecksig.c.

References _, _free(), alloca(), copyFile(), EXIT_FAILURE, Fstrerror(), FTS_COMFOLLOW, FTS_LOGICAL, FTS_NOSTAT, ftsOpts, getSignid(), headerCopyLoad(), headerDel(), headerFini(), headerFree(), headerGet(), headerInit(), headerLink(), headerNew(), headerNext(), headerPut(), headerReload(), manageFile(), _HE_s::p, rpmQVKArguments_s::passPhrase, pgpHexStr(), rpmDataType_u::ptr, rpmQVKArguments_s::qva_mode, rpmQVKArguments_s::qva_source, Rename(), rpmAddSignature(), RPMDBI_ARGLIST, RPMDBI_FTSWALK, RPMGI_NOHEADER, RPMGI_NONE, rpmgiFree(), rpmgiHdrPath(), rpmgiNew(), rpmgiNext(), rpmgiSetArgs(), rpmlog(), RPMLOG_ERR, RPMLOG_WARNING, rpmpkgRead(), rpmpkgWrite(), RPMQV_FTSWALK, RPMRC_OK, RPMSIGN_DEL_SIGNATURE, RPMSIGTAG_BADSHA1_1, RPMSIGTAG_BADSHA1_2, RPMSIGTAG_DSA, RPMSIGTAG_GPG, RPMSIGTAG_LEMD5_1, RPMSIGTAG_LEMD5_2, RPMSIGTAG_MD5, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, RPMSIGTAG_RSA, RPMSIGTAG_SHA1, RPMSIGTAG_SIZE, RPMTAG_HEADERSIGNATURES, stpcpy(), _HE_s::tag, and Unlink().

Referenced by rpmcliSign().

int rpmRollback | ( | rpmts | ts,
|  | QVA_t | ia,
|  | const char ** | argv
| ) |  |

Rollback transactions, erasing new, reinstalling old, package(s).

Parameters:

  ts | transaction set
  ia | mode flags and parameters
  argv | array of arguments (NULL terminated)

Returns:
  0 on success

Todo:
  Transaction handling, more, needs work.

Definition at line 385 of file rpmrollback.c.

References _, _free(), _RPMVSF_NODIGESTS, _RPMVSF_NOSIGNATURES, D_, rpmQVKArguments_s::depFlags, IDT_s::done, findErases(), IDT_s::h, headerFree(), IDTindex_s::idt, IDTXfree(), IDTXglob(), IDTXload(), INSTALL_ERASE, INSTALL_FRESHEN, INSTALL_INSTALL, INSTALL_LABEL, INSTALL_UPGRADE, rpmQVKArguments_s::installInterfaceFlags, IDT_s::key, IDTindex_s::nidt, rpmQVKArguments_s::no_rollback_links, rpmQVKArguments_s::numrbtidExcludes, rpmQVKArguments_s::probFilter, rpmQVKArguments_s::qva_flags, rpmQVKArguments_s::rbCheck, rpmQVKArguments_s::rbOrder, rpmQVKArguments_s::rbRun, rpmQVKArguments_s::rbtid, rpmQVKArguments_s::rbtidExcludes, rpmQVKArguments_s::relocations, rpmcliInstallProblems(), rpmcliPackagesTotal, rpmExpand(), rpmExpandNumeric(), rpmIsDebug, rpmIsVerbose, rpmlog(), RPMLOG_DEBUG, RPMLOG_NOTICE, RPMPROB_FILTER_OLDPACKAGE, rpmpsCreate(), rpmpsFree(), rpmShowProgress(), RPMTRANS_TYPE_ROLLBACK, rpmtsAddInstallElement(), rpmtsClean(), rpmtsEmpty(), rpmtsSetDFlags(), rpmtsSetFlags(), rpmtsSetNotifyCallback(), rpmtsSetType(), rpmtsSetVSFlags(), RPMVSF_NEEDPAYLOAD, RPMVSF_NOHDRCHK, rpmQVKArguments_s::transFlags, IDT_s::u32, IDT_s::val, VERIFY_DIGEST, VERIFY_HDRCHK, and VERIFY_SIGNATURE.

Referenced by main(), rpmts_Rollback(), and rpmtsRollback().

void* rpmShowProgress | ( | const void * | arg,
|  | const rpmCallbackType | what,
|  | const uint64_t | amount,
|  | const uint64_t | total,
|  | fnpyKey | key,
|  | void * | data
| ) |  |

The rpm CLI generic transaction callback handler.

Todo:
  Remove headerSprintf() from the progress callback.

Warning:
  This function's args have changed, so the function cannot be used portably

Deprecated:
  Transaction callback arguments need to change, so don't rely on this routine in the rpmcli API.

Parameters:

  arg | per-callback private data (e.g. an rpm header)
  what | callback identifier
  amount | per-callback progress info
  total | per-callback progress info
  key | opaque header key (e.g. file name or PyObject)
  data | private data (e.g. rpmInstallInterfaceFlags)

Returns:
  per-callback data (e.g. an opened FD_t)

Definition at line 91 of file rpminstall.c.

References _, _free(), Fclose(), fdFree(), fdLink(), Ferror(), Fopen(), Fstrerror(), headerSprintf(), INSTALL_HASH, INSTALL_LABEL, INSTALL_PERCENT, printHash(), RPMCALLBACK_CPIO_ERROR, RPMCALLBACK_INST_CLOSE_FILE, RPMCALLBACK_INST_OPEN_FILE, RPMCALLBACK_INST_PROGRESS, RPMCALLBACK_INST_START, RPMCALLBACK_REPACKAGE_PROGRESS, RPMCALLBACK_REPACKAGE_START, RPMCALLBACK_REPACKAGE_STOP, RPMCALLBACK_SCRIPT_ERROR, RPMCALLBACK_TRANS_PROGRESS, RPMCALLBACK_TRANS_START, RPMCALLBACK_TRANS_STOP, RPMCALLBACK_UNINST_PROGRESS, RPMCALLBACK_UNINST_START, RPMCALLBACK_UNINST_STOP, RPMCALLBACK_UNKNOWN, RPMCALLBACK_UNPACK_ERROR, rpmcliHashesCurrent, rpmcliPackagesTotal, rpmcliProgressCurrent, rpmcliProgressTotal, rpmHeaderFormats, rpmlog(), and RPMLOG_ERR.

Referenced by rpmcliInstall(), rpmErase(), and rpmRollback().

rpmRC rpmtsImportPubkey | ( | const rpmts | ts,
|  | const unsigned char * | pkt,
|  | ssize_t | pktlen
| ) |  |

Import public key packet(s).

Todo:
  Implicit --update policy for gpg-pubkey headers.

Parameters:

  ts | transaction set
  pkt | pgp pubkey packet(s)
  pktlen | pgp pubkey length

Returns:
  RPMRC_OK/RPMRC_FAIL

Definition at line 258 of file rpmts.c.

References _free(), alloca(), _HE_s::append, rpmDataType_u::argv, _HE_s::c, headerAddI18NString(), headerFree(), headerNew(), headerPut(), headerSprintf(), _HE_s::p, pgpDigFree(), pgpDigNew(), pgpGetPubkey(), pgpHexStr(), pgpPrtPkts(), rpmDataType_u::ptr, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, RPM_UINT32_TYPE, rpmdbAdd(), rpmHeaderFormats, RPMRC_FAIL, RPMRC_OK, RPMSENSE_EQUAL, rpmtsGetRdb(), rpmtsGetTid(), rpmtsOpenDB(), RPMVERSION, stpcpy(), rpmDataType_u::str, _HE_s::t, _HE_s::tag, rpmDataType_u::ui32p, and xmalloc().

Referenced by rpmts_PgpImportPubkey().

int rpmVerifyFile | ( | const rpmts | ts,
|  | rpmfi | fi,
|  | rpmVerifyAttrs * | res,
|  | rpmVerifyAttrs | omitMask
| ) |  |

Verify file attributes (including file digest).

Todo:
  gnorpm and python bindings prevent this from being static.

Parameters:

  ts | transaction set
  fi | file info (with linked header and current file index)

Return values:

  *res | bit(s) returned to indicate failure

Parameters:

  omitMask | bit(s) to disable verify checks

Returns:
  0 on success (or not installed), 1 on error

Definition at line 29 of file verify.c.

References alloca(), dodigest(), gidToGname(), Lstat(), Readlink(), rpmfiDigest(), rpmfiFFlags(), rpmfiFGroup(), rpmfiFLink(), rpmfiFMode(), rpmfiFMtime(), rpmfiFN(), rpmfiFRdev(), rpmfiFSize(), rpmfiFState(), rpmfiFUser(), RPMFILE_GHOST, RPMFILE_STATE_NETSHARED, RPMFILE_STATE_NORMAL, RPMFILE_STATE_NOTINSTALLED, RPMFILE_STATE_REPLACED, RPMFILE_STATE_WRONGCOLOR, rpmfiVFlags(), rpmtsRootDir(), RPMVERIFY_FAILURES, RPMVERIFY_FDIGEST, RPMVERIFY_FILESIZE, RPMVERIFY_GROUP, RPMVERIFY_LINKTO, RPMVERIFY_LSTATFAIL, RPMVERIFY_MODE, RPMVERIFY_MTIME, RPMVERIFY_NONE, RPMVERIFY_RDEV, RPMVERIFY_READFAIL, RPMVERIFY_READLINKFAIL, RPMVERIFY_USER, S_ISDEV, S_ISLNK, stpcpy(), and uidToUname().

Referenced by verifyHeader().

int showQueryPackage | ( | QVA_t | qva,
|  | rpmts | ts,
|  | Header | h
| ) |  |

Display results of package query.

Todo:
  Devise a meaningful return code.

Parameters:

  qva | parsed query/verify options
  ts | transaction set
  h | header to use for query

Returns:
  0 always

Definition at line 170 of file query.c.

References _, _free(), flushBuffer(), printFileInfo(), QUERY_FOR_CONFIG, QUERY_FOR_DOCS, QUERY_FOR_DUMPFILES, QUERY_FOR_LIST, QUERY_FOR_STATE, queryHeader(), rpmQVKArguments_s::qva_fflags, rpmQVKArguments_s::qva_flags, rpmQVKArguments_s::qva_queryFormat, rpmfiDigest(), rpmfiFC(), rpmfiFFlags(), rpmfiFGroup(), rpmfiFLink(), rpmfiFMode(), rpmfiFMtime(), rpmfiFN(), rpmfiFNlink(), rpmfiFRdev(), rpmfiFree(), rpmfiFSize(), rpmfiFState(), rpmfiFUser(), rpmfiInit(), RPMFILE_CONFIG, RPMFILE_DOC, RPMFILE_GHOST, RPMFILE_STATE_MISSING, RPMFILE_STATE_NETSHARED, RPMFILE_STATE_NORMAL, RPMFILE_STATE_NOTINSTALLED, RPMFILE_STATE_REPLACED, RPMFILE_STATE_WRONGCOLOR, rpmfiNew(), rpmfiNext(), rpmIsVerbose, rpmlog(), RPMLOG_CRIT, stpcpy(), xcalloc(), xmalloc(), and xrealloc().

Referenced by rpmcliQuery().

int showVerifyPackage | ( | QVA_t | qva,
|  | rpmts | ts,
|  | Header | h
| ) |  |

Display results of package verify.

Parameters:

  qva | parsed query/verify options
  ts | transaction set
  h | header to use for verify

Returns:
  result of last non-zero verify return

Definition at line 465 of file verify.c.

References _rpmds_unspecified_epoch_noise, Fclose(), fdDup(), headerFree(), headerIsEntry(), headerLink(), rpmQVKArguments_s::qva_flags, rpmfiFree(), rpmfiNew(), rpmIsVerbose, rpmVerifyScript(), VERIFY_DEPS, VERIFY_FILES, VERIFY_SCRIPT, verifyDependencies(), and verifyHeader().

Referenced by rpmcliVerify().

## Variable Documentation

int _noDirTokens

Should version 3 packages be produced?

struct rpmBuildArguments_s rpmBTArgs

Definition at line 16 of file poptBT.c.

Referenced by buildArgCallback(), main(), prepFetch(), and prepFetchVerbose().

struct poptOption rpmBuildPoptTable[]

Definition at line 133 of file poptBT.c.

struct poptOption rpmcliAllPoptTable[]

Popt option table for options shared by all modes and executables.

Definition at line 416 of file poptALL.c.

int rpmcliHashesCurrent

Definition at line 30 of file rpminstall.c.

Referenced by printHash(), and rpmShowProgress().

int rpmcliHashesTotal

Definition at line 32 of file rpminstall.c.

Referenced by printHash().

int rpmcliPackagesTotal

Definition at line 28 of file rpminstall.c.

Referenced by rpmcliInstall(), rpmRollback(), rpmShowProgress(), and rpmtsAddInstallElement().

uint64_t rpmcliProgressCurrent

Definition at line 34 of file rpminstall.c.

Referenced by printHash(), and rpmShowProgress().

uint64_t rpmcliProgressTotal

Definition at line 36 of file rpminstall.c.

Referenced by printHash(), and rpmShowProgress().

rpmQueryFlags rpmcliQueryFlags

Bit(s) from common command line options.

Definition at line 149 of file poptALL.c.

Referenced by rpmcliAllArgCallback().

struct poptOption rpmDatabasePoptTable[]

Definition at line 19 of file poptDB.c.

struct rpmQVKArguments_s rpmDBArgs

Definition at line 15 of file poptDB.c.

Referenced by main().

struct rpmQVKArguments_s rpmIArgs

Definition at line 19 of file poptI.c.

Referenced by installArgCallback(), and main().

struct poptOption rpmInstallPoptTable[]

Definition at line 202 of file poptI.c.

struct poptOption rpmQueryPoptTable[]

Query mode options.

Definition at line 267 of file poptQV.c.

struct rpmQVKArguments_s rpmQVKArgs

Definition at line 15 of file poptQV.c.

Referenced by main(), queryArgCallback(), and rpmQVSourceArgCallback().

struct poptOption rpmQVSourcePoptTable[]

Common query/verify mode options.

Definition at line 112 of file poptQV.c.

struct poptOption rpmSignPoptTable[]

Signature mode options.

Definition at line 429 of file poptQV.c.

struct poptOption rpmVerifyPoptTable[]

Verify mode options.

Definition at line 324 of file poptQV.c.

int specedit

Definition at line 18 of file poptQV.c.