Subject: | |
From: | |
Reply To: | |
Date: | Tue, 6 Sep 2005 16:08:34 -0500 |
Content-Type: | multipart/mixed |
Parts/Attachments: |
|
|
Maarten,
On Tue, 6 Sep 2005, Maarten Ballintijn wrote:
> Hello,
>
> I am trying to create a new boot.iso install cd with a custom
> kernel for the SL site I am creating. I have followed the instructions
> and put the kernel RPM in the sites/MySite/Updates directory.
> But it seems that mk-images (called by buildinstall, called by
Well actually the code that is changed for this is in upd-instroot.
> build.release.site.sh) only looks in the default RPM directory?
> When I ran "build.hdlist.site.sh" it seemed to do the right thing,
> i.e. use the right kernel rpms.
>
> (this is for SL 304 on x86_64)
>
> Is there a special step I am missing?
That seems right. I have attached a "test" buildinstall. Place it in
your sites/MySite/build/scripts directory. This is a new file, you will
not overwrite anything.
cd sites/MySite/build/scripts
script /tmp/mysitebuild
sh build.release.site.sh
exit
This will make a really big log file in /tmp/mysitebuild . In there look
for your kernel. If you want you can send me the file and I will look at
it for you.
-Connie Sieh
>
> Thanks,
>
> Maarten.
>
>
#!/bin/bash
usage() {
echo "Usage: buildinstall [--comp <component>] [--pkgorder <file>] [--version <version>] [--product <product>] [--release <comment>] --default <default> [--site <site>] <root>" >&2
exit 1
}
COMPNAME=dist-7.0
RUN=1
DEBUGSTR=""
while [ $# -gt 0 ]; do
case $1 in
--pkgorder)
PKGORDER=$2
PKGORDERSTR="--pkgorder $2 "
shift; shift
;;
--comp)
COMPNAME=$2
shift; shift
;;
--version)
VERSION=$2
shift; shift
;;
--release)
RELEASESTR=$2
shift; shift
;;
--product)
PRODUCTSTR=$2
shift; shift
;;
--default)
DEFAULTSTR=$2
shift; shift
;;
--site)
SITE=`basename $2`
SITEDIR=`dirname $2`
if [ -z $SITEDIR ]; then
SITEDIR="sites"
fi
shift; shift
;;
--debug)
DEBUGSTR="--debug"
shift
;;
--second)
RUN=2
shift
;;
--buildinstdir)
BUILDINSTDIR=$2
shift; shift
;;
--discs)
DISCSTR=$2
shift; shift
;;
*)
if [ -n "$DIR" -o ! -d $1/$DEFAULTSTR/RPMS ]; then
usage
fi
DIR=$1
shift
;;
esac
done
if [ -z "$PRODUCTSTR" ]; then
usage
fi
if [ -z "$VERSION" ]; then
usage
fi
if [ -z "$DIR" ]; then
usage
fi
if [ -z "$RELEASESTR" ]; then
usage
fi
if [ -z "$DISCSTR" ]; then
DISCSTR="1,2,3"
fi
if [ -z "$DEFAULTSTR" ]; then
usage
fi
MYPWD=`pwd`
p=`cd $DIR; /bin/pwd`
if [ -z "$BUILDINSTDIR" ]; then
BUILDINSTDIR=$p/buildinstall.tree.$$
rm -rf $BUILDINSTDIR
mkdir -p $BUILDINSTDIR
fi
TREEDIR=/tmp/treedir.$$
UPD_INSTROOT=$BUILDINSTDIR/upd-instroot
MK_IMAGES=$BUILDINSTDIR/mk-images
MK_STAMP=$BUILDINSTDIR/makestamp.py
BUILDINSTALL=$BUILDINSTDIR/buildinstall
BUILDARCH=`rpm -qp --qf "%{ARCH}" $p/$DEFAULTSTR/RPMS/anaconda-runtime-[0-9]*`
firstRun() {
echo "Running buildinstall..."
pushd $BUILDINSTDIR
if [ -z $SITE ]; then
if [ -f $p/$DEFAULTSTR/Updates/anaconda-runtime-[0-9]* ]; then
path=$DEFAULTSTR/Updates
else
if [ -f $p/$DEFAULTSTR/RPMS/anaconda-runtime-[0-9]* ]; then
path=$DEFAULTSTR/RPMS
fi
fi
else
if [ -f $p/$SITEDIR/$SITE/Updates/anaconda-runtime-[0-9]* ]; then
path=$SITEDIR/$SITE/Updates
else
if [ -f $p/$DEFAULTSTR/Updates/anaconda-runtime-[0-9]* ]; then
path=$DEFAULTSTR/Updates
else
if [ -f $p/$DEFAULTSTR/RPMS/anaconda-runtime-[0-9]* ]; then
path=$DEFAULTSTR/RPMS
fi
fi
fi
fi
rpm2cpio $p/$path/anaconda-runtime-[0-9]* | cpio --quiet -iumd './usr*'
popd
UPD_INSTROOT=./upd-instroot
MK_IMAGES=./mk-images
MK_STAMP=./makestamp.py
BUILDINSTALL=./buildinstall
for f in $UPD_INSTROOT $MK_IMAGES $MK_STAMP $BUILDINSTALL; do
if [ ! -f $f ]; then
cp -a $BUILDINSTDIR/usr/lib/anaconda-runtime/$f* $BUILDINSTDIR/
else
cp -a $f* $BUILDINSTDIR/
fi
done
UPD_INSTROOT=$BUILDINSTDIR/upd-instroot
MK_IMAGES=$BUILDINSTDIR/mk-images
MK_STAMP=$BUILDINSTDIR/makestamp.py
BUILDINSTALL=$BUILDINSTDIR/buildinstall
rm -rf $BUILDINSTDIR/usr
echo "Going to run buildinstall again"
# run it again for the second half
if [ -z $SITE ] ; then
$BUILDINSTALL --buildinstdir $BUILDINSTDIR --second $PKGORDERSTR --comp $COMPNAME --version $VERSION --release "$RELEASESTR" --product "$PRODUCTSTR" --discs "$DISCSTR" --default $DEFAULTSTR $DIR
else
$BUILDINSTALL --buildinstdir $BUILDINSTDIR --second $PKGORDERSTR --comp $COMPNAME --version $VERSION --release "$RELEASESTR" --product "$PRODUCTSTR" --discs "$DISCSTR" --default $DEFAULTSTR --site $SITEDIR/$SITE $DIR
fi
rm -rf $BUILDINSTDIR
}
secondRun() {
echo "Building images..."
if [ -z $SITE ]; then
$UPD_INSTROOT $DEBUGSTR --comp $COMPNAME $p/$DEFAULTSTR/RPMS $TREEDIR/image-template $TREEDIR/instimage
else
sh -x $UPD_INSTROOT $DEBUGSTR --comp $COMPNAME --site $SITEDIR/$SITE $p/$DEFAULTSTR/RPMS $TREEDIR/image-template $TREEDIR/instimage
fi
if [ -n "$PKGORDER" ]; then
echo "Getting package order..."
PYTHONPATH=$TREEDIR/instimage/usr/lib/anaconda $TREEDIR/instimage/usr/lib/anaconda-runtime/pkgorder $p $BUILDARCH $DEFAULTSTR > $PKGORDER
fi
echo "Making images..."
if [ -z $SITE ] ; then
$MK_IMAGES $DEBUGSTR $p/$DEFAULTSTR/RPMS $p $TREEDIR/image-template $TREEDIR/instimage $BUILDARCH "$PRODUCTSTR" $VERSION $DEFAULTSTR
else
$MK_IMAGES $DEBUGSTR $p/$DEFAULTSTR/RPMS $p $TREEDIR/image-template $TREEDIR/instimage $BUILDARCH "$PRODUCTSTR" $VERSION $DEFAULTSTR $SITEDIR/$SITE
fi
echo "Writing .discinfo file"
$MK_STAMP --releasestr="$RELEASESTR" --arch=$BUILDARCH --discNum="$DISCSTR" --baseDir=$DEFAULTSTR/base --packagesDir=$DEFAULTSTR/RPMS --pixmapsDir=$DEFAULTSTR/pixmaps --outfile=$p/.discinfo
rm -rf $TREEDIR/image-template $TREEDIR/instimage
} # end of secondRun()
if [ $RUN == 1 ]; then
firstRun
else
secondRun
fi
|
|
|