summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--lib/poptQV.c20
-rw-r--r--lib/rpmcli.h12
-rw-r--r--rpmpopt.in3
-rw-r--r--rpmqv.c44
5 files changed, 5 insertions, 76 deletions
diff --git a/Makefile.am b/Makefile.am
index 1398e0f38..3d90f3833 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -93,7 +93,7 @@ libcliutils_la_LIBADD = lib/librpm.la rpmio/librpmio.la
libcliutils_la_LIBADD += @WITH_POPT_LIB@
rpm_SOURCES = rpmqv.c debug.h system.h
-rpm_CPPFLAGS = $(AM_CPPFLAGS) -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV
+rpm_CPPFLAGS = $(AM_CPPFLAGS) -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMQV
rpm_LDADD = libcliutils.la
rpm_LDADD += build/librpmbuild.la lib/librpm.la rpmio/librpmio.la
rpm_LDADD += @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
diff --git a/lib/poptQV.c b/lib/poptQV.c
index d57c64eb6..a3831da00 100644
--- a/lib/poptQV.c
+++ b/lib/poptQV.c
@@ -36,11 +36,6 @@ static void rpmQVSourceArgCallback( poptContext con,
case 'q': /* from --query, -q */
case 'Q': /* from --querytags (handled by poptALL) */
case 'V': /* from --verify, -V */
- case 'A': /* from --addsign */
- case 'D': /* from --delsign */
- case 'I': /* from --import */
- case 'K': /* from --checksig, -K */
- case 'R': /* from --resign */
if (qva->qva_mode == '\0' || strchr("qQ ", qva->qva_mode)) {
qva->qva_mode = opt->val;
}
@@ -279,18 +274,3 @@ struct poptOption rpmVerifyPoptTable[] = {
POPT_TABLEEND
};
-
-/**
- * Signature mode options.
- */
-struct poptOption rpmSignPoptTable[] = {
-/* FIX: cast? */
- { NULL, '\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE,
- rpmQVSourceArgCallback, 0, NULL, NULL },
- { "checksig", 'K', 0, NULL, 'K',
- N_("verify package signature(s)"), NULL },
- { "import", '\0', 0, NULL, 'I',
- N_("import an armored public key"), NULL },
-
- POPT_TABLEEND
-};
diff --git a/lib/rpmcli.h b/lib/rpmcli.h
index 001df9f97..63968cb25 100644
--- a/lib/rpmcli.h
+++ b/lib/rpmcli.h
@@ -423,18 +423,6 @@ extern struct poptOption rpmDatabasePoptTable[];
/** \name RPMK */
/** \ingroup rpmcli
- * Bit(s) to control rpmReSign() operation.
- */
-typedef enum rpmSignFlags_e {
- RPMSIGN_CHK_SIGNATURE = 'K', /*!< from --checksig */
- RPMSIGN_IMPORT_PUBKEY = 'I', /*!< from --import */
-} rpmSignFlags;
-
-/** \ingroup rpmcli
- */
-extern struct poptOption rpmSignPoptTable[];
-
-/** \ingroup rpmcli
* Create/delete package signatures.
* @param argv array of package path arguments (NULL terminated)
* @param deleting adding or deleting signature(s)
diff --git a/rpmpopt.in b/rpmpopt.in
index 037c885b1..d3777216a 100644
--- a/rpmpopt.in
+++ b/rpmpopt.in
@@ -161,6 +161,9 @@ rpm alias --httpproxy --define '_httpproxy !#:+'
rpm exec --addsign @BINDIR@/rpmsign --addsign
rpm exec --delsign @BINDIR@/rpmsign --delsign
rpm exec --resign @BINDIR@/rpmsign --resign
+rpm exec --checksig @BINDIR@/rpmkeys --checksig
+rpm exec -K @BINDIR@/rpmkeys --checksig
+rpm exec --import @BINDIR@/rpmkeys --import
#==============================================================================
rpmbuild alias --dbpath --define '_dbpath !#:+' \
diff --git a/rpmqv.c b/rpmqv.c
index a728fdcad..436665d92 100644
--- a/rpmqv.c
+++ b/rpmqv.c
@@ -23,10 +23,6 @@ enum modes {
MODE_ERASE = (1 << 2),
#define MODES_IE (MODE_INSTALL | MODE_ERASE)
- MODE_CHECKSIG = (1 << 6),
- MODE_KEYRING = (1 << 8),
-#define MODES_K (MODE_CHECKSIG | MODE_KEYRING)
-
MODE_INITDB = (1 << 10),
MODE_REBUILDDB = (1 << 12),
MODE_VERIFYDB = (1 << 13),
@@ -39,7 +35,7 @@ enum modes {
#define MODES_FOR_DBPATH (MODES_IE | MODES_QV | MODES_DB)
#define MODES_FOR_NODEPS (MODES_IE | MODE_VERIFY)
#define MODES_FOR_TEST (MODES_IE)
-#define MODES_FOR_ROOT (MODES_IE | MODES_QV | MODES_DB | MODES_K)
+#define MODES_FOR_ROOT (MODES_IE | MODES_QV | MODES_DB)
static int quiet;
@@ -58,12 +54,6 @@ static struct poptOption optionsTable[] = {
NULL },
#endif /* IAM_RPMQV */
-#ifdef IAM_RPMK
- { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmSignPoptTable, 0,
- N_("Signature options:"),
- NULL },
-#endif /* IAM_RPMK */
-
#ifdef IAM_RPMDB
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmDatabasePoptTable, 0,
N_("Database options:"),
@@ -104,10 +94,6 @@ int main(int argc, char *argv[])
struct rpmDatabaseArguments_s * da = &rpmDBArgs;
#endif
-#if defined(IAM_RPMK)
- QVA_t ka = &rpmQVKArgs;
-#endif
-
poptContext optCon;
int ec = 0;
#ifdef IAM_RPMEIU
@@ -127,7 +113,6 @@ int main(int argc, char *argv[])
switch (bigMode) {
case MODE_QUERY: qva->qva_mode = 'q'; break;
case MODE_VERIFY: qva->qva_mode = 'V'; break;
- case MODE_CHECKSIG: qva->qva_mode = 'K'; break;
case MODE_INSTALL:
case MODE_ERASE:
case MODE_INITDB:
@@ -200,19 +185,6 @@ int main(int argc, char *argv[])
}
#endif /* IAM_RPMEIU */
-#ifdef IAM_RPMK
- if (bigMode == MODE_UNKNOWN || (bigMode & MODES_K)) {
- switch (ka->qva_mode) {
- case RPMSIGN_IMPORT_PUBKEY:
- bigMode = MODE_KEYRING;
- break;
- case RPMSIGN_CHK_SIGNATURE:
- bigMode = MODE_CHECKSIG;
- break;
- }
- }
-#endif /* IAM_RPMK */
-
#if defined(IAM_RPMEIU)
if (!( bigMode == MODE_INSTALL ) &&
(ia->probFilter & (RPMPROB_FILTER_REPLACEPKG | RPMPROB_FILTER_OLDPACKAGE)))
@@ -406,24 +378,10 @@ int main(int argc, char *argv[])
} break;
#endif /* IAM_RPMQV */
-#ifdef IAM_RPMK
- case MODE_KEYRING:
- if (!poptPeekArg(optCon))
- argerror(_("no arguments given"));
- ec = rpmcliImportPubkeys(ts, (ARGV_const_t) poptGetArgs(optCon));
- break;
- case MODE_CHECKSIG:
- ec = rpmcliVerifySignatures(ts, (ARGV_const_t) poptGetArgs(optCon));
- break;
-#endif /* IAM_RPMK */
-
#if !defined(IAM_RPMQV)
case MODE_QUERY:
case MODE_VERIFY:
#endif
-#if !defined(IAM_RPMK)
- case MODE_CHECKSIG:
-#endif
#if !defined(IAM_RPMDB)
case MODE_INITDB:
case MODE_REBUILDDB: