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 050b94274c0616f98f995732ade967ba18d4d9a3
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Fri Feb 18 16:47:35 2011 -0800
Version 14.2
diff --git a/Makefile b/Makefile
index 87e8448..de4dd5e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-VERSION = 14.1
+VERSION = 14.2
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
commit c0e20e01eecb5300438f5234a4f297c6c1d3c51d
Author: Brian C. Lane <bcl(a)redhat.com>
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 a482c438af1c17ae4becbfa7124e8770c8f29443
Author: Bruce Jerrick <bmj001(a)gmail.com>
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 fb64acf66064b09750f21172e731fe0989f8cfed
Author: Brian C. Lane <bcl(a)redhat.com>
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 52528fddd176aee57eb6152c460842701e35b7a5
Author: Brian C. Lane <bcl(a)redhat.com>
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 07ae6f112a06e5f7ef7f6565bbab5536d4c1d76e
Author: Brian C. Lane <bcl(a)redhat.com>
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 fba99d3508bc27e2ad65bf98e81733f90f70cc6c
Author: Brian C. Lane <bcl(a)redhat.com>
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 c5cde3844e1be8299c283df536c44cca9f1f1581
Author: Brian C. Lane <bcl(a)redhat.com>
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 9d56030152c2a707b61c16808ea078c1bbd0c89d
Author: Brian C. Lane <bcl(a)redhat.com>
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 03b2c1244cddd3ea867d9f9bcbcd080ff58b91ee
Author: Bruno Wolff III <bruno(a)wolff.to>
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 ce06c3d394ab28819ecf4f2457beb1d820854ed7
Author: Brian C. Lane <bcl(a)redhat.com>
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 572d1c03cb498820bcb414951e6b6da55addeef6
Author: David Lehman <dlehman(a)redhat.com>
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 38f3ebb4949233ee75c52ee7335deabf71ae59aa
Author: David Lehman <dlehman(a)redhat.com>
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