Hello community,
here is the log from the commit of package libstorage for openSUSE:Factory
checked in at Fri Aug 12 09:41:09 CEST 2011.
--------
--- libstorage/libstorage.changes 2011-07-08 14:20:26.000000000 +0200
+++ /mounts/work_src_done/STABLE/libstorage/libstorage.changes 2011-08-11 17:38:57.000000000 +0200
@@ -1,0 +2,47 @@
+Wed Aug 10 16:39:19 CEST 2011 - fehr@suse.de
+
+- support label on btrfs
+- version 2.21.4
+
+-------------------------------------------------------------------
+Tue Aug 9 16:29:08 CEST 2011 - fehr@suse.de
+
+- fix bugs in subvolume handling during install
+
+-------------------------------------------------------------------
+Fri Aug 05 12:06:28 CEST 2011 - aschnell@suse.de
+
+- moved lock from to /var/run/libstorage (bnc#710356)
+
+-------------------------------------------------------------------
+Thu Aug 4 17:30:06 CEST 2011 - fehr@suse.de
+
+- avoid crash when btrfs signature is on disk device (bnc#710043)
+
+-------------------------------------------------------------------
+Tue Aug 2 14:03:30 CEST 2011 - fehr@suse.de
+
+- call waitForDevice in checkDevice to work around possible
+ temporary device node removal by udev (bnc#709464)
+
+-------------------------------------------------------------------
+Thu Jul 28 12:36:14 CEST 2011 - fehr@suse.de
+
+- changes needed to fix bnc#707472
+
+-------------------------------------------------------------------
+Tue Jul 26 12:21:56 CEST 2011 - aschnell@suse.de
+
+- fixed commit action calculation for DASDs (bnc#706911)
+
+-------------------------------------------------------------------
+Tue Jul 19 17:17:10 CEST 2011 - aschnell@suse.de
+
+- fixed size calculation for very small partitions (bnc#705566)
+
+-------------------------------------------------------------------
+Tue Jul 19 15:17:48 CEST 2011 - fehr@suse.de
+
+- fix failing testsuite if program without setup_system is first
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
libstorage-2.21.3.tar.bz2
New:
----
libstorage-2.21.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libstorage.spec ++++++
--- /var/tmp/diff_new_pack.TCt90Y/_old 2011-08-12 09:39:44.000000000 +0200
+++ /var/tmp/diff_new_pack.TCt90Y/_new 2011-08-12 09:39:44.000000000 +0200
@@ -19,8 +19,8 @@
Name: libstorage
-Version: 2.21.3
-Release: 5
+Version: 2.21.4
+Release: 1
License: GPL
Group: System/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -63,7 +63,8 @@
%install
make install DESTDIR="$RPM_BUILD_ROOT"
-install -d -m 755 $RPM_BUILD_ROOT/var/lock/libstorage
+install -d -m 755 $RPM_BUILD_ROOT/var/run/libstorage
+touch $RPM_BUILD_ROOT/var/run/libstorage/lock
%{find_lang} libstorage
@@ -100,7 +101,7 @@
%files -n libstorage3 -f libstorage.lang
%defattr(-,root,root)
%{_libdir}/libstorage.so.*
-%dir /var/lock/libstorage
+%ghost /var/run/libstorage
/var/adm/fillup-templates/sysconfig.storage-libstorage
%doc %dir %{prefix}/share/doc/packages/libstorage
%doc %{prefix}/share/doc/packages/libstorage/AUTHORS
++++++ libstorage-2.21.3.tar.bz2 -> libstorage-2.21.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.21.3/VERSION new/libstorage-2.21.4/VERSION
--- old/libstorage-2.21.3/VERSION 2011-06-10 09:24:57.000000000 +0200
+++ new/libstorage-2.21.4/VERSION 2011-08-11 11:31:23.000000000 +0200
@@ -1 +1 @@
-2.21.3
+2.21.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.21.3/bindings/python/libstorage.py new/libstorage-2.21.4/bindings/python/libstorage.py
--- old/libstorage-2.21.3/bindings/python/libstorage.py 2011-07-05 14:26:29.000000000 +0200
+++ new/libstorage-2.21.4/bindings/python/libstorage.py 2011-08-11 17:36:00.000000000 +0200
@@ -428,6 +428,9 @@
__swig_setmethods__["disklabel"] = _libstorage.DiskInfo_disklabel_set
__swig_getmethods__["disklabel"] = _libstorage.DiskInfo_disklabel_get
if _newclass:disklabel = _swig_property(_libstorage.DiskInfo_disklabel_get, _libstorage.DiskInfo_disklabel_set)
+ __swig_setmethods__["orig_disklabel"] = _libstorage.DiskInfo_orig_disklabel_set
+ __swig_getmethods__["orig_disklabel"] = _libstorage.DiskInfo_orig_disklabel_get
+ if _newclass:orig_disklabel = _swig_property(_libstorage.DiskInfo_orig_disklabel_get, _libstorage.DiskInfo_orig_disklabel_set)
__swig_setmethods__["maxPrimary"] = _libstorage.DiskInfo_maxPrimary_set
__swig_getmethods__["maxPrimary"] = _libstorage.DiskInfo_maxPrimary_get
if _newclass:maxPrimary = _swig_property(_libstorage.DiskInfo_maxPrimary_get, _libstorage.DiskInfo_maxPrimary_set)
@@ -1019,6 +1022,12 @@
__swig_setmethods__["subvol"] = _libstorage.BtrfsInfo_subvol_set
__swig_getmethods__["subvol"] = _libstorage.BtrfsInfo_subvol_get
if _newclass:subvol = _swig_property(_libstorage.BtrfsInfo_subvol_get, _libstorage.BtrfsInfo_subvol_set)
+ __swig_setmethods__["subvol_add"] = _libstorage.BtrfsInfo_subvol_add_set
+ __swig_getmethods__["subvol_add"] = _libstorage.BtrfsInfo_subvol_add_get
+ if _newclass:subvol_add = _swig_property(_libstorage.BtrfsInfo_subvol_add_get, _libstorage.BtrfsInfo_subvol_add_set)
+ __swig_setmethods__["subvol_rem"] = _libstorage.BtrfsInfo_subvol_rem_set
+ __swig_getmethods__["subvol_rem"] = _libstorage.BtrfsInfo_subvol_rem_get
+ if _newclass:subvol_rem = _swig_property(_libstorage.BtrfsInfo_subvol_rem_get, _libstorage.BtrfsInfo_subvol_rem_set)
__swig_destroy__ = _libstorage.delete_BtrfsInfo
__del__ = lambda self : None;
BtrfsInfo_swigregister = _libstorage.BtrfsInfo_swigregister
@@ -1609,6 +1618,7 @@
def modifyFileLoop(self, *args): return _libstorage.StorageInterface_modifyFileLoop(self, *args)
def removeFileLoop(self, *args): return _libstorage.StorageInterface_removeFileLoop(self, *args)
def removeDmraid(self, *args): return _libstorage.StorageInterface_removeDmraid(self, *args)
+ def existSubvolume(self, *args): return _libstorage.StorageInterface_existSubvolume(self, *args)
def createSubvolume(self, *args): return _libstorage.StorageInterface_createSubvolume(self, *args)
def removeSubvolume(self, *args): return _libstorage.StorageInterface_removeSubvolume(self, *args)
def extendBtrfsVolume(self, *args): return _libstorage.StorageInterface_extendBtrfsVolume(self, *args)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.21.3/data/sysconfig.storage-libstorage new/libstorage-2.21.4/data/sysconfig.storage-libstorage
--- old/libstorage-2.21.3/data/sysconfig.storage-libstorage 2011-06-01 10:13:38.000000000 +0200
+++ new/libstorage-2.21.4/data/sysconfig.storage-libstorage 2011-07-19 15:16:45.000000000 +0200
@@ -4,7 +4,7 @@
# Default mount-by method.
DEVICE_NAMES="id"
-## Type: string(ext2,ext3,ext4,reiser,xfs)
+## Type: string(ext2,ext3,ext4,reiser,xfs,btrfs)
# Default filesystem type.
DEFAULT_FS="ext4"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.21.3/libstorage.spec.in new/libstorage-2.21.4/libstorage.spec.in
--- old/libstorage-2.21.3/libstorage.spec.in 2011-06-17 11:38:28.000000000 +0200
+++ new/libstorage-2.21.4/libstorage.spec.in 2011-08-09 13:39:49.000000000 +0200
@@ -48,7 +48,8 @@
%install
make install DESTDIR="$RPM_BUILD_ROOT"
-install -d -m 755 $RPM_BUILD_ROOT/var/lock/libstorage
+install -d -m 755 $RPM_BUILD_ROOT/var/run/libstorage
+touch $RPM_BUILD_ROOT/var/run/libstorage/lock
%{find_lang} libstorage
@@ -84,7 +85,7 @@
%files -n libstorage@LIBVERSION_MAJOR@ -f libstorage.lang
%defattr(-,root,root)
%{_libdir}/libstorage.so.*
-%dir /var/lock/libstorage
+%ghost /var/run/libstorage
/var/adm/fillup-templates/sysconfig.storage-libstorage
%doc %dir %{prefix}/share/doc/packages/libstorage
%doc %{prefix}/share/doc/packages/libstorage/AUTHORS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.21.3/storage/Btrfs.cc new/libstorage-2.21.4/storage/Btrfs.cc
--- old/libstorage-2.21.3/storage/Btrfs.cc 2011-06-10 09:24:57.000000000 +0200
+++ new/libstorage-2.21.4/storage/Btrfs.cc 2011-08-09 15:39:44.000000000 +0200
@@ -42,6 +42,7 @@
{
y2mil("constructed btrfs vol size:" << sz << " devs:" << devs );
y2mil("constructed btrfs vol from:" << v );
+ setFs(BTRFS);
changeMountBy(MOUNTBY_UUID);
setSize( sz );
}
@@ -109,6 +110,22 @@
y2war( "subvolume " << v << " already exists!" );
}
+bool
+Btrfs::existSubvolume( const string& name )
+ {
+ bool ret=false;
+ y2mil( "name:" << name );
+ list<Subvolume>::iterator i=subvol.begin();
+ while( i!=subvol.end() && !ret )
+ {
+ ret = !i->deleted() && i->path()==name && (!getFormat()||i->created());
+ if( !ret )
+ ++i;
+ }
+ y2mil( "ret:" << ret );
+ return( ret );
+ }
+
int
Btrfs::createSubvolume( const string& name )
{
@@ -117,12 +134,16 @@
list<Subvolume>::iterator i=subvol.begin();
while( i!=subvol.end() && !i->deleted() && i->path()!=name )
++i;
- if( i==subvol.end() || getFormat() )
+ if( i==subvol.end() )
{
Subvolume v( name );
v.setCreated();
subvol.push_back( v );
}
+ else if( getFormat() )
+ {
+ i->setCreated();
+ }
else
ret = BTRFS_SUBVOL_EXISTS;
y2mil( "ret:" << ret );
@@ -698,14 +719,30 @@
info.devices_add = boost::join( dev_add, "\n" );
info.devices_rem = boost::join( dev_rem, "\n" );
info.subvol.erase();
+ info.subvol_add.erase();
+ info.subvol_rem.erase();
for( list<Subvolume>::const_iterator i=subvol.begin();
i!=subvol.end(); ++i )
{
- if( !info.subvol.empty() )
- info.subvol += '\n';
- if( !i->deleted() )
- info.subvol += i->path();
+ if( i->deleted() )
+ {
+ if( !info.subvol_rem.empty() )
+ info.subvol_rem += '\n';
+ info.subvol_rem += i->path();
+ }
+ else if( i->created() )
+ {
+ if( !info.subvol_add.empty() )
+ info.subvol_add += '\n';
+ info.subvol_add += i->path();
+ }
+ else
+ {
+ if( !info.subvol.empty() )
+ info.subvol += '\n';
+ info.subvol += i->path();
+ }
}
tinfo = info;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.21.3/storage/Btrfs.h new/libstorage-2.21.4/storage/Btrfs.h
--- old/libstorage-2.21.3/storage/Btrfs.h 2011-06-10 09:24:57.000000000 +0200
+++ new/libstorage-2.21.4/storage/Btrfs.h 2011-08-09 15:39:44.000000000 +0200
@@ -48,6 +48,7 @@
void getDevices( list<string>& devs ) const { devs=devices; }
void getSubvolumes( list<Subvolume>& sv ) const { sv = subvol; }
+ bool existSubvolume( const string& name );
int createSubvolume( const string& name );
int deleteSubvolume( const string& name );
int extendVolume( const string& dev );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.21.3/storage/BtrfsCo.cc new/libstorage-2.21.4/storage/BtrfsCo.cc
--- old/libstorage-2.21.3/storage/BtrfsCo.cc 2011-06-01 10:13:38.000000000 +0200
+++ new/libstorage-2.21.4/storage/BtrfsCo.cc 2011-08-09 15:39:44.000000000 +0200
@@ -112,10 +112,14 @@
else
devs.push_back( *i );
}
- Btrfs* b = new Btrfs( *this, *cv, sum_size, devs );
- y2mil( "alt_names:" << an );
- b->setAltNames( an );
- vols.push_back(b);
+ y2mil( "cv:" << cv << " sum:" << sum_size << " devs:" << devs );
+ if( cv!=NULL )
+ {
+ Btrfs* b = new Btrfs( *this, *cv, sum_size, devs );
+ y2mil( "alt_names:" << an );
+ b->setAltNames( an );
+ vols.push_back(b);
+ }
}
else
y2war( "uuid " << *i << " not found" );
@@ -167,6 +171,17 @@
vols.push_back(b);
}
+bool BtrfsCo::existSubvolume( const string& device, const string& name )
+ {
+ bool ret = false;
+ y2mil( "device:" << device << " name:" << name );
+ BtrfsIter i;
+ if( findBtrfs( device, i ))
+ ret = i->existSubvolume( name );
+ y2mil( "ret:" << ret );
+ return( ret );
+ }
+
int BtrfsCo::createSubvolume( const string& device, const string& name )
{
int ret = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.21.3/storage/BtrfsCo.h new/libstorage-2.21.4/storage/BtrfsCo.h
--- old/libstorage-2.21.3/storage/BtrfsCo.h 2011-06-01 10:13:38.000000000 +0200
+++ new/libstorage-2.21.4/storage/BtrfsCo.h 2011-08-09 15:39:44.000000000 +0200
@@ -46,6 +46,7 @@
void addFromVolume( const Volume& v, string& uuid );
void eraseVolume( Volume* v );
+ bool existSubvolume( const string& device, const string& name );
int createSubvolume( const string& device, const string& name );
int removeSubvolume( const string& device, const string& name );
int extendVolume( const string& device, const string& dev );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.21.3/storage/Dasd.cc new/libstorage-2.21.4/storage/Dasd.cc
--- old/libstorage-2.21.3/storage/Dasd.cc 2011-06-01 10:13:38.000000000 +0200
+++ new/libstorage-2.21.4/storage/Dasd.cc 2011-07-28 12:34:08.000000000 +0200
@@ -349,6 +349,7 @@
ret = DISK_REMOVE_PARTITION_LIST_ERASE;
++pr;
}
+ del_ptable = false;
}
unlink( inpname.c_str() );
y2mil("ret:" << ret);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.21.3/storage/Disk.cc new/libstorage-2.21.4/storage/Disk.cc
--- old/libstorage-2.21.3/storage/Disk.cc 2011-06-01 10:13:38.000000000 +0200
+++ new/libstorage-2.21.4/storage/Disk.cc 2011-07-28 12:34:30.000000000 +0200
@@ -1531,7 +1531,6 @@
Container::getCommitActions( l );
if( del_ptable )
{
- l.remove_if(stage_is(DECREASE));
l.push_front(commitAction(DECREASE, staticType(), setDiskLabelText(false), this, true));
}
}
@@ -1583,6 +1582,7 @@
else
{
del_ptable = false;
+ detected_label = label;
removeFromMemory();
}
if( ret==0 )
@@ -1833,6 +1833,13 @@
{ return( p.type()==LOGICAL && p.created() ); }
+inline unsigned long
+sub_sat(unsigned long a, unsigned long b)
+{
+ return a - min(a, b);
+}
+
+
int Disk::doCreate( Volume* v )
{
Partition * p = dynamic_cast