Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-bugzilla.16007 for openSUSE:Leap:15.2:Update checked in at 2021-10-31 16:06:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2:Update/python-bugzilla.16007 (Old) and /work/SRC/openSUSE:Leap:15.2:Update/.python-bugzilla.16007.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-bugzilla.16007" Sun Oct 31 16:06:54 2021 rev:1 rq:927739 version:2.3.0 Changes: -------- New Changes file: --- /dev/null 2021-10-14 08:13:55.193858881 +0200 +++ /work/SRC/openSUSE:Leap:15.2:Update/.python-bugzilla.16007.new.1890/python-bugzilla.changes 2021-10-31 16:06:54.553611953 +0100 @@ -0,0 +1,184 @@ +------------------------------------------------------------------- +Tue Oct 26 10:03:51 UTC 2021 - Julio Gonz??lez Gil <jgonza...@suse.com> + +- Fix HTTP Basic authentication for python3 (bsc#1098219) +- Modified: + * 106-basic-auth.diff + +------------------------------------------------------------------- +Wed Oct 16 12:51:01 UTC 2019 - Julio Gonz??lez Gil <jgonza...@suse.com> + +- Backport from upstream: HTTP Basic authentication feature (as used + by SUSE and openSUSE) (bsc#1098219) +- Add: + * 106-basic-auth.diff + +------------------------------------------------------------------- +Sun Sep 15 13:41:23 UTC 2019 - John Vandenberg <jay...@gmail.com> + +- Update to v2.3.0 + * restrict-login support + * cli: Add support for private attachments + * Fix python3 deprecation warnings + * Drop python 3.3 support, minimum python3 is python 3.4 now + +------------------------------------------------------------------- +Thu Aug 16 09:32:14 UTC 2018 - mc...@suse.com + +- Update to 2.2.0: + - Port tests to pytest + - cli: --cert Client side certificate support (Tobias Wolter) + - cli: add ability to post comment while sending attachment (Jeff Mahoney) + - cli: Add --comment-tag option + - cli: Add info --active-components + - Add a raw Product.get wrapper API + +------------------------------------------------------------------- +Mon May 7 15:13:13 UTC 2018 - dims...@opensuse.org + +- Fix conflict for python-bugzillatools: we have to take extra care + for the single-spec rewritter not to conflict with + python2-bugzillatools in the end (which does not exist). + +------------------------------------------------------------------- +Wed May 2 07:10:38 UTC 2018 - tbecht...@suse.com + +- Add Conflicts for python-bugzillatools + +------------------------------------------------------------------- +Mon Apr 30 15:00:32 UTC 2018 - jeng...@inai.de + +- Trim history lesson and rhetoric wording from %description. + +------------------------------------------------------------------- +Wed Apr 25 10:36:02 UTC 2018 - tbecht...@suse.com + +- convert to singlespec +- use pypi as source +- update url + +------------------------------------------------------------------- +Wed Apr 25 10:21:27 UTC 2018 - tbecht...@suse.com + +- update to 2.1.0: + - Support for bugzilla 5 API Keys (Dustin J. Mitchell) + - bugzillarc can be used to set default URL for the cli tool + - Revive update_flags wrapper + - Bug fixes and minor improvements + - Several fixes for use with bugzilla 5 + - Bugzilla.bug_autorefresh now defaults to False + - Credentials are now cached in ~/.cache/python-bugzilla/ + - bin/bugzilla was converted to argparse + - bugzilla query --boolean_chart option is removed + - Unify command line flags across sub commands +- drop NovellBugzilla.patch (no longer needed) + +------------------------------------------------------------------- +Thu Jul 14 13:09:51 UTC 2016 - jseg...@novell.com + +- Update to version 1.2.2 +- Added NovellBugzilla.patch to ensure it works with SUSE internal + bugzilla. + +------------------------------------------------------------------- +Tue Sep 23 12:32:08 UTC 2014 - bwiedem...@suse.com + +- update nvlbugzilla.py to reflect that server now has ver 4.4 + +------------------------------------------------------------------- +Thu Jun 27 16:29:47 UTC 2013 - jmate...@suse.com + +- update to 0.9.0 + * CVE-2013-2191: Switch to pycurl to get SSL host and cert validation + (fixes bnc#825876) + * bugzilla: modify: add --dependson (Don Zickus) + * bugzilla: new: add --groups option (Paul Frields) + * bugzilla: modify: Allow setting nearly every bug parameter +- update to suse3 from gitorious + * remerged NovellBugzilla functionality + (upstream inclusion pending bnc#822053) + +------------------------------------------------------------------- +Fri May 24 18:36:22 UTC 2013 - jmate...@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 - speili...@suse.com + +- Apply python-bugzilla-0.6.2-section.patch +- Cleanup spec file +- Package README + +------------------------------------------------------------------- +Thu May 16 13:01:19 UTC 2013 - wer...@suse.de + +- Fix UL sections that is check also for URL without final slash + this may fix bnc#807901 + +------------------------------------------------------------------- +Thu Jan 3 17:33:50 UTC 2013 - toddrme2...@gmail.com + +- Fix building on SLES 11 + +------------------------------------------------------------------- +Tue Jan 31 17:07:33 UTC 2012 - jmate...@suse.com + +- 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 - jmate...@suse.com + +- update to openSUSE-1 tag from openSUSE's git branch + * better handling of NovellBugzilla instances + * using HTTP basic auth instead of IChain + +------------------------------------------------------------------- +Fri Jul 29 09:04:07 UTC 2011 - mvysko...@suse.cz + +- update to 0.6.2, rebased all patches + * backport --outputformat feature from git + +------------------------------------------------------------------- +Fri Jul 29 08:50:47 UTC 2011 - mvysko...@suse.cz + +- add 0005-Add-Bugzilla34._query.patch fixing query command +- add 0020-allow-various-bnc-instances-in-NovellBugzilla.patch + +------------------------------------------------------------------- +Mon May 23 12:36:47 UTC 2011 - mvysko...@suse.cz + +- update to 0.6.1 + * many new parameters for bugzilla command-line tool like --target_milestone, + --private, --status, --assignee, et all + * add support for Bugzilla 36 + * Unicode related fixes +- SUSE specific fixes + * novell bugzilla support in getBugzillaClassForURL + * obfuscated password support in oscrc + * move novell bugzilla to 3.4 + * xmlrpclib changes done in python 2.7 from master [bug#685842] +- create suse branch for stashing SUSE specific changes + https://gitorious.org/opensuse/python-bugzilla/commits/suse + +------------------------------------------------------------------- +Thu Jun 17 15:55:51 CEST 2010 - matej...@suse.cz + +- recognize Novell bugzilla in default constructor + +------------------------------------------------------------------- +Wed Aug 26 09:18:54 UTC 2009 - mvysko...@suse.cz + +- Added a patch with support of obfuscated passwords introduced in osc-0.121 + +------------------------------------------------------------------- +Wed Jul 22 08:52:01 CEST 2009 - mvysko...@suse.cz + +- Initial packaging of python-bugzilla 0.5 with Novell Bugzilla patches + New: ---- 106-basic-auth.diff _service python-bugzilla-2.3.0.tar.gz python-bugzilla.changes python-bugzilla.spec ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-bugzilla.spec ++++++ # # spec file for package python-bugzilla # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python Name: python-bugzilla Version: 2.3.0 Release: 0 Summary: Python library for Bugzilla License: GPL-2.0-or-later Group: Development/Libraries/Python URL: https://github.com/python-bugzilla/python-bugzilla Source: https://files.pythonhosted.org/packages/source/p/python-bugzilla/python-bugzilla-%{version}.tar.gz Patch0: 106-basic-auth.diff BuildRequires: %{python_module pytest} BuildRequires: %{python_module requests} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-requests Requires(post): update-alternatives Requires(postun): update-alternatives Suggests: osc Conflicts: %{oldpython}-bugzillatools BuildArch: noarch %python_subpackages %description This is a Python module that provides a Python-ish interface to Bugzilla over XMLRPC. It supports the Web Services provided by upstream Bugzilla 3.0 and 3.2. It also includes a 'bugzilla' commandline client which can be used for quick, ad-hoc bugzilla jiggery-pokery. %prep %setup -q %patch0 -p1 sed -i -e '1{/^#!\/usr\/bin\/env python/d}' bugzilla/_cli.py %build export CFLAGS="%{optflags}" %python_build %install %python_install %python_clone -a %{buildroot}%{_bindir}/bugzilla %python_clone -a %{buildroot}%{_mandir}/man1/bugzilla.1 %python_expand %fdupes %{buildroot}%{$python_sitelib} %post %{python_install_alternative bugzilla bugzilla.1} %postun %python_uninstall_alternative bugzilla %check %python_expand py.test-%{$python_version} %files %{python_files} %defattr(-,root,root,-) %python_alternative %{_bindir}/bugzilla %python_alternative %{_mandir}/man1/bugzilla.1%{ext_man} %{python_sitelib}/bugzilla %{python_sitelib}/python_bugzilla-%{version}-py*.egg-info %changelog ++++++ 106-basic-auth.diff ++++++ Index: python-bugzilla-2.3.0/bugzilla/base.py =================================================================== --- python-bugzilla-2.3.0.orig/bugzilla/base.py +++ python-bugzilla-2.3.0/bugzilla/base.py @@ -24,13 +24,13 @@ if sys.version_info[0] >= 3: from collections.abc import Mapping from configparser import ConfigParser from http.cookiejar import LoadError, MozillaCookieJar - from urllib.parse import urlparse, parse_qsl + from urllib.parse import urlparse, urlunparse, parse_qsl from xmlrpc.client import Binary, Fault else: from collections import Mapping from ConfigParser import SafeConfigParser as ConfigParser from cookielib import LoadError, MozillaCookieJar - from urlparse import urlparse, parse_qsl + from urlparse import urlparse, urlunparse, parse_qsl from xmlrpclib import Binary, Fault # pylint: enable=import-error @@ -216,13 +216,16 @@ class Bugzilla(object): """ Turn passed url into a bugzilla XMLRPC web url """ - if '://' not in url: + scheme, netloc, path, params, query, fragment = urlparse(url) + if not scheme: log.debug('No scheme given for url, assuming https') - url = 'https://' + url - if url.count('/') < 3: + scheme = 'https' + + if not path: log.debug('No path given for url, assuming /xmlrpc.cgi') - url = url + '/xmlrpc.cgi' - return url + path = 'xmlrpc.cgi' + + return urlunparse((scheme, netloc, path, params, query, fragment)) @staticmethod def _listify(val): @@ -235,7 +238,7 @@ class Bugzilla(object): def __init__(self, url=-1, user=None, password=None, cookiefile=-1, sslverify=True, tokenfile=-1, use_creds=True, api_key=None, - cert=None, configpaths=-1): + cert=None, configpaths=-1, basic_auth=False): """ :param url: The bugzilla instance URL, which we will connect to immediately. Most users will want to specify this at @@ -264,6 +267,7 @@ class Bugzilla(object): to file or directory for custom certs. :param api_key: A bugzilla5+ API key :param configpaths: A list of possible bugzillarc locations. + :param basic_auth: Use headers with HTTP Basic authentication """ if url == -1: raise TypeError("Specify a valid bugzilla url, or pass url=None") @@ -301,6 +305,7 @@ class Bugzilla(object): self.cookiefile = cookiefile self.tokenfile = tokenfile self.configpath = configpaths + self._basic_auth = basic_auth if url: self.connect(url) @@ -566,6 +571,9 @@ class Bugzilla(object): """ Backend login method for Bugzilla3 """ + if self._basic_auth: + self._transport.set_basic_auth(user, password) + payload = {'login': user, 'password': password} if restrict_login: payload['restrict_login'] = True Index: python-bugzilla-2.3.0/bugzilla/transport.py =================================================================== --- python-bugzilla-2.3.0.orig/bugzilla/transport.py +++ python-bugzilla-2.3.0/bugzilla/transport.py @@ -4,15 +4,18 @@ # option) any later version. See http://www.gnu.org/copyleft/gpl.html for # the full text of the license. +import base64 from logging import getLogger import sys # pylint: disable=import-error if sys.version_info[0] >= 3: + PY3 = True from configparser import ConfigParser from urllib.parse import urlparse # pylint: disable=no-name-in-module from xmlrpc.client import Fault, ProtocolError, ServerProxy, Transport else: + PY3 = False from ConfigParser import SafeConfigParser as ConfigParser from urlparse import urlparse from xmlrpclib import Fault, ProtocolError, ServerProxy, Transport @@ -144,6 +147,19 @@ class _RequestsTransport(Transport): if cert: self.session.cert = cert + def set_basic_auth(self, user, password): + """ + Set basic authentication method. + + :return: + """ + if PY3: + b64str = base64.b64encode("{}:{}".format(user, password).encode("utf-8")) + else: + b64str = base64.b64encode("{}:{}".format(user, password)) + authstr = "Basic {}".format(b64str.decode("utf-8")) + self.request_defaults["headers"]["Authorization"] = authstr + def parse_response(self, response): """ Parse XMLRPC response ++++++ _service ++++++ <services> <service name="download_files" mode="localonly"/> </services>