kadischi/livecd_generator install-boot.sh, 1.14, 1.15 kadischi.py, 1.55, 1.56 livecd-mkinitrd.sh, 1.31, 1.32
Jasper O'neal Hartline (autopsy)
fedora-extras-commits at redhat.com
Mon Apr 16 15:30:38 UTC 2007
- Previous message: kadischi/post_install_scripts 01prelink.sh, 1.7, 1.8 04userconfig.pl, 1.3, 1.4 07accounts.sh, 1.10, 1.11
- Next message: rpms/php-pecl-Fileinfo/FC-6 .cvsignore, 1.3, 1.4 php-pecl-Fileinfo.spec, 1.3, 1.4 sources, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: autopsy
Update of /cvs/devel/kadischi/livecd_generator
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1994/kadischi/livecd_generator
Modified Files:
install-boot.sh kadischi.py livecd-mkinitrd.sh
Log Message:
Fix Xen kernel installs, implement Zenity into several post_scripts
Index: install-boot.sh
===================================================================
RCS file: /cvs/devel/kadischi/livecd_generator/install-boot.sh,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- install-boot.sh 18 Sep 2006 05:45:26 -0000 1.14
+++ install-boot.sh 16 Apr 2007 15:30:36 -0000 1.15
@@ -3,6 +3,7 @@
sysdir=$1
csysdir=$2
kernel=$3
+kernel_is_xen=$(echo $kernel | /bin/grep -G [[:alnum:]]xen)
kernel_is_xen0=$(echo $kernel | /bin/grep -G [[:alnum:]]xen0)
kernel_is_xenU=$(echo $kernel | /bin/grep -G [[:alnum:]]xenU)
kernel_is_smp=$(echo $kernel | /bin/grep -G [[:alnum:]]smp)
@@ -215,5 +216,34 @@
kernel memtest
append -
_EOF_
-fi
+elif [ $kernel_is_xen ]; then
+ if [ -d $INSTALLDIR/bootsplash ]; then
+ /bin/cp $INSTALLDIR/bootsplash/{memtest,splash.lss,{xenboot,general,options,license,xen}.msg} $csysdir/boot/isolinux/
+ else
+ echo "Nothing found for bootsplashing."
+ nobootsplash
+ fi
+/bin/cp $sysdir/boot/initrd-$kernel $csysdir/boot/isolinux/initrd.img
+/bin/cp $sysdir/boot/vmlinuz-$kernel $csysdir/boot/isolinux/vmlinuz
+/bin/cat > $csysdir/boot/isolinux/isolinux.cfg <<_EOF_
+default linux
+prompt 1
+display xenboot.msg
+timeout 600
+F1 xenboot.msg
+F2 options.msg
+F3 general.msg
+F4 license.msg
+F5 xen.msg
+label linux
+ kernel vmlinuz
+ append initrd=initrd.img quiet $kernel_params
+label debug
+ kernel vmlinuz
+ append initrd=initrd.img INITRD_DBG=x $kernel_params
+label memtest86
+ kernel memtest
+ append -
+_EOF_
+ fi
fi
Index: kadischi.py
===================================================================
RCS file: /cvs/devel/kadischi/livecd_generator/kadischi.py,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- kadischi.py 28 Feb 2007 13:03:42 -0000 1.55
+++ kadischi.py 16 Apr 2007 15:30:36 -0000 1.56
@@ -23,7 +23,7 @@
else:
postscriptdir = "/usr/share/kadischi/post_install_scripts"
-version = "2.5"
+version = "3.4"
def main():
force = False
@@ -183,17 +183,17 @@
totalsize = stepsize
if (totalsize > 1600000000):
- estimate0 = (totalsize / 2.3) ## Observed ratio for SquashFS
- estimate1 = (totalsize / 2.5) ## Observed ratio for SquashFS
+ estimate0 = ((totalsize / 1024) / 1024) / 2.3 ## Observed ratio for SquashFS
+ estimate1 = ((totalsize / 1024) / 1024) / 2.5 ## Observed ratio for SquashFS
media = "(LiveDVD)"
dist = string.join([dist, media], " ")
else:
- estimate0 = (totalsize / 2.4) ## Observed ratio for SquashFS
- estimate1 = (totalsize / 2.6) ## Observed ratio for SquashFS
+ estimate0 = ((totalsize / 1024) / 1024) / 2.4 ## Observed ratio for SquashFS
+ estimate1 = ((totalsize / 1024) / 1024) / 2.6 ## Observed ratio for SquashFS
media = "(LiveCD)"
dist = string.join([dist, media], " ")
- print ("[kadischi]: estimated %s size is between %s and %s bytes" % (isoimage, estimate1, estimate0))
+ print ("[kadischi]: estimated %s size is between %s and %s MegaBytes" % (isoimage, estimate1, estimate0))
# make initrd image and pickup kernel version cause when we move files arround, it will be late
print ("[kadischi]: making initrd image")
@@ -226,6 +226,8 @@
args = [boot, sysdir, csysdir, kernel]
elif kernel != None and kernel_smp != None:
args = [boot, sysdir, csysdir, kernel]
+ elif kernel_xen != None:
+ args = [boot, sysdir, csysdir, kernel_xen]
else:
args = [boot, sysdir, csysdir, kernel_smp]
execute(args)
@@ -326,18 +328,18 @@
def parse_args():
""" process command line options for anaconda """
- usage = 'usage: %prog [options] <path-to-the-repository> <destination-iso-image-file>\n\npath-to-the-repository can be a path on the local file system (without any prefixes) but can also be a path to a http, ftp or some other type of repository. For details, consult the documentation at http://fedoraproject.org/wiki/Kadischi/Documentation'
+ usage = 'usage: %prog [options] <repository> <image>\n\nConsult the documentation at: http://fedoraproject.org/wiki/Kadischi/Documentation'
verstr = '%prog ' + version
parser = optparse.OptionParser(usage=usage, version=verstr)
- parser.add_option ("-f", "--force", dest="force", action="store_true", default=False, help="overwrite destination iso image file, if such exists.")
- parser.add_option ("-C", "--cmdline", dest="cmdline", action="store_true", default=False, help="run anaconda in command line mode (runs without interface, but requires complete kickstart file)")
- parser.add_option ("-T", "--text", dest="text", action="store_true", default=False, help="run anaconda in TUI mode")
- parser.add_option ("", "--graphical", dest="graphical", action="store_true", default=False, help="run anaconda in GUI mode")
- parser.add_option ("", "--kickstart", dest="ksfile", help="supply anaconda with kickstart file")
- parser.add_option ("-x", "--extra", dest="extra", help="extra args to pass to anaconda")
- parser.add_option ("", "--tempdir", dest="tempdir", help="temporary directory to use for building the image template")
- parser.add_option ("", "--scriptdir", dest="scriptdir", help="location of post-installation scripts (default: %s)" %(postscriptdir,))
- parser.add_option ("", "--buildstamp", dest="buildstamp", help="buildstamp file (if not set, using the default buildstamp from the config directory)")
+ parser.add_option ("-f", "--force", dest="force", action="store_true", default=False, help="Overwrite existing image file, if it exists")
+ parser.add_option ("-C", "--cmdline", dest="cmdline", action="store_true", default=False, help="run anaconda in shell user interface mode (requires complete kickstart file)")
+ parser.add_option ("-T", "--text", dest="text", action="store_true", default=False, help="run anaconda in text user interface mode")
+ parser.add_option ("", "--graphical", dest="graphical", action="store_true", default=False, help="run anaconda in graphical user interface mode")
+ parser.add_option ("", "--kickstart", dest="ksfile", help="The kickstart file for Anaconda")
+ parser.add_option ("-x", "--extra", dest="extra", help="Extra arguments to pass to Anaconda")
+ parser.add_option ("", "--tempdir", dest="tempdir", help="Temporary directory to use for building the image")
+ parser.add_option ("", "--scriptdir", dest="scriptdir", help="Location of post_install_scripts (default: %s)" %(postscriptdir,))
+ parser.add_option ("", "--buildstamp", dest="buildstamp", help="Buildstamp file to use(if not set, default will be used)")
return parser.parse_args()
@@ -412,14 +414,17 @@
def make_initrds(sysdir, bindir):
clear_rpm_db_files(sysdir)
ts = rpm.TransactionSet(sysdir)
- global kernel, kernel_smp
+ global kernel, kernel_smp, kernel_xen
kernel = None
kernel_smp = None
+ kernel_xen = None
if isys.smpAvailable() or isys.htavailable():
for mi in ts.dbMatch('name', 'kernel'):
kernel = "%s-%s" % (mi['version'], mi['release'])
for mi in ts.dbMatch('name', 'kernel-smp'):
kernel_smp = "%s-%s" % (mi['version'], mi['release']) + 'smp'
+ for mi in ts.dbMatch('name', 'kernel-xen'):
+ kernel_xen = "%s-%s" % (mi['version'], mi['release']) + 'xen'
if kernel != None and kernel_smp != None:
os.system("%s/livecd-mkinitrd.sh %s %s" % (bindir, sysdir, kernel))
@@ -428,6 +433,8 @@
os.system("%s/livecd-mkinitrd.sh %s %s" % (bindir, sysdir, kernel))
elif kernel == None and kernel_smp != None:
os.system("%s/livecd-mkinitrd.sh %s %s" % (bindir, sysdir, kernel_smp))
+ elif kernel_xen != None:
+ os.system("%s/livecd-mkinitrd.sh %s %s" % (bindir, sysdir, kernel_xen))
else:
print >> sys.stderr, "\n\nCouldn't determine kernel version!"
sys.exit(1)
@@ -436,6 +443,8 @@
kernel = "%s-%s" % (mi['version'], mi['release'])
for mi in ts.dbMatch('name', 'kernel-smp'):
kernel_smp = "%s-%s" % (mi['version'], mi['release']) + 'smp'
+ for mi in ts.dbMatch('name', 'kernel-xen'):
+ kernel_xen = "%s-%s" % (mi['version'], mi['release']) + 'xen'
if kernel != None and kernel_smp != None:
os.system("%s/livecd-mkinitrd.sh %s %s" % (bindir, sysdir, kernel))
@@ -444,6 +453,8 @@
os.system("%s/livecd-mkinitrd.sh %s %s" % (bindir, sysdir, kernel_smp))
elif kernel != None and kernel_smp == None:
os.system("%s/livecd-mkinitrd.sh %s %s" % (bindir, sysdir, kernel))
+ elif kernel_xen != None:
+ os.system("%s/livecd-mkinitrd.sh %s %s" % (bindir, sysdir, kernel_xen))
else:
print >> sys.stderr, "\n\nCouldn't determine kernel version!"
sys.exit(1)
@@ -476,11 +487,15 @@
if original[0:39] == copy[0:39]:
print >> sys.stdout, "[kadischi]: SHA1SUM MATCH, CD or DVD has been verified! Done!"
+ os.remove("/tmp/kadischi-live.iso.disc.sha1sum")
+ os.remove("/tmp/kadischi-live.iso.original.sha1sum")
args = ["/bin/rm", "-f", "/tmp/kadischi-live.iso"]
execute(args)
return 0
else:
print "[kadischi]: SHA1SUM DO NOT MATCH. CD OR DVD IS BAD!"
+ os.remove("/tmp/kadischi-live.iso.disc.sha1sum")
+ os.remove("/tmp/kadischi-live.iso.original.sha1sum")
args = ["/bin/rm", "-f", "/tmp/kadischi-live.iso"]
execute(args)
return 0
Index: livecd-mkinitrd.sh
===================================================================
RCS file: /cvs/devel/kadischi/livecd_generator/livecd-mkinitrd.sh,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- livecd-mkinitrd.sh 4 Apr 2007 14:16:00 -0000 1.31
+++ livecd-mkinitrd.sh 16 Apr 2007 15:30:36 -0000 1.32
@@ -75,7 +75,7 @@
getarch() {
if [ -x /bin/rpm ]; then
- arch=$(/bin/rpm --root $rootdir -q --queryformat "%{ARCH}\n" kernel) || arch=$(/bin/rpm --root $rootdir -q --queryformat "%{ARCH}\n" kernel-smp)
+ arch=$(/bin/rpm --root $rootdir -q --queryformat "%{ARCH}\n" kernel) || arch=$(/bin/rpm --root $rootdir -q --queryformat "%{ARCH}\n" kernel-smp) || arch=$(/bin/rpm --root $rootdir -q --queryformat "%{ARCH}\n" kernel-xen)
fi
}
- Previous message: kadischi/post_install_scripts 01prelink.sh, 1.7, 1.8 04userconfig.pl, 1.3, 1.4 07accounts.sh, 1.10, 1.11
- Next message: rpms/php-pecl-Fileinfo/FC-6 .cvsignore, 1.3, 1.4 php-pecl-Fileinfo.spec, 1.3, 1.4 sources, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list