Hello community,

here is the log from the commit of package gcimagebundle for openSUSE:Factory 
checked in at 2014-12-10 23:43:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gcimagebundle (Old)
 and      /work/SRC/openSUSE:Factory/.gcimagebundle.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gcimagebundle"

Changes:
--------
--- /work/SRC/openSUSE:Factory/gcimagebundle/gcimagebundle.changes      
2014-07-29 21:22:03.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.gcimagebundle.new/gcimagebundle.changes 
2014-12-10 23:43:36.000000000 +0100
@@ -1,0 +2,7 @@
+Fri Nov 14 22:39:25 UTC 2014 - [email protected]
+
+- Update to version 1.1.9   bnc#905611
+  + Fix version inconsistency
+  + Support XFS as root filesystem
+
+-------------------------------------------------------------------

Old:
----
  gcimagebundle-1.1.7.tar.bz2

New:
----
  gcimagebundle-1.1.9.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gcimagebundle.spec ++++++
--- /var/tmp/diff_new_pack.PNKpTg/_old  2014-12-10 23:43:39.000000000 +0100
+++ /var/tmp/diff_new_pack.PNKpTg/_new  2014-12-10 23:43:39.000000000 +0100
@@ -1,8 +1,7 @@
 #
 # spec file for package gcimagebundle
-# this code base is under development
 #
-# Copyright (c) 2013 SUSE LLC
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,21 +15,22 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 Name:           gcimagebundle
-Version:        1.1.7
+Version:        1.1.9
 Release:        0
-License:        Apache-2.0
 Summary:        Google Compute Engine disk image creator
-URL:            https://github.com/GoogleCloudPlatform/compute-image-packages
+License:        Apache-2.0
 Group:          System/Management
+Url:            https://github.com/GoogleCloudPlatform/compute-image-packages
 Source0:        %{name}-%{version}.tar.bz2
 Patch0:         gcimgbndl_hidesetuplogic.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Requires:       python
 BuildRequires:  python
 BuildRequires:  python-devel
 BuildRequires:  python-setuptools
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %if 0%{?suse_version} && 0%{?suse_version} <= 1110
 %{!?python_sitelib: %global python_sitelib %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}
 %else
@@ -42,7 +42,6 @@
 Google Compute Engine from an existing VM.
 
 %package test
-License:         Apache-2.0
 Summary:         Test cases for gcimagebundle
 Group:           System/Management
 Requires:        gcimagebundle = %{version}
@@ -65,7 +64,6 @@
 %install
 python setup.py install --prefix=%{_prefix} --root=%{buildroot} 
--install-scripts=%{_bindir}
 
-
 %files
 %defattr(-,root,root,-)
 %doc LICENSE README README.md VERSION
@@ -73,12 +71,11 @@
 %{python_sitelib}/*egg-info/*
 %{python_sitelib}/gcimagebundlelib/*.*
 %dir %{python_sitelib}/gcimagebundlelib
-%dir %{python_sitelib}/%{name}-1.1.5-py%{py_ver}.egg-info
+%dir %{python_sitelib}/%{name}-%{version}-py%{py_ver}.egg-info
 
 %files test
 %defattr(-,root,root,-)
 %{python_sitelib}/gcimagebundlelib/tests/*
 %dir %{python_sitelib}/gcimagebundlelib/tests
 
-
 %changelog

++++++ gcimagebundle-1.1.7.tar.bz2 -> gcimagebundle-1.1.9.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gcimagebundle-1.1.7/VERSION 
new/gcimagebundle-1.1.9/VERSION
--- old/gcimagebundle-1.1.7/VERSION     2014-07-11 08:52:07.000000000 +0200
+++ new/gcimagebundle-1.1.9/VERSION     2014-11-08 01:18:19.000000000 +0100
@@ -1 +1 @@
-1.1.5
+1.1.9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gcimagebundle-1.1.7/gcimagebundlelib/block_disk.py 
new/gcimagebundle-1.1.9/gcimagebundlelib/block_disk.py
--- old/gcimagebundle-1.1.7/gcimagebundlelib/block_disk.py      2014-07-11 
08:52:07.000000000 +0200
+++ new/gcimagebundle-1.1.9/gcimagebundlelib/block_disk.py      2014-11-08 
01:18:19.000000000 +0100
@@ -161,7 +161,7 @@
       if uuid is None:
         raise Exception('Could not get uuid from MakeFileSystem')
       mount_point = tempfile.mkdtemp(dir=self._scratch_dir)
-      with utils.MountFileSystem(devices[0], mount_point):
+      with utils.MountFileSystem(devices[0], mount_point, self._fs_type):
         logging.info('Copying contents')
         self._CopySourceFiles(mount_point)
         self._CopyPlatformSpecialFiles(mount_point)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gcimagebundle-1.1.7/gcimagebundlelib/centos.py 
new/gcimagebundle-1.1.9/gcimagebundlelib/centos.py
--- old/gcimagebundle-1.1.7/gcimagebundlelib/centos.py  2014-07-11 
08:52:07.000000000 +0200
+++ new/gcimagebundle-1.1.9/gcimagebundlelib/centos.py  2014-11-08 
01:18:19.000000000 +0100
@@ -18,6 +18,7 @@
 
 
 import os
+import platform
 import re
 
 from gcimagebundlelib import linux
@@ -57,3 +58,9 @@
     super(Centos, self).__init__()
     (self.distribution_codename, _, self.distribution,
      self.distribution_version) = Centos.ParseRedhatRelease()
+
+  def GetPreferredFilesystemType(self):
+    (_,version,_) = platform.linux_distribution()
+    if version.startswith('7'):
+      return 'xfs'
+    return 'ext4'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gcimagebundle-1.1.7/gcimagebundlelib/imagebundle.py 
new/gcimagebundle-1.1.9/gcimagebundlelib/imagebundle.py
--- old/gcimagebundle-1.1.7/gcimagebundlelib/imagebundle.py     2014-07-11 
08:52:07.000000000 +0200
+++ new/gcimagebundle-1.1.9/gcimagebundlelib/imagebundle.py     2014-11-08 
01:18:19.000000000 +0100
@@ -142,7 +142,7 @@
 
 def PrintVersionInfo():
   #TODO: Should read from the VERSION file instead.
-  print 'version 1.1.5'
+  print 'version 1.1.9'
 
 
 def GetTargetFilesystem(options, guest_platform):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gcimagebundle-1.1.7/gcimagebundlelib/rhel.py 
new/gcimagebundle-1.1.9/gcimagebundlelib/rhel.py
--- old/gcimagebundle-1.1.7/gcimagebundlelib/rhel.py    2014-07-11 
08:52:07.000000000 +0200
+++ new/gcimagebundle-1.1.9/gcimagebundlelib/rhel.py    2014-11-08 
01:18:19.000000000 +0100
@@ -34,3 +34,9 @@
 
   def __init__(self):
     super(RHEL, self).__init__()
+
+  def GetPreferredFilesystemType(self):
+    (_,version,_) = platform.linux_distribution()
+    if version.startswith('7'):
+      return 'xfs'
+    return 'ext4'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gcimagebundle-1.1.7/gcimagebundlelib/tests/block_disk_test.py 
new/gcimagebundle-1.1.9/gcimagebundlelib/tests/block_disk_test.py
--- old/gcimagebundle-1.1.7/gcimagebundlelib/tests/block_disk_test.py   
2014-07-11 08:52:07.000000000 +0200
+++ new/gcimagebundle-1.1.9/gcimagebundlelib/tests/block_disk_test.py   
2014-11-08 01:18:19.000000000 +0100
@@ -389,7 +389,7 @@
     with utils.LoadDiskImage(disk_path) as devices:
       self.assertEqual(len(devices), 1)
       mnt_dir = tempfile.mkdtemp(dir=self.tmp_root)
-      with utils.MountFileSystem(devices[0], mnt_dir):
+      with utils.MountFileSystem(devices[0], mnt_dir, 'ext4'):
         found = []
         for root, dirs, files in os.walk(mnt_dir):
           root = root.replace(mnt_dir, '')
@@ -414,7 +414,7 @@
     with utils.LoadDiskImage(disk_path) as devices:
       self.assertEqual(len(devices), 1)
       mnt_dir = tempfile.mkdtemp(dir=self.tmp_root)
-      with utils.MountFileSystem(devices[0], mnt_dir):
+      with utils.MountFileSystem(devices[0], mnt_dir, 'ext4'):
         f = open(os.path.join(mnt_dir, filename), 'r')
         file_content = f.read()
         f.close()
@@ -429,7 +429,7 @@
     with utils.LoadDiskImage(disk_path) as devices:
       self.assertEqual(len(devices), 1)
       mnt_dir = tempfile.mkdtemp(dir=self.tmp_root)
-      with utils.MountFileSystem(devices[0], mnt_dir):
+      with utils.MountFileSystem(devices[0], mnt_dir, 'ext4'):
         self.assertEqual(os.stat(os.path.join(mnt_dir, filename)).st_nlink,
                          count)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gcimagebundle-1.1.7/gcimagebundlelib/utils.py 
new/gcimagebundle-1.1.9/gcimagebundlelib/utils.py
--- old/gcimagebundle-1.1.7/gcimagebundlelib/utils.py   2014-07-11 
08:52:07.000000000 +0200
+++ new/gcimagebundle-1.1.9/gcimagebundlelib/utils.py   2014-11-08 
01:18:19.000000000 +0100
@@ -78,7 +78,7 @@
 class MountFileSystem(object):
   """Mounts a file system."""
 
-  def __init__(self, dev_path, dir_path):
+  def __init__(self, dev_path, dir_path, fs_type):
     """Initializes MountFileSystem object.
 
     Args:
@@ -87,11 +87,17 @@
     """
     self._dev_path = dev_path
     self._dir_path = dir_path
+    self._fs_type = fs_type
 
   def __enter__(self):
     """Mounts a device.
     """
-    mount_cmd = ['mount', self._dev_path, self._dir_path]
+    # Since the bundled image can have the same uuid as the root disk,
+    # we should prevent uuid conflicts for xfs mounts.
+    if self._fs_type is 'xfs':
+      mount_cmd = ['mount', '-o', 'nouuid', self._dev_path, self._dir_path]
+    else:
+      mount_cmd = ['mount', self._dev_path, self._dir_path]
     RunCommand(mount_cmd)
 
   def __exit__(self, unused_exc_type, unused_exc_value, unused_exc_tb):
@@ -183,7 +189,10 @@
   mkfs_cmd = ['mkfs', '-t', fs_type, dev_path]
   RunCommand(mkfs_cmd)
 
-  set_uuid_cmd = ['tune2fs', '-U', uuid, dev_path]
+  if fs_type is 'xfs':
+    set_uuid_cmd = ['xfs_admin', '-U', uuid, dev_path]
+  else:
+    set_uuid_cmd = ['tune2fs', '-U', uuid, dev_path]
   RunCommand(set_uuid_cmd)
 
   return uuid

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to