diff --git a/python-bugzilla-0.6.2-backtraces.patch b/python-bugzilla-0.6.2-backtraces.patch deleted file mode 100644 index b12d02a..0000000 --- a/python-bugzilla-0.6.2-backtraces.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff --git a/bugzilla/base.py b/bugzilla/base.py -index cfaea45..96a05d7 100644 ---- a/bugzilla/base.py -+++ b/bugzilla/base.py -@@ -1050,7 +1050,22 @@ class CookieTransport(xmlrpclib.Transport): - else: - request = request_with_cookies # python 2.6 and earlier - --class SafeCookieTransport(xmlrpclib.SafeTransport,CookieTransport): -+class BasicAuthTransport(xmlrpclib.SafeTransport): -+ """A subclass of xmlrpclib.SafeTransport that allows setting HTTP Basic Auth -+ without exposing it as part of URL in backtraces.""" -+ auth_params = None -+ -+ def get_host_info(self, host): -+ host, extra_headers, x509 = xmlrpclib.Transport.get_host_info(self, host) -+ if isinstance(self.auth_params, tuple): -+ import base64 -+ auth = base64.encodestring("%s:%s" % self.auth_params).strip() -+ if extra_headers is None: -+ extra_headers = [] -+ extra_headers.append(("Authorization", "Basic " + auth)) -+ return host, extra_headers, x509 -+ -+class SafeCookieTransport(BasicAuthTransport,CookieTransport): - '''SafeTransport subclass that supports cookies.''' - scheme = 'https' - # Override the appropriate request method -diff --git a/bugzilla/nvlbugzilla.py b/bugzilla/nvlbugzilla.py -index 7e2ec32..5804de4 100644 ---- a/bugzilla/nvlbugzilla.py -+++ b/bugzilla/nvlbugzilla.py -@@ -39,8 +39,8 @@ class NovellBugzilla(Bugzilla34): - super(NovellBugzilla, self).__init__(**kwargs) - - def _login(self, user, password): -- # using basic auth, so login happens implicitly at connect -- pass -+ # set up data for basic auth transport -+ self._transport.auth_params = (self.user, self.password) - - def _logout(self): - # using basic auth, no logout -@@ -57,17 +57,9 @@ class NovellBugzilla(Bugzilla34): - if not hostname.startswith('api'): - hostname = 'api'+hostname - -- self.readconfig() -- # set up basic auth url -- if self.user and self.password: -- hostname = self.user + ':' + self.password + '@' + hostname -- - # force https scheme (because of the basic auth) - url = urlparse.urlunsplit(('https', hostname, path, spliturl.query, spliturl.fragment)) -- ret = super(NovellBugzilla, self).connect(url) -- # prevent our username+pass url from showing up in __repr__ -- self.url = origurl -- return ret -+ return super(NovellBugzilla, self).connect(url) - - @classmethod - def _read_osc_password(cls, c): diff --git a/python-bugzilla-0.6.2-novell-default.patch b/python-bugzilla-0.6.2-novell-default.patch deleted file mode 100644 index a97ab11..0000000 --- a/python-bugzilla-0.6.2-novell-default.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: python-bugzilla-0.6.2/bin/bugzilla -=================================================================== ---- python-bugzilla-0.6.2.orig/bin/bugzilla -+++ python-bugzilla-0.6.2/bin/bugzilla -@@ -22,7 +22,7 @@ import xmlrpclib - from tempfile import NamedTemporaryFile - - version = '0.6.2' --default_bz = 'https://bugzilla.redhat.com/xmlrpc.cgi' -+default_bz = 'https://bugzilla.novell.com/xmlrpc.cgi' - - # Initial simple logging stuff - logging.basicConfig() diff --git a/python-bugzilla-0.6.2-openSUSE-1.tar.bz2 b/python-bugzilla-0.6.2-openSUSE-1.tar.bz2 deleted file mode 100644 index 3c9add5..0000000 --- a/python-bugzilla-0.6.2-openSUSE-1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2597f851fc5189bfa24fb19d5c32a65fc297735f3fa1074e6fc074729d07a5f2 -size 41538 diff --git a/python-bugzilla-0.6.2-section.patch b/python-bugzilla-0.6.2-section.patch deleted file mode 100644 index 3f38c17..0000000 --- a/python-bugzilla-0.6.2-section.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/bugzilla/nvlbugzilla.py -+++ b/bugzilla/nvlbugzilla.py -@@ -82,7 +82,12 @@ class NovellBugzilla(Bugzilla34): - - obs_url = self.__class__.obs_url - if not c.has_section(obs_url): -- return -+ if obs_url[-1:] == '/': -+ # strip the final slash and retry -+ self.__class__.obs_url = obs_url[:-1] -+ obs_url = self.__class__.obs_url -+ if not c.has_section(obs_url): -+ return - - try: - user = c.get(obs_url, 'user') diff --git a/python-bugzilla-0.8.0suse2.tar.bz2 b/python-bugzilla-0.8.0suse2.tar.bz2 new file mode 100644 index 0000000..05c8a2e --- /dev/null +++ b/python-bugzilla-0.8.0suse2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0bc2da5ce1e5852746cf3f657f1a27589de29959da308db63af74957ce380d8c +size 47898 diff --git a/python-bugzilla.changes b/python-bugzilla.changes index eb414ba..d229950 100644 --- a/python-bugzilla.changes +++ b/python-bugzilla.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri May 24 18:36:22 UTC 2013 - jmatejek@suse.com + +- update to 0.8.0 + * support for Bugzilla 4 and above + * streamlined internals +- update to suse2 from gitorious + * include all suse patches + * use osc's methods to parse .oscrc + ------------------------------------------------------------------- Wed May 22 12:13:06 UTC 2013 - speilicke@suse.com diff --git a/python-bugzilla.spec b/python-bugzilla.spec index db6ec5a..2ac2ca2 100644 --- a/python-bugzilla.spec +++ b/python-bugzilla.spec @@ -17,18 +17,14 @@ Name: python-bugzilla -Version: 0.6.2 +Version: 0.8.0suse2 Release: 0 Summary: Python library for bugzilla License: GPL-2.0+ Group: Development/Libraries/Python Url: https://fedorahosted.org/python-bugzilla/ -#Source: https://fedorahosted.org/releases/p/y/python-bugzilla/%{name}-%{version}.tar.bz2 -Source: %{name}-%{version}-openSUSE-1.tar.bz2 +Source: %{name}-%{version}.tar.bz2 # https://gitorious.org/opensuse/python-bugzilla -Patch0: %{name}-0.6.2-novell-default.patch -Patch1: %{name}-0.6.2-backtraces.patch -Patch2: %{name}-0.6.2-section.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-devel %if 0%{?suse_version} && 0%{?suse_version} <= 1110 @@ -36,6 +32,7 @@ BuildRequires: python-devel %else BuildArch: noarch %endif +Suggests: osc %description This is a python module that provides a nice, python-ish interface to Bugzilla @@ -50,17 +47,12 @@ but gosh - why not just write something in Python instead? %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 %build CFLAGS="%{optflags}" python setup.py build %install python setup.py install --root=%{buildroot} --prefix=%{_prefix} -#\ --record-rpm=INSTALLED_FILES -#sed -i 's#%{_mandir}/man1/bugzilla.1#%{_mandir}/man1/bugzilla.1.gz#' INSTALLED_FILES %files %defattr(-,root,root,-)