[node-devel] edit-node: mksquashfs failures on RHEL
Charles_Rose at Dell.com
Charles_Rose at Dell.com
Thu Oct 11 06:14:25 UTC 2012
On Thursday 20 September 2012 01:10 PM, Alan Pevec wrote:
> On Wed, Sep 19, 2012 at 3:51 PM, <Charles_Rose at dell.com> wrote:
>> -Requires: livecd-tools >= 020-2
>> +Requires: livecd-tools >= 16.0
>
> This should be >= 1:16.0
> livecd-tools bumped Epoch when it changed versioning to match Fedora releases
Thanks. I will include this in the spec.
> Re. updating livecd-tools in EPEL: not sure what versioning would
> makes sense for EPEL and what backport compat patches might be needed
> e.g. we can't just update squashfs-tools in RHEL, we'd need to make
> livecd-tools detect version and use appropriate options.
The issue is really with livecd-tools on EPEL, which does not currently check for the squashfs
compression type during runtime. So updating livecd on EPEL for now would fix this. The patch that
we need in EPEL is:
diff --git a/imgcreate/fs.py b/imgcreate/fs.py
index de61c7b..d5307a2 100644
--- a/imgcreate/fs.py
+++ b/imgcreate/fs.py
@@ -41,6 +41,35 @@ def makedirs(dirname):
if e.errno != errno.EEXIST:
raise
+def squashfs_compression_type(sqfs_img):
+ """Check the compression type of a SquashFS image. If the type cannot be
+ ascertained, return 'undetermined'. The calling code must decide what to
+ do."""
+
+ env = os.environ.copy()
+ env['LC_ALL'] = 'C'
+ args = ['/usr/sbin/unsquashfs', '-s', sqfs_img]
+ try:
+ p = subprocess.Popen(args, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE, env=env)
+ out, err = p.communicate()
+ except OSError, e:
+ raise SquashfsError(u"Error white stat-ing '%s'\n'%s'" % (args, e))
+ except:
+ raise SquashfsError(u"Error while stat-ing '%s'" % args)
+ else:
+ if p.returncode != 0:
+ raise SquashfsError(
+ u"Error while stat-ing '%s'\n'%s'\nreturncode: '%s'" %
+ (args, err, p.returncode))
+ else:
+ compress_type = 'undetermined'
+ for l in out.splitlines():
+ if l.split(None, 1)[0] == 'Compression':
+ compress_type = l.split()[1]
+ break
+ return compress_type
+
def mksquashfs(in_img, out_img, compress_type):
# Allow gzip to work for older versions of mksquashfs
if compress_type == "gzip":
>
> Cheers,
> Alan
> _______________________________________________
> node-devel mailing list
> node-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/node-devel
>
More information about the node-devel
mailing list