[Fedora-livecd-list] matchpathcon error during chroot install
The following happens during installation of a chroot. You can reproduce this with: yum install ltsp-server ltsp-build-client Installing: kernel # [245/342] /dev/mapper/control: matchpathcon 002 failed: No such file or directory Failure to communicate with kernel device-mapper driver. Anybody have any idea where is calling matchpathcon? I don't see this skimming through the kernel and mkinitrd sources, so it might be elsewhere. Warren Togami [EMAIL PROTECTED] -- Fedora-livecd-list mailing list Fedora-livecd-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-livecd-list
Re: [Fedora-livecd-list] One big and some smaller issues with current live images
Sebastian Vahl wrote: 3. Installing: udev # [507/787]error initializing udevd socket Sounds like a bug in its %post script ok. https://bugzilla.redhat.com/show_bug.cgi?id=441941 I just wrote a proposed patch that corrects the %post logic. Some review would be appreciated please. Harald could you please look it over and build ASAP? Please let rel-eng@ know after built. Thanks, Warren Togami [EMAIL PROTECTED] -- Fedora-livecd-list mailing list Fedora-livecd-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-livecd-list
Re: [Fedora-livecd-list] RFC: PATCH: multi-partition disk image + python logging API
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeremy Katz wrote: | On Thu, 2008-04-10 at 15:03 -0400, David Huff wrote: |> I have been playing around with the appliance/disk creator stuff that |> Daniel P. Berrange posted to the list back in February: |> |> https://www.redhat.com/archives/fedora-livecd-list/2008-February/msg00085.html |> |> |> Daniel has broken this functionality in to three patches. |> |> 1. Make-use-of-python-logging-API-for-debug-messages.patch |> 2. Refactor-disk-mount-classes-to-allow-multi-partition.patch |> 3. Add-appliance-disk-creator.patch |> |> The later still has a couple bugs that need to be worked out however I |> am looking for comments on the first two which are attached. I can try |> to split the second patch into smaller chunks if that would make it |> easier, however I think it makes sense to have it as one patch. | | -ENOPATCHES. Remember, mailman eats things if you attach a git | formatted patch. git-format-patch + git-send-email is your friend. patches send as separate messages via git-send-email see list. | Also, note that at this point, no changes are going to go into the | Fedora 9 livecd-creator unless they're very targeted bug fixes. But | that doesn't mean we can't start looking at things for the next go-round I am fine with that, I just want people to start thinking about this so we can get something started around an appliance creation tool. - -D -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFH/nu8ccHK32ogu/cRAv0DAJ9VzIqMzqMdacXESOe7MIE+2YFntwCdE2OI SRxxcf0vcJevM9CJRaP6OUw= =N263 -END PGP SIGNATURE- -- Fedora-livecd-list mailing list Fedora-livecd-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-livecd-list
[Fedora-livecd-list] [PATCH] Refactor disk/mount classes to allow multi-partition/fs layouts
From: Daniel P. Berrange <[EMAIL PROTECTED]> --- imgcreate/creator.py | 17 ++-- imgcreate/fs.py | 247 - imgcreate/live.py|6 +- 3 files changed, 174 insertions(+), 96 deletions(-) diff --git a/imgcreate/creator.py b/imgcreate/creator.py index 0d22b56..979e1b9 100644 --- a/imgcreate/creator.py +++ b/imgcreate/creator.py @@ -208,7 +208,11 @@ class ImageCreator(object): """ s = "/dev/root / %sdefaults,noatime 0 0\n" %(self._fstype) -s += "devpts /dev/pts devpts gid=5,mode=620 0 0\n" +s += self._get_fstab_special() +return s + +def _get_fstab_special(self): +s = "devpts /dev/pts devpts gid=5,mode=620 0 0\n" s += "tmpfs /dev/shm tmpfs defaults 0 0\n" s += "proc /proc procdefaults 0 0\n" s += "sysfs /sys sysfs defaults 0 0\n" @@ -817,12 +821,11 @@ class LoopImageCreator(ImageCreator): if not base_on is None: shutil.copyfile(base_on, self._image) -self.__instloop = SparseExtLoopbackMount(self._image, - self._instroot, - self.__image_size, - self.__fstype, - self.__blocksize, - self.fslabel) +self.__instloop = ExtDiskMount(SparseLoopbackDisk(self._image, self.__image_size), + self._instroot, + self.__fstype, + self.__blocksize, + self.fslabel) try: self.__instloop.mount() diff --git a/imgcreate/fs.py b/imgcreate/fs.py index 9ca3a3e..e53cfa9 100644 --- a/imgcreate/fs.py +++ b/imgcreate/fs.py @@ -24,6 +24,7 @@ import stat import subprocess import random import string +import logging from imgcreate.errors import * @@ -86,42 +87,51 @@ class BindChrootMount: subprocess.call(["/bin/umount", self.dest]) self.mounted = False -class LoopbackMount: -def __init__(self, lofile, mountdir, fstype = None): -self.lofile = lofile -self.mountdir = mountdir -self.fstype = fstype +class Disk: +def __init__(self, size, device = None): +self._device = device +self._size = size -self.mounted = False -self.losetup = False -self.rmdir = False -self.loopdev = None +def create(self): +pass def cleanup(self): -self.unmount() -self.lounsetup() +pass -def unmount(self): -if self.mounted: -rc = subprocess.call(["/bin/umount", self.mountdir]) -if rc == 0: -self.mounted = False +def get_device(self): +return self._device +def set_device(self, path): +self._device = path +device = property(get_device, set_device) -if self.rmdir and not self.mounted: -try: -os.rmdir(self.mountdir) -except OSError, e: -pass -self.rmdir = False +def get_size(self): +return self._size +size = property(get_size) + + +class RawDisk(Disk): +def __init__(self, size, device): +Disk.__init__(self, size, device) + +def fixed(self): +return True + +def exists(self): +return True + +class LoopbackDisk(Disk): +def __init__(self, lofile, size): +Disk.__init__(self, size) +self.lofile = lofile + +def fixed(self): +return False -def lounsetup(self): -if self.losetup: -rc = subprocess.call(["/sbin/losetup", "-d", self.loopdev]) -self.losetup = False -self.loopdev = None +def exists(self): +return os.path.exists(self.lofile) -def loopsetup(self): -if self.losetup: +def create(self): +if self.device is not None: return losetupProc = subprocess.Popen(["/sbin/losetup", "-f"], @@ -132,40 +142,27 @@ class LoopbackMount: raise MountError("Failed to allocate loop device for '%s'" % self.lofile) -self.loopdev = losetupOutput.split()[0] +device = losetupOutput.split()[0] -rc = subprocess.call(["/sbin/losetup", self.loopdev, self.lofile]) +logging.debug("Losetup add %s mapping to %s" % (device, self.lofile)) +rc = subprocess.call(["/sbin/losetup", device, self.lofile]) if rc != 0: raise MountError("Failed to allocate loop device for '%s'" % self.lofile) +self.device = device -self.losetup = True - -def mount(self): -if self.mounted: +de
[Fedora-livecd-list] imgcreate/fs.py
imgcreate/fs.py |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 21609df66b47bf1ae2d6e930ed7a994c59a9aa19 Author: Jeremy Katz <[EMAIL PROTECTED]> Date: Thu Apr 10 16:35:51 2008 -0400 Fix creation of minimal sized snapshot Creating the minimal sized snapshot has been broken for a while which then breaks the ability to do an install on something with only 4 gigs of flash like the eeePC diff --git a/imgcreate/fs.py b/imgcreate/fs.py index 9ca3a3e..98c0db4 100644 --- a/imgcreate/fs.py +++ b/imgcreate/fs.py @@ -285,8 +285,8 @@ class SparseExtLoopbackMount(SparseLoopbackMount): minsize = self.__resize_to_minimal() self.truncate(minsize) - -return self.resize(size) +self.resize(size) +return minsize class DeviceMapperSnapshot(object): def __init__(self, imgloop, cowloop): @@ -299,7 +299,7 @@ class DeviceMapperSnapshot(object): def get_path(self): if self.__name is None: return None -return "/dev/mapper" + self.__name +return os.path.join("/dev/mapper", self.__name) path = property(get_path) def create(self): -- Fedora-livecd-list mailing list Fedora-livecd-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-livecd-list
[Fedora-livecd-list] [PATCH] Make use of python logging API for debug messages
From: Daniel P. Berrange <[EMAIL PROTECTED]> --- imgcreate/creator.py |5 ++- imgcreate/debug.py | 64 ++ imgcreate/live.py|4 +- imgcreate/yuminst.py |3 +- tools/image-creator | 13 - tools/livecd-creator | 14 +- 6 files changed, 94 insertions(+), 9 deletions(-) create mode 100644 imgcreate/debug.py diff --git a/imgcreate/creator.py b/imgcreate/creator.py index c7b1046..0d22b56 100644 --- a/imgcreate/creator.py +++ b/imgcreate/creator.py @@ -22,6 +22,7 @@ import stat import sys import tempfile import shutil +import logging import yum import rpm @@ -501,7 +502,7 @@ class ImageCreator(object): (pkg, e)) for pkg in skipped_pkgs: -print >> sys.stderr, "Skipping missing package '%s'" % (pkg,) +logging.info("Skipping missing package '%s'" % (pkg,)) def __select_groups(self, ayum): skipped_groups = [] @@ -516,7 +517,7 @@ class ImageCreator(object): skipped_groups.append(group) for group in skipped_groups: -print >> sys.stderr, "Skipping missing group '%s'" % (group.name,) +logging.info("Skipping missing group '%s'" % (group.name,)) def __deselect_packages(self, ayum): for pkg in kickstart.get_excluded(self.ks, diff --git a/imgcreate/debug.py b/imgcreate/debug.py new file mode 100644 index 000..6d725e9 --- /dev/null +++ b/imgcreate/debug.py @@ -0,0 +1,64 @@ +# +# debug.py: Helper routines for debugging +# +# Copyright 2008, Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +import logging +import logging.handlers +import optparse +import sys + +def add_logging_options(parser): +logopt = optparse.OptionGroup(parser, "Debugging options", + "These options control the output of logging information during image creation") + +# Logging related options +logopt.add_option("-d", "--debug", action="store_true", dest="debug", + help="Output debugging information") +logopt.add_option("-v", "--verbose", action="store_true", dest="verbose", + help="Output verbose progress information") +logopt.add_option("", "--logfile", type="string", default=None, dest="logfile", + help="Save debug information to FILENAME") + +parser.add_option_group(logopt) + + +def setup_logging(verbose=False, debug=False, logfile=None): + +rootLogger = logging.getLogger() +if debug: +rootLogger.setLevel(logging.DEBUG) +elif verbose: +rootLogger.setLevel(logging.INFO) +else: +rootLogger.setLevel(logging.WARN) + +dateFormat = "%a, %d %b %Y %H:%M:%S" +if logfile is not None: +fileHandler = logging.handlers.RotatingFileHandler(logfile, "a", + 1024*1024, 5) + +fileFormat = "[%(asctime)s %(process)d] %(levelname)s (%(module)s:%(lineno)d) %(message)s" +fileHandler.setFormatter(logging.Formatter(fileFormat, + dateFormat)) +rootLogger.addHandler(fileHandler) +else: +streamHandler = logging.StreamHandler(sys.stderr) +streamFormat = "%(levelname)-6s %(message)s" +streamHandler.setFormatter(logging.Formatter(streamFormat, + dateFormat)) +rootLogger.addHandler(streamHandler) diff --git a/imgcreate/live.py b/imgcreate/live.py index bbb17ef..03a5466 100644 --- a/imgcreate/live.py +++ b/imgcreate/live.py @@ -21,6 +21,7 @@ import os.path import glob import shutil import subprocess +import logging from imgcreate.errors import * from imgcreate.fs import * @@ -279,8 +280,7 @@ class LiveImageCreatorBase(LoopImageCreator): elif os.path.exists("/usr/lib/anaconda-runtime/implantisomd5"): implantisomd5 = "/usr/lib/anaconda-runtime/implantisomd5" else: -print >> sys.stderr, \ - "isomd5sum not installed; not setting up mediacheck" +logging.warn("isomd5sum not installed; not setting up mediacheck") subprocess.call([implantisomd5, iso]) diff --git a/imgcreate/yuminst.py b/imgcreate/yumi
Re: [Fedora-livecd-list] One big and some smaller issues with current live images
Am Do 10.April 2008 schrieb Jeremy Katz: > On Thu, 2008-04-10 at 11:36 +0200, Sebastian Vahl wrote: > > Selinux is preventing the live image user to get root privileges. /bin/su > > isn't executable for him and "liveinst" also fails with an "unknown > > error". If I switch to TTY1 and disable enforcing with "setenforce 0" > > both are working. So this is likely a SELinux issue. > > I think this is a more general problem in today's rawhide -- Jesse was > talking with dwalsh earlier afaik. Ok. Thanks. > > And the smaller ones happen during the creation of the images: > > 1. warning: basesystem-8.1-1: Header V3 DSA signature: NOKEY, key ID > > 4f2a6fd2 2. warning: fonts-KOI8-R-100dpi-1.0-10.fc8: Header V3 DSA > > signature: NOKEY, key ID 30c9ecf8 > > This is just RPM telling you about the keys the packages are signed > with. Uh. Local problem. I have to clean my local repo from time to time. > > > 3. Installing: udev # > > [507/787]error initializing udevd socket > > Sounds like a bug in its %post script ok. https://bugzilla.redhat.com/show_bug.cgi?id=441941 > > > 4. Installing: selinux-policy-targeted # > > [607/787]/usr/sbin/semanage: You must specify a prefix > > /usr/sbin/semanage: You must specify a prefix > > Likewise. https://bugzilla.redhat.com/show_bug.cgi?id=441943 > > 5. This error happens at last, after creating the iso: > > > > Exception exceptions.AttributeError: "'NoneType' object has no > > attribute 'sysconf'" in > > ignored > > What version of yum are you running with? This should only be a > fallback case (and even then, I don't see how it leads to an exception) yum-3.2.14-2.fc9.noarch Sebastian signature.asc Description: This is a digitally signed message part. -- Fedora-livecd-list mailing list Fedora-livecd-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-livecd-list
Re: [Fedora-livecd-list] RFC: PATCH: multi-partition disk image + python logging API
On Thu, 2008-04-10 at 15:03 -0400, David Huff wrote: > I have been playing around with the appliance/disk creator stuff that > Daniel P. Berrange posted to the list back in February: > > https://www.redhat.com/archives/fedora-livecd-list/2008-February/msg00085.html > > > Daniel has broken this functionality in to three patches. > > 1. Make-use-of-python-logging-API-for-debug-messages.patch > 2. Refactor-disk-mount-classes-to-allow-multi-partition.patch > 3. Add-appliance-disk-creator.patch > > The later still has a couple bugs that need to be worked out however I > am looking for comments on the first two which are attached. I can try > to split the second patch into smaller chunks if that would make it > easier, however I think it makes sense to have it as one patch. -ENOPATCHES. Remember, mailman eats things if you attach a git formatted patch. git-format-patch + git-send-email is your friend. Also, note that at this point, no changes are going to go into the Fedora 9 livecd-creator unless they're very targeted bug fixes. But that doesn't mean we can't start looking at things for the next go-round Jeremy -- Fedora-livecd-list mailing list Fedora-livecd-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-livecd-list
Re: [Fedora-livecd-list] One big and some smaller issues with current live images
On Thu, 2008-04-10 at 11:36 +0200, Sebastian Vahl wrote: > Selinux is preventing the live image user to get root privileges. /bin/su > isn't executable for him and "liveinst" also fails with an "unknown error". > If I switch to TTY1 and disable enforcing with "setenforce 0" both are > working. So this is likely a SELinux issue. I think this is a more general problem in today's rawhide -- Jesse was talking with dwalsh earlier afaik. > And the smaller ones happen during the creation of the images: > 1. warning: basesystem-8.1-1: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2 > 2. warning: fonts-KOI8-R-100dpi-1.0-10.fc8: Header V3 DSA signature: NOKEY, > key ID 30c9ecf8 This is just RPM telling you about the keys the packages are signed with. > 3. Installing: udev # > [507/787]error initializing udevd socket Sounds like a bug in its %post script > 4. Installing: selinux-policy-targeted # > [607/787]/usr/sbin/semanage: You must specify a prefix > /usr/sbin/semanage: You must specify a prefix Likewise. > 5. This error happens at last, after creating the iso: > > Exception exceptions.AttributeError: "'NoneType' object has no > attribute 'sysconf'" in > ignored What version of yum are you running with? This should only be a fallback case (and even then, I don't see how it leads to an exception) Jeremy -- Fedora-livecd-list mailing list Fedora-livecd-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-livecd-list
Re: [Fedora-livecd-list] RFC: PATCH: multi-partition disk image + python logging API
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David Huff wrote: | I have been playing around with the appliance/disk creator stuff that | Daniel P. Berrange posted to the list back in February: | | https://www.redhat.com/archives/fedora-livecd-list/2008-February/msg00085.html | | | | Daniel has broken this functionality in to three patches. | | 1. Make-use-of-python-logging-API-for-debug-messages.patch | 2. Refactor-disk-mount-classes-to-allow-multi-partition.patch | 3. Add-appliance-disk-creator.patch | | The later still has a couple bugs that need to be worked out however I | am looking for comments on the first two which are attached. I can try | to split the second patch into smaller chunks if that would make it | easier, however I think it makes sense to have it as one patch. | | | Thanks, | David | | 2nd patch attached ... - - -- Fedora-livecd-list mailing list Fedora-livecd-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-livecd-list - -- David Huff Red Hat, Raleigh, NC Mobile: 919-796-3553 Office: 919-754-4129 GPG Key ID: 6A20BBF7 GPG Fingerprint: FE13 8AF6 0E58 D92E A4E1 2D0A 71C1 CADF 6A20 BBF7 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFH/mUhccHK32ogu/cRAtNOAJ9c3mrFVTj9cMuP7bTXLcZhUOqbZACdHBnD x/JadIpZq1GMjl1Fh+y1klI= =bWRa -END PGP SIGNATURE- -- Fedora-livecd-list mailing list Fedora-livecd-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-livecd-list
[Fedora-livecd-list] RFC: PATCH: multi-partition disk image + python logging API
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have been playing around with the appliance/disk creator stuff that Daniel P. Berrange posted to the list back in February: https://www.redhat.com/archives/fedora-livecd-list/2008-February/msg00085.html Daniel has broken this functionality in to three patches. 1. Make-use-of-python-logging-API-for-debug-messages.patch 2. Refactor-disk-mount-classes-to-allow-multi-partition.patch 3. Add-appliance-disk-creator.patch The later still has a couple bugs that need to be worked out however I am looking for comments on the first two which are attached. I can try to split the second patch into smaller chunks if that would make it easier, however I think it makes sense to have it as one patch. Thanks, David - -- David Huff Red Hat, Raleigh, NC Mobile: 919-796-3553 Office: 919-754-4129 GPG Key ID: 6A20BBF7 GPG Fingerprint: FE13 8AF6 0E58 D92E A4E1 2D0A 71C1 CADF 6A20 BBF7 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFH/mR0ccHK32ogu/cRAi4PAJ99OFRJZSI7sHhff0h0dqTsnWKsXACdGiC+ TMsEve8W9vSuzPgpIwam+po= =5yjw -END PGP SIGNATURE- -- Fedora-livecd-list mailing list Fedora-livecd-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-livecd-list
Re: [Fedora-livecd-list] One big and some smaller issues with current live images
Just forgotten: Packages are from current rawhide and livecd-tools are current git. Sebastian signature.asc Description: This is a digitally signed message part. -- Fedora-livecd-list mailing list Fedora-livecd-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-livecd-list
[Fedora-livecd-list] One big and some smaller issues with current live images
Hi. I just want to ask a few question if these issues are already know or, if not, worth to bug. I'm quite busy ATM, so I want to ask before do doubled work. :) First the big one: Selinux is preventing the live image user to get root privileges. /bin/su isn't executable for him and "liveinst" also fails with an "unknown error". If I switch to TTY1 and disable enforcing with "setenforce 0" both are working. So this is likely a SELinux issue. And the smaller ones happen during the creation of the images: 1. warning: basesystem-8.1-1: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2 2. warning: fonts-KOI8-R-100dpi-1.0-10.fc8: Header V3 DSA signature: NOKEY, key ID 30c9ecf8 3. Installing: udev # [507/787]error initializing udevd socket 4. Installing: selinux-policy-targeted # [607/787]/usr/sbin/semanage: You must specify a prefix /usr/sbin/semanage: You must specify a prefix 5. This error happens at last, after creating the iso: Exception exceptions.AttributeError: "'NoneType' object has no attribute 'sysconf'" in > ignored 1175.00user 449.38system 39:16.99elapsed 68%CPU (0avgtext+0avgdata 0maxresident)k 10731298inputs+13728472outputs (1109major+2298273minor)pagefaults 0swaps Sebastian signature.asc Description: This is a digitally signed message part. -- Fedora-livecd-list mailing list Fedora-livecd-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-livecd-list