LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   updating fedora with extra (https://www.linuxquestions.org/questions/fedora-35/updating-fedora-with-extra-354958/)

soumyadeep 08-19-2005 01:48 PM

updating fedora with extra
 
Hi,
I have downloaded fedora core 4 extras (rpms) and stored them in a system in our network. If you could help me in installing them all in other machines from the repository in our network rather than going to the original source of these rpms with yum or up2date or any other means.

Thanking you in advance anticipating uggestion from you.

With regards,
Soumyadeep

bosewicht 08-19-2005 02:24 PM

If you are using apt4rpm or yum, I believe they look at the first repo for the most up to date packages. so if you put your network repo first and follow the structure of the config file, it should be really easy.

WhatsHisName 08-19-2005 05:10 PM

The easiest way to make the local rpms available to your LAN is to create a local repository and to point yum and up2date to the local repository for any content you wish to keep there.

There is a very concise description of how to set up a local yum repository and how to access it using yum here http://www.dotancohen.com/howto/yum_repro.php Pay close attention to the use of rsync to generate and update content.

The description shows how to set up the local repo for Apache, but it is also trivial to set up local anonymous ftp using vsftpd to serve the repository content on your LAN. Put your content in /var/ftp/pub/, start the vsftpd service, open tcp port 21 in iptables and you have a fully functional local repository.

Once you configure the repository, you can either modify /etc/yum.conf to point to your local repo or set up individual *.repo files in /etc/yum.repos.d.

All of this may sound complicated, but each step is very simple to do.

soumyadeep 08-20-2005 04:57 AM

Thank you so much. I appreciate your replies.

I have tried the way described in "http://www.dotancohen.com/howto/yum_repro.php", it is well documented.
While trying this, I am ending up with some errors.
It seems "repomd.xml" is being searched in "Fedora/core/4/base/RPMS/repodata" which is missing. As such, I made the directory structures like this and created the base repository headers again.

Repository updates-released already added, not adding again
Repository base already added, not adding again
Setting up Install Process
Setting up repositories
base 100% |=========================| 951 B 00:00
http://172.16.4.102/yum/updates/i386...ta/repomd.xml: [Errno 4] IOError: HTTP Error 404: Date: Sat, 20 Aug 2005 08:58:11 GMT
Server: Apache/2.0.52 (Fedora)
Content-Length: 312
Connection: close
Content-Type: text/html; charset=iso-8859-1
Trying other mirror.
Cannot open/read repomd.xml file for repository: updates-released
failure: repodata/repomd.xml from updates-released: [Errno 256] No more mirrors to try.



Again I have added the directories as "updates/i386/repodata/".

Repository updates-released already added, not adding again
Repository base already added, not adding again
Setting up Install Process
Setting up repositories
base 100% |=========================| 951 B 00:00
updates-released 100% |=========================| 951 B 00:00
Cannot find a valid baseurl for repo: extras


Then copied the *.rpm file from "/var/www/html/yum/base" to "var/www/html/yum/Fedora/core/4/base/RPMS" as it seems from the yum.conf file rpms are being searched in the previous path.

Could you help me in getting the solution for this.

My yum.conf file is as below:
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=1

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

#this is edited as directed in "http://www.dotancohen.com/howto/yum_repro.php"
[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
#mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc$releasever
baseurl=http://172.16.4.102/yum/updates/$basearch/
enabled=1
gpgcheck=1

[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=http://172.16.4.102/yum/Fedora/core/$releasever/base/RPMS
#mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
enabled=1
gpgcheck=1

At present i am trying with only "xmms-mp3-1.2.10-9.1.1.fc3.fr.i386.rpm" file and i am using command as "yum install xmms-mp3".

WhatsHisName 08-20-2005 09:48 AM

You may be having a problem with Apache serving the rpms.

When you use Firefox to look at the addresses http://172.16.4.102/yum/updates/i386 and http://172.16.4.102/yum/Fedora/core/4/base/RPMS, do you see the listings of the rpms you placed in those locations? You should be able to.

The main reason I went with ftp instead of http for the local repo/mirror was because it was so easy to get vsftpd to serve the updates.

As as side note, you might want to change the directory setup of your local repo so that adding future releases and other sources to your local repo will be easier. As examples, these are a few folders on my local mirror:

/var/ftp/pub/fedora-core/4/i386/os/Fedora/RPMS/
/var/ftp/pub/fedora-core/updates/4/i386/
/var/ftp/pub/fedora-extras/4/i386/
/var/ftp/pub/fedora-core/4/i386/iso/

which are viewable locally in Firefox and configured in yum.repos.d as:

ftp://192.168.1.203/pub/fedora-core/...s/Fedora/RPMS/
ftp://192.168.1.203/pub/fedora-core/updates/4/i386/
ftp://192.168.1.203/pub/fedora-extras/4/i386/

If you plan to add non-linux stuff to the server one day, you might want to set it up like this:

/var/ftp/pub/linux/fedora-core/updates/4/i386/

soumyadeep 08-21-2005 12:23 PM

Thanks,

I have opted ftp method. Its working fine. I made some changes in yum.conf file as bellow:
[xtras]
name=Fedora Extras $releasever - $basearch
baseurl=ftp://172.16.4.102/pub/fedora-extras/$releasever/i386
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1


Now I am getting some error as follows after I run "yum install xmms or nedit":
Repository extras already added, not adding again
Repository updates-released already added, not adding again
Repository base already added, not adding again
Setting up Install Process
Setting up repositories
base 100% |=========================| 951 B 00:00
updates-released 100% |=========================| 951 B 00:00
extras 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
Parsing package install arguments
No Match for argument: xmmx
Nothing to do


I am testing with only few files, which I have in "/var/ftp/pub/fedora-extras/4/i386" directory. The files are:
nedit-5.5-4.fc4.i386.rpm
repodata
xmms-1.2.10-16.i386.rpm
xmms-mp3-1.2.10-9.1.1.fc3.fr.i386.rpm


xmms-1.2.10-16.i386.rpm and nedit-5.5-4.fc4.i386.rpm has been downloaded from "http://download.fedora.redhat.com/pub/fedora/linux/extras/4/i386/"

Would I have to specify the name of files to be installed by yum somewhere else.

WhatsHisName 08-21-2005 03:20 PM

Your naming of the modules in “yum install ...” looks correct.

As an example of naming, if I wanted to install the FC3 Livna package for NTFS read support, it would look like:

yum install kernel-module-ntfs
--OR--
yum install kernel-module-ntfs-2.6.9-1.667.i686 0:2.1.20-0.lvn.1.3

The first one would would install the package for the most recent kernel, which is currently running, and the second one would install the specified package.


Could xmms and nedit already be installed?

Try these two yum commands:

yum list installed nedit* xmms*
yum list available nedit* xmms*


As another side note, you read about configuring yum.conf to add repos, but it is really easy to make a new /etc/yum.repos.d file instead. The bonus of making a *.repo file is that FC4 up2date uses them too, so that any *.repo you specify for yum will also be accessible in up2date.

Here is an example of one of my repo files:

cat /etc/yum.repos.d/fedora-updates-local.repo

[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
baseurl=ftp://192.168.1.203/pub/fedora-core/updates/$releasever/$basearch/
enabled=1
gpgcheck=1

I install the gpg keys separately, but you can also add the gpgkey= line to the *.repo file.

soumyadeep 08-22-2005 02:51 AM

I have tried modifying yum.repos.d, I wander if I am messing up all these.
I have dissabled the changes made in yum.conf.

After modifying the file in yum.repos.d
I am getting the following output for "yum install nedit"
Repository extras already added, not adding again
Repository updates-released already added, not adding again
Repository base already added, not adding again
Repository extras already added, not adding again
Setting up Install Process
Setting up repositories
updates-released 100% |=========================| 951 B 00:00
extras 100% |=========================| 951 B 00:00
updates 100% |=========================| 951 B 00:00
base 100% |=========================| 951 B 00:00
freshrpms 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 942 B 00:00
updates : ################################################## 1/1
Added 1 new packages, deleted 0 old in 0.01 seconds
primary.xml.gz 100% |=========================| 942 B 00:00
freshrpms : ################################################## 1/1
Added 1 new packages, deleted 0 old in 0.01 seconds
Parsing package install arguments
No Match for argument: nedit
Nothing to do


As you said to run the following commands and the output are:

For yum list installed nedit* xmms*:
Repository extras already added, not adding again
Repository updates-released already added, not adding again
Repository base already added, not adding again
Repository extras already added, not adding again


For yum list available nedit* xmms*:
Repository extras already added, not adding again
Repository updates-released already added, not adding again
Repository base already added, not adding again
Repository extras already added, not adding again
Setting up repositories
updates-released 100% |=========================| 951 B 00:00
extras 100% |=========================| 951 B 00:00
updates 100% |=========================| 951 B 00:00
base 100% |=========================| 951 B 00:00
freshrpms 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
Available Packages
xmms-mp3.i386 1:1.2.10-9.1.1.fc3.fr base


It seems it is taking only "xmms-mp3-1.2.10-9.1.1.fc3.fr.i386.rpm" file out of
nedit-5.5-4.fc4.i386.rpm
repodata
xmms-1.2.10-16.i386.rpm
xmms-mp3-1.2.10-9.1.1.fc3.fr.i386.rpm


It is neither taking "nedit-5.5-4.fc4.i386.rpm" nor "xmms-1.2.10-16.i386.rpm".
Even I have ran "rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora".

Both the files "/usr/share/rhn/RPM-GPG-KEY-fedora" and "/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora" have the same content.

I have made changes in the following files in "/etc/yum.repos.d".

In fedora-updates-local.repo as:
[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
baseurl=ftp://172.16.4.102/pub/fedora-core/updates/4/$basearch/
#baseurl=ftp://192.168.1.203/pub/fedora-core/updates/$releasever/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1

[extras]
name=Fedora Extras $releasever - $basearch
baseurl=ftp://172.16.4.102/pub/fedora-extras/$releasever/i386
enabled=1


fedora-extras.repo as:
[extras]
name=Fedora Extras $releasever - $basearch
baseurl=ftp://172.16.4.102/pub/fedora-extras/$releasever/i386
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/
#mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-$releasever
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1


fedora.repo as:
[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=ftp://172.16.4.102/pub/fedora-extras/$releasever/i386
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora


fedora-updates.repo as:


[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
baseurl=ftp://172.16.4.102/pub/fedora-extras/$releasever/i386
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
#mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora


local-base as:
# My local FC mirrors
baseurl=ftp://172.16.4.102/pub/fedora-extras/$releasever/i386

local-updates as:
# My local FC update mirrors
baseurl=ftp://172.16.4.102/pub/fedora-extras/$releasever/i386


freshrpms.repo as:
[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=ftp://172.16.4.102/pub/fedora-extras/$releasever/i386
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
enabled=1
[extras]
name=Fedora Linux $releasever - $basearch - extras
baseurl=ftp://172.16.4.102/pub/fedora-extras/$releasever/i386
enabled=0
gpgcheck=1
[updates]
name=FreshRPMS-Updates
baseurl=ftp://172.16.4.102/pub/fedora-extras/$releasever/i386
enabled=1
#gpgcheck=1
[freshrpms]
name=FreshRPMS-Fresh
baseurl=ftp://172.16.4.102/pub/fedora-extras/$releasever/i386
enabled=1
#gpgcheck=1


If I am missing any step.

soumyadeep 08-22-2005 01:40 PM

I have made a little progress. I had to run a command "createrepo /var/ftp/pub/fedora-extras/4/i386". I have the following files in "/var/ftp/pub/fedora-extras/4/i386"
nedit-5.5-4.fc4.i386.rpm
repodata
xmms-1.2.10-16.i386.rpm
xmms-2OFmp3-1.2.10-9.1.1.fc3.fr.i386.rpm


the output of "createrepo":
3/3 - nedit-5.5-4.fc4.i386.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata


Now after this when I ran "yum list available nedit* xmms*" I got the output as bellow:
Repository extras already added, not adding again
Repository updates-released already added, not adding again
Repository base already added, not adding again
Repository extras already added, not adding again
Setting up repositories
updates-released 100% |=========================| 951 B 00:00
extras 100% |=========================| 951 B 00:00
updates 100% |=========================| 951 B 00:00
base 100% |=========================| 951 B 00:00
freshrpms 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 1.9 kB 00:00
extras : ################################################## 3/3
Added 2 new packages, deleted 0 old in 0.03 seconds
primary.xml.gz 100% |=========================| 1.9 kB 00:00
updates : ################################################## 3/3
Added 2 new packages, deleted 0 old in 0.03 seconds
primary.xml.gz 100% |=========================| 1.9 kB 00:00
base : ################################################## 3/3
Added 2 new packages, deleted 1 old in 0.03 seconds
primary.xml.gz 100% |=========================| 1.9 kB 00:00
freshrpms : ################################################## 3/3
Added 2 new packages, deleted 0 old in 0.02 seconds
Available Packages
nedit.i386 5.5-4.fc4 base
xmms.i386 1:1.2.10-16 base
xmms-mp3.i386 1:1.2.10-9.1.1.fc3.fr base


And after running "yum install nedit"

Repository extras already added, not adding again
Repository updates-released already added, not adding again
Repository base already added, not adding again
Repository extras already added, not adding again
Setting up Install Process
Setting up repositories
updates-released 100% |=========================| 951 B 00:00
extras 100% |=========================| 951 B 00:00
updates 100% |=========================| 951 B 00:00
base 100% |=========================| 951 B 00:00
freshrpms 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package nedit.i386 0:5.5-4.fc4 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
nedit i386 5.5-4.fc4 base 589 k

Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 589 k
Is this ok [y/N]: y
Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 1ac70ce6
public key not available for nedit-5.5-4.fc4.i386.rpm
Retrieving GPG key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

The GPG key at file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora (0x4F2A6FD2)
is already installed but is not the correct key for this package.
Check that this is the correct key for the "Fedora Core 4 - i386 - Base" repository.



If I remove gpgkey= line from all the files in yum.repos.d, I get

warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 1ac70ce6
public key not available for nedit-5.5-4.fc4.i386.rpm


Could you plese suggest me what has to be done now.

regards
Soumyadeep

WhatsHisName 08-22-2005 04:19 PM

Yes, createrepo is very important if you are not fully mirroring updates, extras, etc.

If you use “rsync -a --delete....” to mirror a repository, then you don’t need to run createrepo, but it doesn’t hurt anything if you do. (BTW, it might be a good idea not to initially use the “--delete” option until you are very comfortable with the rsync process.)

A lot of fedora mirrors offer rsync downloads, but you usually have to guess at the web name, except for the actual rsync mirrors in the fedora mirrors list. You can usually look at the rsync available downloads by running something like:

rsync ftp.some_university.edu::

which will usually mimic the structure of the ftp content. As you work your way down the rsync directory, it might look something like this:

rsync ftp.some_university.edu::pub/fedora-core/4

It always help to see a rsync example when you are starting out, since rsync is a little nonintuitive in the beginning.


Regarding the gpg key error, check the *.repo files and verify that any gpgkey= for fedora and fedora-updates points to RPM-GPG-KEY-fedora and that any gpgkey= for fedora-extras points to RPM-GPG-KEY-fedora-extras. In your previous post #8, there was one gpgkey= that pointed to the wrong key.

Also, I usually only use the baseurl= address for the local mirror for each content type that is hosted locally, just to make sure that yum doesn’t try to go outside the LAN for things that are available locally.

You are very close to making it work!

soumyadeep 08-23-2005 12:35 PM

Yes I could make it. Thanks a lot, your guidance was just fabulous.

The steps I done to get it working is as below:

As gpgkey was not matching, I have deleted all the keys as bellow for each key:
rpm -e --allmatches gpg-pubkey-db42a60e-37ea5438

then I imported all the keys as below:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*

I could see all the keys as:
rpm -qa gpg*

gpg-pubkey-e418e3aa-3f439953
gpg-pubkey-1ac70ce6-41bebeef
gpg-pubkey-db42a60e-37ea5438
gpg-pubkey-30c9ecf8-3f9da3f7
gpg-pubkey-4f2a6fd2-3f9d9d3b
gpg-pubkey-4f2a6fd2-3f9d9d3b
gpg-pubkey-1cddbca9-3f9da14c
gpg-pubkey-897da07a-3c979a7f


I have disabled all the gpgkey= line from all the files in yum.repos.d and left with only "fedora.core" the line is "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora".

After running "yum install nedit" I get following output:

Repository extras already added, not adding again
Repository updates-released already added, not adding again
Repository base already added, not adding again
Repository extras already added, not adding again
Setting up Install Process
Setting up repositories
updates-released 100% |=========================| 951 B 00:00
extras 100% |=========================| 951 B 00:00
updates 100% |=========================| 951 B 00:00
base 100% |=========================| 951 B 00:00
freshrpms 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package nedit.i386 0:5.5-4.fc4 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
nedit i386 5.5-4.fc4 base 589 k

Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 589 k
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: nedit ######################### [1/1]

Installed: nedit.i386 0:5.5-4.fc4
Complete!


Its working fine.

Thanks

With best of my regards,
Soumyadeep


All times are GMT -5. The time now is 02:54 PM.