commit a8f8b497db9028fc83dc80536eaf7c0281ff42dea83cea65aeae0e72bb1807e4 Author: Markéta Machová Date: Wed Feb 18 08:50:31 2026 +0000 - Update to 3.3.0 see included NEWS.md file for details OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bugzilla?expand=0&rev=68 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..37a8eaa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,24 @@ +*.changes merge=merge-changes +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b731c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.obscpio +*.osc +_build.* +.pbuild diff --git a/106-basic-auth.diff b/106-basic-auth.diff new file mode 100644 index 0000000..057da32 --- /dev/null +++ b/106-basic-auth.diff @@ -0,0 +1,79 @@ +--- + bugzilla/_backendxmlrpc.py | 14 ++++++++++++++ + bugzilla/base.py | 7 ++++++- + 2 files changed, 20 insertions(+), 1 deletion(-) + +--- a/bugzilla/_backendxmlrpc.py ++++ b/bugzilla/_backendxmlrpc.py +@@ -2,6 +2,7 @@ + # See the COPYING file in the top-level directory. + + from logging import getLogger ++import base64 + import sys + from xmlrpc.client import (Binary, Fault, ProtocolError, + ServerProxy, Transport) +@@ -127,6 +128,9 @@ class _BugzillaXMLRPCProxy(ServerProxy, + # pylint: enable=no-member + + return ret ++ ++ def clear_token(self): ++ self.__bugzillasession.set_token_value(None) + + + class _BackendXMLRPC(_BackendBase): +@@ -142,6 +146,16 @@ class _BackendXMLRPC(_BackendBase): + def is_xmlrpc(self): + return True + ++ def set_basic_auth(self, user, password): ++ """ ++ Set basic authentication method. ++ ++ :return: ++ """ ++ b64str = base64.b64encode("{}:{}".format(user, password).encode("utf-8")) ++ authstr = "Basic {}".format(b64str.decode("utf-8")) ++ self._bugzillasession._session.headers["Authorization"] = authstr ++ + def bugzilla_version(self): + 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: diff --git a/_service b/_service new file mode 100644 index 0000000..3e97235 --- /dev/null +++ b/_service @@ -0,0 +1,12 @@ + + + 379bf17ec6738ec3a07c3add8659ddc7de220422 + git + https://github.com/python-bugzilla/python-bugzilla.git + @PARENT_TAG@ + [v]?([^\+]+)(.*) + \1 + + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..f74c978 --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + https://github.com/python-bugzilla/python-bugzilla.git + 5eedea31bcef0f1ba7a22eb38aba1cdd9b3d7981 \ No newline at end of file diff --git a/python-bugzilla-3.2.0+git.1726768917.5eedea3.obscpio b/python-bugzilla-3.2.0+git.1726768917.5eedea3.obscpio new file mode 100644 index 0000000..b5d455d --- /dev/null +++ b/python-bugzilla-3.2.0+git.1726768917.5eedea3.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3833f041b64f4b8ff63ba60c6153337d72cf09994be2d8fb33953f93b74e77ff +size 851468 diff --git a/python-bugzilla-3.3.0.obscpio b/python-bugzilla-3.3.0.obscpio new file mode 100644 index 0000000..9a69eb5 --- /dev/null +++ b/python-bugzilla-3.3.0.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:316ede8e2022daf77465466277376341939dc185611205e295b8ba22c27c92d6 +size 847884 diff --git a/python-bugzilla.changes b/python-bugzilla.changes new file mode 100644 index 0000000..48b8964 --- /dev/null +++ b/python-bugzilla.changes @@ -0,0 +1,275 @@ +------------------------------------------------------------------- +Sun Feb 15 12:34:56 UTC 2026 - olaf@aepfle.de + +- Update to 3.3.0 + see included NEWS.md file for details + +------------------------------------------------------------------- +Tue Jun 17 09:15:10 UTC 2025 - Markéta Machová + +- Convert to libalternatives + +------------------------------------------------------------------- +Fri Jun 6 05:30:56 UTC 2025 - Steve Kowalik + +- 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 + +- Fix API Key leak (bsc#1215718) +- Add: + * 188-fix-api-key-leak.diff + +------------------------------------------------------------------- +Wed Dec 21 08:41:46 UTC 2022 - Julio González Gil + +- Update to 3.2.0: + * Use soon-to-be-required Authorization header for RH bugzilla + * Remove cookie auth support + * Detect bugzilla.stage.redhat.com as RHBugzilla + * Add limit as option to build_query +- Modified: + * 106-basic-auth.diff + +------------------------------------------------------------------- +Tue Oct 26 10:25:23 UTC 2021 - Pablo Suárez Hernández + +- Fix problem with basic-auth patch for version higher than 3.0.0 (bsc#1098219) + +- Modified: + * 106-basic-auth.diff + +------------------------------------------------------------------- +Tue Oct 26 05:50:05 UTC 2021 - Matej Cepl + +- Revert removing of 106-basic-auth.diff + +------------------------------------------------------------------- +Thu Oct 21 17:55:23 UTC 2021 - Marina Latini + +- Obsolete python2-bugzilla + +------------------------------------------------------------------- +Thu Oct 21 13:49:24 UTC 2021 - Marina Latini + +- Disable python2 building, as the support was dropped with 3.0.0 + +------------------------------------------------------------------- +Wed Dec 30 13:25:13 UTC 2020 - Matej Cepl + +- Update to 3.0.2: + - Fix API key leaking into requests exceptions + - Skip man page generation to fix build on Windows (Alexander Todorov) + - Drop python2 support + - New option bugzilla modify --minor-update option + - requests: use PYTHONBUGZILLA_REQUESTS_TIMEOUT env variable + - xmlrpc: Don't add api key to passed in user dictionary + - cli: Add query --extrafield, --includefield, --excludefield + - Revive bugzilla.rhbugzilla.RHBugzilla import path + - Bugzilla REST API support + - Add --json command line output option + - Add APIs for Bugzilla Groups (Pierre-Yves Chibon) + - Add Bugzilla.get_requests_session() API to access raw requests + Session + - Add Bugzilla.get_xmlrpc_proxy() API to access raw ServerProxy + - Add Bugzilla requests_session= init parameter to pass in auth, etc. + - Add bugzilla attach --ignore-obsolete (Čestmír Kalina) + - Add bugzilla login --api-key for API key prompting (Danilo C. L. de + Paula) + - Add bugzilla new --private +- Remove 106-basic-auth.diff, which is not necessary anymore. + +------------------------------------------------------------------- +Wed Oct 16 12:51:01 UTC 2019 - Julio González Gil + +- 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 + +- 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 - mcepl@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 - dimstar@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 - tbechtold@suse.com + +- Add Conflicts for python-bugzillatools + +------------------------------------------------------------------- +Mon Apr 30 15:00:32 UTC 2018 - jengelh@inai.de + +- Trim history lesson and rhetoric wording from %description. + +------------------------------------------------------------------- +Wed Apr 25 10:36:02 UTC 2018 - tbechtold@suse.com + +- convert to singlespec +- use pypi as source +- update url + +------------------------------------------------------------------- +Wed Apr 25 10:21:27 UTC 2018 - tbechtold@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 - jsegitz@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 - bwiedemann@suse.com + +- update nvlbugzilla.py to reflect that server now has ver 4.4 + +------------------------------------------------------------------- +Thu Jun 27 16:29:47 UTC 2013 - jmatejek@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 - 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 + +- Apply python-bugzilla-0.6.2-section.patch +- Cleanup spec file +- Package README + +------------------------------------------------------------------- +Thu May 16 13:01:19 UTC 2013 - werner@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 - toddrme2178@gmail.com + +- Fix building on SLES 11 + +------------------------------------------------------------------- +Tue Jan 31 17:07:33 UTC 2012 - jmatejek@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 - jmatejek@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 - mvyskocil@suse.cz + +- update to 0.6.2, rebased all patches + * backport --outputformat feature from git + +------------------------------------------------------------------- +Fri Jul 29 08:50:47 UTC 2011 - mvyskocil@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 - mvyskocil@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 - matejcik@suse.cz + +- recognize Novell bugzilla in default constructor + +------------------------------------------------------------------- +Wed Aug 26 09:18:54 UTC 2009 - mvyskocil@suse.cz + +- Added a patch with support of obfuscated passwords introduced in osc-0.121 + +------------------------------------------------------------------- +Wed Jul 22 08:52:01 CEST 2009 - mvyskocil@suse.cz + +- Initial packaging of python-bugzilla 0.5 with Novell Bugzilla patches + diff --git a/python-bugzilla.obsinfo b/python-bugzilla.obsinfo new file mode 100644 index 0000000..b3a535f --- /dev/null +++ b/python-bugzilla.obsinfo @@ -0,0 +1,4 @@ +name: python-bugzilla +version: 3.3.0 +mtime: 1727020906 +commit: 379bf17ec6738ec3a07c3add8659ddc7de220422 diff --git a/python-bugzilla.spec b/python-bugzilla.spec new file mode 100644 index 0000000..590ecdf --- /dev/null +++ b/python-bugzilla.spec @@ -0,0 +1,87 @@ +# +# spec file for package python-bugzilla +# +# Copyright (c) 2025 SUSE LLC +# +# 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/ +# + + +%define oldpython python +%bcond_without libalternatives +%{?sle15_python_module_pythons} +Name: python-bugzilla +Version: 3.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: python-bugzilla-%{version}.tar +# PATCH-FIX-UPSTREAM 106-basic-auth.diff bsc#1098219 mcepl@suse.com +# Fix basic authentication on bugzilla.suse.com +Patch0: 106-basic-auth.diff +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module requests} +BuildRequires: %{python_module responses} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: alts +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: alts +Requires: python-requests +Suggests: osc +Conflicts: %{oldpython}-bugzillatools +Obsoletes: python2-bugzilla +Obsoletes: python3-bugzilla +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 +%autosetup -p1 + +%build +sed -i -e '1{/^#!\/usr\/bin\/env python/d}' bugzilla/_cli.py + +export CFLAGS="%{optflags}" +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/bugzilla +%python_clone -a %{buildroot}%{_mandir}/man1/bugzilla.1 +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%pre +%python_libalternatives_reset_alternative bugzilla + +%check +%pytest + +%files %{python_files} +%doc NEWS.md +%python_alternative %{_bindir}/bugzilla +%python_alternative %{_mandir}/man1/bugzilla.1%{ext_man} +%{python_sitelib}/bugzilla +%{python_sitelib}/python_bugzilla-3.3.0*-info + +%changelog