summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraysky2015-09-06 14:53:16 -0400
committergraysky2015-09-06 14:53:16 -0400
commit90ff163955c313a7384837537f569619d9a8c6f8 (patch)
tree2a877a2c5ef54c135db9850c2c0e8edff3c7cc1f
parent085179dfb6a41d99c5165dd20b332a165f92cc52 (diff)
downloadaur-90ff163955c313a7384837537f569619d9a8c6f8.tar.gz
Update to 6.00-1
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD13
-rw-r--r--psd.install89
3 files changed, 28 insertions, 82 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4d1aacfcb7f1..3070b3403350 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 = 5.75
+ pkgver = 6.00
pkgrel = 1
url = https://github.com/graysky2/profile-sync-daemon
install = psd.install
@@ -8,6 +8,7 @@ pkgbase = profile-sync-daemon
license = MIT
depends = procps-ng
depends = rsync
+ depends = systemd
conflicts = firefox-sync
conflicts = goanysync
conflicts = go-anysync-git
@@ -15,9 +16,8 @@ pkgbase = profile-sync-daemon
conflicts = tmpfs-store
conflicts = tmpfs-sync
conflicts = user-profile-sync-daemon
- backup = etc/psd.conf
- source = http://repo-ck.com/source/profile-sync-daemon/profile-sync-daemon-5.75.tar.xz
- sha256sums = ecb9acc0f274eb645b7dcb0510f692194feda8dbeffa3bb2834ce91cba76fcf6
+ source = http://repo-ck.com/source/profile-sync-daemon/profile-sync-daemon-6.00.tar.xz
+ sha256sums = fba0fddaa0949fb8abe54ff544fb1ae4bb790ad16642915969be1e97cf2d9db7
pkgname = profile-sync-daemon
diff --git a/PKGBUILD b/PKGBUILD
index a805608b5d2a..45c11938a37b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,18 @@
# Maintainer: graysky <graysky AT archlinux DOT us>
pkgname='profile-sync-daemon'
-pkgver=5.75
+pkgver=6.00
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'
license=('MIT')
-depends=('procps-ng' 'rsync')
+depends=('procps-ng' 'rsync' 'systemd')
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")
-backup=('etc/psd.conf')
install=psd.install
-sha256sums=('ecb9acc0f274eb645b7dcb0510f692194feda8dbeffa3bb2834ce91cba76fcf6')
+sha256sums=('fba0fddaa0949fb8abe54ff544fb1ae4bb790ad16642915969be1e97cf2d9db7')
build() {
cd "$pkgname-$pkgver"
@@ -22,10 +21,6 @@ build() {
package() {
cd "$pkgname-$pkgver"
-
- # note if you want to use openrc rather than systemd, change the below make
- # target to 'install-openrc-all' before building and be sure that you read
- # the INSTALL document provided in the source tarball!
- make DESTDIR="$pkgdir" install-systemd-all
+ make DESTDIR="$pkgdir" install
install -Dm644 MIT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
diff --git a/psd.install b/psd.install
index ae396e3d2138..f0997fe2736f 100644
--- a/psd.install
+++ b/psd.install
@@ -1,77 +1,28 @@
-DAEMON_FILE="/run/psd"
-
-post_install() {
- echo '--> Define which users will make use of the sync in /etc/psd.conf'
- echo '--> Read the manpage before use or see the wiki page'
- echo '--> https://wiki.archlinux.org/index.php/Profile-sync-daemon'
- echo
- echo '--> ALWAYS backup your profile data before using utils like psd!'
-}
-
-post_upgrade() {
- ## arg 1: the new package version
- ## arg 2: the old package version
- oldpkgver=${2%-*}
- #newpkgver=${1%-*}
-
- if [[ $oldpkgver < 5.29 ]]; then
- echo '--> Support for cron has been deprecated in favor of a systemd timer.'
- echo '--> This package now provides both psd.service and psd-resync.service'
- echo
- echo '--> systemctl enable psd psd-resync'
- echo '--> systemctl start psd psd-resync'
- echo
- echo '--> See the wiki or man page for more info.'
- else
- /bin/true
- fi
-}
-
pre_upgrade() {
- ## arg 1: the new package version
- ## arg 2: the old package version
- oldpkgver=${2%-*}
- #newpkgver=${1%-*}
+ 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.'
- if [[ $oldpkgver < 5.03 ]]; then
- # check to see if user is running psd and needs to fix it
- if [ -e $DAEMON_FILE ]; then
- echo '------------------------------------------------------------------------'
- echo ' SPECIAL UPGRADE INSTRUCTIONS YOU MUST FOLLOW:'
- echo
- echo 'In order to safely upgrade, psd will be stopped for you now...'
- echo
- if ! systemd-notify --booted; then # not using systemd
- /etc/rc.d/psd stop
- else
- /usr/bin/systemctl stop psd.service
- fi
- echo
- echo '...the daemon should be stopped and profile(s) synced back to disk.'
- echo
- echo '1) If any browsers are running, exit them now.'
- echo '2) Make sure to merge changes in /etc/psd.conf.pacnew'
- # check to see if user needs to modify BROWSERS array
- if [[ -n $(grep ^BROWSERS /etc/psd.conf | grep mozilla) ]]; then
- echo ' Using "mozilla" in the BROWSERS array now depreciated!'
- echo ' You _MUST_ manually change it to "firefox"'
- fi
- echo ' BEFORE you start up psd again.'
- echo '------------------------------------------------------------------------'
- else
- /bin/true
- fi
+ systemctl is-active psd.service &>/dev/null
+ if [ $? -eq 0 ]; then
+ systemctl stop psd.service &>/dev/null
+ fi
fi
+
}
pre_remove() {
- if [ -e $DAEMON_FILE ]; then
- if ! systemd-notify --booted; then # not using systemd
- echo '--> Automatically stopping psd to rotate profiles back out of tmpfs.'
- /etc/rc.d/psd stop
- else
- echo '--> Automatically stopping psd to rotate profiles back out of tmpfs.'
- /usr/bin/systemctl stop psd.service
+ for i in $(users); do
+ running="$(su $i -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."
+ echo "--> Any running and managed browsers will be exited."
+ su $i -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user stop psd.service'
fi
- fi
+ done
}