Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Proper way to obtain source code for packages

  1. #11
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default AW: Re: AW: Proper way to obtain source code for packages

    As a addon (this link is quite old but gives you the principles) here is alink which explains you the structure of /usr/src/packages (34.2 The RPM build tree )
    Chapter 34: Compiling SuSE Source Packages

  2. #12
    Join Date
    Jan 2009
    Location
    Switzerland
    Posts
    1,529

    Default Re: AW: Re: AW: Proper way to obtain source code for packages

    I think nobody answered your question. When you just want to look at the code of a package, then

    1. Download somepackage.src.rpm into a directory.

    2. Unpack it like this:

    Code:
    unrpm somepackage.src.rpm
    3. You will find a couple of files (somepackage.spec and a couple of patch files probably) and an archive of the original source code ending in *.tar.bz2. Unpack it:

    Code:
    tar xvlf somepackage.tar.bz2
    Then you have everything you want to look at.
    Technology is 'stuff that doesn't work yet.' -- Bran Ferren

  3. #13
    Join Date
    Dec 2010
    Location
    Columbia, SC
    Posts
    10

    Default Re: AW: Re: AW: Proper way to obtain source code for packages

    Thanks Voodoo, I think that is the answer to the original question I had. However, I learned a lot from the other posts so my round about question did some good.

  4. #14
    Join Date
    Mar 2008
    Location
    Phuket, Thailand
    Posts
    26,517
    Blog Entries
    37

    Default Re: AW: Re: AW: Proper way to obtain source code for packages

    On a slightly related note, we have a forum guide here on Software on openSUSE: openSUSE software installation hints

    That guide likely still needs further updating, but what you may find of interest is the command "rpmbuild".

    I used that yesterday, when I went to install kde4-kdenlive (packaged by packman packagers) on one of my openSUSE-11.4 Milestone5 test PCs, and found that the dependency requirement to install it could not be met, because the application 'dvdauthor' was missing for 11.4 M5. So I downloaded the .src file for dvdauthor for openSUSE-11.3 and then from a terminal rebuilt that package for openSUSE-11.4 M5 by typing as a regular user:

    Code:
    rpmbuild --rebuild dvdauthor-0.7.0-1.pm.2.1.src.rpm
    the 1st time I typed that, I was advised of a number of "devel" dependencies I was missing in order to rebuild 'dvdauthor'. So I simply installed those missing dependencies (which fortunately were present) and then again tried:
    Code:
    rpmbuild --rebuild dvdauthor-0.7.0-1.pm.2.1.src.rpm
    and the rpm dvdauthor-0.7.0-1.pm.2.1.i586.rpm was rebuilt for openSUSE-11.4 M5 and (in this case) placed under /usr/src/packages/RPMS/i586. I then installed that newly created rpm for 'dvdauthor' with zypper and again tried to install 'kde4-kdenlive'. This time, kde4-kdenlive installed.

Page 2 of 2 FirstFirst 12

Posting Permissions

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