View | Details | Raw Unified | Return to bug 49392
Collapse All | Expand All

(-)file_not_specified_in_diff (-89 / +398 lines)
Line     Link Here 
0
-- python-pam-0.4.2.orig/PAMmodule.c
0
++ python-pam-0.4.2/PAMmodule.c
 Lines 24-30    Link Here 
24
    PyObject            *userData;
24
    PyObject            *userData;
25
} PyPAMObject;
25
} PyPAMObject;
26
26
27
staticforward PyTypeObject PyPAMObject_Type;
27
static PyTypeObject PyPAMObject_Type;
28
28
29
static void PyPAM_Err(PyPAMObject *self, int result)
29
static void PyPAM_Err(PyPAMObject *self, int result)
30
{
30
{
 Lines 80-85    Link Here 
80
        resp_retcode = 0;
80
        resp_retcode = 0;
81
        if (!PyArg_ParseTuple(respTuple, "si", &resp_text, &resp_retcode)) {
81
        if (!PyArg_ParseTuple(respTuple, "si", &resp_text, &resp_retcode)) {
82
            free(*resp);
82
            free(*resp);
83
            *resp = NULL;
83
            Py_DECREF(respList);
84
            Py_DECREF(respList);
84
            return PAM_CONV_ERR;
85
            return PAM_CONV_ERR;
85
        }
86
        }
 Lines 106-112    Link Here 
106
    PyPAMObject         *p;
107
    PyPAMObject         *p;
107
    struct pam_conv     *spc;
108
    struct pam_conv     *spc;
108
109
109
    PyPAMObject_Type.ob_type = &PyType_Type;
110
    Py_TYPE(&PyPAMObject_Type) = &PyType_Type;
110
    p = (PyPAMObject *) PyObject_NEW(PyPAMObject, &PyPAMObject_Type);
111
    p = (PyPAMObject *) PyObject_NEW(PyPAMObject, &PyPAMObject_Type);
111
112
112
    if ((spc = (struct pam_conv *) malloc(sizeof(struct pam_conv))) == NULL) {
113
    if ((spc = (struct pam_conv *) malloc(sizeof(struct pam_conv))) == NULL) {
 Lines 489-523    Link Here 
489
    PyObject_FREE(self);
490
    PyObject_FREE(self);
490
}
491
}
491
492
492
static PyObject * PyPAM_getattr(PyPAMObject *self, char *name)
493
{
494
    return Py_FindMethod(PyPAMObject_Methods, (PyObject *) self, name);
495
}
496
497
static PyObject * PyPAM_repr(PyPAMObject *self)
493
static PyObject * PyPAM_repr(PyPAMObject *self)
498
{
494
{
499
    char                buf[1024];
495
    char                buf[1024];
500
    
496
    
501
    snprintf(buf, 1024, "<pam object, service=\"%s\", user=\"%s\", conv=%p, pamh=%p>",
497
    snprintf(buf, 1024, "<pam object, service=\"%s\", user=\"%s\", conv=%p, pamh=%p>",
502
        self->service, self->user, self->conv, self->pamh);
498
        self->service, self->user, self->conv, self->pamh);
503
    return PyString_FromString(buf);
499
    return PyUnicode_FromString(buf);
504
}
500
}
505
501
506
static PyTypeObject PyPAMObject_Type = {
502
static PyTypeObject PyPAMObject_Type = {
507
    PyObject_HEAD_INIT(0)   /* Must fill in type value later */
503
    PyVarObject_HEAD_INIT(&PyType_Type, 0)   /* Must fill in type value later */
508
    0,
509
    "pam",
504
    "pam",
510
    sizeof(PyPAMObject),
505
    sizeof(PyPAMObject),
511
    0,
506
    0,
512
    (destructor)PyPAM_dealloc,      /*tp_dealloc*/
507
    (destructor)PyPAM_dealloc,      /*tp_dealloc*/
513
    0,      /*tp_print*/
508
    0,      /*tp_print*/
514
    (getattrfunc)PyPAM_getattr,     /*tp_getattr*/
509
    0,      /*tp_getattr*/
515
    0,      /*tp_setattr*/
510
    0,      /*tp_setattr*/
516
    0,      /*tp_compare*/
511
    0,      /*tp_compare*/
517
    (reprfunc)PyPAM_repr,           /*tp_repr*/
512
    (reprfunc)PyPAM_repr,           /*tp_repr*/
518
    0,      /*tp_as_number*/
513
    0,      /*tp_as_number*/
519
    0,      /*tp_as_sequence*/
514
    0,      /*tp_as_sequence*/
520
    0,      /*tp_as_mapping*/
515
    0,      /*tp_as_mapping*/
516
    0,      /*hash*/
517
    0,      /*ternary*/
518
    0,      /*another repr*/
519
    (getattrofunc)PyObject_GenericGetAttr,
521
};
520
};
522
521
523
static PyMethodDef PyPAM_Methods[] = {
522
static PyMethodDef PyPAM_Methods[] = {
 Lines 525-530    Link Here 
525
    {NULL, NULL, 0, NULL}
524
    {NULL, NULL, 0, NULL}
526
};
525
};
527
526
527
#if PY_MAJOR_VERSION > 2
528
static struct PyModuleDef PyPAM_Module = {
529
    PyModuleDef_HEAD_INIT,
530
    "PAM",    /* name of module */
531
    NULL,     /* module documentation */
532
    -1,       /* size of per-interpreter state */
533
    PyPAM_Methods
534
};
535
#endif
536
528
static char PyPAMObject_doc[] = "";
537
static char PyPAMObject_doc[] = "";
529
538
530
/* Convenience routine to export an integer value.
539
/* Convenience routine to export an integer value.
 Lines 534-540    Link Here 
534
 */
543
 */
535
static void insint(PyObject *d, char *name, int value)
544
static void insint(PyObject *d, char *name, int value)
536
{
545
{
546
#if PY_MAJOR_VERSION > 2
547
    PyObject            *v = PyLong_FromLong((long) value);
548
#else
537
    PyObject            *v = PyInt_FromLong((long) value);
549
    PyObject            *v = PyInt_FromLong((long) value);
550
#endif
538
551
539
    if (!v || PyDict_SetItemString(d, name, v))
552
    if (!v || PyDict_SetItemString(d, name, v))
540
        PyErr_Clear();
553
        PyErr_Clear();
 Lines 542-561    Link Here 
542
    Py_XDECREF(v);
555
    Py_XDECREF(v);
543
}
556
}
544
557
558
#if PY_MAJOR_VERSION > 2
559
PyMODINIT_FUNC PyInit_PAM(void)
560
#else
545
void initPAM(void)
561
void initPAM(void)
562
#endif
546
{
563
{
547
    PyObject            *m, *d;
564
    PyObject            *m, *d;
548
565
566
#if PY_MAJOR_VERSION > 2
567
    m = PyModule_Create(&PyPAM_Module);
568
#else
549
    m = Py_InitModule("PAM", PyPAM_Methods);
569
    m = Py_InitModule("PAM", PyPAM_Methods);
570
#endif
550
    d = PyModule_GetDict(m);
571
    d = PyModule_GetDict(m);
551
    
572
    
552
    PyPAM_Error = PyErr_NewException("PAM.error", NULL, NULL);
573
    PyPAM_Error = PyErr_NewException("PAM.error", NULL, NULL);
553
    if (PyPAM_Error == NULL)
574
    if (PyPAM_Error == NULL)
554
        return;
575
#if PY_MAJOR_VERSION > 2
576
		return m;
577
#else
578
		return;
579
#endif
555
    PyDict_SetItemString(d, "error", PyPAM_Error);
580
    PyDict_SetItemString(d, "error", PyPAM_Error);
556
581
557
    PyPAMObject_Type.ob_type = &PyType_Type;
558
    PyPAMObject_Type.tp_doc = PyPAMObject_doc;
582
    PyPAMObject_Type.tp_doc = PyPAMObject_doc;
583
    PyPAMObject_Type.tp_methods = PyPAMObject_Methods,
559
    Py_INCREF(&PyPAMObject_Type);
584
    Py_INCREF(&PyPAMObject_Type);
560
585
561
    insint(d, "PAM_SUCCESS", PAM_SUCCESS);
586
    insint(d, "PAM_SUCCESS", PAM_SUCCESS);
 Lines 619-622    Link Here 
619
    insint(d, "PAM_BINARY_PROMPT", PAM_BINARY_PROMPT);
644
    insint(d, "PAM_BINARY_PROMPT", PAM_BINARY_PROMPT);
620
#endif
645
#endif
621
646
647
#if PY_MAJOR_VERSION > 2
648
    return m;
649
#endif
622
}
650
}
623
-- python-pam-0.4.2.orig/debian/README.Debian
651
++ python-pam-0.4.2/debian/README.Debian
 Lines 9-16    Link Here 
9
using PAM.
9
using PAM.
10
10
11
No documentation yet. The module is mostly a wrapper around the PAM library
11
No documentation yet. The module is mostly a wrapper around the PAM library
12
functions. There's a simple example included in /usr/doc/python-pam/examples.
12
functions. There's a simple example included in /usr/share/doc/python-pam/examples.
13
13
14
14
15
   28.08.1999,
15
   28.08.1999,
16
   Gregor Hoffleit <flight@debian.org>
16
   Gregor Hoffleit <flight@debian.org>
17
-- python-pam-0.4.2.orig/debian/changelog
17
18
 -- Dima Barsky <dima@debian.org>, Tue,  6 Mar 2012 22:20:11 +0000
19
++ python-pam-0.4.2/debian/changelog
 Lines 1-3    Link Here 
1
python-pam (0.4.2-13.2ubuntu6) disco; urgency=medium
2
3
  * No-change rebuild to build without python3.6 support.
4
5
 -- Matthias Klose <doko@ubuntu.com>  Sat, 03 Nov 2018 12:09:29 +0000
6
7
python-pam (0.4.2-13.2ubuntu5) cosmic; urgency=medium
8
9
  * No-change rebuild to build for python3.7.
10
11
 -- Matthias Klose <doko@ubuntu.com>  Thu, 28 Jun 2018 06:55:01 +0000
12
13
python-pam (0.4.2-13.2ubuntu4) artful; urgency=medium
14
15
  * No change rebuild to drop Python 3.5 support.
16
17
 -- Michael Hudson-Doyle <michael.hudson@ubuntu.com>  Fri, 04 Aug 2017 16:59:28 +1200
18
19
python-pam (0.4.2-13.2ubuntu3) artful; urgency=medium
20
21
  * No change rebuild to add Python 3.6 support.
22
23
 -- Michael Hudson-Doyle <michael.hudson@ubuntu.com>  Fri, 12 May 2017 14:52:12 +1200
24
25
python-pam (0.4.2-13.2ubuntu2) xenial; urgency=medium
26
27
  * No-change rebuild to drop python3.4 support.
28
29
 -- Matthias Klose <doko@ubuntu.com>  Mon, 18 Jan 2016 19:39:53 +0000
30
31
python-pam (0.4.2-13.2ubuntu1) xenial; urgency=low
32
33
  * Merge from Debian unstable.  Remaining changes:
34
    - python3 port
35
    - packaging using dh, dh-python, pybuild and -dbg builds.
36
37
 -- Steve Langasek <steve.langasek@ubuntu.com>  Wed, 28 Oct 2015 15:48:57 -0700
38
39
python-pam (0.4.2-13.2) unstable; urgency=medium
40
41
  * Non-maintainer upload.
42
  * Build using dh-python. Closes: #786291.
43
44
 -- Matthias Klose <doko@debian.org>  Tue, 18 Aug 2015 19:00:37 +0200
45
46
python-pam (0.4.2-13.1ubuntu4) wily; urgency=medium
47
48
  * No-change rebuild for python3.5 transition
49
50
 -- Steve Langasek <steve.langasek@ubuntu.com>  Thu, 23 Jul 2015 00:03:50 +0000
51
52
python-pam (0.4.2-13.1ubuntu3) trusty; urgency=medium
53
54
  * No change rebuild to drop python3.3 compiled extension.
55
56
 -- Dimitri John Ledkov <xnox@ubuntu.com>  Tue, 01 Apr 2014 02:01:37 +0100
57
58
python-pam (0.4.2-13.1ubuntu2) trusty; urgency=medium
59
60
  * Rebuild for python3.4 as a supported python version.
61
62
 -- Matthias Klose <doko@ubuntu.com>  Sat, 04 Jan 2014 18:32:32 +0000
63
64
python-pam (0.4.2-13.1ubuntu1) trusty; urgency=low
65
66
  * Merge from debian, remaining changes:
67
    - python3 port
68
    - packaging using dh, dh-python, pybuild and -dbg builds.
69
70
 -- Dmitrijs Ledkovs <xnox@ubuntu.com>  Mon, 21 Oct 2013 16:58:13 +0100
71
72
python-pam (0.4.2-13.1) unstable; urgency=low
73
74
  * Non-maintainer upload.
75
  * debian/control: Change X-Python-Version to >= 2.6 to not explicitly
76
    request Python 2.6. (Closes: #707531)
77
78
 -- Sebastian Ramacher <sramacher@debian.org>  Fri, 05 Jul 2013 02:38:29 +0200
79
80
python-pam (0.4.2-13ubuntu6) saucy; urgency=low
81
82
  * Rename compiled module to "PAM" from "PAMmodule", thus matching the
83
    module name passed to PyModule_Create. This unbreaks importing PAM
84
    with python2.7.
85
86
 -- Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>  Thu, 26 Sep 2013 11:58:16 +0100
87
88
python-pam (0.4.2-13ubuntu5) saucy; urgency=low
89
90
  * Use dh-python and pybuild, thus getting the extension module correctly
91
    renamed and become importable in python3.
92
  * Simplify packaging and drop python*:Versions & Provides stanzas, use
93
    python*:Depends everywhere instead.
94
95
 -- Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>  Wed, 25 Sep 2013 09:18:57 +0100
96
97
python-pam (0.4.2-13ubuntu4) raring; urgency=low
98
99
  * Rebuild to drop python3.2 provides.
100
101
 -- Matthias Klose <doko@ubuntu.com>  Wed, 07 Nov 2012 23:00:18 +0000
102
103
python-pam (0.4.2-13ubuntu3) raring; urgency=low
104
105
  * No-change upload to build for python3.3.
106
107
 -- Matthias Klose <doko@ubuntu.com>  Mon, 22 Oct 2012 17:32:14 +0200
108
109
python-pam (0.4.2-13ubuntu2) quantal; urgency=low
110
111
  * Fix up merge breakage that left the python-pam package without a
112
    description.
113
114
 -- Steve Langasek <steve.langasek@ubuntu.com>  Tue, 03 Jul 2012 17:07:10 -0700
115
116
python-pam (0.4.2-13ubuntu1) quantal; urgency=low
117
118
  * Merge from Debian unstable, remaining changes:
119
    - Port to python3; dead project upstream so not forwarding anywhere.
120
    - Modernize packaging to dh and debhelper 9.
121
    - Build the extension for the debug interpreter.
122
  * Dropped changes, included in Debian:
123
    - PAMmodule.c: prevent double free in PyPAM_conv().
124
    - Build using dh_python2 instead of dh_pycentral.
125
126
 -- Steve Langasek <steve.langasek@ubuntu.com>  Tue, 03 Jul 2012 16:20:31 -0700
127
128
python-pam (0.4.2-13) unstable; urgency=high
129
130
  * Acknowledged NMUs
131
  * Fixed a security vulnerability in PyPAM_conv
132
    (thanks Markus Vervier <markus.vervier@lsexperts.de> 
133
    for the report and the patch)
134
135
 -- Dima Barsky <dima@debian.org>  Tue, 06 Mar 2012 21:48:38 +0000
136
137
python-pam (0.4.2-12.3) unstable; urgency=low
138
139
  * Non-maintainer upload.
140
  * Use python-support (closes: #620283).
141
    + Add build-dependency on python-support.
142
    + In debian/rules, replace call to dh_python with dh_pysupport.
143
144
 -- Jakub Wilk <jwilk@debian.org>  Fri, 08 Apr 2011 21:08:10 +0200
145
146
python-pam (0.4.2-12.2ubuntu6) quantal; urgency=low
147
148
  * Restore tp_getattro pointer, but use PyObject_GenericGetAttr() in both
149
    the Python 2 and 3 cases.
150
151
 -- Barry Warsaw <barry@ubuntu.com>  Mon, 25 Jun 2012 11:16:03 -0400
152
153
python-pam (0.4.2-12.2ubuntu5) quantal; urgency=low
154
155
  [ Steve Langasek ]
156
  * Port to python3; dead project upstream so not forwarding anywhere.
157
    - replace 'staticforward' with 'static'.
158
    - replace ob_type with Py_TYPE(ob).
159
    - drop tp_getattr function, we just need to set tp_methods instead.
160
    - fix PyTypeObject definition.
161
    - use PyUnicode_FromString, not PyString_FromString
162
    - use PyLong_FromLong when building for python3.
163
    - use PyModule_Create instead of Py_InitModule for python3
164
    - LP: #1015320
165
  * Modernize packaging to dh and debhelper 9.
166
167
  [ Sapphira Armageddos ]
168
  * Additional patch to better support Python 2 and Python 3.
169
170
 -- Steve Langasek <steve.langasek@ubuntu.com>  Thu, 24 May 2012 22:56:26 +0000
171
172
python-pam (0.4.2-12.2ubuntu4) precise; urgency=low
173
174
  * SECURITY UPDATE: possible code execution via double-free (LP: #949218)
175
    - PAMmodule.c: prevent double free in PyPAM_conv().
176
    - Thanks to Markus Vervier for the notification and the patch.
177
    - CVE-2012-1502
178
179
 -- Marc Deslauriers <marc.deslauriers@ubuntu.com>  Thu, 08 Mar 2012 08:06:43 -0500
180
181
python-pam (0.4.2-12.2ubuntu3) precise; urgency=low
182
183
  * Rebuild to drop python2.6 dependencies.
184
185
 -- Matthias Klose <doko@ubuntu.com>  Sat, 31 Dec 2011 02:11:30 +0000
186
187
python-pam (0.4.2-12.2ubuntu2) natty; urgency=low
188
189
  * No-change rebuild to prefer python2.7.
190
191
 -- Martin Pitt <martin.pitt@ubuntu.com>  Wed, 22 Dec 2010 09:41:19 +0100
192
193
python-pam (0.4.2-12.2ubuntu1) natty; urgency=low
194
195
  * Merge with Debian; remaining changes:
196
    - Build the extension for the debug interpreter.
197
    - Revert the bogus change of the Debian upload to call setup.py install
198
      with both --root and --prefix.
199
  * Build using dh_python2 instead of dh_pycentral.
200
201
 -- Matthias Klose <doko@ubuntu.com>  Wed, 24 Nov 2010 16:06:15 +0100
202
203
python-pam (0.4.2-12.2) unstable; urgency=low
204
205
  * Non-maintainer upload.
206
  * Remove build-dependency on python2.5-dev. Closes: #596314.
207
208
 -- Matthias Klose <doko@debian.org>  Sun, 12 Sep 2010 15:37:47 +0200
209
210
python-pam (0.4.2-12.1ubuntu1) lucid; urgency=low
211
212
  * Merge with Debian, remaining changes:
213
    - Build the extension for the debug interpreter.
214
  * Revert the bogus change of the Debian upload to call setup.py install
215
    with both --root and --prefix.
216
  * Drop explicite build dependency on python2.5-dev.
217
218
 -- Matthias Klose <doko@ubuntu.com>  Tue, 19 Jan 2010 15:22:59 +0100
219
220
python-pam (0.4.2-12.1) unstable; urgency=low
221
222
  * Non-maintainer upload.
223
  * Prepare for the upcoming Python 2.6 transition; thanks to Piotr Ożarowski
224
    for the bug report and to Kumar Appaiah for the patch; Closes: #556162
225
    - debian/rules
226
      + optionally include python.mk, add $(py_setup_install_args) and
227
        --prefix=/usr when installing
228
229
 -- Sandro Tosi <morph@debian.org>  Sun, 15 Nov 2009 21:36:54 +0100
230
231
python-pam (0.4.2-12ubuntu3) jaunty; urgency=low
232
233
  * Build for python2.6, include symlinks in the package.
234
235
 -- Matthias Klose <doko@ubuntu.com>  Mon, 23 Feb 2009 18:23:00 +0100
236
237
python-pam (0.4.2-12ubuntu2) hardy; urgency=low
238
239
  * Rebuild with recent python-central.
240
  * Set Ubuntu maintainer address.
241
242
 -- Matthias Klose <doko@ubuntu.com>  Mon, 10 Mar 2008 12:47:11 +0000
243
244
python-pam (0.4.2-12ubuntu1) gutsy; urgency=low
245
246
  * Merge from debian unstable, remaining changes:
247
    - Build the extension for the debug interpreter.
248
      - Build-depend on python-all-dbg (>= 2.5-0ubuntu5)
249
      - debian/control: New package python-pam-dbg, priority extra.
250
      - debian/control: python-pam: Suggest python-pam-dbg.
251
      - debian/rules: Build the extension with the python debug interpreter.
252
      - debian/rules: python-pam-dbg: symlink to python-pam's docdir.
253
    - Set Ubuntu maintainer address.
254
255
 -- Andrew Mitchell <ajmitch@ubuntu.com>  Wed, 23 May 2007 13:11:15 +1200
256
1
python-pam (0.4.2-12) unstable; urgency=low
257
python-pam (0.4.2-12) unstable; urgency=low
2
258
3
  * Added Build-Depends: python2.5-dev (Closes: #415377)
259
  * Added Build-Depends: python2.5-dev (Closes: #415377)
 Lines 11-16    Link Here 
11
267
12
 -- Dima Barsky <dima@debian.org>  Sat, 17 Mar 2007 17:46:16 +0000
268
 -- Dima Barsky <dima@debian.org>  Sat, 17 Mar 2007 17:46:16 +0000
13
269
270
python-pam (0.4.2-10.4ubuntu2) feisty; urgency=low
271
272
  * Add a build dependency on python-central.
273
274
 -- Matthias Klose <doko@ubuntu.com>  Sat, 17 Feb 2007 13:10:15 +0100
275
276
python-pam (0.4.2-10.4ubuntu1) feisty; urgency=low
277
278
  * Build the extension for the debug interpreter.
279
    - Build-depend on python-all-dbg (>= 2.5-0ubuntu5)
280
    - debian/control: New package python-pam-dbg, priority extra.
281
    - debian/control: python-pam: Suggest python-pam-dbg.
282
    - debian/rules: Build the extension with the python debug interpreter.
283
    - debian/rules: python-pam-dbg: symlink to python-pam's docdir.
284
  * Set Ubuntu maintainer address.
285
286
 -- Matthias Klose <doko@ubuntu.com>  Sat, 17 Feb 2007 02:04:09 +0100
287
288
python-pam (0.4.2-10.4build1) feisty; urgency=low
289
290
  * Rebuild. Ubuntu #69967.
291
292
 -- Matthias Klose <doko@ubuntu.com>  Mon, 12 Feb 2007 14:45:03 +0100
293
14
python-pam (0.4.2-10.4) unstable; urgency=low
294
python-pam (0.4.2-10.4) unstable; urgency=low
15
295
16
  * Non-maintainer upload.
296
  * Non-maintainer upload.
 Lines 93-99    Link Here 
93
  * Bumped up Standards-Sersion to 3.5.7
373
  * Bumped up Standards-Sersion to 3.5.7
94
374
95
 -- Dima Barsky <dima@debian.org>  Wed, 16 Oct 2002 14:45:50 +0100
375
 -- Dima Barsky <dima@debian.org>  Wed, 16 Oct 2002 14:45:50 +0100
96
  
376
97
python-pam (0.4.2-3) unstable; urgency=low
377
python-pam (0.4.2-3) unstable; urgency=low
98
378
99
  * Recompiled for unstable (closes: #66359).
379
  * Recompiled for unstable (closes: #66359).
 Lines 114-117    Link Here 
114
394
115
 -- Gregor Hoffleit <flight@debian.org>  Sat, 28 Aug 1999 19:20:23 +0200
395
 -- Gregor Hoffleit <flight@debian.org>  Sat, 28 Aug 1999 19:20:23 +0200
116
396
117
397
++ python-pam-0.4.2/debian/compat
118
-- python-pam-0.4.2.orig/debian/compat
Line 0    Link Here 
0
-- python-pam-0.4.2.orig/debian/control
1
9
2
++ python-pam-0.4.2/debian/control
 Lines 1-18    Link Here 
1
Source: python-pam
1
Source: python-pam
2
Section: python
2
Section: python
3
Priority: optional
3
Priority: optional
4
Build-Depends: debhelper (>= 5.0.37.2), python-all-dev (>= 2.3.5-11), python2.5-dev, libpam0g-dev
4
Build-Depends: debhelper (>= 9), python-all-dev (>= 2.3.5-11), python-all-dbg, python3-all-dev, python3-all-dbg, libpam0g-dev, dh-python
5
Maintainer: Dima Barsky <dima@debian.org>
5
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
6
Standards-Version: 3.7.2
6
XSBC-Original-Maintainer: Dima Barsky <dima@debian.org>
7
Standards-Version: 3.9.3
8
X-Python-Version: >= 2.6
7
9
8
Package: python-pam
10
Package: python-pam
9
Architecture: any
11
Architecture: any
10
Depends: ${python:Depends}, ${shlibs:Depends}
12
Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
11
Conflicts: python2.3-pam, python2.4-pam
13
Conflicts: python2.3-pam, python2.4-pam
12
Replaces: python2.3-pam, python2.4-pam
14
Replaces: python2.3-pam, python2.4-pam
13
Provides: ${python:Provides}
15
Suggests: python-pam-dbg
14
XB-Python-Version: ${python:Versions}
16
Description: Python interface to the PAM library
15
Description: A Python interface to the PAM library
16
 This module makes the PAM (Pluggable Authentication Modules) functions
17
 This module makes the PAM (Pluggable Authentication Modules) functions
17
 available in Python. With this module you can write Python applications
18
 available in Python. With this module you can write Python applications
18
 that implement authentication services using PAM.
19
 that implement authentication services using PAM.
19
-- python-pam-0.4.2.orig/debian/copyright
20
21
Package: python-pam-dbg
22
Priority: extra
23
Architecture: any
24
Depends: python-pam (= ${binary:Version}), ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
25
Description: Python interface to the PAM library (debug extension)
26
 This module makes the PAM (Pluggable Authentication Modules) functions
27
 available in Python. With this module you can write Python applications
28
 that implement authentication services using PAM.
29
 .
30
 This package contains the extension built for the python debug interpreter.
31
32
Package: python3-pam
33
Architecture: any
34
Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}
35
Suggests: python3-pam-dbg
36
Description: Python interface to the PAM library
37
 This module makes the PAM (Pluggable Authentication Modules) functions
38
 available in Python 3. With this module you can write Python 3 applications
39
 that implement authentication services using PAM.
40
41
Package: python3-pam-dbg
42
Priority: extra
43
Architecture: any
44
Depends: python3-pam (= ${binary:Version}), ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}
45
Description: Python interface to the PAM library (debug extension)
46
 This module makes the PAM (Pluggable Authentication Modules) functions
47
 available in Python 3. With this module you can write Python 3 applications
48
 that implement authentication services using PAM.
49
 .
50
 This package contains the extension built for the python debug interpreter.
51
++ python-pam-0.4.2/debian/copyright
 Lines 14-17    Link Here 
14
 Released under GNU GPL version 2.
14
 Released under GNU GPL version 2.
15
15
16
On Debian GNU/Linux systems, the complete text of the GNU General
16
On Debian GNU/Linux systems, the complete text of the GNU General
17
Public License can be found in `/usr/share/common-licenses/GPL'.
17
Public License can be found in `/usr/share/common-licenses/GPL-2'.
18
-- python-pam-0.4.2.orig/debian/python-pam.examples
18
++ python-pam-0.4.2/debian/python-pam.examples
Line 0    Link Here 
0
-- python-pam-0.4.2.orig/debian/python3-pam.examples
1
examples/*
2
++ python-pam-0.4.2/debian/python3-pam.examples
Line 0    Link Here 
0
-- python-pam-0.4.2.orig/debian/rules
1
examples/*
2
++ python-pam-0.4.2/debian/rules
 Lines 1-59    Link Here 
1
#!/usr/bin/make -f
1
#!/usr/bin/make -f
2
# Uncomment this to turn on verbose mode.
3
#export DH_VERBOSE=1
4
2
5
# This is the debhelper compatibility version to use.
3
export PYBUILD_DESTDIR_python2=debian/python-pam/
6
export DH_COMPAT=5
4
export PYBUILD_DESTDIR_python2-dbg=debian/python-pam-dbg/
7
5
export PYBUILD_DESTDIR_python3=debian/python3-pam/
8
PYVERS=$(shell pyversions -r) python2.5
6
export PYBUILD_DESTDIR_python3-dbg=debian/python3-pam-dbg/
9
7
10
build: build-stamp
8
%:
11
build-stamp:
9
	dh $@ --with python2,python3 --buildsystem=pybuild
12
	dh_testdir
10
13
	for python in $(PYVERS); \
11
override_dh_clean:
14
		do $$python setup.py build; \
12
	rm -rf build
15
	done
13
	rm -rf *.egg-info
16
	touch build-stamp
17
18
clean:
19
	dh_testdir
20
	for python in $(PYVERS); \
21
		do $$python setup.py clean; \
22
	done
23
	rm -rf build-stamp build
24
	dh_clean
14
	dh_clean
25
15
26
install: build
16
override_dh_installdocs:
27
	dh_testdir
17
	dh_installdocs AUTHORS README
28
	dh_testroot
29
	dh_clean -k
30
	dh_installdirs
31
32
	for python in $(PYVERS); \
33
		do $$python setup.py install --root=debian/python-pam; \
34
	done
35
36
# Build architecture-independent files here.
37
binary-indep: build install
38
39
# Build architecture-dependent files here.
40
binary-arch: build install
41
	dh_testdir
42
	dh_testroot
43
	dh_installdocs -a -A AUTHORS README
44
	dh_installexamples -a -A examples/*
45
	dh_installchangelogs -a ChangeLog
46
	dh_strip -a
47
	dh_compress -a
48
	dh_fixperms -a
49
	#dh_pycentral is not needed as we don't have .py files (only a .so)
50
	#dh_pycentral -a
51
	dh_python -a
52
	dh_installdeb -a
53
	dh_shlibdeps -a
54
	dh_gencontrol -a
55
	dh_md5sums -a
56
	dh_builddeb -a
57
18
58
binary: binary-indep binary-arch
19
override_dh_installchangelogs:
59
.PHONY: build clean binary-indep binary-arch binary
20
	dh_installchangelogs ChangeLog
21
	rm -rf debian/python-pam-dbg/usr/share/doc/python-pam-dbg
22
	ln -sf python-pam debian/python-pam-dbg/usr/share/doc/python-pam-dbg
23
	rm -rf debian/python3-pam-dbg/usr/share/doc/python3-pam-dbg
24
	ln -sf python3-pam debian/python3-pam-dbg/usr/share/doc/python3-pam-dbg
60
-- python-pam-0.4.2.orig/setup.py
25
++ python-pam-0.4.2/setup.py
 Lines 7-13    Link Here 
7
from distutils.extension import Extension
7
from distutils.extension import Extension
8
8
9
ext = Extension(
9
ext = Extension(
10
    name="PAMmodule",
10
    name="PAM",
11
    libraries=["pam","pam_misc"],
11
    libraries=["pam","pam_misc"],
12
    sources=["PAMmodule.c"]
12
    sources=["PAMmodule.c"]
13
)
13
)

Return to bug 49392