Compare commits
No commits in common. "c8" and "c9s" have entirely different histories.
11
.gitignore
vendored
11
.gitignore
vendored
@ -1 +1,10 @@
|
|||||||
SOURCES/python-systemd-234.tar.gz
|
/.build-*-*.fc*.log
|
||||||
|
/python-systemd-*-*.fc*.src.rpm
|
||||||
|
/results_python-systemd/
|
||||||
|
/x86_64/
|
||||||
|
/i686/
|
||||||
|
/python-systemd-*/
|
||||||
|
/python-systemd-230.tar.gz
|
||||||
|
/python-systemd-231.tar.gz
|
||||||
|
/python-systemd-232.tar.gz
|
||||||
|
/python-systemd-234.tar.gz
|
||||||
|
@ -1 +0,0 @@
|
|||||||
0aea149f95c43c44905cb898a9c51f61a4012787 SOURCES/python-systemd-234.tar.gz
|
|
22
0001-journal-avoid-warning-about-deprecated-constant.patch
Normal file
22
0001-journal-avoid-warning-about-deprecated-constant.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
From 63473b65d0c10268a9e2c9485313c4584027e67e Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||||
|
Date: Wed, 11 Nov 2020 22:36:04 +0100
|
||||||
|
Subject: [PATCH 1/2] journal: avoid warning about deprecated constant
|
||||||
|
|
||||||
|
---
|
||||||
|
systemd/_reader.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/systemd/_reader.c b/systemd/_reader.c
|
||||||
|
index c9aa11d43c..8de7f6a963 100644
|
||||||
|
--- a/systemd/_reader.c
|
||||||
|
+++ b/systemd/_reader.c
|
||||||
|
@@ -1339,7 +1339,7 @@ init_reader(void)
|
||||||
|
PyModule_AddIntConstant(m, "LOCAL_ONLY", SD_JOURNAL_LOCAL_ONLY) ||
|
||||||
|
PyModule_AddIntConstant(m, "RUNTIME_ONLY", SD_JOURNAL_RUNTIME_ONLY) ||
|
||||||
|
PyModule_AddIntConstant(m, "SYSTEM", SD_JOURNAL_SYSTEM) ||
|
||||||
|
- PyModule_AddIntConstant(m, "SYSTEM_ONLY", SD_JOURNAL_SYSTEM_ONLY) ||
|
||||||
|
+ PyModule_AddIntConstant(m, "SYSTEM_ONLY", SD_JOURNAL_SYSTEM) ||
|
||||||
|
PyModule_AddIntConstant(m, "CURRENT_USER", SD_JOURNAL_CURRENT_USER) ||
|
||||||
|
PyModule_AddIntConstant(m, "OS_ROOT", SD_JOURNAL_OS_ROOT) ||
|
||||||
|
PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION)) {
|
46
0002-reader-make-PY_SSIZE_T_CLEAN.patch
Normal file
46
0002-reader-make-PY_SSIZE_T_CLEAN.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
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(-)
|
||||||
|
|
||||||
|
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 <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>
|
||||||
|
@@ -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;
|
||||||
|
|
25
0003-test-make-sure-NOTIFY_SOCKET-is-unset-in-test.patch
Normal file
25
0003-test-make-sure-NOTIFY_SOCKET-is-unset-in-test.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 21e0cee30e5550cd6c9afa8c4cdedbcfdfca8480 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 17:08:02 +0100
|
||||||
|
Subject: [PATCH] test: make sure $NOTIFY_SOCKET is unset in test
|
||||||
|
|
||||||
|
When running the tests in Fedora's mock, the test would
|
||||||
|
fail because NOTIFY_SOCKET is set to /run/systemd/nspawn/notify, and
|
||||||
|
we get a permission error.
|
||||||
|
---
|
||||||
|
systemd/test/test_daemon.py | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/systemd/test/test_daemon.py b/systemd/test/test_daemon.py
|
||||||
|
index 1ddb55e94d..ff9e086e72 100644
|
||||||
|
--- a/systemd/test/test_daemon.py
|
||||||
|
+++ b/systemd/test/test_daemon.py
|
||||||
|
@@ -257,6 +257,8 @@ def test_listen_fds_default_unset():
|
||||||
|
assert listen_fds() == []
|
||||||
|
|
||||||
|
def test_notify_no_socket():
|
||||||
|
+ os.environ.pop('NOTIFY_SOCKET', None)
|
||||||
|
+
|
||||||
|
assert notify('READY=1') is False
|
||||||
|
with skip_enosys():
|
||||||
|
assert notify('FDSTORE=1', fds=[]) is False
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-9
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
@ -1,56 +1,33 @@
|
|||||||
%if 0%{?rhel} > 7
|
|
||||||
# Disable python2 build by default
|
|
||||||
%bcond_with python2
|
|
||||||
%else
|
|
||||||
%bcond_without python2
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: python-systemd
|
Name: python-systemd
|
||||||
Version: 234
|
Version: 234
|
||||||
Release: 8%{?dist}
|
Release: 19%{?dist}
|
||||||
Summary: Python module wrapping systemd functionality
|
Summary: Python module wrapping systemd functionality
|
||||||
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://github.com/systemd/python-systemd
|
URL: https://github.com/systemd/python-systemd
|
||||||
Source0: https://github.com/systemd/python-systemd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: https://github.com/systemd/python-systemd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
%bcond_with docs
|
Patch0001: 0001-journal-avoid-warning-about-deprecated-constant.patch
|
||||||
|
Patch0002: 0002-reader-make-PY_SSIZE_T_CLEAN.patch
|
||||||
|
Patch0003: 0003-test-make-sure-NOTIFY_SOCKET-is-unset-in-test.patch
|
||||||
|
|
||||||
|
BuildRequires: make
|
||||||
|
BuildRequires: gcc
|
||||||
BuildRequires: systemd-devel
|
BuildRequires: systemd-devel
|
||||||
%if %{with python2}
|
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildRequires: python2-pytest
|
|
||||||
%endif # with python2
|
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
%if %{with doc}
|
|
||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3-sphinx
|
||||||
%endif #{with doc}
|
|
||||||
BuildRequires: web-assets-devel
|
BuildRequires: web-assets-devel
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
|
|
||||||
%global _description \
|
%global _description %{expand:
|
||||||
Python module for native access to the systemd facilities.\
|
Python module for native access to the systemd facilities.
|
||||||
Functionality includes sending of structured messages to the journal\
|
Functionality includes sending of structured messages to the journal
|
||||||
and reading journal files, querying machine and boot identifiers and a\
|
and reading journal files, querying machine and boot identifiers and a
|
||||||
lists of message identifiers provided by systemd. Other functionality\
|
lists of message identifiers provided by systemd. Other functionality
|
||||||
provided by libsystemd is also wrapped.
|
provided by libsystemd is also wrapped.}
|
||||||
|
|
||||||
%description %_description
|
%description %_description
|
||||||
|
|
||||||
%if %{with python2}
|
|
||||||
%package -n python2-systemd
|
|
||||||
Summary: %{summary}
|
|
||||||
|
|
||||||
%{?python_provide:%python_provide python2-systemd}
|
|
||||||
Provides: systemd-python = %{version}-%{release}
|
|
||||||
Provides: systemd-python%{?_isa} = %{version}-%{release}
|
|
||||||
Obsoletes: systemd-python < 230
|
|
||||||
Recommends: %{name}-doc
|
|
||||||
|
|
||||||
%description -n python2-systemd %_description
|
|
||||||
%endif # with python2
|
|
||||||
|
|
||||||
%package -n python3-systemd
|
%package -n python3-systemd
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
|
|
||||||
@ -58,84 +35,92 @@ Summary: %{summary}
|
|||||||
Provides: systemd-python3 = %{version}-%{release}
|
Provides: systemd-python3 = %{version}-%{release}
|
||||||
Provides: systemd-python3%{?_isa} = %{version}-%{release}
|
Provides: systemd-python3%{?_isa} = %{version}-%{release}
|
||||||
Obsoletes: systemd-python3 < 230
|
Obsoletes: systemd-python3 < 230
|
||||||
Recommends: %{name}-doc
|
|
||||||
|
|
||||||
%description -n python3-systemd %_description
|
%description -n python3-systemd %_description
|
||||||
|
|
||||||
%if %{with doc}
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: HTML documentation for %{name}
|
Summary: HTML documentation for %{name}
|
||||||
Requires: js-jquery
|
Requires: js-jquery
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
%{summary}.
|
%{summary}.
|
||||||
%endif #{with doc}
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
sed -i 's/py\.test/pytest/' Makefile
|
sed -i 's/py\.test/pytest/' Makefile
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{with python2}
|
|
||||||
make PYTHON=%{__python2} build
|
|
||||||
%endif # with python2
|
|
||||||
make PYTHON=%{__python3} build
|
make PYTHON=%{__python3} build
|
||||||
%if %{with doc}
|
|
||||||
make PYTHON=%{__python3} SPHINX_BUILD=sphinx-build-3 sphinx-html
|
make PYTHON=%{__python3} SPHINX_BUILD=sphinx-build-3 sphinx-html
|
||||||
rm -r build/html/.buildinfo build/html/.doctrees
|
rm -r build/html/.buildinfo build/html/.doctrees
|
||||||
%endif #{with doc}
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if %{with python2}
|
|
||||||
%make_install PYTHON=%{__python2}
|
|
||||||
%endif # with python2
|
|
||||||
%make_install PYTHON=%{__python3}
|
%make_install PYTHON=%{__python3}
|
||||||
%if %{with doc}
|
|
||||||
mkdir -p %{buildroot}%{_pkgdocdir}
|
mkdir -p %{buildroot}%{_pkgdocdir}
|
||||||
cp -rv build/html %{buildroot}%{_pkgdocdir}/
|
cp -rv build/html %{buildroot}%{_pkgdocdir}/
|
||||||
ln -vsf %{_jsdir}/jquery/latest/jquery.min.js %{buildroot}%{_pkgdocdir}/html/_static/jquery.js
|
ln -vsf %{_jsdir}/jquery/latest/jquery.min.js %{buildroot}%{_pkgdocdir}/html/_static/jquery.js
|
||||||
cp -p README.md NEWS %{buildroot}%{_pkgdocdir}/
|
cp -p README.md NEWS %{buildroot}%{_pkgdocdir}/
|
||||||
%endif #{with doc}
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# if the socket is not there, skip doc tests
|
# if the socket is not there, skip doc tests
|
||||||
test -f /run/systemd/journal/stdout || \
|
test -f /run/systemd/journal/stdout || \
|
||||||
sed -i 's/--doctest[^ ]*//g' pytest.ini
|
sed -i 's/--doctest[^ ]*//g' pytest.ini
|
||||||
%if %{with python2}
|
|
||||||
make PYTHON=%{__python2} check
|
|
||||||
%endif # with python2
|
|
||||||
make PYTHON=%{__python3} check
|
make PYTHON=%{__python3} check
|
||||||
|
|
||||||
%if %{with python2}
|
|
||||||
%files -n python2-systemd
|
|
||||||
%license LICENSE.txt
|
|
||||||
%exclude %{_pkgdocdir}/html
|
|
||||||
%{python2_sitearch}/systemd/
|
|
||||||
%{python2_sitearch}/systemd_python*.egg-info
|
|
||||||
%endif # with python2
|
|
||||||
|
|
||||||
%files -n python3-systemd
|
%files -n python3-systemd
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
|
%doc %{_pkgdocdir}
|
||||||
%exclude %{_pkgdocdir}/html
|
%exclude %{_pkgdocdir}/html
|
||||||
%{python3_sitearch}/systemd/
|
%{python3_sitearch}/systemd/
|
||||||
%{python3_sitearch}/systemd_python*.egg-info
|
%{python3_sitearch}/systemd_python*.egg-info
|
||||||
|
|
||||||
%if %{with doc}
|
|
||||||
%files doc
|
%files doc
|
||||||
%license LICENSE.txt
|
|
||||||
%doc %{_pkgdocdir}
|
|
||||||
%doc %{_pkgdocdir}/html
|
%doc %{_pkgdocdir}/html
|
||||||
%endif #{with doc}
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Jul 09 2018 Charalampos Stratakis <cstratak@redhat.com> - 234-8
|
* Mon Jun 10 2024 Jan Macku <jamacku@redhat.com> - 234-19
|
||||||
- Conditionalize the python2 subpackage
|
- Remove weak dependency on doc subpackage (RHEL-5835)
|
||||||
|
|
||||||
* Mon Jun 25 2018 Petr Viktorin <pviktori@redhat.com> - 234-7
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 234-18
|
||||||
- Conditionalize the doc subpackage
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
|
Related: rhbz#1991688
|
||||||
|
|
||||||
* Mon Jun 25 2018 Petr Viktorin <pviktori@redhat.com> - 234-6
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 234-17
|
||||||
- Allow Python 2 for build
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
|
||||||
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 234-16
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Nov 12 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 234-15
|
||||||
|
- Fix build with new mock (#1793022) and python 3.10 (#1891786)
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 234-14
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 234-13
|
||||||
|
- Rebuilt for Python 3.9
|
||||||
|
|
||||||
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 234-12
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Sep 08 2019 Miro Hrončok <mhroncok@redhat.com> - 234-11
|
||||||
|
- Subpackage python2-systemd has been removed
|
||||||
|
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
||||||
|
|
||||||
|
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 234-10
|
||||||
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 234-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 234-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 234-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 234-6
|
||||||
|
- Rebuilt for Python 3.7
|
||||||
|
|
||||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 234-5
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 234-5
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
Loading…
Reference in New Issue
Block a user