27 #define POPT_QUERYFORMAT -1000 28 #define POPT_WHATREQUIRES -1001 29 #define POPT_WHATPROVIDES -1002 30 #define POPT_QUERYBYNUMBER -1003 31 #define POPT_TRIGGEREDBY -1004 32 #define POPT_DUMP -1005 33 #define POPT_SPECFILE -1006 34 #define POPT_QUERYBYPKGID -1007 35 #define POPT_QUERYBYHDRID -1008 36 #define POPT_QUERYBYFILEID -1009 37 #define POPT_QUERYBYTID -1010 38 #define POPT_HDLIST -1011 39 #define POPT_FTSWALK -1012 42 #define POPT_TRUST -1037 43 #define POPT_WHATNEEDS -1038 44 #define POPT_SPECSRPM -1039 45 #define POPT_QUERYBYSOURCEPKGID -1040 46 #define POPT_WHATCONFLICTS -1041 47 #define POPT_WHATOBSOLETES -1042 48 #define POPT_NOPASSWORD -1043 52 enum poptCallbackReason reason,
53 const struct poptOption * opt,
60 unsigned * _sourcep = (
unsigned *)&qva->
qva_source;
135 { NULL,
'\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA,
138 {
"all",
'a', 0, NULL,
'a',
139 N_(
"query/verify all packages"), NULL },
140 {
"checksig",
'K', POPT_ARGFLAG_DOC_HIDDEN, NULL,
'K',
141 N_(
"rpm checksig mode"), NULL },
142 {
"file",
'f', 0, NULL,
'f',
143 N_(
"query/verify package(s) owning file"),
"FILE" },
144 {
"group",
'g', 0, NULL,
'g',
145 N_(
"query/verify package(s) in group"),
"GROUP" },
146 {
"package",
'p', 0, NULL,
'p',
147 N_(
"query/verify a package file"), NULL },
150 N_(
"query/verify package(s) from TOP file tree walk"),
"TOP" },
151 {
"hdlist",
'H', POPT_ARGFLAG_DOC_HIDDEN, 0,
POPT_HDLIST,
152 N_(
"query/verify package(s) from system HDLIST"),
"HDLIST" },
155 N_(
"query/verify package(s) with source package identifier"),
"MD5" },
157 N_(
"query/verify package(s) with package identifier"),
"MD5" },
159 N_(
"query/verify package(s) with header identifier"),
"SHA1" },
161 N_(
"query/verify package(s) with file identifier"),
"MD5" },
163 {
"query",
'q', POPT_ARGFLAG_DOC_HIDDEN, NULL,
'q',
164 N_(
"rpm query mode"), NULL },
166 N_(
"query/verify a header instance"),
"HDRNUM" },
168 N_(
"query a spec file"),
N_(
"<spec>") },
169 {
"specsrpm",
'\0', POPT_ARGFLAG_DOC_HIDDEN, NULL,
POPT_SPECSRPM,
170 N_(
"query source metadata from spec file parse"),
N_(
"<spec>") },
172 N_(
"query/verify package(s) from install transaction"),
"TID" },
174 N_(
"query the package(s) triggered by the package"),
"PACKAGE" },
175 {
"verify",
'V', POPT_ARGFLAG_DOC_HIDDEN, NULL,
'V',
176 N_(
"rpm verify mode"), NULL },
178 N_(
"query/verify the package(s) which require a dependency"),
"CAPABILITY" },
179 {
"whatneeds",
'\0', POPT_ARGFLAG_DOC_HIDDEN, NULL,
POPT_WHATNEEDS,
180 N_(
"query/verify the package(s) which require any contained provide"),
184 N_(
"query/verify the package(s) which provide a dependency"),
"CAPABILITY" },
186 N_(
"query/verify the package(s) which conflict with a dependency"),
"CAPABILITY" },
188 N_(
"query/verify the package(s) which obsolete a dependency"),
"CAPABILITY" },
191 N_(
"create transaction set"), NULL},
194 N_(
"do not order transaction set"), NULL},
197 N_(
"do not glob arguments"), NULL},
199 N_(
"do not process non-package files as manifests"), NULL},
201 N_(
"do not read headers"), NULL},
210 enum poptCallbackReason reason,
211 const struct poptOption * opt,
const char * arg,
217 unsigned * _flagsp = (
unsigned *)&qva->
qva_flags;
220 if (opt->arg == NULL)
238 const char * fn = arg;
241 rc = poptReadFile(fn, &b, &nb, POPT_READFILE_TRIMNEWLINES);
244 if (b == NULL || nb == 0)
248 while (nb > 0 && b[nb] !=
'"')
258 size_t len = strlen(qf) + strlen(arg) + 1;
262 qf = (
char *)
xmalloc(strlen(arg) + 1);
275 const char * infoCommand[] = {
"--info", NULL };
277 (void) poptStuffArgs(con, infoCommand);
316 long trust = (int) strtol(arg, &end, 0);
330 { NULL,
'\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE,
335 {
"configfiles",
'c', 0, 0,
'c',
336 N_(
"list all configuration files"), NULL },
337 {
"docfiles",
'd', 0, 0,
'd',
338 N_(
"list all documentation files"), NULL },
340 N_(
"dump basic file information"), NULL },
341 { NULL,
'i', POPT_ARGFLAG_DOC_HIDDEN, 0,
'i',
343 {
"list",
'l', 0, 0,
'l',
344 N_(
"list files in package"), NULL },
346 {
"aid",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
348 N_(
"add suggested packages to transaction"), NULL },
353 N_(
"skip %%config files"), NULL },
356 N_(
"skip %%doc files"), NULL },
359 N_(
"skip %%ghost files"), NULL },
363 N_(
"skip %%license files"), NULL },
366 N_(
"skip %%readme files"), NULL },
369 {
"printspec",
'\0', POPT_ARG_VAL, &
printspec, -1,
370 N_(
"print parsed spec file"), NULL },
371 {
"qf",
'\0', POPT_ARG_STRING | POPT_ARGFLAG_DOC_HIDDEN, 0,
374 N_(
"use the following query format"),
N_(
"QUERYFORMAT") },
375 {
"specedit",
'\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &
specedit, -1,
376 N_(
"substitute i18n sections into spec file"), NULL },
377 {
"state",
's', 0, 0,
's',
378 N_(
"display the states of the listed files"), NULL },
380 N_(
"specify target platform"),
N_(
"CPU-VENDOR-OS") },
389 { NULL,
'\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE,
397 N_(
"add suggested packages to transaction"), NULL },
400 {
"noconfig",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
402 N_(
"skip %%config files"), NULL },
403 {
"nodoc",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
405 N_(
"skip %%doc files"), NULL },
411 N_(
"don't verify file digests"), NULL },
414 N_(
"don't verify file digests"), NULL },
416 N_(
"don't verify file digests"), NULL },
418 {
"nosize",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
420 N_(
"don't verify size of files"), NULL },
421 {
"nolinkto",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
423 N_(
"don't verify symlink path of files"), NULL },
424 {
"nouser",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
426 N_(
"don't verify owner of files"), NULL },
427 {
"nogroup",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
429 N_(
"don't verify group of files"), NULL },
430 {
"nomtime",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
432 N_(
"don't verify modification time of files"), NULL },
433 {
"nomode",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
435 N_(
"don't verify mode of files"), NULL },
436 {
"nordev",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
438 N_(
"don't verify mode of files"), NULL },
441 N_(
"don't verify file HMAC's"), NULL },
443 N_(
"don't verify file security contexts"), NULL },
445 N_(
"don't verify files in package"), NULL},
448 N_(
"don't verify package dependencies"), NULL },
451 N_(
"don't verify package dependencies"), NULL },
456 N_(
"don't execute verify script(s)"), NULL },
458 {
"noscripts",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
460 N_(
"don't execute verify script(s)"), NULL },
463 N_(
"don't execute verify script(s)"), NULL },
466 N_(
"don't execute verify script(s)"), NULL },
471 N_(
"don't verify package digest(s)"), NULL },
472 {
"nohdrchk",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
474 N_(
"don't verify database header(s) when retrieved"), NULL },
475 {
"nosignature",
'\0', POPT_BIT_SET,
477 N_(
"don't verify package signature(s)"), NULL },
480 N_(
"don't verify package digest(s)"), NULL },
482 N_(
"don't verify database header(s) when retrieved"), NULL },
484 N_(
"don't verify package signature(s)"), NULL },
496 { NULL,
'\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE,
499 {
"addsign",
'\0', 0, NULL,
'A',
500 N_(
"sign package(s) (identical to --resign)"), NULL },
501 {
"checksig",
'K', 0, NULL,
'K',
502 N_(
"verify package signature(s)"), NULL },
503 {
"delsign",
'\0', 0, NULL,
'D',
504 N_(
"delete package signatures"), NULL },
505 {
"import",
'\0', 0, NULL,
'I',
506 N_(
"import an armored public key"), NULL },
507 {
"resign",
'\0', 0, NULL,
'R',
508 N_(
"sign package(s) (identical to --addsign)"), NULL },
510 N_(
"generate signature"), NULL },
512 {
"trust",
'\0', POPT_ARG_STRING|POPT_ARGFLAG_DOC_HIDDEN, 0,
POPT_TRUST,
513 N_(
"specify trust metric"),
N_(
"TRUST") },
514 {
"trusted",
'\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN,
516 N_(
"set ultimate trust when importing pubkey(s)"), NULL },
517 {
"untrusted",
'\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN,
519 N_(
"unset ultimate trust when importing pubkey(s)"), NULL },
520 {
"nopassword",
'\0', POPT_ARG_STRING|POPT_ARGFLAG_DOC_HIDDEN, 0,
POPT_NOPASSWORD,
521 N_(
"disable password challenge"), NULL },
525 N_(
"don't verify package digest(s)"), NULL },
526 {
"nohdrchk",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
528 N_(
"don't verify database header(s) when retrieved"), NULL },
530 N_(
"don't verify package signature(s)"), NULL },
#define RPMCLI_POPT_TARGETPLATFORM
#define POPT_QUERYBYHDRID
static void rpmQVSourceArgCallback(poptContext con, enum poptCallbackReason reason, const struct poptOption *opt, const char *arg, const void *data)
#define POPT_WHATREQUIRES
#define POPT_WHATPROVIDES
struct poptOption rpmQueryPoptTable[]
Query mode options.
static void queryArgCallback(poptContext con, enum poptCallbackReason reason, const struct poptOption *opt, const char *arg, const void *data)
#define RPMCLI_POPT_NODIGEST
Command line option information.
#define RPMCLI_POPT_NOCONTEXTS
#define RPMCLI_POPT_NOSCRIPTS
#define RPMCLI_POPT_NOHDRCHK
#define POPT_ARGFLAG_TOGGLE
struct poptOption rpmQVSourcePoptTable[]
Common query/verify mode options.
#define POPT_QUERYBYSOURCEPKGID
#define POPT_WHATOBSOLETES
const char * qva_queryFormat
#define POPT_QUERYBYFILEID
#define RPMCLI_POPT_NOFDIGESTS
struct poptOption rpmSignPoptTable[]
Signature mode options.
#define RPMCLI_POPT_NOSIGNATURE
#define POPT_WHATCONFLICTS
#define RPMCLI_POPT_NODEPS
Common/global popt tokens used for command line option tables.
static void * _free(const void *p)
Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
struct rpmQVKArguments_s rpmQVKArgs
#define POPT_QUERYBYPKGID
#define RPMCLI_POPT_NOHMACS
struct poptOption rpmVerifyPoptTable[]
Verify mode options.
#define POPT_QUERYBYNUMBER