| Updating the NCSU Realm Kit Tree | ||
|---|---|---|
| <<< Previous | Next >>> | |
At this point we are ready to actually apply the errata to the Realm Kit trees. This has gotten very easy with the addrpm.py script. This script is present in the realmkit-maintenance package version 0.11.1 and higher.
The addrpm.py script does all the hard work for you for the most common case. It will find the packages that you are replacing, move them out of the way, drop in the new packages, and create symlinks as appropriate. To do this the program does need a bit of information from the user. The following is the help text displayed by addrpm.py.
Usage:/usr/bin/addrpm.py -e dir -u dir -v ver -r arch [listofrpms]
Required arguments:
-v, --ver [version of distro]
-r, --arch [architecture of distro]
-e, --tree [where the top of the tree is]
-u, --updatedir [subdir for updates ex: other-pkgs/updates
Optional arguments:
-t, --testmode Run in test mode
-a, --addnew Add rpms to tree if they are not already there
-d, --debug Run in debug mode
-h, --help Print this message
|
The end user does need to carefully understand most of the options here. The -e defines the directory that contains all the versions of the tree. The -v defines the version of the tree to apply the updates to. You must also specify the architecture of the tree with the -r option. All three of these arguments are concatenated together to form a path to a Red Hat install tree. (The directory that contains the RedHat/ directory.) The last required option is -u which specifies a subdirectory of the install tree to put updates. (The updates will be symlinked into the install tree.)
The rest of the options are not required but can be very useful. If you need to add an RPM into the tree that did not previously exist you need to specify -a otherwise you will receive a warning and the RPM will not be added. To run in test mode use -t. This mode will not alter the tree in any way put will tell you exactly what it would have done. Debug mode is turned on with -d and will print out lots of extra information about what is happening.
Lets look at a typical example. Red Hat released a Bind errata in August, 2002. From which you see several RPMs all starting with bind-, then followed by a sub-package name, then followed by the exact same version and release number. Here are the new packages for Red Hat Linux 7.3 on a i386:
| bind-9.2.1-1.7x.2.i386.rpm |
| bind-devel-9.2.1-1.7x.2.i386.rpm |
| bind-utils-9.2.1-1.7x.2.i386.rpm |
addrpm.py -u updates -e /dist -r i386 -v 7.3 bind-*9.2.1-1.7x.2*.rpm |
Now that we have looked at the addrpm.py script let's go over the steps necessary to apply errata to an install tree.
Obtain the errata as discussed in the previous section.
Use addrpm.py to apply the packages to a specific tree. I normally use one run of the program per version I am updating per errata.
Check to make sure the MD5 checksums and GPG signatures are okay.
That's it. The errata are now applied. Next you need to rebuild the meta-information about the install tree. This is covered in the next section.
| <<< Previous | Home | Next >>> |
| Obtain the Errata | Updating Meta-information |