Update to v234
This commit is contained in:
parent
cb99dae92c
commit
35d9581a02
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@
|
|||||||
/python-systemd-230.tar.gz
|
/python-systemd-230.tar.gz
|
||||||
/python-systemd-231.tar.gz
|
/python-systemd-231.tar.gz
|
||||||
/python-systemd-232.tar.gz
|
/python-systemd-232.tar.gz
|
||||||
|
/python-systemd-234.tar.gz
|
||||||
|
@ -1,58 +0,0 @@
|
|||||||
From 35a5b281adea321ea3f7b7d688a994e735366fb0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
||||||
Date: Thu, 22 Sep 2016 20:12:15 -0400
|
|
||||||
Subject: [PATCH] tests: add workaround for pre-232 system returning EINVAL on
|
|
||||||
some flags
|
|
||||||
|
|
||||||
---
|
|
||||||
systemd/test/test_journal.py | 20 +++++++++++++++-----
|
|
||||||
1 file changed, 15 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/systemd/test/test_journal.py b/systemd/test/test_journal.py
|
|
||||||
index 090218334d..dceec3f18d 100644
|
|
||||||
--- a/systemd/test/test_journal.py
|
|
||||||
+++ b/systemd/test/test_journal.py
|
|
||||||
@@ -21,6 +21,13 @@ def skip_enosys():
|
|
||||||
pytest.skip()
|
|
||||||
raise
|
|
||||||
|
|
||||||
+@contextlib.contextmanager
|
|
||||||
+def skip_valueerror():
|
|
||||||
+ try:
|
|
||||||
+ yield
|
|
||||||
+ except ValueError:
|
|
||||||
+ pytest.skip()
|
|
||||||
+
|
|
||||||
def test_priorities():
|
|
||||||
p = journal.JournalHandler.mapPriority
|
|
||||||
|
|
||||||
@@ -62,10 +69,12 @@ def test_reader_init_flags():
|
|
||||||
def test_reader_os_root(tmpdir):
|
|
||||||
with pytest.raises(ValueError):
|
|
||||||
journal.Reader(journal.OS_ROOT)
|
|
||||||
- j1 = journal.Reader(path=tmpdir.strpath,
|
|
||||||
- flags=journal.OS_ROOT)
|
|
||||||
- j2 = journal.Reader(path=tmpdir.strpath,
|
|
||||||
- flags=journal.OS_ROOT | journal.CURRENT_USER)
|
|
||||||
+ with skip_valueerror():
|
|
||||||
+ j1 = journal.Reader(path=tmpdir.strpath,
|
|
||||||
+ flags=journal.OS_ROOT)
|
|
||||||
+ with skip_valueerror():
|
|
||||||
+ j2 = journal.Reader(path=tmpdir.strpath,
|
|
||||||
+ flags=journal.OS_ROOT | journal.CURRENT_USER)
|
|
||||||
j3 = journal.Reader(path=tmpdir.strpath,
|
|
||||||
flags=journal.OS_ROOT | journal.SYSTEM_ONLY)
|
|
||||||
|
|
||||||
@@ -91,7 +100,8 @@ def test_reader_init_path_fd(tmpdir):
|
|
||||||
j1 = journal.Reader(path=fd)
|
|
||||||
assert list(j1) == []
|
|
||||||
|
|
||||||
- j2 = journal.Reader(journal.SYSTEM, path=fd)
|
|
||||||
+ with skip_valueerror():
|
|
||||||
+ j2 = journal.Reader(journal.SYSTEM, path=fd)
|
|
||||||
assert list(j2) == []
|
|
||||||
|
|
||||||
j3 = journal.Reader(journal.CURRENT_USER, path=fd)
|
|
||||||
--
|
|
||||||
2.9.0
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
|||||||
From 13395b717a0951fa3f32ecb1629dfc1bbcf1b38b Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
||||||
Date: Thu, 22 Sep 2016 20:41:21 -0400
|
|
||||||
Subject: [PATCH] _reader: use proper ifdef guard for sd_j_open_files_fd
|
|
||||||
|
|
||||||
---
|
|
||||||
systemd/_reader.c | 10 +++++++---
|
|
||||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/systemd/_reader.c b/systemd/_reader.c
|
|
||||||
index 0f6fd3fac8..3a2c218346 100644
|
|
||||||
--- a/systemd/_reader.c
|
|
||||||
+++ b/systemd/_reader.c
|
|
||||||
@@ -283,7 +283,6 @@ static int Reader_init(Reader *self, PyObject *args, PyObject *keywds) {
|
|
||||||
Py_END_ALLOW_THREADS
|
|
||||||
}
|
|
||||||
} else if (_files) {
|
|
||||||
-#ifdef HAVE_JOURNAL_OPEN_FILES
|
|
||||||
_cleanup_Py_DECREF_ PyObject *item0 = NULL;
|
|
||||||
|
|
||||||
item0 = PySequence_GetItem(_files, 0);
|
|
||||||
@@ -293,9 +292,13 @@ static int Reader_init(Reader *self, PyObject *args, PyObject *keywds) {
|
|
||||||
if (!strv_converter(_files, &files))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
+#ifdef HAVE_JOURNAL_OPEN_FILES
|
|
||||||
Py_BEGIN_ALLOW_THREADS
|
|
||||||
r = sd_journal_open_files(&self->j, (const char**) files, flags);
|
|
||||||
Py_END_ALLOW_THREADS
|
|
||||||
+#else
|
|
||||||
+ r = -ENOSYS;
|
|
||||||
+#endif
|
|
||||||
} else {
|
|
||||||
_cleanup_free_ int *fds = NULL;
|
|
||||||
size_t n_fds;
|
|
||||||
@@ -303,13 +306,14 @@ static int Reader_init(Reader *self, PyObject *args, PyObject *keywds) {
|
|
||||||
if (!intlist_converter(_files, &fds, &n_fds))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
+#ifdef HAVE_JOURNAL_OPEN_DIRECTORY_FD
|
|
||||||
Py_BEGIN_ALLOW_THREADS
|
|
||||||
r = sd_journal_open_files_fd(&self->j, fds, n_fds, flags);
|
|
||||||
Py_END_ALLOW_THREADS
|
|
||||||
- }
|
|
||||||
#else
|
|
||||||
- r = -ENOSYS;
|
|
||||||
+ r = -ENOSYS;
|
|
||||||
#endif
|
|
||||||
+ }
|
|
||||||
} else {
|
|
||||||
Py_BEGIN_ALLOW_THREADS
|
|
||||||
r = sd_journal_open(&self->j, flags);
|
|
||||||
--
|
|
||||||
2.9.0
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
|||||||
Name: python-systemd
|
Name: python-systemd
|
||||||
Version: 232
|
Version: 234
|
||||||
Release: 3%{?dist}
|
Release: 1%{?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
|
||||||
Patch1: 0001-tests-add-workaround-for-pre-232-system-returning-EI.patch
|
|
||||||
Patch2: 0002-_reader-use-proper-ifdef-guard-for-sd_j_open_files_f.patch
|
|
||||||
|
|
||||||
BuildRequires: systemd-devel
|
BuildRequires: systemd-devel
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
@ -101,6 +99,9 @@ make PYTHON=%{__python3} check
|
|||||||
%doc %{_pkgdocdir}/html
|
%doc %{_pkgdocdir}/html
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Mar 26 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 234-1
|
||||||
|
- Update to latest version
|
||||||
|
|
||||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 232-3
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 232-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user