punkrockguy318 Posted February 4, 2004 Report Share Posted February 4, 2004 How can I get the source code for programs in mandrake? Is there some urpmi command or srpms? or is there a site with all the mandrake sources on it? I know this is GPL i have to be able to get the sources. Thanks a lot! Also: Can I do this via command line? Quote Link to comment Share on other sites More sharing options...
Ixthusdan Posted February 4, 2004 Report Share Posted February 4, 2004 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! Quote Link to comment Share on other sites More sharing options...
bvc Posted February 4, 2004 Report Share Posted February 4, 2004 yes there is a urpmi command. Did ya read the man page or --help? Most mirrors have a source directory. Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted February 4, 2004 Report Share Posted February 4, 2004 (edited) 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 February 22, 2004 by Steve Scrimpshire Quote Link to comment Share on other sites More sharing options...
bvc Posted February 4, 2004 Report Share Posted February 4, 2004 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.