Hi all! I am a recently converted Ubuntu user ( well almost, still have Ubuntu on my workstation ). I was attempting to figure where Gnome’s NetworkManager Applet was loading the panel icon images from which led me to attempt to figure out how to obtain the source for the binary package. I have had no luck so far. Here is what I have done up to this point.
Enabled the OpenSUSE 11.3 Source Repository in YaST.
Refreshed the Software Manager.
Don’t know what to do next
What is the proper way to obtain source for installed packages ( or any package for that matter )?
BTW, I did get the NM applet to pick up my custom icons through trial and error but I am interested expanding from my Java background by leaning to program for SUSE. So I’d really like to obtain the source code for the packages installed on my system.
That’s a step in the right direction, thanks. I was able to browse and find the source packages. However, even though I have the 11.3 source repository enabled, it does not show up in the list of repositories in the Software Manager program. I even gave the source repository a higher priority ( set priority to 98, all other repositories are 99 ) to see if that would help.
Is this something that I will have to learn the YaST command line for?
>
> Is this something that I will have to learn the YaST command line for?
>
>
Whenever I install a source package I use zypper for this. The zypper option
is si (source-install)
For example
sudo zypper si <package-name>
Of course you have to replace <package-name> with the real name of the
package.
I hope I did not completely missunderstand what you want.
For proper package builds you should make yourself familiar with rpmbuild.
–
openSUSE 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.5 | GeForce
9600 GT | 4GB Ram
openSUSE 11.3 64 bit | Intel Core2 Duo T9300@2.50GHz | KDE 4.5 | Quadro FX
3600M | 4GB Ram
Now will installing as you outlined actually build the binary or does it just extract the source ( or are there different options to pass to zypper to control that? )
zypper only installs the source it does not compile anything (the same as on debian/ubuntu if you install the source packages with apt-get/aptitude or synaptic).
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
I think nobody answered your question. When you just want to look at the code of a package, then
Download somepackage.src.rpm into a directory.
Unpack it like this:
unrpm somepackage.src.rpm
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:
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.
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](http://packman.links2linux.de/package/dvdauthor) and then from a terminal rebuilt that package for openSUSE-11.4 M5 by typing as a regular user:
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:
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.