From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1450467-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 1F28A158020
	for <garchives@archives.gentoo.org>; Thu, 27 Oct 2022 17:13:29 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 4A2D9E0900;
	Thu, 27 Oct 2022 17:13:28 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 2BD99E0900
	for <gentoo-commits@lists.gentoo.org>; Thu, 27 Oct 2022 17:13:28 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id D8762340F20
	for <gentoo-commits@lists.gentoo.org>; Thu, 27 Oct 2022 17:13:26 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 225E4615
	for <gentoo-commits@lists.gentoo.org>; Thu, 27 Oct 2022 17:13:25 +0000 (UTC)
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" <robbat2@gentoo.org>
Message-ID: <1666890803.f85aba8b222771e8cc87a6e75d0220cdb2717f78.robbat2@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/, sys-fs/lvm2/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-fs/lvm2/files/lvm2-2.03.16-readelf.patch sys-fs/lvm2/lvm2-2.03.16.ebuild
X-VCS-Directories: sys-fs/lvm2/files/ sys-fs/lvm2/
X-VCS-Committer: robbat2
X-VCS-Committer-Name: Robin H. Johnson
X-VCS-Revision: f85aba8b222771e8cc87a6e75d0220cdb2717f78
X-VCS-Branch: master
Date: Thu, 27 Oct 2022 17:13:25 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: edc71aed-fec5-4b63-a4c8-25249147807f
X-Archives-Hash: d831d030dc3e69cd4557b5b9db898f1d

commit:     f85aba8b222771e8cc87a6e75d0220cdb2717f78
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 27 17:13:09 2022 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Thu Oct 27 17:13:23 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f85aba8b

sys-fs/lvm2: fix hardcoded readelf

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
Close: https://bugs.gentoo.org/840628

 sys-fs/lvm2/files/lvm2-2.03.16-readelf.patch | 25 +++++++++++++++++++++++++
 sys-fs/lvm2/lvm2-2.03.16.ebuild              |  3 +++
 2 files changed, 28 insertions(+)

diff --git a/sys-fs/lvm2/files/lvm2-2.03.16-readelf.patch b/sys-fs/lvm2/files/lvm2-2.03.16-readelf.patch
new file mode 100644
index 000000000000..b4d60c5825db
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.03.16-readelf.patch
@@ -0,0 +1,25 @@
+diff -Nuar LVM2.2.03.16.orig/libdm/Makefile.in LVM2.2.03.16/libdm/Makefile.in
+--- LVM2.2.03.16.orig/libdm/Makefile.in	2022-05-18 09:24:20.000000000 -0700
++++ LVM2.2.03.16/libdm/Makefile.in	2022-10-27 10:09:29.283631020 -0700
+@@ -59,6 +59,10 @@
+ 
+ PROGS_CFLAGS = $(UDEV_CFLAGS)
+ 
++ifeq ($(strip $(READELF)),)
++READELF := readelf
++endif
++
+ device-mapper: $(TARGETS)
+ 
+ dm-tools.device-mapper: device-mapper
+@@ -71,8 +75,8 @@
+ # also the older symbol is built-in
+ .symver_check: $(LIB_SHARED)
+ 	@echo "    [CHECK] $<"
+-	$(Q) if readelf -Ws $< | grep -q dm_stats_create_region@@; then \
+-	SYM=$$(readelf -Ws $< | grep dm_stats_create_region@DM_1_02_106); \
++	$(Q) if $(READELF) -Ws $< | grep -q dm_stats_create_region@@; then \
++	SYM=$$( $(READELF) -Ws $< | grep dm_stats_create_region@DM_1_02_106); \
+ 	if test -n "$$SYM"; then touch $@; \
+ 	else echo >&2 "Missing versioned symbols in $<"; false; fi; \
+ 	else touch $@; fi

diff --git a/sys-fs/lvm2/lvm2-2.03.16.ebuild b/sys-fs/lvm2/lvm2-2.03.16.ebuild
index 30a41a0a959c..d3922e5152cf 100644
--- a/sys-fs/lvm2/lvm2-2.03.16.ebuild
+++ b/sys-fs/lvm2/lvm2-2.03.16.ebuild
@@ -69,6 +69,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-2.03.14-r1-fopen-to-freopen.patch
 	"${FILESDIR}"/${PN}-2.03.14-r1-mallinfo.patch
 	"${FILESDIR}"/${PN}-2.03.14-freopen_n2.patch
+	"${FILESDIR}"/${PN}-2.03.16-readelf.patch
 )
 
 pkg_setup() {
@@ -162,6 +163,7 @@ src_configure() {
 		myeconfargs+=( --with-thin=none --with-cache=none )
 	fi
 
+	export READELF="$(tc-getREADELF)"
 	myeconfargs+=(
 		$(use_enable readline)
 		$(use_enable selinux)
@@ -184,6 +186,7 @@ src_configure() {
 		$(use_enable systemd notify-dbus)
 		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
 		CLDFLAGS="${LDFLAGS}"
+		READELF="${READELF}"
 	)
 	# Hard-wire this to bash as some shells (dash) don't know
 	# "-o pipefail" #682404