Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-systemd for openSUSE:Factory checked in at 2022-07-04 11:32:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-systemd (Old) and /work/SRC/openSUSE:Factory/.python-systemd.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-systemd" Mon Jul 4 11:32:52 2022 rev:10 rq:986508 version:234 Changes: -------- --- /work/SRC/openSUSE:Factory/python-systemd/python-systemd.changes 2020-02-06 13:05:51.332258786 +0100 +++ /work/SRC/openSUSE:Factory/.python-systemd.new.1548/python-systemd.changes 2022-07-04 11:33:00.488035992 +0200 @@ -1,0 +2,14 @@ +Sun Jul 3 21:14:35 UTC 2022 - Matej Cepl <[email protected]> + +- Remove exclude-tests-on-obs.patch, this is not the way how to + do it, besides %python_exec setup.py check doesn't the test + suite. +- Make tests running properly again + +------------------------------------------------------------------- +Sun Jul 3 18:00:37 UTC 2022 - Arjen de Korte <[email protected]> + +- 0002-reader-make-PY_SSIZE_T_CLEAN.patch added to fix boo#1200686 + reader: make PY_SSIZE_T_CLEAN + +------------------------------------------------------------------- Old: ---- exclude-tests-on-obs.patch New: ---- 0002-reader-make-PY_SSIZE_T_CLEAN.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-systemd.spec ++++++ --- /var/tmp/diff_new_pack.LKYAQv/_old 2022-07-04 11:33:00.996036810 +0200 +++ /var/tmp/diff_new_pack.LKYAQv/_new 2022-07-04 11:33:01.000036816 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-systemd # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,6 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%bcond_without test Name: python-systemd Version: 234 Release: 0 @@ -28,8 +27,10 @@ Source: https://github.com/systemd/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz # PATCH-FIX-OPENSUSE iso-c-90.patch makes the building iso-c-90 compatible to allow building on SLE12 SP3 Patch1: iso-c-90.patch -# PATCH-FIX-OPENSUSE exclude-tests-on-obs.patch removes a test when running tests at OBS. Should be removed as soon as OBS is fixed -Patch100: exclude-tests-on-obs.patch +# PATCH-FIX-UPSTREAM 0002-reader-make-PY_SSIZE_T_CLEAN.patch gh#systemd/python-systemd#107 [email protected] +# Originally from gh#systemd/python-systemd/commit/c71bbac357f0 +# make PY_SSIZE_T_CLEAN +Patch2: 0002-reader-make-PY_SSIZE_T_CLEAN.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -40,9 +41,7 @@ Requires: systemd Suggests: %{name}-doc # /SECTION -%if %{with test} BuildRequires: %{python_module pytest} -%endif %python_subpackages %description @@ -53,24 +52,23 @@ * systemd.login wraps parts of libsystemd used to query logged in users and available seats and machines. %prep -%setup -q -%patch1 -p1 -%patch100 -p1 +%autosetup -p1 %build %python_build %install %python_install -%fdupes %{buildroot} +%python_expand %fdupes %{buildroot}%{$python_sitearch} -%if %{with test} %check -%python_exec setup.py check -%endif +export PYTEST_ADDOPTS="-k 'not test_reader_this_machine'" +%python_expand make PYTHON=python%{$python_version} check %files %{python_files} -%doc LICENSE.txt README.md -%{python_sitearch}/* +%license LICENSE.txt +%doc README.md +%{python_sitearch}/systemd +%{python_sitearch}/systemd_python-%{version}*-info %changelog ++++++ 0002-reader-make-PY_SSIZE_T_CLEAN.patch ++++++ >From ab9f2797127b374665c37c06b02121f5dcf7d61c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <[email protected]> Date: Thu, 12 Nov 2020 16:55:56 +0100 Subject: [PATCH 2/2] reader: make PY_SSIZE_T_CLEAN --- systemd/_reader.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) --- a/systemd/_reader.c +++ b/systemd/_reader.c @@ -18,7 +18,12 @@ along with python-systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#define PY_SSIZE_T_CLEAN +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wredundant-decls" #include <Python.h> +#pragma GCC diagnostic pop + #include <structmember.h> #include <datetime.h> #include <time.h> @@ -707,11 +712,17 @@ PyDoc_STRVAR(Reader_add_match__doc__, "Match is a string of the form \"FIELD=value\"."); static PyObject* Reader_add_match(Reader *self, PyObject *args, PyObject *keywds) { char *match; - int match_len, r; + Py_ssize_t match_len; + int r; if (!PyArg_ParseTuple(args, "s#:add_match", &match, &match_len)) return NULL; - r = sd_journal_add_match(self->j, match, match_len); + if (match_len > INT_MAX) { + set_error(-ENOBUFS, NULL, NULL); + return NULL; + } + + r = sd_journal_add_match(self->j, match, (int) match_len); if (set_error(r, NULL, "Invalid match") < 0) return NULL;
