This patch makes the livecd filesystem layout match the layout that
currently gets put on liveusb via livecd-iso-to-disk. Namely,
/squashfs.img or /ext3fs.img
and /osmin.gz
get put under /LiveOS/
-dmc
diff -Naur livecd.1.remove_sysroot_from_iso/creator/isotostick.sh livecd.2.squashfs.img_to_LiveOS/creator/isotostick.sh
--- livecd.1.remove_sysroot_from_iso/creator/isotostick.sh 2007-09-21 04:28:52.000000000 +0000
+++ livecd.2.squashfs.img_to_LiveOS/creator/isotostick.sh 2007-09-21 07:08:32.000000000 +0000
@@ -203,12 +203,19 @@
echo "Copying live image to USB stick"
if [ ! -d $USBMNT/$SYSLINUXPATH ]; then mkdir $USBMNT/$SYSLINUXPATH ; fi
if [ ! -d $USBMNT/LiveOS ]; then mkdir $USBMNT/LiveOS ; fi
-if [ -f $CDMNT/squashfs.img ]; then
+# cases without /LiveOS are legacy detection, remove for F10
+if [ -f $CDMNT/LiveOS/squashfs.img ]; then
+ cp $CDMNT/LiveOS/squashfs.img $USBMNT/LiveOS/squashfs.img || exitclean
+elif [ -f $CDMNT/squashfs.img ]; then
cp $CDMNT/squashfs.img $USBMNT/LiveOS/squashfs.img || exitclean
+elif [ -f $CDMNT/LiveOS/ext3fs.img ]; then
+ cp $CDMNT/LiveOS/ext3fs.img $USBMNT/LiveOS/ext3fs.img || exitclean
elif [ -f $CDMNT/ext3fs.img ]; then
cp $CDMNT/ext3fs.img $USBMNT/LiveOS/ext3fs.img || exitclean
fi
-if [ -f $CDMNT/osmin.gz ]; then
+if [ -f $CDMNT/LiveOS/osmin.gz ]; then
+ cp $CDMNT/LiveOS/osmin.gz $USBMNT/LiveOS/osmin.gz || exitclean
+elif [ -f $CDMNT/osmin.gz ]; then
cp $CDMNT/osmin.gz $USBMNT/LiveOS/osmin.gz || exitclean
fi
diff -Naur livecd.1.remove_sysroot_from_iso/creator/livecd-creator livecd.2.squashfs.img_to_LiveOS/creator/livecd-creator
--- livecd.1.remove_sysroot_from_iso/creator/livecd-creator 2007-09-21 08:49:38.000000000 +0000
+++ livecd.2.squashfs.img_to_LiveOS/creator/livecd-creator 2007-09-21 10:16:27.000000000 +0000
@@ -381,9 +381,15 @@
isoloop = LoopbackMount(base_on, "%s/base_on_iso" %(self.build_dir,))
- squashloop = LoopbackMount("%s/squashfs.img" %(isoloop.mountdir,),
- "%s/base_on_squashfs" %(self.build_dir,),
- "squashfs")
+ # legacy LiveOS filesystem layout support, remove for F9 or F10
+ if os.path.exists("%s/LiveOS/squashfs.img" %(isoloop.mountdir,)):
+ squashloop = LoopbackMount("%s/LiveOS/squashfs.img" %(isoloop.mountdir,),
+ "%s/base_on_squashfs" %(self.build_dir,),
+ "squashfs")
+ else:
+ squashloop = LoopbackMount("%s/squashfs.img" %(isoloop.mountdir,),
+ "%s/base_on_squashfs" %(self.build_dir,),
+ "squashfs")
try:
try:
@@ -429,6 +435,7 @@
raise InstallationError("Failed create build directory in %s: %s" % (self.tmpdir, msg))
os.makedirs(self.build_dir + "/out")
+ os.makedirs(self.build_dir + "/out/LiveOS")
os.makedirs(self.build_dir + "/data")
os.makedirs(self.build_dir + "/install_root")
os.makedirs(self.build_dir + "/yum-cache")
@@ -923,7 +930,7 @@
raise InstallationError("mksquashfs exited with error (%d)" %(ret,))
else:
shutil.move("%s/data/os.img" %(self.build_dir,),
- "%s/out/ext3fs.img" %(self.build_dir,))
+ "%s/out/LiveOS/ext3fs.img" %(self.build_dir,))
def _getBlockCountOfExt2FS(self, filesystem):
def parseField(output, field):
@@ -1000,7 +1007,7 @@
#
def genMinInstDelta(self):
# create the sparse file for the minimized overlay
- fd = os.open("%s/out/osmin" %(self.build_dir,),
+ fd = os.open("%s/out/LiveOS/osmin" %(self.build_dir,),
os.O_WRONLY | os.O_CREAT)
off = long(64L * 1024L * 1024L)
os.lseek(fd, off, 0)
@@ -1008,11 +1015,13 @@
os.close(fd)
# associate os image with loop device
- osloop = LoopbackMount("%s/data/os.img" %(self.build_dir,), "None")
+ osloop = LoopbackMount("%s/data/os.img" %(self.build_dir,), \
+ "None")
osloop.loopsetup()
# associate overlay with loop device
- minloop = LoopbackMount("%s/out/osmin" %(self.build_dir,), "None")
+ minloop = LoopbackMount("%s/out/LiveOS/osmin" %(self.build_dir,), \
+ "None")
minloop.loopsetup()
# create a snapshot device
@@ -1057,14 +1066,14 @@
minloop.lounsetup()
# truncate the unused excess portion of the sparse file
- fd = os.open("%s/out/osmin" %(self.build_dir,), os.O_WRONLY )
+ fd = os.open("%s/out/LiveOS/osmin" %(self.build_dir,), os.O_WRONLY )
os.ftruncate(fd, minInstDeltaDataLength * 512)
os.close(fd)
# the delta data is *extremely* compressible (e.g. 1.2M->7kb)
rc = subprocess.call(["/usr/bin/gzip", "osmin"],
- cwd="%s/out" %(self.build_dir,),
- env={"PWD": "%s/out" %(self.build_dir,)})
+ cwd="%s/out/LiveOS" %(self.build_dir,),
+ env={"PWD": "%s/out/LiveOS" %(self.build_dir,)})
if rc != 0:
raise InstallationError("Could not compress genMinInstDelta data")
diff -Naur livecd.1.remove_sysroot_from_iso/creator/mayflower livecd.2.squashfs.img_to_LiveOS/creator/mayflower
--- livecd.1.remove_sysroot_from_iso/creator/mayflower 2007-09-21 04:28:52.000000000 +0000
+++ livecd.2.squashfs.img_to_LiveOS/creator/mayflower 2007-09-21 08:41:32.000000000 +0000
@@ -643,8 +643,6 @@
# we might have a genMinInstDelta delta file for anaconda to take advantage of
if [ -e /sysroot/LiveOS/osmin.gz ]; then
OSMINGZ=/sysroot/LiveOS/osmin.gz
-elif [ -e /sysroot/osmin.gz ]; then
- OSMINGZ=/sysroot/osmin.gz
fi
if [ -n "\$OSMINGZ" ]; then
@@ -658,8 +656,6 @@
#
if [ -e /sysroot/LiveOS/ext3fs.img ]; then
EXT3FS="/sysroot/LiveOS/ext3fs.img"
-elif [ -e /sysroot/ext3fs.img ] ; then
- EXT3FS="/sysroot/ext3fs.img"
fi
if [ -n "\$EXT3FS" ] ; then
@@ -682,11 +678,9 @@
#
if [ -e /sysroot/LiveOS/squashfs.img ]; then
SQUASHED="/sysroot/LiveOS/squashfs.img"
-elif [ -e /sysroot/squashfs.img ]; then
- SQUASHED="/sysroot/squashfs.img"
fi
-if [ -n "\$SQUASHED" ] ; then
+if [ -e "\$SQUASHED" ] ; then
if [ "\$quiet" != "1" ] ; then
echo "setting up embedded squash -> ext3 fs "
--
Fedora-livecd-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/fedora-livecd-list