Bug#680148: python-pam: Please include python3 support

2020-07-19 Thread wferi
Florian Best  writes:

> I would be interested in maintaining this package.

Great!  Do you happen to know the upstream project for this software?
The single upstream version ever uploaded to Debian is 0.4.2 from 1999.
It could be useful to know if upstream moved on, the project was
replaced by another, or whatever happened.  Just to make sure your work
isn't put into something abandoned if better alternatives are available.

> I am not yet a Debian Maintainer and don't yet know how to get
> one. But I'll read about it.

You become a Debian Maintainer by maintaining packages.  You can
contribute without having any official status, you just need somebody to
upload (sponsor) your work.  After establishing a track record, you can
apply for direct upload rights.

If you decide that you'd like to maintain this package, take a look at
https://www.debian.org/doc/manuals/developers-reference/pkgs.en.html#package-salvaging
which is the definitive reference for package salvaging.  I suggest that
you open the ITS bug as explained therein, create a packaging
repository, import the previous dscs to incorporate the past history of
the package, then add further changes fixing this bug and doing other
changes you wish.  Finally, upload your package to mentors.debian.net
and also advertise it here to find sponsors.  Don't hesitate to ask for
help here or (better) on the mentors list if needed, you'll find some
starting points at https://wiki.debian.org/DebianMentorsFaq.

On the other hand, if you (or anybody) don't want to commit for longer
term maintainership, we'll have to migrate off this package or do
another NMU to fix this issue for the short term.
-- 
Regards,
Feri



Bug#680148: python-pam: Please include python3 support

2020-07-14 Thread Florian Best
Dear Feri,

I would be interested in maintaining this package.
I am not yet a Debian Maintainer and don't yet know how to get one. But
I'll read about it.

Best regards
Florian

-- 
Florian Best
Open Source Software Engineer

Univention GmbH
be open.
Mary-Somerville-Str.1
28359 Bremen
Tel. : +49 421 22232-0
Fax : +49 421 22232-99

b...@univention.de
http://www.univention.de

Geschäftsführer: Peter H. Ganten
HRB 20755 Amtsgericht Bremen
Steuer-Nr.: 71-597-02876



Bug#680148: python-pam: Please include python3 support

2020-03-04 Thread wferi
Hi,

Sadly, it looks like Dima Barksy, the maintainer, isn't around any more.
Is anybody interested in salvaging this package?  (Both in the sense of
keeping it around after the Python 2 removal in bullseye and in that of
https://wiki.debian.org/PackageSalvaging.)
-- 
Regards,
Feri



Bug#680148: python-pam: Please include python3 support

2019-04-29 Thread Florian Best
We are also interested that this gets merged into buster!

-- 
Florian Best
Open Source Software Engineer

Univention GmbH
be open.
Mary-Somerville-Str.1
28359 Bremen
Tel. : +49 421 22232-0
Fax : +49 421 22232-99

b...@univention.de
http://www.univention.de

Geschäftsführer: Peter H. Ganten
HRB 20755 Amtsgericht Bremen
Steuer-Nr.: 71-597-02876



pEpkey.asc
Description: application/pgp-keys


Bug#680148: python-pam: Please include python3 support

2017-09-07 Thread Russell Stuart
Jakub,

Any chance of getting this into Buster?

Would an NMU Help?



-- 
Regards,
Russell Stuart
+61 438 805 133
http://www.humbug.org.au/RussellStuart


signature.asc
Description: This is a digitally signed message part


Bug#680148: python-pam: Please include python3 support

2015-10-28 Thread Steve Langasek
Package: python-pam
Version: 0.4.2-13.2
Followup-For: Bug #680148
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu wily ubuntu-patch

Hi Dima,

Here is an updated patch against the current version of python-pam in Debian
unstable that implements support for python3.  It incorporates much of the
feedback from Jakub; and now that pybuild is available (which it was not
when the patch was first submitted), the resulting packaging is greatly
simplified.

It also adds dbg packages (which was present in the Ubuntu diff and snuck
into the earlier patch in partial form, sorry about that).

The migration to python3 continues to be an important transition for Debian.
Please let me know if you would like an NMU for this, or if help is needed
in upstreaming the necessary python3 support.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developerhttp://www.debian.org/
slanga...@ubuntu.com vor...@debian.org
diff -u python-pam-0.4.2/PAMmodule.c python-pam-0.4.2/PAMmodule.c
--- python-pam-0.4.2/PAMmodule.c
+++ python-pam-0.4.2/PAMmodule.c
@@ -24,7 +24,7 @@
 PyObject*userData;
 } PyPAMObject;
 
-staticforward PyTypeObject PyPAMObject_Type;
+static PyTypeObject PyPAMObject_Type;
 
 static void PyPAM_Err(PyPAMObject *self, int result)
 {
@@ -107,7 +107,7 @@
 PyPAMObject *p;
 struct pam_conv *spc;
 
-PyPAMObject_Type.ob_type = _Type;
+Py_TYPE(_Type) = _Type;
 p = (PyPAMObject *) PyObject_NEW(PyPAMObject, _Type);
 
 if ((spc = (struct pam_conv *) malloc(sizeof(struct pam_conv))) == NULL) {
@@ -490,35 +490,33 @@
 PyObject_FREE(self);
 }
 
-static PyObject * PyPAM_getattr(PyPAMObject *self, char *name)
-{
-return Py_FindMethod(PyPAMObject_Methods, (PyObject *) self, name);
-}
-
 static PyObject * PyPAM_repr(PyPAMObject *self)
 {
 charbuf[1024];
 
 snprintf(buf, 1024, "",
 self->service, self->user, self->conv, self->pamh);
-return PyString_FromString(buf);
+return PyUnicode_FromString(buf);
 }
 
 static PyTypeObject PyPAMObject_Type = {
-PyObject_HEAD_INIT(0)   /* Must fill in type value later */
-0,
+PyVarObject_HEAD_INIT(_Type, 0)   /* Must fill in type value later */
 "pam",
 sizeof(PyPAMObject),
 0,
 (destructor)PyPAM_dealloc,  /*tp_dealloc*/
 0,  /*tp_print*/
-(getattrfunc)PyPAM_getattr, /*tp_getattr*/
+0,  /*tp_getattr*/
 0,  /*tp_setattr*/
 0,  /*tp_compare*/
 (reprfunc)PyPAM_repr,   /*tp_repr*/
 0,  /*tp_as_number*/
 0,  /*tp_as_sequence*/
 0,  /*tp_as_mapping*/
+0,  /*hash*/
+0,  /*ternary*/
+0,  /*another repr*/
+(getattrofunc)PyObject_GenericGetAttr,
 };
 
 static PyMethodDef PyPAM_Methods[] = {
@@ -526,6 +524,16 @@
 {NULL, NULL, 0, NULL}
 };
 
+#if PY_MAJOR_VERSION > 2
+static struct PyModuleDef PyPAM_Module = {
+PyModuleDef_HEAD_INIT,
+"PAM",/* name of module */
+NULL, /* module documentation */
+-1,   /* size of per-interpreter state */
+PyPAM_Methods
+};
+#endif
+
 static char PyPAMObject_doc[] = "";
 
 /* Convenience routine to export an integer value.
@@ -535,7 +543,11 @@
  */
 static void insint(PyObject *d, char *name, int value)
 {
+#if PY_MAJOR_VERSION > 2
+PyObject*v = PyLong_FromLong((long) value);
+#else
 PyObject*v = PyInt_FromLong((long) value);
+#endif
 
 if (!v || PyDict_SetItemString(d, name, v))
 PyErr_Clear();
@@ -543,20 +555,32 @@
 Py_XDECREF(v);
 }
 
+#if PY_MAJOR_VERSION > 2
+PyMODINIT_FUNC PyInit_PAM(void)
+#else
 void initPAM(void)
+#endif
 {
 PyObject*m, *d;
 
+#if PY_MAJOR_VERSION > 2
+m = PyModule_Create(_Module);
+#else
 m = Py_InitModule("PAM", PyPAM_Methods);
+#endif
 d = PyModule_GetDict(m);
 
 PyPAM_Error = PyErr_NewException("PAM.error", NULL, NULL);
 if (PyPAM_Error == NULL)
-return;
+#if PY_MAJOR_VERSION > 2
+		return m;
+#else
+		return;
+#endif
 PyDict_SetItemString(d, "error", PyPAM_Error);
 
-PyPAMObject_Type.ob_type = _Type;
 PyPAMObject_Type.tp_doc = PyPAMObject_doc;
+PyPAMObject_Type.tp_methods = PyPAMObject_Methods,
 Py_INCREF(_Type);
 
 insint(d, "PAM_SUCCESS", PAM_SUCCESS);
@@ -622,2 +646,5 @@
 
+#if PY_MAJOR_VERSION > 2
+return m;
+#endif
 }
diff -u python-pam-0.4.2/debian/compat python-pam-0.4.2/debian/compat
--- python-pam-0.4.2/debian/compat
+++ python-pam-0.4.2/debian/compat
@@ -1 +1 @@
-5
+9
diff -u python-pam-0.4.2/debian/control python-pam-0.4.2/debian/control
--- python-pam-0.4.2/debian/control
+++ python-pam-0.4.2/debian/control
@@ -1,7 +1,7 @@
 Source: python-pam
 Section: python
 Priority: optional
-Build-Depends: debhelper (>= 5.0.37.2), python-all-dev (>= 2.3.5-11), 

Bug#680148: python-pam: Please include python3 support

2012-07-04 Thread Jakub Wilk

(I'm not the maintainer.)

* Steve Langasek steve.langa...@canonical.com, 2012-07-03, 16:21:
Normally I wouldn't propose such extensive changes to debian/rules, but 
in this case updating debhelper is a significant aid in packaging of 
python modules, and particularly for python3 modules.


FWIW, no, debhelper offers no aid for packaging Python 3 modules. That's 
why you had to add a dozens of lines of code to debian/rules to make 
it build.


In contrast, I estimate that adapting the current debian/rules would be 
a 2 line change: update PYVERS to include Python 3 versions, and add a 
call to dh_python3. (Plus another 3 lines to fix Policy §4.6 
violations…)



-Build-Depends: debhelper (= 5.0.37.2), python-all-dev (= 2.3.5-11), 
libpam0g-dev, python-support
+Build-Depends: debhelper (= 9), python-all-dev (= 2.3.5-11), 
python3-all-dev, libpam0g-dev


It should be:
python-all-dev (= 2.6.6-3~)
python3-all-dev (= 3.2)


Conflicts: python2.3-pam, python2.4-pam
Replaces: python2.3-pam, python2.4-pam
Provides: ${python:Provides}
+XB-Python-Version: ${python:Versions}


This part is not documented in the changelog. It's also wrong: 
XB-Python-Version has been depracted (Python Policy §2.3), so please 
don't add it.



+Suggests: python3-pam-dbg


No such package exist…


--- debian/python-pam.install   1970-01-01 00:00:00 +
+++ debian/python-pam.install   2012-07-03 23:09:33 +
@@ -0,0 +1,2 @@
+usr/lib/python2*/dist-packages/*[!_][!_].so
+usr/lib/python2*/dist-packages/*.egg-info


In case it's not clear, this unusual wildcard in the first line is 
presumably here to exclude extension modules built for -dbg interpreters 
(*_d.so). However, python-pam doesn't currently build such modules…



--- debian/python3-pam.install  1970-01-01 00:00:00 +
+++ debian/python3-pam.install  2012-07-03 23:09:33 +
@@ -0,0 +1,2 @@
+usr/lib/python3/dist-packages/*-[0-9][0-9][!d]*.so
+usr/lib/python3/dist-packages/*.egg-info


Again, the wildcard in the first line is to exclude extension modules 
built for -dbg interpeters (*-cpython3?-d*.so).


--
Jakub Wilk



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#680148: python-pam: Please include python3 support

2012-07-03 Thread Steve Langasek
Package: python-pam
Version: 0.4.2-13
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu quantal ubuntu-patch

Hi Dima,

In Ubuntu, we've patched the python-pam package to support Python 3.  Please
consider applying the attached patch for Python3 support to Debian as well.

Here's a changelog summary of the patch:

  * Port to python3; dead project upstream so not forwarding anywhere.
- replace 'staticforward' with 'static'.
- replace ob_type with Py_TYPE(ob).
- drop tp_getattr function, we just need to set tp_methods instead.
- fix PyTypeObject definition.
- use PyUnicode_FromString, not PyString_FromString
- use PyLong_FromLong when building for python3.
- use PyModule_Create instead of Py_InitModule for python3
- LP: #1015320
  * Modernize packaging to dh and debhelper 9.

Normally I wouldn't propose such extensive changes to debian/rules, but in
this case updating debhelper is a significant aid in packaging of python
modules, and particularly for python3 modules.

Thanks for considering the patch.
-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developerhttp://www.debian.org/
slanga...@ubuntu.com vor...@debian.org
=== modified file 'PAMmodule.c'
--- PAMmodule.c	2012-03-06 21:48:38 +
+++ PAMmodule.c	2012-07-03 23:10:57 +
@@ -24,7 +24,7 @@
 PyObject*userData;
 } PyPAMObject;
 
-staticforward PyTypeObject PyPAMObject_Type;
+static PyTypeObject PyPAMObject_Type;
 
 static void PyPAM_Err(PyPAMObject *self, int result)
 {
@@ -107,7 +107,7 @@
 PyPAMObject *p;
 struct pam_conv *spc;
 
-PyPAMObject_Type.ob_type = PyType_Type;
+Py_TYPE(PyPAMObject_Type) = PyType_Type;
 p = (PyPAMObject *) PyObject_NEW(PyPAMObject, PyPAMObject_Type);
 
 if ((spc = (struct pam_conv *) malloc(sizeof(struct pam_conv))) == NULL) {
@@ -490,35 +490,33 @@
 PyObject_FREE(self);
 }
 
-static PyObject * PyPAM_getattr(PyPAMObject *self, char *name)
-{
-return Py_FindMethod(PyPAMObject_Methods, (PyObject *) self, name);
-}
-
 static PyObject * PyPAM_repr(PyPAMObject *self)
 {
 charbuf[1024];
 
 snprintf(buf, 1024, pam object, service=\%s\, user=\%s\, conv=%p, pamh=%p,
 self-service, self-user, self-conv, self-pamh);
-return PyString_FromString(buf);
+return PyUnicode_FromString(buf);
 }
 
 static PyTypeObject PyPAMObject_Type = {
-PyObject_HEAD_INIT(0)   /* Must fill in type value later */
-0,
+PyVarObject_HEAD_INIT(PyType_Type, 0)   /* Must fill in type value later */
 pam,
 sizeof(PyPAMObject),
 0,
 (destructor)PyPAM_dealloc,  /*tp_dealloc*/
 0,  /*tp_print*/
-(getattrfunc)PyPAM_getattr, /*tp_getattr*/
+0,  /*tp_getattr*/
 0,  /*tp_setattr*/
 0,  /*tp_compare*/
 (reprfunc)PyPAM_repr,   /*tp_repr*/
 0,  /*tp_as_number*/
 0,  /*tp_as_sequence*/
 0,  /*tp_as_mapping*/
+0,  /*hash*/
+0,  /*ternary*/
+0,  /*another repr*/
+(getattrofunc)PyObject_GenericGetAttr,
 };
 
 static PyMethodDef PyPAM_Methods[] = {
@@ -526,6 +524,16 @@
 {NULL, NULL, 0, NULL}
 };
 
+#if PY_MAJOR_VERSION  2
+static struct PyModuleDef PyPAM_Module = {
+PyModuleDef_HEAD_INIT,
+PAM,/* name of module */
+NULL, /* module documentation */
+-1,   /* size of per-interpreter state */
+PyPAM_Methods
+};
+#endif
+
 static char PyPAMObject_doc[] = ;
 
 /* Convenience routine to export an integer value.
@@ -535,7 +543,11 @@
  */
 static void insint(PyObject *d, char *name, int value)
 {
+#if PY_MAJOR_VERSION  2
+PyObject*v = PyLong_FromLong((long) value);
+#else
 PyObject*v = PyInt_FromLong((long) value);
+#endif
 
 if (!v || PyDict_SetItemString(d, name, v))
 PyErr_Clear();
@@ -543,20 +555,32 @@
 Py_XDECREF(v);
 }
 
+#if PY_MAJOR_VERSION  2
+PyMODINIT_FUNC PyInit_PAM(void)
+#else
 void initPAM(void)
+#endif
 {
 PyObject*m, *d;
 
+#if PY_MAJOR_VERSION  2
+m = PyModule_Create(PyPAM_Module);
+#else
 m = Py_InitModule(PAM, PyPAM_Methods);
+#endif
 d = PyModule_GetDict(m);
 
 PyPAM_Error = PyErr_NewException(PAM.error, NULL, NULL);
 if (PyPAM_Error == NULL)
-return;
+#if PY_MAJOR_VERSION  2
+		return m;
+#else
+		return;
+#endif
 PyDict_SetItemString(d, error, PyPAM_Error);
 
-PyPAMObject_Type.ob_type = PyType_Type;
 PyPAMObject_Type.tp_doc = PyPAMObject_doc;
+PyPAMObject_Type.tp_methods = PyPAMObject_Methods,
 Py_INCREF(PyPAMObject_Type);
 
 insint(d, PAM_SUCCESS, PAM_SUCCESS);
@@ -620,4 +644,7 @@
 insint(d, PAM_BINARY_PROMPT, PAM_BINARY_PROMPT);
 #endif
 
+#if PY_MAJOR_VERSION  2
+return m;
+#endif
 }

=== modified file