FS#63752 - [bitcoin-daemon] sysusers/tmpfiles creates /var/lib/bitcoin but service wants bitcoind & conf file

Attached to Project: Community Packages
Opened by James Harvey (jamespharvey20) - Saturday, 14 September 2019, 00:34 GMT
Last edited by Christian Rebischke (Shibumi) - Saturday, 16 November 2019, 18:10 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Christian Rebischke (Shibumi)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: As-is, the included .service file is unusable, and upstream's example config isn't included.

1. Various improvements to the PKGBUILD were made in 0.15.1-4 in response to https://bugs.archlinux.org/task/45194 and https://bugs.archlinux.org/task/52325 including adding upstream's .service file

However, the Arch-specific sysusers/tmpfiles makes "/var/lib/bitcoin" in conflict with upstream's provided "bitcoind.service" file which expects "/var/lib/bitcoin*d*" (asterisks added for emphasis.) Note upstream's service file does expect user bitcoin and group bitcoin.

I recognize there are problems changing this for existing users, however as-is, the .service file is unusable. Other way to go could be to modify upstream's service file to use the historical Arch /var/lib/bitcoin directory.

2. Upstream also provides an example /etc file which would be nice to package. It only provides comments.


Additional info:
* 18.0.0-2 & 18.0.0-3[staging]


Steps to reproduce:
n/a


Proposed patch:

Please take this bugreport to be for the purpose of fixing issues #1 and #2 above. This patch is of course provided for the maintainers' convenience only.

Since 0.18.1 is released, I included updating to that as well.



diff --git a/trunk/Changelog b/trunk/Changelog
index 3901e3c..c5b248c 100644
--- a/trunk/Changelog
+++ b/trunk/Changelog
@@ -1 +1 @@
-https://bitcoincore.org/en/releases/0.18.0/
+https://bitcoincore.org/en/releases/0.18.1/
diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD
index cf82be5..37bd216 100644
--- a/trunk/PKGBUILD
+++ b/trunk/PKGBUILD
@@ -5,8 +5,8 @@
#_dbver=4.8.30
pkgbase=bitcoin
pkgname=('bitcoin-daemon' 'bitcoin-cli' 'bitcoin-qt' 'bitcoin-tx')
-pkgver=0.18.0
-pkgrel=3
+pkgver=0.18.1
+pkgrel=1
arch=('x86_64')
url="https://www.bitcoin.org/"
makedepends=('boost' 'libevent' 'qt5-base' 'qt5-tools' 'qrencode' 'miniupnpc' 'protobuf' 'zeromq')
@@ -14,9 +14,9 @@ license=('MIT')
source=("$pkgname-$pkgver.tar.gz::https://github.com/bitcoin/bitcoin/archive/v$pkgver.tar.gz"
"bitcoin.sysusers"
"bitcoin.tmpfiles")
-sha256sums=('ef986ae1730aa975682b6cc8326875e8e7c9d639ba2171351c50d053a55fcd38'
- '6f70b0d3d5e4a3f78b15d8f49515cd33cbf0c9d2ac22f94f0d3fabb3f620e458'
- 'b769c977b193680f2f549997fd8e07f6aa507071dfd519d59255ab4c687ebfcd')
+sha256sums=('db3c76ac913adfd67e3c7ff243b443c9706f81dd382d1212875fefc2de1ea5ff'
+ '7a77112fb094b9b2e6dd873e24c9a6bacb1f1c453d811a024f271f4b78f2a704'
+ '6bb4651e9025ae1c44a47b7fe43431a6e75efb385748c88050c7f10ca9825cf8')
validpgpkeys=(71A3B16735405025D447E8F274810B012346C9A6)
changelog=Changelog

@@ -48,6 +48,7 @@ package_bitcoin-qt() {
package_bitcoin-daemon() {
pkgdesc="Bitcoin is a peer-to-peer network based digital currency - daemon"
depends=(boost-libs libevent miniupnpc libminiupnpc.so zeromq)
+ backup=('etc/bitcoin/bitcoin.conf')

cd $pkgbase-$pkgver
install -Dm755 src/bitcoind "$pkgdir"/usr/bin/bitcoind
@@ -61,6 +62,8 @@ package_bitcoin-daemon() {
"$pkgdir/usr/lib/sysusers.d/bitcoin.conf"
install -Dm644 "$srcdir/bitcoin.tmpfiles" \
"$pkgdir/usr/lib/tmpfiles.d/bitcoin.conf"
+ install -Dm644 share/examples/bitcoin.conf \
+ "$pkgdir"/etc/bitcoin/bitcoin.conf

install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
diff --git a/trunk/bitcoin.sysusers b/trunk/bitcoin.sysusers
index cf232dc..e2738d7 100644
--- a/trunk/bitcoin.sysusers
+++ b/trunk/bitcoin.sysusers
@@ -1 +1 @@
-u bitcoin - - /var/lib/bitcoin
+u bitcoin - - /var/lib/bitcoind
diff --git a/trunk/bitcoin.tmpfiles b/trunk/bitcoin.tmpfiles
index 704b541..55045d2 100644
--- a/trunk/bitcoin.tmpfiles
+++ b/trunk/bitcoin.tmpfiles
@@ -1,2 +1,2 @@
-d /var/lib/bitcoin 0770 bitcoin bitcoin - -
-d /etc/bitcoin 0770 bitcoin bitcoin - -
+d /var/lib/bitcoind 0770 bitcoin bitcoin - -
+d /etc/bitcoin 0770 bitcoin bitcoin - -
This task depends upon

Closed by  Christian Rebischke (Shibumi)
Saturday, 16 November 2019, 18:10 GMT
Reason for closing:  Fixed
Additional comments about closing:  bitcoin 0.19-1

Loading...