Bug 1539993

Summary: rpmlint: "E: hardcoded-library-path in %{_prefix}/lib"
Product: [Fedora] Fedora Reporter: Tim Landscheidt <tim>
Component: youtube-dlAssignee: Till Maas <opensource>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: mcepl, mcepl, opensource, rafalzaq, tim
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: youtube-dl-2018.02.08-2.fc26 youtube-dl-2018.02.08-2.fc27 youtube-dl-2018.02.08-2.el6 youtube-dl-2018.02.08-2.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-14 17:10:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to remove interpreter shebang from source, not installed files. none

Description Tim Landscheidt 2018-01-30 02:19:54 UTC
Created attachment 1388127 [details]
Patch to remove interpreter shebang from source, not installed files.

rpmlint issues the error "E: hardcoded-library-path in %{_prefix}/lib" (https://taskotron.fedoraproject.org/artifacts/all/95b9d702-007e-11e8-9e9d-525400fc9f92/task_output/youtube-dl-2018.01.21-1.fc26.log) due to:

| […]

| %install
| %if 0%{?fedora}
| %py3_install
| %else
| %py2_install
| %endif

| […]
| # Remove interpreter from module files
| find %{buildroot}%{_prefix}/lib -type f -print0 | xargs -0 sed -i -e '/^\#!\/usr\/bin\/env python/d'
       ^^^^^^^^^^^^^^^^^^^^^^^^^^
| […]

Additionally, this operates on the installed files /after/ they have been compiled and installed, i. e. the source files can have a later timestamp than their compiled counterparts.

The attached patch solves this by moving it to %prep (and being extra paranoid about no input for xargs, deleting only "#!/usr/bin/env python" and only on the first line; test build at https://koji.fedoraproject.org/koji/taskinfo?taskID=24550131, "curl -s https://kojipkgs.fedoraproject.org//work/tasks/131/24550131/youtube-dl-2018.01.21-1.fc28.noarch.rpm | rpm2cpio | cpio -i --to-stdout | fgrep /usr/bin/env" shows that all /usr/bin/env shebangs still get removed).

Comment 1 Fedora Update System 2018-02-09 14:05:48 UTC
youtube-dl-2018.02.08-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-47bee236ac

Comment 2 Fedora Update System 2018-02-09 14:06:03 UTC
youtube-dl-2018.02.08-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-2b4320107f

Comment 3 Fedora Update System 2018-02-09 14:06:12 UTC
youtube-dl-2018.02.08-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-7dc7911509

Comment 4 Fedora Update System 2018-02-09 14:06:21 UTC
youtube-dl-2018.02.08-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-a3e1cec05a

Comment 5 Fedora Update System 2018-02-12 18:30:47 UTC
youtube-dl-2018.02.08-2.el6 has been pushed to the Fedora EPEL 6 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-EPEL-2018-7dc7911509

Comment 6 Fedora Update System 2018-02-12 19:09:51 UTC
youtube-dl-2018.02.08-2.fc26 has been pushed to the Fedora 26 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-2018-a3e1cec05a

Comment 7 Fedora Update System 2018-02-13 07:58:09 UTC
youtube-dl-2018.02.08-2.fc27 has been pushed to the Fedora 27 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-2018-47bee236ac

Comment 8 Fedora Update System 2018-02-13 08:55:22 UTC
youtube-dl-2018.02.08-2.el7 has been pushed to the Fedora EPEL 7 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-EPEL-2018-2b4320107f

Comment 9 Fedora Update System 2018-02-14 17:10:21 UTC
youtube-dl-2018.02.08-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2018-02-14 17:30:34 UTC
youtube-dl-2018.02.08-2.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2018-02-27 16:42:36 UTC
youtube-dl-2018.02.08-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2018-02-27 20:39:44 UTC
youtube-dl-2018.02.08-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.