Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1295015 - Many Packages create broken symbolic links - in this case Python34
Summary: Many Packages create broken symbolic links - in this case Python34
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-urllib3
Version: 22
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Fedora Infrastructure SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-31 21:31 UTC by John Dodson
Modified: 2016-06-18 18:46 UTC (History)
4 users (show)

Fixed In Version: python-urllib3-1.15.1-3.fc23 python-urllib3-1.15.1-3.fc22 python-urllib3-1.15.1-3.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-07 01:24:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
First attempt at a patch (1.76 KB, patch)
2016-03-16 21:19 UTC, Ralph Bean
no flags Details | Diff
Error log from mock when applying first attempt at a patch (13.60 KB, text/plain)
2016-03-16 21:20 UTC, Ralph Bean
no flags Details

Description John Dodson 2015-12-31 21:31:03 UTC
Description of problem:
/usr/lib/python3.4/site-packages/urllib3/packages/six.pyo: broken symbolic link to `../../six.pyo'
supplied by: python3-urllib3-1.13.1-1.fc22.noarch

/usr/lib/python3.4/site-packages/urllib3/packages/six.pyc: broken symbolic link to `../../six.pyc'
supplied by: python3-urllib3-1.13.1-1.fc22.noarch



Version-Release number of selected component (if applicable):
python3-urllib3-1.13.1-1.fc22.noarch

How reproducible:
Every time the package updates

Steps to Reproduce:
1.Every time the package updates (even if you remove it)
2.
3.

Actual results:
They are broken symlinks.

Expected results:

There should be no broken symlinks - the package creating a symlink must also supply the target file - if it can't it should leave creation of the symlink to the package that does supply the target file.
Additional info:

Comment 1 Kevin Fenzi 2016-01-23 19:51:41 UTC
Moving to the right package.

Comment 2 John Dodson 2016-03-14 23:02:19 UTC
Any progress on this?
The same problem exists in FC23...

python3-urllib3.noarch                  1.13.1-3.fc23

Comment 3 Ralph Bean 2016-03-15 15:42:42 UTC
Sorry, this was not on my radar.  Will try to get a fix out asap.

Comment 4 Ralph Bean 2016-03-16 21:18:50 UTC
I'm not sure how to deal with this one.  I tried moving the symlinks to what I thought was the correct location, but the python3 byte compilation step seems to not like what I was doing.

I'm attaching my patch and error logs in case anyone has an idea about what to do here.

Comment 5 Ralph Bean 2016-03-16 21:19:35 UTC
Created attachment 1137147 [details]
First attempt at a patch

Comment 6 Ralph Bean 2016-03-16 21:20:05 UTC
Created attachment 1137148 [details]
Error log from mock when applying first attempt at a patch

Comment 7 Kevin Fenzi 2016-03-25 21:19:06 UTC
So, looking at this... python3-six only provides the 'six.py' file, not the .pyc/.pyo versions (which I think is right for python3). 

So, what we want to do here is not link to those non existent files.

Proposed patch: 

diff --git a/python-urllib3.spec b/python-urllib3.spec
index a889122..9ce418f 100644
--- a/python-urllib3.spec
+++ b/python-urllib3.spec
@@ -12,7 +12,7 @@
 
 Name:           python-%{srcname}
 Version:        1.13.1
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Python HTTP library with thread-safe connection pooling and file post
 
 License:        MIT
@@ -168,8 +168,6 @@ rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname/
 
 mkdir -p %{buildroot}/%{python3_sitelib}/urllib3/packages/
 ln -s ../../six.py %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py
-ln -s ../../six.pyc %{buildroot}/%{python3_sitelib}/urllib3/packages/six.pyc
-ln -s ../../six.pyo %{buildroot}/%{python3_sitelib}/urllib3/packages/six.pyo
 cp %{SOURCE1} %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname.py
 
 # Copy in six.py just for the test suite.
@@ -222,6 +220,9 @@ rm -rf %{buildroot}/%{python3_sitelib}/__pycache__*
 %endif # with_python3
 
 %changelog
+* Wed Mar 16 2016 Ralph Bean <rbean> - 1.13.1-4
+- Fix broken symlinks in python3-urllib3 subpackage (#1295015).
+
 * Fri Feb 26 2016 Ralph Bean <rbean> - 1.13.1-3
 - Apply patch from upstream to fix ipv6.
 
Scratch build: 
https://koji.fedoraproject.org/koji/taskinfo?taskID=13461212

If that looks ok to you, I can push it or you can. ;)

Comment 8 John Dodson 2016-03-25 22:25:45 UTC
Yes. Looks ok to me!
Thanks for your efforts in fixing this.
Will the package maintainers for the package that does need
those symlinks be "warned" to do the right thing & create/remove them when appropriate?

I guess we can post a bug when they don't ;-)

Comment 9 Ralph Bean 2016-03-28 13:47:31 UTC
Let's try it out.  One tricky part to this is that while python3-six doesn't provide the .pyc/.pyo files that we're used to, it does provide some new ones under a __pycache__ directory.  See 'rpm -qal python3-six' output:

  /usr/lib/python3.4/site-packages/__pycache__/six.cpython-34.pyc
  /usr/lib/python3.4/site-packages/__pycache__/six.cpython-34.pyo

Comment 10 Ralph Bean 2016-03-28 14:15:03 UTC
Yeah, confirmed.  Applying the patch above ends up re-using the bundled __pycache__ files for six.py.. and if I remove them then it doesn't work at all.  Still looking for another solution here.

Comment 11 Fedora Admin XMLRPC Client 2016-04-04 20:36:43 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 12 John Dodson 2016-06-01 05:37:17 UTC
Any news on this?

Comment 13 Ralph Bean 2016-06-01 20:15:28 UTC
I ended up applying Kevin's patch here:  http://pkgs.fedoraproject.org/cgit/rpms/python-urllib3.git/commit/?id=646b32969a1288f24993b81fb3b80d1235f39ada as I just couldn't figure out another way.

Comment 14 Fedora Update System 2016-06-01 20:24:28 UTC
python-urllib3-1.15.1-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-6055c6f922

Comment 15 Fedora Update System 2016-06-01 20:24:36 UTC
python-urllib3-1.15.1-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-5af58932b8

Comment 16 Fedora Update System 2016-06-01 20:24:41 UTC
python-urllib3-1.15.1-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d76350d8c5

Comment 17 Fedora Update System 2016-06-02 09:00:42 UTC
python-urllib3-1.15.1-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-5af58932b8

Comment 18 Fedora Update System 2016-06-02 16:22:09 UTC
python-urllib3-1.15.1-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-6055c6f922

Comment 19 Fedora Update System 2016-06-02 16:22:25 UTC
python-urllib3-1.15.1-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-d76350d8c5

Comment 20 Fedora Update System 2016-06-02 17:30:42 UTC
python-urllib3-1.15.1-3.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-bc843b3a8d

Comment 21 Fedora Update System 2016-06-02 17:30:49 UTC
python-urllib3-1.15.1-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-635f0ce6a3

Comment 22 Fedora Update System 2016-06-02 17:30:55 UTC
python-urllib3-1.15.1-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-90cb798292

Comment 23 Fedora Update System 2016-06-03 09:25:42 UTC
python-urllib3-1.15.1-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-635f0ce6a3

Comment 24 Fedora Update System 2016-06-03 16:22:00 UTC
python-urllib3-1.15.1-3.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-bc843b3a8d

Comment 25 Fedora Update System 2016-06-03 16:27:11 UTC
python-urllib3-1.15.1-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-90cb798292

Comment 26 Fedora Update System 2016-06-07 01:23:58 UTC
python-urllib3-1.15.1-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 27 Fedora Update System 2016-06-12 22:50:22 UTC
python-urllib3-1.15.1-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 28 Fedora Update System 2016-06-18 18:46:54 UTC
python-urllib3-1.15.1-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.