[opensuse-packaging] Get the SONAME of a library "before" it is built

Hi. First of all, I'm having problems with this particular list because I don't receive the answers in my mail account, so I cannot answer to anybody that is trying to help me. I've unsubscribed and subscribed again to see if it works now. Sorry for the inconveniences. In this answer to a previous question I did, http://lists.opensuse.org/opensuse-packaging/2014-05/msg00032.html I was said how to get the SONAME of a library, but how do you know it "before" the library is built? I mean, if I don't have that library installed and the package doesn't build so I can install the library and get it, I cannot run the suggested commands (readelf or objdump) to get the SONAME. So, how do you get the SONAME? I've read the page http://en.opensuse.org/openSUSE:Shared_library_packaging_policy but I can't see the answer to my question there (I may have overlooked it because my English is quite bad). Greetings. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Tue 27 May 2014 05:04:05 PM CDT, jcsl wrote:
Hi Since I use osc locally, I normally just pop into the build-root and run the readelf command as described against the built library so file if/when it fails. -- Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890) openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-11-desktop up 1 day 2:16, 3 users, load average: 0.04, 0.09, 0.08 CPU Intel® B840@1.9GHz | GPU Intel® Sandybridge Mobile -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Tue, 27 May 2014, Malcolm wrote:
Also the rpmlint check that fails (is that what fails?) suggests the correct package name. Richard. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

El Martes, 27 de mayo de 2014 17:25:17 Richard Biener escribi�:
Thanks, I'll check the build log better next time. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Tuesday 2014-05-27 17:20, Malcolm wrote:
I was said how to get the SONAME of a library, but how do you know it "before" the library is built?
One can take a guess. But it is much easier to just make the build of the source files succeed -- you will need that anyway. That the rpm build may still fail is secondary, because you can either (1) look at the locally-built objects with readelf as mentioned, or (2) rpmlint will tell you what the corresponding package name should be. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

El Martes, 27 de mayo de 2014 10:20:17 Malcolm escribió:
Sorry, I forgot to say that I use the web interface. Can you do something similar there? P.S.: It seems that now I can receive the mails, so it works! -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Tue 27 May 2014 05:30:20 PM CDT, jcsl wrote:
Hi You should look at using osc and build locally, way quicker to build and fix minor issues, and more important reduces the load on OBS ;) -- Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890) openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-11-desktop up 1 day 2:40, 3 users, load average: 0.09, 0.06, 0.05 CPU Intel® B840@1.9GHz | GPU Intel® Sandybridge Mobile -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

El Martes, 27 de mayo de 2014 10:44:24 Malcolm escribió:
I only package a few things, mostly package updates to submit them to their corresponding repositories. I'll give a look to it, but if I'm having problems with the web interface you could imagine what the result could be, XD. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

Make the build verbose and examine the build log; the link command usually contains the shared object name. W dniu 27.05.2014 17:30, jcsl pisze:
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

El Martes, 27 de mayo de 2014 17:04:05 jcsl escribió:
Hi. I have found that you can get the SONAME by adding the "readelf" or "objdump" command in the "install" section of the "spec" and reviewing the record of the build output. For example: readelf -a %{buildroot}%{_libdir}/libzlui.so | grep SONAME 0x000000000000000e (SONAME) Library soname: [libzlui.so.0.99] objdump %{buildroot}%{_libdir}/libzlui.so -p | grep SONAME SONAME libzlui.so.0.99 I have one more doubt. There is another library built as a subpackage in the same package. While in the libzlui I have to use the exact SONAME and I cannot even add a dash to separate the library name from the SONAME because the build is aborted (Your package contains a single shared library but is not named after its SONAME), the other library only issues a shlib-policy-missing-suffix warning. What is the difference between these two libraries? The warning disappears if I add a suffix to the library package name, and in this case there are no problems changing the name of the package. Greetings. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Tuesday 2014-05-27 20:20, jcsl wrote:
Your other subpackage contains more than one library. Obviously, if the package name matches library A, it cannot also match library B. zlibrary should be split into liblzcore and liblztext, probably. Also, you mixed up soname and soversion in your .spec. %define zlui_soname 0_99 %define zlib_suffix 0_99_4 The soname is, as told by objdump/readelf, libzlui.so.0.99. (.)0.99 / 0_99 is the suffix. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (5)
-
Jan Engelhardt
-
jcsl
-
Krzysztof Żelechowski
-
Malcolm
-
Richard Biener