public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Florian Schmaus" <flow@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/bitcoin-core/
Date: Wed, 25 Oct 2023 08:37:33 +0000 (UTC)	[thread overview]
Message-ID: <1698223039.1494dde4f27b31dd269d646e5ce0298f082c4716.flow@gentoo> (raw)

commit:     1494dde4f27b31dd269d646e5ce0298f082c4716
Author:     Matt Whitlock <gentoo <AT> mattwhitlock <DOT> name>
AuthorDate: Tue Oct 24 15:43:47 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Oct 25 08:37:19 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1494dde4

net-p2p/bitcoin-core: add warnings about unlikely USE flag combos

Signed-off-by: Matt Whitlock <gentoo <AT> mattwhitlock.name>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 net-p2p/bitcoin-core/bitcoin-core-25.1.ebuild | 42 ++++++++++++++++++++++++---
 1 file changed, 38 insertions(+), 4 deletions(-)

diff --git a/net-p2p/bitcoin-core/bitcoin-core-25.1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-25.1.ebuild
index 351ec614e96f..a5818124e34f 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-25.1.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-25.1.ebuild
@@ -95,6 +95,36 @@ PATCHES=(
 	"${FILESDIR}/init.patch"
 )
 
+efmt() {
+	: ${1:?} ; local l ; while read -r l ; do "${!#}" "${l}" ; done < <(fmt "${@:1:$#-1}")
+}
+
+pkg_pretend() {
+	if ! use daemon && ! use gui && ! has_version "${CATEGORY}/${PN}[-daemon,-gui(-),-qt5(-)]" ; then
+		efmt ewarn <<-EOF
+			You are enabling neither USE="daemon" nor USE="gui". This is a valid
+			configuration, but you will be unable to run a Bitcoin node using this
+			installation.
+		EOF
+	fi
+	if use daemon && ! use bitcoin-cli && ! has_version "${CATEGORY}/${PN}[daemon,-bitcoin-cli]" ; then
+		efmt ewarn <<-EOF
+			You are enabling USE="daemon" but not USE="bitcoin-cli". This is a valid
+			configuration, but you will be unable to interact with your bitcoind node
+			via the command line using this installation.
+		EOF
+	fi
+	if ! use berkdb && ! use sqlite &&
+		{ { use daemon && ! has_version "${CATEGORY}/${PN}[daemon,-berkdb,-sqlite]" ; } ||
+		  { use gui && ! has_version "${CATEGORY}/${PN}[gui,-berkdb,-sqlite]" ; } ; }
+	then
+		efmt ewarn <<-EOF
+			You are enabling neither USE="berkdb" nor USE="sqlite". This is a valid
+			configuration, but your Bitcoin node will be unable to open any wallets.
+		EOF
+	fi
+}
+
 pkg_setup() {
 	use test && python-any-r1_pkg_setup
 }
@@ -209,10 +239,6 @@ src_install() {
 	fi
 }
 
-efmt() {
-	: ${1:?} ; local l ; while read -r l ; do "${!#}" "${l}" ; done < <(fmt "${@:1:$#-1}")
-}
-
 pkg_preinst() {
 	if use daemon && [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then
 		if [[ -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then
@@ -254,6 +280,14 @@ pkg_postinst() {
 			- Running bitcoind directly: add that user to the 'tor' user group.
 			EOF
 	fi
+
+	if use bitcoin-cli && use daemon ; then
+		efmt -su elog <<-EOF
+			To use bitcoin-cli with the /etc/init.d/bitcoind service:
+			 - Add your user(s) to the 'bitcoin' group.
+			 - Symlink ~/.bitcoin to /var/lib/bitcoind.
+		EOF
+	fi
 }
 
 pkg_postrm() {


             reply	other threads:[~2023-10-25  8:37 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25  8:37 Florian Schmaus [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-04-20  8:18 [gentoo-commits] repo/gentoo:master commit in: net-p2p/bitcoin-core/ Sam James
2025-04-20  8:18 Sam James
2025-04-20  8:18 Sam James
2025-04-20  8:18 Sam James
2025-03-31 15:33 Andreas Sturmlechner
2025-02-13  8:48 Joonas Niilola
2025-02-12  5:00 Sam James
2025-02-12  5:00 Sam James
2025-02-12  5:00 Sam James
2025-01-09  8:26 Florian Schmaus
2024-12-20  0:02 Sam James
2024-12-13  7:39 Joonas Niilola
2024-12-10 15:22 Sam James
2024-12-10 15:22 Sam James
2024-12-10 14:37 Arthur Zamarin
2024-11-09 10:08 Arthur Zamarin
2024-11-09  9:57 Arthur Zamarin
2024-11-07  9:16 Sam James
2024-11-06 10:02 Florian Schmaus
2024-10-08 19:33 Florian Schmaus
2024-09-22 11:27 Sam James
2024-08-31  2:23 Sam James
2024-07-29  7:33 Joonas Niilola
2024-06-26  9:27 Florian Schmaus
2024-06-20 11:28 Florian Schmaus
2024-06-20 11:27 Florian Schmaus
2024-06-20 11:27 Florian Schmaus
2024-06-13  7:47 Florian Schmaus
2024-04-17 10:10 Florian Schmaus
2024-04-03 17:38 Florian Schmaus
2024-03-07 15:19 Sam James
2024-03-07 15:19 Sam James
2024-03-07 15:19 Sam James
2023-12-13  7:47 Florian Schmaus
2023-10-25  8:37 Florian Schmaus
2023-10-25  8:37 Florian Schmaus
2023-10-24  9:14 Joonas Niilola
2023-10-24  9:14 Joonas Niilola
2023-10-09 13:14 Florian Schmaus

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=1698223039.1494dde4f27b31dd269d646e5ce0298f082c4716.flow@gentoo \
    --to=flow@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