summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-01-13 07:01:40 +0000
committerJeremy Katz <katzj@redhat.com>2003-01-13 07:01:40 +0000
commitb83f8d6435295a0e56bb1b110c3d39e93fd332e3 (patch)
tree8b4cd9b2d8feeca7fa2f6e020917df2db301264a /scripts
parent2135bea9af88c4a57cb9b62a6395368e0b1d75be (diff)
productname and productversion are now defined by passing args to buildinstall
so that we don't have them hard coded in the package. they end up in /.buildstamp along with the timestamp for the image. add support for substituting @RHL@ and @RHLVER@ in the help with the product name or version to avoid having to change the help unless its needed
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/buildinstall14
-rwxr-xr-xscripts/mk-images28
-rwxr-xr-xscripts/upd-instroot2
3 files changed, 29 insertions, 15 deletions
diff --git a/scripts/buildinstall b/scripts/buildinstall
index 2206629ed..d7c1677a2 100755
--- a/scripts/buildinstall
+++ b/scripts/buildinstall
@@ -25,6 +25,10 @@ while [ $# -gt 0 ]; do
RELEASESTR=$2
shift; shift
;;
+ --product)
+ PRODUCTSTR=$2
+ shift; shift
+ ;;
*)
if [ -n "$DIR" -o ! -d $1/RedHat/RPMS ]; then
usage
@@ -35,8 +39,12 @@ while [ $# -gt 0 ]; do
esac
done
+if [ -z "$PRODUCTSTR" ]; then
+ usage
+fi
+
if [ -z "$VERSION" ]; then
- VERSION=7.1
+ usage
fi
if [ -z "$DIR" ]; then
@@ -98,9 +106,9 @@ if [ -n "$PKGORDER" -a -x $p/RedHat/instimage/usr/lib/anaconda-runtime/pkgorder
fi
if [ -x /usr/bin/runroot ]; then
- runroot $COMPNAME --onlyone --arch $BUILDARCH "cd $BUILDINSTDIR\; ./mk-images $p/RedHat/RPMS $p $p/image-template $BUILDARCH $VERSION"
+ runroot $COMPNAME --onlyone --arch $BUILDARCH "cd $BUILDINSTDIR\; ./mk-images $p/RedHat/RPMS $p $p/image-template $BUILDARCH '\"$PRODUCTSTR\"' $VERSION"
else
- $MK_IMAGES $p/RedHat/RPMS $p $p/image-template $BUILDARCH $VERSION
+ $MK_IMAGES $p/RedHat/RPMS $p $p/image-template $BUILDARCH "$PRODUCTSTR" $VERSION
fi
MK_STAMP=./makestamp.py
diff --git a/scripts/mk-images b/scripts/mk-images
index 15ff89adc..47e7672d8 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -4,13 +4,14 @@ PATH=$PATH:/sbin:/usr/sbin
IMAGEUUID=$(date +%Y%m%d%H%M)
usage () {
- echo "usage: mk-images <pkgsrc> <toplevel> <template> <buildarch> <version>"
+ echo "usage: mk-images <pkgsrc> <toplevel> <template> <buildarch> <productname> <version>"
exit 0
}
-if [ -z "$1" -o -z "$2" -o -z "$3" -o -z "$4" ]; then usage; fi
+if [ -z "$1" -o -z "$2" -o -z "$3" -o -z "$4" -o -z "$5" -o -z "$6" ]; then usage; fi
-VERSION=$5
+PRODUCT=$5
+VERSION=$6
TOPDIR=$(echo $0 | sed "s,/[^/]*$,,")
if [ $TOPDIR = $0 ]; then
@@ -319,6 +320,15 @@ makemainmodules() {
rm -rf $FULLMODPATH
}
+makeproductfile() {
+ root=$1
+
+ rm -f $root/.buildstamp
+ echo $IMAGEUUID > $root/.buildstamp
+ echo $PRODUCT >> $root/.buildstamp
+ echo $VERSION >> $root/.buildstamp
+}
+
makeinitrd() {
EXTRAINITRDPATH=""
PCMCIA=""
@@ -424,8 +434,7 @@ EOF
install -m 644 $IMGPATH/usr/share/terminfo/x/xterm $MBD_DIR/etc/terminfo/x/xterm
install -m 644 $IMGPATH/usr/share/terminfo/x/xterm-color $MBD_DIR/etc/terminfo/x/xterm-color
install -m 644 $IMGPATH/usr/share/terminfo/v/vt100 $MBD_DIR/etc/terminfo/v/vt100
- rm -f $MBD_DIR/.buildstamp
- echo $IMAGEUUID > $MBD_DIR/.buildstamp
+ makeproductfile $MBD_DIR
mkdir -p $MBD_DIR/etc/terminfo/b
install -m 644 $IMGPATH/usr/share/terminfo/b/bterm $MBD_DIR/etc/terminfo/b/bterm
@@ -655,8 +664,7 @@ makeinstimage () {
cp -f $KERNELROOT/lib/modules/*/kernel/drivers/s390/*/* $KERNELROOT/lib/modules/misc
fi
makemoduleball $tmpdir/modules "$modlist"
- rm -f $tmpdir/.buildstamp
- echo $IMAGEUUID > $tmpdir/.buildstamp
+ makeproductfile $tmpdir
mkcramfs $tmpdir $INSTIMGPATH/${imagename}2.img
size=$(ls -l $INSTIMGPATH/${imagename}2.img | awk '{print $5}')
@@ -698,13 +706,11 @@ makemainimage () {
(cd $IMGPATH; find . | fgrep -v "./usr/lib/anaconda-runtime" |
cpio -H crc -o) | (cd $mmi_mntpoint; cpio -iumd)
- rm -f $mmi_mntpoint/.buildstamp
- echo $IMAGEUUID > $mmi_mntpoint/.buildstamp
+ makeproductfile $mmi_mntpoint
umount $mmi_mntpoint
rmdir $mmi_mntpoint
elif [ $type = "cramfs" ]; then
- rm -f $IMGPATH/.buildstamp
- echo $IMAGEUUID > $IMGPATH/.buildstamp
+ makeproductfile $IMGPATH
mkcramfs $IMGPATH $mmi_tmpimage
SIZE=$(expr `cat $mmi_tmpimage | wc -c` / 1024)
fi
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index 721150d69..905c1ee60 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -1004,7 +1004,7 @@ done
# do some stripping of debugging symbols
if [ -x /usr/bin/runroot -a -n "$COMPONENT" ]; then
REALPATH=`(cd $DEST; /bin/pwd | sed 's,/md1/,/,g')`
- runroot $COMPONENT --onlyone --arch $ARCH "cd $REALPATH\; find $DESTGR -type f -name '*.so' |xargs strip -g"
+ runroot $COMPONENT --onlyone --arch $ARCH "cd $REALPATH\; find $DESTGR -type f -name '*.so' -exec strip -g {} \;"
else
find $DESTGR -type f -name '*.so' |xargs strip -g
fi