commit libstorage for openSUSE:Factory
Hello community, here is the log from the commit of package libstorage for openSUSE:Factory checked in at 2013-02-21 10:42:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libstorage (Old) and /work/SRC/openSUSE:Factory/.libstorage.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "libstorage", Maintainer is "ASchnell@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/libstorage/libstorage.changes 2013-02-19 13:37:02.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libstorage.new/libstorage.changes 2013-02-21 10:42:17.000000000 +0100 @@ -1,0 +2,12 @@ +Wed Feb 20 18:09:17 CET 2013 - fehr@suse.de + +- version 2.23.6 +- recognize /dev/disk-by-id/dm-name-<nm> as alias to + /dev/mapper/<dm> + +------------------------------------------------------------------- +Tue Feb 19 15:57:52 CET 2013 - aschnell@suse.de + +- use option -f for vgremove (bnc#781402) + +------------------------------------------------------------------- Old: ---- libstorage-2.23.5.tar.bz2 New: ---- libstorage-2.23.6.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libstorage.spec ++++++ --- /var/tmp/diff_new_pack.GAutVs/_old 2013-02-21 10:42:19.000000000 +0100 +++ /var/tmp/diff_new_pack.GAutVs/_new 2013-02-21 10:42:19.000000000 +0100 @@ -17,7 +17,7 @@ Name: libstorage -Version: 2.23.5 +Version: 2.23.6 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: libstorage-%{version}.tar.bz2 ++++++ libstorage-2.23.5.tar.bz2 -> libstorage-2.23.6.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.23.5/VERSION new/libstorage-2.23.6/VERSION --- old/libstorage-2.23.5/VERSION 2013-02-19 12:02:36.000000000 +0100 +++ new/libstorage-2.23.6/VERSION 2013-02-20 19:02:41.000000000 +0100 @@ -1 +1 @@ -2.23.5 +2.23.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.23.5/storage/AppUtil.cc new/libstorage-2.23.6/storage/AppUtil.cc --- old/libstorage-2.23.5/storage/AppUtil.cc 2013-01-22 11:28:07.000000000 +0100 +++ new/libstorage-2.23.6/storage/AppUtil.cc 2013-02-20 18:26:33.000000000 +0100 @@ -413,6 +413,14 @@ } } +string afterLast(const string& s, const string& pat ) + { + string ret(s); + string::size_type pos = s.find_last_of(pat); + if( pos!=string::npos ) + ret.erase( 0, pos+pat.length() ); + return( ret ); + } string udevAppendPart(const string& s, unsigned num) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.23.5/storage/AppUtil.h new/libstorage-2.23.6/storage/AppUtil.h --- old/libstorage-2.23.5/storage/AppUtil.h 2013-01-22 11:28:07.000000000 +0100 +++ new/libstorage-2.23.6/storage/AppUtil.h 2013-02-20 18:26:33.000000000 +0100 @@ -69,6 +69,7 @@ const string& removeSur = " \t\n" ); string udevAppendPart(const string&, unsigned num); + string afterLast(const string& s, const string& pat ); string udevEncode(const string&); string udevDecode(const string&); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.23.5/storage/Dm.cc new/libstorage-2.23.6/storage/Dm.cc --- old/libstorage-2.23.5/storage/Dm.cc 2013-01-22 11:28:07.000000000 +0100 +++ new/libstorage-2.23.6/storage/Dm.cc 2013-02-20 18:26:33.000000000 +0100 @@ -219,11 +219,7 @@ { getMajorMinor(); if( majorNr()==Dm::dmMajor() ) - { - string d = "/dev/dm-" + decString(minorNr()); - if( d!=dev ) - replaceAltName( "/dev/dm-", d ); - } + addDmNames(minorNr()); num = mnr; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.23.5/storage/DmPart.cc new/libstorage-2.23.6/storage/DmPart.cc --- old/libstorage-2.23.5/storage/DmPart.cc 2013-01-22 11:28:07.000000000 +0100 +++ new/libstorage-2.23.6/storage/DmPart.cc 2013-02-20 18:26:33.000000000 +0100 @@ -84,7 +84,7 @@ getMajorMinor(); if (mjr != old_mjr || mnr != old_mnr) { - replaceAltName("/dev/dm-", "/dev/dm-" + decString(mnr)); + addDmNames(mnr); getTableInfo(); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.23.5/storage/Loop.cc new/libstorage-2.23.6/storage/Loop.cc --- old/libstorage-2.23.5/storage/Loop.cc 2013-01-22 11:28:07.000000000 +0100 +++ new/libstorage-2.23.6/storage/Loop.cc 2013-02-20 18:26:33.000000000 +0100 @@ -146,7 +146,6 @@ if( active ) { getMajorMinor(); - replaceAltName( "/dev/dm-", "/dev/dm-"+decString(mnr) ); } Volume::setDmcryptDev( dm_dev, active ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.23.5/storage/LvmVg.cc new/libstorage-2.23.6/storage/LvmVg.cc --- old/libstorage-2.23.5/storage/LvmVg.cc 2013-01-22 11:28:07.000000000 +0100 +++ new/libstorage-2.23.6/storage/LvmVg.cc 2013-02-19 16:06:32.000000000 +0100 @@ -1405,7 +1405,7 @@ activate(true); getStorage()->showInfoCb(removeText(true),silent); checkConsistency(); - string cmd = VGREMOVEBIN " " + quote(name()); + string cmd = VGREMOVEBIN " -f " + quote(name()); SystemCmd c( cmd ); if( c.retcode()!=0 ) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.23.5/storage/Storage.cc new/libstorage-2.23.6/storage/Storage.cc --- old/libstorage-2.23.5/storage/Storage.cc 2013-01-22 11:28:07.000000000 +0100 +++ new/libstorage-2.23.6/storage/Storage.cc 2013-02-20 18:26:33.000000000 +0100 @@ -6763,7 +6763,7 @@ findVolume( dev, v ) ) { v->setDmcryptDevEnc( dm, typ, siz!=0 ); - v->replaceAltName( "/dev/dm-", Dm::dmDeviceName(dmnum) ); + v->addDmNames(dmnum); v->setSize( siz ); ret = true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.23.5/storage/Volume.cc new/libstorage-2.23.6/storage/Volume.cc --- old/libstorage-2.23.5/storage/Volume.cc 2013-01-22 11:28:07.000000000 +0100 +++ new/libstorage-2.23.6/storage/Volume.cc 2013-02-20 18:26:33.000000000 +0100 @@ -225,16 +225,34 @@ y2mil( "dev:" << dev << " dm:" << dm << " active:" << active ); dmcrypt_dev = dm; dmcrypt_active = active; + if( active ) + { + unsigned long dummy, minor; + storage::getMajorMinor( dmcrypt_dev, dummy, minor ); + addDmNames(minor); + } + else + removeDmNames(); y2mil( "this:" << *this ); } void Volume::setDmcryptDevEnc( const string& dm, storage::EncryptType typ, bool active ) { - y2mil("dev:" << dev << " dm:" << dm << " enc_type:" << toString(typ) << " active:" << active); - dmcrypt_dev = dm; - encryption = orig_encryption = typ; - dmcrypt_active = active; - y2mil( "this:" << *this ); + y2mil("enc_type:" << toString(typ)); + setDmcryptDev(dm,active); + } + +void Volume::addDmNames( unsigned long minor ) + { + replaceAltName( "/dev/dm-", Dm::dmDeviceName(minor) ); + replaceAltName( "/dev/disk/by-id/dm-name-", + "/dev/disk/by-id/dm-name-"+afterLast(dmcrypt_dev,"/")); + } + +void Volume::removeDmNames() + { + replaceAltName( "/dev/dm-", "" ); + replaceAltName( "/dev/disk/by-id/dm-name-", "" ); } const string& Volume::mountDevice() const @@ -1324,6 +1342,7 @@ ret = VOLUME_CRYPTUNSETUP_FAILED; dmcrypt_active = false; } + removeDmNames(); } return( ret ); } @@ -2361,17 +2380,9 @@ dmcrypt_active = true; unsigned long dummy, minor; if (cType() == LOOP) - { getMajorMinor(); - minor = mnr; - replaceAltName( "/dev/dm-", Dm::dmDeviceName(mnr) ); - } - else - { - storage::getMajorMinor( dmcrypt_dev, dummy, minor ); - replaceAltName("/dev/dm-", Dm::dmDeviceName(minor)); - } - + storage::getMajorMinor( dmcrypt_dev, dummy, minor ); + addDmNames(minor); ProcParts parts; unsigned long long sz; if (parts.getSize( Dm::dmDeviceName(minor), sz)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.23.5/storage/Volume.h new/libstorage-2.23.6/storage/Volume.h --- old/libstorage-2.23.5/storage/Volume.h 2013-01-22 11:28:07.000000000 +0100 +++ new/libstorage-2.23.6/storage/Volume.h 2013-02-20 18:26:33.000000000 +0100 @@ -229,6 +229,8 @@ bool getLoopFile( string& fname ) const; void setExtError( const SystemCmd& cmd, bool serr=true ); string getDmcryptName() const; + void addDmNames(unsigned long minor); + void removeDmNames(); bool needLosetup( bool urgent ) const; bool needCryptsetup() const; int doLosetup(); -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de