Modifying "CentOS-Base.repo" to force 6.7

General support questions
Post Reply
TheSwede86
Posts: 2
Joined: 2018/05/02 11:30:16

Modifying "CentOS-Base.repo" to force 6.7

Post by TheSwede86 » 2018/05/02 11:48:41

OS: CentOS 6.7

Hi,

I am trying to modify the "CentOS-Base.repo" to explicitly search for packages / updates that are 6.7 so it does not update to 6.9.
The reason is that the application that will be installed only supports 6.7 so I want to make sure that when someone or hopefully me runs "yum update" etc. it does not update to 6.9.

I have modified "CentOS-Base.repo" located here:
/etc/yum.repos.d

and the file now looks like this:
https://pastebin.com/k1SX5H2V

I think I got the links correct because if I run this (after installing "yum-utils"):

Code: Select all

python -c 'import yum, pprint; yb = yum.YumBase(); pprint.pprint(yb.conf.yumvar, width=1)'
I get this:

Code: Select all

Loaded plugins: fastestmirror, presto
{'arch': 'ia32e',
 'basearch': 'x86_64',
 'infra': 'stock',
 'releasever': '6',
 'uuid': '<uuid>'}
 
However when trying "yum-update" I get this error:

Code: Select all

Setting up and reading Presto delta metadata
http://vault.centos.org/6.7/updates/x86_64/repodata/4f5c4185525053567956cd669dda94fd983913a08771989c107626f8949b6394-prestodelta.xml.gz: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
I get the same error for all the packages it is trying to download.
Might be some command I missed after updating the "CentOS-Base.repo"-file.

Would appreciate your help :)

User avatar
avij
Forum Moderator
Posts: 2621
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Modifying "CentOS-Base.repo" to force 6.7

Post by avij » 2018/05/02 12:08:25

Well, that is not a good idea.

But to get around that error message, a yum clean all will likely help. That 4f5c4185.. file is in 6.9's updates as of now, and you have probably some cached data from 6.9 metadata on your system.

User avatar
TrevorH
Forum Moderator
Posts: 23213
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Modifying "CentOS-Base.repo" to force 6.7

Post by TrevorH » 2018/05/02 12:19:43

You should go to the upstream vendor errata page and look at all the critical and important updates you will be missing the fixes for if you do not update.

CentOS 6.7 is from mid-2015 so you are missing the best part of 3 whole years of security updates. That includes all the meltdown/spectre fixes as well as everything else that's been found and fixed in the intervening time. It is not safe to run.

You should be doing the opposite and forcing your vendor to produce versions of their software that work on up to date systems. Or at least asking them if they will foot the bill when you get hacked due to their negligence.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

TheSwede86
Posts: 2
Joined: 2018/05/02 11:30:16

Re: Modifying "CentOS-Base.repo" to force 6.7

Post by TheSwede86 » 2018/05/03 11:35:50

avij wrote:Well, that is not a good idea.

But to get around that error message, a yum clean all will likely help. That 4f5c4185.. file is in 6.9's updates as of now, and you have probably some cached data from 6.9 metadata on your system.
TrevorH wrote:You should go to the upstream vendor errata page and look at all the critical and important updates you will be missing the fixes for if you do not update.

CentOS 6.7 is from mid-2015 so you are missing the best part of 3 whole years of security updates. That includes all the meltdown/spectre fixes as well as everything else that's been found and fixed in the intervening time. It is not safe to run.

You should be doing the opposite and forcing your vendor to produce versions of their software that work on up to date systems. Or at least asking them if they will foot the bill when you get hacked due to their negligence.
Thank you so much for your post guys.

I actually made a boo-boo;
I had downloaded the manual for the particular software in question and there it only said CentOS 6.7 but when I proceeded to download the actual software then it said (for the same version as in the manual) that CentOS 6.9 was supported so I used 6.9 instead.

I agree with you guys regarding running an outdated OS so happy 6.9 is supported even though "full updates" are expired but security updates are still pushed.

Post Reply