Accepting request 42387 from Base:System

Copy from Base:System/multipath-tools based on submit request 42387 from user elvigia

OBS-URL: https://build.opensuse.org/request/show/42387
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/multipath-tools?expand=0&rev=32
This commit is contained in:
OBS User autobuild 2010-07-02 14:04:17 +00:00 committed by Git OBS Bridge
commit 2833f47377
4 changed files with 67 additions and 3 deletions

23
libdir.diff Normal file
View File

@ -0,0 +1,23 @@
Ouch, ouch, ouch!
Since when is the presence of a directory an indicator for whether
a 64- or 32-bit library is to be built. Or inspected, for that
matter.
---
libmultipath/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: multipath-tools-0.4.8/libmultipath/Makefile
===================================================================
--- multipath-tools-0.4.8.orig/libmultipath/Makefile
+++ multipath-tools-0.4.8/libmultipath/Makefile
@@ -14,7 +14,7 @@ OBJS = memory.o parser.o vector.o devmap
log.o configure.o structs_vec.o sysfs.o prio.o checkers.o \
lock.o waiter.o
-LIBDM_API_FLUSH = $(shell if test -d /lib64 ; then objdump -T /lib64/libdevmapper.so* ; else objdump -T /lib/libdevmapper.so.* ; fi | grep -c dm_task_no_flush)
+LIBDM_API_FLUSH = $(shell objdump -T ${LIB}/libdevmapper.so* | grep -c dm_task_no_flush)
CFLAGS += -D_GNU_SOURCE
ifneq ($(strip $(LIBDM_API_FLUSH)),0)

30
mpt-ucred.diff Normal file
View File

@ -0,0 +1,30 @@
We need _GNU_SOURCE even when dmapi is not there.
cc -O2 -g -m32 -mtune=ultrasparc -fPIC -DLIB_STRING=\"lib64\"
-c -o uevent.o uevent.c
uevent.c: In function 'uevent_listen':
uevent.c:262: error: invalid application of 'sizeof' to
incomplete type 'struct ucred'
uevent.c:290: error: dereferencing pointer to incomplete type
uevent.c:291: error: dereferencing pointer to incomplete type
---
libmultipath/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: multipath-tools-0.4.8/libmultipath/Makefile
===================================================================
--- multipath-tools-0.4.8.orig/libmultipath/Makefile
+++ multipath-tools-0.4.8/libmultipath/Makefile
@@ -16,8 +16,9 @@ OBJS = memory.o parser.o vector.o devmap
LIBDM_API_FLUSH = $(shell if test -d /lib64 ; then objdump -T /lib64/libdevmapper.so* ; else objdump -T /lib/libdevmapper.so.* ; fi | grep -c dm_task_no_flush)
+CFLAGS += -D_GNU_SOURCE
ifneq ($(strip $(LIBDM_API_FLUSH)),0)
- CFLAGS += -DLIBDM_API_FLUSH -D_GNU_SOURCE
+ CFLAGS += -DLIBDM_API_FLUSH
endif
all: $(LIBS)

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Jun 30 16:19:00 UTC 2010 - jengelh@medozas.de
- fix compilation on bi-arch by specifying LIB=%_lib
(Makefiles would erroneously assume a 64-bit target just by the
sheer presence of lib64, which is wrong)
- always add in -D_GNU_SOURCE to get at struct ucred
-------------------------------------------------------------------
Fri Feb 26 12:37:10 UTC 2010 - coolo@novell.com

View File

@ -27,13 +27,15 @@ Requires: device-mapper kpartx
PreReq: %insserv_prereq %fillup_prereq coreutils grep
AutoReqProv: on
Version: 0.4.8
Release: 46
Release: 47
Summary: Tools to Manage Multipathed Devices with the device-mapper
Source: multipath-tools-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Patch0: %{name}-%{version}-opensuse-11.2.diff.bz2
Patch1: remove-stacked-partitions.diff
Patch2: fixbuffers.diff
Patch3: mpt-ucred.diff
Patch4: libdir.diff
%description
This package provides the tools to manage multipathed devices by
@ -77,15 +79,16 @@ Authors:
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch -P 3 -P 4 -p1
%build
# This package failed when testing with -Wl,-as-needed being default.
# So we disable it here, if you want to retest, just delete this comment and the line below.
export SUSE_ASNEEDED=0
make OPTFLAGS="$RPM_OPT_FLAGS"
make OPTFLAGS="$RPM_OPT_FLAGS" LIB=%_lib
%install
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=$RPM_BUILD_ROOT LIB=%_lib install
mkdir -p $RPM_BUILD_ROOT/var/cache/multipath/
%clean