summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraysky2015-10-27 01:46:11 -0400
committergraysky2015-10-27 01:46:11 -0400
commit90c46d7a9465d4d9ac7e19f3b5e811767cb97d22 (patch)
tree73313ccb3fb7f40c0dad2c573e25f87646b9a9d2
parent9c44cb4f29ced0655385c8f94fe0575552b7ba48 (diff)
downloadaur-90c46d7a9465d4d9ac7e19f3b5e811767cb97d22.tar.gz
Update to 6.14-1
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD6
-rw-r--r--psd.install34
3 files changed, 31 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e773e7a413b7..a153a0ccb840 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = profile-sync-daemon
pkgdesc = Syncs browser profiles to tmpfs reducing SSD/HDD calls and speeding-up browsers.
- pkgver = 6.12
- pkgrel = 2
+ pkgver = 6.14
+ pkgrel = 1
url = https://github.com/graysky2/profile-sync-daemon
install = psd.install
arch = any
@@ -16,8 +16,8 @@ pkgbase = profile-sync-daemon
conflicts = tmpfs-store
conflicts = tmpfs-sync
conflicts = user-profile-sync-daemon
- source = http://repo-ck.com/source/profile-sync-daemon/profile-sync-daemon-6.12.tar.xz
- sha256sums = 5bf0aea0e532970ead4bc634cfcc076d223f00c1b45519864979ca9e588871cc
+ source = http://repo-ck.com/source/profile-sync-daemon/profile-sync-daemon-6.14.tar.xz
+ sha256sums = 122967a0687bb29d7fa0dab25debd3869965111ac21dfdac62c648f18b486c4d
pkgname = profile-sync-daemon
diff --git a/PKGBUILD b/PKGBUILD
index ff7a66cb45df..783e8103416b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# Maintainer: graysky <graysky AT archlinux DOT us>
pkgname='profile-sync-daemon'
-pkgver=6.12
-pkgrel=2
+pkgver=6.14
+pkgrel=1
pkgdesc='Syncs browser profiles to tmpfs reducing SSD/HDD calls and speeding-up browsers.'
arch=('any')
url='https://github.com/graysky2/profile-sync-daemon'
@@ -12,7 +12,7 @@ conflicts=('firefox-sync' 'goanysync' 'go-anysync-git' 'iceweasel-sync'
'tmpfs-store' 'tmpfs-sync' 'user-profile-sync-daemon')
source=("http://repo-ck.com/source/$pkgname/$pkgname-$pkgver.tar.xz")
install=psd.install
-sha256sums=('5bf0aea0e532970ead4bc634cfcc076d223f00c1b45519864979ca9e588871cc')
+sha256sums=('122967a0687bb29d7fa0dab25debd3869965111ac21dfdac62c648f18b486c4d')
build() {
cd "$pkgname-$pkgver"
diff --git a/psd.install b/psd.install
index 6a085c0f8555..b83323f211a1 100644
--- a/psd.install
+++ b/psd.install
@@ -1,6 +1,8 @@
## arg 1: the new package version
## arg 2: the old package version
+users=$(loginctl --no-legend list-users | awk '{ print $2 }' | sed ':a;N;$!ba;s/\n/ /g')
+
pre_upgrade() {
# version 6.00 is a major rebuild
# yes, I realize that pacman should not stop services but in this case it
@@ -25,7 +27,7 @@ pre_upgrade() {
# version 6.01 redefines the location of tmpfs for the software so it is
# required that pacman stop the user service here if running
if [ $(vercmp $2 6.01) -lt 0 ]; then
- for i in $(users); do
+ for i in "$users"; do
running="$(su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user is-active psd')"
if [[ "$running" = "active" ]]; then
su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user stop psd.service'
@@ -36,7 +38,7 @@ pre_upgrade() {
fi
if [ $(vercmp $2 6.03) -lt 0 ]; then
- for i in $(users); do
+ for i in "$users"; do
HOMEDIR="$(getent passwd $i | cut -d: -f6)"
if [[ -d "$HOMEDIR"/.psd ]]; then
echo '-> The use of $HOME/.psd is deprecated.'
@@ -47,7 +49,7 @@ pre_upgrade() {
# version 6.05 impliments changes to both the service and the way overlayfs is mounted/umount
# so it is required that pacman stop the user service here if running
if [ $(vercmp $2 6.05) -lt 0 ]; then
- for i in $(users); do
+ for i in "$users"; do
running="$(su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user is-active psd')"
if [[ "$running" = "active" ]]; then
su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user stop psd.service'
@@ -65,7 +67,18 @@ pre_upgrade() {
# version 6.10 relocates pid file
if [ $(vercmp $2 6.10) -lt 0 ]; then
- for i in $(users); do
+ for i in "$users"; do
+ running="$(su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user is-active psd')"
+ if [[ "$running" = "active" ]]; then
+ su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user stop psd.service'
+ echo '-> Internal changes to psd require it to be stopped now before updating.'
+ fi
+ done
+ fi
+
+ # version 6.14 changes the way overlayfs works
+ if [ $(vercmp $2 6.14) -lt 0 ]; then
+ for i in "$users"; do
running="$(su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user is-active psd')"
if [[ "$running" = "active" ]]; then
su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user stop psd.service'
@@ -98,10 +111,14 @@ post_upgrade() {
_daemon_refresh
fi
+ # version 6.14 modified services
+ if [ $(vercmp $2 6.14) -lt 0 ]; then
+ _daemon_refresh
+ fi
}
pre_remove() {
- for i in $(users); do
+ for i in "$users"; do
running="$(su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user is-active psd')"
if [[ "$running" = "active" ]]; then
echo "--> In order to preserve your profiles, pacman will now stop your psd service."
@@ -112,10 +129,7 @@ pre_remove() {
}
_daemon_refresh() {
- for i in $(users); do
- running="$(su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user is-active psd')"
- if [[ "$running" = "active" ]]; then
- su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user daemon-reload'
- fi
+ for i in "$users"; do
+ su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user daemon-reload'
done
}