[Pkg-cracklib-commits] [SCM] Git repository for pkg-cracklib branch, master, updated. debian/2.8.19-1-9-g28ac092

Jan Dittberner jandd at debian.org
Sun May 19 09:05:39 UTC 2013


The following commit has been merged in the master branch:
commit 76ebc1192d66f6b2584dc9d3a3787d8d1ef25be4
Author: Jan Dittberner <jandd at debian.org>
Date:   Sun May 19 10:22:36 2013 +0200

    refresh/drop Debian specific patches
    
    * refresh debian/patches/install-debian-python-modules.patch and
      debian/patches/libcrack2-error-safer-check-variant.patch
    * drop debian/patches/pass-dict-to-cracklib-test.patch included in new
      upstream version, remove line from debian/patches/series

diff --git a/debian/changelog b/debian/changelog
index 5ef0d5d..ef65038 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,10 @@ cracklib2 (2.8.22-1) UNRELEASED; urgency=low
   * New upstream version.
   * Fix "FTBFS with Python 3.3: ImportError: No module named
     '_cracklib'" with upstream changes (Closes: #681749)
+  * refresh debian/patches/install-debian-python-modules.patch and
+    debian/patches/libcrack2-error-safer-check-variant.patch
+  * drop debian/patches/pass-dict-to-cracklib-test.patch included in new
+    upstream version, remove line from debian/patches/series
 
  -- Jan Dittberner <jandd at debian.org>  Sun, 19 May 2013 10:03:56 +0200
 
diff --git a/debian/patches/install-debian-python-modules.patch b/debian/patches/install-debian-python-modules.patch
index 9134afd..9a46d61 100644
--- a/debian/patches/install-debian-python-modules.patch
+++ b/debian/patches/install-debian-python-modules.patch
@@ -6,7 +6,7 @@ Author: Jan Dittberner <jandd at debian.org>
      author_email="jan at dittberner.info",
      url="http://cracklib.sourceforge.net/",
      license="GPLv2+",
--    py_modules=['cracklib'],
+-    py_modules=['cracklib', 'test_cracklib'],
 +    py_modules=['cracklib', 'test_cracklib', 'crack'],
      ext_modules=extensions,
      zip_safe=False,
diff --git a/debian/patches/libcrack2-error-safer-check-variant.patch b/debian/patches/libcrack2-error-safer-check-variant.patch
index c775948..b68fc65 100644
--- a/debian/patches/libcrack2-error-safer-check-variant.patch
+++ b/debian/patches/libcrack2-error-safer-check-variant.patch
@@ -3,7 +3,7 @@ Author: Markus Wanner <markus at bluegap.ch>
 Bug-Debian: http://bugs.debian.org/682735
 --- a/lib/fascist.c
 +++ b/lib/fascist.c
-@@ -879,6 +879,48 @@
+@@ -876,6 +876,48 @@
      return res;
  }
  
@@ -52,66 +52,6 @@ Bug-Debian: http://bugs.debian.org/682735
  const char *
  GetDefaultCracklibDict()
  {
---- a/python/_cracklibmodule.c
-+++ b/python/_cracklibmodule.c
-@@ -42,6 +42,7 @@
- #ifdef HAVE_LIBINTL_H
- #include <libintl.h>
- #endif
-+#include <errno.h>
- 
- #ifdef HAVE_PTHREAD_H
- static pthread_mutex_t cracklib_mutex = PTHREAD_MUTEX_INITIALIZER;
-@@ -74,7 +75,8 @@
- {
-     char *candidate, *dict;
-     char *defaultdict = NULL;
--    const char *result;
-+    int result;
-+    char *errmsg;
-     struct stat st;
-     char *keywords[] = {"pw", "dictpath", NULL};
-     char *dictfile;
-@@ -148,7 +150,8 @@
- #endif
- 
-     LOCK();
--    result = FascistCheck(candidate, dict ? dict : defaultdict);
-+    result = __DEBIAN_SPECIFIC__SafeFascistCheck(candidate,
-+		dict ? dict : defaultdict, errmsg);
-     UNLOCK();
- 
-     if (defaultdict != NULL)
-@@ -156,11 +159,26 @@
-         free(defaultdict);
-     }
- 
--    if (result != NULL)
-+    if (result)
-     {
--    	PyErr_SetString(PyExc_ValueError, result);
--        return NULL;
-+	if (errmsg != NULL)
-+	{
-+	    PyErr_SetString(PyExc_ValueError, errmsg);
-+	    return NULL;
-+	}
-+    } else {
-+	if (errno == 0)
-+	{
-+	    PyErr_SetString(PyExc_RuntimeError, "Unable to read cracklib dictionary.");
-+	    return NULL;
-+	}
-+	else
-+	{
-+	    PyErr_SetFromErrnoWithFilename(PyExc_ValueError, "/var/cache/cracklib_dict.*");
-+	    return NULL;
-+	}
-     }
-+
-     return Py_BuildValue("s", candidate);
- }
- 
 --- a/lib/crack.h
 +++ b/lib/crack.h
 @@ -15,6 +15,14 @@
@@ -139,7 +79,7 @@ Bug-Debian: http://bugs.debian.org/682735
  #include "packer.h"
  
  static const char vers_id[] = "packlib.c : v2.3p2 Alec Muffett 18 May 1993";
-@@ -156,6 +157,7 @@
+@@ -157,6 +158,7 @@
  	if (!fread((char *) &pdesc.header, sizeof(pdesc.header), 1, ifp))
  	{
  	    fprintf(stderr, "%s: error reading header\n", prefix);
@@ -147,7 +87,7 @@ Bug-Debian: http://bugs.debian.org/682735
  
  	    pdesc.header.pih_magic = 0;
  	    fclose(ifp);
-@@ -179,6 +181,7 @@
+@@ -180,6 +182,7 @@
              if (!fread((char *) &pdesc64.header, sizeof(pdesc64.header), 1, ifp))
              {
                  fprintf(stderr, "%s: error reading header\n", prefix);
@@ -155,7 +95,7 @@ Bug-Debian: http://bugs.debian.org/682735
   
                  pdesc.header.pih_magic = 0;
                  fclose(ifp);
-@@ -198,6 +201,7 @@
+@@ -199,6 +202,7 @@
              {
                  /* nope, not "64-bit" after all */
                  fprintf(stderr, "%s: error reading header\n", prefix);
@@ -163,7 +103,7 @@ Bug-Debian: http://bugs.debian.org/682735
   
                  pdesc.header.pih_magic = 0;
                  fclose(ifp);
-@@ -224,6 +228,7 @@
+@@ -225,6 +229,7 @@
  	if (pdesc.header.pih_magic != PIH_MAGIC)
  	{
  	    fprintf(stderr, "%s: magic mismatch\n", prefix);
@@ -171,7 +111,7 @@ Bug-Debian: http://bugs.debian.org/682735
  
  	    pdesc.header.pih_magic = 0;
  	    fclose(ifp);
-@@ -244,6 +249,7 @@
+@@ -245,6 +250,7 @@
          if (pdesc.header.pih_numwords < 1)
          {
              fprintf(stderr, "%s: invalid word count\n", prefix);
@@ -179,7 +119,7 @@ Bug-Debian: http://bugs.debian.org/682735
   
              pdesc.header.pih_magic = 0;
              fclose(ifp);
-@@ -263,6 +269,7 @@
+@@ -264,6 +270,7 @@
  	if (pdesc.header.pih_blocklen != NUMWORDS)
  	{
  	    fprintf(stderr, "%s: size mismatch\n", prefix);
@@ -187,3 +127,62 @@ Bug-Debian: http://bugs.debian.org/682735
  
  	    pdesc.header.pih_magic = 0;
  	    fclose(ifp);
+--- a/python/_cracklib.c
++++ b/python/_cracklib.c
+@@ -42,6 +42,7 @@
+ #ifdef HAVE_LIBINTL_H
+ #include <libintl.h>
+ #endif
++#include <errno.h>
+ 
+ #ifdef HAVE_PTHREAD_H
+ static pthread_mutex_t cracklib_mutex = PTHREAD_MUTEX_INITIALIZER;
+@@ -74,7 +75,8 @@
+ {
+     char *candidate, *dict;
+     char *defaultdict = NULL;
+-    const char *result;
++    int result;
++    char *errmsg;
+     struct stat st;
+     char *keywords[] = {"pw", "dictpath", NULL};
+     char *dictfile;
+@@ -148,7 +150,8 @@
+ #endif
+ 
+     LOCK();
+-    result = FascistCheck(candidate, dict ? dict : defaultdict);
++    result = __DEBIAN_SPECIFIC__SafeFascistCheck(candidate,
++            dict ? dict : defaultdict, errmsg);
+     UNLOCK();
+ 
+     if (defaultdict != NULL)
+@@ -156,10 +159,25 @@
+         free(defaultdict);
+     }
+ 
+-    if (result != NULL)
++    if (result)
+     {
+-    	PyErr_SetString(PyExc_ValueError, result);
+-        return NULL;
++        if (errmsg != NULL)
++        {
++            PyErr_SetString(PyExc_ValueError, errmsg);
++            return NULL;
++        }
++    }
++    else {
++        if (errno == 0)
++        {
++            PyErr_SetString(PyExc_RuntimeError, "Unable to read cracklib dictionary.");
++            return NULL;
++        }
++        else
++        {
++            PyErr_SetFromErrnoWithFilename(PyExc_ValueError, "/var/cache/cracklib_dict.*");
++            return NULL;
++        }
+     }
+     return Py_BuildValue("s", candidate);
+ }
diff --git a/debian/patches/pass-dict-to-cracklib-test.patch b/debian/patches/pass-dict-to-cracklib-test.patch
deleted file mode 100644
index 0b17bf3..0000000
--- a/debian/patches/pass-dict-to-cracklib-test.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Subject: add support for dictionary path to cracklib.test
-Author: Jan Dittberner <jandd at debian.org>
---- a/python/cracklib.py
-+++ b/python/cracklib.py
-@@ -218,11 +218,11 @@
-     return new
- 
- 
--def test(verbosity=1, repeat=1):
-+def test(verbosity=1, repeat=1, dictpath=None):
-     """Test cracklib methods."""
-     import test_cracklib
-     import sys
--    result = test_cracklib.run(verbosity=verbosity, repeat=repeat)
-+    result = test_cracklib.run(verbosity=verbosity, repeat=repeat, use_dictpath=dictpath)
-     if result.wasSuccessful():
-         sys.exit(0)
-     sys.exit(1)
diff --git a/debian/patches/series b/debian/patches/series
index cd64245..e9a18db 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
 install-debian-python-modules.patch
-pass-dict-to-cracklib-test.patch
 libcrack2-error-safer-check-variant.patch

-- 
Git repository for pkg-cracklib



More information about the Pkg-cracklib-commits mailing list