4 #include <rpm/rpmcli.h>
8 #if !defined(__GLIBC__) && !defined(__APPLE__)
23 {
"checksig",
'K', (POPT_ARG_VAL|POPT_ARGFLAG_OR), &mode,
MODE_CHECKSIG,
24 N_(
"verify package signature(s)"), NULL },
25 {
"import",
'\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR), &mode,
MODE_IMPORTKEY,
26 N_(
"import an armored public key"), NULL },
27 {
"test",
'\0', POPT_ARG_NONE, &
test, 0,
28 N_(
"don't import, but tell if it would work or not"), NULL },
30 {
"delete-key",
'\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR), &mode,
MODE_DELKEY,
31 N_(
"list keys from RPM keyring"), NULL },
32 {
"list-keys",
'\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR), &mode,
MODE_LISTKEY,
33 N_(
"list keys from RPM keyring"), NULL },
40 N_(
"Keyring options:"), NULL },
42 N_(
"Common options for all rpm modes and executables:"), NULL },
49 int main(
int argc,
char *argv[])
51 int ec = EXIT_FAILURE;
52 poptContext optCon =
rpmcliInit(argc, argv, optionsTable);
82 argerror(
_(
"only one major mode may be specified"));
void printUsage(poptContext con, FILE *fp, int flags)
static struct poptOption keyOptsTable[]
rpmtransFlags rpmtsSetFlags(rpmts ts, rpmtransFlags transFlags)
Set transaction flags, i.e.
rpmts rpmtsFree(rpmts ts)
Destroy transaction set, closing the database as well.
static struct poptOption optionsTable[]
poptContext rpmcliInit(int argc, char *const argv[], struct poptOption *optionsTable)
Initialize most everything needed by an rpm CLI executable context.
int rpmcliVerifySignatures(rpmts ts, ARGV_const_t argv)
Verify package signatures.
struct rpmts_s * rpmts
The main types involved in transaction manipulation.
rpmts rpmtsCreate(void)
Create an empty transaction set.
poptContext rpmcliFini(poptContext optCon)
Destroy most everything needed by an rpm CLI executable context.
void argerror(const char *desc)
int main(int argc, char *argv[])
const char * rpmcliRootDir
struct poptOption rpmcliAllPoptTable[]
Popt option table for options shared by all modes and executables.
char *const * ARGV_const_t
rpmtransFlags rpmtsFlags(rpmts ts)
Get transaction flags, i.e.
int rpmtsSetRootDir(rpmts ts, const char *rootDir)
Set transaction rootDir, i.e.
int rpmcliImportPubkeys(rpmts ts, ARGV_const_t argv)
Import public key(s) to rpm keyring.