summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--constants.py1
-rwxr-xr-xgui.py2
-rw-r--r--product.py28
-rw-r--r--product.py.in13
-rwxr-xr-xscripts/buildinstall14
-rwxr-xr-xscripts/mk-images28
-rwxr-xr-xscripts/upd-instroot2
-rw-r--r--text.py3
9 files changed, 64 insertions, 32 deletions
diff --git a/Makefile b/Makefile
index 2a9755281..740067f4c 100644
--- a/Makefile
+++ b/Makefile
@@ -13,10 +13,7 @@ CATALOGS = po/anaconda.pot
PYFILES = $(wildcard *.py)
-all: subdirs mini-wm _xkb.so xmouse.so xutils.so $(CATALOGS) lang-table lang-names product.py locale-list
-
-product.py: product.py.in Makefile.inc
- sed -e 's/@@PRODUCTNAME@@/$(PRODUCTNAME)/g' < product.py.in > product.py
+all: subdirs mini-wm _xkb.so xmouse.so xutils.so $(CATALOGS) lang-table lang-names locale-list
lang-names: lang-table
PYTHONPATH="." $(PYTHON) scripts/getlangnames.py > lang-names
diff --git a/constants.py b/constants.py
index 8e5642610..8365de134 100644
--- a/constants.py
+++ b/constants.py
@@ -60,6 +60,7 @@ FIRSTBOOT_RECONFIG = 2
# common string needs to be easy to change
import product
productName = product.productName
+productVersion = product.productVersion
exceptionText = N_("An unhandled exception has occurred. This "
"is most likely a bug. Please copy the "
diff --git a/gui.py b/gui.py
index a7e50d41e..737fb3fb5 100755
--- a/gui.py
+++ b/gui.py
@@ -1427,6 +1427,8 @@ class InstallControlState:
break
if text:
+ text = text.replace("@RHL@", productName)
+ text = text.replace("@RHLVER@", productVersion)
return text
print "Unable to read %s help text" % (file,)
diff --git a/product.py b/product.py
new file mode 100644
index 000000000..9287d03c7
--- /dev/null
+++ b/product.py
@@ -0,0 +1,28 @@
+#
+# product.py: product identification string
+#
+# Copyright 2003 Red Hat, Inc.
+#
+# This software may be freely redistributed under the terms of the GNU
+# library public license.
+#
+# You should have received a copy of the GNU Library Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+import os
+
+if not os.access("/.buildstamp", os.R_OK):
+ productName = "anaconda"
+ productVersion = "blueskyb"
+else:
+ f = open("/.buildstamp", "r")
+ lines = f.readlines()
+ if len(lines) < 3:
+ productName = "anaconda"
+ productVersion = "bluesky"
+ else:
+ productName = lines[1][:-1]
+ productVersion = lines[2][:-1]
+
+
diff --git a/product.py.in b/product.py.in
deleted file mode 100644
index 7d6a38c21..000000000
--- a/product.py.in
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# product.py: product identification string
-#
-# Copyright 2002 Red Hat, Inc.
-#
-# This software may be freely redistributed under the terms of the GNU
-# library public license.
-#
-# You should have received a copy of the GNU Library Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-productName = @@PRODUCTNAME@@
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
diff --git a/text.py b/text.py
index a8943f8d7..bc2012247 100644
--- a/text.py
+++ b/text.py
@@ -195,6 +195,9 @@ class InstallInterface:
return None
l = f.readlines()
+ for l in lines:
+ l = l.replace("@RHL@", productName)
+ l = l.replace("@RHLVER@", productVersion)
while not string.strip(l[0]):
l = l[1:]
title = string.strip(l[0])