up2date trick
"Nathan G. Grennan" <[email protected]>
| Newsgroups | gmane.network.up2date.current.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, I have found the solution to getting errata rpms almost as fast as they are released to your Current server using up2date. Instead of waiting for a mirror to mirror them, and hoping it does a good job and is fast that day. up2date -uf -d --dbpath=/var/ftp/pub/RedHide/i386/.current/.redhat --tmpdir=/var/ftp/pub/RedHide/i386/updates/7.2 -uf to update and force downloading of all errata -d to download but not to install the rpms --dbpath=/path/directory where directory contains a the files from the rpmdb-redhat package, which is a copy of a rpm database with ALL the packages installed --tmpdir=/path/directory where directory is the directory you want to store the rpms for Current There is currently a pitfall with this idea. As was mentioned on this list a few days ago a new updates to the up2date and rhn_register packages. The original version was up2date-2.7.2-7.x.6 for RedHat 7.2. The first update was up2date-2.7.11-7.x.2. The second update from a few days ago was update-2.7.46-7.x.2. But their was a glitch in the second update which caused them to retract that version. So the RedHat up2date database(Oracle) only knows about the first update. If you happen to have updated to the second update through up2date before it was retracted or manually by downloading it from a ftp site, then try to install up2date-gnome using up2date it will have a version conflict. But that is not the problem with this trick. Another side effect of this retraction is that if you are still running the original version of up2date and try to use up2date to update up2date or all your packages it will currently get stuck trying to update up2date because of a missing header file. To work around this you must manually download the second update to up2date and install them manually. To do this with the fake database use something like: rpm -U --justdb --dbpath /var/ftp/pub/RedHide/i386/.current/.redhat up2date-2.7.11-7.x.2.i386.rpm up2date-gnome-2.7.11-7.x.2.i386.rpm rhn_register-gnome-2.7.2-7.x.2.i386.rpm rhn_register-2.7.2-7.x.8.i386.rpm where -U to upgrade --justdb to update the database but not install the files or run the scripts, which would be a very bad thing --dbpath using the directory where you copied rpmdb-redhat to, also be sure not to use a = like with up2date You also may want to clean out your directory with something like: rm /path/directory/*.hdr /path/directory/redhat-linux-* I haven't fully tested it, but from what I know of up2date it should cache the rpms in the download directory, so it shouldn't try download all the rpms every time you use this trick. Though you will probably need to clean the directory of the headers each time. By combining this with Current by using a script(which I have yet to write) to run cadmin and the above commands every so often through cron you should have a very up2date, efficient, and reliable Current server. Step by step for RedHat 7.2 i386: rpm -i ftp://fr.rpmfind.net/linux/redhat/7.2/en/os/i386/RedHat/RPMS/rpmdb-redhat-7.2-0.20010924.i386.rpm cp -a /usr/lib/rpmdb/i386-redhat-linux/redhat /tmp rpm -U --justdb --dbpath /tmp/redhat ftp://fr.rpmfind.net/linux/redhat/updates/7.2/en/os/i386/up2date-2.7.11-7.x.2.i386.rpm ftp://fr.rpmfind.net/linux/redhat/updates/7.2/en/os/i386/up2date-gnome-2.7.11-7.x.2.i386.rpm ftp://fr.rpmfind.net/linux/redhat/updates/7.2/en/os/i386/rhn_register-2.7.2-7.x.8.i386.rpm ftp://fr.rpmfind.net/linux/redhat/updates/7.2/en/os/i386/rhn_register-gnome-2.7.2-7.x.8.i386.rpm mkdir /tmp/errata up2date -uf -d --dbpath=/tmp/redhat --tmpdir=/tmp/errata rm /tmp/errata/*.hdr /tmp/errata/redhat-linux-*