Make smartpm rpm5 support check signatures config.
PATCH 1/1 Make smartpm rpm5 support check signatures config.
RPMv5 has removed support for _RPMVSF_NOSIGNATURES, the flag can be replaced with a flags set:
"RPMVSF_NODSAHEADER|RPMVSF_NORSAHEADER|RPMVSF_NODSA RPMVSF_NORSA"
Signed-off-by Haiqing Bai <[email protected]>
Signed-off-by Mingli Yu <[email protected]>
--- .../python/python-smartpm/smartpm-rpm5-nodig.patch | 59 ----------- .../smartpm-rpm5-support-check-signatures.patch | 112 +++++++++++++++++++++ meta/recipes-devtools/python/python-smartpm_git.bb | 2 +- 3 files changed, 113 insertions(+), 60 deletions(-) delete mode 100644 meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-nodig.patch create mode 100644 meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch
meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-nodig.patch deleted +0 -59
@@ -1,59 +0,0 @@ -RPM5 has removed support for RPMVSF_NOSIGNATURES - -Patch smart to no longer use this flag - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle <[email protected]> - -diff --git a/smart/backends/rpm/base.py b/smart/backends/rpm/base.py ---- a/smart/backends/rpm/base.py -+++ b/smart/backends/rpm/base.py -@@ -63,11 +63,11 @@ def getTS(new=False): - if sysconf.get("rpm-dbpath"): - rpm.addMacro('_dbpath', "/" + sysconf.get("rpm-dbpath")) - getTS.ts = rpm.ts(getTS.root) -- if not sysconf.get("rpm-check-signatures", False): -- if hasattr(rpm, '_RPMVSF_NOSIGNATURES'): -- getTS.ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES) -- else: -- raise Error, _("rpm requires checking signatures") -+ #if not sysconf.get("rpm-check-signatures", False): -+ # if hasattr(rpm, '_RPMVSF_NOSIGNATURES'): -+ # getTS.ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES) -+ # else: -+ # raise Error, _("rpm requires checking signatures") - rpm_dbpath = sysconf.get("rpm-dbpath", "var/lib/rpm") - dbdir = rpm_join_dbpath(getTS.root, rpm_dbpath) - if not os.path.isdir(dbdir): -@@ -89,11 +89,11 @@ def getTS(new=False): - if sysconf.get("rpm-dbpath"): - rpm.addMacro('_dbpath', "/" + sysconf.get("rpm-dbpath")) - ts = rpm.ts(getTS.root) -- if not sysconf.get("rpm-check-signatures", False): -- if hasattr(rpm, '_RPMVSF_NOSIGNATURES'): -- ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES) -- else: -- raise Error, _("rpm requires checking signatures") -+ #if not sysconf.get("rpm-check-signatures", False): -+ # if hasattr(rpm, '_RPMVSF_NOSIGNATURES'): -+ # ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES) -+ # else: -+ # raise Error, _("rpm requires checking signatures") - return ts - else: - return getTS.ts -diff --git a/smart/plugins/yumchannelsync.py b/smart/plugins/yumchannelsync.py ---- a/smart/plugins/yumchannelsync.py -+++ b/smart/plugins/yumchannelsync.py -@@ -56,8 +56,8 @@ def _getreleasever(): - - rpmroot = sysconf.get("rpm-root", "/") - ts = rpmUtils.transaction.initReadOnlyTransaction(root=rpmroot) -- if hasattr(rpm, '_RPMVSF_NOSIGNATURES') and hasattr(rpm, '_RPMVSF_NODIGESTS'): -- ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS)) -+ #if hasattr(rpm, '_RPMVSF_NOSIGNATURES') and hasattr(rpm, '_RPMVSF_NODIGESTS'): -+ # ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS)) - releasever = None - # HACK: we're hard-coding the most used distros, will add more if needed - idx = ts.dbMatch('provides', 'fedora-release')
meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch new file +112 -0
112 lines not on this page · raw message
meta/recipes-devtools/python/python-smartpm_git.bb +1 -1
@@ -13,7 +13,6 @@ SRCNAME = "smart" SRC_URI = "\ git://github.com/smartpm/smart.git \ - file://smartpm-rpm5-nodig.patch \ file://smart-recommends.patch \ file://smart-channelsdir.patch \ file://smart-rpm-transaction-failure-check.patch \
@@ -25,6 +24,7 @@ SRC_URI = "\ file://smart-cache.py-getPackages-matches-name-version.patch \ file://smart-channel-remove-all.patch \ file://smart-locale.patch \ + file://smartpm-rpm5-support-check-signatures.patch \ " SRCREV = "407a7eca766431257dcd1da15175cc36a1bb22d0"
Signature · 1 line
2.8.1