Bug 355897 - RPMlint complies of unversioned library
Summary: RPMlint complies of unversioned library
Status: RESOLVED FIXED
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Andrius Štikonas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-25 16:39 UTC by Mattia
Modified: 2016-01-06 14:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
signature.asc (818 bytes, application/pgp-signature)
2015-12-13 14:46 UTC, Andrius Štikonas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mattia 2015-11-25 16:39:32 UTC
This bug is about KPMcore, but since there's no component in bugzilla I think the closest match is Partitionmanager...

Rpmlint complies about unversioned libraries (/usr/lib/libkpmcore.so) installed by KPMcore in ld path.

I don't know if that library is public or private (it seems public to me), but should be versioned or moved away from ld path.
See https://fedoraproject.org/wiki/Common_Rpmlint_issues#invalid-soname

Thanks.

Reproducible: Always
Comment 1 Mattia 2015-11-25 16:42:28 UTC
I forgot to say this is needed to fix for packaging KPMcore in Fedora.
Comment 2 Andrius Štikonas 2015-11-25 16:51:21 UTC
Git commit 4da5a0e8a2bca603428914416fe9888b9dc6eb34 by Andrius Štikonas.
Committed on 25/11/2015 at 16:49.
Pushed by stikonas into branch 'master'.

Make sure so version is set on the target.

M  +6    -1    CMakeLists.txt

http://commits.kde.org/kpmcore/4da5a0e8a2bca603428914416fe9888b9dc6eb34
Comment 3 Andrius Štikonas 2015-11-25 16:52:31 UTC
Thanks for reporting it. I had something setting soversion in CMakeLists.txt but it was incomplete.

Hopefully it works not, if not please reopen.
Comment 4 Mattia 2015-11-30 07:27:53 UTC
It works fine and kpmcore is now ok.

But there's also kpmgui.so in partitionmanager that should be versioned.

Thanks.
Comment 5 Andrius Štikonas 2015-11-30 12:42:57 UTC
(In reply to Mattia from comment #4)
> It works fine and kpmcore is now ok.
> 
> But there's also kpmgui.so in partitionmanager that should be versioned.
> 
> Thanks.

kpmgui.so is a private library (basically it is the whole partitionmanager). Should I just move it to /usr/lib/partitionmanager ?
Comment 6 Mattia 2015-11-30 19:38:30 UTC
(In reply to Andrius Štikonas from comment #5)
> kpmgui.so is a private library (basically it is the whole partitionmanager).
> Should I just move it to /usr/lib/partitionmanager ?

In the link I provided in Comment #1 it says:
The standard way to move a private library is to create a new directory under %{_libdir} e. g., /usr/lib/myapp. Don't list it in /etc/ld.so.conf files! Instead, use a rpath to let the application locate the library. 

So, yes, I think moving under /usr/lib/partitionmanager (or /usr/lib64/partitionmanager) should be the best thing.
Comment 7 Mattia 2015-12-13 14:33:03 UTC
I was wrong. Conventions for libraries requires always fully versioned names and proper soname:
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html

Only moving kpmgui.so under a private directory is not enough.
Comment 8 Andrius Štikonas 2015-12-13 14:46:19 UTC
Created attachment 96038 [details]
signature.asc

Oh, I see. Maybe I should just get rid of that library, since there is almost 
nothing outside it in partitionmanager executable. I think only main.cpp file.
Comment 9 Andrius Štikonas 2016-01-06 14:00:08 UTC
I've removed kpmgui library, so unversioned library issue should be resolved.