PDA

View Full Version : FC3 yum.repos.d & how to enable/disable


cybrjackle
14th November 2004, 10:13 PM
In this small tutorial, were going to post as many yum repositorys as we know exist and show how to install packages from only certian repositorys. Along with this thread (http://www.fedoraforum.org/forum/showthread.php?t=26562) I will post as many repo as I know of. Keep in mind, leaving them ALL "enable" can cause distruction to your box ;) But, we (or me, if nobody joins in) will show you how you can enable/disable on the fly during install of a package. Also keep in mind that when you setup your <name>.rep that the firest line is very important to haveing the name correct ie. [freshrpms] would = --enablerepo=freshrpms , if your [freshrpms.org] and you try --enablerepo=freshrpms it will bomb out. Anyway, before I go confusing you any more, lets get started.

First we will add all the repositorys to /etc/yum.repos.d/ you can use your favorite text editor (vi, nano, gedit) just cp and paste the following. I will be using "vi" in this example:


Get the gpgkey's http://www.fedorafaq.org/#gpgsig
su -
cd /etc/yum.repos.d/
vi freshrpms.repo

[freshrpms]
name=FreshRPMS-Fresh
baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms
enabled=1
gpgcheck=1


vi extras.repo

[extras]
name=Fedora Extras - $releasever - $basearch
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/
gpgcheck=1
enabled=1



vi livna-stable.repo

[livna-stable]
name=Livna Stable
baseurl=http://rpm.livna.org/fedora/3/i386/RPMS.stable/
enabled=0
gpgcheck=1


vi livna-testing.repo

[livna-testing]
name=Livna Testing
baseurl=http://rpm.livna.org/fedora/3/i386/RPMS.testing/
enabled=0
gpgcheck=1


vi livna-unstable.repo

[livna-unstable]
name=Livna Unstable
baseurl=http://rpm.livna.org/fedora/3/i386/RPMS.unstable
enabled=0
gpgcheck=1


vi dag.repo

[dag]
name=Dag
baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag/
enabled=1
gpgcheck=1


vi dries.repo

[dries]
name=Extra Fedora rpms dries - $releasever - $basearch
baseurl=http://apt.sw.be/dries/fedora/linux/$releasever/$basearch/dries/RPMS/
enabled=0
gpgcheck=1


vi newrpms.repo

[newrpms]
name=Fedora Core 3 NewRPMS.sunsite.dk
baseurl=http://newrpms.sunsite.dk/apt/redhat/en/i386/fc3
enabled=0
gpgcheck=1


vi atrpms-good.repo

[atrpms-good]
name=ATrpms for Fedora Core $releasever good
baseurl=http://apt.atrpms.net/fedora/$releasever/en/$basearch/at-good
enabled=0
gpgcheck=1


vi atrpms-stable.repo

[atrpms-stable]
name=ATrpms for Fedora Core $releasever stable
baseurl=http://apt.atrpms.net/fedora/$releasever/en/$basearch/at-stable
enabled=0
gpgcheck=1


vi atrpms-testing.repo

[atrpms-testing]
name=ATrpms for Fedora Core $releasever testing
baseurl=http://apt.atrpms.net/fedora/$releasever/en/$basearch/at-testing
enabled=0
gpgcheck=1


vi atrpms-bleeding.repo

[atrpms-bleeding]
name=ATrpms for Fedora Core $releasever bleeding
baseurl=http://apt.atrpms.net/fedora/$releasever/en/$basearch/at-bleeding
enabled=0
gpgcheck=1


Now, were going to install xmms-mp3 from Freshrpms (mp3 support everyone loves it and loves to complaing about Fedora not including it) :rolleyes:

We are going to enable freshrpms/dag/dries/newsrpms and disable the rest. Even though we set them as enable=0 this is just a caution incase you set it to =1


yum --enablerepo=freshrpms --enablerepo=dag --enablerepo=dries --enablerepo=newsrpms --disablerepo=livna-stable --disable=livna-testing --disablerepo=livna-unstable --disablerepo=fedora-us --disablerepo=atrpms-stable --disablerepo=atrpms-good --disablerepo=atrpms-testing --disablerepo=atrpms-bleeding install xmms-mp3



Setting up Install Process

[pulled info to save space]

Dependencies Resolved
Transaction Listing:
Install: xmms-mp3.i386 1:1.2.10-9.1.1.fc3.fr

Performing the following to resolve dependencies:
Install: xmms.i386 1:1.2.10-9.1.1.fc3.fr
Is this ok [y/N]:



Is this ok [y/N]: y

[pulled info to save space]

Installed: xmms-mp3.i386 1:1.2.10-9.1.1.fc3.fr
Dependency Installed: xmms.i386 1:1.2.10-9.1.1.fc3.fr
Complete!


As you can see, we grabbed xmms and xmms-mp3 from freshrpms


While were at it, lets grab mplayer since other than listening to mp3's we like a little DVD action.


# yum --enablerepo=freshrpms --enablerepo=dag --enablerepo=dries --enablerepo=newsrpms --disablerepo=livna-stable --disable=livna-testing --disablerepo=livna-unstable --disablerepo=fedora-us --disablerepo=atrpms-stable --disablerepo=atrpms-good --disablerepo=atrpms-testing --disablerepo=atrpms-bleeding install mplayer
Setting up Install Process
Setting up Repo: dries
repomd.xml 100% |=========================| 951 B 00:00
Setting up Repo: dag
repomd.xml 100% |=========================| 951 B 00:00
Setting up Repo: updates-released
repomd.xml 100% |=========================| 951 B 00:00
Setting up Repo: newsrpms
repomd.xml 100% |=========================| 1.1 kB 00:00
Setting up Repo: base
repomd.xml 100% |=========================| 1.1 kB 00:00
Setting up Repo: freshrpms
repomd.xml 100% |=========================| 843 B 00:00
Reading repository metadata in from local files
dries : ################################################## 459/459
dag : ################################################## 2059/2059
updates-re: ################################################## 169/169
newsrpms : ################################################## 202/202
base : ################################################## 2622/2622
freshrpms : ################################################## 422/422
Resolving Dependencies

[pulled info to save space]

Dependencies Resolved
Transaction Listing:
Install: mplayer.i386 0:1.0-0.12.20041025.1.fc3.fr

Performing the following to resolve dependencies:
Install: aalib.i386 0:1.4.0-5.1.fc3.fr
Install: faad2.i386 0:2.0-2.20040923.1.fc3.fr
Install: lame.i386 0:3.96.1-2.1.fc3.fr
Install: libdvdcss.i386 0:1.2.8-4.1.fc3.fr
Install: libdvdread.i386 0:0.9.4-5.1.fc3.fr
Install: libmad.i386 0:0.15.1b-3.1.fc3.fr
Install: libpostproc.i386 0:1.0-0.12.20041025.1.fc3.fr
Install: lzo.i686 0:1.08-2.1.fc2.dag
Install: mplayer-fonts.noarch 0:1.1-2.0.dag
Install: xvidcore.i386 0:1.0.2-2.1.fc3.fr
Is this ok [y/N]:



Is this ok [y/N]: y
Downloading Packages:
mplayer-1.0-0.12.20041025 100% |=========================| 6.5 MB 00:22
faad2-2.0-2.20040923.1.fc 100% |=========================| 201 kB 00:00
libpostproc-1.0-0.12.2004 100% |=========================| 43 kB 00:00
xvidcore-1.0.2-2.1.fc3.fr 100% |=========================| 238 kB 00:00
aalib-1.4.0-5.1.fc3.fr.i3 100% |=========================| 95 kB 00:00
mplayer-fonts-1.1-2.0.dag 100% |=========================| 1.0 MB 00:03
libdvdread-0.9.4-5.1.fc3. 100% |=========================| 55 kB 00:00
lzo-1.08-2.1.fc2.dag.i686 100% |=========================| 56 kB 00:00
lame-3.96.1-2.1.fc3.fr.i3 100% |=========================| 488 kB 00:02
libmad-0.15.1b-3.1.fc3.fr 100% |=========================| 79 kB 00:00
libdvdcss-1.2.8-4.1.fc3.f 100% |=========================| 34 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libdvdcss 100 % done 1/11
Installing: libdvdread 100 % done 2/11
Installing: libmad 100 % done 3/11
Installing: lame 100 % done 4/11
Installing: lzo 100 % done 5/11
Installing: mplayer-fonts 100 % done 6/11
Installing: aalib 100 % done 7/11
Installing: xvidcore 100 % done 8/11
Installing: libpostproc 100 % done 9/11
Installing: faad2 100 % done 10/11
Installing: mplayer 100 % done 11/11

Installed: mplayer.i386 0:1.0-0.12.20041025.1.fc3.fr
Dependency Installed: aalib.i386 0:1.4.0-5.1.fc3.fr faad2.i386 0:2.0-2.20040923.1.fc3.fr lame.i386 0:3.96.1-2.1.fc3.fr libdvdcss.i386 0:1.2.8-4.1.fc3.fr libdvdread.i386 0:0.9.4-5.1.fc3.fr libmad.i386 0:0.15.1b-3.1.fc3.fr libpostproc.i386 0:1.0-0.12.20041025.1.fc3.fr lzo.i686 0:1.08-2.1.fc2.dag mplayer-fonts.noarch 0:1.1-2.0.dag xvidcore.i386 0:1.0.2-2.1.fc3.fr
Complete!


This is why IMHO Fedora and yum as a package manager just rocks!

I hoped you learned something today and if I confused you even more, oops

:cool:

imdeemvp
14th November 2004, 11:13 PM
Trust me you are not the only one. But great how to. I dont use vi a lot i prefer to use gedit or nano.

cybrjackle
15th November 2004, 06:56 AM

One of my friends helped me write a python script (Steve S. did pretty much all of it) I had the idea and told him what I wanted to do and he did it. You DA man Steve :)

Want to see a taste of it? I have all my repo's setup like I do up there.


$ rpm -qa |grep unrar

Found nothing and we know freshrpms has it by looking at there site right? Right.


$ sudo ./yum-repos.py
Password:
Enable freshrpms? y/n: y
--enablerepo=freshrpms
Enable fedora-us? y/n: n
--disablerepo=fedora-us
Enable livna-stable? y/n: n
--disablerepo=livna-stable
Enable livna-testing? y/n: n
--disablerepo=livna-testing
Enable livna-unstable? y/n: n
--disablerepo=livna-unstable
Enable dag? y/n: n
--disablerepo=dag
Enable dries? y/n: n
--disablerepo=dries
Enable newsrpms? y/n: n
--disablerepo=newsrpms
Enable atrpms-good? y/n: n
--disablerepo=atrpms-good
Enable atrpms-stable? y/n: n
--disablerepo=atrpms-stable
Enable atrpms-testing? y/n: n
--disablerepo=atrpms-testing
Enable atrpms-bleeding? y/n: n
--disablerepo=atrpms-bleeding
Use su or sudo? su/sudo:sudo
sudo
What pkg do you want to install? unrar

Here we run the script, answer the questions and say um how about unrar!


Setting up Install Process
Setting up Repo: updates-released
repomd.xml 100% |=========================| 951 B 00:00
Setting up Repo: base
repomd.xml 100% |=========================| 1.1 kB 00:00
Setting up Repo: freshrpms
repomd.xml 100% |=========================| 843 B 00:00
Reading repository metadata in from local files
updates-re: ################################################## 169/169
base : ################################################## 2622/2622
freshrpms : ################################################## 422/422
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for unrar to pack into transaction set.
unrar-3.4.3-1.1.fc3.fr.i3 100% |=========================| 3.5 kB 00:01
---> Package unrar.i386 0:3.4.3-1.1.fc3.fr set to be installed
--> Running transaction check

Dependencies Resolved
Transaction Listing:
Install: unrar.i386 0:3.4.3-1.1.fc3.fr
Is this ok [y/N]:

As you can see, did the dirty work and looked at our default "fedora" repo's and Freshrpms, which is set to:


$ more /etc/yum.repos.d/freshrpms.repo
[freshrpms]
name=FreshRPMS-Fresh
baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms
enabled=0
gpgcheck=0


Well, thats not enabled now is it? NO

Lets go ahead and hit "Y" and see what happens


Is this ok [y/N]: y
Downloading Packages:
unrar-3.4.3-1.1.fc3.fr.i3 100% |=========================| 86 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: unrar 100 % done 1/1

Installed: unrar.i386 0:3.4.3-1.1.fc3.fr
Complete!


This just rocks!

jayemef
16th November 2004, 04:05 AM
Very nice all around cybrjackle, both the How-To and the script. Would you mind posting the source to that script? That looks really useful.

Matrix
22nd November 2004, 03:53 PM
Great how to. Thanks for posting. :cool:

DXT
22nd November 2004, 11:49 PM
I have followed the steps, and when I try to install xmms-mp3 using yum I get this:
[root@localhost yum.repos.d]# yum --enablerepo=freshrpms --enablerepo=dag --enablerepo=dries --enablerepo=newsrpms --disablerepo=livna-stable --disable=livna-testing --disablerepo=livna-unstable --disablerepo=fedora-us --disablerepo=atrpms-stable --disablerepo=atrpms-good --disablerepo=atrpms-testing --disablerepo=atrpms-bleeding install xmms-mp3

You have enabled checking of packages via GPG keys. This is a good thing.
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them.
You can do that by running the command:
rpm --import public.gpg.key
For more information contact your distribution or package provider.


I disabled gpgcheck in all the repositories in the folder (including the official ones [should I switch back on?]).

cyriver
23rd November 2004, 01:56 AM
Hi DXT,
It would be better to do gpgcheck on, I think.
To install software after install FC3, you need to run "rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora" (without quote) as root.
If you still have public.gpg.key message when you use freshrpms repo., then you need import gpg key from freshrpm website. It is "rpm --import http://freshrpms.net/packages/RPM-GPG-KEY.txt" (again without quote as root). Other gpg keys of repository can be found at their site.
Hope, this was of help.

cybrjackle
23rd November 2004, 02:49 AM
I have followed the steps, and when I try to install xmms-mp3 using yum I get this:
[root@localhost yum.repos.d]# yum --enablerepo=freshrpms --enablerepo=dag --enablerepo=dries --enablerepo=newsrpms --disablerepo=livna-stable --disable=livna-testing --disablerepo=livna-unstable --disablerepo=fedora-us --disablerepo=atrpms-stable --disablerepo=atrpms-good --disablerepo=atrpms-testing --disablerepo=atrpms-bleeding install xmms-mp3

You have enabled checking of packages via GPG keys. This is a good thing.
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them.
You can do that by running the command:
rpm --import public.gpg.key
For more information contact your distribution or package provider.



I disabled gpgcheck in all the repositories in the folder (including the official ones [should I switch back on?]).


You can go here and grab the gpgkey's

http://www.fedorafaq.org/#gpgsig

[bell]
26th November 2004, 11:34 PM
Since I am a bit lazy, I just added the following lines to the root-user's .bashrc-file


DISABLE_LIVNA='--disablerepo=livna-stable --disablerepo=livna-testing --disablerepo=livna-unstable'
DISABLE_FEDORA_US='--disablerepo=us-updates'
DISABLE_STD="${DISABLE_LIVNA} ${DISABLE_FEDORA_US}"
ENABLE_AT='--enablerepo=at-stable --enablerepo=at-good --enablerepo=at-testing'
ENABLE_DAG='--enablerepo=dag'
ENABLE_FRESH='--enablerepo=freshrpms'
ENABLE_ALL="${ENABLE_AT} ${ENABLE_DAG} ${ENABLE_FRESH}"

alias yumfreshrpms="yum ${ENABLE_FRESH} ${DISABLE_LIVNA} ${DISABLE_FEDORA_US}"
alias yumdag="yum ${ENABLE_DAG} ${DISABLE_STD}"
alias yumat="yum ${ENABLE_AT} ${DISABLE_STD}"
alias yumsearch="yum ${ENABLE_ALL} search"


Thus, if I wan't to search all my repos for a package I do:
yumsearch mplayer

If I want to install / update some specific package, I do this:
yumfreshrpms install mplayer

I have livna and fedora.us always enabled, unless specifically disabled.

This could of course be done in a much better way by someone understanding all the links between the assorted repositories. From what I have read so far, there is no easy way to update all rpm's you have installed from for instance freshrpms if you also have installed rpm's from fedora.us and livna, since you may enter "dependency hell" ...???

If this is the case, the best way would be to have a script automatically keeping tab on which packages you have installed from each repository, and only updating packages installed from a given repository when running update.... Wouldn't take too much time to write, so please, if anyone is feeling bored?? :)