Source Of Rpm's


 
Thread Tools Search this Thread
Operating Systems Linux Source Of Rpm's
# 1  
Old 02-04-2006
Source Of Rpm's

Hi every one...i am new to linux and have a problem with rpm's.
Do we have any facility to chk out the source code of rpm's.If yes plz specify the location so that i can explore a few...

secondly can i know where we can get the source code of standard shell commands like sleep,ls,top....etc.I am interested in chking out how they were coded.......

thanks in advance.....sandy
# 2  
Old 02-04-2006
For most distributions, source RPMs (SRPM) are included on the CD-ROMs/DVD-ROM, or can be downloaded off the distribution site.

You may install the SRPM but they will always be installed in /usr/src/[whatever]. To extract it at any arbitrary location, you will need to do it via cpio.

More info:
http://www.rpm.org/max-rpm/s1-rpm-mi...-rpm2cpio.html

An example:

Quote:
[cbkihong@laptop testrpm]$ rpm2cpio coreutils-5.2.1-7.src.rpm | cpio -iv
DIR_COLORS
DIR_COLORS.xterm
colorls.csh
colorls.sh
coreutils-4.5.2-C.patch
coreutils-4.5.3-langinfo.patch
coreutils-4.5.3-printf-ll.patch
coreutils-4.5.3-sysinfo.patch
coreutils-5.0-allow_old_options.patch
coreutils-5.2.1.tar.bz2
coreutils-acl.patch
coreutils-dateseconds.patch
coreutils-i18n.patch
coreutils-pam.patch
coreutils-selinux.patch
coreutils.spec
fileutils-4.1-dircolors_c.patch
fileutils-4.1.10-timestyle.patch
fileutils-4.1.10-utmp.patch
fileutils-4.1.5-afs.patch
sh-utils-1.16-paths.patch
sh-utils-2.0.11-dateman.patch
su.pamd
8875 blocks
This will extract the source RPM in the current directory. This package (coreutils) includes sources to all the fundamental commands. The official source package is in the coreutils-5.2.1.tar.bz2 tarball (known as "pristine sources" in the official literature), those outside are patches that will be automatically applied before the actual building process begins with rpmbuild. For more information about this process, please read the RPM book.

Last edited by cbkihong; 02-04-2006 at 10:41 PM..
# 3  
Old 02-05-2006
thanks for that,now let me tell u my actual problem.i am doing a project that includes load balancing in linux clusters.In that situation i used a shell script called "top" that gives the load of user,system and i/o.I am interested in knowing how the load is calculated on each node.for that i need the source code of top command....can u guide me by giving precise links or related material...
thank u in advance.....sandy
# 4  
Old 02-05-2006
On my system, top is not a shell script. It is a compiled executable.

You may be interested in this:
http://procps.sourceforge.net/
# 5  
Old 02-18-2006
just a note, I know this thread is old but I'm posting it for posterity, the "pristine" source tarball for all RPM's is in the RPM header, as are any patches to the pristine source, the purpose of which is exactly what this user's problem is.

just an FYI incase you're running into the same problem
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Rpm issue with autoconf-2.63-1.AIX6.1.noarch.rpm

dears i am trying to install the autoconf-2.63-1.aix6.1.noarch.rpm but its shows the below error message . P700_dev/svn/dependencies>rpm -i autoconf-2.63-1.aix6.1.noarch.rpm error: failed dependencies: m4 is needed by autoconf-2.63-1 P700_dev/svn/dependencies> (6 Replies)
Discussion started by: thecobra151
6 Replies

2. Shell Programming and Scripting

How to make RPM not write to RPM database if RPM fails to deploy?

How to make RPM not write to RPM database if RPM fails to deploy? IE I create an rpm spec file that contains the following if then exit 1 fi My rpm will fail at deployment, but if I do rpm -qa , I can see the rpm in the rpm db (3 Replies)
Discussion started by: 3junior
3 Replies

3. Shell Programming and Scripting

Extract RPM name from path to .rpm file

It's the end of the day and I just can't get my head around this. I'm trying to extract just the name of the RPM from the path to a .rpm file. So from: /home/me/rpm/RPMS/i386/nagios-our-plugins-1.2-6.i386.rpmI need to extract 'nagios-our-plugins'. I can't get the awk syntax right: awk '{... (5 Replies)
Discussion started by: aussieos
5 Replies

4. Red Hat

Source RPM issue

Hi, I have created one soruce rpm by using some help file on net. when i installed the rpm with command "rpm -i xxx.rpm", by default it got installed under "/usr/src/redhat/SOURCES/. I want to install these source file under /application/myapps/. Also i want some guidence to improve the source... (0 Replies)
Discussion started by: rajeshatbuzz
0 Replies

5. SuSE

How to install .src.rpm ? ( source rpm )

Hi, I have got few RPM's from rpmfind.net ( mainly gcc ). But it seems to be src files instead of the image. so I think we have to build the src files according to target machine using rpmbuild. Can any one help me with 1) Various options of rpm build that have to be taken care 2)... (3 Replies)
Discussion started by: Sivaswami
3 Replies

6. Linux

Converting source rpm to binary rpm

Hi, I need to install an rpm file,but I only have '.src.rpm' version of it. I want to convert it to a binary rpm. so I tried this rpm --rebuild somethin.src.rpm But I am gettin '--rebuild:Invalid option' as output Is there another way to rebuild source rpm.? Thanks in... (2 Replies)
Discussion started by: eamani_sun
2 Replies

7. UNIX for Advanced & Expert Users

Does anybody know Kernel-2.4.33 source rpm URL??

Hi Everybody, I want to download the kernel-2.4.33 source rpm.Does anybody know from where should i download?? As in kernel.org there are .gz or .bz2 versions of kernel packages are available. Any help is welcome. Thanks, Sriram (2 Replies)
Discussion started by: sriram.ec
2 Replies

8. Linux

Failed dependencies of rpm / how does RPM check for ?

Hey, I've a problem installing a package. rpm -ivh brings the errors: libjvm.so is needed by libverify.so is needed by But I have installed the Java SDK like requested and the files are on the disk. But I have no idea how to find out, why rpm cann't find them. I have also... (2 Replies)
Discussion started by: mod
2 Replies

9. Shell Programming and Scripting

how to use RPM to biuld *.rpm

I have an application for linux writen by me. and before use it, I have to install it. I 've writen a shell program to install it. Now how can I turn it to the *.rpm ? Is this can done by shell command rpm? How to do it? thanks (1 Reply)
Discussion started by: murataht
1 Replies

10. Programming

compile rpm-4.0 source

Hello Unix experts, I downloaded rpm-4.0 source from ftp.redhat.com and tried to make it. There are something I could not understand. - Makefile.in and Makefile.am instead of Makefile - file INSTALL doesn't show clearly the steps of compiling What are these 2 files, Makefile.in and... (2 Replies)
Discussion started by: eddie
2 Replies
Login or Register to Ask a Question