public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/, sys-fs/lvm2/files/
Date: Thu,  3 Dec 2015 11:33:48 +0000 (UTC)	[thread overview]
Message-ID: <1449142424.e98c6edabec9e0b0e9b21da01c2ea2e0df89897b.polynomial-c@gentoo> (raw)

commit:     e98c6edabec9e0b0e9b21da01c2ea2e0df89897b
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  3 11:33:24 2015 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Dec  3 11:33:44 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e98c6eda

sys-fs/lvm2: Bump to version 2.02.136

Package-Manager: portage-2.2.26
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-fs/lvm2/Manifest                               |   1 +
 .../lvm2-2.02.129-dynamic-static-ldflags.patch     |  59 +++++
 .../lvm2/files/lvm2-2.02.129-example.conf.in.patch |  52 ++++
 .../lvm2-2.02.129-static-pkgconfig-libs.patch      | 102 ++++++++
 .../files/lvm2-2.02.130-pthread-pkgconfig.patch    |  32 +++
 sys-fs/lvm2/lvm2-2.02.136.ebuild                   | 275 +++++++++++++++++++++
 6 files changed, 521 insertions(+)

diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 6822526..750b75a 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -2,3 +2,4 @@ DIST LVM2.2.02.103.tgz 1343887 SHA256 71c5a2e8842ed2f13f52e02b44eb183110a3410ded
 DIST LVM2.2.02.109.tgz 1482167 SHA256 7bc95ba5209c8aa5bd492167b2e2797f156852ed11cfc63fb783070ade8e65e7 SHA512 210645cccf297112ffdbc63e0336385c31b2d17d226ae10813ba8ffd4f01ce07af44a4134e60644283e4360e10e925113e867378502ae0166f3fc91258caea68 WHIRLPOOL 7f2d91446f502440b2ed73df0f2ce29069364bbb198e675223b61c17e5cc6e1c162ce60a977cb07b71e44d672c688bbbf0247380f1b9c5adf325cf324f4c4bb7
 DIST LVM2.2.02.110.tgz 1487448 SHA256 3dad1aa04a71b8420b15f44c53f041001436539d3f8073490c2d0c52f6fecd11 SHA512 5b4dfa5ed877d34efa5b109dc712e8fa9154b4954b267b0243f1925f9d2fa8c67f4ce8da36a85f3bba6c117f6153fdbf150e3753587ab90584a86d2654dc0812 WHIRLPOOL ea221ed3e9d3f79009d7c341a7a75b52eacc5be79e28f2498e7cdc0f4a97c2bebff405b032eb8086d3b5b5aaf79da2f281c5734562355bddbe6004058e114ced
 DIST LVM2.2.02.116.tgz 1538340 SHA256 2479d6ea61c405efcfcd8a78390d00c1d2e9c92c0262f3ed599f2c0fb6f0b767 SHA512 992541339637d597257850b4ff7f5348fb7cdcccf806ac8d986a3be1ad1edc5f6bfaedeed5128690c541d1a485cdc75742e90a766363c39867901003518fb84d WHIRLPOOL 1e89ec941882fddba62c9649be46eb5bc6c9cb899669d4bbe4a4a1023c8bf7d8264c4815ef88bb39dedcb9637815411feb826aa102e629d77b80e45e099e398d
+DIST LVM2.2.02.136.tgz 1891010 SHA256 c6af90097d8f7cd851d38c4f57bb3ad7039cfa123f1e336dba957814a298bd8c SHA512 ebda683e7dbeb2c4860a583d47e60756d18127e37a373ab2958af8e54b9bee0d2e3370b7803d88fa4b08564345c88af55bfbac317081160118ce4b3733b69f9d WHIRLPOOL 8020fdddac648e32084801ffaf9b00b8a683870c8dd8dd5969851fd081eb1efd578decd82cd4a7a24fb6150c55afafdd819a76eb7eb6926cdc057455cc1d1618

diff --git a/sys-fs/lvm2/files/lvm2-2.02.129-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.02.129-dynamic-static-ldflags.patch
new file mode 100644
index 0000000..efdfb81
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.129-dynamic-static-ldflags.patch
@@ -0,0 +1,59 @@
+--- LVM2.2.02.129/configure.in
++++ LVM2.2.02.129/configure.in
+@@ -31,6 +31,7 @@
+ 	linux*)
+ 		CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
+ 		ELDFLAGS="-Wl,--export-dynamic"
++		STATIC_LDFLAGS="-Wl,--no-export-dynamic"
+ 		# FIXME Generate list and use --dynamic-list=.dlopen.sym
+ 		CLDWHOLEARCHIVE="-Wl,-whole-archive"
+ 		CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
+@@ -2008,6 +2009,7 @@
+ AC_SUBST(SELINUX_PC)
+ AC_SUBST(SNAPSHOTS)
+ AC_SUBST(STATICDIR)
++AC_SUBST(STATIC_LDFLAGS)
+ AC_SUBST(STATIC_LINK)
+ AC_SUBST(TESTING)
+ AC_SUBST(TESTSUITE_DATA)
+--- LVM2.2.02.129/daemons/dmeventd/Makefile.in
++++ LVM2.2.02.129/daemons/dmeventd/Makefile.in
+@@ -66,7 +66,7 @@
+ 	$(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic
+ 
+ dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a
+-	$(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
++	$(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
+ 	dmeventd.o $(DL_LIBS) $(LVMLIBS) $(LIBS) $(STATIC_LIBS)
+ 
+ ifeq ("@PKGCONFIG@", "yes")
+--- LVM2.2.02.129/make.tmpl.in
++++ LVM2.2.02.129/make.tmpl.in
+@@ -48,6 +48,7 @@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
+ LDFLAGS ?= @COPTIMISE_FLAG@ @LDFLAGS@
++STATIC_LDFLAGS += @STATIC_LDFLAGS@
+ CLDFLAGS += @CLDFLAGS@
+ ELDFLAGS += @ELDFLAGS@
+ LDDEPS += @LDDEPS@
+--- LVM2.2.02.129/tools/Makefile.in
++++ LVM2.2.02.129/tools/Makefile.in
+@@ -129,7 +129,7 @@
+ 	      -o $@ dmsetup.o -ldevmapper $(LIBS)
+ 
+ dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a
+-	$(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \
++	$(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \
+ 	      -o $@ dmsetup.o -ldevmapper $(STATIC_LIBS) $(LIBS)
+ 
+ all: device-mapper
+@@ -146,7 +146,7 @@
+ endif
+ 
+ lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a  $(interfacebuilddir)/libdevmapper.a
+-	$(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
++	$(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
+ 	      $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS)
+ 
+ liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o

diff --git a/sys-fs/lvm2/files/lvm2-2.02.129-example.conf.in.patch b/sys-fs/lvm2/files/lvm2-2.02.129-example.conf.in.patch
new file mode 100644
index 0000000..076e060
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.129-example.conf.in.patch
@@ -0,0 +1,52 @@
+Maintainer note: Forward ported without editing from lvm2-2.02.108-example.conf.in.patch to apply cleanly.
+
+--- LVM2.2.02.129/conf/example.conf.in
++++ LVM2.2.02.129/conf/example.conf.in
+@@ -128,6 +128,9 @@
+ 	# Example
+ 	# Accept every block device:
+ 	# filter = [ "a|.*/|" ]
++	# Gentoo: we exclude /dev/nbd by default, because it makes a lot of kernel
++	# noise when you probed while not available.
++	filter = [ "r|/dev/nbd.*|", "a/.*/" ]
+ 	# Reject the cdrom drive:
+ 	# filter = [ "r|/dev/cdrom|" ]
+ 	# Work with just loopback devices, e.g. for testing:
+@@ -620,7 +623,8 @@
+ 	# tools need to be installed with .lvm1 suffices, e.g. vgscan.lvm1.
+ 	# They will stop working once the lvm2 on-disk metadata format is used.
+ 	# This configuration option has an automatic default value.
+-	# fallback_to_lvm1 = @DEFAULT_FALLBACK_TO_LVM1@
++	# Gentoo: the LVM tools are a seperate package.
++	fallback_to_lvm1 = 0
+ 
+ 	# Configuration option global/format.
+ 	# The default metadata format that commands should use.
+@@ -1413,7 +1417,7 @@
+ 
+ # Configuration section metadata.
+ # This configuration section has an automatic default value.
+-# metadata {
++metadata {
+ 
+ 	# Configuration option metadata/pvmetadatacopies.
+ 	# Number of copies of metadata to store on each PV.
+@@ -1431,7 +1435,8 @@
+ 	# 
+ 	# This configuration option is advanced.
+ 	# This configuration option has an automatic default value.
+-	# pvmetadatacopies = 1
++	# Gentoo: enable for data safety, but PV resize is then disabled.
++	# pvmetadatacopies = 2
+ 
+ 	# Configuration option metadata/vgmetadatacopies.
+ 	# Number of copies of metadata to maintain for each VG.
+@@ -1486,7 +1491,7 @@
+ 	# 
+ 	# This configuration option is advanced.
+ 	# This configuration option does not have a default value defined.
+-# }
++}
+ 
+ # Configuration section report.
+ # LVM report command output formatting.

diff --git a/sys-fs/lvm2/files/lvm2-2.02.129-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.02.129-static-pkgconfig-libs.patch
new file mode 100644
index 0000000..2396945
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.129-static-pkgconfig-libs.patch
@@ -0,0 +1,102 @@
+--- LVM2.2.02.129/configure.in
++++ LVM2.2.02.129/configure.in
+@@ -1287,6 +1287,7 @@
+ 			   fi])
+ 	if test "$BLKID_WIPING" = yes; then
+ 		BLKID_PC="blkid"
++		BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC`
+ 		DEFAULT_USE_BLKID_WIPING=1
+ 		AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
+ 	else
+@@ -1332,6 +1333,7 @@
+ if test "$UDEV_SYNC" = yes; then
+ 	pkg_config_init
+ 	PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
++	UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev`
+ 	AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
+ fi
+ 
+@@ -1558,19 +1560,32 @@
+ if test "$SELINUX" = yes; then
+ 	AC_CHECK_LIB([sepol], [sepol_check_context], [
+ 		AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
+-		SELINUX_LIBS="-lsepol"])
++		SEPOL_LIBS="-lsepol"])
++
++	dnl -- init pkgconfig if required
++	if  test x$PKGCONFIG_INIT != x1; then
++		pkg_config_init
++	fi
++	PKG_CHECK_MODULES(SELINUX, libselinux, [
++		SELINUX_PC="libselinux"
++		SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux`
++		SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS"
++		AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
++	],[
++		dnl -- old non-pkgconfig method, is buggy with static builds
+ 
+ 	AC_CHECK_LIB([selinux], [is_selinux_enabled], [
+ 		AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
+ 		AC_CHECK_HEADERS([selinux/label.h])
+ 		AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
+-		SELINUX_LIBS="-lselinux $SELINUX_LIBS"
++		SELINUX_LIBS="-lselinux $SEPOL_LIBS"
+ 		SELINUX_PC="libselinux"
+ 		HAVE_SELINUX=yes ], [
+ 		AC_MSG_WARN(Disabling selinux)
+ 		SELINUX_LIBS=
+ 		SELINUX_PC=
+ 		HAVE_SELINUX=no ])
++	])
+ fi
+ 
+ ################################################################################
+@@ -1902,6 +1917,7 @@
+ ################################################################################
+ AC_SUBST(APPLIB)
+ AC_SUBST(AWK)
++AC_SUBST(BLKID_STATIC_LIBS)
+ AC_SUBST(BLKID_PC)
+ AC_SUBST(BUILD_CMIRRORD)
+ AC_SUBST(BUILD_DMEVENTD)
+@@ -2005,6 +2021,7 @@
+ AC_SUBST(SALCK_CFLAGS)
+ AC_SUBST(SALCK_LIBS)
+ AC_SUBST(SELINUX_LIBS)
++AC_SUBST(SELINUX_STATIC_LIBS)
+ AC_SUBST(SELINUX_PC)
+ AC_SUBST(SNAPSHOTS)
+ AC_SUBST(STATICDIR)
+@@ -2020,6 +2037,7 @@
+ AC_SUBST(CACHE_DUMP_CMD)
+ AC_SUBST(CACHE_REPAIR_CMD)
+ AC_SUBST(CACHE_RESTORE_CMD)
++AC_SUBST(UDEV_STATIC_LIBS)
+ AC_SUBST(UDEV_PC)
+ AC_SUBST(UDEV_RULES)
+ AC_SUBST(UDEV_SYNC)
+--- LVM2.2.02.129/make.tmpl.in
++++ LVM2.2.02.129/make.tmpl.in
+@@ -43,7 +43,7 @@
+ 
+ LIBS = @LIBS@
+ # Extra libraries always linked with static binaries
+-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
++STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
+ DEFS += @DEFS@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
+@@ -58,10 +58,13 @@
+ PTHREAD_LIBS = @PTHREAD_LIBS@
+ READLINE_LIBS = @READLINE_LIBS@
+ SELINUX_LIBS = @SELINUX_LIBS@
++SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
+ UDEV_CFLAGS = @UDEV_CFLAGS@
+ UDEV_LIBS = @UDEV_LIBS@
++UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
+ BLKID_CFLAGS = @BLKID_CFLAGS@
+ BLKID_LIBS = @BLKID_LIBS@
++BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@
+ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+ TESTING = @TESTING@
+ 

diff --git a/sys-fs/lvm2/files/lvm2-2.02.130-pthread-pkgconfig.patch b/sys-fs/lvm2/files/lvm2-2.02.130-pthread-pkgconfig.patch
new file mode 100644
index 0000000..11db632
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.130-pthread-pkgconfig.patch
@@ -0,0 +1,32 @@
+Make sure that libdm usage always brings in pthread libraries, both in
+pkgconfig and during manual build.
+
+--- LVM2.2.02.130/libdm/libdevmapper.pc.in
++++ LVM2.2.02.130/libdm/libdevmapper.pc.in
+@@ -9,4 +9,4 @@
+ Cflags: -I${includedir} 
+ Libs: -L${libdir} -ldevmapper
+ Requires.private: @SELINUX_PC@ @UDEV_PC@
+-Libs.private: -lm @RT_LIB@
++Libs.private: -lm @RT_LIB@ @PTHREAD_LIBS@
+--- LVM2.2.02.130/tools/Makefile.in
++++ LVM2.2.02.130/tools/Makefile.in
+@@ -90,6 +90,7 @@
+   INSTALL_LVM_TARGETS += install_tools_static
+   INSTALL_DMSETUP_TARGETS += install_dmsetup_static
+   INSTALL_CMDLIB_TARGETS += install_cmdlib_static
++  STATIC_LIBS += @PTHREAD_LIBS@
+ endif
+ 
+ LVMLIBS = $(LVMINTERNAL_LIBS)
+@@ -120,6 +121,10 @@
+ 
+ include $(top_builddir)/make.tmpl
+ 
++ifeq ("@STATIC_LINK@", "yes")
++  STATIC_LIBS += @PTHREAD_LIBS@
++endif
++
+ device-mapper: $(TARGETS_DM)
+ 
+ CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS)

diff --git a/sys-fs/lvm2/lvm2-2.02.136.ebuild b/sys-fs/lvm2/lvm2-2.02.136.ebuild
new file mode 100644
index 0000000..96c067b
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.136.ebuild
@@ -0,0 +1,275 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
+
+DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
+HOMEPAGE="https://sources.redhat.com/lvm2/"
+SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+	ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
+REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
+	systemd? ( udev )
+	clvm? ( !systemd )"
+
+DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
+	readline? ( sys-libs/readline:0= )
+	udev? ( >=virtual/libudev-208:=[static-libs?] )"
+# /run is now required for locking during early boot. /var cannot be assumed to
+# be available -- thus, pull in recent enough baselayout for /run.
+# This version of LVM is incompatible with cryptsetup <1.1.2.
+RDEPEND="${DEPEND_COMMON}
+	>=sys-apps/baselayout-2.2
+	!<sys-apps/openrc-0.11
+	!<sys-fs/cryptsetup-1.1.2
+	!!sys-fs/clvm
+	!!sys-fs/lvm-user
+	>=sys-apps/util-linux-2.16
+	lvm2create_initrd? ( sys-apps/makedev )
+	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
+# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
+# USE 'static' currently only works with eudev, bug 520450
+DEPEND="${DEPEND_COMMON}
+	virtual/pkgconfig
+	>=sys-devel/binutils-2.20.1-r1
+	static? (
+		selinux? ( sys-libs/libselinux[static-libs] )
+		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
+		>=sys-apps/util-linux-2.16[static-libs]
+	)"
+
+S=${WORKDIR}/${PN/lvm/LVM}.${PV}
+
+pkg_setup() {
+	local CONFIG_CHECK="~SYSVIPC"
+
+	if use udev; then
+		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
+		if linux_config_exists; then
+			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
+				ewarn "It's recommended to set an empty value to the following kernel config option:"
+				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+			fi
+		fi
+	fi
+
+	check_extra_config
+
+	# 1. Genkernel no longer copies /sbin/lvm blindly.
+	if use static; then
+		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
+		elog "their static versions. If you need the static binaries,"
+		elog "you must append .static to the filename!"
+	fi
+}
+
+src_prepare() {
+	# Gentoo specific modification(s):
+	epatch "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
+
+	sed -i \
+		-e "1iAR = $(tc-getAR)" \
+		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
+		make.tmpl.in || die #444082
+
+	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
+
+	if use udev && ! use device-mapper-only; then
+		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
+		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
+		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
+		elog "if it was previously disabled."
+	fi
+
+	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
+
+	# For upstream -- review and forward:
+	epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
+	epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
+	epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
+	epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
+	epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
+	epatch "${FILESDIR}"/${PN}-2.02.129-dynamic-static-ldflags.patch #332905
+	epatch "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
+	epatch "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
+
+	# Without thin-privision-tools, there is nothing to install for target install_man7:
+	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
+
+	eautoreconf
+}
+
+src_configure() {
+	filter-flags -flto
+	local myconf
+	local buildmode
+
+	myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
+	myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
+	myconf="${myconf} $(use_enable !device-mapper-only applib)"
+	myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
+	myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
+	use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
+
+	# Most of this package does weird stuff.
+	# The build options are tristate, and --without is NOT supported
+	# options: 'none', 'internal', 'shared'
+	if use static; then
+		buildmode="internal"
+		# This only causes the .static versions to become available
+		myconf="${myconf} --enable-static_link"
+	else
+		buildmode="shared"
+	fi
+	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
+
+	# dmeventd requires mirrors to be internal, and snapshot available
+	# so we cannot disable them
+	myconf="${myconf} --with-mirrors=${dmbuildmode}"
+	myconf="${myconf} --with-snapshots=${dmbuildmode}"
+	if use thin; then
+		myconf="${myconf} --with-thin=internal --with-cache=internal"
+		local texec
+		for texec in check dump repair restore; do
+			myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
+			myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
+		done
+	else
+		myconf="${myconf} --with-thin=none --with-cache=none"
+	fi
+
+	if use lvm1; then
+		myconf="${myconf} --with-lvm1=${buildmode}"
+	else
+		myconf="${myconf} --with-lvm1=none"
+	fi
+
+	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
+	use hppa && myconf="${myconf} --disable-o_direct"
+
+	if use clvm; then
+		myconf="${myconf} --with-cluster=${buildmode}"
+		# 4-state! Make sure we get it right, per bug 210879
+		# Valid options are: none, cman, gulm, all
+		#
+		# 2009/02:
+		# gulm is removed now, now dual-state:
+		# cman, none
+		# all still exists, but is not needed
+		#
+		# 2009/07:
+		# TODO: add corosync and re-enable ALL
+		local clvmd=""
+		use cman && clvmd="cman"
+		#clvmd="${clvmd/cmangulm/all}"
+		[ -z "${clvmd}" ] && clvmd="none"
+		myconf="${myconf} --with-clvmd=${clvmd}"
+		myconf="${myconf} --with-pool=${buildmode}"
+	else
+		myconf="${myconf} --with-clvmd=none --with-cluster=none"
+	fi
+
+	econf \
+		$(use_enable readline) \
+		$(use_enable selinux) \
+		--enable-pkgconfig \
+		--with-confdir="${EPREFIX}"/etc \
+		--exec-prefix="${EPREFIX}" \
+		--sbindir="${EPREFIX}/sbin" \
+		--with-staticdir="${EPREFIX}"/sbin \
+		--libdir="${EPREFIX}/$(get_libdir)" \
+		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
+		--with-default-dm-run-dir=/run \
+		--with-default-run-dir=/run/lvm \
+		--with-default-locking-dir=/run/lock/lvm \
+		--with-default-pid-dir=/run \
+		$(use_enable udev udev_rules) \
+		$(use_enable udev udev_sync) \
+		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
+		$(use_enable systemd udev-systemd-background-jobs) \
+		"$(systemd_with_unitdir)" \
+		${myconf} \
+		CLDFLAGS="${LDFLAGS}"
+}
+
+src_compile() {
+	pushd include >/dev/null
+	emake
+	popd >/dev/null
+
+	if use device-mapper-only ; then
+		emake device-mapper
+	else
+		emake
+		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
+	fi
+}
+
+src_install() {
+	local inst
+	INSTALL_TARGETS="install install_tmpfiles_configuration"
+	# install systemd related files only when requested, bug #522430
+	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
+	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
+	for inst in ${INSTALL_TARGETS}; do
+		emake DESTDIR="${D}" ${inst}
+	done
+
+	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
+	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
+
+	if use !device-mapper-only ; then
+		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
+		newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
+		newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
+
+		newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
+		newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
+	fi
+
+	if use clvm; then
+		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
+		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
+	fi
+
+	if use static-libs; then
+		dolib.a libdm/ioctl/libdevmapper.a
+		dolib.a libdaemon/client/libdaemonclient.a #462908
+		#gen_usr_ldscript libdevmapper.so
+		dolib.a daemons/dmeventd/libdevmapper-event.a
+		#gen_usr_ldscript libdevmapper-event.so
+	else
+		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
+	fi
+
+	if use lvm2create_initrd; then
+		dosbin scripts/lvm2create_initrd/lvm2create_initrd
+		doman scripts/lvm2create_initrd/lvm2create_initrd.8
+		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
+	fi
+
+	insinto /etc
+	doins "${FILESDIR}"/dmtab
+
+	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
+}
+
+pkg_postinst() {
+	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
+	ewarn "# rc-update add lvm boot"
+	ewarn
+	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
+	ewarn "to enable lvm autoactivation and metadata caching."
+}
+
+src_test() {
+	einfo "Tests are disabled because of device-node mucking, if you want to"
+	einfo "run tests, compile the package and see ${S}/tests"
+}


             reply	other threads:[~2015-12-03 11:33 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03 11:33 Lars Wendler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-12-28  0:30 [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/, sys-fs/lvm2/files/ Robin H. Johnson
2016-01-25  2:40 Marc Schiffbauer
2016-03-09 20:12 Robin H. Johnson
2016-04-02  5:07 Mike Frysinger
2016-04-20  3:58 Mike Frysinger
2019-04-17  7:26 Robin H. Johnson
2019-05-07 19:16 Robin H. Johnson
2019-06-18  5:27 Robin H. Johnson
2019-06-18  9:03 Lars Wendler
2019-07-24  9:54 Lars Wendler
2019-11-27 16:16 Lars Wendler
2019-11-28 22:45 Robin H. Johnson
2020-03-26 20:24 Lars Wendler
2021-05-09  9:05 Lars Wendler
2022-06-16 22:10 Sam James
2022-07-07 15:10 Mike Gilbert
2022-10-26 19:17 Mike Gilbert
2022-10-27 17:13 Robin H. Johnson
2022-11-18 17:59 Sam James
2022-11-19 21:05 David Seifert
2023-01-13 11:11 David Seifert
2023-01-28 13:38 David Seifert
2023-02-21 20:29 David Seifert
2023-04-13 11:10 David Seifert
2023-05-10  8:57 David Seifert
2023-05-10  8:57 David Seifert
2023-06-02 13:02 David Seifert
2024-05-02 15:21 Mike Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449142424.e98c6edabec9e0b0e9b21da01c2ea2e0df89897b.polynomial-c@gentoo \
    --to=polynomial-c@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox