summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Weidenbaum2015-12-26 10:21:11 -0800
committerAndy Weidenbaum2015-12-26 10:21:11 -0800
commitd1a219226e35c9bd9d75b91e5255a5e07821b6bf (patch)
tree441bbbe2d7dd5eed08c11f43b907f1eafee7490d
parent4162136c6c08755b007a976656015d722da49c06 (diff)
downloadaur-d1a219226e35c9bd9d75b91e5255a5e07821b6bf.tar.gz
increment pkgrel to 4; blockchain dir is /srv/blockchain
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD24
-rw-r--r--bs.install47
3 files changed, 44 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a2bafae706a..f5f8df3619f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Thu Dec 24 05:48:17 UTC 2015
+# Sat Dec 26 18:20:15 UTC 2015
pkgbase = libbitcoin-server-git
pkgdesc = Bitcoin Full Node and Query Server
pkgver = 20151221
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/libbitcoin/libbitcoin-server
install = bs.install
arch = i686
@@ -31,6 +31,8 @@ pkgbase = libbitcoin-server-git
optdepends = libbitcoin-explorer: CurveZMQ client/server authentication
provides = libbitcoin-server
conflicts = libbitcoin-server
+ backup = etc/bs/bs.cfg
+ backup = etc/logrotate.d/bs
source = git+https://github.com/libbitcoin/libbitcoin-server#branch=version2
source = git+https://github.com/libbitcoin/libbitcoin-server.wiki
source = bs.logrotate
diff --git a/PKGBUILD b/PKGBUILD
index 4a9789fd6cd..ebe5ba0a063 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=libbitcoin-server-git
pkgver=20151221
-pkgrel=3
+pkgrel=4
pkgdesc="Bitcoin Full Node and Query Server"
arch=('i686' 'x86_64')
depends=('boost'
@@ -37,6 +37,8 @@ sha256sums=('SKIP'
'09ea3d2bf7cb87a0760c2a73893d62d1868d232c9e925cabf6140b1b031efee3'
'564112d0860f1523049bd89779e1b1bfc189a3d143d2cc808441981ed793658a'
'2bcf3615cd8e5ba6d4c78429b018b9bf756d5fad6ab879963a13f19e47315c7d')
+backup=('etc/bs/bs.cfg'
+ 'etc/logrotate.d/bs')
provides=('libbitcoin-server')
conflicts=('libbitcoin-server')
install=bs.install
@@ -51,10 +53,12 @@ prepare() {
msg2 'Configuring...'
cp -dpr --no-preserve=ownership data/bs.cfg data/bs.cfg.in
- sed -i 's@^database_path.*@database_path = /srv/bs/blockchain@' data/bs.cfg.in
- sed -i 's@^debug_file.*@debug_file = /var/log/bs/debug.log@' data/bs.cfg.in
- sed -i 's@^error_file.*@error_file = /var/log/bs/error.log@' data/bs.cfg.in
- sed -i 's@^hosts_file.*@hosts_file = /etc/bs/hosts.cache@' data/bs.cfg.in
+ sed -i \
+ -e 's@^database_path.*@database_path = /srv/blockchain/db@' \
+ -e 's@^debug_file.*@debug_file = /var/log/bs/debug.log@' \
+ -e 's@^error_file.*@error_file = /var/log/bs/error.log@' \
+ -e 's@^hosts_file.*@hosts_file = /etc/bs/hosts.cache@' \
+ data/bs.cfg.in
}
build() {
@@ -82,7 +86,7 @@ package() {
msg2 'Installing...'
install -dm 700 "$pkgdir/etc/bs"
- install -dm 700 "$pkgdir/srv/bs"
+ install -dm 755 "$pkgdir/srv/blockchain"
make DESTDIR="$pkgdir" install
msg2 'Installing documentation...'
@@ -93,13 +97,11 @@ package() {
install -Dm 600 data/bs.cfg.in "$pkgdir/etc/bs/bs.cfg"
msg2 'Installing systemd service files...'
- install -Dm 644 "$srcdir/bs.service" \
- "$pkgdir/usr/lib/systemd/system/bs.service"
- install -Dm 644 "$srcdir/bsinit.service" \
- "$pkgdir/usr/lib/systemd/system/bsinit.service"
+ install -Dm 644 "$srcdir/bsinit.service" -t "$pkgdir/usr/lib/systemd/system"
+ install -Dm 644 "$srcdir/bs.service" -t "$pkgdir/usr/lib/systemd/system"
msg2 'Installing logrotate conf...'
- install -dm 700 "$pkgdir/var/log/bs"
+ install -dm 755 "$pkgdir/var/log/bs"
install -Dm 644 "$srcdir/bs.logrotate" "$pkgdir/etc/logrotate.d/bs"
msg2 'Cleaning up pkgdir...'
diff --git a/bs.install b/bs.install
index 97acf9cf09a..b0fab5facc1 100644
--- a/bs.install
+++ b/bs.install
@@ -4,22 +4,22 @@ _bs_group=bs
post_install() {
_mkuser
# disable Copy-On-Write (btrfs directories only)
- for _dir in /srv/bs /var/log/bs; do
+ for _dir in /srv/blockchain /var/log/bs; do
_is_btrfs "$_dir" && _disable_cow "$_dir"
done
- chown -R $_bs_user:$_bs_group /etc/bs /srv/bs /var/log/bs
- printf "%b\n" "$xx"
+ chown -R $_bs_user:$_bs_group /etc/bs /srv/blockchain /var/log/bs
+ printf "%b\n" "$obelisk"
}
post_upgrade() {
_mkuser
- chown -R $_bs_user:$_bs_group /etc/bs /srv/bs /var/log/bs
- printf "%b\n" "$xx"
+ chown -R $_bs_user:$_bs_group /etc/bs /srv/blockchain /var/log/bs
+ printf "%b\n" "$obelisk"
}
post_remove() {
_rmuser
- rm -rf /etc/bs /srv/bs /var/log/bs
+ rm -rf /etc/bs /srv/blockchain /var/log/bs
}
@@ -86,21 +86,28 @@ _chattrify() {
}
_disable_cow() {
- _chattrify "$1" "700" "$_bs_user" "$_bs_group"
+ _chattrify "$1" "755" "$_bs_user" "$_bs_group"
}
-read -d '' xx <<'EOF'
-libbitcoin-server
-=================
-
-To run normally:
-
- $ bs --initchain /path/to/bs/config/file
- $ bs /path/to/bs/config/file
-
-To run as a service:
-
- $ sudo systemctl start bsinit # wait several mins for blockchain dir to init
- $ sudo systemctl start bs
+read -d '' obelisk <<'EOF'
+########################################################################
+########################################################################
+## ##
+## Libbitcoin Server ##
+## _________________ ##
+## ##
+## To run: ##
+## ##
+## systemctl start bsinit # first run only ##
+## systemctl start bs ##
+## ##
+## ##
+## Config: /etc/bs/bs.cfg ##
+## Blockchain: /srv/blockchain ##
+## Documentation: /usr/share/doc/libbitcoin-server ##
+## Logs: /var/log/bs ##
+## ##
+########################################################################
+########################################################################
EOF