This week I set up a local mirror for a few dists, including Centos 4.0 and 4.2, and Fedora Core 3 and 4. I'm using a script called yum-pull. For the most part I really like the script, it automates the setup of your mirrors and tries a bunch of different mirrors when it goes out to get updates, if it fails on one it tries another. It uses the usual suspects, createrepo and repoview, among others.
That being said I have it all setup, but I have the following problem. For some reason the paths are not always right when you run yum update from a workstation. I'm installing a fresh copy of centos 4.2 right now so I can test the centos mirror, but I definitely have problems with my FC3 and 4 ones.
One example, if I include atrpms in my repo file, it's looking for the RPMs in this directory: http://mirror.myserver.com/repomirror/fedora/linux/4/i386/atrpms/ BUT it should be looking here: http://mirror.myserver.com/repomirror/fedora/linux/4/i386/atrpms/packages/
Can anyone tell me where this is screwed up at?
The directory structure looks like this: repomirror/fedora/linux/4/i386/atrpms/headers/ repomirror/fedora/linux/4/i386/atrpms/packages/ repomirror/fedora/linux/4/i386/atrpms/repodata/
repomirror/fedora/linux/4/i386/updates/headers/ repomirror/fedora/linux/4/i386/updates/packages/ repomirror/fedora/linux/4/i386/updates/repodata/
etc.
I just tried my centos4.2 mirror on the new test install and it worked ok. Still, any help understanding this is appreciated. I did some googling on createrepo but have yet to find my answer.
Thanks, James
On Fri, 2006-02-17 at 12:32 -0500, James Pifer wrote:
This week I set up a local mirror for a few dists, including Centos 4.0 and 4.2, and Fedora Core 3 and 4. I'm using a script called yum-pull. For the most part I really like the script, it automates the setup of your mirrors and tries a bunch of different mirrors when it goes out to get updates, if it fails on one it tries another. It uses the usual suspects, createrepo and repoview, among others.
That being said I have it all setup, but I have the following problem. For some reason the paths are not always right when you run yum update from a workstation. I'm installing a fresh copy of centos 4.2 right now so I can test the centos mirror, but I definitely have problems with my FC3 and 4 ones.
One example, if I include atrpms in my repo file, it's looking for the RPMs in this directory: http://mirror.myserver.com/repomirror/fedora/linux/4/i386/atrpms/ BUT it should be looking here: http://mirror.myserver.com/repomirror/fedora/linux/4/i386/atrpms/packages/
Can anyone tell me where this is screwed up at?
The directory structure looks like this: repomirror/fedora/linux/4/i386/atrpms/headers/ repomirror/fedora/linux/4/i386/atrpms/packages/ repomirror/fedora/linux/4/i386/atrpms/repodata/
repomirror/fedora/linux/4/i386/updates/headers/ repomirror/fedora/linux/4/i386/updates/packages/ repomirror/fedora/linux/4/i386/updates/repodata/
etc.
I just tried my centos4.2 mirror on the new test install and it worked ok. Still, any help understanding this is appreciated. I did some googling on createrepo but have yet to find my answer.
When you run createrepo, it should find all the RPMS in the directory it is run in .... and in all directories under that .. if you run it from the updates directory (in your example) it should work OK if you point to repomirror/fedora/linux/4/i386/updates/ with your yum ... and it should find RPMS in packages/.
If you want to point your yum to repomirror/fedora/linux/4/i386/updates/packages/ then you need to run createrepo from within the pacakages/ directory and the headers and repodata directories will be there instead of inside the updates directory.
When you run createrepo, it should find all the RPMS in the directory it is run in .... and in all directories under that .. if you run it from the updates directory (in your example) it should work OK if you point to repomirror/fedora/linux/4/i386/updates/ with your yum ... and it should find RPMS in packages/.
If you want to point your yum to repomirror/fedora/linux/4/i386/updates/packages/ then you need to run createrepo from within the pacakages/ directory and the headers and repodata directories will be there instead of inside the updates directory.
That's interesting because I think that is they way I have it. The headers and repodata are at the same level as packages all of which are in the updates directory.
Here's the relevant section of the repo file.
[updates] name=Fedora Linux $releasever - $basearch - updates baseurl=http://mirror.myserver.com/repomirror/fedora/linux/$releasever/$basearch/upd...
I'll try and run createrepo again and see if it makes any difference.
Thanks, James
That's interesting because I think that is they way I have it. The headers and repodata are at the same level as packages all of which are in the updates directory.
Here's the relevant section of the repo file.
[updates] name=Fedora Linux $releasever - $basearch - updates baseurl=http://mirror.myserver.com/repomirror/fedora/linux/$releasever/$basearch/upd...
I'll try and run createrepo again and see if it makes any difference.
Thanks, James
Unfortunately this still has not worked. I tried the following commands:
$ pwd /media/160GBUSBDSK/YumRepo/fedora/linux/3/i386/updates $ $ ls -l total 64 drwxrwxr-x 2 jpifer jpifer 32768 Feb 16 20:10 headers drwxrwxr-x 3 jpifer jpifer 28672 Feb 17 13:53 packages drwxrwxr-x 2 jpifer jpifer 4096 Feb 16 20:25 repodata $ $createrepo packages $ $createrepo /media/160GBUSBDSK/YumRepo/fedora/linux/3/i386/updates/packages
After each of these I tried running "yum update" as root. Both times I still get this: # yum update Setting up Update Process Setting up repositories core 100% |=========================| 951 B 00:00 freshrpms 100% |=========================| 951 B 00:00 livna 100% |=========================| 951 B 00:00 updates 100% |=========================| 951 B 00:00 extras 100% |=========================| 951 B 00:00 Reading repository metadata in from local files Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Package pyzor.noarch 0:0.4.0-8 set to be updated ---> Downloading header for gpdf to pack into transaction set. http://mirror.myserver.com/repomirror/fedora/linux/3/i386/updates/gpdf-2.8.2...: [Errno 4] IOError: HTTP Error 404: Date: Fri, 17 Feb 2006 19:22:34 GMT Server: Apache/2.0.53 (Fedora) Content-Length: 350 Connection: close Content-Type: text/html; charset=iso-8859-1 Trying other mirror. Error: failure: gpdf-2.8.2-7.2.i386.rpm from updates: [Errno 256] No more mirrors to try.
As you can see, it's still looking in updates not updates/packages for the RPMs. I'm stumped....
Thanks, James
On Fri, 2006-02-17 at 14:24 -0500, James Pifer wrote:
That's interesting because I think that is they way I have it. The headers and repodata are at the same level as packages all of which are in the updates directory.
Here's the relevant section of the repo file.
[updates] name=Fedora Linux $releasever - $basearch - updates baseurl=http://mirror.myserver.com/repomirror/fedora/linux/$releasever/$basearch/upd...
I'll try and run createrepo again and see if it makes any difference.
Thanks, James
Unfortunately this still has not worked. I tried the following commands:
$ pwd /media/160GBUSBDSK/YumRepo/fedora/linux/3/i386/updates $ $ ls -l total 64 drwxrwxr-x 2 jpifer jpifer 32768 Feb 16 20:10 headers drwxrwxr-x 3 jpifer jpifer 28672 Feb 17 13:53 packages drwxrwxr-x 2 jpifer jpifer 4096 Feb 16 20:25 repodata $ $createrepo packages $
do:
createrepo .
$createrepo /media/160GBUSBDSK/YumRepo/fedora/linux/3/i386/updates/packages
After each of these I tried running "yum update" as root. Both times I still get this: # yum update Setting up Update Process Setting up repositories core 100% |=========================| 951 B 00:00 freshrpms 100% |=========================| 951 B 00:00 livna 100% |=========================| 951 B 00:00 updates 100% |=========================| 951 B 00:00 extras 100% |=========================| 951 B 00:00 Reading repository metadata in from local files Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Package pyzor.noarch 0:0.4.0-8 set to be updated ---> Downloading header for gpdf to pack into transaction set. http://mirror.myserver.com/repomirror/fedora/linux/3/i386/updates/gpdf-2.8.2...: [Errno 4] IOError: HTTP Error 404: Date: Fri, 17 Feb 2006 19:22:34 GMT Server: Apache/2.0.53 (Fedora) Content-Length: 350 Connection: close Content-Type: text/html; charset=iso-8859-1 Trying other mirror. Error: failure: gpdf-2.8.2-7.2.i386.rpm from updates: [Errno 256] No more mirrors to try.
As you can see, it's still looking in updates not updates/packages for the RPMs. I'm stumped....
Thanks, James
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
do:
createrepo .
Nope, exact same result. When I do that command it looks correct I think. It scrolls through all the RPMs:
$ pwd /media/160GBUSBDSK/YumRepo/fedora/linux/3/i386/updates $ createrepo . 661/661 - packages/zlib-devel-1.2.1.2-3.fc3.i386.rpm Saving Primary metadata Saving file lists metadata Saving other metadata
But when I run yum update I get the exact same result. It's still looking in the updates directory intead of the packages directory.
Thanks, James
On Fri, Feb 17, 2006 at 02:56:10PM -0500, James Pifer enlightened us:
do:
createrepo .
Nope, exact same result. When I do that command it looks correct I think. It scrolls through all the RPMs:
$ pwd /media/160GBUSBDSK/YumRepo/fedora/linux/3/i386/updates $ createrepo . 661/661 - packages/zlib-devel-1.2.1.2-3.fc3.i386.rpm Saving Primary metadata Saving file lists metadata Saving other metadata
But when I run yum update I get the exact same result. It's still looking in the updates directory intead of the packages directory.
Thanks, James
Have you cleaned the cache on the client?
Matt