Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 548374 - app-misc/ca-certificates - enable dev-lang/python-3
Summary: app-misc/ca-certificates - enable dev-lang/python-3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-02 06:52 UTC by Felix Tiede
Modified: 2015-09-29 00:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Make mozilla-supplied certificate conversion script work with python-3. (python3-compat.patch,2.82 KB, patch)
2015-05-02 06:54 UTC, Felix Tiede
Details | Diff
Patch ebuild to use a patched mozilla script, depending on system's default python version (ca-certificates-20140927.3.17.2.ebuild.patch,888 bytes, patch)
2015-05-02 06:57 UTC, Felix Tiede
Details | Diff
Update certdata2pem for Python 3 (update-certdata2pem.py-for-python-3.patch,3.43 KB, patch)
2015-09-25 12:10 UTC, Michael Morak
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Tiede 2015-05-02 06:52:02 UTC
Some versions of app-misc/ca-certificates convert the certificates from mozilla certificate store to PEM format. The mozilla-supplied script for this task requires python-2.

app-misc/ca-certificates is the last package to require dev-lang/python-2 on some of my systems, hence I created a patch to make it work with dev-lang/python-3.

A patch for script and ebuild, which works for me with current dev-lang/python-3 on x86 and amd64 will follow.

Reproducible: Always
Comment 1 Felix Tiede 2015-05-02 06:54:39 UTC
Created attachment 402418 [details, diff]
Make mozilla-supplied certificate conversion script work with python-3.

Unfortunately I don't think the script can be patched to work with python-2 and python-3 without further changes, thus the ebuild needs to figure whether or not this patch needs to be applied.
Comment 2 Felix Tiede 2015-05-02 06:57:52 UTC
Created attachment 402420 [details, diff]
Patch ebuild to use a patched mozilla script, depending on system's default python version
Comment 3 SpanKY gentoo-dev 2015-05-04 02:37:20 UTC
Comment on attachment 402420 [details, diff]
Patch ebuild to use a patched mozilla script, depending on system's default python version

we don't want conditional patching, and this isn't how you do detection -- it needs to be at the eclass level otherwise people can switch the default and break things
Comment 4 SpanKY gentoo-dev 2015-05-04 02:38:28 UTC
Comment on attachment 402418 [details, diff]
Make mozilla-supplied certificate conversion script work with python-3.

the raise format is the same between the two

for print, just import the future version to make it work in both

for the encoding, i think the open functions need tweaking
Comment 5 Michael Morak 2015-09-25 12:10:32 UTC
Created attachment 412862 [details, diff]
Update certdata2pem for Python 3

A bug report recently submitted to Debian (Debian Bug #789753) addresses this issue. I have attached the patch submitted there, which, according to the Debian bug report has been tested with Python 2.7, 3.3, 3.4 and PyPy 2.4. This should make the certdata2pem.py script run on all relevant python architectures, no conditional patching necessary.
Comment 6 SpanKY gentoo-dev 2015-09-26 17:46:36 UTC
(In reply to wothram from comment #5)

thanks for the update.  now in the tree:
http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e28397b91d9a84ccc36f8fdb3499f747d50e3d9