How do I use yum with Mageia?

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

How do I use yum with Mageia?

Postby KenJackson » Nov 18th, '12, 01:34

The repository has yum, but I installed it and found that it can't do anything because it doesn't know of any repositories. Is it possible to use this version of yum instead of urpmi with Magei's repositories?

I started working on a bash script named yum that translates yum commands to their urpmi/urpme/urpmq equivalents, but it would be much better if I could use the real thing.

For years and years, I used Mandrake then Mandriva linux both at home and at work, so I used urpmi and friends extensively. But when Mandriva ran into trouble I switched to Fedora and yum, and I decided I like yum better. Plus I get confused jumping back and forth between urpmi, yum, apt-get, and pacman on the various distros that I use or experiment with. It would be very nice if I could just use yum everywhere.

So is yum usable? If not, what the heck is it doing in the repository?
KenJackson
 
Posts: 4
Joined: Nov 18th, '12, 01:06

Re: How do I use yum with Mageia?

Postby doktor5000 » Nov 18th, '12, 16:12

KenJackson wrote:So is yum usable? If not, what the heck is it doing in the repository?

Depends what your definition of usable is. A drop-in replacement for urpmi, no.
Usable as package manager with yum repositories, yes.

You could still set up a local mirror, and create the metadata needed for yum so you can use it as your package manager.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18062
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How do I use yum with Mageia?

Postby laidlaws » Jan 21st, '13, 15:50

The crucial words are: "Usable as package manager with yum repositories, yes." If you want to install Fedora packages (if you can,) you can point yum to the Fedora repos. It won't work with Mageia repos. If there is no appropriate Mageia package, I prefer to rebuild the Fedora one for Mageia, rather than have two package managers.

BTW, what happened to the Smart p.m.?
laidlaws
 
Posts: 287
Joined: May 24th, '11, 04:58

Re: How do I use yum with Mageia?

Postby doktor5000 » Jan 21st, '13, 19:55

You can install Fedora packages, but you can't use the repository metadata with urpmi. But also the other way around, you could use yum to install
Fedora packages from yum repos, but yum won't know about the dependencies which could be resolved by urpmi. Maybe smart has integration/support for both, but i haven't used that since a long time ...

EDIT: There's also point 034: https://wiki.mageia.org/en/Mageia_2_tec ... astructure and https://bugs.mageia.org/show_bug.cgi?id=2157 But no ressources/volunteers to implement it ...

On the other hand, you could download the whole repository, and just run genhdlist2 over it and generate the metadata necessary for urpmi ...

For smart: Well, nothing happened to it. IIRC it's still available for PCLOS and Unity Linux, nobody imported it for Mageia.
Also the core seems not maintained since late 2011
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18062
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How do I use yum with Mageia?

Postby KenJackson » Jan 23rd, '13, 04:29

doktor5000 wrote:EDIT: There's also point 034: ... and https://bugs.mageia.org/show_bug.cgi?id=2157 But no ressources/volunteers to implement it ...


I'm very pleased to see that bug report. Thank you.

Some years ago I posted a similar question on a Mandriva forum asking if I could use yum with URPMI repositories and two neurotics ridiculed me at length for suggesting such a thoroughly stupid idea.

But it seemed like it shouldn't be all that difficult to do, and now someone has mapped out the details of how to do it. Excellent!

Actually, he's talking about modifying the repositories. That would be good, but I'm thinking of adding a plugin to yum that would convert URPMI information on the fly so it could be used with no changes to the repositories.

If that works, maybe I'll make a plugin to work on apt-get repositories and pacman repositories, etc. Yum should rule the world!
KenJackson
 
Posts: 4
Joined: Nov 18th, '12, 01:06

Re: How do I use yum with Mageia?

Postby wintpe » Jan 23rd, '13, 18:16

you could possibly put all the mga rpm's into a yum repo,
run createrepo on the repodata directly to update the xml files.

add the repo which is served out via http to your yum.conf

and then use yum instead of urpmi.

not tried it, but cant see how this is any different from a redhat repo

yum calls rpm to install the retrieved rpm's so that world work.

worth a test.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: How do I use yum with Mageia?

Postby doktor5000 » Jan 24th, '13, 00:08

Yep, that's basically the same what i suggested for urpmi metadata, only the other way round :)

FWIW, to be honest, at work i need to use yum, and i can't really say how yum is any better than urpm* tools,
it lacks many functions urpm* tools offer, especially many of the query/search functions. And it's much slower,
if pulls repo metadata much too often IMHO and other stuff like that ...
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18062
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How do I use yum with Mageia?

Postby wintpe » Jan 25th, '13, 15:58

yes i agree doctor,
i use both, yum for centos/redhat and urpm* for mageia and we know how to do it,
That says something does it not

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: How do I use yum with Mageia?

Postby laidlaws » Feb 3rd, '13, 10:36

KenJackson wrote:
doktor5000 wrote:EDIT: There's also point 034: ... and https://bugs.mageia.org/show_bug.cgi?id=2157 But no ressources/volunteers to implement it ...


I'm very pleased to see that bug report. Thank you.

Some years ago I posted a similar question on a Mandriva forum asking if I could use yum with URPMI repositories and two neurotics ridiculed me at length for suggesting such a thoroughly stupid idea.

But it seemed like it shouldn't be all that difficult to do, and now someone has mapped out the details of how to do it. Excellent!

Actually, he's talking about modifying the repositories. That would be good, but I'm thinking of adding a plugin to yum that would convert URPMI information on the fly so it could be used with no changes to the repositories.

If that works, maybe I'll make a plugin to work on apt-get repositories and pacman repositories, etc. Yum should rule the world!


At least you are willing to do the work, and not wait for somebody else, and file a bug report because nobody has taken the time off to do it for them.
laidlaws
 
Posts: 287
Joined: May 24th, '11, 04:58

Re: How do I use yum with Mageia?

Postby wintpe » Feb 4th, '13, 14:22

OK here is the full version of how to do yum.

create a directory on a server and modify your http.conf so that that directory can be seen over http://servername

theres loads of docs how to do this its no different from setting up a web site.

next populate that directory with your rpm's

make a directory under that , called repodata.

in that directory create a file, repomd.xml

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo">
  <data type="other">
    <location href="repodata/other.xml.gz"/>
    <checksum type="sha">574e88345953953aa9adee5cf1f900a96c8771d6</checksum>
    <timestamp>1359980070</timestamp>
    <open-checksum type="sha">e992013e780d5d99dc583b1c002e82a92937b459</open-checksum>
  </data>
  <data type="filelists">
    <location href="repodata/filelists.xml.gz"/>
    <checksum type="sha">ced9c3d6794af46dfe1ec159e44e4556279adf56</checksum>
    <timestamp>1359980070</timestamp>
    <open-checksum type="sha">a310ca4256b68856c43dc62cebadf505b468d510</open-checksum>
  </data>
  <data type="primary">
    <location href="repodata/primary.xml.gz"/>
    <checksum type="sha">1de19528ed8ef04c344cd54cf60f00ab6d38ac66</checksum>
    <timestamp>1359980070</timestamp>
    <open-checksum type="sha">183430b299d5e7d83f5076731d5c7998fcd369e4</open-checksum>
  </data>
  <data type="group">
    <location href="repodata/repomd.xml"/>
    <checksum type="sha">f7c91aa8fccfaf8959e470cec00e8773ad2a1346</checksum>
    <timestamp>1359980022</timestamp>
  </data>
</repomd>


now in the directory containing your rpm's

createrepo -g repodata/repomd.xml `pwd`

you should get something like this

Code: Select all
[host@mydoman.com]# createrepo -g repodata/repomd.xml `pwd`
1/1 - xdg-utils-1.0.2-2.el5.rf.noarch.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata


Now on the client system, ie the system you want to use yum on

create a file in /etc/yum.repos.d/

call it what you want it does not matter. but must end in .repo

so myrepo.repo would be a good one.

the file needs to have a heading, name, enabled, and url

Code: Select all
[base]
name = Base Distribution
enabled = 1
baseurl =       http://myyumserver.domain.net/repos/myrepo


I think ive covered everything there, anyone let me know if that dont work and ill amend it.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: How do I use yum with Mageia?

Postby KenJackson » Feb 4th, '13, 20:21

wintpe wrote:create a directory on a server and modify your http.conf so that that directory can be seen over http://servername
...
next populate that directory with your rpm's
...
...
I think ive covered everything there, anyone let me know if that dont work and ill amend it.


Totally impractical.

Oh, it might be reasonable if you have a boatload of computers you're maintaining and you don't mind setting up your own repositories. But why, oh why, would a single user ever consider copying the entire contents or all Mageia repositories and keep them up to date just so he can use yum to see what packages are available and then install them with yum instead of urpmi?

This is a desire for the small convenience of using yum instead of urpmi, it's not worthy of a sledge hammer solution.

I'm not sure I'll ever get around to working on the yum plugin that understands urpmi native repositories, but that's definitely the way to go (unless Mageia signs up to supporting the yum-style repositories, and I doubt that will ever happen).
KenJackson
 
Posts: 4
Joined: Nov 18th, '12, 01:06

Re: How do I use yum with Mageia?

Postby wintpe » Feb 6th, '13, 22:22

Ken

The point of this was to demontrate how.

What any person chooses to do with that info is there buisness.

It may be they want to implement just that as per the origional request, but theres no reason why

Anyone would not like to use this for a small local repo of there own rpms sourced from non magia

Sources, like truecrypt.

And i have a boat load of computers as do many linux enthesiasts 30 to be precise. :)

Regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron