Hello community,

here is the log from the commit of package python-bugzilla for openSUSE:Factory 
checked in at 2012-02-03 10:25:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-bugzilla (Old)
 and      /work/SRC/openSUSE:Factory/.python-bugzilla.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-bugzilla", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-bugzilla/python-bugzilla.changes  
2011-09-23 12:42:31.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-bugzilla.new/python-bugzilla.changes     
2012-02-03 10:25:55.000000000 +0100
@@ -1,0 +2,13 @@
+Tue Jan 31 17:07:33 UTC 2012 - [email protected]
+
+- remove basic auth credentials from backtraces
+- Novell Bugzilla is the default when using bugzilla command line tool
+
+-------------------------------------------------------------------
+Fri Jan 27 17:53:03 UTC 2012 - [email protected]
+
+- update to openSUSE-1 tag from openSUSE's git branch
+  * better handling of NovellBugzilla instances
+  * using HTTP basic auth instead of IChain
+
+-------------------------------------------------------------------

Old:
----
  0006-cli-speedup-request-outputformat-fields-when-doing-q.patch
  0007-fixup-for-cli-speedup-with-query-outputformat.patch
  0013-obfuscated-password-support-in-oscrc.patch
  0014-fix-typo-in-url-argument.patch
  0015-novell-bugzilla-support-in-getBugzillaClassForURL.patch
  0016-novell-bugzilla-run-on-3.4.patch
  0017-allow-various-bnc-instances-in-NovellBugzilla.patch
  python-bugzilla-0.6.2.tar.bz2

New:
----
  python-bugzilla-0.6.2-backtraces.patch
  python-bugzilla-0.6.2-novell-default.patch
  python-bugzilla-0.6.2-openSUSE-1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-bugzilla.spec ++++++
--- /var/tmp/diff_new_pack.24BBD5/_old  2012-02-03 10:25:56.000000000 +0100
+++ /var/tmp/diff_new_pack.24BBD5/_new  2012-02-03 10:25:56.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-bugzilla
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -25,17 +25,12 @@
 Group:          Development/Libraries/Python
 License:        GPL-2.0+
 Url:            https://fedorahosted.org/python-bugzilla/
-Source:         
https://fedorahosted.org/releases/p/y/python-bugzilla/%{name}-%{version}.tar.bz2
-# generated from python-bugzilla/suse
-# https://gitorious.org/opensuse/python-bugzilla/commits/suse
-# cherry-picked patches from git format-patch 0.6.2...suse
-Patch0:         0006-cli-speedup-request-outputformat-fields-when-doing-q.patch
-Patch1:         0007-fixup-for-cli-speedup-with-query-outputformat.patch
-Patch2:         0013-obfuscated-password-support-in-oscrc.patch
-Patch3:         0014-fix-typo-in-url-argument.patch
-Patch4:         0015-novell-bugzilla-support-in-getBugzillaClassForURL.patch
-Patch5:         0016-novell-bugzilla-run-on-3.4.patch
-Patch6:         0017-allow-various-bnc-instances-in-NovellBugzilla.patch
+#Source:         
https://fedorahosted.org/releases/p/y/python-bugzilla/%{name}-%{version}.tar.bz2
+Source:         %{name}-%{version}-openSUSE-1.tar.bz2
+# https://gitorious.org/opensuse/python-bugzilla
+Patch0:         %{name}-0.6.2-novell-default.patch
+Patch1:         %{name}-0.6.2-backtraces.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  python-devel
 BuildArch:      noarch
@@ -56,11 +51,6 @@
 %setup -q
 %patch0 -p1 
 %patch1 -p1
-%patch2 -p1 
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
 
 %build
 export CFLAGS="%{optflags}"

++++++ python-bugzilla-0.6.2-backtraces.patch ++++++
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):
++++++ python-bugzilla-0.6.2-novell-default.patch ++++++
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()
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to