Bug 1539993 - rpmlint: "E: hardcoded-library-path in %{_prefix}/lib"
Summary: rpmlint: "E: hardcoded-library-path in %{_prefix}/lib"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: youtube-dl
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Till Maas
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-30 02:19 UTC by Tim Landscheidt
Modified: 2018-04-11 07:32 UTC (History)
5 users (show)

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:
Clone Of:
Environment:
Last Closed: 2018-02-14 17:10:21 UTC
Type: Bug


Attachments (Terms of Use)
Patch to remove interpreter shebang from source, not installed files. (1.12 KB, patch)
2018-01-30 02:19 UTC, Tim Landscheidt
no flags Details | Diff

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.


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