From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id C75E73F946 for ; Fri, 13 Dec 2002 15:05:25 -0500 (EST) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id gBDK5PX06094 for axp-list@listman.redhat.com; Fri, 13 Dec 2002 15:05:25 -0500 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id gBDK5PD06090 for ; Fri, 13 Dec 2002 15:05:25 -0500 Received: from evrtwa1-ar5-4-65-015-110.evrtwa1.dsl-verizon.net (evrtwa1-ar5-4-65-015-110.evrtwa1.dsl-verizon.net [4.65.15.110]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id gBDJdZP29653 for ; Fri, 13 Dec 2002 14:39:35 -0500 Received: (from rob@localhost) by evrtwa1-ar5-4-65-015-110.evrtwa1.dsl-verizon.net (8.11.6/8.11.6) id gBDK5Ia30416 for axp-list@redhat.com; Fri, 13 Dec 2002 12:05:18 -0800 Date: Fri, 13 Dec 2002 12:05:18 -0800 From: "Robert M. Riches Jr." Message-Id: <200212132005.gBDK5Ia30416@evrtwa1-ar5-4-65-015-110.evrtwa1.dsl-verizon.net> To: axp-list@redhat.com Subject: request for comment, ideas for RH7.2 RPM install script X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: My next personal hobby project is to write a script to install RPMs from HP's updates area. This message is a request for comment on requirements and plans for the script. (If anybody else wants it, I'll be happy to post it when it's done, or at least when it seems to be working well enough to be worth the bandwidth.) The basic precondition is there is a directory structure created by something like "wget -rN" from HP's updates (or a mirror thereof) containing a bunch of RPMs. It appears the updates are clumped in time so that interdependent RPMs have timestamps of the same day. The postcondition is that the appropriate RPMs will have been installed. In between is a little more complicated. I don't plan to be too fancy, in that I don't plan to compare the full 'capability' lists provided and required by each package. If there are dependency issues not solved by the simple one-day-at-a-time strategy, that will be left as an exercise for the reader. :-) Here are the plans so far: - I plan to code it in Perl. - It will be purely text-based and will query the user before removing or installing anything. (That way, it's the user's fault if something goes wrong. :-) - There will be three variables up front for customization: - the name of the base directory (either a path or symlink) - a list of subdirectory names under the base directory - a list of architecture types to install, in priority order; for example: 'alphaev67', 'alpha', 'noarch' - It appears the subdirectory name and the architecture type match, so I plan to issue a warning if that assumption is violated as a simple sanity check. - For a little bit of speed, I plan to make a hash of the architecture types. - Use "rpm -qa" to get the list of the packages already installed. - Scan the specified subdirectories to build a list of the packages available. Do the suffix sanity check here. Also, ignore any duplicates in different architecture types. For example, if the list is ('alphaev67', 'alpha', 'noarch'), and if the same package base name is in both the 'alphaev67' and 'alpha' subdirectories, ignore the latter one in favor of the former one. - Check the 'archives' directories to catch any that have been obsoleted since they were first downloaded. With user permission, remove the .rpm files outside the 'archives' directories. - Subtract the already installed packages from the ones available to produce a list of candidates for installation. - Find the oldest file in the candidate list. - Starting at that date, for each date until all packages have been dealt with, do the following: - Find all files with timestamps in that day. - Run "rpm --checksig" on them. - Ask the user whether to proceed to install that packet. - Run "rpm -Uvh" on them. What am I not understanding correctly about how HP's RPM updates areas are structured, how RPMs should be installed and/or anything else relevant? Any other comments? I guess to really test the script, I'll have to work up the courage to install the RH7.2 CDs I bought back in July. :-) Robert Riches rm.riches@verizon.net