diff --git a/rewrite/scratch/upd-instroot b/rewrite/scratch/upd-instroot index fd4d780a..459df289 100755 --- a/rewrite/scratch/upd-instroot +++ b/rewrite/scratch/upd-instroot @@ -6,41 +6,6 @@ expandPackageSet() { if [ -n "$UPDATES" ]; then (cd $UPDATES; find) | (cd $UPDATES ; /bin/cpio --quiet -pmdu $YUMDIR) fi - - # figure out the theme to keep - if [ -f $YUMDIR/etc/gtk-2.0/gtkrc ]; then - gtktheme=$(grep "gtk-theme-name" $YUMDIR/etc/gtk-2.0/gtkrc | awk {'print $3;'} | sed -e 's/"//g') - echo "usr/share/themes/$gtktheme" >> $KEEPFILES - # find gtk engine needed - for engine in `grep engine $YUMDIR/usr/share/themes/$gtktheme/gtk-2.0/gtkrc | awk {'print $2;'} | sed -e 's/"//g' | sort -u` ; do - echo "usr/$LIBDIR/gtk-2.0/*/engines/*$engine*" >> $KEEPFILES - done - - theme=$(grep "gtk-icon-theme-name" $YUMDIR/etc/gtk-2.0/gtkrc | awk {'print $3;'} | sed -e 's/"//g') - while [ -n "$theme" ]; do - echo "usr/share/icons/$theme" >> $KEEPFILES - theme=$(grep Inherits $YUMDIR/usr/share/icons/$theme/index.theme | cut -d = -f 2) - done - fi - - echo `date` "Installing files" - pushd $YUMDIR >/dev/null - cat $KEEPFILES | while read spec ; do - #Pull off path - path=`echo "$spec" | sed 's,\([^[*\?]*\)/.*,\1,'` - for filespec in `find ./$path -path "./$spec" 2> /dev/null` ; do - if [ ! -e $filespec ]; then - continue - elif [ ! -d $filespec ]; then - instFile $filespec $PKGDEST - else - for i in `find $filespec -type f 2> /dev/null` ; do instFile $i $PKGDEST ; done - for i in `find $filespec -type l 2> /dev/null` ; do instFile $i $PKGDEST ; done - for d in `find $filespec -type d 2> /dev/null` ; do instDir $d $PKGDEST ; done - fi - done - done - popd >/dev/null } @@ -48,92 +13,10 @@ expandPackageSet() { -rm -rf $DEST; mkdir -p $DEST/usr/sbin $DEST/var/lib $DEST/boot -ln -s /tmp $DEST/var/lib/xkb - -echo `date` "Expanding packages..." -YUMDIR=${TMPDIR:-/tmp}/yumdir.$$ -mkdir -p $YUMDIR/var/log -mkdir -p $YUMDIR/var/lib/yum - -expandPackageSet $yumconf $YUMDIR "$RPMS" $DEST $KEEPFILE -echo `date` "Done Expanding packages..." - -# Dogtail will check this -echo "Creating customized GConf2 settings for root" -mkdir -p $DEST/.gconf/desktop/gnome/interface -touch $DEST/.gconf/desktop/%gconf.xml -touch $DEST/.gconf/desktop/gnome/%gconf.xml -cat > $DEST/.gconf/desktop/gnome/interface/%gconf.xml < - - - - -EOF - -rm -rf $YUMDIR - chown -R root:root $DEST chmod -R a+rX-w $DEST -# Remove locales unused during the install -cat $DEST/usr/lib/anaconda/lang-table* | awk ' -{ gsub("-", "", $4); - print $4; - print gensub(/\..*$/,"","",$4); - print gensub(/_.*$/,"","",$4); - if (split ($4, a, ".") > 1) { - print gensub(/\..*$/,tolower("." a[2]),"",$4); - }; - print $2; -} -' | sed -e 's/latn/Latn/g' | LC_ALL=C sort -u > $DEST/locales -for p in lib share; do ( -cd $DEST/usr/$p/locale && { -ls | grep -v locale.alias | grep -v locale-archive | LC_ALL=C sort > $DEST/locales.list -LC_ALL=C comm -13 $DEST/locales $DEST/locales.list | xargs rm -rf -} -); done -rm -f $DEST/locales $DEST/locales.list -# fixup joe links -if [ -d "$DESTDIR"/etc/joe ]; then - ln -fs jpicorc $DEST/etc/joe/picorc - ln -fs jpicorc $DEST/etc/joe/jnanorc - ln -fs jpicorc $DEST/etc/joe/nanorc - ln -fs jmacsrc $DEST/etc/joe/emacsrc - ln -fs jmacs $DEST/usr/bin/emacs - ln -fs jpico $DEST/usr/bin/pico - ln -fs jpico $DEST/usr/bin/nano -fi - -# fix up some links for man page related stuff -for file in nroff groff iconv geqn gtbl gpic grefer ; do - ln -fs /mnt/sysimage/usr/bin/$file $DEST/usr/bin/$file -done - -# create selinux config -if [ -e $DEST/etc/selinux/targeted ]; then - cat > $DEST/etc/selinux/config < $DEST/etc/libuser.conf </dev/null mv $DEST/etc/yum.repos.d $DEST/etc/anaconda.repos.d -rm -f $DEST/usr/$LIBDIR/libunicode-lite* - find $DEST -type d | xargs chmod 755 if [ -f $DEST/bin/bash ]; then @@ -203,39 +72,6 @@ for brokenlink in $(find $DEST/usr/{bin,sbin} -follow -lname '*') ; do done done -# copy bootloader files for sparc -if [ $ARCH = sparc ]; then - mkdir -p $DEST/usr/lib/anaconda-runtime/boot - [ -d $DEST/boot ] || die "ERROR: directory missing: $DEST/boot" - (cd $DEST/boot; find -name "*.b") | (cd $DEST/boot; /bin/cpio --quiet -pdmu $DEST/usr/lib/anaconda-runtime/boot) -fi - -# copy bootloader file for ppc -if [ $ARCH = ppc -o $ARCH = ppc64 ]; then - mkdir -p $DEST/usr/lib/anaconda-runtime/boot - cp -af $DEST/boot/efika.forth $DEST/usr/lib/anaconda-runtime/boot -fi - -# copy bootloader file for alpha -if [ $ARCH = alpha ]; then - mkdir -p $DEST/usr/lib/anaconda-runtime/boot - cp -af $DEST/boot/bootlx $DEST/usr/lib/anaconda-runtime/boot -fi - -# copy bootloader files for ia64 -if [ $ARCH = ia64 ]; then - mkdir -p $DEST/usr/lib/anaconda-runtime/boot - cp -af $DEST/boot/efi/EFI/redhat//* $DEST/usr/lib/anaconda-runtime/boot -fi - -# copy bootloader files for i386/x86_64 -if [ $ARCH = i386 -o $ARCH = x86_64 ]; then - mkdir -p $DEST/usr/lib/anaconda-runtime/boot - cp -af $DEST/boot/memtest* $DEST/usr/lib/anaconda-runtime/boot -fi - -rm -rf $DEST/boot $DEST/home $DEST/root $DEST/tmp - find $DEST -name "*.a" | grep -v kernel-wrapper/wrapper.a | xargs rm -rf find $DEST -name "lib*.la" |grep -v "usr/$LIBDIR/gtk-2.0" | xargs rm -rf