summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authornroi2017-01-01 17:11:22 +0100
committernroi2017-01-01 17:11:22 +0100
commitcd9dfc74f135115a61b21d5ca190b509fa2edb0d (patch)
treed8384e28088c7fbe800b688e6a325cafc2cfa4a1
parente732a63bec32d321068ae2ab8df1a5cb018159eb (diff)
downloadaur-cd9dfc74f135115a61b21d5ca190b509fa2edb0d.tar.gz
Update to changes from upstream
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD9
-rw-r--r--cpcache.install5
-rwxr-xr-xcreate_db.sh12
4 files changed, 25 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0833da824e1..dedab9910b9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = cpcache-git
pkgdesc = central pacman cache
- pkgver = r88.6e0a8cc
+ pkgver = r95.974c568
pkgrel = 1
url = https://github.com/nroi/cpcache
install = cpcache.install
@@ -17,10 +17,12 @@ pkgbase = cpcache-git
source = sysuser.conf
source = cpcache.install
source = cpcache.service
+ source = create_db.sh
sha256sums = SKIP
sha256sums = 0098e749b19617c0f7d619d47a3bc3015bab62e9ad0916087502daff672fb309
- sha256sums = e326c1097269a47a35fe327d839a566d90888339f7cc00b2207e0accf441e6cd
+ sha256sums = effdcc6de465d342f4aba039c853d48e501cf0e55ed4f896cf638ba3499584f6
sha256sums = 0523a85ce955f9a221340a2bcd8b3f2543dc817469e36623db06630bea925918
+ sha256sums = 42c01be8766d2b48f142a7b848d5708035b80143af8f0bb02e69a3bc7fff3825
pkgname = cpcache-git
diff --git a/PKGBUILD b/PKGBUILD
index a38c4aec16e..4e29373d82e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: nroi <nroi@mailbox.org>
pkgname=cpcache-git
-pkgver=r88.6e0a8cc
+pkgver=r95.974c568
pkgrel=1
pkgdesc="central pacman cache"
arch=('i686' 'x86_64' 'armv7h' 'aarch64')
@@ -14,11 +14,13 @@ source=('git+https://github.com/nroi/cpcache.git'
'sysuser.conf'
'cpcache.install'
'cpcache.service'
+ 'create_db.sh'
)
sha256sums=('SKIP'
'0098e749b19617c0f7d619d47a3bc3015bab62e9ad0916087502daff672fb309'
- 'e326c1097269a47a35fe327d839a566d90888339f7cc00b2207e0accf441e6cd'
+ 'effdcc6de465d342f4aba039c853d48e501cf0e55ed4f896cf638ba3499584f6'
'0523a85ce955f9a221340a2bcd8b3f2543dc817469e36623db06630bea925918'
+ '42c01be8766d2b48f142a7b848d5708035b80143af8f0bb02e69a3bc7fff3825'
)
pkgver() {
@@ -27,11 +29,12 @@ pkgver() {
}
package() {
+ mkdir -p "${pkgdir}/var/cache/cpcache/mnesia"
+ ./create_db.sh "${pkgdir}"
cd "${srcdir}/${pkgname%-git}"
/usr/bin/mix local.hex --force
/usr/bin/mix local.rebar --force
/usr/bin/mix deps.get
- /usr/bin/mix release.init
MIX_ENV=prod /usr/bin/mix release --env=prod
mkdir -p "${pkgdir}/usr/share/${pkgname%-git}"
mkdir -p "${pkgdir}/var/lib/${pkgname%-git}"
diff --git a/cpcache.install b/cpcache.install
index b908f03abf9..53fa21fb578 100644
--- a/cpcache.install
+++ b/cpcache.install
@@ -1,8 +1,9 @@
post_install() {
systemd-sysusers cpcache.conf
chown cpcache:cpcache "/var/lib/cpcache"
- mkdir -p /var/cache/cpcache/x86/{core,extra,multilib,testing,community}/os/{i686,x86_64}/downloads
- mkdir -p /var/cache/cpcache/arm/{aarch64,arm,armv6h,armv7h}/{alarm,aur,community,extra,core}/downloads
+ mkdir -p /var/cache/cpcache/mnesia
+ mkdir -p /var/cache/cpcache/x86/{core,extra,multilib,testing,community}/os/{i686,x86_64}
+ mkdir -p /var/cache/cpcache/arm/{aarch64,arm,armv6h,armv7h}/{alarm,aur,community,extra,core}
chown -R cpcache:cpcache "/var/cache/cpcache"
}
diff --git a/create_db.sh b/create_db.sh
new file mode 100755
index 00000000000..863f58f6456
--- /dev/null
+++ b/create_db.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+PREFIX="$1"
+
+CMD=$(cat <<EOF
+:ok = :mnesia.create_schema([node])
+:ok = :mnesia.start()
+{:atomic, :ok} = :mnesia.create_table(ContentLength, [attributes: [:path, :content_length],
+ disc_copies: [node]])
+EOF
+)
+ELIXIR_ERL_OPTIONS="-sname cpcache -mnesia dir '$PREFIX/var/cache/cpcache/mnesia'" /usr/bin/elixir -e "$CMD"