Skip to content

Instantly share code, notes, and snippets.

@n0ts
Created October 3, 2012 10:58
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save n0ts/3826392 to your computer and use it in GitHub Desktop.
Save n0ts/3826392 to your computer and use it in GitHub Desktop.
SRPM yum repository for CentOS 6
[base-source]
name=CentOS-$full_releasever - Base source
baseurl=http://vault.centos.org/$full_releasever/os/Source/
gpgcheck=1
gpgkey=http://vault.centos.org//RPM-GPG-KEY-CentOS-6
priority=1
enabled=1
[updates-source]
name=CentOS-$full_releasever - Updates Source
baseurl=http://vault.centos.org/$full_releasever/updates/Source/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
priority=1
enabled=1
@jayenashar
Copy link

what's $full_releasever ? my yum is having trouble resolving it

@gagomes
Copy link

gagomes commented Feb 14, 2016

@jayenashar

It's the version of your distribution, e.g 6.7. You can identify this in the file /etc/redhat-release

@cbcunc
Copy link

cbcunc commented Feb 23, 2016

Yum still doesn't resolve this.

@kordewiner
Copy link

This did not work for me out of the box. In https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Using_Yum_Variables.html there is a list of all default Yum variables and "$full_releasever" is not among them. So I had to define it by myself - I've done it in /etc/rc.d/rc.local with this line:

/bin/awk '{print$3}' < /etc/redhat-release > /etc/yum/vars/full_releasever

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment