forked from pool/python-systemd
- Update to version 235:
* Adapt the rename of systemd-activate to systemd-socket-activate performed in systemd 230. * Support for sd_listen_fds_with_names added in systemd 227. * Support for sd_journal_get_cutoff_realtime_usec added in systemd 186. * Make the Reader PY_SSIZE_T_CLEAN for py3.10 compatibility. * id128: update for systemd-243 compatibility and other fixes. * C syntax modernization. A minimum of C99 is assumed. * Fix seek_realtime to work with timezone aware date on Python 3. * journal: add namespace support. * Fixes for memory leaks and documentation. * Support for Python 2 will be removed after this release. - Remove upstreamed 0002-reader-make-PY_SSIZE_T_CLEAN.patch. - Skip two failing tests (gh#systemd/python-systemd#118) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-systemd?expand=0&rev=23
This commit is contained in:
parent
06a65d5bde
commit
d8dcd56a76
@ -1,44 +0,0 @@
|
|||||||
From ab9f2797127b374665c37c06b02121f5dcf7d61c Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
||||||
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;
|
|
||||||
|
|
@ -1,17 +1,20 @@
|
|||||||
diff -ur python-systemd-234.orig/systemd/_daemon.c python-systemd-234/systemd/_daemon.c
|
---
|
||||||
--- python-systemd-234.orig/systemd/_daemon.c 2017-03-26 03:33:59.000000000 +0200
|
systemd/_daemon.c | 3 ++-
|
||||||
+++ python-systemd-234/systemd/_daemon.c 2017-11-06 19:11:48.546733677 +0100
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
@@ -127,11 +127,12 @@
|
|
||||||
|
--- a/systemd/_daemon.c
|
||||||
|
+++ b/systemd/_daemon.c
|
||||||
|
@@ -121,11 +121,12 @@ static PyObject* notify(PyObject *self,
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
+ long value;
|
+ long value;
|
||||||
PyObject *item = PySequence_GetItem(fds, i);
|
_cleanup_Py_DECREF_ PyObject *item = PySequence_GetItem(fds, i);
|
||||||
if (!item)
|
if (!item)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
- long value = PyLong_AsLong(item);
|
- long value = PyLong_AsLong(item);
|
||||||
+ value = PyLong_AsLong(item);
|
+ value = PyLong_AsLong(item);
|
||||||
if (PyErr_Occurred())
|
if (PyErr_Occurred())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:1037e6a92762be500a40e97bade0e2f2306e00a31a39361c5dbe99ab50eb3b93
|
|
||||||
size 53900
|
|
BIN
python-systemd-235.tar.gz
(Stored with Git LFS)
Normal file
BIN
python-systemd-235.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +1,22 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 17 05:49:41 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Update to version 235:
|
||||||
|
* Adapt the rename of systemd-activate to
|
||||||
|
systemd-socket-activate performed in systemd 230.
|
||||||
|
* Support for sd_listen_fds_with_names added in systemd 227.
|
||||||
|
* Support for sd_journal_get_cutoff_realtime_usec added in
|
||||||
|
systemd 186.
|
||||||
|
* Make the Reader PY_SSIZE_T_CLEAN for py3.10 compatibility.
|
||||||
|
* id128: update for systemd-243 compatibility and other fixes.
|
||||||
|
* C syntax modernization. A minimum of C99 is assumed.
|
||||||
|
* Fix seek_realtime to work with timezone aware date on Python 3.
|
||||||
|
* journal: add namespace support.
|
||||||
|
* Fixes for memory leaks and documentation.
|
||||||
|
* Support for Python 2 will be removed after this release.
|
||||||
|
- Remove upstreamed 0002-reader-make-PY_SSIZE_T_CLEAN.patch.
|
||||||
|
- Skip two failing tests (gh#systemd/python-systemd#118)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Jul 3 21:14:35 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
Sun Jul 3 21:14:35 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-systemd
|
Name: python-systemd
|
||||||
Version: 234
|
Version: 235
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python wrappers for systemd functionality
|
Summary: Python wrappers for systemd functionality
|
||||||
License: LGPL-2.1-or-later
|
License: LGPL-2.1-or-later
|
||||||
@ -27,10 +27,6 @@ URL: https://github.com/systemd/python-systemd
|
|||||||
Source: https://github.com/systemd/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
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
|
# 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
|
Patch1: iso-c-90.patch
|
||||||
# PATCH-FIX-UPSTREAM 0002-reader-make-PY_SSIZE_T_CLEAN.patch gh#systemd/python-systemd#107 mcepl@suse.com
|
|
||||||
# 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 devel}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -62,7 +58,9 @@ Python module for native access to the systemd facilities. Functionality is sepe
|
|||||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export PYTEST_ADDOPTS="-k 'not test_reader_this_machine'"
|
# Not sure about the first exclusion,
|
||||||
|
# the following ones are gh#systemd/python-systemd#118
|
||||||
|
export PYTEST_ADDOPTS="-k 'not (test_reader_this_machine or test_get_machine or test_get_machine_app_specific)'"
|
||||||
%python_expand make PYTHON=python%{$python_version} check
|
%python_expand make PYTHON=python%{$python_version} check
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
|
Loading…
Reference in New Issue
Block a user