This adds a --nogr flag to buildinstall so that you don't need to modify
anaconda and update NEEDGR in upd-instroot.. Also moves some of
graphics related echos inside the ifs for NEEDGR.. No sense in saying
you're doing something you're not.. ;)
Also fixes annoying -maxdepth flag warning I was seeing with find in the
mk-images.* sources..
Tested and seems to work fine for x86.. Applies cleanly against
11.0.5.. I can update it to apply cleanly to the current CVS tree if
desired..
Cheers....Paul...
--
---
Paul B Schroeder <pschroeder "at" uplogix "dot" com>
Senior Software Engineer
Uplogix, Inc. (http://www.uplogix.com/)
diff -urN anaconda-11.0.5.orig/scripts/buildinstall anaconda-11.0.5/scripts/buildinstall
--- anaconda-11.0.5.orig/scripts/buildinstall 2005-11-17 13:16:14.000000000 -0600
+++ anaconda-11.0.5/scripts/buildinstall 2006-07-28 15:55:21.000000000 -0500
@@ -35,6 +35,10 @@
PRODUCTPATH=$2
shift; shift
;;
+ --nogr)
+ NOGRSTR="--nogr"
+ shift
+ ;;
--debug)
DEBUGSTR="--debug"
shift
@@ -135,9 +139,9 @@
echo "Going to run buildinstall again"
# run it again for the second half
if [ -x /usr/bin/runroot ]; then
- runroot $COMPNAME --onlyone --arch $BUILDARCH "$BUILDINSTALL $DEBUGSTR --buildinstdir $BUILDINSTDIR --second $PKGORDERSTR --comp $COMPNAME --version $VERSION --release '\"$RELEASESTR\"' --product '\"$PRODUCTSTR\"' --prodpath $PRODUCTPATH --discs '\"$DISCSTR\"' --bugurl '\"$BUGURL\"' $DIR"
+ runroot $COMPNAME --onlyone --arch $BUILDARCH "$BUILDINSTALL $DEBUGSTR $NOGRSTR --buildinstdir $BUILDINSTDIR --second $PKGORDERSTR --comp $COMPNAME --version $VERSION --release '\"$RELEASESTR\"' --product '\"$PRODUCTSTR\"' --prodpath $PRODUCTPATH --discs '\"$DISCSTR\"' --bugurl '\"$BUGURL\"' $DIR"
else
- $BUILDINSTALL $DEBUGSTR --buildinstdir $BUILDINSTDIR --second $PKGORDERSTR --comp $COMPNAME --version $VERSION --release "$RELEASESTR" --product "$PRODUCTSTR" --prodpath $PRODUCTPATH --discs "$DISCSTR" --bugurl "$BUGURL" $DIR
+ $BUILDINSTALL $DEBUGSTR $NOGRSTR --buildinstdir $BUILDINSTDIR --second $PKGORDERSTR --comp $COMPNAME --version $VERSION --release "$RELEASESTR" --product "$PRODUCTSTR" --prodpath $PRODUCTPATH --discs "$DISCSTR" --bugurl "$BUGURL" $DIR
fi
rm -rf $BUILDINSTDIR
@@ -146,9 +150,9 @@
secondRun() {
echo "Building images..."
if [ -x /usr/bin/runroot ]; then
- runroot $COMPNAME --onlyone --arch $BUILDARCH "$UPD_INSTROOT $DEBUGSTR --comp $COMPNAME $p/$PRODUCTPATH/RPMS $TREEDIR/image-template $TREEDIR/instimage"
+ runroot $COMPNAME --onlyone --arch $BUILDARCH "$UPD_INSTROOT $DEBUGSTR $NOGRSTR --comp $COMPNAME $p/$PRODUCTPATH/RPMS $TREEDIR/image-template $TREEDIR/instimage"
else
- $UPD_INSTROOT $DEBUGSTR --comp $COMPNAME $p/$PRODUCTPATH/RPMS $TREEDIR/image-template $TREEDIR/instimage
+ $UPD_INSTROOT $DEBUGSTR $NOGRSTR --comp $COMPNAME $p/$PRODUCTPATH/RPMS $TREEDIR/image-template $TREEDIR/instimage
fi
echo "Creating repository metadata..."
@@ -171,9 +175,9 @@
echo "Making images..."
if [ -x /usr/bin/runroot ]; then
- runroot $COMPNAME --onlyone --arch $BUILDARCH "cd $BUILDINSTDIR\; ./mk-images $DEBUGSTR $p/$PRODUCTPATH/RPMS $p $TREEDIR/image-template $TREEDIR/instimage $BUILDARCH '\"$PRODUCTSTR\"' $VERSION $PRODUCTPATH '\"$BUGURL\"'"
+ runroot $COMPNAME --onlyone --arch $BUILDARCH "cd $BUILDINSTDIR\; ./mk-images $DEBUGSTR $NOGRSTR $p/$PRODUCTPATH/RPMS $p $TREEDIR/image-template $TREEDIR/instimage $BUILDARCH '\"$PRODUCTSTR\"' $VERSION $PRODUCTPATH '\"$BUGURL\"'"
else
- $MK_IMAGES $DEBUGSTR $p/$PRODUCTPATH/RPMS $p $TREEDIR/image-template $TREEDIR/instimage $BUILDARCH "$PRODUCTSTR" $VERSION $PRODUCTPATH "$BUGURL"
+ $MK_IMAGES $DEBUGSTR $NOGRSTR $p/$PRODUCTPATH/RPMS $p $TREEDIR/image-template $TREEDIR/instimage $BUILDARCH "$PRODUCTSTR" $VERSION $PRODUCTPATH "$BUGURL"
fi
echo "Writing .discinfo file"
diff -urN anaconda-11.0.5.orig/scripts/mk-images anaconda-11.0.5/scripts/mk-images
--- anaconda-11.0.5.orig/scripts/mk-images 2006-03-07 09:58:06.000000000 -0600
+++ anaconda-11.0.5/scripts/mk-images 2006-07-28 12:36:46.000000000 -0500
@@ -15,6 +15,12 @@
shift
fi
+NEEDGR=yes
+if [ "$1" == "--nogr" ]; then
+ NEEDGR=""
+ shift
+fi
+
if [ -z "$1" -o -z "$2" -o -z "$3" -o -z "$4" -o -z "$5" -o -z "$6" -o -z "$7" -o -z "$8" ]; then usage; fi
PRODUCT=$6
diff -urN anaconda-11.0.5.orig/scripts/mk-images.i386 anaconda-11.0.5/scripts/mk-images.i386
--- anaconda-11.0.5.orig/scripts/mk-images.i386 2006-03-07 09:58:07.000000000 -0600
+++ anaconda-11.0.5/scripts/mk-images.i386 2006-07-28 15:14:15.000000000 -0500
@@ -21,18 +21,21 @@
# prepare a directory with the kernel, initrd, and various message files
# used to populate a boot image
prepareBootTree() {
- (cd $BOOTDISKDIR; find . ! -name "*.msg" -maxdepth 1 ! -type d | cpio --quiet -p $MBD_BOOTTREE)
+ (cd $BOOTDISKDIR; find . -maxdepth 1 ! -name "*.msg" ! -type d | cpio --quiet -p $MBD_BOOTTREE)
cp $MBD_FSIMAGE $MBD_BOOTTREE/initrd.img
cp $KERNELROOT/boot/vmlinuz-* $MBD_BOOTTREE/vmlinuz
- $IMGPATH/usr/lib/anaconda-runtime/splashtolss.sh $BOOTDISKDIR/syslinux-splash.png $BOOTDISKDIR/splash.lss
- if [ $? != 0 ]; then
- echo $0: Failed to create splash.lss
- exit 1
- fi
- cp $BOOTDISKDIR/splash.lss $MBD_BOOTTREE/splash.lss
- rm -f $MBD_BOOTTREE/syslinux-splash.png
+ if [ -n "$NEEDGR" ]; then
+ $IMGPATH/usr/lib/anaconda-runtime/splashtolss.sh $BOOTDISKDIR/syslinux-splash.png $BOOTDISKDIR/splash.lss
+ if [ $? != 0 ]; then
+ echo $0: Failed to create splash.lss
+ exit 1
+ fi
+ cp $BOOTDISKDIR/splash.lss $MBD_BOOTTREE/splash.lss
+ rm -f $MBD_BOOTTREE/syslinux-splash.png
+ fi
+
rm -f $MBD_BOOTTREE/memtest*
for file in $BOOTDISKDIR/*.msg; do
filename=`basename $file`
diff -urN anaconda-11.0.5.orig/scripts/mk-images.s390 anaconda-11.0.5/scripts/mk-images.s390
--- anaconda-11.0.5.orig/scripts/mk-images.s390 2006-02-22 15:18:01.000000000 -0600
+++ anaconda-11.0.5/scripts/mk-images.s390 2006-07-28 15:25:20.000000000 -0500
@@ -2,7 +2,7 @@
dd if=/dev/zero bs=1k count=$BOOTDISKSIZE of=/$MBD_TMPIMAGE 2>/dev/null
mount -o loop -t msdos $MBD_TMPIMAGE $MBD_BOOTTREE
- (cd $BOOTDISKDIR; find . ! -name "*.msg" -maxdepth 1 ! -type d | cpio --quiet -p $MBD_BOOTTREE)
+ (cd $BOOTDISKDIR; find . -maxdepth 1 ! -name "*.msg" ! -type d | cpio --quiet -p $MBD_BOOTTREE)
cp $MBD_FSIMAGE $MBD_BOOTTREE/initrd.img
cp $KERNELROOT/boot/vmlinuz-* $MBD_BOOTTREE/vmlinuz
diff -urN anaconda-11.0.5.orig/scripts/mk-images.x86_64 anaconda-11.0.5/scripts/mk-images.x86_64
--- anaconda-11.0.5.orig/scripts/mk-images.x86_64 2006-03-07 09:58:07.000000000 -0600
+++ anaconda-11.0.5/scripts/mk-images.x86_64 2006-07-28 15:24:17.000000000 -0500
@@ -12,17 +12,21 @@
# prepare a directory with the kernel, initrd, and various message files
# used to populate a boot image
prepareBootTree() {
- (cd $BOOTDISKDIR; find . ! -name "*.msg" -maxdepth 1 ! -type d | cpio --quiet -p $MBD_BOOTTREE)
+ (cd $BOOTDISKDIR; find . -maxdepth 1 ! -name "*.msg" ! -type d | cpio --quiet -p $MBD_BOOTTREE)
cp $MBD_FSIMAGE $MBD_BOOTTREE/initrd.img
cp $KERNELROOT/boot/vmlinuz-* $MBD_BOOTTREE/vmlinuz
- $IMGPATH/usr/lib/anaconda-runtime/splashtolss.sh $BOOTDISKDIR/syslinux-splash.png $BOOTDISKDIR/splash.lss
- if [ $? != 0 ]; then
- echo $0: Failed to create splash.lss
- exit 1
- fi
- cp $BOOTDISKDIR/splash.lss $MBD_BOOTTREE/splash.lss
- rm -f $MBD_BOOTTREE/syslinux-splash.png
+
+ if [ -n "$NEEDGR" ]; then
+ $IMGPATH/usr/lib/anaconda-runtime/splashtolss.sh $BOOTDISKDIR/syslinux-splash.png $BOOTDISKDIR/splash.lss
+ if [ $? != 0 ]; then
+ echo $0: Failed to create splash.lss
+ exit 1
+ fi
+ cp $BOOTDISKDIR/splash.lss $MBD_BOOTTREE/splash.lss
+ rm -f $MBD_BOOTTREE/syslinux-splash.png
+ fi
+
rm -f $MBD_BOOTTREE/memtest*
for file in $BOOTDISKDIR/*.msg; do
filename=`basename $file`
diff -urN anaconda-11.0.5.orig/scripts/upd-instroot anaconda-11.0.5/scripts/upd-instroot
--- anaconda-11.0.5.orig/scripts/upd-instroot 2006-03-02 19:49:59.000000000 -0600
+++ anaconda-11.0.5/scripts/upd-instroot 2006-07-28 12:34:47.000000000 -0500
@@ -3,12 +3,18 @@
ORIGDIR=`pwd`
COMPONENT=""
DEBUG=""
+NEEDGR=yes
if [ "$1" == "--debug" ]; then
DEBUG="--debug"
shift
fi
+if [ "$1" == "--nogr" ]; then
+ NEEDGR=""
+ shift
+fi
+
if [ "$1" == "--comp" ]; then
COMPONENT=$2
shift; shift
@@ -39,7 +45,6 @@
LIBDIR=lib
fi
-NEEDGR=yes
prunePackageList() {
PACKAGEPATH=$1
@@ -68,12 +73,12 @@
[ -d $PKGDEST ] || die "ERROR: directory missing: $PKGDEST"
for n in $RPMS; do
- [ -n "$DEBUG" ] && echo -ne "\rExpanding packages..." $(basename $n)
+ [ -n "$DEBUG" ] && echo -e "\rExpanding packages..." $(basename $n)
if [ "$(rpm --nosignature --nodigest -qp --qf '%{NAME}' $n)" = "tzdata" ] ; then
TZDATA=$n
fi
rpm2cpio $n | (cd $PKGDEST; cpio -E $KEEPFILES --quiet -iumd)
- [ -n "$DEBUG" ] && echo -ne "\rExpanding packages..." "$(basename $n | sed 's/./ /g')"
+ [ -n "$DEBUG" ] && echo -e "\rExpanding packages..." "$(basename $n | sed 's/./ /g')"
done
pushd $PKGDEST/$LIBDIR >/dev/null 2>&1
if [ -d obsolete/linuxthreads/ ]; then
@@ -1023,13 +1028,15 @@
rm -f $DESTGR/usr/X11R6/$LIBDIR/modules/extensions/lib{GLcore,glx,pex5}*
# fixup joe links
-ln -fs jpicorc $DESTGR/etc/joe/picorc
-ln -fs jpicorc $DESTGR/etc/joe/jnanorc
-ln -fs jpicorc $DESTGR/etc/joe/nanorc
-ln -fs jmacsrc $DESTGR/etc/joe/emacsrc
-ln -fs jmacs $DESTGR/usr/bin/emacs
-ln -fs jpico $DESTGR/usr/bin/pico
-ln -fs jpico $DESTGR/usr/bin/nano
+if [ -n "$NEEDGR" ]; then
+ ln -fs jpicorc $DESTGR/etc/joe/picorc
+ ln -fs jpicorc $DESTGR/etc/joe/jnanorc
+ ln -fs jpicorc $DESTGR/etc/joe/nanorc
+ ln -fs jmacsrc $DESTGR/etc/joe/emacsrc
+ ln -fs jmacs $DESTGR/usr/bin/emacs
+ ln -fs jpico $DESTGR/usr/bin/pico
+ ln -fs jpico $DESTGR/usr/bin/nano
+fi
# create selinux config
if [ -e $DEST/etc/selinux/targeted ]; then
@@ -1068,15 +1075,15 @@
cp $DEST/etc/nsswitch.conf $DESTGR/etc/nsswitch.conf
# fixup man.config to point into /mnt/sysimage for rescue
-echo "Fixing up /etc/man.config to point into /mnt/sysimage"
if [ -n "$NEEDGR" ]; then
+ echo "Fixing up /etc/man.config to point into /mnt/sysimage"
mv $DESTGR/etc/man.config $DESTGR/etc/man.config-old
cat $DESTGR/etc/man.config-old | sed 's^/usr/bin^/mnt/sysimage/usr/bin^' | sed 's^/bin/cat^/mnt/sysimage/usr/bin/cat^' > $DESTGR/etc/man.config
rm -f $DESTGR/etc/man.config-old
fi
-echo "Running mkfontdir..."
if [ -n "$NEEDGR" ]; then
+ echo "Running mkfontdir..."
mkfontdir $DESTGR/usr/share/X11/fonts/*
fi
@@ -1090,8 +1097,8 @@
mkdir $DEST/etc/selinux
cp -r $DESTGR/etc/selinux/* $DEST/etc/selinux/
-echo "Getting pango modules"
if [ -n "$NEEDGR" ]; then
+ echo "Getting pango modules"
# sick sick sick hack for pango-querymodules being -32 or -64
mv $DESTGR/usr/bin/pango-querymodules* $DESTGR/usr/bin/pango-querymodules
if [ -x /usr/bin/runroot -a -n "$COMPONENT" ]; then
@@ -1122,8 +1129,8 @@
mkdir -p $DESTGR/etc/gtk-2.0/$HOSTTRIPLET
-echo "Getting gtk2 input method modules"
if [ -n "$NEEDGR" ]; then
+ echo "Getting gtk2 input method modules"
mv $DESTGR/usr/bin/gtk-query-immodules-2.0* $DESTGR/usr/bin/gtk-query-immodules-2.0
if [ -x /usr/bin/runroot -a -n "$COMPONENT" ]; then
runroot $COMPONENT --onlyone --arch $ARCH "LD_LIBRARY_PATH=/usr/X11R6/$LIBDIR:$LD_LIBRARY_PATH /usr/sbin/chroot $DESTGR /usr/bin/gtk-query-immodules-2.0 2> $DESTGR/etc/gtk-2.0/$HOSTTRIPLET/gtk.immodules"
@@ -1133,8 +1140,8 @@
rm -f $DESTGR/usr/bin/gtk-query-immodules-2.0
fi
-echo "Getting gtk2 gdk-pixbuf loaders"
if [ -n "$NEEDGR" ]; then
+ echo "Getting gtk2 gdk-pixbuf loaders"
mv $DESTGR/usr/bin/gdk-pixbuf-query-loaders* $DESTGR/usr/bin/gdk-pixbuf-query-loaders
if [ -x /usr/bin/runroot -a -n "$COMPONENT" ]; then
runroot $COMPONENT --onlyone --arch $ARCH "LD_LIBRARY_PATH=/usr/X11R6/$LIBDIR:$LD_LIBRARY_PATH /usr/sbin/chroot $DESTGR /usr/bin/gdk-pixbuf-query-loaders 2> $DESTGR/etc/gtk-2.0/$HOSTTRIPLET/gdk-pixbuf.loaders"