[Bug 560456] Review Request: python3-smbpasswd - Python SMB Password Hash Generator Module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=560456

Dave Malcolm <dmalcolm@xxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmalcolm@xxxxxxxxxx

--- Comment #2 from Dave Malcolm <dmalcolm@xxxxxxxxxx> 2010-02-01 10:59:40 EST ---
Thanks for putting this package together.  I noticed that Fedora ships a Python
2 version of this module; see:
https://admin.fedoraproject.org/pkgdb/packages/name/python-smbpasswd

We're still experimenting with our Python 3 packaging.  As Thomas notes, see:
https://fedoraproject.org/wiki/PackagingDrafts/Python3  That page is still a
work in progress, so please let us know if there's anything there that seems
wrong.

Where did python-smbpasswd-1.0.1-py3.patch come from?  If you did the porting
work yourself, bravo!  Have you approached the upstream maintainer about Fedora
distributing a Python 3 rpm of this code?  We want to work as closely as
possible with upstream.    Be sure to tell upstream that you've got it working
with Python 3, ideally with a simple example of usage (though looking at
changelogs in the code, I wonder if the upstream project is still alive).

For what it's worth, this fragment from python-smbpasswd-1.0.1-py3.patch should
work with both python 2.6 and python 3.1:

diff -up py-smbpasswd-1.0.1/smbpasswd.c.org py-smbpasswd-1.0.1/smbpasswd.c
--- py-smbpasswd-1.0.1/smbpasswd.c.org  2004-12-16 04:54:08.000000000 +0100
+++ py-smbpasswd-1.0.1/smbpasswd.c      2010-01-28 21:06:32.199624298 +0100
@@ -70,7 +70,7 @@ hash_to_string(char *tmp) 
         outbuffer[(i*2)+1] = HEXCHARS[   c   & 0x0f];
         }

-    return PyString_FromStringAndSize(outbuffer, 32);
+    return PyBytes_FromStringAndSize(outbuffer, 32);
     }

since /usr/include/python2.6/bytesobject.h provides:
  #define PyBytes_FromStringAndSize PyString_FromStringAndSize
and is included by /usr/include/python2.6/Python.h

So we could build both Python 2 and Python 3 versions of the module with that
hunk from the patch, and the shebang fix could be done in a post-processing
step.

Given that both Python 2 and Python 3 support can be built from identical
sources, I feel that it would be better to integrate the Python 3 support into
the pre-existing Python 2 SRPM as a new subpackage, rather than to create a new
SRPM.  See the notes on 
https://fedoraproject.org/wiki/PackagingDrafts/Python3
for rationale, and our current ideas on the best ways of doing this.  Again,
it's good to provide an example that shows the code working when requesting the
change this time from the Fedora package maintainer.

Hope this is helpful

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review

[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]