imgcreate/kickstart.py
by Jeremy Katz
imgcreate/kickstart.py | 1 +
1 file changed, 1 insertion(+)
New commits:
commit b1c1d66c7e22c07911ca0843106f8b69f5c0edf7
Author: Eric Paris <eparis(a)redhat.com>
Date: Wed Jun 4 15:10:25 2008 -0400
FD leak in kickstart.py
Found 2 FD's that never got closed in kickstart.py
There are still a UDP and TCP socket open when we are going rpm calls
and I have no idea why. Maybe someone else know why we would have 2
such things open and where they should be closed?
diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py
index 6e946b2..c83e795 100644
--- a/imgcreate/kickstart.py
+++ b/imgcreate/kickstart.py
@@ -382,6 +382,7 @@ class SelinuxConfig(KickstartConfig):
path = self.path(fn)
f = file(path, "w+")
os.chmod(path, 0644)
+ f.close()
if ksselinux.selinux == ksconstants.SELINUX_DISABLED:
return
15 years, 6 months
3 commits - config/livecd-fedora-base-desktop.ks imgcreate/kickstart.py tools/livecd-iso-to-disk.sh
by Jeremy Katz
config/livecd-fedora-base-desktop.ks | 2 +-
imgcreate/kickstart.py | 2 +-
tools/livecd-iso-to-disk.sh | 8 +++++++-
3 files changed, 9 insertions(+), 3 deletions(-)
New commits:
commit daa1ab63f6bc46a7a0e0e46dff116876487bb72c
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jun 2 15:40:43 2008 -0400
Fix mounting of live image backing store on /mnt/live
diff --git a/config/livecd-fedora-base-desktop.ks b/config/livecd-fedora-base-desktop.ks
index 5da37aa..14d49a4 100644
--- a/config/livecd-fedora-base-desktop.ks
+++ b/config/livecd-fedora-base-desktop.ks
@@ -87,7 +87,7 @@ exists() {
touch /.liveimg-configured
# mount live image
-if [ -b /dev/live ]; then
+if [ -b \`readlink -f /dev/live\` ]; then
mkdir -p /mnt/live
mount -o ro /dev/live /mnt/live
fi
commit a39924713953eccd14ff6ad8bbcfe28afb721bb7
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jun 2 14:09:33 2008 -0400
More fixes for using a loopback device as the blockdev
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 69e97e3..3e1979b 100644
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -41,7 +41,7 @@ getdisk() {
DEV=$1
if [[ "$DEV" =~ "/dev/loop*" ]]; then
- device="/dev/$device"
+ device="$DEV"
return
fi
@@ -60,6 +60,9 @@ getdisk() {
}
resetMBR() {
+ if [[ "$DEV" =~ "/dev/loop*" ]]; then
+ return
+ fi
getdisk $1
if [ -f /usr/lib/syslinux/mbr.bin ]; then
cat /usr/lib/syslinux/mbr.bin > $device
@@ -98,6 +101,9 @@ checkPartActive() {
if [ "$dev" = "$device" ]; then
return
fi
+ if [[ "$dev" =~ "/dev/loop*" ]]; then
+ return
+ fi
if [ "$(/sbin/fdisk -l $device 2>/dev/null |grep $dev |awk {'print $2;'})" != "*" ]; then
echo "Partition isn't marked bootable!"
commit 7d8dfdedb9fd3f20058b818980c1e39035e05851
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jun 2 13:35:05 2008 -0400
Use right variable when looking for executables
When checking to see if executables exist before running them, use
the right value for the instroot
diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py
index 8f43f7c..6e946b2 100644
--- a/imgcreate/kickstart.py
+++ b/imgcreate/kickstart.py
@@ -108,7 +108,7 @@ class KickstartConfig(object):
os.chdir("/")
def call(self, args):
- if not os.path.exists("%s/%s" %(self.chroot, args[0])):
+ if not os.path.exists("%s/%s" %(self.instroot, args[0])):
raise errors.KickstartError("Unable to run %s!" %(args))
subprocess.call(args, preexec_fn = self.chroot)
15 years, 6 months
failing at my first attempt at liveCD creation
by Fulko Hew
I'm failing at my first attempt at creating (or recreating) a live CD
- I'm using Fedora 8 (because I don't find KDE in F9 usable yet)
- I have SELinux disabled.
Following the process described in the LiveCDHowTo, well, actually
the step:
livecd-creator --config=/usr/share/livecd-tools/livecd-fedora-minimal.ks
resulted in a complaint about SELinux not being enabled on the host
system...
Right, so I edited the '.ks' file and set selinux=--disabled
This let it proceed through the build stage with the following errors:
Installing: info ##################### [ 29/129]
/var/tmp/rpm-tmp.42253: line 2: sed: command not found
error: %post(info-4.12-1.fc10.i386) scriptlet failed, exit status 127
...
Installing: cracklib ##################### [ 45/129]
/var/tmp/rpm-tmp.50225: line 2: getent: command not found
/var/tmp/rpm-tmp.50225: line 3: getent: command not found
...
Installing: kernel ##################### [124/129]
device-mapper: table ioctl failed: No such device or address
Command failed
...
Installing: selinux-policy-targeted ##################### [129/129]
libsemanage.dbase_llist_query: could not query record value
libsepol.sepol_user_modify: MLS is enabled, but no MLS default level was
defined for user guest_u
libsepol.sepol_user_modify: could not load (null) into policy
libsemanage.dbase_policydb_modify: could not modify record value
libsemanage.semanage_base_merge_components: could not merge local
modifications into policy
/usr/sbin/semanage: Could not add SELinux user guest_u
libsepol.sepol_user_modify: MLS is enabled, but no MLS default level was
defined for user xguest_u
libsepol.sepol_user_modify: could not load (null) into policy
libsemanage.dbase_policydb_modify: could not modify record value
libsemanage.semanage_base_merge_components: could not merge local
modifications into policy
/usr/sbin/semanage: Could not add SELinux user xguest_u
Removing password for user root.
passwd: Success
Then I used the specified command to execute the ISO image:
qemu -m 512 -cdrom livecd-fulko-200805241043.iso
The first time I followed the procedure (a few days ago) to
build the ISO and execute it, it wouldn't even boot.
Today I retried the same procedure, and today it boots,
but after it get to the point of starting udev, something
flashes by on the screen (qemu window) and then the window
goes black, and I can't see anything after that. I seems hung.
So then I tried recreating the 'livecd-fedora-desktop.ks'
version as per instructions and it dies with:
Installing: tzdata ################### [ 21/1019]
umount: /var/tmp/livecd-creator-PxlU8W/install_root: device is busy
umount: /var/tmp/livecd-creator-PxlU8W/install_root: device is busy
ioctl: LOOP_CLR_FD: Device or resource busy
Traceback (most recent call last):
File "/usr/bin/livecd-creator", line 1603, in <module>
sys.exit(main())
File "/usr/bin/livecd-creator", line 1575, in main
target.install()
File "/usr/bin/livecd-creator", line 948, in install
self.installPackages()
File "/usr/bin/livecd-creator", line 591, in installPackages
self.ayum.runInstall()
File "/usr/bin/livecd-creator", line 330, in runInstall
return self.runTransaction(cb)
File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 591, in
runTransaction
errors = self.ts.run(cb.callback, '')
File "/usr/share/yum-cli/callback.py", line 124, in callback
fd = os.open(rpmloc, os.O_RDONLY)
OSError: [Errno 2] No such file or directory:
'/var/tmp/livecd-creator-PxlU8W/install_root/var/cache/yum/development/packages/texlive-texmf-errata-fonts-2007-4.fc9.noarch.rpm'
So I'm at a loss as to how to proceed to start testing this process
even before I add my own customizations.
Any help would be appreciated.
TIA
Fulko
15 years, 6 months
Contribution problem
by Pedro Silva
Hi all!
I contacted this mailing list a week ago because I would like to
contribute to Fedora, in this case, creating .ks files for pt_PT
language.
On wednesday I mailed this mailing, in a response to Jeroen van Meeuwen,
my first .ks file for approval. Since then, I've not received any answer
regarding that email. I have seen further developments in
http://git.fedorahosted.org/git/?p=spin-kickstarts.git but no response
to my contributions.
Did I do something wrong? Did I step on somebodys toes?
Best Regards,
--
Pedro Silva
15 years, 6 months