summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Weidenbaum2018-04-04 17:56:47 -0400
committerAndy Weidenbaum2018-04-04 17:56:47 -0400
commitb4d9ec3f7be4def45cec6930ef44dc16d77c8f49 (patch)
tree99cd616083cd523d0fbc89d42fc3acb49ba266c0
parentd93ed60b62ff85ea6935c5b80a759c98938d8751 (diff)
downloadaur-b4d9ec3f7be4def45cec6930ef44dc16d77c8f49.tar.gz
increment pkgrel; add pacman hooks, rm chown
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD12
-rw-r--r--bs.install8
-rw-r--r--libbitcoin-server-01-rm-rf.hook10
4 files changed, 22 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2fe27d32dd9..1742275d5f7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = libbitcoin-server
pkgdesc = Bitcoin Full Node and Query Server
pkgver = 3.5.0
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/libbitcoin/libbitcoin-server
install = bs.install
arch = i686
@@ -38,11 +38,13 @@ pkgbase = libbitcoin-server
source = bs.logrotate
source = bs-init.service
source = bs.service
+ source = libbitcoin-server-01-rm-rf.hook
sha256sums = 37ef8d572fb7400565655501ffdea5d07a1de10f3d9fa823d33e2bf68ef8c3ce
sha256sums = SKIP
sha256sums = a2e4a1d6aaabcec9c57207a7e92b004c2dfa4a2d15c0ecfc05eefbf307783a49
sha256sums = cbcc39723f04b51ed15475fbfb19cf94273db04b3e460f961e5078b40e664cb7
sha256sums = 17ff3d0ee3580ccbfdd77b227db27f678aa879c7e6fd30d8748bdb2ca84fd371
+ sha256sums = 9d441e2f9c9c7bdb605b69d570120b20f602fb058a565346374bc48d25240ee6
pkgname = libbitcoin-server
diff --git a/PKGBUILD b/PKGBUILD
index 6640b18c5e0..63c390b694d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=libbitcoin-server
pkgver=3.5.0
-pkgrel=3
+pkgrel=4
pkgdesc="Bitcoin Full Node and Query Server"
arch=('i686' 'x86_64')
depends=('boost'
@@ -34,12 +34,14 @@ source=($pkgname-$pkgver.tar.gz::https://codeload.github.com/libbitcoin/$pkgname
git+https://github.com/libbitcoin/libbitcoin-server.wiki
bs.logrotate
bs-init.service
- bs.service)
+ bs.service
+ libbitcoin-server-01-rm-rf.hook)
sha256sums=('37ef8d572fb7400565655501ffdea5d07a1de10f3d9fa823d33e2bf68ef8c3ce'
'SKIP'
'a2e4a1d6aaabcec9c57207a7e92b004c2dfa4a2d15c0ecfc05eefbf307783a49'
'cbcc39723f04b51ed15475fbfb19cf94273db04b3e460f961e5078b40e664cb7'
- '17ff3d0ee3580ccbfdd77b227db27f678aa879c7e6fd30d8748bdb2ca84fd371')
+ '17ff3d0ee3580ccbfdd77b227db27f678aa879c7e6fd30d8748bdb2ca84fd371'
+ '9d441e2f9c9c7bdb605b69d570120b20f602fb058a565346374bc48d25240ee6')
backup=('etc/obelisk/bs/bs.cfg'
'etc/logrotate.d/bs')
install=bs.install
@@ -114,6 +116,10 @@ package() {
msg2 'Installing logrotate conf...'
install -Dm 644 "$srcdir/bs.logrotate" "$pkgdir/etc/logrotate.d/bs"
+ # XXX: pacman hook on Remove event not firing
+ msg2 'Installing pacman hooks...'
+ install -Dm 644 "$srcdir"/*.hook -t "$pkgdir/usr/share/libalpm/hooks"
+
msg2 'Cleaning up pkgdir...'
find "$pkgdir" -type d -name .git -exec rm -r '{}' +
find "$pkgdir" -type f -name .gitignore -exec rm -r '{}' +
diff --git a/bs.install b/bs.install
index e13210f6dfe..2acf832c199 100644
--- a/bs.install
+++ b/bs.install
@@ -1,8 +1,4 @@
-_bs_user=obelisk
-_bs_group=obelisk
-
post_install() {
- chown -R $_bs_user:$_bs_group /etc/obelisk/bs /var/log/obelisk/bs
printf "%b\n" "$obelisk"
}
@@ -10,10 +6,6 @@ post_upgrade() {
post_install
}
-post_remove() {
- rm -rf /etc/obelisk/bs /var/log/obelisk/bs
-}
-
read -d '' obelisk <<'EOF'
########################################################################
########################################################################
diff --git a/libbitcoin-server-01-rm-rf.hook b/libbitcoin-server-01-rm-rf.hook
new file mode 100644
index 00000000000..697d391abfc
--- /dev/null
+++ b/libbitcoin-server-01-rm-rf.hook
@@ -0,0 +1,10 @@
+[Trigger]
+Operation = Remove
+Type = Package
+Target = libbitcoin-server
+
+[Action]
+Description = Cleaning up libbitcoin server directories...
+Depends = coreutils
+When = PostTransaction
+Exec = /usr/bin/rm -rf /etc/obelisk/bs /var/log/obelisk/bs