summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraysky2015-09-07 05:19:32 -0400
committergraysky2015-09-07 05:19:32 -0400
commitb4af4ec4ab7ab9d2c63facbcfa22cb2db0ec052b (patch)
treed5fedfbf7d90a63a39fa840a7772d0aea4625088
parent90ff163955c313a7384837537f569619d9a8c6f8 (diff)
downloadaur-b4af4ec4ab7ab9d2c63facbcfa22cb2db0ec052b.tar.gz
Update to 6.01-1
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD4
-rw-r--r--psd.install36
3 files changed, 34 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3070b3403350..398d339f8a26 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = profile-sync-daemon
pkgdesc = Syncs browser profiles to tmpfs reducing SSD/HDD calls and speeding-up browsers.
- pkgver = 6.00
+ pkgver = 6.01
pkgrel = 1
url = https://github.com/graysky2/profile-sync-daemon
install = psd.install
@@ -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.00.tar.xz
- sha256sums = fba0fddaa0949fb8abe54ff544fb1ae4bb790ad16642915969be1e97cf2d9db7
+ source = http://repo-ck.com/source/profile-sync-daemon/profile-sync-daemon-6.01.tar.xz
+ sha256sums = fc6fcccf3c4f4b4500e2f04101b35a53ee3978199d8b9037ffb937e18fd52167
pkgname = profile-sync-daemon
diff --git a/PKGBUILD b/PKGBUILD
index 45c11938a37b..19e7ec2d8811 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: graysky <graysky AT archlinux DOT us>
pkgname='profile-sync-daemon'
-pkgver=6.00
+pkgver=6.01
pkgrel=1
pkgdesc='Syncs browser profiles to tmpfs reducing SSD/HDD calls and speeding-up browsers.'
arch=('any')
@@ -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=('fba0fddaa0949fb8abe54ff544fb1ae4bb790ad16642915969be1e97cf2d9db7')
+sha256sums=('fc6fcccf3c4f4b4500e2f04101b35a53ee3978199d8b9037ffb937e18fd52167')
build() {
cd "$pkgname-$pkgver"
diff --git a/psd.install b/psd.install
index f0997fe2736f..3f9b296e538a 100644
--- a/psd.install
+++ b/psd.install
@@ -1,19 +1,41 @@
+## arg 1: the new package version
+## arg 2: the old package version
+
pre_upgrade() {
+ # version 6.00 is a major rebuild
+ # yes, I realize that pacman should not stop services byt in this case it
+ # is required or else browser profiles (user data) can get renamed and confuse
+ # people if it does not happen
if [ $(vercmp $2 6.00) -lt 0 ]; then
- echo 'ATTENTION: MAJOR CHANGES TO PSD WITH VERSION 6.00+'
- echo '-> 1. A global /etc/psd.conf is no longer used. $HOME/.psd/psd.conf will be'
- echo '-> created when psd is invoked the first time.'
- echo '-> 2. A system service is no longer used. A user service is provided and can be'
- echo '-> used like this: systemctl --user start psd.service'
- echo '-> 3. Users wanting to use overlayfs mode MUST have sudo access to both mount'
- echo '-> and umount. See the man page for an example configured with visudo.'
+ echo 'ATTENTION: MAJOR CHANGES TO PSD WITH VERSION 6.00+'
+ echo '-> 1. A global /etc/psd.conf is no longer used. $HOME/.psd/psd.conf will be'
+ echo '-> created when psd is invoked the first time.'
+ echo '-> 2. A system service is no longer used. A user service is provided and can be'
+ echo '-> used like this: systemctl --user start psd.service'
+ echo '-> 3. Users wanting to use overlayfs mode MUST have sudo access to both mount'
+ echo '-> and umount. See the man page for an example configured with visudo.'
+ echo
+ echo '-> Internal changes to psd require it to be stopped now before updating.'
+ # stop system service now since it will be removed upon updating
systemctl is-active psd.service &>/dev/null
if [ $? -eq 0 ]; then
systemctl stop psd.service &>/dev/null
fi
fi
+ # 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
+ running="$(su $i -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user is-active psd')"
+ if [[ "$running" = "active" ]]; then
+ su $i -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.'
+ echo '-> Recommend that you diff /usr/share/doc/psd/psd.conf against ~/.psd/psd.conf'
+ fi
+ done
+ fi
}
pre_remove() {