#!/bin/bash if [ -z "$1" -o ! -d "$1" ]; then echo "$0: updates instimage from a Red Hat RPMS directory" echo "usage: $0 " exit 1 fi SRC=$1/RedHat/RPMS DEST=../../../RedHat/instimage PACKAGES="glibc-2 ldconfig filesystem basesystem setup fileutils XFree86-libs XFree86-SVGA XFree86-FBDev XFree86-75dpi-fonts XFree86-3. xpm-3 glib- gtk+- gnome-libs slang python-1 newt imlib-1 libpng libtiff libjpeg- libtermcap-2 zlib rpm bash- pygtk- pygnome- util-linux procps e2fsprogs-1 esound-0 audiofile-0" for I in $PACKAGES; do for J in `ls $SRC/$I*`; do if ! echo $J | grep devel > /dev/null; then RPMS="$RPMS $J" fi done done if [ ! -e $DEST/var/lib/rpm/packages.rpm ]; then mkdir -p $DEST/var/lib/rpm rpm --initdb -r `pwd`/$DEST fi rpm -Uvh $RPMS -r `pwd`/$DEST --relocate /bin=/usr/bin \ --relocate /sbin=/usr/sbin --badreloc \ --excludedocs --noscripts --nodeps --force rm -rf $DEST/bin $DEST/sbin $DEST/boot $DEST/home $DEST/root $DEST/tmp # Xserver needs a place to put the compiled xkb maps. rm -rf $DEST/usr/X11R6/lib/X11/xkb/compiled ln -s /tmp $DEST/usr/X11R6/lib/X11/xkb/compiled make install chroot $DEST ldconfig -v