]> git.pld-linux.org Git - packages/rpm.git/commitdiff
reenabled --nosignature works the wrong way in --query mode (but not in --verify)
authorTomasz Pala <gotar@pld-linux.org>
Sat, 10 Sep 2016 11:00:49 +0000 (13:00 +0200)
committerTomasz Pala <gotar@pld-linux.org>
Sat, 10 Sep 2016 11:00:49 +0000 (13:00 +0200)
http://rpm5.org/community/rpm-devel/5655.html
https://patchwork.openembedded.org/patch/126825/raw/

rpm-5.4.9-support-signatures-and-digest-disablers.patch

index af9e1a73a9bebefe7a67cc4fef6d21d6176b6bf1..4d7b1ab4dd51093b579cd8cd2871f3a25b19afa1 100644 (file)
@@ -1,11 +1,63 @@
---- rpm-5.4.9/system.h.nosig~  2012-05-16 20:52:58.216415034 +0200
-+++ rpm-5.4.9/system.h 2012-05-16 20:53:29.053598105 +0200
-@@ -746,7 +746,7 @@ static inline const char *rcsid(const ch
+From d8fcc3cbeec4defb5babde5bd09ea294dd3fd08b Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 3 Jul 2016 19:01:59 -0700
+Subject: [PATCH] system.h/query.c: support nosignature
+
+* Define SUPPORT_NOSIGNATURES to 1 in system.h
+* !QVA_ISSET(qva->qva_flags, SIGNATURE) -> QVA_ISSET(qva->qva_flags, SIGNATURE),
+  otherwise, when use --nosignature would read database and verify
+  signature, this is not expected.
+
+Upstream-Status: Submitting [Sent email to rpm-devel@rpm5.org]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ lib/query.c | 6 +++---
+ system.h    | 4 ++--
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/query.c b/lib/query.c
+index 50a7453..b761d76 100644
+--- a/lib/query.c
++++ b/lib/query.c
+@@ -954,19 +954,19 @@ JBJDEBUG((stderr, "--> %s(%p,%p,%p)\n", __FUNCTION__, ts, qva, argv));
+     vsflags = (rpmVSFlags) rpmExpandNumeric("%{?_vsflags_query}");
+     vsflags = (rpmVSFlags) 0; /* XXX FIXME: ignore default disablers. */
+ #if defined(SUPPORT_NOSIGNATURES)
+-    if (!QVA_ISSET(qva->qva_flags, DIGEST)) {
++    if (QVA_ISSET(qva->qva_flags, DIGEST)) {
+       VSF_SET(vsflags, NOSHA1HEADER);
+       VSF_SET(vsflags, NOMD5HEADER);
+       VSF_SET(vsflags, NOSHA1);
+       VSF_SET(vsflags, NOMD5);
+     }
+-    if (!QVA_ISSET(qva->qva_flags, SIGNATURE)) {
++    if (QVA_ISSET(qva->qva_flags, SIGNATURE)) {
+       VSF_SET(vsflags, NODSAHEADER);
+       VSF_SET(vsflags, NORSAHEADER);
+       VSF_SET(vsflags, NODSA);
+       VSF_SET(vsflags, NORSA);
+     }
+-    if (!QVA_ISSET(qva->qva_flags, HDRCHK)) {
++    if (QVA_ISSET(qva->qva_flags, HDRCHK)) {
+       VSF_SET(vsflags, NOHDRCHK);
+     }
+     VSF_CLR(vsflags, NEEDPAYLOAD);    /* XXX needed? */
+diff --git a/system.h b/system.h
+index 2ff8906..ad4619a 100644
+--- a/system.h
++++ b/system.h
+@@ -787,9 +787,9 @@ static inline const char *rcsid(const char *p) { \
+ #define SUPPORT_I18NSTRING_TYPE       1
  /**
-  * Eliminate signature/digest disablers.
+- * Eliminate signature/digest disablers.
++ * Signature/digest disablers.
   */
 -#undef        SUPPORT_NOSIGNATURES
-+#define       SUPPORT_NOSIGNATURES 1
++#define SUPPORT_NOSIGNATURES 1
  
  /**
   * Permit ar(1) payloads. Disabled while rpmio/iosm.c is under development.
+-- 
+2.9.0
This page took 0.039413 seconds and 4 git commands to generate.