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"));
int rpmtsSetRootDir(rpmts ts, const char *rootDir)
Set transaction rootDir, i.e.
void printUsage(poptContext con, FILE *fp, int flags)
static struct poptOption keyOptsTable[]
static struct poptOption optionsTable[]
poptContext rpmcliInit(int argc, char *const argv[], struct poptOption *optionsTable)
Initialize most everything needed by an rpm CLI executable context.
poptContext rpmcliFini(poptContext optCon)
Destroy most everything needed by an rpm CLI executable context.
rpmtransFlags rpmtsFlags(rpmts ts)
Get transaction flags, i.e.
void argerror(const char *desc)
int main(int argc, char *argv[])
const char * rpmcliRootDir
char *const * ARGV_const_t
rpmts rpmtsFree(rpmts ts)
Destroy transaction set, closing the database as well.
struct rpmts_s * rpmts
The main types involved in transaction manipulation.
int rpmcliVerifySignatures(rpmts ts, ARGV_const_t argv)
Verify package signatures.
rpmtransFlags rpmtsSetFlags(rpmts ts, rpmtransFlags transFlags)
Set transaction flags, i.e.
rpmts rpmtsCreate(void)
Create an empty transaction set.
int rpmcliImportPubkeys(rpmts ts, ARGV_const_t argv)
Import public key(s) to rpm keyring.
struct poptOption rpmcliAllPoptTable[]
Popt option table for options shared by all modes and executables.