Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: adding libraries to an RPM

  1. #1

    Default adding libraries to an RPM

    I used the alien Perl script to convert an Ubuntu deb package to an RPM for installation on openSUSE. Attempting to install the resulting RPM turned up two failed dependencies: libxerces-c-3.1.so and libicuuc.so.44. Unable to find these anywhere in the repositories, I googled, downloaded and intalled their respective RPM packages. This time the package intalled and the program runs successfully.

    I want to release this RPM for distribution but would like to add the two libraries to it first. Having never buit an RPM, I've been doing some reading and can't find any mention of packaging libraries with an RPM, so something must be wrong with my assumptions.

    Will somebody please clue me in.

  2. #2

    Default Re: adding libraries to an RPM

    What Perl script did you use? alien?
    IMO, it would be easier to modify the dependencies of the .deb file (look in Ubuntu forum) or even create a deb file manually (https://synthesize.us/HOWTO_make_a_d...e_without_dpkg), then convert the deb to rpm using alien --to-rpm.

  3. #3

    Default Re: adding libraries to an RPM

    Quote Originally Posted by pitfall View Post
    I want to release this RPM for distribution but would like to add the two libraries to it first.
    I don't think you can release aliened rpms for distribution. Be prepared to face an onslaught of criticism!

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,667
    Blog Entries
    15

    Default Re: adding libraries to an RPM

    Quote Originally Posted by pitfall
    I used the alien Perl script to convert an Ubuntu deb package to an RPM
    for installation on openSUSE. Attempting to install the resulting RPM
    turned up two failed dependencies: libxerces-c-3.1.so and
    libicuuc.so.44. Unable to find these anywhere in the repositories, I
    googled, downloaded and intalled their respective RPM packages. This
    time the package intalled and the program runs successfully.

    I want to release this RPM for distribution but would like to add the
    two libraries to it first. Having never buit an RPM, I've been doing
    some reading and can't find any mention of packaging libraries with an
    RPM, so something must be wrong with my assumptions.

    Will somebody please clue me in.

    Hi
    Why not get the source and build the rpms?

    --
    Cheers Malcolm (Linux Counter #276890)
    openSUSE 11.3 (x86_64) Kernel 2.6.34.7-0.3-default
    up 8:16, 3 users, load average: 0.14, 0.12, 0.13
    GPU GeForce 8600 GTS Silent - Driver Version: 256.53


  5. #5

    Default Re: adding libraries to an RPM

    Quote Originally Posted by please_try_again View Post
    I don't think you can release aliened rpms for distribution. Be prepared to face an onslaught of criticism!
    Pardon my ignorance - but why would that be?

  6. #6

    Default Re: adding libraries to an RPM

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Why not get the source and build the rpms?
    Guess I could try. But since I already have a working RPM, I was hoping to just add the libraries.

    And neither of you have touched on my original question: is it possible to add the two libraries to the RPM?

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,667
    Blog Entries
    15

    Default Re: adding libraries to an RPM

    Quote Originally Posted by pitfall
    malcolmlewis;2233842 Wrote:
    > Hi
    > Why not get the source and build the rpms?


    Guess I could try. But since I already have a working RPM, I was
    hoping to just add the libraries.

    And neither of you have touched on my original question: is it possible
    to add the two libraries to the RPM?

    Hi
    That's not how to build rpms You need to get the src rpms for the
    libraries unpack and modify the spec file so they build for openSUSE.
    Then add those as a 'Requires' in the spec file for your other rpm.

    Here is a spec file I used to build the googletalk-plugin from a deb
    file (not using alien) locally;

    http://pastebin.com/pDqByxdD

    --
    Cheers Malcolm (Linux Counter #276890)
    openSUSE 11.3 (x86_64) Kernel 2.6.34.7-0.3-default
    up 15:25, 3 users, load average: 0.06, 0.02, 0.00
    GPU GeForce 8600 GTS Silent - Driver Version: 256.53


  8. #8

    Default Re: adding libraries to an RPM

    Quote Originally Posted by pitfall View Post
    Pardon my ignorance - but why would that be?
    Because it shows, that you are not even nearly as competent enough to distribute any packages.

    Would you take a -let's say- safety belt from a Ford, "install" it into a -let's say- Mercedes Benz, while doing that finding out that attaching via the original screws does not work as they don't fit, so you use some plastic tape and/or glue and call the product of this work a "safety belt" any more?

    Alien and/or checkinstall are NOT (and never were) meant to be tools for building packages ready for redistribution, you get this missing libraries, because they most likely DO exist on your target system, but not in that same version.

    If anybody would think "well, then let's pack the library (which was not even built with the same build environment as the one of the target system!) into my package as well", we would be only one step away from "DLL-hell".

  9. #9

    Default Re: adding libraries to an RPM

    Let me show you a little example, how adding a library to package could break things in funny ways.

    MPlayer from Packman repository links against libvdpau.so.1 and was built against libvdpau 0.4.0 (also from Packman).

    Code:
     ldd /usr/bin/mplayer |grep vdpau
    	libvdpau.so.1 => /usr/lib64/libvdpau.so.1 (0x00007f3e3c9d9000)
    Now let's have a look at this file.

    Code:
    ls -l /usr/lib64/libvdpau.*
    lrwxrwxrwx 1 root root   17 21. Sep 21:27 /usr/lib64/libvdpau.so.1 -> libvdpau.so.1.0.0
    -rwxr-xr-x 1 root root 6136 12. Sep 01:46 /usr/lib64/libvdpau.so.1.0.0
    So this is only a symlink pointing to libvdpau.so.1.0.0, where is that file from?

    Code:
    rpm -qf /usr/lib64/libvdpau.so.1.0.0 
    libvdpau1-0.4-0.pm.1.1.x86_64
    OK, as expected and as stated above, MPlayer was built against it, anything is fine.

    Now let's use the proprietary NVidia driver from the .run file (version 256.53) and install that (I actually don't use it directly but build my own rpms from it, so I have to "simulate" what will happen).

    After installation we get

    Code:
     ls -l /usr/lib64/libvdpau.*
    lrwxrwxrwx 1 root root    18  6. Okt 16:40 /usr/lib64/libvdpau.so.1 -> libvdpau.so.256.53
    -rwxr-xr-x 1 root root  6136 12. Sep 01:46 /usr/lib64/libvdpau.so.1.0.0
    -rw-r--r-- 1 root root 4056 28. Aug 05:54 /usr/lib64/libvdpau.so.256.53
    Ooops ..

    And even if the installer itself does not contain that symlink, it will be created by ldconfig automatically, need proof?

    Code:
     su -c "rm /usr/lib64/libvdpau.so.1"
    Passwort:
     
    ls -l /usr/lib64/libvdpau.*
    -rwxr-xr-x 1 root root  6136 12. Sep 01:46 /usr/lib64/libvdpau.so.1.0.0
    -rw-r--r-- 1 root root 4056 28. Aug 05:54 /usr/lib64/libvdpau.so.256.53
    
    su -c "/sbin/ldconfig"
    Passwort: 
    
    ls -l /usr/lib64/libvdpau.*
    lrwxrwxrwx 1 root root    18  6. Okt 16:45 /usr/lib64/libvdpau.so.1 -> libvdpau.so.256.53
    -rwxr-xr-x 1 root root  6136 12. Sep 01:46 /usr/lib64/libvdpau.so.1.0.0
    -rw-r--r-- 1 root root 4056 28. Aug 05:54 /usr/lib64/libvdpau.so.256.53
    Ooops......

    Now this _might_ work, if you are lucky, but it also can go horribly wrong and break all programs linking against that library, if you see "symbol lookup errors" when starting an application, you can bet on it, that something like this just happened.

    BTW:

    The SPEC for the RPM-packages from the NVidia Repository (and may I say my "private packages" also) removes libvdpau.so.256.53 from the files provided by the installer prior to building the package, guess why.

  10. #10

    Default Re: adding libraries to an RPM

    Quote Originally Posted by Akoellh View Post
    Because it shows, that you are not even nearly as competent enough to distribute any packages.

    Would you take a -let's say- safety belt from a Ford, "install" it into a -let's say- Mercedes Benz, while doing that finding out that attaching via the original screws does not work as they don't fit, so you use some plastic tape and/or glue and call the product of this work a "safety belt" any more?

    Alien and/or checkinstall are NOT (and never were) meant to be tools for building packages ready for redistribution, you get this missing libraries, because they most likely DO exist on your target system, but not in that same version.
    No - they do not exist in any version on openSUSE 11.3. And while I appreciate your Ford/Mercedes seat belt analogy, I cannot hope to learn new technology if I begin accepting answers such as, "Be prepared to face an onslaught of criticism!", without explanation.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •