Jump to content

Getting sources


punkrockguy318
 Share

Recommended Posts

Sources are "some-program-xxx.i586.srpm".

 

By the commandline, use "rpmbuild --rebuild some-program-xxx.i586.srpm".

 

You can then install the newly built rpm by "urpmi /usr/src/RPM/RPMS/i586/xxx.rpm"

 

Be sure that you have installed the kernel sources, or nothing will compile!

Link to comment
Share on other sites

General CMA Disclaimer: I am not responsible for any damage done to your computer or the surrounding environment if you run this script. USE AT YOUR OWN RISK!!!

 

Let's assume you are using the mirror ftp.rutgers.edu. The SRPMS are here:

ftp://ftp.rutgers.edu/pub/mandrake/Mandrake/9.2/SRPMS/

 

You can add that to your urpmi sources like this:

urpmi.addmedia sources1 ftp://ftp.rutgers.edu/pub/mandrake/Mandrake/9.2/SRPMS/ with ../i586/Mandrake/base/hdlist.src.cz && urpmi.addmedia sources2 ftp://ftp.rutgers.edu/pub/mandrake/Mandrake/9.2/SRPMS/ with ../i586/Mandrake/base/hdlist2.src.cz && urpmi.addmedia sources3 ftp://ftp.rutgers.edu/pub/mandrake/Mandrake/9.2/SRPMS/ with ../i586/Mandrake/base/hdlist3.src.cz

 

Then you can grab those sources several ways.

 

urpmi --install-src <<package name>> gives you sources in /usr/src/RPM/SOURCES

urpmi --src <<package name>> gives you srpms in /var/cache/urpmi/rpms

 

If you want to grab the srpm for every package you have installed, make a script that looks like this:

#!/bin/bash

# Perform an update of installed packages to make sure you have 
# what is on the mirrors
urpmi.update -a
urpmi --auto --auto-select --no-verify-rpm

# Check to see what packages are installed and download the 
# srpms for them
DOWNLD=$(rpm -qa)
for name in $DOWNLD
   do 
      urpmi --src $name
   done

 

Make it executable and run it.

Edited by Steve Scrimpshire
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...