From 4b5856d1f8417d13334a167ff4ada29338b73bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Mon, 18 Jul 2011 07:59:54 +0000 Subject: [PATCH 1/2] fix build for CentOS 6 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/osc?expand=0&rev=95 --- osc.spec | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/osc.spec b/osc.spec index 433cb6a..f8a1426 100644 --- a/osc.spec +++ b/osc.spec @@ -62,11 +62,13 @@ Recommends: obs-service-format_spec_file Recommends: obs-service-source_validator %endif %endif -%if 0%{?rhel_version} || 0%{?centos_version} -%if 0%{?rhel_version} < 600 +%if 0%{?rhel_version} && 0%{?rhel_version} < 600 BuildRequires: python-elementtree Requires: python-elementtree %endif +%if 0%{?centos_version} && 0%{?centos_version} < 600 +BuildRequires: python-elementtree +Requires: python-elementtree %endif %if 0%{?suse_version}%{?mandriva_version} BuildRequires: python-m2crypto @@ -75,13 +77,6 @@ Requires: python-m2crypto > 0.19 BuildRequires: m2crypto Requires: m2crypto > 0.19 %endif -%if 0%{?mandriva_version} -BuildRequires: python-rpm -Requires: python-rpm -%else -BuildRequires: rpm-python -Requires: rpm-python -%endif %{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %description From dddc4d5b1cf56f16032d65e170c16e4b56cee356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Tue, 16 Aug 2011 14:07:14 +0000 Subject: [PATCH 2/2] Accepting request 79034 from home:namtrac:bugfix - Add osc-pubkey-parsing.patch, fix PGP pubkey parsing: base64 checksum shouldn't be in the key data, upstream commit f707e9a22e185098bbea923b7ff8971f19a87991 OBS-URL: https://build.opensuse.org/request/show/79034 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/osc?expand=0&rev=96 --- osc-pubkey-parsing.patch | 40 ++++++++++++++++++++++++++++++++++++++++ osc.changes | 7 +++++++ osc.spec | 2 ++ 3 files changed, 49 insertions(+) create mode 100644 osc-pubkey-parsing.patch diff --git a/osc-pubkey-parsing.patch b/osc-pubkey-parsing.patch new file mode 100644 index 0000000..8ff1100 --- /dev/null +++ b/osc-pubkey-parsing.patch @@ -0,0 +1,40 @@ +commit f707e9a22e185098bbea923b7ff8971f19a87991 +Author: Ludwig Nussel +Date: Fri Aug 5 13:52:42 2011 +0200 + + fix pgp pubkey parsing + + the base64 checksum must not be included in the key data. Newer rpm + don't like that. + +diff --git a/osc/checker.py b/osc/checker.py +index b4149d2..88eb7cc 100644 +--- a/osc/checker.py ++++ b/osc/checker.py +@@ -61,16 +61,24 @@ class Checker: + + key = '' + line = fd.readline() ++ crc = None + while line: + if line[0:12] == "-----END PGP": + break + line = line.rstrip() +- key += line +- line = fd.readline() ++ if (line[0] == '='): ++ crc = line[1:] ++ line = fd.readline() ++ break ++ else: ++ key += line ++ line = fd.readline() + fd.close() + if not line or line[0:12] != "-----END PGP": + raise KeyError(file, "not a pgp public key") + ++ # TODO: compute and compare CRC, see RFC 2440 ++ + bkey = base64.b64decode(key) + + r = self.ts.pgpImportPubkey(bkey) diff --git a/osc.changes b/osc.changes index 14daffb..c1755f0 100644 --- a/osc.changes +++ b/osc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Aug 16 13:08:11 UTC 2011 - idonmez@novell.com + +- Add osc-pubkey-parsing.patch, fix PGP pubkey parsing: base64 + checksum shouldn't be in the key data, upstream commit + f707e9a22e185098bbea923b7ff8971f19a87991 + ------------------------------------------------------------------- Thu Jul 7 04:51:09 UTC 2011 - adrian@suse.de diff --git a/osc.spec b/osc.spec index f8a1426..99aa6c5 100644 --- a/osc.spec +++ b/osc.spec @@ -25,6 +25,7 @@ Summary: openSUSE Build Service Commander Url: http://www.gitorious.org/opensuse/osc Group: Development/Tools/Other Source: %{name}-%{version}.tar.gz +Patch1: osc-pubkey-parsing.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?mandriva_version} < 02010 BuildRequires: python-urlgrabber @@ -88,6 +89,7 @@ introduction. %prep %setup -q +%patch1 -p1 %build CFLAGS="%{optflags}" python setup.py build