diff --git a/backport-reader-make-PY_SSIZE_T_CLEAN.patch b/backport-reader-make-PY_SSIZE_T_CLEAN.patch deleted file mode 100644 index 2c66e03a2a54a6a8870130a26b4e60287cf81583..0000000000000000000000000000000000000000 --- a/backport-reader-make-PY_SSIZE_T_CLEAN.patch +++ /dev/null @@ -1,46 +0,0 @@ -From ab9f2797127b374665c37c06b02121f5dcf7d61c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -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(-) - -diff --git a/systemd/_reader.c b/systemd/_reader.c -index 8de7f6a963..3b6a4d0bbc 100644 ---- a/systemd/_reader.c -+++ b/systemd/_reader.c -@@ -18,7 +18,12 @@ - along with python-systemd; If not, see . - ***/ - -+#define PY_SSIZE_T_CLEAN -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wredundant-decls" - #include -+#pragma GCC diagnostic pop -+ - #include - #include - #include -@@ -710,11 +715,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; - diff --git a/python-systemd-234.tar.gz b/python-systemd-234.tar.gz deleted file mode 100644 index ca633b793cf88364ad79238ce415fea6de54c4b2..0000000000000000000000000000000000000000 Binary files a/python-systemd-234.tar.gz and /dev/null differ diff --git a/python-systemd-235.tar.gz b/python-systemd-235.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..c0504106ed5ba4eb2c70b9a74343dfb5198f42ee Binary files /dev/null and b/python-systemd-235.tar.gz differ diff --git a/python-systemd.spec b/python-systemd.spec index b725461cdc854ab8bd812a7ee11c9d270c1e80ab..d2c1c1f7bec623875465f83ed60e7044d012bba5 100644 --- a/python-systemd.spec +++ b/python-systemd.spec @@ -1,13 +1,11 @@ Name: python-systemd -Version: 234 -Release: 15 +Version: 235 +Release: 1 Summary: Python module for native access to the systemd facilities. License: LGPLv2+ URL: https://github.com/systemd/%{name} Source0: https://github.com/systemd/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -Patch6000: backport-reader-make-PY_SSIZE_T_CLEAN.patch - BuildRequires: gcc systemd-devel BuildRequires: python3-devel python3-sphinx python3-pytest @@ -64,6 +62,9 @@ make check PYTHON=%{__python3} %exclude %{_pkgdocdir}/html %changelog +* Mon Oct 24 2022 dongyuzhen - 235-1 +- upgrade version to 235 + * Mon Jun 20 2022 renhongxun - 234-15 - add compile option _FORTIFY_SOURCE