Bug 1987743 - mysql2/mysql2.so has defined DT_RPATH: /usr/lib64/
Summary: mysql2/mysql2.so has defined DT_RPATH: /usr/lib64/
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: rubygem-mysql2
Version: CentOS Stream
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: ruby maint
QA Contact: RHEL CS Apps Subsystem QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-29 16:10 UTC by Pavel Valena
Modified: 2023-07-29 07:28 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-29 07:28:06 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Valena 2021-07-29 16:10:02 UTC
Description of problem:
Failing in the CI, /rpminspect/runpath test.

I'm not sure exactly, how the flag is set, but it's probably auto-detected in exconf.rb - 
https://github.com/brianmario/mysql2/blob/ca883e1a359a10f48ac5d0ce649827b424110cd7/ext/mysql2/extconf.rb#L253

Either it's a false positive (/usr/lib64/ looks ok to me), or the RPATH is not supposed to be set at all.


Version-Release number of selected component (if applicable):
rubygem-mysql2-0.5.3-9.el9


Actual results:
```
4) /usr/lib64/gems/ruby/mysql2-0.5.3/mysql2/mysql2.so has an invalid-looking DT_RPATH on x86_64: /usr/lib64/

Result: VERIFY
Waiver Authorization: Anyone

Suggested Remedy:
Either DT_RPATH or DT_RUNPATH properties were found on ELF shared objects in this package.  The use of DT_RPATH and DT_RUNPATH is discouraged except in certain situations.  Check to see that you a disabling rpath during the %build stage of the spec file.  If you are unable to do this easily, you can try using a program such as patchelf to remove these properties from the ELF files.
```
Same for all architectures.

Expected results:
No DT_RPATH, probably.


Additional info:

This was introduced in Fedora-
https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild

Comment 2 Vít Ondruch 2021-07-30 11:48:27 UTC
Just FTR, there was already previous instances of this issue:

bug 1715073
bug 1572172

But IMHO, it'd be better if the RPATH was removed.

Comment 3 Pavel Valena 2021-07-30 16:10:27 UTC
(In reply to Vít Ondruch from comment #2)
> Just FTR, there was already previous instances of this issue:
> 
> bug 1715073
> bug 1572172

Thanks, I forgot to look here in bugzilla.

> 
> But IMHO, it'd be better if the RPATH was removed.

Agreed. Unless it breaks something, there's no need for exception.
There's option to unset it during build, but I think it's worth asking first:
https://github.com/brianmario/mysql2/issues/1201

Comment 5 Jun Aruga 2023-01-05 14:19:32 UTC
> Agreed. Unless it breaks something, there's no need for exception.
> There's option to unset it during build, but I think it's worth asking first:
> https://github.com/brianmario/mysql2/issues/1201

I would like to avoid an exception.
How can we work with this ticket? Do we change this ticket's status to NOTABUG or something[1]?

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1572172#c3

Comment 6 Vít Ondruch 2023-01-06 08:44:53 UTC
I think this should be addressed in Fedora first. And once it is fixed there, we can address in c9s.

Comment 7 RHEL Program Management 2023-07-29 07:28:06 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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