Compare commits
7 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| c9a3699157 | |||
| eecc63f369 | |||
| 73dca3eb5f | |||
| b1ab92035d | |||
| 9f336becbf | |||
| 8b4459e997 | |||
| e25f5617d2 |
@@ -1,42 +1,10 @@
|
|||||||
--- python-bugzilla-3.2.0.orig/bugzilla/base.py 2022-01-12 19:09:08.000000000 +0100
|
---
|
||||||
+++ python-bugzilla-3.2.0/bugzilla/base.py 2022-12-21 09:32:01.324613243 +0100
|
bugzilla/_backendxmlrpc.py | 14 ++++++++++++++
|
||||||
@@ -174,7 +174,8 @@
|
bugzilla/base.py | 7 ++++++-
|
||||||
def __init__(self, url=-1, user=None, password=None, cookiefile=-1,
|
2 files changed, 20 insertions(+), 1 deletion(-)
|
||||||
sslverify=True, tokenfile=-1, use_creds=True, api_key=None,
|
|
||||||
cert=None, configpaths=-1,
|
|
||||||
- force_rest=False, force_xmlrpc=False, requests_session=None):
|
|
||||||
+ force_rest=False, force_xmlrpc=False, requests_session=None,
|
|
||||||
+ basic_auth=False):
|
|
||||||
"""
|
|
||||||
:param url: The bugzilla instance URL, which we will connect
|
|
||||||
to immediately. Most users will want to specify this at
|
|
||||||
@@ -207,6 +208,7 @@
|
|
||||||
:param requests_session: An optional requests.Session object the
|
|
||||||
API will use to contact the remote bugzilla instance. This
|
|
||||||
way the API user can set up whatever auth bits they may need.
|
|
||||||
+ :param basic_auth: Use headers with HTTP Basic authentication
|
|
||||||
"""
|
|
||||||
if url == -1:
|
|
||||||
raise TypeError("Specify a valid bugzilla url, or pass url=None")
|
|
||||||
@@ -246,6 +248,7 @@
|
|
||||||
|
|
||||||
self._settokenfile(tokenfile)
|
--- a/bugzilla/_backendxmlrpc.py
|
||||||
self._setconfigpath(configpaths)
|
+++ b/bugzilla/_backendxmlrpc.py
|
||||||
+ self._basic_auth = basic_auth
|
|
||||||
|
|
||||||
if url:
|
|
||||||
self.connect(url)
|
|
||||||
@@ -598,6 +601,8 @@
|
|
||||||
raise ValueError("missing username")
|
|
||||||
if not self.password:
|
|
||||||
raise ValueError("missing password")
|
|
||||||
+ if self._basic_auth:
|
|
||||||
+ self._backend.set_basic_auth(self.user, self.password)
|
|
||||||
|
|
||||||
payload = {"login": self.user}
|
|
||||||
if restrict_login:
|
|
||||||
--- python-bugzilla-3.2.0.orig/bugzilla/_backendxmlrpc.py 2022-01-12 19:09:08.000000000 +0100
|
|
||||||
+++ python-bugzilla-3.2.0/bugzilla/_backendxmlrpc.py 2022-12-21 09:35:40.471278786 +0100
|
|
||||||
@@ -2,6 +2,7 @@
|
@@ -2,6 +2,7 @@
|
||||||
# See the COPYING file in the top-level directory.
|
# See the COPYING file in the top-level directory.
|
||||||
|
|
||||||
@@ -45,7 +13,7 @@
|
|||||||
import sys
|
import sys
|
||||||
from xmlrpc.client import (Binary, Fault, ProtocolError,
|
from xmlrpc.client import (Binary, Fault, ProtocolError,
|
||||||
ServerProxy, Transport)
|
ServerProxy, Transport)
|
||||||
@@ -127,6 +128,9 @@
|
@@ -127,6 +128,9 @@ class _BugzillaXMLRPCProxy(ServerProxy,
|
||||||
# pylint: enable=no-member
|
# pylint: enable=no-member
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
@@ -55,7 +23,7 @@
|
|||||||
|
|
||||||
|
|
||||||
class _BackendXMLRPC(_BackendBase):
|
class _BackendXMLRPC(_BackendBase):
|
||||||
@@ -142,6 +146,16 @@
|
@@ -142,6 +146,16 @@ class _BackendXMLRPC(_BackendBase):
|
||||||
def is_xmlrpc(self):
|
def is_xmlrpc(self):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@@ -72,3 +40,40 @@
|
|||||||
def bugzilla_version(self):
|
def bugzilla_version(self):
|
||||||
return self._xmlrpc_proxy.Bugzilla.version()
|
return self._xmlrpc_proxy.Bugzilla.version()
|
||||||
|
|
||||||
|
--- a/bugzilla/base.py
|
||||||
|
+++ b/bugzilla/base.py
|
||||||
|
@@ -177,7 +177,8 @@ 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,
|
||||||
|
- force_rest=False, force_xmlrpc=False, requests_session=None):
|
||||||
|
+ force_rest=False, force_xmlrpc=False, requests_session=None,
|
||||||
|
+ basic_auth=False):
|
||||||
|
"""
|
||||||
|
:param url: The bugzilla instance URL, which we will connect
|
||||||
|
to immediately. Most users will want to specify this at
|
||||||
|
@@ -210,6 +211,7 @@ class Bugzilla(object):
|
||||||
|
:param requests_session: An optional requests.Session object the
|
||||||
|
API will use to contact the remote bugzilla instance. This
|
||||||
|
way the API user can set up whatever auth bits they may need.
|
||||||
|
+ :param basic_auth: Use headers with HTTP Basic authentication
|
||||||
|
"""
|
||||||
|
if url == -1:
|
||||||
|
raise TypeError("Specify a valid bugzilla url, or pass url=None")
|
||||||
|
@@ -249,6 +251,7 @@ class Bugzilla(object):
|
||||||
|
|
||||||
|
self._settokenfile(tokenfile)
|
||||||
|
self._setconfigpath(configpaths)
|
||||||
|
+ self._basic_auth = basic_auth
|
||||||
|
|
||||||
|
if url:
|
||||||
|
self.connect(url)
|
||||||
|
@@ -601,6 +604,8 @@ class Bugzilla(object):
|
||||||
|
raise ValueError("missing username")
|
||||||
|
if not self.password:
|
||||||
|
raise ValueError("missing password")
|
||||||
|
+ if self._basic_auth:
|
||||||
|
+ self._backend.set_basic_auth(self.user, self.password)
|
||||||
|
|
||||||
|
payload = {"login": self.user}
|
||||||
|
if restrict_login:
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
--- a/bugzilla/_session.py 2021-10-05 22:49:16.000000000 +0200
|
|
||||||
+++ b/bugzilla/_session.py 2023-09-25 17:22:39.763856790 +0200
|
|
||||||
@@ -97,14 +97,14 @@
|
|
||||||
if "timeout" not in kwargs:
|
|
||||||
kwargs["timeout"] = timeout
|
|
||||||
|
|
||||||
- response = self._session.request(*args, **kwargs)
|
|
||||||
+ try:
|
|
||||||
+ response = self._session.request(*args, **kwargs)
|
|
||||||
|
|
||||||
- if self._is_xmlrpc:
|
|
||||||
- # Yes this still appears to matter for properly decoding unicode
|
|
||||||
- # code points in bugzilla.redhat.com content
|
|
||||||
- response.encoding = "UTF-8"
|
|
||||||
+ if self._is_xmlrpc:
|
|
||||||
+ # Yes this still appears to matter for properly decoding unicode
|
|
||||||
+ # code points in bugzilla.redhat.com content
|
|
||||||
+ response.encoding = "UTF-8"
|
|
||||||
|
|
||||||
- try:
|
|
||||||
response.raise_for_status()
|
|
||||||
except Exception as e:
|
|
||||||
# Scrape the api key out of the returned exception string
|
|
||||||
14
_service
14
_service
@@ -1,3 +1,15 @@
|
|||||||
<services>
|
<services>
|
||||||
<service name="download_files" mode="localonly"/>
|
<service name="obs_scm" mode="manual">
|
||||||
|
<param name="versionprefix">3.2.0+git</param>
|
||||||
|
<param name="url">https://github.com/python-bugzilla/python-bugzilla.git</param>
|
||||||
|
<param name="scm">git</param>
|
||||||
|
<param name="revision">main</param>
|
||||||
|
<param name="changesgenerate">enable</param>
|
||||||
|
</service>
|
||||||
|
<service name="tar" mode="buildtime"/>
|
||||||
|
<service name="recompress" mode="buildtime">
|
||||||
|
<param name="file">*.tar</param>
|
||||||
|
<param name="compression">gz</param>
|
||||||
|
</service>
|
||||||
|
<service name="set_version" mode="manual" />
|
||||||
</services>
|
</services>
|
||||||
4
_servicedata
Normal file
4
_servicedata
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<servicedata>
|
||||||
|
<service name="tar_scm">
|
||||||
|
<param name="url">https://github.com/python-bugzilla/python-bugzilla.git</param>
|
||||||
|
<param name="changesrevision">5eedea31bcef0f1ba7a22eb38aba1cdd9b3d7981</param></service></servicedata>
|
||||||
3
python-bugzilla-3.2.0+git.1726768917.5eedea3.obscpio
Normal file
3
python-bugzilla-3.2.0+git.1726768917.5eedea3.obscpio
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3833f041b64f4b8ff63ba60c6153337d72cf09994be2d8fb33953f93b74e77ff
|
||||||
|
size 851468
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:54967b21001e880b20c9303d5ac86b009142714ee6cdb473be363c41b207dd15
|
|
||||||
size 113206
|
|
||||||
@@ -1,3 +1,29 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jun 17 09:15:10 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to libalternatives
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jun 6 05:30:56 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Switch to pyproject macros.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 20 19:54:11 UTC 2024 - mcepl@cepl.eu
|
||||||
|
|
||||||
|
- Switch to Git source and update to version 3.2.0+git.1726768917.5eedea3:
|
||||||
|
* Use non-deprecated argument name in test-suite
|
||||||
|
* Fixed issue in `Bugzilla.fix_url`
|
||||||
|
* Prep for release 3.3.0
|
||||||
|
* ci: bump actions/checkout from 3 to 4
|
||||||
|
* ci: bump actions/setup-python from 4 to 5
|
||||||
|
* Run functional RO tests in GitHub actions
|
||||||
|
* man: Regenerate bugzilla.1
|
||||||
|
* man: Add section about `bugzillarc`
|
||||||
|
* Allow bug creation with an explicitly empty list of groups (closes #210)
|
||||||
|
* cli: Support `--field` and `--field-json` for `bugzilla attach` (#206)
|
||||||
|
- Remove upstreamed patch 188-fix-api-key-leak.diff
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Sep 25 14:57:10 UTC 2023 - Julio González Gil <jgonzalez@suse.com>
|
Mon Sep 25 14:57:10 UTC 2023 - Julio González Gil <jgonzalez@suse.com>
|
||||||
|
|
||||||
|
|||||||
4
python-bugzilla.obsinfo
Normal file
4
python-bugzilla.obsinfo
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
name: python-bugzilla
|
||||||
|
version: 3.2.0+git.1726768917.5eedea3
|
||||||
|
mtime: 1726768917
|
||||||
|
commit: 5eedea31bcef0f1ba7a22eb38aba1cdd9b3d7981
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-bugzilla
|
# spec file for package python-bugzilla
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -17,29 +17,31 @@
|
|||||||
|
|
||||||
|
|
||||||
%define oldpython python
|
%define oldpython python
|
||||||
%define skip_python2 1
|
%bcond_without libalternatives
|
||||||
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-bugzilla
|
Name: python-bugzilla
|
||||||
Version: 3.2.0
|
Version: 3.2.0+git.1726768917.5eedea3
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python library for Bugzilla
|
Summary: Python library for Bugzilla
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
Group: Development/Libraries/Python
|
Group: Development/Libraries/Python
|
||||||
URL: https://github.com/python-bugzilla/python-bugzilla
|
URL: https://github.com/python-bugzilla/python-bugzilla
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/python-bugzilla/python-bugzilla-%{version}.tar.gz
|
# Source: https://files.pythonhosted.org/packages/source/p/python-bugzilla/python-bugzilla-%%{version}.tar.gz
|
||||||
|
Source: python-bugzilla-%{version}.tar.gz
|
||||||
# PATCH-FIX-UPSTREAM 106-basic-auth.diff bsc#1098219 mcepl@suse.com
|
# PATCH-FIX-UPSTREAM 106-basic-auth.diff bsc#1098219 mcepl@suse.com
|
||||||
# Fix basic authentication on bugzilla.suse.com
|
# Fix basic authentication on bugzilla.suse.com
|
||||||
Patch0: 106-basic-auth.diff
|
Patch0: 106-basic-auth.diff
|
||||||
# PATCH-FIX-UPSTREAM pending https://github.com/python-bugzilla/python-bugzilla/pull/188
|
BuildRequires: %{python_module pip}
|
||||||
# Fix API Key leak
|
|
||||||
Patch1: 188-fix-api-key-leak.diff
|
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module requests}
|
BuildRequires: %{python_module requests}
|
||||||
|
BuildRequires: %{python_module responses}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: alts
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires: alts
|
||||||
Requires: python-requests
|
Requires: python-requests
|
||||||
Requires(post): update-alternatives
|
|
||||||
Requires(postun):update-alternatives
|
|
||||||
Suggests: osc
|
Suggests: osc
|
||||||
Conflicts: %{oldpython}-bugzillatools
|
Conflicts: %{oldpython}-bugzillatools
|
||||||
Obsoletes: python2-bugzilla
|
Obsoletes: python2-bugzilla
|
||||||
@@ -61,19 +63,16 @@ sed -i -e '1{/^#!\/usr\/bin\/env python/d}' bugzilla/_cli.py
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_clone -a %{buildroot}%{_bindir}/bugzilla
|
%python_clone -a %{buildroot}%{_bindir}/bugzilla
|
||||||
%python_clone -a %{buildroot}%{_mandir}/man1/bugzilla.1
|
%python_clone -a %{buildroot}%{_mandir}/man1/bugzilla.1
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%post
|
%pre
|
||||||
%{python_install_alternative bugzilla bugzilla.1}
|
%python_libalternatives_reset_alternative bugzilla
|
||||||
|
|
||||||
%postun
|
|
||||||
%python_uninstall_alternative bugzilla
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%pytest
|
%pytest
|
||||||
@@ -82,6 +81,6 @@ export CFLAGS="%{optflags}"
|
|||||||
%python_alternative %{_bindir}/bugzilla
|
%python_alternative %{_bindir}/bugzilla
|
||||||
%python_alternative %{_mandir}/man1/bugzilla.1%{ext_man}
|
%python_alternative %{_mandir}/man1/bugzilla.1%{ext_man}
|
||||||
%{python_sitelib}/bugzilla
|
%{python_sitelib}/bugzilla
|
||||||
%{python_sitelib}/python_bugzilla-%{version}-py*.egg-info
|
%{python_sitelib}/python_bugzilla-3.3.0*-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
Reference in New Issue
Block a user