]> git.pld-linux.org Git - packages/systemd.git/commitdiff
Fix systemd.daemon.is_fifo under Python 3.x systemd-219
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Fri, 7 Aug 2015 10:34:25 +0000 (12:34 +0200)
committerJacek Konieczny <j.konieczny@eggsoft.pl>
Fri, 7 Aug 2015 10:34:25 +0000 (12:34 +0200)
https://github.com/systemd/python-systemd/pull/4

python-systemd-py3.patch [new file with mode: 0644]
systemd.spec

diff --git a/python-systemd-py3.patch b/python-systemd-py3.patch
new file mode 100644 (file)
index 0000000..674e8cd
--- /dev/null
@@ -0,0 +1,31 @@
+diff -dur systemd-219.orig/src/python-systemd/_daemon.c systemd-219/src/python-systemd/_daemon.c
+--- systemd-219.orig/src/python-systemd/_daemon.c      2015-02-03 02:00:06.000000000 +0100
++++ systemd-219/src/python-systemd/_daemon.c   2015-08-07 12:32:34.000000000 +0200
+@@ -143,9 +143,12 @@
+         const char *path = NULL;
+ #if PY_MAJOR_VERSION >=3 && PY_MINOR_VERSION >= 1
++        _cleanup_Py_DECREF_ PyObject *_path = NULL;
+         if (!PyArg_ParseTuple(args, "i|O&:_is_fifo",
+-                              &fd, Unicode_FSConverter, &path))
++                              &fd, Unicode_FSConverter, &_path))
+                 return NULL;
++      if (_path)
++              path = PyBytes_AsString(_path);
+ #else
+         if (!PyArg_ParseTuple(args, "i|z:_is_fifo", &fd, &path))
+                 return NULL;
+@@ -171,9 +174,12 @@
+         const char *path = NULL;
+ #if PY_MAJOR_VERSION >=3 && PY_MINOR_VERSION >= 1
++        _cleanup_Py_DECREF_ PyObject *_path = NULL;
+         if (!PyArg_ParseTuple(args, "i|O&:_is_mq",
+-                              &fd, Unicode_FSConverter, &path))
++                              &fd, Unicode_FSConverter, &_path))
+                 return NULL;
++      if (_path)
++              path = PyBytes_AsString(_path);
+ #else
+         if (!PyArg_ParseTuple(args, "i|z:_is_mq", &fd, &path))
+                 return NULL;
index 29414d6fc11881c6d7c485ea32571f157d5d7614..a2333091bb45d7267732f7db4dbe5eaa4c6ae7fd 100644 (file)
@@ -69,6 +69,7 @@ Patch19:      uids_gids.patch
 Patch20:       sysv-symlinks-warning.patch
 Patch21:       no-configurable-runlevels.patch
 Patch22:       timesync_in_vm.patch
+Patch23:       python-systemd-py3.patch
 URL:           http://www.freedesktop.org/wiki/Software/systemd
 BuildRequires: acl-devel
 BuildRequires: attr-devel
@@ -698,6 +699,7 @@ Uzupełnianie parametrów w zsh dla poleceń udev.
 %patch20 -p1
 %patch21 -p1
 %patch22 -p1
+%patch23 -p1
 cp -p %{SOURCE2} src/systemd_booted.c
 
 %build
This page took 0.040099 seconds and 4 git commands to generate.