Comment 19 for bug 247351

Revision history for this message
In , Rehan (rehan-redhat-bugs) wrote :

This issue has been around since at least fedora core 6 and it bugs me a lot.

I have tried a number of things to get smart working on mirrors.

1) smart channel --add type=mirrors
2) smart channel --add type=up2date-mirrors
3) bash script which parses the dynamic/localised mirror list returned by the
normal yum mirror list url.

The bash script works well but it needs to be run occasionally to update the
list. Smart will favour mirrors which are available more often than not so it
doesn't need to be run that often. It could be a good prototype for a
fedora-mirror.py which can be run from /etc/smart/distro.d.

On the other hand the mirrormanager output only needs to do one of two things:

1) put the baseurl as the first line and then a tab before all the other urls
(the actual mirrors). this has the disadvantage that yum will use the redhat
repos as a near mirror (which is bad of course)

2) do the above but only for a url passed with an option of &smart=yes
e.g. http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-8&arch=i386&smart=yes

this might be the simplest option as it would only need a change in the script
which generates the mirrorlist sent to the client.
with this the mirrors could be added using a command something like:
smart channel --add "Fedora 8 - i386" type=mirrors alias=fedora enabled=yes
url=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-8&arch=i386&smart=yes

3) Not sure if the up2date mirror lists are still produced for fedora 8
(probably not, the wiki has a request to remove this information). However smart
 can still use this information.
smart channel --add "Fedora 8 - i386" type=up2date-mirrors alias=fedora
enabled=yes url=??????
(not sure how the url would look as I can't find much info for up2date. This
used to be done so if the code is still there it might be easy to put it back.

My preference would be to do 2 but 3 might be ok as well. I hope something gets
done because I use smart all the time and it *is* only using the fedora servers.
Somehow this makes me feel bad :(

BTW I think Selinux is denying smart access to some operations which I think is
quietly failing those operations. To see this do a smart upgrade or smart
install and then a tail messages and you will see entries relating to selinux
denying access to the temp files in /tmp/TMPXXXXX which smart generates. As you
guys might be more familiar with smart than I am, do you think this is worthy of
opening a bug?

I would love to see smart be able to automatically use mirrors. It is a
beautiful thing to see smart doing multiple downloads from different mirrors and
taking half the time of yum to do the downloads.