[packages/systemd/systemd-219] Fix systemd.daemon.is_fifo under Python 3.x

jajcus jajcus at pld-linux.org
Fri Aug 7 12:35:11 CEST 2015


commit 769e69108133dafddef4967d49f4763da50aa640
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Fri Aug 7 12:34:25 2015 +0200

    Fix systemd.daemon.is_fifo under Python 3.x
    
    https://github.com/systemd/python-systemd/pull/4

 python-systemd-py3.patch | 31 +++++++++++++++++++++++++++++++
 systemd.spec             |  2 ++
 2 files changed, 33 insertions(+)
---
diff --git a/systemd.spec b/systemd.spec
index 29414d6..a233309 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -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
diff --git a/python-systemd-py3.patch b/python-systemd-py3.patch
new file mode 100644
index 0000000..674e8cd
--- /dev/null
+++ b/python-systemd-py3.patch
@@ -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;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/systemd.git/commitdiff/769e69108133dafddef4967d49f4763da50aa640



More information about the pld-cvs-commit mailing list