summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorwillemw122017-03-02 08:38:06 +0100
committerwillemw122017-03-02 08:38:06 +0100
commitbf5066e248a7e6a46772fa25058a20d2f3c7856f (patch)
tree30e675be5baa8615c575ac78090aecf3b2a2975b
parent926cdd20cd8b3cf662c83703c49301385dd0931a (diff)
downloadaur-bf5066e248a7e6a46772fa25058a20d2f3c7856f.tar.gz
Split installed and configuration files into 'app' and 'data' folders
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD22
-rw-r--r--sickrage-git.install22
-rw-r--r--sickrage.service4
4 files changed, 24 insertions, 26 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 306209431ac..6a495b587a3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -23,7 +23,7 @@ pkgbase = sickrage-git
source = sickrage.sysusers
source = sickrage.tmpfile
md5sums = SKIP
- md5sums = 33532fd9a661c6dd38afdabb45695980
+ md5sums = eb4e1f9ca758af1adc3c7d93ad4b264f
md5sums = 6a7db7e14e74072d29e482b06b41dfa7
md5sums = f7a12df978d649da4e77d88e03f50252
diff --git a/PKGBUILD b/PKGBUILD
index cdde580038f..709bb8244c0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,6 @@
# Maintainer: willemw <willemw12@gmail.com>
# Contibutor: Justin Dray <justin@dray.be>
-
-#########################################################################################################
-# If upgrade fails with:
-# error: failed to commit transaction (conflicting files)
-# sickrage-git: /opt/sickrage/... exists in filesystem
-#
-# Then remove the conflicting files manually. The following removes all of the conflicting files as root:
-# rm -r $(ls -1d /opt/sickrage/* | grep -Ev "/backup.*|/cache.*|/config.ini.*|/Log*.*|/.*\.db.*")
-#
-# Use at your own risk! Stop sickrage.service and backup /opt/sickrage first.
-#########################################################################################################
-
-
_pkgname=sickrage
pkgname=$_pkgname-git
pkgver=8.8.4.r41.g10d0371b3
@@ -45,7 +32,7 @@ source=("$pkgname::git://github.com/SiCKRAGETV/SickRage.git"
'sickrage.sysusers'
'sickrage.tmpfile')
md5sums=('SKIP'
- '33532fd9a661c6dd38afdabb45695980'
+ 'eb4e1f9ca758af1adc3c7d93ad4b264f'
'6a7db7e14e74072d29e482b06b41dfa7'
'f7a12df978d649da4e77d88e03f50252')
@@ -69,10 +56,11 @@ package() {
install -Dm644 sickrage.sysusers "$pkgdir/usr/lib/sysusers.d/sickrage.conf"
install -Dm644 sickrage.tmpfile "$pkgdir/usr/lib/tmpfiles.d/sickrage.conf"
+ install -dm755 "$pkgdir"/opt/sickrage/{app,data}
+
# The install type is "source": .git folder is not included
#cd $pkgname
- #python2 setup.py install --prefix=/opt/sickrage --install-lib=/opt/sickrage --root="$pkgdir" --optimize=1
- install -dm755 "$pkgdir/opt/sickrage"
- cp -rp $pkgname/* "$pkgdir/opt/sickrage"
+ #python2 setup.py install --prefix=/opt/sickrage/app --install-lib=/opt/sickrage/app --root="$pkgdir" --optimize=1
+ cp -rp $pkgname/* "$pkgdir/opt/sickrage/app/"
}
diff --git a/sickrage-git.install b/sickrage-git.install
index cf8395fef51..979f04f58b5 100644
--- a/sickrage-git.install
+++ b/sickrage-git.install
@@ -1,22 +1,32 @@
post_install() {
systemd-sysusers sickrage.conf
- systemd-tmpfiles --create sickgear.conf
+ systemd-tmpfiles --create sickrage.conf
chown -R sickrage:sickrage /opt/sickrage
+ echo "==> Configuration files have moved to /opt/sickrage/data. To migrate, run the following commands as root:"
+ echo " systemctl stop sickrage.service"
+ echo " pacman -Rn sickrage-git"
+ echo " cp -a /opt/sickrage{,.bak}"
+ echo ' rm -r $(ls -1d /opt/sickrage/* | grep -Ev "/backup.*|/cache.*|/config.ini.*|/Log.*|/.*\.db.*")'
+ echo " mv /opt/sickrage/* /opt/sickrage/data/"
echo "==> Start and enable sickrage.service. Then visit http://localhost:8081/"
- echo
- echo "==> If an upgrade fails with \"error: failed to commit transaction (conflicting files)\","
- echo "==> then remove the conflicting files manually. See comments in the PKGBUILD file."
+ echo "==> If an upgrade fails with \"error: failed to commit transaction (conflicting files)\", then uninstall first."
}
post_upgrade() {
post_install $1
}
+pre_remove() {
+ systemctl stop sickrage.service
+}
+
post_remove() {
- echo -e "\n==> Some files in /opt/sickrage may not have been removed.\n"
+ rm -rf /opt/sickrage/app
+
+ echo "==> To delete the configuration files, run as root: rm -rf /opt/sickrage/data"
# Do not delete the 'sickrage' user automatically. It may still own files.
# If 'sickrage' is the only user in group 'sickrage', then userdel will also delete the group.
- echo "==> To delete the 'sickrage' user, run as root: userdel --force sickrage"
+ echo "==> To delete the \"sickrage\" user, run as root: userdel --force sickrage"
}
diff --git a/sickrage.service b/sickrage.service
index 192dc17beac..b5ffefa66c0 100644
--- a/sickrage.service
+++ b/sickrage.service
@@ -9,8 +9,8 @@ Group=sickrage
#Type=forking
#PIDFile=/run/sickrage/sickrage.pid
-#ExecStart=/usr/bin/env python2 /opt/sickrage/SickBeard.py -q --daemon --nolaunch --config /opt/sickrage/config.ini --datadir /opt/sickrage --pidfile=/run/sickrage/sickrage.pid
-ExecStart=/usr/bin/env python2 /opt/sickrage/SickBeard.py -q --nolaunch --config /opt/sickrage/config.ini --datadir /opt/sickrage
+#ExecStart=/usr/bin/env python2 /opt/sickrage/app/SickBeard.py -q --daemon --nolaunch --datadir /opt/sickrage/data --pidfile=/run/sickrage/sickrage.pid
+ExecStart=/usr/bin/env python2 /opt/sickrage/app/SickBeard.py -q --nolaunch --datadir /opt/sickrage/data
[Install]
WantedBy=multi-user.target