From e78d65c9e9ffa54a6bece600c8d09881361c4889 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Fri, 5 Aug 2016 11:39:50 -0700 Subject: sys-fs/multipath-tools: version bump - Version bump per bug #590228. - Includes init.d fixes per bugs: #432042, #581226 - Includes upstream fixes per bugs: #293615, #308693, #527124, #558326 Closes: https://bugs.gentoo.org/293615 Closes: https://bugs.gentoo.org/308693 Closes: https://bugs.gentoo.org/432042 Closes: https://bugs.gentoo.org/527124 Closes: https://bugs.gentoo.org/558326 Closes: https://bugs.gentoo.org/581226 Closes: https://bugs.gentoo.org/590228 Package-Manager: portage-2.2.28 --- sys-fs/multipath-tools/Manifest | 1 + .../files/multipath-tools-0.6.2-makefile.patch | 239 +++++++++++++++++++++ sys-fs/multipath-tools/files/multipath.rc | 3 +- .../multipath-tools/multipath-tools-0.6.2.ebuild | 61 ++++++ 4 files changed, 303 insertions(+), 1 deletion(-) create mode 100644 sys-fs/multipath-tools/files/multipath-tools-0.6.2-makefile.patch create mode 100644 sys-fs/multipath-tools/multipath-tools-0.6.2.ebuild (limited to 'sys-fs') diff --git a/sys-fs/multipath-tools/Manifest b/sys-fs/multipath-tools/Manifest index 23af9e77a811..a820e93460e0 100644 --- a/sys-fs/multipath-tools/Manifest +++ b/sys-fs/multipath-tools/Manifest @@ -1 +1,2 @@ DIST multipath-tools-0.5.0.tar.bz2 184024 SHA256 f13cf1eb84e94e83b2019e68f7965526903c13e94246db43965d181668a0a6f9 SHA512 dfad21c45d0f69e39041d30d203a582c8ee8329bf390c51cde10155b3de379e7ad8fead2ac4beb268a924fd7e7dc8e1cf538ea3c70d41479fd8786fa30ba22a9 WHIRLPOOL bc8a365d66d1c5f584de04304125949926d4a1576cba4a00acca0f1333eb13d83318da36d9d88c5dc92691a331d427ad6b99eb1f2983fbc387303dbfdbae11ff +DIST multipath-tools-0.6.2.tar.gz 242413 SHA256 f5cec5d92d56ec99220fccc1e70b9d10bc8ff5039c809ebcc201ce34d7ee3095 SHA512 8a04302002bf778299495e4be2d4302c19350d8ec218da23c5f781233efa6d0b39208a676b0d770771d7f09d62fa2b1ce32c03f60662691f74afb111e918b639 WHIRLPOOL f040273bd188c30f2f3b87e21a403b5f5d3ce2f0918382890cc0750b803bf05f70ed6bf46a83c5b68137835bc9bcf6cbca14f6462cfbef660667118b59eafc7d diff --git a/sys-fs/multipath-tools/files/multipath-tools-0.6.2-makefile.patch b/sys-fs/multipath-tools/files/multipath-tools-0.6.2-makefile.patch new file mode 100644 index 000000000000..a051473cbd88 --- /dev/null +++ b/sys-fs/multipath-tools/files/multipath-tools-0.6.2-makefile.patch @@ -0,0 +1,239 @@ +diff -Nuar --exclude '*~' multipath-tools-e165b73.orig/kpartx/Makefile multipath-tools-e165b73/kpartx/Makefile +--- multipath-tools-e165b73.orig/kpartx/Makefile 2016-07-22 02:38:14.000000000 -0700 ++++ multipath-tools-e165b73/kpartx/Makefile 2016-08-05 10:47:28.248804380 -0700 +@@ -12,7 +12,7 @@ + CFLAGS += -DLIBDM_API_COOKIE + endif + +-LDFLAGS = -ldevmapper ++LIBS = -ldevmapper + OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \ + gpt.o mac.o ps3.o crc32.o lopart.o xstrncpy.o devmapper.o + EXEC = kpartx +@@ -20,8 +20,7 @@ + all: $(EXEC) + + $(EXEC): $(OBJS) +- $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) +- $(GZIP) $(EXEC).8 > $(EXEC).8.gz ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $(EXEC) + + install: $(EXEC) $(EXEC).8 + $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) +@@ -31,14 +30,14 @@ + $(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir)/rules.d + $(INSTALL_PROGRAM) -m 644 kpartx.rules $(DESTDIR)$(libudevdir)/rules.d/66-kpartx.rules + $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir) +- $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) ++ $(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(mandir) + + uninstall: + $(RM) $(DESTDIR)$(bindir)/$(EXEC) +- $(RM) $(DESTDIR)$(mandir)/$(EXEC).8.gz ++ $(RM) $(DESTDIR)$(mandir)/$(EXEC).8 + $(RM) $(DESTDIR)$(libudevdir)/kpartx_id + $(RM) $(DESTDIR)$(libudevdir)/rules.d/66-kpartx.rules + $(RM) $(DESTDIR)$(libudevdir)/rules.d/67-kpartx-compat.rules + + clean: +- $(RM) core *.o $(EXEC) *.gz ++ $(RM) core *.o $(EXEC) +diff -Nuar --exclude '*~' multipath-tools-e165b73.orig/libmpathcmd/Makefile multipath-tools-e165b73/libmpathcmd/Makefile +--- multipath-tools-e165b73.orig/libmpathcmd/Makefile 2016-07-22 02:38:14.000000000 -0700 ++++ multipath-tools-e165b73/libmpathcmd/Makefile 2016-08-05 10:47:28.248804380 -0700 +@@ -27,4 +27,4 @@ + $(RM) $(DESTDIR)$(incdir)/mpath_cmd.h + + clean: +- $(RM) core *.a *.o *.gz *.so *.so.* ++ $(RM) core *.a *.o *.so *.so.* +diff -Nuar --exclude '*~' multipath-tools-e165b73.orig/libmpathpersist/Makefile multipath-tools-e165b73/libmpathpersist/Makefile +--- multipath-tools-e165b73.orig/libmpathpersist/Makefile 2016-07-22 02:38:14.000000000 -0700 ++++ multipath-tools-e165b73/libmpathpersist/Makefile 2016-08-05 10:47:28.248804380 -0700 +@@ -18,10 +18,8 @@ + + $(LIBS): + $(CC) -Wall -fPIC -c $(CFLAGS) *.c +- $(CC) $(SHARED_FLAGS) $(LIBDEPS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS) ++ $(CC) $(SHARED_FLAGS) $(CFLAGS) $(LDFLAGS) $(LIBDEPS) -Wl,-soname=$@ -o $@ $(OBJS) + $(LN) $(LIBS) $(DEVLIB) +- $(GZIP) mpath_persistent_reserve_in.3 > mpath_persistent_reserve_in.3.gz +- $(GZIP) mpath_persistent_reserve_out.3 > mpath_persistent_reserve_out.3.gz + + install: $(LIBS) + $(INSTALL_PROGRAM) -d $(DESTDIR)$(syslibdir) +@@ -29,20 +27,18 @@ + $(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(syslibdir) + $(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(man3dir) + $(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(incdir) +- $(LN) $(LIBS) $(DESTDIR)$(syslibdir)/$(DEVLIB) +- $(INSTALL_PROGRAM) -m 644 mpath_persistent_reserve_in.3.gz $(DESTDIR)$(man3dir) +- $(INSTALL_PROGRAM) -m 644 mpath_persistent_reserve_out.3.gz $(DESTDIR)$(man3dir) ++ $(INSTALL_PROGRAM) -m 644 mpath_persistent_reserve_in.3 $(DESTDIR)$(man3dir) ++ $(INSTALL_PROGRAM) -m 644 mpath_persistent_reserve_out.3 $(DESTDIR)$(man3dir) + $(INSTALL_PROGRAM) -m 644 mpath_persist.h $(DESTDIR)$(incdir) + + uninstall: + $(RM) $(DESTDIR)$(syslibdir)/$(LIBS) +- $(RM) $(DESTDIR)$(man3dir)/mpath_persistent_reserve_in.3.gz +- $(RM) $(DESTDIR)$(man3dir)/mpath_persistent_reserve_out.3.gz ++ $(RM) $(DESTDIR)$(man3dir)/mpath_persistent_reserve_in.3 ++ $(RM) $(DESTDIR)$(man3dir)/mpath_persistent_reserve_out.3 + $(RM) $(DESTDIR)$(incdir)/mpath_persist.h + $(RM) $(DESTDIR)$(syslibdir)/$(DEVLIB) + + clean: + $(RM) core *.a *.o +- $(RM) libmpathpersist.so.0 +- $(RM) libmpathpersist.so +- $(RM) mpath_persistent_reserve_in.3.gz mpath_persistent_reserve_out.3.gz ++ $(RM) $(LIBS) ++ $(RM) $(DEVLIB) +diff -Nuar --exclude '*~' multipath-tools-e165b73.orig/libmultipath/Makefile multipath-tools-e165b73/libmultipath/Makefile +--- multipath-tools-e165b73.orig/libmultipath/Makefile 2016-07-22 02:38:14.000000000 -0700 ++++ multipath-tools-e165b73/libmultipath/Makefile 2016-08-05 10:47:28.248804380 -0700 +@@ -70,4 +70,4 @@ + $(RM) $(DESTDIR)$(syslibdir)/$(DEVLIB) + + clean: +- $(RM) core *.a *.o *.gz *.so *.so.* ++ $(RM) core *.a *.o *.so *.so.* +diff -Nuar --exclude '*~' multipath-tools-e165b73.orig/Makefile.inc multipath-tools-e165b73/Makefile.inc +--- multipath-tools-e165b73.orig/Makefile.inc 2016-07-22 02:38:14.000000000 -0700 ++++ multipath-tools-e165b73/Makefile.inc 2016-08-05 10:47:41.623054217 -0700 +@@ -61,7 +61,7 @@ + INSTALL_PROGRAM = install + + OPTFLAGS = -Wunused -Wstrict-prototypes -O2 -g -pipe -Wformat-security -Wall \ +- -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 ++ -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 + + CFLAGS = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" + SHARED_FLAGS = -shared +diff -Nuar --exclude '*~' multipath-tools-e165b73.orig/mpathpersist/Makefile multipath-tools-e165b73/mpathpersist/Makefile +--- multipath-tools-e165b73.orig/mpathpersist/Makefile 2016-07-22 02:38:14.000000000 -0700 ++++ multipath-tools-e165b73/mpathpersist/Makefile 2016-08-05 10:47:28.248804380 -0700 +@@ -5,26 +5,24 @@ + OBJS = main.o + + CFLAGS += -I$(multipathdir) -I$(mpathpersistdir) +-LDFLAGS += -lpthread -ldevmapper -L$(mpathpersistdir) -lmpathpersist -L$(multipathdir) -L$(mpathcmddir) -lmpathcmd -lmultipath -ludev ++LIBS += -lpthread -ldevmapper -L$(mpathpersistdir) -lmpathpersist -L$(multipathdir) -L$(mpathcmddir) -lmpathcmd -lmultipath -ludev + + EXEC = mpathpersist + + all: $(EXEC) + + $(EXEC): $(OBJS) +- $(CC) -g $(OBJS) -o $(EXEC) $(LDFLAGS) $(CFLAGS) +- $(GZIP) $(EXEC).8 > $(EXEC).8.gz ++ $(CC) $(CFLAGS) $(CFLAGS) -g $(OBJS) -o $(EXEC) $(LIBS) + + install: + $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ + $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir) +- $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) ++ $(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(mandir) + + clean: + $(RM) *.o $(EXEC) +- $(RM) mpathpersist.8.gz + + uninstall: + $(RM) $(DESTDIR)$(bindir)/$(EXEC) +- $(RM) $(DESTDIR)$(mandir)/$(EXEC).8.gz ++ $(RM) $(DESTDIR)$(mandir)/$(EXEC).8 +diff -Nuar --exclude '*~' multipath-tools-e165b73.orig/multipath/Makefile multipath-tools-e165b73/multipath/Makefile +--- multipath-tools-e165b73.orig/multipath/Makefile 2016-07-22 02:38:14.000000000 -0700 ++++ multipath-tools-e165b73/multipath/Makefile 2016-08-05 10:47:28.248804380 -0700 +@@ -7,7 +7,7 @@ + OBJS = main.o + + CFLAGS += -I$(multipathdir) -I$(mpathcmddir) +-LDFLAGS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath -ludev \ ++LIBS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath -ludev \ + -L$(mpathcmddir) -lmpathcmd + + EXEC = multipath +@@ -15,9 +15,7 @@ + all: $(EXEC) + + $(EXEC): $(OBJS) +- $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) +- $(GZIP) $(EXEC).8 > $(EXEC).8.gz +- $(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $(EXEC) $(LIBS) + + install: + $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) +@@ -26,16 +24,14 @@ + $(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir) + $(INSTALL_PROGRAM) -m 644 $(EXEC).rules $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules + $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir) +- $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) ++ $(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(mandir) + $(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir) +- $(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5.gz $(DESTDIR)$(man5dir) ++ $(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5 $(DESTDIR)$(man5dir) + + uninstall: + $(RM) $(DESTDIR)$(bindir)/$(EXEC) + $(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules + $(RM) $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules +- $(RM) $(DESTDIR)$(mandir)/$(EXEC).8.gz +- $(RM) $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz + + clean: +- $(RM) core *.o $(EXEC) *.gz ++ $(RM) core *.o $(EXEC) +diff -Nuar --exclude '*~' multipath-tools-e165b73.orig/multipathd/Makefile multipath-tools-e165b73/multipathd/Makefile +--- multipath-tools-e165b73.orig/multipathd/Makefile 2016-07-22 02:38:14.000000000 -0700 ++++ multipath-tools-e165b73/multipathd/Makefile 2016-08-05 10:47:28.248804380 -0700 +@@ -9,15 +9,15 @@ + ifdef SYSTEMD + CFLAGS += -DUSE_SYSTEMD=$(SYSTEMD) + endif +-LDFLAGS += -lurcu -lpthread -ldevmapper -lreadline ++LIBS += -lurcu -lpthread -ldevmapper -lreadline + ifdef SYSTEMD + ifeq ($(shell test $(SYSTEMD) -gt 209 && echo 1), 1) +- LDFLAGS += -lsystemd ++ LIBS += -lsystemd + else +- LDFLAGS += -lsystemd-daemon ++ LIBS += -lsystemd-daemon + endif + endif +-LDFLAGS += -ludev -ldl \ ++LIBS += -ludev -ldl \ + -L$(multipathdir) -lmultipath -L$(mpathpersistdir) -lmpathpersist \ + -L$(mpathcmddir) -lmpathcmd + +@@ -40,8 +40,7 @@ + all : $(EXEC) + + $(EXEC): $(OBJS) +- $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC) +- $(GZIP) $(EXEC).8 > $(EXEC).8.gz ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $(EXEC) + + install: + $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) +@@ -52,13 +51,13 @@ + $(INSTALL_PROGRAM) -m 644 $(EXEC).socket $(DESTDIR)$(unitdir) + endif + $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir) +- $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) ++ $(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(mandir) + + uninstall: + $(RM) $(DESTDIR)$(bindir)/$(EXEC) +- $(RM) $(DESTDIR)$(mandir)/$(EXEC).8.gz ++ $(RM) $(DESTDIR)$(mandir)/$(EXEC).8 + $(RM) $(DESTDIR)$(unitdir)/$(EXEC).service + $(RM) $(DESTDIR)$(unitdir)/$(EXEC).socket + + clean: +- $(RM) core *.o $(EXEC) *.gz ++ $(RM) core *.o $(EXEC) diff --git a/sys-fs/multipath-tools/files/multipath.rc b/sys-fs/multipath-tools/files/multipath.rc index 68f8d5edb43b..150b0edce77b 100644 --- a/sys-fs/multipath-tools/files/multipath.rc +++ b/sys-fs/multipath-tools/files/multipath.rc @@ -4,13 +4,14 @@ # $Id$ depend() { - before checkfs fsck multipathd lvm + before checkfs fsck multipathd iscsid lvm after modules device-mapper } start() { if ! grep -qs device-mapper /proc/devices /proc/misc ; then [ -e /proc/modules ] && modprobe -q dm-mod + [ -e /proc/modules ] && modprobe -q dm-multipath fi ebegin "Activating Multipath devices" diff --git a/sys-fs/multipath-tools/multipath-tools-0.6.2.ebuild b/sys-fs/multipath-tools/multipath-tools-0.6.2.ebuild new file mode 100644 index 000000000000..3ec454b244e1 --- /dev/null +++ b/sys-fs/multipath-tools/multipath-tools-0.6.2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 +inherit eutils systemd toolchain-funcs udev + +DESCRIPTION="Device mapper target autoconfig" +HOMEPAGE="http://christophe.varoqui.free.fr/" +COMMIT_ID='e165b73a16fc9027aa3306df40052038c175be1b' +SRC_URI="http://git.opensvc.com/?p=multipath-tools/.git;a=snapshot;h=${COMMIT_ID};sf=tgz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +IUSE="systemd" + +RDEPEND=">=sys-fs/lvm2-2.02.45 + >=virtual/udev-171 + dev-libs/libaio + dev-libs/userspace-rcu + sys-libs/readline + systemd? ( sys-apps/systemd )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +S="${WORKDIR}/${PN}-${COMMIT_ID:0:7}" + +PATCHES=( + "${FILESDIR}"/${PN}-0.6.2-makefile.patch +) + +src_compile() { + # LIBDM_API_FLUSH involves grepping files in /usr/include, + # so force the test to go the way we want #411337. + emake LIBDM_API_FLUSH=1 CC="$(tc-getCC)" SYSTEMD=$(usex systemd 1 "") +} + +src_install() { + local udevdir="$(get_udevdir)" + + dodir /sbin /usr/share/man/man{5,8} + emake \ + DESTDIR="${D}" \ + SYSTEMD=$(usex systemd 1 "") \ + unitdir="$(systemd_get_systemunitdir)" \ + libudevdir='${prefix}'/"${udevdir}" \ + install + + newinitd "${FILESDIR}"/rc-multipathd multipathd + newinitd "${FILESDIR}"/multipath.rc multipath + + dodoc README ChangeLog +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog "If you need multipath on your system, you must" + elog "add 'multipath' into your boot runlevel!" + fi +} -- cgit v1.2.3-65-gdbad