Bug 1295015 - Many Packages create broken symbolic links - in this case Python34
Many Packages create broken symbolic links - in this case Python34
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: python-urllib3 (Show other bugs)
22
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Fedora Infrastructure SIG
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-31 16:31 EST by John Dodson
Modified: 2016-06-18 14:46 EDT (History)
4 users (show)

See Also:
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:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-06 21:24:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
First attempt at a patch (1.76 KB, patch)
2016-03-16 17:19 EDT, 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 17:20 EDT, Ralph Bean
no flags Details

  None (edit)
Description John Dodson 2015-12-31 16:31:03 EST
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 14:51:41 EST
Moving to the right package.
Comment 2 John Dodson 2016-03-14 19:02:19 EDT
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 11:42:42 EDT
Sorry, this was not on my radar.  Will try to get a fix out asap.
Comment 4 Ralph Bean 2016-03-16 17:18:50 EDT
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 17:19 EDT
Created attachment 1137147 [details]
First attempt at a patch
Comment 6 Ralph Bean 2016-03-16 17:20 EDT
Created attachment 1137148 [details]
Error log from mock when applying first attempt at a patch
Comment 7 Kevin Fenzi 2016-03-25 17:19:06 EDT
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@redhat.com> - 1.13.1-4
+- Fix broken symlinks in python3-urllib3 subpackage (#1295015).
+
 * Fri Feb 26 2016 Ralph Bean <rbean@redhat.com> - 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 18:25:45 EDT
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 09:47:31 EDT
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 10:15:03 EDT
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 16:36:43 EDT
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 01:37:17 EDT
Any news on this?
Comment 13 Ralph Bean 2016-06-01 16:15:28 EDT
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 16:24:28 EDT
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 16:24:36 EDT
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 16:24:41 EDT
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 05:00:42 EDT
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 12:22:09 EDT
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 12:22:25 EDT
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 13:30:42 EDT
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 13:30:49 EDT
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 13:30:55 EDT
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 05:25:42 EDT
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 12:22:00 EDT
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 12:27:11 EDT
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-06 21:23:58 EDT
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 18:50:22 EDT
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 14:46:54 EDT
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.