SCIENTIFIC-LINUX-USERS Archives

September 2013

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
David Sommerseth <[log in to unmask]>
Reply To:
Date:
Tue, 3 Sep 2013 15:43:15 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (69 lines)
On 03/09/13 12:47, John Rowe wrote:
> Until now there seems to have been no _robust_ way of using a local
> repository for yum updates.
> 
> Editing the .repo files, as advised by the HowTo, breaks updates of the
> repo files themselves, and each of the methods on yum's own web page has
> a list of disadvantages. Using a local squid proxy has problems with
> mirroring.
> 
> But SL6x would finally seem to provide a simple way to do this! From
> "man yum.conf":
> 
>         As  of  3.2.28,  any  file  in /etc/yum/vars is turned into a
>         variable named after the filename 
> 
> This means that sl6x.repo can contain baseurl entries such as:
> 
> baseurl=http://ftp.scientificlinux.org/linux/scientific/6x/$basearch/updates/security/
>                 $localrepo/6x/$basearch/updates/security/
> http://ftp1.scientificlinux.org/linux/scientific/6x/$basearch/updates/security/  ftp://ftp.scientificlinux.org/linux/scientific/6x/$basearch/updates/security/
> 
> and the yum-conf-sl6x rpm could contain the above SL6x.repo plus a
> file /etc/yum/vars/localrepo consisting of the single line:
>  http://ftp2.scientificlinux.org/linux/scientific
> 
> To use a local repository we just replace the content
> of /etc/yum/vars/localrepo with the URL of the local repository, eg:
> file:///somewhere/SL/scientific
> 
> The change is simple, persistent across upgrades and doesn't break the
> repo files.
> 
> This raises the questions:
> 
> 1. Am I the only one finding using a local repository to be irksome, or
> is everybody else just smarter than I am?
> 
> 2. Would the SL maintainers be willing to put something like this into
> the yum-conf-sl6x RPM?

Hi John

I'm having a local mirror of SL, EPEL and a few more.  They're basically
just rsync mirrors.  To enforce the use of these mirrors, I've just
added my own RPM package which I've installed on all my systems.

This package contains the needed .repo file with pointers to the
mirrored repositories.  And in one of the RPM spec file scriptlets
(forgot which one, too lazy to dig it up) I'm calling yum-config-manager
to disable the other repositories if they are available.

With this approach, I've not had any issues at all.  And my kickstart
scripts ensures installing this package as early as possible.  I've also
added the same repositories with 'repo' statements in the kickstart
files, which ensures quite quick install of new systems with all the
latest bits.

I think one of the advantages here is that the original repository files
are not modified (except the disablement).  Which means it's quick and
easy to rollback in case of some critical issues with the repo server.
And if I decide to add or remove some of the mirrors, I just spin a new
package with the updated repo files (and yum-config-manager statements)
and they gets installed automatically on all systems.


kind regards,

David Sommerseth

ATOM RSS1 RSS2