rpm  5.4.10
Typedefs | Enumerations | Functions | Variables
rpmns.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct rpmns_s * rpmns
 
typedef enum nsType_e nsType
 Dependency types. More...
 

Enumerations

enum  nsType_e {
  RPMNS_TYPE_UNKNOWN = 0, RPMNS_TYPE_STRING = (1 << 0), RPMNS_TYPE_PATH = (1 << 1), RPMNS_TYPE_DSO = (1 << 2),
  RPMNS_TYPE_FUNCTION = (1 << 3), RPMNS_TYPE_ARCH = (1 << 4), RPMNS_TYPE_VERSION = (1 << 5), RPMNS_TYPE_COMPOUND = (1 << 6),
  RPMNS_TYPE_NAMESPACE = (1 << 8), RPMNS_TYPE_RPMLIB = (1 << 9), RPMNS_TYPE_CPUINFO = (1 << 10), RPMNS_TYPE_GETCONF = (1 << 11),
  RPMNS_TYPE_UNAME = (1 << 12), RPMNS_TYPE_SONAME = (1 << 13), RPMNS_TYPE_ACCESS = (1 << 14), RPMNS_TYPE_TAG = (1 << 15),
  RPMNS_TYPE_USER = (1 << 16), RPMNS_TYPE_GROUP = (1 << 17), RPMNS_TYPE_MOUNTED = (1 << 18), RPMNS_TYPE_DISKSPACE = (1 << 19),
  RPMNS_TYPE_DIGEST = (1 << 20), RPMNS_TYPE_GNUPG = (1 << 21), RPMNS_TYPE_MACRO = (1 << 22), RPMNS_TYPE_ENVVAR = (1 << 23),
  RPMNS_TYPE_RUNNING = (1 << 24), RPMNS_TYPE_SANITY = (1 << 25), RPMNS_TYPE_VCHECK = (1 << 26), RPMNS_TYPE_SIGNATURE = (1 << 27),
  RPMNS_TYPE_VERIFY = (1 << 28), RPMNS_TYPE_CONFIG = (1 << 29), RPMNS_TYPE_SET = (1 << 30), RPMNS_TYPE_DPKG = (1 << 31)
}
 Dependency types. More...
 

Functions

nsType rpmnsArch (const char *str)
 Is string a known arch suffix? More...
 
nsType rpmnsProbe (const char *s, size_t slen)
 Is string a known probe namespace? More...
 
nsType rpmnsClassify (const char *s, size_t slen)
 Classify a string as a dependency type. More...
 
int rpmnsParse (const char *str, rpmns ns)
 Expand and split NS(N).A string into namespace, name and arch components. More...
 
void rpmnsClean (void)
 Clean global name space dependency sets. More...
 
rpmRC rpmnsProbeSignature (void *_ts, const char *fn, const char *sigfn, const char *pubfn, const char *pubid, int flags)
 Verify OpenPGP signature on a file. More...
 

Variables

int _rpmns_debug
 
const char * _rpmns_N_at_A
 

Typedef Documentation

§ nsType

typedef enum nsType_e nsType

Dependency types.

§ rpmns

typedef struct rpmns_s* rpmns

Definition at line 19 of file rpmns.h.

Enumeration Type Documentation

§ nsType_e

enum nsType_e

Dependency types.

Enumerator
RPMNS_TYPE_UNKNOWN 
RPMNS_TYPE_STRING 

unclassified string

RPMNS_TYPE_PATH 

/bin

RPMNS_TYPE_DSO 

libc.so.6

RPMNS_TYPE_FUNCTION 

%{foo}

RPMNS_TYPE_ARCH 

foo.arch

RPMNS_TYPE_VERSION 

foo-1.2.3-bar

RPMNS_TYPE_COMPOUND 

foo.bar

RPMNS_TYPE_NAMESPACE 

foo(bar)

RPMNS_TYPE_RPMLIB 

rpmlib(bar)

RPMNS_TYPE_CPUINFO 

cpuinfo(bar)

RPMNS_TYPE_GETCONF 

getconf(bar)

RPMNS_TYPE_UNAME 

uname(bar)

RPMNS_TYPE_SONAME 

soname(bar)

RPMNS_TYPE_ACCESS 

exists(bar)

RPMNS_TYPE_TAG 

Tag(bar)

RPMNS_TYPE_USER 

user(bar)

RPMNS_TYPE_GROUP 

group(bar)

RPMNS_TYPE_MOUNTED 

mounted(/path)

RPMNS_TYPE_DISKSPACE 

diskspace(/path)

RPMNS_TYPE_DIGEST 

digest(/path) = hex

RPMNS_TYPE_GNUPG 

gnupg(/path/file.asc)

RPMNS_TYPE_MACRO 

macro(foo)

RPMNS_TYPE_ENVVAR 

envvar(foo)

RPMNS_TYPE_RUNNING 

running(foo)

RPMNS_TYPE_SANITY 

sanitycheck(foo)

RPMNS_TYPE_VCHECK 

vcheck(foo)

RPMNS_TYPE_SIGNATURE 

signature(/text:/sig) = /pub:id

RPMNS_TYPE_VERIFY 

verify(N) = E:V-R

RPMNS_TYPE_CONFIG 

config(N) = E:V-R

RPMNS_TYPE_SET 

set(N) = E:V-R

RPMNS_TYPE_DPKG 

dpkg(N) = E:V-R

Definition at line 24 of file rpmns.h.

Function Documentation

§ rpmnsArch()

nsType rpmnsArch ( const char *  str)

Is string a known arch suffix?

Parameters
strstring
Returns
RPMNS_TYPE_ARCH if known arch, else RPMNS_TYPE_UNKNOWN

Definition at line 70 of file rpmns.c.

References _free(), rpmExpand(), RPMNS_TYPE_ARCH, RPMNS_TYPE_UNKNOWN, and xisspace().

Referenced by rpmnsClassify().

§ rpmnsClassify()

nsType rpmnsClassify ( const char *  s,
size_t  slen 
)

Classify a string as a dependency type.

Parameters
sstring like "bing(bang).boom"
slenstring length (0 uses strlen(s))
Returns
dependency type

Definition at line 197 of file rpmns.c.

References RPMNS_TYPE_ARCH, RPMNS_TYPE_COMPOUND, RPMNS_TYPE_DSO, RPMNS_TYPE_FUNCTION, RPMNS_TYPE_NAMESPACE, RPMNS_TYPE_PATH, RPMNS_TYPE_STRING, RPMNS_TYPE_UNKNOWN, RPMNS_TYPE_VERSION, rpmnsArch(), rpmnsProbe(), _rpmnsProbes_s::Type, and xisdigit().

Referenced by rpmnsParse().

§ rpmnsClean()

void rpmnsClean ( void  )

Clean global name space dependency sets.

Definition at line 863 of file depends.c.

References _free(), _sysinfo_path, cpuinfoP, getconfP, rpmdsFree(), rpmlibP, sysinfo_path, and unameP.

Referenced by rpmcliFini().

§ rpmnsParse()

int rpmnsParse ( const char *  str,
rpmns  ns 
)

§ rpmnsProbe()

nsType rpmnsProbe ( const char *  s,
size_t  slen 
)

Is string a known probe namespace?

Parameters
sstring
slenstring length (0 uses strlen(s))
Returns
nsType if known probe, else RPMNS_TYPE_UNKNOWN

Definition at line 170 of file rpmns.c.

References _rpmnsProbes_s::NS, _rpmnsProbes_s::NSlen, RPMNS_TYPE_UNKNOWN, rpmnsProbes, rpmnsProbesCount, and _rpmnsProbes_s::Type.

Referenced by rpmnsClassify().

§ rpmnsProbeSignature()

rpmRC rpmnsProbeSignature ( void *  _ts,
const char *  fn,
const char *  sigfn,
const char *  pubfn,
const char *  pubid,
int  flags 
)

Verify OpenPGP signature on a file.

Parameters
_tstransaction set
fnplaintext (or clearsign) file
sigfnbinary/pem encoded signature file (NULL iff clearsign)
pubfnbinary/pem encoded pubkey file (NULL uses rpmdb keyring)
pubidpubkey fingerprint hex string (NULL disables check)
flags(unused)
Returns
RPMRC_OK if verified, RPMRC_FAIL if not verified

Definition at line 323 of file rpmns.c.

References _free(), alloca(), nibble(), PGPARMOR_PUBKEY, PGPARMOR_SIGNATURE, pgpFindPubkey(), pgpGetPubkey(), pgpGetSignature(), pgpGrab(), pgpGrabPkts(), pgpImplSetDSA(), pgpImplSetRSA(), pgpImplVerify(), pgpPktLen(), PGPPUBKEYALGO_DSA, PGPPUBKEYALGO_RSA, pgpPubkeyFingerprint(), pgpReadPkts(), RPMDIGEST_NONE, rpmDigestInit(), rpmDigestUpdate(), rpmExpand(), rpmiobFree(), rpmiobSlurp(), RPMRC_FAIL, RPMRC_NOKEY, RPMRC_NOTFOUND, RPMRC_NOTTRUSTED, RPMRC_OK, rpmtsCleanDig(), and rpmtsDig().

Referenced by argerror(), and unsatisfiedDepend().

Variable Documentation

§ _rpmns_debug

int _rpmns_debug

Definition at line 40 of file rpmns.c.

§ _rpmns_N_at_A

const char* _rpmns_N_at_A

Definition at line 43 of file rpmns.c.

Referenced by rpmdsNewDNEVR().