Merge lp:~logan/ubuntu/quantal/python-bcrypt/new-upstream into lp:ubuntu/quantal/python-bcrypt

Proposed by Logan Rosen
Status: Merged
Merged at revision: 5
Proposed branch: lp:~logan/ubuntu/quantal/python-bcrypt/new-upstream
Merge into: lp:ubuntu/quantal/python-bcrypt
Diff against target: 182 lines (+62/-14)
9 files modified
ChangeLog (+12/-0)
PKG-INFO (+1/-1)
TODO (+2/-2)
bcrypt/bcrypt.c (+5/-0)
bcrypt/bcrypt_python.c (+19/-3)
bcrypt/pybc_blf.h (+6/-0)
debian/changelog (+7/-0)
debian/control (+1/-1)
setup.py (+9/-7)
To merge this branch: bzr merge lp:~logan/ubuntu/quantal/python-bcrypt/new-upstream
Reviewer Review Type Date Requested Status
Luke Yelavich (community) Approve
Ubuntu branches Pending
Review via email: mp+115260@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Luke Yelavich (themuso) wrote :

Thanks for your work. Please make sure Debian knows about the new upstream release. Debian is currently in freeze, but the sooner they know, the sooner the upstrea version can be uploaded to Debian post freeze, and Ubuntu can sync from there.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2007-12-22 13:45:05 +0000
3+++ ChangeLog 2012-07-17 01:14:19 +0000
4@@ -1,2 +1,14 @@
5+20100614
6+ - (djm) Prefer setuptools for packaging. Based on patch from Niall
7+ O'Higgins.
8+ - (djm) Release py-bcrypt-0.2
9+
10+20091001
11+ - (djm) Allow Python threads to run during (potentially lengthy) bcrypt
12+ operation. Patch from vijay AT meebo-inc.com
13+
14+20060808
15+ - (djm) Add support for Win32
16+
17 20060522
18 - (djm) Start
19
20=== modified file 'PKG-INFO'
21--- PKG-INFO 2007-12-22 13:45:05 +0000
22+++ PKG-INFO 2012-07-17 01:14:19 +0000
23@@ -1,6 +1,6 @@
24 Metadata-Version: 1.0
25 Name: py-bcrypt
26-Version: 0.1
27+Version: 0.2
28 Summary: Blowfish password hashing library
29 Home-page: http://www.mindrot.org/py-bcrypt.html
30 Author: Damien Miller
31
32=== modified file 'TODO'
33--- TODO 2007-12-22 13:45:05 +0000
34+++ TODO 2012-07-17 01:14:19 +0000
35@@ -1,3 +1,3 @@
36-Nothing yet
37+Python 3 support
38
39-$Id: TODO,v 1.1.1.1 2006/05/22 11:53:27 djm Exp $
40+$Id: TODO,v 1.2 2010/06/13 23:18:52 djm Exp $
41
42=== modified file 'bcrypt/bcrypt.c'
43--- bcrypt/bcrypt.c 2007-12-22 13:45:05 +0000
44+++ bcrypt/bcrypt.c 2012-07-17 01:14:19 +0000
45@@ -49,8 +49,13 @@
46 #include <stdlib.h>
47 #include <sys/types.h>
48 #include <string.h>
49+
50 #include "pybc_blf.h"
51
52+#if defined(_MSC_VER)
53+#define snprintf _snprintf
54+#endif
55+
56 /* This implementation is adaptable to current computing power.
57 * You can have up to 2^31 rounds which should be enough for some
58 * time to come.
59
60=== modified file 'bcrypt/bcrypt_python.c'
61--- bcrypt/bcrypt_python.c 2007-12-22 13:45:05 +0000
62+++ bcrypt/bcrypt_python.c 2012-07-17 01:14:19 +0000
63@@ -16,7 +16,13 @@
64
65 #include "Python.h"
66
67-/* $Id: bcrypt_python.c,v 1.1.1.1 2006/05/22 11:53:27 djm Exp $ */
68+#if defined(_MSC_VER)
69+typedef unsigned __int8 u_int8_t;
70+typedef unsigned __int16 u_int16_t;
71+typedef unsigned __int32 u_int32_t;
72+#endif
73+
74+/* $Id: bcrypt_python.c,v 1.3 2009/10/01 13:09:52 djm Exp $ */
75
76 /* Import */
77 char *pybc_bcrypt(const char *, const char *);
78@@ -66,7 +72,17 @@
79 if (!PyArg_ParseTupleAndKeywords(args, kw_args, "ss:hashpw", keywords,
80 &password, &salt))
81 return NULL;
82- if ((ret = pybc_bcrypt(password, salt)) == NULL ||
83+
84+ char *password_copy = strdup(password);
85+ char *salt_copy = strdup(salt);
86+
87+ Py_BEGIN_ALLOW_THREADS;
88+ ret = pybc_bcrypt(password_copy, salt_copy);
89+ Py_END_ALLOW_THREADS;
90+
91+ free(password_copy);
92+ free(salt_copy);
93+ if ((ret == NULL) ||
94 strcmp(ret, ":") == 0) {
95 PyErr_SetString(PyExc_ValueError, "Invalid salt");
96 return NULL;
97@@ -91,6 +107,6 @@
98 PyObject *m;
99
100 m = Py_InitModule3("bcrypt._bcrypt", bcrypt_methods, module_doc);
101- PyModule_AddStringConstant(m, "__version__", PROGVER);
102+ PyModule_AddStringConstant(m, "__version__", "0.1");
103 }
104
105
106=== modified file 'bcrypt/pybc_blf.h'
107--- bcrypt/pybc_blf.h 2007-12-22 13:45:05 +0000
108+++ bcrypt/pybc_blf.h 2012-07-17 01:14:19 +0000
109@@ -34,6 +34,12 @@
110 #ifndef _PYBC_BLF_H_
111 #define _PYBC_BLF_H_
112
113+#if defined(_MSC_VER)
114+typedef unsigned __int8 u_int8_t;
115+typedef unsigned __int16 u_int16_t;
116+typedef unsigned __int32 u_int32_t;
117+#endif
118+
119 /* Schneier specifies a maximum key length of 56 bytes.
120 * This ensures that every key bit affects every cipher
121 * bit. However, the subkeys can hold up to 72 bytes.
122
123=== modified file 'debian/changelog'
124--- debian/changelog 2010-12-03 00:09:33 +0000
125+++ debian/changelog 2012-07-17 01:14:19 +0000
126@@ -1,3 +1,10 @@
127+python-bcrypt (0.2-0ubuntu1) quantal; urgency=low
128+
129+ * New upstream release.
130+ * Bump Standards-Version to 3.9.3.
131+
132+ -- Logan Rosen <logatronico@gmail.com> Mon, 16 Jul 2012 21:11:14 -0400
133+
134 python-bcrypt (0.1-1build2) natty; urgency=low
135
136 * Rebuild to add support for python 2.7.
137
138=== modified file 'debian/control'
139--- debian/control 2009-03-10 08:00:57 +0000
140+++ debian/control 2012-07-17 01:14:19 +0000
141@@ -8,7 +8,7 @@
142 Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-bcrypt/trunk/
143 Vcs-Browser: http://svn.debian.org/wsvn/python-modules/packages/python-bcrypt/?op=log
144 Homepage: http://www.mindrot.org/projects/py-bcrypt/
145-Standards-Version: 3.7.3
146+Standards-Version: 3.9.3
147
148 Package: python-bcrypt
149 Architecture: any
150
151=== modified file 'setup.py'
152--- setup.py 2007-12-22 13:45:05 +0000
153+++ setup.py 2012-07-17 01:14:19 +0000
154@@ -14,19 +14,21 @@
155 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
156 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
157
158-# $Id: setup.py,v 1.1.1.1 2006/05/22 11:53:27 djm Exp $
159+# $Id: setup.py,v 1.3 2010/06/13 23:18:52 djm Exp $
160
161 import sys
162-from distutils.core import setup, Extension
163-
164-VERSION = "0.1"
165-
166+try:
167+ from setuptools import setup, Extension
168+except ImportError:
169+ from distutils.core import setup, Extension
170+
171+VERSION = "0.2"
172+
173 if __name__ == '__main__':
174 bcrypt = Extension('bcrypt._bcrypt',
175- define_macros = [('PROGVER', '"' + VERSION + '"')],
176 sources = ['bcrypt/bcrypt_python.c', 'bcrypt/blowfish.c',
177 'bcrypt/bcrypt.c'])
178- setup( name = "bcrypt",
179+ setup( name = "py-bcrypt",
180 version = VERSION,
181 author = "Damien Miller",
182 author_email = "djm@mindrot.org",

Subscribers

People subscribed via source and target branches

to all changes: