HACKING                     |    4 +-
 Makefile                    |    2 -
 docs/livecd-creator.pod     |   19 +++++++---
 imgcreate/creator.py        |   13 ++++---
 imgcreate/fs.py             |    3 +
 imgcreate/live.py           |   10 +++--
 imgcreate/yuminst.py        |   17 ++++++++-
 tools/livecd-creator        |   23 +++++++-----
 tools/livecd-iso-to-disk.sh |   79 +++++++++++++++++++++++++++++++++-----------
 9 files changed, 121 insertions(+), 49 deletions(-)

New commits:
commit 12f55f70398e0baef6329293bf81598fab62020a
Author: Brian C. Lane <[email protected]>
Date:   Wed Feb 23 13:22:20 2011 -0800

    Version 13.2

diff --git a/Makefile b/Makefile
index d667622..34349d5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 
-VERSION = 13.1
+VERSION = 13.2
 
 INSTALL = /usr/bin/install -c
 INSTALL_PROGRAM = ${INSTALL}


commit 774cde666a178aab462226834d56bfbd39ccbf6c
Author: Brian C. Lane <[email protected]>
Date:   Thu Feb 17 12:10:26 2011 -0800

    Print reason for sudden exit

diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 1077455..a2e7d34 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -492,15 +492,23 @@ ISO=$(readlink -f "$1")
 USBDEV=$(readlink -f "$2")
 
 if [ -z "$ISO" ]; then
+    echo "Missing source"
     usage
 fi
 
 if [ ! -b "$ISO" -a ! -f "$ISO" ]; then
+    echo "$ISO is not a file or block device"
     usage
 fi
 
 # FIXME: If --format is given, we shouldn't care and just use /dev/foo1
-if [ -z "$USBDEV" -o ! -b "$USBDEV" ]; then
+if [ -z "$USBDEV" ]; then
+    echo "Missing target device"
+    usage
+fi
+
+if [ ! -b "$USBDEV" ]; then
+    echo "$USBDEV is not a block device"
     usage
 fi
 


commit 7e03867c424b51b3ec329404d3ad45cd1443912c
Author: Bruce Jerrick <[email protected]>
Date:   Thu Feb 17 11:00:44 2011 -0800

    Fix skipcopy usage with DVD iso (#644194)
    
    Fix size estimation with skipcopy
    Copy install.img when using skipcopy with a DVD iso

diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 6dc27ce..1077455 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -639,7 +639,11 @@ fi
 
 # Verify available space for DVD installer
 if [ "$isotype" = "installer" ]; then
-    isosize=$(du -s -B 1M $ISO | awk {'print $1;'})
+    if [ -z "$skipcopy" ]; then
+        isosize=$(du -s -B 1M $ISO | awk {'print $1;'})
+    else
+        isosize=0
+    fi
     if [ "$imgtype" = "install" ]; then
         imgpath=images/install.img
     else
@@ -708,13 +712,13 @@ if [ "$isotype" = "live" -a -z "$skipcopy" ]; then
 fi
 
 # DVD installer copy
-if [ \( "$isotype" = "installer" -o "$isotype" = "netinst" \) -a -z 
"$skipcopy" ]; then
+if [ \( "$isotype" = "installer" -o "$isotype" = "netinst" \) ]; then
     echo "Copying DVD image to USB stick"
     mkdir -p $USBMNT/images/
     if [ "$imgtype" = "install" ]; then
         copyFile $CDMNT/images/install.img $USBMNT/images/install.img || 
exitclean
     fi
-    if [ "$isotype" = "installer" ]; then
+    if [ "$isotype" = "installer" -a -z "$skipcopy" ]; then
         cp $ISO $USBMNT/
     fi
     sync


commit a5aaa61291085c1c01d6bc44821e6b39fbefe69e
Author: Brian C. Lane <[email protected]>
Date:   Thu Feb 17 08:38:36 2011 -0800

    Move selinux relabel to after %post (#648591)

diff --git a/imgcreate/creator.py b/imgcreate/creator.py
index 9e87854..b7436e6 100644
--- a/imgcreate/creator.py
+++ b/imgcreate/creator.py
@@ -732,7 +732,6 @@ class ImageCreator(object):
         kickstart.KeyboardConfig(self._instroot).apply(ksh.keyboard)
         kickstart.TimezoneConfig(self._instroot).apply(ksh.timezone)
         kickstart.AuthConfig(self._instroot).apply(ksh.authconfig)
-        kickstart.SelinuxConfig(self._instroot).apply(ksh.selinux)
         kickstart.FirewallConfig(self._instroot).apply(ksh.firewall)
         kickstart.RootPasswordConfig(self._instroot).apply(ksh.rootpw)
         kickstart.ServicesConfig(self._instroot).apply(ksh.services)
@@ -743,6 +742,7 @@ class ImageCreator(object):
         self._create_bootconfig()
 
         self.__run_post_scripts()
+        kickstart.SelinuxConfig(self._instroot).apply(ksh.selinux)
 
     def launch_shell(self):
         """Launch a shell in the install root.


commit 3ddd4bae2f7e6ade603d23c7ad1a0aea898384fd
Author: Brian C. Lane <[email protected]>
Date:   Wed Feb 16 09:41:43 2011 -0800

    Add support for virtio disks to livecd (#672936)
    
    VirtIO disks need their own drivers.

diff --git a/imgcreate/live.py b/imgcreate/live.py
index d6e28da..0905dcc 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -70,7 +70,9 @@ class LiveImageCreatorBase(LoopImageCreator):
 
         self.__isodir = None
 
-        self.__modules = ["=ata", "sym53c8xx", "aic7xxx", "=usb", "=firewire", 
"=mmc", "=pcmcia", "mptsas", "udf"]
+        self.__modules = ["=ata", "sym53c8xx", "aic7xxx", "=usb", "=firewire",
+                          "=mmc", "=pcmcia", "mptsas", "udf", "virtio_blk",
+                          "virtio_pci"]
         self.__modules.extend(kickstart.get_modules(self.ks))
 
         self._isofstype = "iso9660"


commit 9e275f416a3ebad81dfc8f5885bd365673c1c7d5
Author: Brian C. Lane <[email protected]>
Date:   Tue Feb 15 16:37:47 2011 -0800

    Check return value on udevadm (#637258)
    
    Make sure we don't proceed with an empty $device

diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 2448cbc..6dc27ce 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -52,6 +52,10 @@ getdisk() {
     fi
 
     p=$(udevadm info -q path -n $DEV)
+    if [ $? -gt 0 ]; then
+        echo "Error getting udev path to $DEV"
+        exitclean
+    fi
     if [ -e /sys/$p/device ]; then
        device=$(basename /sys/$p)
     else


commit 1a43ab7d602a5335ef9f05d934202a2589ea745f
Author: Brian C. Lane <[email protected]>
Date:   Tue Feb 15 11:51:48 2011 -0800

    Source may be a file or a block device, mount accordingly
    
    When the source is a block device don't mount it loopback.

diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 1879e83..2448cbc 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -561,7 +561,14 @@ fi
 
 # FIXME: would be better if we had better mountpoints
 CDMNT=$(mktemp -d /media/cdtmp.XXXXXX)
-mount -o loop,ro "$ISO" $CDMNT || exitclean
+if [ -b $ISO ]; then
+    mount -o ro "$ISO" $CDMNT || exitclean
+elif [ -f $ISO ]; then
+    mount -o loop,ro "$ISO" $CDMNT || exitclean
+else
+    echo "$ISO is not a file or block device."
+    exitclean
+fi
 USBMNT=$(mktemp -d /media/usbdev.XXXXXX)
 mount $mountopts $USBDEV $USBMNT || exitclean
 


commit db7ae57dfd6493ba80c16ef468c2ec8fb0bf6d88
Author: Brian C. Lane <[email protected]>
Date:   Fri Feb 4 17:45:00 2011 -0800

    Align start of partition at 1MiB (#668967)

diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 853c063..1879e83 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -172,7 +172,7 @@ createGPTLayout() {
     /sbin/parted --script $device mklabel gpt
     partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep 
^$device:)
     size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
-    /sbin/parted --script $device unit b mkpart '"EFI System Partition"' fat32 
17408 $(($size - 17408)) set 1 boot on
+    /sbin/parted --script $device unit b mkpart '"EFI System Partition"' fat32 
1048576 $(($size - 1048576)) set 1 boot on
     # Sometimes automount can be _really_ annoying.
     echo "Waiting for devices to settle..."
     /sbin/udevadm settle
@@ -195,7 +195,7 @@ createMSDOSLayout() {
     /sbin/parted --script $device mklabel msdos
     partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep 
^$device:)
     size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
-    /sbin/parted --script $device unit b mkpart primary fat32 17408 $(($size - 
17408)) set 1 boot on
+    /sbin/parted --script $device unit b mkpart primary fat32 1048576 $(($size 
- 1048576)) set 1 boot on
     # Sometimes automount can be _really_ annoying.
     echo "Waiting for devices to settle..."
     /sbin/udevadm settle
@@ -222,7 +222,7 @@ createEXTFSLayout() {
     /sbin/parted --script $device mklabel msdos
     partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep 
^$device:)
     size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
-    /sbin/parted --script $device unit b mkpart primary ext2 17408 $(($size - 
17408)) set 1 boot on
+    /sbin/parted --script $device unit b mkpart primary ext2 1048576 $(($size 
- 1048576)) set 1 boot on
     # Sometimes automount can be _really_ annoying.
     echo "Waiting for devices to settle..."
     /sbin/udevadm settle


commit 71197a31b6415138b48abb668b9ea5b40c0dbea0
Author: Brian C. Lane <[email protected]>
Date:   Wed Jan 26 15:50:48 2011 -0800

    Check for one big initrd.img (#671900)
    
    rawhide now uses one big initrd.img instead of splitting it into
    initrd.img and install.img
    
    This checks for the existance of only initrd.img and skips trying to
    copy the install.img

diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index b730b52..853c063 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -341,14 +341,18 @@ detectisotype() {
         isotype=live
         return
     fi
-    if [ -e $CDMNT/images/install.img ]; then
+    if [ -e $CDMNT/images/install.img -o $CDMNT/isolinux/initrd.img ]; then
+        imgtype=install
         if [ -e $CDMNT/Packages ]; then
             isotype=installer
-            return
-        else 
+        else
             isotype=netinst
-            return
-       fi
+        fi
+        if [ ! -e $CDMNT/images/install.img ]; then
+            echo "$ISO uses initrd.img w/o install.img"
+            imgtype=initrd
+        fi
+        return
     fi
     echo "ERROR: $ISO does not appear to be a Live image or DVD installer."
     exitclean
@@ -390,6 +394,7 @@ homesizemb=0
 swapsizemb=0
 overlaysizemb=0
 isotype=
+imgtype=
 LIVEOS=LiveOS
 
 HOMEFILE="home.img"
@@ -624,16 +629,22 @@ fi
 # Verify available space for DVD installer
 if [ "$isotype" = "installer" ]; then
     isosize=$(du -s -B 1M $ISO | awk {'print $1;'})
-    installimgsize=$(du -s -B 1M $CDMNT/images/install.img | awk {'print $1;'})
+    if [ "$imgtype" = "install" ]; then
+        imgpath=images/install.img
+    else
+        imgpath=isolinux/initrd.img
+    fi
+    installimgsize=$(du -s -B 1M $CDMNT/$imgpath | awk {'print $1;'})
+
     tbd=0
-    if [ -e $USBMNT/images/install.img ]; then
-        tbd=$(du -s -B 1M $USBMNT/images/install.img | awk {'print $1;'})
+    if [ -e $USBMNT/$imgpath ]; then
+        tbd=$(du -s -B 1M $USBMNT/$imgpath | awk {'print $1;'})
     fi
     if [ -e $USBMNT/$(basename $ISO) ]; then
         tbd=$(($tbd + $(du -s -B 1M $USBMNT/$(basename $ISO) | awk {'print 
$1;'})))
     fi
     echo "Size of DVD image: $isosize"
-    echo "Size of install.img: $installimgsize"
+    echo "Size of $imgpath: $installimgsize"
     echo "Available space: $(($free + $tbd))"
     if [ $(($isosize + $installimgsize)) -gt $(($free + $tbd)) ]; then
         echo "ERROR: Unable to fit DVD image + install.img on available space 
on USB stick"
@@ -689,7 +700,9 @@ fi
 if [ \( "$isotype" = "installer" -o "$isotype" = "netinst" \) -a -z 
"$skipcopy" ]; then
     echo "Copying DVD image to USB stick"
     mkdir -p $USBMNT/images/
-    copyFile $CDMNT/images/install.img $USBMNT/images/install.img || exitclean
+    if [ "$imgtype" = "install" ]; then
+        copyFile $CDMNT/images/install.img $USBMNT/images/install.img || 
exitclean
+    fi
     if [ "$isotype" = "installer" ]; then
         cp $ISO $USBMNT/
     fi
@@ -725,7 +738,12 @@ fi
 
 # DVD Installer for netinst
 if [ "$isotype" = "netinst" ]; then
-    sed -i -e "s;stage2=\S*;stage2=hd:$USBLABEL:/images/install.img;g" 
$BOOTCONFIG $BOOTCONFIG_EFI
+    if [ "$imgtype" = "install" ]; then
+        sed -i -e "s;stage2=\S*;stage2=hd:$USBLABEL:/images/install.img;g" 
$BOOTCONFIG $BOOTCONFIG_EFI
+    else
+        # The initrd has everything, so no stage2
+        sed -i -e "s;stage2=\S*;;g" $BOOTCONFIG $BOOTCONFIG_EFI
+    fi
 fi
 
 # Adjust the boot timeouts


commit 79239b788f775d064352c973877e9f50de148d4f
Author: Bruno Wolff III <[email protected]>
Date:   Sat Jan 15 23:14:52 2011 -0600

    Update documentation for xz availability.

diff --git a/docs/livecd-creator.pod b/docs/livecd-creator.pod
index dd70fb9..63ea88b 100644
--- a/docs/livecd-creator.pod
+++ b/docs/livecd-creator.pod
@@ -42,10 +42,11 @@ Defines the file system label. The default is based on the 
configuration name.
 
 =item --compression-type=COMPRESSOR
 
-Specify a compressor recognized by mksquashfs. The default is gzip. lzma
-currently requires a custom kernel to produce a functional image. lzo works 
with 2.6.36+ kernels, but will generally take up more space than using gzip. If 
gzip
-is used, the -comp option is not passed to mksquashfs to allow the use of
-older versions of mksquashfs.
+Specify a compressor recognized by mksquashfs.
+gzip is the default and should work with all kernels.
+lzo works with 2.6.36 and later kernels.
+xz works with 2.6.38 and later kernels. lzma will only work with custom 
kernels.
+If gzip is used, the -comp option is not passed to mksquashfs to allow the use 
of older versions of mksquashfs.
 
 =item --releasever=VER
 
diff --git a/tools/livecd-creator b/tools/livecd-creator
index 94da3ac..6841c94 100755
--- a/tools/livecd-creator
+++ b/tools/livecd-creator
@@ -43,7 +43,7 @@ def parse_options(args):
     imgopt.add_option("-f", "--fslabel", type="string", dest="fslabel",
                       help="File system label (default based on config name)")
     imgopt.add_option("", "--compression-type", type="string", 
dest="compress_type",
-                      help="Compression type recognized by mksquashfs (default 
gzip, lzma needs custom kernel, lzo needs a 2.6.36+ kernel)",
+                      help="Compression type recognized by mksquashfs (default 
gzip, xz needs a 2.6.38+ kernel, lzo needs a 2.6.36+ kernel, lzma needs custom 
kernel)",
                       default="gzip")
     imgopt.add_option("", "--releasever", type="string", dest="releasever",
                       default=None,


commit e51a6d5cd6884ad547230d051cc2303e203fd606
Author: Brian C. Lane <[email protected]>
Date:   Wed Jan 5 10:18:47 2011 -0800

    Change releasever to a command line option (#667474)
    
    The release version of the running system may not be the release you
    want to build the livecd for, or the rpmdb may not be accessable from
    the build environment (koji and chroot) so set the value to use for
    $releasever in kickstart repo url's by passing --releasever=VER
    
    If $releasever is used and no --releasever is passed it will try to
    use the system's version. Under some circumstances (chroot environments
    like koji) this isn't possible so an error will be raised.

diff --git a/docs/livecd-creator.pod b/docs/livecd-creator.pod
index 553f865..dd70fb9 100644
--- a/docs/livecd-creator.pod
+++ b/docs/livecd-creator.pod
@@ -47,6 +47,10 @@ currently requires a custom kernel to produce a functional 
image. lzo works with
 is used, the -comp option is not passed to mksquashfs to allow the use of
 older versions of mksquashfs.
 
+=item --releasever=VER
+
+Set the value to substitute for $releasever in kickstart repo urls
+
 =back
 
 =head1 SYSTEM DIRECTORY OPTIONS
@@ -81,12 +85,16 @@ livecd-creator \
 =head1 REPO EXTENSIONS
 
 livecd-creator provides for some extensions to the repo commands similar
-to what yum supports. The strings $arch, $basearch and $releveasever
+to what yum supports. The strings $arch, $basearch and $releasever
 are replaced with the system arch, basearch and release version respectively.
+When no --releasever is passed it defaults to the current system's version.
 The allows the use of repo commands such as the following:
 
 repo --name=fedora 
--mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
 
+Note that in a chroot environment (like koji) the rpmdb is not available,
+so either don't use $releasever in that case, or pass --releasever=VER
+
 =head1 CONTRIBUTORS
 
 David Zeuthen, Jeremy Katz, Douglas McClendon and a team of many other 
contributors. See the AUTHORS file in the source distribution for the complete 
list of credits. 
diff --git a/imgcreate/creator.py b/imgcreate/creator.py
index 20be148..9e87854 100644
--- a/imgcreate/creator.py
+++ b/imgcreate/creator.py
@@ -51,7 +51,7 @@ class ImageCreator(object):
 
     """
 
-    def __init__(self, ks, name):
+    def __init__(self, ks, name, releasever=None):
         """Initialize an ImageCreator instance.
 
         ks -- a pykickstart.KickstartParser instance; this instance will be
@@ -61,6 +61,7 @@ class ImageCreator(object):
         name -- a name for the image; used for e.g. image filenames or
                 filesystem labels
 
+        releasever -- Value to substitute for $releasever in repo urls
         """
         self.ks = ks
         """A pykickstart.KickstartParser instance."""
@@ -68,6 +69,8 @@ class ImageCreator(object):
         self.name = name
         """A name for the image."""
 
+        self.releasever = releasever
+
         self.tmpdir = "/var/tmp"
         """The directory in which all temporary files will be created."""
 
@@ -634,7 +637,7 @@ class ImageCreator(object):
         """
         yum_conf = self._mktemp(prefix = "yum.conf-")
 
-        ayum = LiveCDYum()
+        ayum = LiveCDYum(releasever=self.releasever)
         ayum.setup(yum_conf, self._instroot)
 
         for repo in kickstart.get_repos(self.ks, repo_urls):
@@ -791,7 +794,7 @@ class LoopImageCreator(ImageCreator):
 
     """
 
-    def __init__(self, ks, name, fslabel = None):
+    def __init__(self, ks, name, fslabel=None, releasever=None):
         """Initialize a LoopImageCreator instance.
 
         This method takes the same arguments as ImageCreator.__init__() with
@@ -800,7 +803,7 @@ class LoopImageCreator(ImageCreator):
         fslabel -- A string used as a label for any filesystems created.
 
         """
-        ImageCreator.__init__(self, ks, name)
+        ImageCreator.__init__(self, ks, name, releasever=releasever)
 
         self.__fslabel = None
         self.fslabel = fslabel
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 105a937..d6e28da 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -38,13 +38,13 @@ class LiveImageCreatorBase(LoopImageCreator):
 
     """
 
-    def __init__(self, *args):
+    def __init__(self, ks, name, fslabel=None, releasever=None):
         """Initialise a LiveImageCreator instance.
 
-        This method takes the same arguments as ImageCreator.__init__().
+        This method takes the same arguments as LoopImageCreator.__init__().
 
         """
-        LoopImageCreator.__init__(self, *args)
+        LoopImageCreator.__init__(self, ks, name, fslabel=fslabel, 
releasever=releasever)
 
         self.compress_type = "gzip"
         """mksquashfs compressor to use."""
diff --git a/imgcreate/yuminst.py b/imgcreate/yuminst.py
index 5f3333b..721a2d0 100644
--- a/imgcreate/yuminst.py
+++ b/imgcreate/yuminst.py
@@ -37,8 +37,12 @@ class TextProgress(object):
         sys.stdout.write("...OK\n")
 
 class LiveCDYum(yum.YumBase):
-    def __init__(self):
+    def __init__(self, releasever=None):
+        """
+        releasever = optional value to use in replacing $releasever in repos
+        """
         yum.YumBase.__init__(self)
+        self.releasever = releasever
 
     def doFileLogSetup(self, uid, logfile):
         # don't do the file log for the livecd as it can lead to open fds
@@ -130,7 +134,16 @@ class LiveCDYum(yum.YumBase):
             # takes a variable and substitutes like yum configs do
             option = option.replace("$basearch", rpmUtils.arch.getBaseArch())
             option = option.replace("$arch", rpmUtils.arch.getCanonArch())
-            option = option.replace("$releasever", yum.config._getsysver("/", 
"redhat-release"))
+            # If the url includes $releasever substitute user's value or
+            # current system's version.
+            if option.find("$releasever") > -1:
+                if self.releasever:
+                    option = option.replace("$releasever", self.releasever)
+                else:
+                    try:
+                        option = option.replace("$releasever", 
yum.config._getsysver("/", "redhat-release"))
+                    except yum.Errors.YumBaseError:
+                        raise CreatorError("$releasever in repo url, but no 
releasever set")
             return option
 
         repo = yum.yumRepo.YumRepository(name)
diff --git a/tools/livecd-creator b/tools/livecd-creator
index 64b645a..94da3ac 100755
--- a/tools/livecd-creator
+++ b/tools/livecd-creator
@@ -40,11 +40,14 @@ def parse_options(args):
                       help="Path or url to kickstart config file")
     imgopt.add_option("-b", "--base-on", type="string", dest="base_on",
                       help="Add packages to an existing live CD iso9660 
image.")
-    imgopt.add_option("-f", "--fslabel", type="string", dest="fs_label",
+    imgopt.add_option("-f", "--fslabel", type="string", dest="fslabel",
                       help="File system label (default based on config name)")
     imgopt.add_option("", "--compression-type", type="string", 
dest="compress_type",
                       help="Compression type recognized by mksquashfs (default 
gzip, lzma needs custom kernel, lzo needs a 2.6.36+ kernel)",
                       default="gzip")
+    imgopt.add_option("", "--releasever", type="string", dest="releasever",
+                      default=None,
+                      help="Value to substitute for $releasever in kickstart 
repo urls")
     parser.add_option_group(imgopt)
 
     # options related to the config of your system
@@ -75,9 +78,9 @@ def parse_options(args):
         raise Usage("Kickstart file must be provided")
     if options.base_on and not os.path.isfile(options.base_on):
         raise Usage("Live CD ISO '%s' does not exist" %(options.base_on,))
-    if options.fs_label and len(options.fs_label) > imgcreate.FSLABEL_MAXLEN:
+    if options.fslabel and len(options.fslabel) > imgcreate.FSLABEL_MAXLEN:
         raise Usage("CD labels are limited to 32 characters")
-    if options.fs_label and options.fs_label.find(" ") != -1:
+    if options.fslabel and options.fslabel.find(" ") != -1:
         raise Usage("CD labels cannot contain spaces.")
 
     return options
@@ -100,22 +103,22 @@ def main():
         print >> sys.stderr, "You must run livecd-creator as root"
         return 1
 
-    if options.fs_label:
-        fs_label = options.fs_label
-        name = fs_label
+    if options.fslabel:
+        fslabel = options.fslabel
+        name = fslabel
     else:
         name = imgcreate.build_name(options.kscfg, "livecd-")
 
-        fs_label = imgcreate.build_name(options.kscfg,
+        fslabel = imgcreate.build_name(options.kscfg,
                                         "livecd-",
                                         maxlen = imgcreate.FSLABEL_MAXLEN,
                                         suffix = "%s-%s" %(os.uname()[4], 
time.strftime("%Y%m%d%H%M")))
 
-        logging.info("Using label '%s' and name '%s'" % (fs_label, name))
+        logging.info("Using label '%s' and name '%s'" % (fslabel, name))
 
     ks = imgcreate.read_kickstart(options.kscfg)
 
-    creator = imgcreate.LiveImageCreator(ks, name, fs_label)
+    creator = imgcreate.LiveImageCreator(ks, name, fslabel=fslabel, 
releasever=options.releasever)
     creator.tmpdir = os.path.abspath(options.tmpdir)
     if not os.path.exists(creator.tmpdir):
         makedirs(creator.tmpdir)


commit cbd356fa84632c9b1a53f1c5bddab451a2e98777
Author: David Lehman <[email protected]>
Date:   Fri Dec 17 10:21:02 2010 -0600

    Assign a device-mapper UUID w/ subsystem prefix to the dm snapshot.
    
    Creators of device-mapper maps/devices should set a device-mapper
    UUID for their devices which include a prefix to identify the
    subsystem responsible for the device. The format generally used is
    $SUBSYSTEM-$MAPNAME, with subsystem being all caps.

diff --git a/imgcreate/fs.py b/imgcreate/fs.py
index 9f9d8ea..9c60501 100644
--- a/imgcreate/fs.py
+++ b/imgcreate/fs.py
@@ -525,7 +525,8 @@ class DeviceMapperSnapshot(object):
                                              self.imgloop.device,
                                              self.cowloop.device)
 
-        args = ["/sbin/dmsetup", "create", self.__name, "--table", table]
+        args = ["/sbin/dmsetup", "create", self.__name,
+                "--uuid", "LIVECD-%s" % self.__name, "--table", table]
         if subprocess.call(args) != 0:
             self.cowloop.cleanup()
             self.imgloop.cleanup()


commit e0dcf666488b730291acba9993dc8cde3cb4c290
Author: David Lehman <[email protected]>
Date:   Fri Dec 17 10:21:01 2010 -0600

    Fix git URLs to match reality.

diff --git a/HACKING b/HACKING
index 0e88c32..e912112 100644
--- a/HACKING
+++ b/HACKING
@@ -4,11 +4,11 @@ SOURCE CONTROL MANAGEMENT
 
 This project is stored in git and can be checked out using
 
- git clone git://git.fedoraproject.org/git/hosted/livecd
+ git clone git://git.fedorahosted.org/git/livecd
 
 or if you have write access you might want to use
 
- git clone ssh://git.fedoraproject.org/git/hosted/livecd
+ git clone ssh://git.fedorahosted.org/git/livecd
 
 Change history etc. can be obtained from the web interface
 


--
livecd mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/livecd

Reply via email to