Accepting request 977693 from home:susnux:branches:Base:System

Update to 1.0.0.rc16 patch level 3

OBS-URL: https://build.opensuse.org/request/show/977693
OBS-URL: https://build.opensuse.org/package/show/Base:System/dmraid?expand=0&rev=62
This commit is contained in:
Neil Brown 2022-05-30 00:22:02 +00:00 committed by Git OBS Bridge
parent 5ebe956598
commit 13429be4ec
10 changed files with 34 additions and 6517 deletions

BIN
dmraid-1.0.0.rc16-3.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f849c44d041f8891c61419ddf906e6e34b44948939ae9e550be662ffc2492255
size 1042907

View File

@ -1,65 +0,0 @@
--- 1.0.0.rc16.orig/include/Makefile.in
+++ 1.0.0.rc16/include/Makefile.in
@@ -17,8 +17,8 @@ include $(top_srcdir)/make.tmpl
install_dmraid_headers: $(HEADERS)
@echo "Installing $(HEADERS) in $(includedir)/dmraid"
- mkdir -p $(includedir)/dmraid
- $(INSTALL) $(STRIP) $(HEADERS) $(includedir)/dmraid
+ mkdir -p $(DESTDIR)$(includedir)/dmraid
+ $(INSTALL) $(STRIP) $(HEADERS) $(DESTDIR)$(includedir)/dmraid
install: install_dmraid_headers
--- 1.0.0.rc16.orig/lib/Makefile.in
+++ 1.0.0.rc16/lib/Makefile.in
@@ -78,16 +78,16 @@ $(LIB_EVENTS_SHARED):
install_dmraid_libs: $(INSTALL_TARGETS)
@echo "Installing $(INSTALL_TARGETS) in $(libdir)"; \
- mkdir -p $(libdir); \
+ mkdir -p $(DESTDIR)$(libdir); \
for f in $(INSTALL_TARGETS); \
do \
n=$$(basename $${f}) ; \
if [[ "$$n" =~ .so$$ && ! "$$n" =~ libdmraid-events-.* ]]; then \
$(INSTALL) -m 555 $(STRIP) \
- $$f $(libdir)/$${n}.@DMRAID_LIB_VERSION@; \
- $(LN_S) -f $${n}.@DMRAID_LIB_VERSION@ $(libdir)/$${n}; \
+ $$f $(DESTDIR)$(libdir)/$${n}.@DMRAID_LIB_VERSION@; \
+ $(LN_S) -f $${n}.@DMRAID_LIB_VERSION@ $(DESTDIR)$(libdir)/$${n}; \
else \
- $(INSTALL) -m 555 $(STRIP) $$f $(libdir)/$${n}; \
+ $(INSTALL) -m 555 $(STRIP) $$f $(DESTDIR)$(libdir)/$${n}; \
fi \
done
--- 1.0.0.rc16.orig/tools/Makefile.in
+++ 1.0.0.rc16/tools/Makefile.in
@@ -80,8 +80,8 @@ dmevent_tool: $(top_srcdir)/lib/libdmrai
install_dmraid_tools: $(TARGETS)
@echo "Installing $(TARGETS) in $(sbindir)"; \
- mkdir -p $(sbindir); \
- $(INSTALL) $(STRIP) $(TARGETS) $(sbindir)
+ mkdir -p $(DESTDIR)$(sbindir); \
+ $(INSTALL) $(STRIP) $(TARGETS) $(DESTDIR)$(sbindir)
install: install_dmraid_tools
--- 1.0.0.rc16.orig/man/Makefile.in
+++ 1.0.0.rc16/man/Makefile.in
@@ -17,11 +17,11 @@ include $(top_srcdir)/make.tmpl
install_dmraid_man:
@echo "Installing $(MAN8) in $(MAN8DIR)"; \
- mkdir -p $(MAN8DIR); \
+ mkdir -p $(DESTDIR)$(MAN8DIR); \
for f in $(MAN8); \
do \
$(RM) $(MAN8DIR)/$$f; \
- @INSTALL@ -D -m 444 $$f $(MAN8DIR)/$$f; \
+ @INSTALL@ -D -m 444 $$f $(DESTDIR)$(MAN8DIR)/$$f; \
done
install: install_dmraid_man

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue May 17 07:54:00 UTC 2022 - Ferdinand Thiessen <rpm@fthiessen.de>
- Update to 1.0.0.rc16 patch level 3
- Drop upstream fixed and resolved dmraid-destdir.patch,
dmraid-1.0.0.rc16-cvs-2010-02-02.patch, lib-install.patch,
fix-return-function-type.patch and handle_spaces
- Drop remove_trylock, only required for very old glibc versions
(openSUSE 11.x)
-------------------------------------------------------------------
Tue Nov 17 13:59:10 UTC 2020 - Ludwig Nussel <lnussel@suse.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package dmraid
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -39,28 +39,23 @@ BuildRequires: zlib-devel
Requires: aaa_base
Requires: kpartx
Requires(post): coreutils
Requires(postun): coreutils
Requires(postun):coreutils
URL: http://people.redhat.com/~heinzm/sw/dmraid/src/
Summary: A Device-Mapper Software RAID Support Tool
License: GPL-2.0-only
Version: 1.0.0.rc16
Version: 1.0.0.rc16.3
%define src_version 1.0.0.rc16-3
Release: 0
Source: ftp://people.redhat.com/heinzm/sw/dmraid/src/dmraid-%{version}.tar.bz2
Source: https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-%{src_version}.tar.bz2
Source1: sysconfig.dmraid
Source3: README.SUSE
Source6: dmraid-activation.service
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
Patch6: rebuild.fix
Patch7: ddf-erase
Patch8: dmraid-move-var-lock-to-run-lock.patch
Patch9: dmraid-destdir.patch
Patch10: fix-undefined-symbol.patch
Patch11: 0001-remove-partitions-with-O_RDONLY.patch
Patch12: fix-return-function-type.patch
Patch0: dmraid-1.0.0.rc13-geometry.patch
Patch1: rebuild.fix
Patch2: ddf-erase
Patch3: dmraid-move-var-lock-to-run-lock.patch
Patch4: fix-undefined-symbol.patch
Patch5: 0001-remove-partitions-with-O_RDONLY.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %fillup_prereq
@ -99,19 +94,13 @@ dmraid uses libdevmapper and the device-mapper kernel runtime to create
devices with respective mappings for the ATARAID sets discovered.
%prep
%setup -n dmraid/%{version}
%setup -n dmraid/%{src_version}/dmraid
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p2
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p2
%patch12 -p2
cp %{SOURCE3} .
@ -120,6 +109,7 @@ cp %{SOURCE3} .
autoreconf -fi
rm -r autom4te.cache
%configure \
--with-usrlibdir=%{_libdir} \
%if !0%{?usrmerged}
--sbindir=%{sbindir} \
%endif
@ -128,10 +118,10 @@ rm -r autom4te.cache
make
%install
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT/%_libdir/libdmraid.a
mkdir -p $RPM_BUILD_ROOT%{_fillupdir}
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_fillupdir}/sysconfig.dmraid
%make_install
rm -f %{buildroot}%{_libdir}/libdmraid.a
mkdir -p %{buildroot}%{_fillupdir}
install -m644 %{SOURCE1} %{buildroot}%{_fillupdir}/sysconfig.dmraid
install -D -m 0644 %{S:6} %{buildroot}%{_unitdir}/dmraid-activation.service
install -d %{buildroot}%{_tmpfilesdir}
echo 'd /run/lock/dmraid 0700 root root -' > %{buildroot}%{_tmpfilesdir}/dmraid.conf
@ -166,15 +156,16 @@ chmod -x %{buildroot}%{_prefix}/include/dmraid/*h
%{_mandir}/man8/*
%doc LICENSE LICENSE_GPL LICENSE_LGPL README README.SUSE TODO doc/*
%{_fillupdir}/sysconfig.dmraid
%{_libdir}/libdmraid.so.*
%{_libdir}/libdmraid-events-isw.so
%{_libdir}/libdmraid.so.1.0.0.rc16-3
%dir %{_libdir}/device-mapper
%{_libdir}/device-mapper/libdmraid-events-isw.so
%dir %{_tmpfilesdir}
%{_tmpfilesdir}/dmraid.conf
%{_unitdir}/dmraid-activation.service
%files devel
%defattr(-, root, root)
%dir %{_prefix}/include/dmraid
%{_prefix}/include/dmraid
%{_libdir}/libdmraid.so

View File

@ -1,13 +0,0 @@
diff --git a/1.0.0.rc16/tools/dmevent_tool.c b/1.0.0.rc16/tools/dmevent_tool.c
index 8562098..cffb5ab 100644
--- a/1.0.0.rc16/tools/dmevent_tool.c
+++ b/1.0.0.rc16/tools/dmevent_tool.c
@@ -123,7 +123,7 @@ void _test_user_id(void)
}
/* Increment option counters. */
-static _process_opt(int opt, const char *cmd)
+static void _process_opt(int opt, const char *cmd)
{
struct opt_def_struct {
const char opt; /* Option character. */

View File

@ -1,73 +0,0 @@
---
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)

View File

@ -1,30 +0,0 @@
Fix two issues with installing shared libraries.
1/ the [[ =~ ]] operator only treats the RHS as a regular expression
if it isn't quoted. So we need to remove the quotes.
2/ The libdmraid-event-* library is not a shared library in the regular
sense. i.e. programs are not linked against it and so do not have the
library version number encoded in them.
Rather, this is a shared-object that is explicitly loaded by dmeventd
on request from dmraid. dmraid asks for "libdmraid-event-ism.so", so
that is the only name that the shared object should be stored under.
Providing a name with a trailing version number just makes it look like
something that it is not.
Signed-off-by: NeilBrown <neilb@suse.de>
---
lib/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- dmraid.orig/lib/Makefile.in
+++ dmraid/lib/Makefile.in
@@ -82,7 +82,7 @@ install_dmraid_libs: $(INSTALL_TARGETS)
for f in $(INSTALL_TARGETS); \
do \
n=$$(basename $${f}) ; \
- if [[ "$$n" =~ '.so$$' ]]; then \
+ if [[ "$$n" =~ .so$$ && ! "$$n" =~ libdmraid-events-.* ]]; then \
$(INSTALL) -m 555 $(STRIP) \
$$f $(libdir)/$${n}.@DMRAID_LIB_VERSION@; \
$(LN_S) -f $${n}.@DMRAID_LIB_VERSION@ $(libdir)/$${n}; \

View File

@ -1,35 +0,0 @@
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 <neilb@suse.de>
---
1.0.0.rc16/lib/events/libdmraid-events-isw.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
--- dmraid.orig/1.0.0.rc16/lib/events/libdmraid-events-isw.c
+++ dmraid/1.0.0.rc16/lib/events/libdmraid-events-isw.c
@@ -1433,11 +1433,7 @@ void process_event(struct dm_task *dmt,
/*
* Make sure, events are processed sequentially per RAID set.
*/
- if (pthread_mutex_trylock(&rs->event_mutex)) {
- syslog(LOG_NOTICE,
- " Another thread is handling an event. Waiting...");
- pthread_mutex_lock(&rs->event_mutex);
- }
+ pthread_mutex_lock(&rs->event_mutex);
do {
next = dm_get_next_target(dmt, next, &start, &length,