[ale] SUCCESSFUL: Add source repo to CentOS, Was: Epic 'wish I had chosen Debian' fail

Richard Bronosky Richard at Bronosky.com
Wed Sep 9 14:42:00 EDT 2009


I don't know how something becomes Google-proof. But here is what is
by-far the most annoying case of it for me:
http://www.colinburns.com/wordpress/?p=67#comment-556 I have to use
that all the time to set up different computers and no combination of
search terms will find it. I had to bookmark it on delicious.com so I
can find it. Very sad.

.!# RichardBronosky #!.



On Wed, Sep 9, 2009 at 2:31 PM, Jim Kinney <jim.kinney at gmail.com> wrote:
> I want to applaude the term "Google-proof". Not that I have a good use
> for it. I just like the way it sounds.
>
> Google-proof
>
> That should be a test for systemic structural data integrity.
>
> If Google can't find it or use it, it's very well done.
>
> On Wed, Sep 9, 2009 at 1:41 PM, Richard Bronosky <Richard at bronosky.com> wrote:
>> My repos list included the following "base" entry:
>> [base]
>> name=CentOS-$releasever - Base
>> mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
>> #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
>> gpgcheck=1
>> gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
>>
>> I discovered the if you use your browser to visit the baseurl which is
>> commented out, you can navigate back out of the architecture directory
>> and find the SRPMS directory. Using this I created the following
>> "base-source" entry:
>> [base-source]
>> name=CentOS-$releasever - Base - Source
>> #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
>> baseurl=http://mirror.centos.org/centos/5/os/SRPMS/
>> gpgcheck=1
>> gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
>>
>> Now I can successfully do "yumdownloader --source" commands. From what
>> I can tell this is either non-documented or completely Google-proof. I
>> did try every combo of &arch=(source|src|srpm|SRPM) and
>> repo=os-(source|src|srpm|SRPM) but the CentOS mirror list seems to not
>> have any source repos in it.
>>
>> .!# RichardBronosky #!.
>>
>>
>>
>> On Mon, Sep 7, 2009 at 2:35 PM, Michael H. Warfield <mhw at wittsend.com> wrote:
>>> On Mon, 2009-09-07 at 11:56 -0400, Richard Bronosky wrote:
>>>> --source is exactly what I was trying, but the default CentOS install
>>>> does list any source repos. I cannot find any documentation on adding
>>>> source repos to CentOS.
>>>
>>>        Ah, sorry.  I missed that little point in your original post.  Guess I
>>> should read a little closer, next time.  That does raise an interesting
>>> question then.  Since CentOS largely mirrors RHEL, I wonder whats in
>>> RHEL.  I'll have to check that out.  Should be possible to create a
>>> source repo for yum if CentOS has to corresponding repos in their mirror
>>> list.  Checking in the repos, I see that they do.
>>>
>>>        This should work for a straight baseurl repo.  I'm not sure about the
>>> correct syntax for enabling the mirrors:
>>>
>>> CentOS-Base-Source.repo:
>>>
>>> [base-source]
>>> name=CentOS-$releasever - Base Source
>>> # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
>>> baseurl=http://mirror.centos.org/centos/$releasever/os/SRPM/
>>> enable=0
>>> gpgcheck=1
>>> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
>>>
>>> #released updates
>>> [updates-source]
>>> name=CentOS-$releasever - Updates
>>> # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
>>> baseurl=http://mirror.centos.org/centos/$releasever/updates/SRPMS/
>>> enabled=0
>>> gpgcheck=1
>>> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
>>>
>>>        Just tested that as well.  Works like a charm.
>>>
>>>        Follow the same pattern for all the others.  Name the repo
>>> [repo-source], comment out the mirrors, uncomment the baseurl, and
>>> change $basearch to SRPMS and add "enabled=0" to the repo.
>>>
>>>        The source rpm repos are typically not "enabled" per se.  Seems like
>>> yumdownloader uses them anyways if the corresponding non "-source" repo
>>> is enabled.  Not sure how it manages that.  You probably do NOT want to
>>> enable it or yum update might do strange things.  They do NOT have to be
>>> in the same repo file, so you can create a separate -source repo and not
>>> have to worry about an update clobbering your changes.
>>>
>>>        Mike
>>>
>>>> On 9/7/09, Michael H. Warfield <mhw at wittsend.com> wrote:
>>>> > On Sun, 2009-09-06 at 22:52 -0400, Richard Bronosky wrote:
>>>> >> I never did learn how to add a source repo to yum, but I did work
>>>> >> around it. The following works for downloading a source package:
>>>> >
>>>> >> p=postfix; # Change this to your packagename.
>>>> >> curl -O $(yumdownloader --urls $p |sed
>>>> >> '$!d;s?/os/.*/?/os/SRPMS/?;s/[^.]*\.rpm$/src.rpm/')
>>>> >>
>>>> >> .!# RichardBronosky #!.
>>>> >
>>>> > How about "yumdownloader --source foo"
>>>> >
>>>> > It's in yum-utils.  I use it all the time to snatch rawhide source rpm's
>>>> > (like the gnupg and gnupg2 packages just recently) to backport into
>>>> > earlier distros:
>>>> >
>>>> > yumdownloader --enablerepo=rawhide --source gnupg gnupg2
>>>> >
>>>> > Done.  Install the rpms and rebuild them.
>>>> >
>>>> >     Mike
>>>> >
>>>> >> On Sun, Sep 6, 2009 at 1:09 AM, Richard Bronosky<Richard at bronosky.com>
>>>> >> wrote:
>>>> >> > I just spent 3 hours trying to install postfix compiled with mysql
>>>> >> > support. Most of that time was spent trying to get a source repo added
>>>> >> > so I could: yumdownloader --source postfix
>>>> >> >
>>>> >> > No luck. Wasted night. I could have really used the sleep. </rant>
>>>> >> >
>>>> >> > --
>>>> >> > Sent from my mobile device
>>>> >> >
>>>> >> > .!# RichardBronosky #!.
>>>> >> >
>>>> >> _______________________________________________
>>>> >> Ale mailing list
>>>> >> Ale at ale.org
>>>> >> http://mail.ale.org/mailman/listinfo/ale
>>>> >
>>>> > --
>>>> > Michael H. Warfield (AI4NB) | (770) 985-6132 |  mhw at WittsEnd.com
>>>> >    /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
>>>> >    NIC whois: MHW9          | An optimist believes we live in the best of
>>>> > all
>>>> >  PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
>>>> >
>>>
>>> --
>>> Michael H. Warfield (AI4NB) | (770) 985-6132 |  mhw at WittsEnd.com
>>>   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
>>>   NIC whois: MHW9          | An optimist believes we live in the best of all
>>>  PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
>>>
>>
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://mail.ale.org/mailman/listinfo/ale
>>
>
>
>
> --
> --
> James P. Kinney III
> Actively in pursuit of Life, Liberty and Happiness
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
>



More information about the Ale mailing list