Hello community,

here is the log from the commit of package libstorage for openSUSE:Factory 
checked in at 2012-12-08 15:52:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libstorage (Old)
 and      /work/SRC/openSUSE:Factory/.libstorage.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libstorage", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libstorage/libstorage.changes    2012-11-08 
08:05:29.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libstorage.new/libstorage.changes       
2012-12-08 15:52:09.000000000 +0100
@@ -1,0 +2,21 @@
+Fri Dec 07 09:49:55 CET 2012 - [email protected]
+
+- escape meta-characters for regular expressions (bnc#792245)
+- 2.23.2
+
+-------------------------------------------------------------------
+Tue Nov 20 15:37:01 CET 2012 - [email protected]
+
+- updated check for parted errors (bnc#790481)
+
+-------------------------------------------------------------------
+Thu Nov 15 11:46:25 CET 2012 - [email protected]
+
+- added another udevadm settle call (bnc#781402)
+
+-------------------------------------------------------------------
+Tue Nov 13 16:33:32 CET 2012 - [email protected]
+
+- remove boost-devel from Requires of libstorage-devel
+
+-------------------------------------------------------------------

Old:
----
  libstorage-2.23.1.tar.bz2

New:
----
  libstorage-2.23.2.tar.bz2

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

Other differences:
------------------
++++++ libstorage.spec ++++++
--- /var/tmp/diff_new_pack.YJPaco/_old  2012-12-08 15:52:10.000000000 +0100
+++ /var/tmp/diff_new_pack.YJPaco/_new  2012-12-08 15:52:10.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           libstorage
-Version:        2.23.1
+Version:        2.23.2
 Release:        0
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source:         libstorage-%{version}.tar.bz2
@@ -169,7 +169,6 @@
 
 %package -n libstorage-devel
 
-Requires:       boost-devel
 Requires:       gcc-c++
 Requires:       libstdc++-devel
 Requires:       libstorage4 = %version

++++++ libstorage-2.23.1.tar.bz2 -> libstorage-2.23.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.23.1/Makefile.in 
new/libstorage-2.23.2/Makefile.in
--- old/libstorage-2.23.1/Makefile.in   2012-11-07 16:25:00.000000000 +0100
+++ new/libstorage-2.23.2/Makefile.in   2012-12-07 16:53:25.000000000 +0100
@@ -681,7 +681,7 @@
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
-       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       chmod -R a-w $(distdir); chmod u+w $(distdir)
        mkdir $(distdir)/_build
        mkdir $(distdir)/_inst
        chmod a-w $(distdir)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.23.1/VERSION 
new/libstorage-2.23.2/VERSION
--- old/libstorage-2.23.1/VERSION       2012-11-07 16:23:39.000000000 +0100
+++ new/libstorage-2.23.2/VERSION       2012-12-07 16:52:36.000000000 +0100
@@ -1 +1 @@
-2.23.1
+2.23.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.23.1/libstorage.spec.in 
new/libstorage-2.23.2/libstorage.spec.in
--- old/libstorage-2.23.1/libstorage.spec.in    2012-06-14 11:03:35.000000000 
+0200
+++ new/libstorage-2.23.2/libstorage.spec.in    2012-11-13 16:41:59.000000000 
+0100
@@ -152,7 +152,7 @@
 %package -n libstorage-devel
 
 Requires:       libstorage@LIBVERSION_MAJOR@ = %version
-Requires:       gcc-c++ libstdc++-devel boost-devel libxml2-devel
+Requires:       gcc-c++ libstdc++-devel libxml2-devel
 Summary:        Header files and documentation for libstorage
 Group:          Development/Languages/C and C++
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.23.1/storage/Dasdview.cc 
new/libstorage-2.23.2/storage/Dasdview.cc
--- old/libstorage-2.23.1/storage/Dasdview.cc   2012-06-14 11:03:35.000000000 
+0200
+++ new/libstorage-2.23.2/storage/Dasdview.cc   2012-12-03 14:38:44.000000000 
+0100
@@ -124,7 +124,7 @@
        {
            scanGeometry(cmd);
 
-           Regex part("^" + device + "[0123456789]+$");
+           Regex part("^" + Regex::escape(device) + "[0123456789]+$");
            cmd.select( device );
            int cnt = cmd.numLines();
            for (int i = 0; i < cnt; ++i)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.23.1/storage/Disk.cc 
new/libstorage-2.23.2/storage/Disk.cc
--- old/libstorage-2.23.1/storage/Disk.cc       2012-11-05 18:36:38.000000000 
+0100
+++ new/libstorage-2.23.2/storage/Disk.cc       2012-12-03 16:18:28.000000000 
+0100
@@ -417,6 +417,11 @@
        y2mil( "resetting retcode cmd " << ret << " of:" << cmd_line );
        ret = 0;
        }
+    if( ret!=0 && tmp.find( "Error informing the kernel about modifications" 
)!=string::npos )
+       {
+       y2mil( "resetting retcode cmd " << ret << " of:" << cmd_line );
+       ret = 0;
+       }
     if( ret != 0 )
         {
        if( dmp_slave && tmp.empty() )
@@ -530,7 +535,7 @@
     {
        // does not work for device-mapper based disks
 
-       string reg = "^" + dev + partNaming(dev) + "[0-9]+" "$";
+       string reg = "^" + Regex::escape(dev) + partNaming(dev) + "[0-9]+" "$";
        list<string> ps = parts.getMatchingEntries(regex_matches(reg));
        y2mil("dev:" << dev << " reg:\"" << reg << "\" ps:" << ps);
        return ps;
@@ -1973,6 +1978,9 @@
                    if( execCheckFailed( tmp ) )
                        {
                        ret = DISK_CREATE_PARTITION_PARTED_FAILED;
+
+                       // used to analyse parted problems
+                       SystemCmd c(PARTEDCMD + quote(device()) + " unit s 
print");
                        }
                    }
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.23.1/storage/LvmVg.cc 
new/libstorage-2.23.2/storage/LvmVg.cc
--- old/libstorage-2.23.1/storage/LvmVg.cc      2012-08-30 17:02:23.000000000 
+0200
+++ new/libstorage-2.23.2/storage/LvmVg.cc      2012-11-15 11:55:52.000000000 
+0100
@@ -1598,6 +1598,7 @@
        ret = v->prepareRemove();
        if( ret==0 )
            {
+           Storage::waitForDevice();
            string cmd = LVREMOVEBIN " -f " + instSysString() + " " + 
quote(l->device());
            SystemCmd c( cmd );
            if( c.retcode()!=0 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.23.1/storage/PeContainer.cc 
new/libstorage-2.23.2/storage/PeContainer.cc
--- old/libstorage-2.23.1/storage/PeContainer.cc        2012-08-22 
13:11:17.000000000 +0200
+++ new/libstorage-2.23.2/storage/PeContainer.cc        2012-12-03 
14:38:12.000000000 +0100
@@ -29,7 +29,6 @@
 #include "storage/Storage.h"
 #include "storage/SystemCmd.h"
 #include "storage/StorageDefines.h"
-#include "storage/Regex.h"
 
 
 namespace storage
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.23.1/storage/Regex.cc 
new/libstorage-2.23.2/storage/Regex.cc
--- old/libstorage-2.23.1/storage/Regex.cc      2012-06-14 11:03:35.000000000 
+0200
+++ new/libstorage-2.23.2/storage/Regex.cc      2012-12-03 16:19:41.000000000 
+0100
@@ -22,6 +22,8 @@
 
 #include "storage/Regex.h"
 
+#include <boost/algorithm/string.hpp>
+
 extern int _nl_msg_cat_cntr;
 
 
@@ -33,7 +35,9 @@
       cflags (cflags),
       nm (cflags & REG_NOSUB ? 0 : nm)
 {
-    regcomp (&rx, pattern, cflags);
+    if (regcomp (&rx, pattern, cflags) != 0)
+       throw regex_error();
+
     my_nl_msg_cat_cntr = _nl_msg_cat_cntr;
     rm = new regmatch_t[nm];
 }
@@ -44,7 +48,9 @@
       cflags (cflags),
       nm (cflags & REG_NOSUB ? 0 : nm)
 {
-    regcomp (&rx, pattern.c_str (), cflags);
+    if (regcomp (&rx, pattern.c_str (), cflags) != 0)
+       throw regex_error();
+
     my_nl_msg_cat_cntr = _nl_msg_cat_cntr;
     rm = new regmatch_t[nm];
 }
@@ -95,6 +101,32 @@
 }
 
 
+string
+Regex::escape(const string& str)
+{
+    string ret = str;
+
+    boost::replace_all(ret, "\\", "\\\\");
+
+    boost::replace_all(ret, "{", "\\{");
+    boost::replace_all(ret, "}", "\\}");
+    boost::replace_all(ret, "[", "\\[");
+    boost::replace_all(ret, "]", "\\]");
+    boost::replace_all(ret, "(", "\\(");
+    boost::replace_all(ret, ")", "\\)");
+    boost::replace_all(ret, "|", "\\|");
+
+    boost::replace_all(ret, "*", "\\*");
+    boost::replace_all(ret, "+", "\\+");
+    boost::replace_all(ret, "?", "\\?");
+    boost::replace_all(ret, ".", "\\.");
+    boost::replace_all(ret, "^", "\\^");
+    boost::replace_all(ret, "$", "\\$");
+
+    return ret;
+}
+
+
 const string Regex::ws = "[ \t]*";
 const string Regex::number = "[0123456789]+";
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.23.1/storage/Regex.h 
new/libstorage-2.23.2/storage/Regex.h
--- old/libstorage-2.23.1/storage/Regex.h       2012-06-14 11:03:35.000000000 
+0200
+++ new/libstorage-2.23.2/storage/Regex.h       2012-12-05 14:06:49.000000000 
+0100
@@ -26,6 +26,7 @@
 
 #include <regex.h>
 #include <string>
+#include <stdexcept>
 #include <boost/noncopyable.hpp>
 
 
@@ -34,6 +35,13 @@
     using std::string;
 
 
+    class regex_error : public std::runtime_error
+    {
+    public:
+       regex_error() : std::runtime_error("regex error") {}
+    };
+
+
 class Regex : boost::noncopyable
 {
 public:
@@ -55,6 +63,8 @@
     static const string ws;
     static const string number;
 
+    static string escape(const string& str); // only for REG_EXTENDED
+
 private:
 
     const string pattern;

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

Reply via email to