Compare commits

...

15 Commits

Author SHA1 Message Date
Jeroen van Meeuwen 81a3af54fb 013-8.el5 2008-08-31 13:51:23 +00:00
Jeroen van Meeuwen d24f18b9fc Why doesn't it find these files? They're in the imported SRPM ffs 2008-08-10 14:17:54 +00:00
Jeroen van Meeuwen 1c8ed425a8 013-7.el5 2008-08-10 14:11:07 +00:00
Jeroen van Meeuwen 0c0b040d0f 013-6.el5 2008-08-03 17:55:37 +00:00
Rahul Sundaram 34ea64d037 Fix changelog, bump release 2008-01-29 07:22:57 +00:00
Rahul Sundaram 9301c20681 Adding livecd-iso-to-disk patch to fix checkisomd5sum location 2008-01-29 07:16:16 +00:00
Rahul Sundaram c8ed96520a checkisomd5sum location has changed between RHEL 5 and Fedora 8. Adding a
patch for livecd-iso-to-disk script
2008-01-29 07:13:55 +00:00
Rahul Sundaram 250f83da7f *** empty log message *** 2008-01-28 23:37:38 +00:00
Rahul Sundaram 14358377b9 Use python sitelib as per packaging guidelines which fixes x86_64 build 2008-01-28 23:35:42 +00:00
Rahul Sundaram c5ba14982e Fix date 2008-01-28 23:15:21 +00:00
Rahul Sundaram ab83cc28c7 Fix date 2008-01-28 23:13:13 +00:00
Rahul Sundaram b959c888da Fix build on x86_64 2008-01-28 23:09:03 +00:00
Rahul Sundaram 79ad8c0a1a initial commit for EPEL 2008-01-28 22:55:54 +00:00
Kevin Fenzi 33419b2038 Initialize branch EL-5 for livecd-tools 2008-01-27 19:18:01 +00:00
Jeremy Katz aad66402ed - disable screensaver with default config
- add aic7xxx and sym53c8xx drivers to default initramfs
- fixes from johnp for FC6 support in the creator
- fix iso-to-stick to work on FC6
2007-05-04 22:11:36 +00:00
9 changed files with 804 additions and 43 deletions

View File

@ -1 +1 @@
livecd-tools-007.tar.bz2
livecd-tools-013.tar.bz2

1
branch Normal file
View File

@ -0,0 +1 @@
EL-5

3
import.log Normal file
View File

@ -0,0 +1,3 @@
livecd-tools-013-6_el5:EL-5:livecd-tools-013-6.el5.src.rpm:1217786115
livecd-tools-013-7_el5:EL-5:livecd-tools-013-7.el5.src.rpm:1218377450
livecd-tools-013-8_fc10:EL-5:livecd-tools-013-8.fc10.src.rpm:1220190667

View File

@ -0,0 +1,11 @@
--- livecd/tools.orig/livecd-iso-to-disk.sh 2008-01-29 14:40:58.000000000 +0530
+++ livecd/tools/livecd-iso-to-disk.sh 2008-01-29 14:42:09.000000000 +0530
@@ -176,7 +176,7 @@
if [ -z "$noverify" ]; then
# verify the image
echo "Verifying image..."
- checkisomd5 --verbose $ISO
+ /usr/lib/anaconda-runtime/checkisomd5 --verbose $ISO
if [ $? -ne 0 ]; then
echo "Are you SURE you want to continue?"
echo "Press Enter to continue or ctrl-c to abort"

View File

@ -0,0 +1,210 @@
diff -u livecd-tools-013.orig/config/livecd-fedora-8-base-desktop.ks livecd-tools-013/config/livecd-fedora-8-base-desktop.ks
--- livecd-tools-013.orig/config/livecd-fedora-8-base-desktop.ks 2008-01-24 17:48:44.000000000 +0100
+++ livecd-tools-013/config/livecd-fedora-8-base-desktop.ks 2008-08-03 19:44:23.000000000 +0200
@@ -62,7 +62,6 @@
# make sure debuginfo doesn't end up on the live image
-*debuginfo
-%end
%post
# FIXME: it'd be better to get this installed from a package
@@ -163,7 +162,6 @@
# make sure there aren't core files lying around
rm -f /core*
-%end
%post --nochroot
@@ -174,4 +172,3 @@
if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then
cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS
fi
-%end
diff -u livecd-tools-013.orig/config/livecd-fedora-8-desktop.ks livecd-tools-013/config/livecd-fedora-8-desktop.ks
--- livecd-tools-013.orig/config/livecd-fedora-8-desktop.ks 2008-01-24 17:48:44.000000000 +0100
+++ livecd-tools-013/config/livecd-fedora-8-desktop.ks 2008-08-03 19:44:23.000000000 +0200
@@ -126,7 +126,6 @@
-nss_db
-vino
-%end
%post
cat >> /etc/rc.d/init.d/fedora-live << EOF
@@ -142,4 +141,3 @@
EOF
-%end
diff -u livecd-tools-013.orig/config/livecd-fedora-8-developer.ks livecd-tools-013/config/livecd-fedora-8-developer.ks
--- livecd-tools-013.orig/config/livecd-fedora-8-developer.ks 2008-01-24 17:48:44.000000000 +0100
+++ livecd-tools-013/config/livecd-fedora-8-developer.ks 2008-08-03 19:44:23.000000000 +0200
@@ -79,7 +79,6 @@
#@x-software-development
# I think this is going to be too big on x86_64
#*-devel
-%end
%post
# Enable debuginfo repository (useful for frysk, gdb, etc.)
@@ -112,4 +111,3 @@
ln -s /usr/share/eclipse-demos-0.0.1 "Eclipse demonstration videos"
popd
EOF
-%end
diff -u livecd-tools-013.orig/config/livecd-fedora-8-electronic-lab.ks livecd-tools-013/config/livecd-fedora-8-electronic-lab.ks
--- livecd-tools-013.orig/config/livecd-fedora-8-electronic-lab.ks 2008-01-24 17:48:44.000000000 +0100
+++ livecd-tools-013/config/livecd-fedora-8-electronic-lab.ks 2008-08-03 19:44:23.000000000 +0200
@@ -111,7 +111,6 @@
#computing
octave
-%end
%post
@@ -233,5 +232,4 @@
/sbin/chkconfig --del rpcidmapd
/sbin/chkconfig --del rpcbind
-%end
diff -u livecd-tools-013.orig/config/livecd-fedora-8-games.ks livecd-tools-013/config/livecd-fedora-8-games.ks
--- livecd-tools-013.orig/config/livecd-fedora-8-games.ks 2008-01-24 17:48:44.000000000 +0100
+++ livecd-tools-013/config/livecd-fedora-8-games.ks 2008-08-03 19:44:23.000000000 +0200
@@ -152,4 +152,3 @@
games-menus
wget
-%end
diff -u livecd-tools-013.orig/config/livecd-fedora-8-kde.ks livecd-tools-013/config/livecd-fedora-8-kde.ks
--- livecd-tools-013.orig/config/livecd-fedora-8-kde.ks 2008-01-24 17:48:44.000000000 +0100
+++ livecd-tools-013/config/livecd-fedora-8-kde.ks 2008-08-03 19:44:23.000000000 +0200
@@ -57,7 +57,6 @@
python-imaging
python-reportlab
-%end
%post
# create /etc/sysconfig/desktop (needed for installation)
@@ -95,4 +94,3 @@
sed -i 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop
EOF
-%end
diff -u livecd-tools-013.orig/config/livecd-fedora-base-desktop.ks livecd-tools-013/config/livecd-fedora-base-desktop.ks
--- livecd-tools-013.orig/config/livecd-fedora-base-desktop.ks 2008-01-24 17:48:44.000000000 +0100
+++ livecd-tools-013/config/livecd-fedora-base-desktop.ks 2008-08-03 19:44:23.000000000 +0200
@@ -61,7 +61,6 @@
# make sure debuginfo doesn't end up on the live image
-*debuginfo
-%end
%post
# FIXME: it'd be better to get this installed from a package
@@ -166,7 +165,6 @@
# make sure there aren't core files lying around
rm -f /core*
-%end
%post --nochroot
@@ -178,4 +176,3 @@
if [ ! -d $LIVE_ROOT/LiveOS ]; then mkdir -p $LIVE_ROOT/LiveOS ; fi
cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS
fi
-%end
diff -u livecd-tools-013.orig/config/livecd-fedora-desktop.ks livecd-tools-013/config/livecd-fedora-desktop.ks
--- livecd-tools-013.orig/config/livecd-fedora-desktop.ks 2008-01-24 17:48:44.000000000 +0100
+++ livecd-tools-013/config/livecd-fedora-desktop.ks 2008-08-03 19:44:23.000000000 +0200
@@ -127,7 +127,6 @@
-nss_db
-vino
-%end
%post
cat >> /etc/rc.d/init.d/fedora-live << EOF
@@ -143,4 +142,3 @@
EOF
-%end
diff -u livecd-tools-013.orig/config/livecd-fedora-developer.ks livecd-tools-013/config/livecd-fedora-developer.ks
--- livecd-tools-013.orig/config/livecd-fedora-developer.ks 2008-01-24 17:48:44.000000000 +0100
+++ livecd-tools-013/config/livecd-fedora-developer.ks 2008-08-03 19:44:23.000000000 +0200
@@ -80,7 +80,6 @@
#@x-software-development
# I think this is going to be too big on x86_64
#*-devel
-%end
%post
# Enable debuginfo repository (useful for frysk, gdb, etc.)
@@ -113,4 +112,3 @@
ln -s /usr/share/eclipse-demos-0.0.1 "Eclipse demonstration videos"
popd
EOF
-%end
diff -u livecd-tools-013.orig/config/livecd-fedora-electronic-lab.ks livecd-tools-013/config/livecd-fedora-electronic-lab.ks
--- livecd-tools-013.orig/config/livecd-fedora-electronic-lab.ks 2008-01-24 17:48:44.000000000 +0100
+++ livecd-tools-013/config/livecd-fedora-electronic-lab.ks 2008-08-03 19:44:23.000000000 +0200
@@ -111,7 +111,6 @@
#computing
octave
-%end
%post
@@ -233,5 +232,4 @@
/sbin/chkconfig --del rpcidmapd
/sbin/chkconfig --del rpcbind
-%end
diff -u livecd-tools-013.orig/config/livecd-fedora-kde.ks livecd-tools-013/config/livecd-fedora-kde.ks
--- livecd-tools-013.orig/config/livecd-fedora-kde.ks 2008-01-24 17:48:44.000000000 +0100
+++ livecd-tools-013/config/livecd-fedora-kde.ks 2008-08-03 19:44:23.000000000 +0200
@@ -58,7 +58,6 @@
# save some space
-autofs
-%end
%post
@@ -104,4 +103,3 @@
# workaround to start nm-applet automatically
cp /etc/xdg/autostart/nm-applet.desktop /usr/share/autostart/
-%end
diff -u livecd-tools-013.orig/config/livecd-fedora-minimal.ks livecd-tools-013/config/livecd-fedora-minimal.ks
--- livecd-tools-013.orig/config/livecd-fedora-minimal.ks 2008-01-24 17:48:44.000000000 +0100
+++ livecd-tools-013/config/livecd-fedora-minimal.ks 2008-08-03 19:44:23.000000000 +0200
@@ -19,4 +19,3 @@
authconfig
rootfiles
-%end
diff -u livecd-tools-013.orig/config/livedvd-fedora-kde.ks livecd-tools-013/config/livedvd-fedora-kde.ks
--- livecd-tools-013.orig/config/livedvd-fedora-kde.ks 2008-01-24 17:48:44.000000000 +0100
+++ livecd-tools-013/config/livedvd-fedora-kde.ks 2008-08-03 19:44:23.000000000 +0200
@@ -94,7 +94,6 @@
# and some extra packages
koffice-*
-%end
%post
@@ -106,4 +105,3 @@
#DISPLAYMANAGER="KDE"
EOF
-%end

View File

@ -0,0 +1,406 @@
Backport imgcreate to RHEL5 pykickstart
RHEL5 pykickstart differs from latest Fedora pykickstart
in quite a number of ways:
- No commands, errors or version sub-modules, but there
is a data sub-module
- readKickstart() doesn't support relative includes
very well; it only tries the paths relative to the
current directory rather than relative to the directory
the topmost kickstart is in
- Most of the parsed data is available at KsParser.ksdata
rather than KsParser.hander.foo
- No support for group include types (i.e. required, default,
all etc.)
- The contents of ksdata.groupList are a simply groups names
rather than Group objects
- ksdata.device has the following format:
<type> <module>[:<module>...] [--opts=<opts>]
rather than being a Device object.
- No bootloader timeout or default kernel options.
- No includepkgs/excludepkgs repo options.
- Some ksdata attributes - e.g. timezone, firewall, rootpw,
etc. - are dicts rather than objects
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Index: livecd/imgcreate/creator.py
===================================================================
--- livecd.orig/imgcreate/creator.py
+++ livecd/imgcreate/creator.py
@@ -507,16 +507,16 @@ class ImageCreator(object):
skipped_groups = []
for group in kickstart.get_groups(self.ks):
try:
- ayum.selectGroup(group.name, group.include)
+ ayum.selectGroup(group)
except (yum.Errors.InstallError, yum.Errors.GroupsError), e:
if kickstart.ignore_missing(self.ks):
raise CreatorError("Failed to find group '%s' : %s" %
- (group.name, e))
+ (group, e))
else:
skipped_groups.append(group)
for group in skipped_groups:
- print >> sys.stderr, "Skipping missing group '%s'" % (group.name,)
+ print >> sys.stderr, "Skipping missing group '%s'" % (group,)
def __deselect_packages(self, ayum):
for pkg in kickstart.get_excluded(self.ks,
@@ -540,14 +540,8 @@ class ImageCreator(object):
ayum = LiveCDYum()
ayum.setup(yum_conf, self._instroot)
- for repo in kickstart.get_repos(self.ks, repo_urls):
- (name, baseurl, mirrorlist, inc, exc) = repo
-
+ for (name, baseurl, mirrorlist) in kickstart.get_repos(self.ks, repo_urls):
yr = ayum.addRepository(name, baseurl, mirrorlist)
- if inc:
- yr.includepkgs = inc
- if exc:
- yr.exclude = exc
if kickstart.exclude_docs(self.ks):
rpm.addMacro("_excludedocs", "1")
@@ -615,19 +609,19 @@ class ImageCreator(object):
creating an initrd and bootloader configuration.
"""
- ksh = self.ks.handler
+ ksd = self.ks.ksdata
- kickstart.LanguageConfig(self._instroot).apply(ksh.lang)
- kickstart.KeyboardConfig(self._instroot).apply(ksh.keyboard)
- kickstart.TimezoneConfig(self._instroot).apply(ksh.timezone)
- kickstart.AuthConfig(self._instroot).apply(ksh.authconfig)
- kickstart.FirewallConfig(self._instroot).apply(ksh.firewall)
- kickstart.SelinuxConfig(self._instroot).apply(ksh.selinux)
- kickstart.RootPasswordConfig(self._instroot).apply(ksh.rootpw)
- kickstart.ServicesConfig(self._instroot).apply(ksh.services)
- kickstart.XConfig(self._instroot).apply(ksh.xconfig)
- kickstart.NetworkConfig(self._instroot).apply(ksh.network)
- kickstart.SelinuxConfig(self._instroot).apply(ksh.selinux)
+ kickstart.LanguageConfig(self._instroot).apply(ksd.lang)
+ kickstart.KeyboardConfig(self._instroot).apply(ksd.keyboard)
+ kickstart.TimezoneConfig(self._instroot).apply(ksd.timezone)
+ kickstart.AuthConfig(self._instroot).apply(ksd.authconfig)
+ kickstart.FirewallConfig(self._instroot).apply(ksd.firewall)
+ kickstart.SelinuxConfig(self._instroot).apply(ksd.selinux)
+ kickstart.RootPasswordConfig(self._instroot).apply(ksd.rootpw)
+ kickstart.ServicesConfig(self._instroot).apply(ksd.services)
+ kickstart.XConfig(self._instroot).apply(ksd.xconfig)
+ kickstart.NetworkConfig(self._instroot).apply(ksd.network)
+ kickstart.SelinuxConfig(self._instroot).apply(ksd.selinux)
self._create_bootconfig()
Index: livecd/imgcreate/kickstart.py
===================================================================
--- livecd.orig/imgcreate/kickstart.py
+++ livecd/imgcreate/kickstart.py
@@ -21,11 +21,9 @@ import os.path
import subprocess
import time
-import pykickstart.commands as kscommands
import pykickstart.constants as ksconstants
-import pykickstart.errors as kserrors
+import pykickstart.data as ksdata
import pykickstart.parser as ksparser
-import pykickstart.version as ksversion
import imgcreate.errors as errors
import imgcreate.fs as fs
@@ -40,16 +38,29 @@ def read_kickstart(path):
If an error occurs, a CreatorError exception is thrown.
"""
- version = ksversion.makeVersion()
- ks = ksparser.KickstartParser(version)
+ data = ksdata.KickstartData()
+ ks = ksparser.KickstartParser(data, ksparser.KickstartHandlers(data))
+
+ #
+ # We change dirs to the dirname of the kickstart file so
+ # that %include can use relative paths. This is fixed in
+ # pykickstart itself in later versions
+ #
+ cwd = os.getcwd()
+ (dirname, basename) = os.path.split(os.path.abspath(path))
+ os.chdir(dirname)
try:
- ks.readKickstart(path)
- except IOError, (err, msg):
- raise errors.KickstartError("Failed to read kickstart file "
- "'%s' : %s" % (path, msg))
- except kserrors.KickstartError, e:
- raise errors.KickstartError("Failed to parse kickstart file "
- "'%s' : %s" % (path, e))
+ try:
+ ks.readKickstart(basename)
+ except IOError, (err, msg):
+ raise errors.KickstartError("Failed to read kickstart file "
+ "'%s' : %s" % (path, msg))
+ except ksparser.KickstartError, e:
+ raise errors.KickstartError("Failed to parse kickstart file "
+ "'%s' : %s" % (path, e))
+ finally:
+ os.chdir(cwd)
+
return ks
def build_name(kscfg, prefix = None, suffix = None, maxlen = None):
@@ -115,7 +126,7 @@ class KickstartConfig(object):
class LanguageConfig(KickstartConfig):
"""A class to apply a kickstart language configuration to a system."""
def apply(self, kslang):
- lang = kslang.lang or "en_US.UTF-8"
+ lang = kslang or "en_US.UTF-8"
f = open(self.path("/etc/sysconfig/i18n"), "w+")
f.write("LANG=\"" + lang + "\"\n")
@@ -131,15 +142,15 @@ class KeyboardConfig(KickstartConfig):
#
import rhpl.keyboard
k = rhpl.keyboard.Keyboard()
- if kskeyboard.keyboard:
- k.set(kskeyboard.keyboard)
+ if kskeyboard:
+ k.set(kskeyboard)
k.write(self.instroot)
class TimezoneConfig(KickstartConfig):
"""A class to apply a kickstart timezone configuration to a system."""
def apply(self, kstimezone):
- tz = kstimezone.timezone or "America/New_York"
- utc = str(kstimezone.isUtc)
+ tz = kstimezone["timezone"] or "America/New_York"
+ utc = str(kstimezone["isUtc"])
f = open(self.path("/etc/sysconfig/clock"), "w+")
f.write("ZONE=\"" + tz + "\"\n")
@@ -152,7 +163,7 @@ class AuthConfig(KickstartConfig):
if not os.path.exists(self.path("/usr/sbin/authconfig")):
return
- auth = ksauthconfig.authconfig or "--useshadow --enablemd5"
+ auth = ksauthconfig or "--useshadow --enablemd5"
args = ["/usr/sbin/authconfig", "--update", "--nostart"]
self.call(args + auth.split())
@@ -162,7 +173,7 @@ class FirewallConfig(KickstartConfig):
#
# FIXME: should handle the rest of the options
#
- if not ksfirewall.enabled:
+ if not ksfirewall["enabled"]:
return
if not os.path.exists(self.path("/usr/sbin/lokkit")):
return
@@ -188,10 +199,10 @@ class RootPasswordConfig(KickstartConfig
p2.communicate()
def apply(self, ksrootpw):
- if ksrootpw.isCrypted:
- self.set_encrypted(ksrootpw.password)
- elif ksrootpw.password != "":
- self.set_unencrypted(ksrootpw.password)
+ if ksrootpw["isCrypted"]:
+ self.set_encrypted(ksrootpw["password"])
+ elif ksrootpw["password"] != "":
+ self.set_unencrypted(ksrootpw["password"])
else:
self.unset()
@@ -200,15 +211,15 @@ class ServicesConfig(KickstartConfig):
def apply(self, ksservices):
if not os.path.exists(self.path("/sbin/chkconfig")):
return
- for s in ksservices.enabled:
+ for s in ksservices["enabled"]:
self.call(["/sbin/chkconfig", s, "on"])
- for s in ksservices.disabled:
+ for s in ksservices["disabled"]:
self.call(["/sbin/chkconfig", s, "off"])
class XConfig(KickstartConfig):
"""A class to apply a kickstart X configuration to a system."""
def apply(self, ksxconfig):
- if not ksxconfig.startX:
+ if not ksxconfig["startX"]:
return
f = open(self.path("/etc/inittab"), "rw+")
buf = f.read()
@@ -329,7 +340,7 @@ class NetworkConfig(KickstartConfig):
gateway = None
nameservers = None
- for network in ksnet.network:
+ for network in ksnet:
if not network.device:
raise errros.KickstartError("No --device specified with "
"network kickstart command")
@@ -370,7 +381,7 @@ class SelinuxConfig(KickstartConfig):
f = file(path, "w+")
os.chmod(path, 0644)
- if not ksselinux.selinux:
+ if not ksselinux:
return
if not os.path.exists(self.path("/sbin/restorecon")):
return
@@ -381,7 +392,7 @@ class SelinuxConfig(KickstartConfig):
if os.path.exists(self.path("/usr/sbin/lokkit")):
args = ["/usr/sbin/lokkit", "-f", "--quiet", "--nostart"]
- if ksselinux.selinux:
+ if ksselinux:
args.append("--selinux=enforcing")
else:
args.append("--selinux=disabled")
@@ -391,51 +402,35 @@ class SelinuxConfig(KickstartConfig):
self.relabel(ksselinux)
def get_image_size(ks, default = None):
- for p in ks.handler.partition.partitions:
+ for p in ks.ksdata.partitions:
if p.mountpoint == "/" and p.size:
return int(p.size) * 1024L * 1024L
return default
def get_modules(ks):
- devices = []
- if isinstance(ks.handler.device, kscommands.device.FC3_Device):
- devices.append(ks.handler.device)
- else:
- devices.extend(ks.handler.device.deviceList)
-
modules = []
- for device in devices:
- if not device.moduleName:
- continue
- modules.extend(device.moduleName.split(":"))
+ try:
+ #
+ # Format with RHEL5 pykickstart appears to be:
+ # <type> <module>[:<module>...] [--opts=<opts>]
+ #
+ modules.extend(ks.ksdata.device.split()[1].split(":"))
+ except:
+ pass
return modules
def get_timeout(ks, default = None):
- if not hasattr(ks.handler.bootloader, "timeout"):
- return default
- if ks.handler.bootloader.timeout is None:
- return default
- return int(ks.handler.bootloader.timeout)
+ # No equivalent with RHEL5 pykickstart
+ return default
def get_default_kernel(ks, default = None):
- if not hasattr(ks.handler.bootloader, "default"):
- return default
- if not ks.handler.bootloader.default:
- return default
- return ks.handler.bootloader.default
+ # No equivalent with RHEL5 pykickstart
+ return default
def get_repos(ks, repo_urls = {}):
repos = []
- for repo in ks.handler.repo.repoList:
- inc = []
- if hasattr(repo, "includepkgs"):
- inc.extend(repo.includepkgs)
-
- exc = []
- if hasattr(repo, "excludepkgs"):
- exc.extend(repo.excludepkgs)
-
+ for repo in ks.ksdata.repoList:
baseurl = repo.baseurl
mirrorlist = repo.mirrorlist
@@ -443,38 +438,36 @@ def get_repos(ks, repo_urls = {}):
baseurl = repo_urls[repo.name]
mirrorlist = None
- repos.append((repo.name, baseurl, mirrorlist, inc, exc))
+ repos.append((repo.name, baseurl, mirrorlist))
return repos
def convert_method_to_repo(ks):
- try:
- ks.handler.repo.methodToRepo()
- except (AttributeError, kserrors.KickstartError):
- pass
+ # No equivalent with RHEL5 pykickstart
+ pass
def get_packages(ks, required = []):
- return ks.handler.packages.packageList + required
+ return ks.ksdata.packageList + required
def get_groups(ks, required = []):
- return ks.handler.packages.groupList + required
+ return ks.ksdata.groupList + required
def get_excluded(ks, required = []):
- return ks.handler.packages.excludedList + required
+ return ks.ksdata.excludedList + required
def ignore_missing(ks):
- return ks.handler.packages.handleMissing == ksconstants.KS_MISSING_IGNORE
+ return ks.ksdata.handleMissing == ksconstants.KS_MISSING_IGNORE
def exclude_docs(ks):
- return ks.handler.packages.excludeDocs
+ return ks.ksdata.excludeDocs
def get_post_scripts(ks):
scripts = []
- for s in ks.handler.scripts:
+ for s in ks.ksdata.scripts:
if s.type != ksparser.KS_SCRIPT_POST:
continue
scripts.append(s)
return scripts
def selinux_enabled(ks):
- return ks.handler.selinux.selinux
+ return ks.ksdata.selinux
Index: livecd/imgcreate/yuminst.py
===================================================================
--- livecd.orig/imgcreate/yuminst.py
+++ livecd/imgcreate/yuminst.py
@@ -104,12 +104,8 @@ class LiveCDYum(yum.YumBase):
else:
print >> sys.stderr, "No such package %s to remove" %(pkg,)
- def selectGroup(self, grp, include = pykickstart.parser.GROUP_DEFAULT):
+ def selectGroup(self, grp):
yum.YumBase.selectGroup(self, grp)
- if include == pykickstart.parser.GROUP_REQUIRED:
- map(lambda p: self.deselectPackage(p), grp.default_packages.keys())
- elif include == pykickstart.parser.GROUP_ALL:
- map(lambda p: self.selectPackage(p), grp.optional_packages.keys())
def addRepository(self, name, url = None, mirrorlist = None):
def _varSubstitute(option):

View File

@ -0,0 +1,125 @@
Don't use try/except/finally - not supported before python 2.5
The construct:
try:
do_something()
except:
handle_exception()
finally:
do_cleanup()
is not supported with RHEL 5.1 python, so we change to:
try:
try:
do_something()
except:
handle_exception()
finally:
do_cleanup()
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Index: livecd/imgcreate/creator.py
===================================================================
--- livecd.orig/imgcreate/creator.py 2008-01-08 09:42:55.000000000 +0000
+++ livecd/imgcreate/creator.py 2008-01-08 09:50:31.000000000 +0000
@@ -553,14 +553,15 @@
rpm.addMacro("_excludedocs", "1")
try:
- self.__select_packages(ayum)
- self.__select_groups(ayum)
- self.__deselect_packages(ayum)
- ayum.runInstall()
- except yum.Errors.RepoError, e:
- raise CreatorError("Unable to download from repo : %s" % (e,))
- except yum.Errors.YumBaseError, e:
- raise CreatorError("Unable to install: %s" % (e,))
+ try:
+ self.__select_packages(ayum)
+ self.__select_groups(ayum)
+ self.__deselect_packages(ayum)
+ ayum.runInstall()
+ except yum.Errors.RepoError, e:
+ raise CreatorError("Unable to download from repo : %s" % (e,))
+ except yum.Errors.YumBaseError, e:
+ raise CreatorError("Unable to install: %s" % (e,))
finally:
ayum.closeRpmDB()
ayum.close()
@@ -595,11 +596,12 @@
script = "/tmp/" + os.path.basename(path)
try:
- subprocess.call([s.interp, script],
- preexec_fn = preexec, env = env)
- except OSError, (err, msg):
- raise CreatorError("Failed to execute %%post script "
- "with '%s' : %s" % (s.interp, msg))
+ try:
+ subprocess.call([s.interp, script],
+ preexec_fn = preexec, env = env)
+ except OSError, (err, msg):
+ raise CreatorError("Failed to execute %%post script "
+ "with '%s' : %s" % (s.interp, msg))
finally:
os.unlink(path)
Index: livecd/tools/image-creator
===================================================================
--- livecd.orig/tools/image-creator 2007-12-11 11:22:17.000000000 +0000
+++ livecd/tools/image-creator 2008-01-08 09:51:01.000000000 +0000
@@ -59,10 +59,11 @@
creator = imgcreate.LoopImageCreator(ks, name)
try:
- creator.create()
- except imgcreate.CreatorError, e:
- print >> sys.stderr, "Error creating image : %s" % e
- return 1
+ try:
+ creator.create()
+ except imgcreate.CreatorError, e:
+ print >> sys.stderr, "Error creating image : %s" % e
+ return 1
finally:
creator.cleanup()
Index: livecd/tools/livecd-creator
===================================================================
--- livecd.orig/tools/livecd-creator 2007-12-11 11:22:17.000000000 +0000
+++ livecd/tools/livecd-creator 2008-01-08 09:51:35.000000000 +0000
@@ -111,18 +111,19 @@
creator.skip_minimize = options.skip_minimize
try:
- creator.mount(options.base_on, options.cachedir)
- creator.install()
- creator.configure()
- if options.give_shell:
- print "Launching shell. Exit to continue."
- print "----------------------------------"
- creator.launch_shell()
- creator.unmount()
- creator.package()
- except imgcreate.CreatorError, e:
- print >> sys.stderr, "Error creating Live CD : %s" % e
- return 1
+ try:
+ creator.mount(options.base_on, options.cachedir)
+ creator.install()
+ creator.configure()
+ if options.give_shell:
+ print "Launching shell. Exit to continue."
+ print "----------------------------------"
+ creator.launch_shell()
+ creator.unmount()
+ creator.package()
+ except imgcreate.CreatorError, e:
+ print >> sys.stderr, "Error creating Live CD : %s" % e
+ return 1
finally:
creator.cleanup()

View File

@ -1,11 +1,19 @@
%define debug_package %{nil}
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Summary: Tools for building live CD's
Name: livecd-tools
Version: 007
Release: 1%{?dist}
License: GPL
Version: 013
Release: 8%{?dist}
License: GPLv2+
Group: System Environment/Base
URL: http://git.fedoraproject.org/?p=hosted/livecd
Source0: %{name}-%{version}.tar.bz2
#Source0: livecd.tar.bz2
Patch0: livecd-tools-013-old-pykickstart.patch
Patch1: livecd-tools-013-try-finally.patch
Patch2: livecd-tools-013-iso-to-disk-path.patch
Patch3: livecd-tools-013-ksconfigs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: util-linux
Requires: coreutils
@ -13,11 +21,18 @@ Requires: e2fsprogs
Requires: yum >= 3.0.0
Requires: mkisofs
Requires: squashfs-tools
Requires: pykickstart >= 0.96
Requires: syslinux >= 3.30
Requires: dosfstools >= 2.11-8
BuildArch: noarch
ExcludeArch: ppc pp64
Requires: pykickstart
#Requires: dosfstools >= 2.11-8
Requires: dosfstools
#Requires: isomd5sum
Requires: anaconda-runtime
%ifarch %{ix86} x86_64
Requires: syslinux
%endif
%ifarch ppc ppc64
Requires: yaboot
%endif
%description
Tools for generating live CD's on Fedora based systems including
@ -26,6 +41,10 @@ http://fedoraproject.org/wiki/FedoraLiveCD for more details.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
make
@ -42,49 +61,35 @@ rm -rf $RPM_BUILD_ROOT
%doc AUTHORS COPYING README HACKING
%{_bindir}/livecd-creator
%{_bindir}/livecd-iso-to-disk
%{_bindir}/image-creator
%dir /usr/lib/livecd-creator
/usr/lib/livecd-creator/mayflower
%dir %{_datadir}/livecd-tools
%{_datadir}/livecd-tools/*
%{python_sitelib}/imgcreate/*
%changelog
* Tue Apr 24 2007 Jeremy Katz <katzj@redhat.com> - 007-1
- Disable prelinking by default
- Disable some things that slow down the live boot substantially
- Lots of tweaks to the default package manifests
- Allow setting the root password (Jeroen van Meeuwen)
- Allow more specific network line setting (Mark McLoughlin)
- Don't pollute the host yum cache (Mark McLoughlin)
- Add support for mediachecking
* Sun Aug 03 2008 Jeroen van Meeuwen <kanarip@fedoraproject.org> - 013-8
- Fix ksconfigs, fix building and naming of patches
* Wed Apr 4 2007 Jeremy Katz <katzj@redhat.com> - 006-1
- Many fixes to error handling from Mark McLoughlin
- Add the KDE config
- Add support for prelinking
- Fixes for installing when running from RAM or usb stick
- Add sanity checking to better ensure that USB stick is bootable
* Tue Jan 29 2008 Rahul Sundaram <sundaram@fedoraproject.org> - 013-5
- Patch livecd-iso-to-disk for checkisomd5 location
* Thu Mar 29 2007 Jeremy Katz <katzj@redhat.com> - 005-3
- have to use excludearch, not exclusivearch
* Tue Jan 29 2008 Rahul Sundaram <sundaram@fedoraproject.org> - 013-4
- Use python sitelib macro properly
* Thu Mar 29 2007 Jeremy Katz <katzj@redhat.com> - 005-2
- exclusivearch since it only works on x86 and x86_64 for now
* Tue Jan 29 2008 Rahul Sundaram <sundaram@fedoraproject.org> - 013-3
- Fix build on x86_64
* Wed Mar 28 2007 Jeremy Katz <katzj@redhat.com> - 005-1
- some shell quoting fixes
- allow using UUID or LABEL for the fs label of a usb stick
- work with ext2 formated usb stick
* Mon Jan 28 2008 Rahul Sundaram <sundaram@fedoraproject.org> - 013-2
- Initial build for EPEL
* Mon Mar 26 2007 Jeremy Katz <katzj@redhat.com> - 004-1
- add livecd-iso-to-disk for setting up the live CD iso image onto a usb
stick or similar
* Mon Oct 29 2007 Jeremy Katz <katzj@redhat.com> - 013-1
- Lots of config updates
- Support 'device foo' to say what modules go in the initramfs
- Support multiple kernels being installed
- Allow blacklisting kernel modules on boot with blacklist=foo
- Improve bootloader configs
- Split configs off for f8
* Fri Mar 23 2007 Jeremy Katz <katzj@redhat.com> - 003-1
- fix remaining reference to run-init
* Thu Mar 22 2007 Jeremy Katz <katzj@redhat.com> - 002-1
- update for new version
* Fri Dec 22 2006 David Zeuthen <davidz@redhat.com> - 001-1%{?dist}
- Initial build.

View File

@ -1 +1 @@
2d38ef9279789c9cb2339dab42d4da06 livecd-tools-007.tar.bz2
55bb7b79917de9136b2e0b29966b5589 livecd-tools-013.tar.bz2