Yum and SRPMs

Panu Matilainen pmatilai at laiskiainen.org
Mon Nov 28 07:11:58 UTC 2005


On Sun, 27 Nov 2005, Sadda Teh wrote:

> I'm thinking the "yum install --source packagename" would do the following:
>
> 1. Download src rpms and dependent libraries required for successfully
> rebuilding the requested source download(s)

That's two distinct operations, of which one requires root privileges and 
the other one doesn't. And both of them exist already:
1) yumdownloader --source <packagename>
2) yum-builddep <packagename> (or the just downloaded src.rpm file)

> 2. Extract the the source tarball to some standard location so the developer
> can cd to that dir and be able to immediately do a ./configure && make
> without errors

That's not how you work with source rpm's. With the two above steps you 
can however do 'rpmbuild --rebuild <src.rpm-name>'. Or like others have 
mentioned, use mock for the building part.

> I agree that having this functionality in yum may not be the best place.
> But, since yum already handles dependency resolution, how hard would this
> functionality really be to add? I just tried yumdownloader  --source and all
> it did was download the src rpm to the current dir and nothing more. This is
> one step removed from going to the FTP and downloading the file. I tried
> yumdownloader --source yum-utils and it didn't even work. So it's clear
> yumdownloader does not have the functionality I desire, nor the
> functionality that it probably should have at a bare minimum (that is
> finding src equivalents of binary packages).

"yumdownloader --source yum-utils" wont work out of the box, because the 
default yum setup doesn't include the SRPMS repositories for anything but 
initial core packages. You'll need to add a separate entry to yum.repos.d 
that includes extras SRPMS repo.

 	- Panu -




More information about the fedora-devel-list mailing list