From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 07940139345 for ; Wed, 7 Jul 2021 18:47:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 58FF0E0B94; Wed, 7 Jul 2021 18:47:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 40FD2E0B94 for ; Wed, 7 Jul 2021 18:47:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 152DA34087F for ; Wed, 7 Jul 2021 18:47:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6B293581 for ; Wed, 7 Jul 2021 18:47:40 +0000 (UTC) From: "Ionen Wolkens" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ionen Wolkens" Message-ID: <1625683447.5ad5474983c2e84bd466d03f24c5040c8c853e92.ionen@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/bees/, sys-fs/bees/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-fs/bees/bees-9999.ebuild sys-fs/bees/files/v9999-0001-HACK-musl-does-not-define-pthread_getname_np.patch X-VCS-Directories: sys-fs/bees/files/ sys-fs/bees/ X-VCS-Committer: ionen X-VCS-Committer-Name: Ionen Wolkens X-VCS-Revision: 5ad5474983c2e84bd466d03f24c5040c8c853e92 X-VCS-Branch: master Date: Wed, 7 Jul 2021 18:47:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9f9cbc80-63fb-4955-832e-f798f7974b2f X-Archives-Hash: 499f8e45c0b8db8432369248ab58fc32 commit: 5ad5474983c2e84bd466d03f24c5040c8c853e92 Author: Kai Krakow kaishome de> AuthorDate: Sat Jun 19 08:42:50 2021 +0000 Commit: Ionen Wolkens gentoo org> CommitDate: Wed Jul 7 18:44:07 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ad54749 sys-fs/bees: Drop conflicting musl hack + small fixes in 9999 An upcoming musl update will add the missing function. Also: * Fix installation with eprefix * Fix style * Inherit toolchain-funcs (for tc-export) Package-Manager: Portage-3.0.20, Repoman-3.0.2 Signed-off-by: Kai Krakow kaishome.de> Signed-off-by: Ionen Wolkens gentoo.org> sys-fs/bees/bees-9999.ebuild | 15 +++---- ...K-musl-does-not-define-pthread_getname_np.patch | 50 ---------------------- 2 files changed, 6 insertions(+), 59 deletions(-) diff --git a/sys-fs/bees/bees-9999.ebuild b/sys-fs/bees/bees-9999.ebuild index d656c4e6cde..7777d0ea45f 100644 --- a/sys-fs/bees/bees-9999.ebuild +++ b/sys-fs/bees/bees-9999.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit linux-info systemd +inherit linux-info systemd toolchain-funcs DESCRIPTION="Best-Effort Extent-Same, a btrfs dedup agent" HOMEPAGE="https://github.com/Zygo/bees" @@ -29,8 +29,6 @@ RDEPEND="${DEPEND}" CONFIG_CHECK="~BTRFS_FS" ERROR_BTRFS_FS="CONFIG_BTRFS_FS: bees does currently only work with btrfs" -PATCHES=( "${FILESDIR}/v9999-0001-HACK-musl-does-not-define-pthread_getname_np.patch" ) - pkg_pretend() { if [[ ${MERGE_TYPE} != buildonly ]]; then if kernel_is -lt 4 11; then @@ -74,17 +72,16 @@ src_prepare() { } src_configure() { + tc-export CC CXX AR cat >localconf <<-EOF || die - LIBEXEC_PREFIX=/usr/libexec - PREFIX=/usr - LIBDIR="$(get_libdir)" + LIBEXEC_PREFIX="${EPREFIX}/usr/libexec" + PREFIX="${EPREFIX}/usr" + LIBDIR="${EPREFIX}/$(get_libdir)" SYSTEMD_SYSTEM_UNIT_DIR="$(systemd_get_systemunitdir)" DEFAULT_MAKE_TARGET=all EOF if [[ ${PV} != "9999" ]] ; then - cat >>localconf <<-EOF || die - BEES_VERSION=v${PV} - EOF + echo BEES_VERSION=v${PV} >>localconf || die fi if use tools; then echo OPTIONAL_INSTALL_TARGETS=install_tools >>localconf || die diff --git a/sys-fs/bees/files/v9999-0001-HACK-musl-does-not-define-pthread_getname_np.patch b/sys-fs/bees/files/v9999-0001-HACK-musl-does-not-define-pthread_getname_np.patch deleted file mode 100644 index 6b8224a5a56..00000000000 --- a/sys-fs/bees/files/v9999-0001-HACK-musl-does-not-define-pthread_getname_np.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 02bdb636be5abd15836e5e43e9b53517595686c9 Mon Sep 17 00:00:00 2001 -From: Kai Krakow -Date: Thu, 16 Apr 2020 21:21:57 +0200 -Subject: [PATCH v9999] HACK: musl does not define pthread_getname_np() - -The glibc alternative musl does not define this setter function. This -fix is probably wrong because it resets the thread names used for -logging internally to empty strings. - -Link: https://www.openwall.com/lists/musl/2019/07/17/3 -Signed-off-by: Kai Krakow ---- - lib/task.cc | 2 ++ - src/bees.cc | 2 ++ - 2 files changed, 4 insertions(+) - -diff --git a/lib/task.cc b/lib/task.cc -index 937a477..85da59b 100644 ---- a/lib/task.cc -+++ b/lib/task.cc -@@ -194,7 +194,9 @@ namespace crucible { - lock.unlock(); - - char buf[24] = { 0 }; -+#ifdef _GNU_SOURCE - DIE_IF_MINUS_ERRNO(pthread_getname_np(pthread_self(), buf, sizeof(buf))); -+#endif - DIE_IF_MINUS_ERRNO(pthread_setname_np(pthread_self(), m_title.c_str())); - - sched_param param = { .sched_priority = 0 }; -diff --git a/src/bees.cc b/src/bees.cc -index 03a626c..3db5d73 100644 ---- a/src/bees.cc -+++ b/src/bees.cc -@@ -152,10 +152,12 @@ BeesNote::get_name() - // OK try the pthread name next. - char buf[24]; - memset(buf, '\0', sizeof(buf)); -+#ifdef _GNU_SOURCE - int err = pthread_getname_np(pthread_self(), buf, sizeof(buf)); - if (err) { - return string("pthread_getname_np: ") + strerror(err); - } -+#endif - buf[sizeof(buf) - 1] = '\0'; - - // thread_getname_np returns process name --- -2.26.2 -