LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 03-03-2018, 06:49 AM   #1
fred2014
Member
 
Registered: Mar 2015
Posts: 70

Rep: Reputation: Disabled
How to trick centos yum into looking like a later release?


I'm looking into using yumdownloader to download rpm's

I have a centos 6 system but I want to download the
rpms and deps for a centos 7 system

I cannot replace the C6 with C7 on my browsing machine.
I could back it up or possibly even dual boot into a C7
installation - or maybe install C7 on a thumb drive but all
those are a bit cumbersome.

The simplest answer is probably the "live" thumbdrive install
of C7 but that then ties up a thumbdrive - currently
I think it is the best option though.

I was wondering if there was an easy way to convince
yum (and hence yumdownloader) that my C6 was a C7
in a simple easily swapped back way.

For example is there a centos variable I can just change without
causing hidden issues? Or a .conf change maybe?
I'm looking at it this way because it may be a more general
solution for myself and possibly others.(avoiding future need
to use the thumbdrive as releases change)

Part of the complication I see is finding a simple way of
installing the correct repos for C7 and then quickly swapping
them back to C6 - A bash script would probably do that
but I'm not overly familiar with bash and the consequences of
this to the host C6 OS.

Any constructive comments or suggestions welcome
TIA
F.
 
Old 03-03-2018, 08:14 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,695

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
In reference to the OPs other thread.

https://www.linuxquestions.org/quest...go-4175624826/

Previous contents redacted.

Last edited by michaelk; 03-03-2018 at 09:38 AM.
 
1 members found this post helpful.
Old 03-03-2018, 09:16 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
If all you want to do is download the RPMs and not install them, that should be no problem. Just use "--releasever", for example:
Code:
yumlownloader --releasever=7 bash
From my CentOS 6.9 system, that gets me bash-4.2.46-29.el7_4.x86_64.rpm .

Last edited by rknichols; 03-03-2018 at 09:18 AM.
 
Old 03-03-2018, 09:27 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,633

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by fred2014 View Post
I'm looking into using yumdownloader to download rpm's
I have a centos 6 system but I want to download the rpms and deps for a centos 7 system

I cannot replace the C6 with C7 on my browsing machine. I could back it up or possibly even dual boot into a C7 installation - or maybe install C7 on a thumb drive but all those are a bit cumbersome.

The simplest answer is probably the "live" thumbdrive install of C7 but that then ties up a thumbdrive - currently I think it is the best option though. I was wondering if there was an easy way to convince yum (and hence yumdownloader) that my C6 was a C7 in a simple easily swapped back way.

For example is there a centos variable I can just change without causing hidden issues? Or a .conf change maybe? I'm looking at it this way because it may be a more general solution for myself and possibly others.(avoiding future need to use the thumbdrive as releases change)

Part of the complication I see is finding a simple way of installing the correct repos for C7 and then quickly swapping them back to C6 - A bash script would probably do that but I'm not overly familiar with bash and the consequences of this to the host C6 OS.
What you're wanting to do is a very bad idea. Mixing repos for different versions will (as michaelk rightly said), break your system. If you'd like to use CentOS 7, the *BEST* option is to back up your data, and do a fresh install.

While an in-place upgrade is an option, I would never do one unless I had to. I've had bad luck/gremlins when doing such things, as you CAN be left with 'residuals' from the previous version lying about. Strange things can happen, and a clean install is just better, in my opinion. If you just want to downlaod the RPM's, you can use wget to grab them...but as soon as you start installing/using them on C6, be prepared to do that fresh install whether you want to or not.
 
Old 03-03-2018, 09:30 AM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by TB0ne View Post
What you're wanting to do is a very bad idea. Mixing repos for different versions will (as michaelk rightly said), break your system. If you'd like to use CentOS 7, the *BEST* option is to back up your data, and do a fresh install.
I believe the OP just wants to download the RPMS which will then be installed on a (presumably non-internet-connected) CentOS 7 system.
 
Old 03-03-2018, 09:37 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,695

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Quote:
I believe the OP just wants to download the RPMS which will then be installed on a (presumably non-internet-connected) CentOS 7 system.
Your correct, I did not pay attention to the OPs other thread.
 
Old 03-03-2018, 11:32 AM   #7
fred2014
Member
 
Registered: Mar 2015
Posts: 70

Original Poster
Rep: Reputation: Disabled
damn - that will teach me to read the man page instead of typing --help !
I now see the man page on centos6 for yumdownloader is dated 2005....
that option didn't exist back then.

Thanks rknichols - if it does what it appears to do that should be the
final key to let me get this done.

Thanks to all.

F.
 
Old 03-03-2018, 12:15 PM   #8
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by fred2014 View Post
I now see the man page on centos6 for yumdownloader is dated 2005....
that option didn't exist back then.
I believe that "--releasever" falls in the category of, "inherits all other options from yum".
 
1 members found this post helpful.
Old 03-05-2018, 03:40 AM   #9
fred2014
Member
 
Registered: Mar 2015
Posts: 70

Original Poster
Rep: Reputation: Disabled
Yes - you're right - I think I must have been pronouncing it oddly when I first read it
because it didn't click as useful at all at the time - but I've been messing about a bit
more with yum and am starting to get the message.

Another issue has cropped up though but I'll start a new thread because its probably
worth thinking about in isolation anyway (xz compression)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to release yum lock --- but no yum is running ! Joy Stick Linux - Newbie 5 11-06-2017 02:56 AM
[SOLVED] CentOS release 6.5 (Final) yum not finding updates gkasica Linux - General 6 08-12-2014 11:16 PM
CentOS release 4.8 yum update query snoozin Linux - Newbie 2 03-23-2010 07:20 PM
vim :gui trick and undo-trick dazdaz Linux - Software 3 09-10-2007 02:45 PM
Trick Yum volvogga Linux - Newbie 4 08-18-2005 05:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 12:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration