Hello community,
here is the log from the commit of package dmraid for openSUSE:Factory
checked in at Fri May 7 15:41:52 CEST 2010.
--------
--- dmraid/dmraid.changes 2010-02-02 04:52:17.000000000 +0100
+++ /mounts/work_src_done/STABLE/dmraid/dmraid.changes 2010-04-20 01:14:38.000000000 +0200
@@ -1,0 +2,8 @@
+Mon Apr 19 23:11:39 UTC 2010 - nfbrown@novell.com
+
+- handle_space: cope with arrays with spaces in the name stored
+ in the metadata (bnc#470696)
+- remove_trylock: pthreads_mutex_trylock is still very new in
+ glibc so safest not to use it yet (bnc#594388)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
New:
----
handle_spaces
remove_trylock
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ dmraid.spec ++++++
--- /var/tmp/diff_new_pack.GHxetk/_old 2010-05-07 15:40:03.000000000 +0200
+++ /var/tmp/diff_new_pack.GHxetk/_new 2010-05-07 15:40:03.000000000 +0200
@@ -28,7 +28,7 @@
AutoReqProv: on
Summary: A Device-Mapper Software RAID Support Tool
Version: 1.0.0.rc16
-Release: 1
+Release: 2
Source: ftp://people.redhat.com/heinzm/sw/dmraid/src/dmraid-%{version}.tar.bz2
Source1: sysconfig.dmraid
Source2: boot.dmraid
@@ -38,6 +38,8 @@
Patch1: dmraid-1.0.0.rc16-cvs-2010-02-02.patch
Patch2: dmraid-1.0.0.rc13-geometry.patch
Patch3: lib-install.patch
+Patch4: handle_spaces
+Patch5: remove_trylock
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %fillup_prereq
@@ -72,6 +74,8 @@
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
+%patch5 -p2
cp %{SOURCE3} .
%build
++++++ handle_spaces ++++++
---
include/dmraid/misc.h | 1 +
lib/format/ataraid/isw.c | 7 ++++++-
lib/format/ddf/ddf1.c | 1 +
lib/misc/misc.c | 14 ++++++++++++++
4 files changed, 22 insertions(+), 1 deletion(-)
--- 1.0.0.rc16.orig/include/dmraid/misc.h
+++ 1.0.0.rc16/include/dmraid/misc.h
@@ -18,6 +18,7 @@ extern void libdmraid_exit(struct lib_co
extern void sysfs_workaround(struct lib_context *lc);
extern void mk_alpha(struct lib_context *lc, char *str, size_t len);
+extern void mk_alphanum(struct lib_context *lc, char *str, size_t len);
extern char *get_basename(struct lib_context *lc, char *str);
extern char *get_dirname(struct lib_context *lc, char *str);
extern char *remove_white_space(struct lib_context *lc, char *str, size_t len);
--- 1.0.0.rc16.orig/lib/format/ataraid/isw.c
+++ 1.0.0.rc16/lib/format/ataraid/isw.c
@@ -169,6 +169,7 @@ static size_t
_name(struct lib_context *lc, struct isw *isw, char *str, size_t len,
enum name_type nt, int num, struct isw_dev *dev, struct raid_dev *rd)
{
+ int n;
struct {
const char *fmt, *what;
} formats[] = {
@@ -189,7 +190,11 @@ _name(struct lib_context *lc, struct isw
f += (is_raid10(dev) ? 1 : 0);
}
- return snprintf(str, len, f->fmt, isw->family_num, f->what, num);
+ n = snprintf(str, len, f->fmt, isw->family_num, f->what, num);
+ /* As '->volume' could contain anything, we need to sanitise the name */
+ if (str)
+ mk_alphanum(lc, str, n);
+ return n;
}
static char *
--- 1.0.0.rc16.orig/lib/format/ddf/ddf1.c
+++ 1.0.0.rc16/lib/format/ddf/ddf1.c
@@ -689,6 +689,7 @@ name(struct lib_context *lc, struct ddf1
i = prefix + 16;
while (!isgraph(buf[--i]));
buf[i + 1] = 0;
+ mk_alphanum(lc, buf, i);
} else {
char *b;
--- 1.0.0.rc16.orig/lib/misc/misc.c
+++ 1.0.0.rc16/lib/misc/misc.c
@@ -66,6 +66,20 @@ mk_alpha(struct lib_context *lc, char *s
}
}
+/* Convert a string to only have alphanum or '-' or '_'.
+ * All others become '_'
+ */
+void
+mk_alphanum(struct lib_context *lc, char *str, size_t len)
+{
+ for (; len && *str; len--, str++) {
+ if (!isalnum(*str) &&
+ *str != '-' &&
+ *str != '_')
+ *str = '_';
+ }
+}
+
/* Remove any whitespace from a string. */
char *
remove_white_space(struct lib_context *lc, char *str, size_t size)
++++++ remove_trylock ++++++
Remove call to pthreads_mutex_trylock
Reference bnc
594388
This appears only to be in very recent releases of glibc.
Its presence causes
/sbin/dmraid -ay -p
The dynamic shared library "libdmraid-events-isw.so" could not be loaded:
/lib/libdmraid-events-isw.so: undefined symbol: pthread_mutex_trylock
on openSUSE 11.3, it is is not used for anything except a simple
logging message.
Signed-off-by: NeilBrown