From 8c75d20a48abfcf3d9038c22f255118bdd04773968b6e653752c4638b8bb5383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Mon, 4 Apr 2011 18:36:49 +0000 Subject: [PATCH] Accepting request 65973 from home:elvigia:branches:Base:System OBS-URL: https://build.opensuse.org/request/show/65973 OBS-URL: https://build.opensuse.org/package/show/Base:System/multipath-tools?expand=0&rev=21 --- multipath-tools-0.4.8-asneeded.patch | 64 ++++++++++++++++++++++++++++ multipath-tools.changes | 5 +++ multipath-tools.spec | 8 ++-- 3 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 multipath-tools-0.4.8-asneeded.patch diff --git a/multipath-tools-0.4.8-asneeded.patch b/multipath-tools-0.4.8-asneeded.patch new file mode 100644 index 0000000..b353aca --- /dev/null +++ b/multipath-tools-0.4.8-asneeded.patch @@ -0,0 +1,64 @@ +--- multipathd/Makefile.orig ++++ multipathd/Makefile +@@ -5,8 +5,8 @@ include ../Makefile.inc + # + # basic flags setting + # +-CFLAGS += -I$(multipathdir) +-LDFLAGS += -lpthread -ldevmapper -lreadline -lncurses -ldl \ ++CFLAGS += -pthread -I$(multipathdir) ++LDFLAGS += -ldevmapper -lreadline -lncurses -ldl \ + -lmultipath -L$(multipathdir) + + # +@@ -28,7 +28,7 @@ OBJS = main.o pidfile.o uxlsnr.o uxclnt. + all : $(EXEC) + + $(EXEC): $(OBJS) +- $(CC) $(CFLAGS) $(LDFLAGS) -o $(EXEC) $(OBJS) ++ $(CC) $(CFLAGS) -o $(EXEC) $(OBJS) $(LDFLAGS) + + install: + $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) +--- multipath/Makefile.orig ++++ multipath/Makefile +@@ -6,8 +6,8 @@ include ../Makefile.inc + + OBJS = main.o + +-CFLAGS += -I$(multipathdir) +-LDFLAGS += -lpthread -ldevmapper -ldl -lmultipath -L$(multipathdir) ++CFLAGS += -pthread -I$(multipathdir) ++LDFLAGS += -ldevmapper -ldl -lmultipath -L$(multipathdir) + + EXEC = multipath + +--- libmultipath/Makefile.orig ++++ libmultipath/Makefile +@@ -7,7 +7,7 @@ include ../Makefile.inc + SONAME=0 + DEVLIB = libmultipath.so + LIBS = $(DEVLIB).$(SONAME) +-LIBDEPS = -lpthread -ldl -ldevmapper ++LIBDEPS = -ldl -ldevmapper + + OBJS = memory.o parser.o vector.o devmapper.o callout.o \ + hwtable.o blacklist.o util.o dmparser.o config.o \ +@@ -19,7 +19,7 @@ OBJS = memory.o parser.o vector.o devmap + + LIBDM_API_FLUSH = $(shell objdump -T ${LIB}/libdevmapper.so.* ; fi | grep -c dm_task_no_flush) + +-CFLAGS += -D_GNU_SOURCE ++CFLAGS += -pthread -D_GNU_SOURCE + ifneq ($(strip $(LIBDM_API_FLUSH)),0) + CFLAGS += -DLIBDM_API_FLUSH + endif +@@ -27,7 +27,7 @@ endif + all: $(LIBS) + + $(LIBS): $(OBJS) +- $(CC) $(SHARED_FLAGS) $(LIBDEPS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS) ++ $(CC) $(SHARED_FLAGS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS) $(LIBDEPS) + ln -sf $@ $(DEVLIB) + + install: diff --git a/multipath-tools.changes b/multipath-tools.changes index 89acedd..c2b0ba6 100644 --- a/multipath-tools.changes +++ b/multipath-tools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 4 16:40:14 UTC 2011 - crrodriguez@opensuse.org + +- fix build fail with AS_NEEDED by default + ------------------------------------------------------------------- Fri Nov 26 10:18:45 CET 2010 - meissner@suse.de diff --git a/multipath-tools.spec b/multipath-tools.spec index 45879f2..1aa7b90 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -27,11 +27,12 @@ Requires: device-mapper kpartx PreReq: %insserv_prereq %fillup_prereq coreutils grep AutoReqProv: on Version: 0.4.8 -Release: 54 +Release: 55 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.3.diff.bz2 +Patch1: multipath-tools-0.4.8-asneeded.patch %description This package provides the tools to manage multipathed devices by @@ -73,11 +74,8 @@ Authors: %prep %setup -q -n multipath-tools-%{version} %patch0 -p1 - +%patch1 %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" LIB=%_lib %install