summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-06-02 04:11:45 +0000
committerMatt Wilson <msw@redhat.com>2000-06-02 04:11:45 +0000
commit0a202e4deae1322248d3d4c130c096d6bc6cb223 (patch)
tree9b744ca380887d10efecbfacd50859774d87c6d3 /scripts
parentc36953af7ab0300ca5306b447a4466cbe3dd0106 (diff)
ok, should be fully working
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/buildinstall18
-rwxr-xr-xscripts/mk-images14
-rw-r--r--scripts/mk-images.i3867
-rwxr-xr-xscripts/upd-instroot6
4 files changed, 28 insertions, 17 deletions
diff --git a/scripts/buildinstall b/scripts/buildinstall
index 5a30e4131..69f8f5603 100755
--- a/scripts/buildinstall
+++ b/scripts/buildinstall
@@ -5,9 +5,9 @@ if [ ! -d $1/RedHat/RPMS ]; then
exit 1
fi
-p=$1
+p=`cd $1; /bin/pwd`
-BUILDINSTDIR=/tmp/buildinstall.tree.$$
+BUILDINSTDIR=$p/buildinstall.tree.$$
rm -rf $BUILDINSTDIR
mkdir -p $BUILDINSTDIR
@@ -22,19 +22,27 @@ if [ ! -f $UPD_INSTROOT ]; then
rpm2cpio $p/RedHat/RPMS/anaconda-runtime-[0-9]* | cpio --quiet -iumd usr/lib/anaconda-runtime/upd-instroot
mv usr/lib/anaconda-runtime/upd-instroot .
rm -rf usr
- UPD_INSTROOT=$BUILDINSTDIR/upd-instroot
+else
+ cp -a $UPD_INSTROOT $BUILDINSTDIR/upd-instroot
fi
+UPD_INSTROOT=$BUILDINSTDIR/upd-instroot
if [ ! -f $MK_IMAGES ]; then
cd $BUILDINSTDIR
rpm2cpio $p/RedHat/RPMS/anaconda-runtime-[0-9]* | cpio --quiet -iumd usr/lib/anaconda-runtime/mk-images*
mv usr/lib/anaconda-runtime/mk-images* .
rm -rf usr
- MK_IMAGES=$BUILDINSTDIR/mk-images
+else
+ cp $MK_IMAGES* $BUILDINSTDIR/
fi
+MK_IMAGES=$BUILDINSTDIR/mk-images
$UPD_INSTROOT $p/RedHat/RPMS $p/image-template $p/RedHat/instimage $BUILDARCH
-$MK_IMAGES $p/RedHat/RPMS $p $p/image-template $BUILDARCH
+if [ -x /usr/bin/runroot ]; then
+ runroot dist-7.0 --arch $BUILDARCH "cd $BUILDINSTDIR\; $MK_IMAGES $p/RedHat/RPMS $p $p/image-template $BUILDARCH"
+else
+ $MK_IMAGES $p/RedHat/RPMS $p $p/image-template $BUILDARCH
+fi
rm -rf $BUILDINSTDIR
rm -rf $p/image-template $p/RedHat/instimage/usr/lib/anaconda-runtime
diff --git a/scripts/mk-images b/scripts/mk-images
index 68a264e69..a797cbb8f 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -24,7 +24,6 @@ TOPDIR=$(cd $TOPDIR; pwd)
IMGPATH=$2/RedHat/instimage
KERNELROOT=/tmp/updboot.kernel.$$
MODDEPS=$KERNELROOT/moddeps
- ARCH=$(uname -m | sed 's/i.86/i386/')
BUILDARCH=$4
if [ ! -d "$1" ]; then
@@ -52,7 +51,6 @@ TOPDIR=$(cd $TOPDIR; pwd)
LOADERBINDIR=$IMGPATH/usr/lib/anaconda-runtime/loader
BOOTDISKDIR=$IMGPATH/usr/lib/anaconda-runtime/boot
LANGTABLE=$IMGPATH/usr/lib/anaconda/lang-table
- SYSLINUX=$IMGPATH/usr/bin/syslinux
PCITABLE=$IMGPATH/usr/share/kudzu/pcitable
CACHE=$KERNELROOT/lib/modules/.cache
MODULESUSED=$KERNELROOT/modules-used
@@ -62,10 +60,6 @@ TOPDIR=$(cd $TOPDIR; pwd)
REQUIREMENTS="$TRIMPCITABLE $PCITABLE $GETMODDEPS $MODINFO
$FILTERMODDEPS $LANGTABLE $KEYMAPS"
- if [ $BUILDARCH = i386 ]; then
- REQUIREMENTS="$REQUIREMENTS $SYSLINUX"
- fi
-
dieLater=
for n in $REQUIREMENTS; do
if [ ! -f $n ]; then
@@ -366,7 +360,7 @@ EOF
rm -f $MBD_FSIMAGE
dd if=/dev/zero of=$MBD_FSIMAGE bs=1k count=$INITRDSIZE 2> /dev/null
- echo y | mke2fs -i 8096 -q $MBD_FSIMAGE $INITRDSIZE > /dev/null 2>/dev/null
+ echo y | /sbin/mke2fs -i 8096 -q $MBD_FSIMAGE $INITRDSIZE > /dev/null 2>/dev/null
rm -rf $MBD_MNTPOINT
mkdir $MBD_MNTPOINT
@@ -471,7 +465,7 @@ makeImage () {
mkdir -p $MI_MNTPOINT
dd if=/dev/zero of=$MI_TMPIMAGE bs=1k count=$MI_SIZE 2>/dev/null
- echo y | mke2fs -i 4096 $MI_TMPIMAGE > /dev/null 2>/dev/null
+ echo y | /sbin/mke2fs -i 4096 $MI_TMPIMAGE > /dev/null 2>/dev/null
mount -o loop $MI_TMPIMAGE $MI_MNTPOINT
(cd $MI_FROM; find . | cpio --quiet -p $MI_MNTPOINT)
@@ -531,7 +525,7 @@ makemainimage () {
SIZE=$(du -sk $IMGPATH | awk '{print $1}')
dd if=/dev/zero of=$tmpimage bs=1k count=$SIZE 2>/dev/null
- echo y | mke2fs -m 0 -i 4096 $tmpimage > /dev/null 2>/dev/null
+ echo y | /sbin/mke2fs -m 0 -i 4096 $tmpimage > /dev/null 2>/dev/null
mount -o loop $tmpimage $mntpoint
(cd $IMGPATH; find . | cpio --quiet -p $mntpoint)
@@ -566,7 +560,7 @@ makedriverdisk () {
fi
dd if=/dev/zero of=/tmp/$diskname.img bs=1k count=$size 2> /dev/null
- echo y | mke2fs -i 4096 /tmp/$diskname.img > /dev/null 2>/dev/null
+ echo y | /sbin/mke2fs -i 4096 /tmp/$diskname.img > /dev/null 2>/dev/null
mkdir -p /tmp/mkdd.$$
mount -t ext2 -o loop /tmp/$diskname.img /tmp/mkdd.$$
rmdir /tmp/mkdd.$$/lost+found
diff --git a/scripts/mk-images.i386 b/scripts/mk-images.i386
index a6b9afff5..cb21f2a32 100644
--- a/scripts/mk-images.i386
+++ b/scripts/mk-images.i386
@@ -1,3 +1,10 @@
+SYSLINUX=$IMGPATH/usr/bin/syslinux
+
+if [ ! -f $SYSLINUX ]; then
+ echo "$n doesn't exist"
+ exit 1
+fi
+
SECSTAGE="vfat raid0 raid1 raid5"
prepareBootImage() {
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index 75d78fb29..063641d8d 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -424,7 +424,7 @@ fi
echo "Running mkfontdir..."
if [ -n "$NEEDGR" ]; then
for I in $DESTGR/usr/X11R6/lib/X11/fonts/* $DESTGR/usr/share/fonts/ISO8859-2/* $DESTGR/usr/share/fonts/ISO8859-9/*; do
- mkfontdir $I
+ /usr/X11R6/bin/mkfontdir $I
done
fi
@@ -465,7 +465,7 @@ for p in $DEST $DESTGR; do
if [ -x /usr/bin/runroot ]; then
REALPATH=`(cd $p; /bin/pwd)`
- runroot dist-7.0 --arch $ARCH "cd $REALPATH\; usr/lib/anaconda-runtime/scrubtree $REALPATH" > /dev/null
+ runroot dist-7.0 --arch $ARCH cd $REALPATH\; usr/lib/anaconda-runtime/scrubtree $REALPATH
else
$p/usr/lib/anaconda-runtime/scrubtree $p
fi
@@ -506,12 +506,14 @@ patch -p0 > /dev/null <<EOF
EOF
cd -
+echo -n -e "\Removing unused python files in $DEST... "
if [ -x /usr/bin/runroot ]; then
REALPATH=`(cd $DEST; /bin/pwd)`
runroot dist-7.0 --arch $ARCH "cd $REALPATH\; usr/lib/anaconda-runtime/pythondeps $REALPATH" > /dev/null
else
$DEST/usr/lib/anaconda-runtime/pythondeps $DEST
fi
+echo "done."
for p in $DEST $DESTGR; do
find $p -name "*.py" | while read fn; do