Dear maintainer,

I've prepared an NMU for pam-python (versioned as 1.0.6-1.1) and
uploaded it to DELAYED/0. Please feel free to tell me if I
should delay it longer.

Regards.

-- 
diff -Nru pam-python-1.0.6/debian/changelog pam-python-1.0.6/debian/changelog
--- pam-python-1.0.6/debian/changelog	2016-08-27 07:37:03.000000000 -0400
+++ pam-python-1.0.6/debian/changelog	2019-01-19 15:14:26.000000000 -0500
@@ -1,3 +1,11 @@
+pam-python (1.0.6-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix build with glibc 2.26, thanks to Adrian Bunk (Closes: #887750).
+  * Fix build with GCC 8
+
+ -- Antoine Beaupré <anar...@debian.org>  Sat, 19 Jan 2019 15:14:26 -0500
+
 pam-python (1.0.6-1) unstable; urgency=low
 
   * New upstream.
diff -Nru pam-python-1.0.6/debian/patches/fix-function-types.patch pam-python-1.0.6/debian/patches/fix-function-types.patch
--- pam-python-1.0.6/debian/patches/fix-function-types.patch	1969-12-31 19:00:00.000000000 -0500
+++ pam-python-1.0.6/debian/patches/fix-function-types.patch	2019-01-19 15:14:26.000000000 -0500
@@ -0,0 +1,96 @@
+From 12869142411f7a85d438971792cd75095f140f28 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= <anar...@debian.org>
+Date: Sat, 19 Jan 2019 16:00:52 -0500
+Subject: [PATCH] fix build with -Wcast-function-type -Werror on gcc8
+
+New versions of gcc8 will fail to build from source on Python
+declarations because of the hairy cast we're doing there, example:
+
+    pam_python.c:1355:19: error: cast between incompatible function types from 'PyObject * (*)(PyObject *, PyObject *, PyObject *)' {aka 'struct _object * (*)(struct _object *, struct _object *, struct _object *)'} to 'PyObject * (*)(PyObject *, PyObject *)' {aka 'struct _object * (*)(struct _object *, struct _object *)'} [-Werror=cast-function-type]
+
+This fix comes form the upstream cpython implementation:
+
+https://github.com/python/cpython/commit/62be74290aca26d16f3f55ece7ff6dad14e60e8d#diff-c3cf251f16d5a03a9e7d4639f2d6f998
+---
+ src/pam_python.c | 30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/src/pam_python.c b/src/pam_python.c
+index e01ee68..654f0aa 100644
+--- a/src/pam_python.c
++++ b/src/pam_python.c
+@@ -317,7 +317,7 @@ static PyMethodDef SyslogFile_Methods[] =
+ {
+   {
+     "write",
+-    (PyCFunction)SyslogFile_write,
++    (PyCFunction)(void(*)(void))SyslogFile_write,
+     METH_VARARGS|METH_KEYWORDS,
+     0
+   },
+@@ -1349,16 +1349,16 @@ static PyObject* PamEnv_values(
+ 
+ static PyMethodDef PamEnv_Methods[] =
+ {
+-  {"__contains__",  (PyCFunction)PamEnv_has_key,METH_VARARGS|METH_KEYWORDS, 0},
+-  {"__getitem__",   (PyCFunction)PamEnv_getitem,METH_VARARGS|METH_KEYWORDS, 0},
+-  {"get",	    (PyCFunction)PamEnv_get,	METH_VARARGS|METH_KEYWORDS, 0},
+-  {"has_key",	    (PyCFunction)PamEnv_has_key,METH_VARARGS|METH_KEYWORDS, 0},
+-  {"items",	    (PyCFunction)PamEnv_items,	METH_VARARGS|METH_KEYWORDS, 0},
+-  {"iteritems",	    (PyCFunction)PamEnv_iteritems,METH_VARARGS|METH_KEYWORDS, 0},
+-  {"iterkeys",	    (PyCFunction)PamEnv_iterkeys,METH_VARARGS|METH_KEYWORDS, 0},
+-  {"itervalues",    (PyCFunction)PamEnv_itervalues,METH_VARARGS|METH_KEYWORDS, 0},
+-  {"keys",	    (PyCFunction)PamEnv_keys,	METH_VARARGS|METH_KEYWORDS, 0},
+-  {"values",	    (PyCFunction)PamEnv_values,	METH_VARARGS|METH_KEYWORDS, 0},
++  {"__contains__",  (PyCFunction)(void(*)(void))PamEnv_has_key,METH_VARARGS|METH_KEYWORDS, 0},
++  {"__getitem__",   (PyCFunction)(void(*)(void))PamEnv_getitem,METH_VARARGS|METH_KEYWORDS, 0},
++  {"get",	    (PyCFunction)(void(*)(void))PamEnv_get,	METH_VARARGS|METH_KEYWORDS, 0},
++  {"has_key",	    (PyCFunction)(void(*)(void))PamEnv_has_key,METH_VARARGS|METH_KEYWORDS, 0},
++  {"items",	    (PyCFunction)(void(*)(void))PamEnv_items,	METH_VARARGS|METH_KEYWORDS, 0},
++  {"iteritems",	    (PyCFunction)(void(*)(void))PamEnv_iteritems,METH_VARARGS|METH_KEYWORDS, 0},
++  {"iterkeys",	    (PyCFunction)(void(*)(void))PamEnv_iterkeys,METH_VARARGS|METH_KEYWORDS, 0},
++  {"itervalues",    (PyCFunction)(void(*)(void))PamEnv_itervalues,METH_VARARGS|METH_KEYWORDS, 0},
++  {"keys",	    (PyCFunction)(void(*)(void))PamEnv_keys,	METH_VARARGS|METH_KEYWORDS, 0},
++  {"values",	    (PyCFunction)(void(*)(void))PamEnv_values,	METH_VARARGS|METH_KEYWORDS, 0},
+   {0,0,0,0}        	/* Sentinel */
+ };
+ 
+@@ -2029,7 +2029,7 @@ static PyMethodDef PamHandle_Methods[] =
+ {
+   {
+     "conversation",
+-    (PyCFunction)PamHandle_conversation,
++    (PyCFunction)(void(*)(void))PamHandle_conversation,
+     METH_VARARGS|METH_KEYWORDS,
+     MODULE_NAME "." PAMHANDLE_NAME "." "conversation(prompts)\n"
+     "  Ask the application to issue the prompts to the user and return the\n"
+@@ -2039,7 +2039,7 @@ static PyMethodDef PamHandle_Methods[] =
+   },
+   {
+     "fail_delay",
+-    (PyCFunction)PamHandle_fail_delay,
++    (PyCFunction)(void(*)(void))PamHandle_fail_delay,
+     METH_VARARGS|METH_KEYWORDS,
+     MODULE_NAME "." PAMHANDLE_NAME "." "fail_delay(micro_sec)\n"
+     "  Sets the amount of time a failed authenticate attempt should delay for\n"
+@@ -2048,7 +2048,7 @@ static PyMethodDef PamHandle_Methods[] =
+   },
+   {
+     "get_user",
+-    (PyCFunction)PamHandle_get_user,
++    (PyCFunction)(void(*)(void))PamHandle_get_user,
+     METH_VARARGS|METH_KEYWORDS,
+     MODULE_NAME "." PAMHANDLE_NAME "." "getuser([prompt])\n"
+     "  If " PAMHANDLE_NAME ".user isn't None return it, otherwise ask the\n"
+@@ -2057,7 +2057,7 @@ static PyMethodDef PamHandle_Methods[] =
+   },
+   {
+     "strerror",
+-    (PyCFunction)PamHandle_strerror,
++    (PyCFunction)(void(*)(void))PamHandle_strerror,
+     METH_VARARGS|METH_KEYWORDS,
+     MODULE_NAME "." PAMHANDLE_NAME "." "strerror(errnum)\n"
+     "  Return a string describing the pam error errnum."
+-- 
+2.11.0
+
diff -Nru pam-python-1.0.6/debian/patches/ftbfs-887750-4131599.patch pam-python-1.0.6/debian/patches/ftbfs-887750-4131599.patch
--- pam-python-1.0.6/debian/patches/ftbfs-887750-4131599.patch	1969-12-31 19:00:00.000000000 -0500
+++ pam-python-1.0.6/debian/patches/ftbfs-887750-4131599.patch	2019-01-19 15:07:34.000000000 -0500
@@ -0,0 +1,22 @@
+From 4131599c450edf2276e2af9bcaff87ef62384c15 Mon Sep 17 00:00:00 2001
+From: Peter Hajdu <peter.ha...@balabit.com>
+Date: Mon, 30 Jul 2018 12:47:24 +0200
+Subject: [PATCH] fix null ptr check
+
+---
+ src/pam_python.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/pam_python.c b/src/pam_python.c
+index e01ee68..d1c34c9 100644
+--- a/src/pam_python.c
++++ b/src/pam_python.c
+@@ -2226,7 +2226,7 @@ static int load_user_module(
+     goto error_exit;
+   }
+   dot = strrchr(user_module_name, '.');
+-  if (dot != 0 || strcmp(dot, ".py") == 0)
++  if ((dot != 0) && (strcmp(dot, ".py") == 0))
+     *dot = '\0';
+   *user_module = PyModule_New(user_module_name);
+   if (*user_module == 0)
diff -Nru pam-python-1.0.6/debian/patches/series pam-python-1.0.6/debian/patches/series
--- pam-python-1.0.6/debian/patches/series	2016-08-27 07:33:40.000000000 -0400
+++ pam-python-1.0.6/debian/patches/series	2019-01-19 15:14:26.000000000 -0500
@@ -1 +1,3 @@
 intersphinx-localmapping.diff
+ftbfs-887750-4131599.patch
+fix-function-types.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to