summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoffrey Darcq2018-02-05 15:36:04 +0100
committerJoffrey Darcq2018-02-05 15:36:04 +0100
commitaeff7167bc62834f932755945dd8823d64b30e0d (patch)
treea7585907b212e2a6101883843211f51dea4173c7
parent0c1c365bd1876434d8df8e50eed0e04ab26a95bd (diff)
downloadaur-aeff7167bc62834f932755945dd8823d64b30e0d.tar.gz
Require seafile-server same version
-rw-r--r--.SRCINFO6
-rw-r--r--ChangeLog11
-rw-r--r--PKGBUILD39
-rwxr-xr-xseahub-preupgrade26
4 files changed, 33 insertions, 49 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e7830f209528..dacce247b40a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = seahub
pkgdesc = The web frontend for seafile server
pkgver = 6.2.5
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/haiwen/seahub
install = seahub.install
changelog = ChangeLog
@@ -14,12 +14,14 @@ pkgbase = seahub
license = PSF
license = MIT
license = BSD
+ license = GPL
makedepends = python2-virtualenv
- depends = seafile-server
+ depends = seafile-server=6.2.5
depends = libmemcached
depends = libmariadbclient
optdepends = memcached
optdepends = mariadb
+ options = !strip
source = seahub-6.2.5-server.tar.gz::https://github.com/haiwen/seahub/archive/v6.2.5-server.tar.gz
sha256sums = 80a7a1cadde8e8e570bdc454bc4a4902ebcace97b347f9eef701b5ab02742039
diff --git a/ChangeLog b/ChangeLog
index 0e3b06bccc38..5ad005514eb7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
+2018-02-05 Joffrey <j-off@live.fr>
+ * Version: 6.2.5-4
+
+ * PKGBUILD: Use python lib seahub interpreter for all scripts
+ Require seafile-server same version
+ Don't use strip again
+ Remove seahub-preupgrade it is no longer compatible
+
2018-02-03 Joffrey <j-off@live.fr>
- * Version: v6.2.5-2 -> 6.2.5-3
+ * Version: 6.2.5-3
* ChangeLog: Add Changelog
@@ -13,5 +21,6 @@
sources, an ArchLinux user can package it, it will be deleted soon.
* nginx.example.conf: Add nginx configuration example for https and wsgi
+ https://aur.archlinux.org/cgit/aur.git/plain/nginx.example.conf?h=seahub
* seahub.install: Remove old virtualenv and seahub-preupgrade of your system
diff --git a/PKGBUILD b/PKGBUILD
index 668e946aa9ee..2124498122c7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,25 +5,26 @@
pkgname='seahub'
pkgver=6.2.5
-pkgrel=3
+pkgrel=4
pkgdesc='The web frontend for seafile server'
arch=('i686' 'x86_64' 'armv7h' 'armv6h' 'aarch64')
url="https://github.com/haiwen/${pkgname}"
-license=('Apache' 'PSF' 'MIT' 'BSD')
-depends=('seafile-server' 'libmemcached' 'libmariadbclient')
+license=('Apache' 'PSF' 'MIT' 'BSD' 'GPL')
+depends=("seafile-server=${pkgver}" 'libmemcached' 'libmariadbclient')
optdepends=('memcached' 'mariadb')
makedepends=('python2-virtualenv')
install="${pkgname}.install"
changelog="ChangeLog"
source=("${pkgname}-${pkgver}-server.tar.gz::${url}/archive/v${pkgver}-server.tar.gz")
sha256sums=('80a7a1cadde8e8e570bdc454bc4a4902ebcace97b347f9eef701b5ab02742039')
+options=("!strip")
prepare () {
cd "${srcdir}/${pkgname}-${pkgver}-server"
- # Fix all script's python 2 requirement
- grep -s -l -r '#!/usr/bin/env python\b' "./" \
- | xargs sed -i -e '1 s|env python\b|env python2|'
+ # Use python lib seahub interpreter for all scripts
+ grep -s -l -r '#!/usr/bin/env python' "./" \
+ | xargs sed -i -e '1 s|#!/usr/bin/env python|#!/usr/lib/seahub/bin/python2|'
# Add python utils modules to requirements.txt
{
@@ -42,11 +43,11 @@ package() {
cp -r -p "./"* "${pkgdir}/usr/share/seafile-server/seahub/"
# Create VirtualEnv
- virtualenv="${pkgdir}/usr/lib/seahub"
- virtualenv2 --no-wheel --system-site-packages "${virtualenv}"
+ venv="${pkgdir}/usr/lib/seahub"
+ virtualenv2 --no-wheel --system-site-packages "${venv}"
# Activates the VirtualEnv
- source "${virtualenv}/bin/activate"
+ source "${venv}/bin/activate"
# Fix subprocess exception if gunicorn is already installed
printf 'Installing gunicorn...'
@@ -59,24 +60,22 @@ package() {
deactivate # Deactivate VirtualEnv
# Use relative path
- virtualenv2 --relocatable "${virtualenv}"
+ virtualenv2 --relocatable "${venv}"
- # Recompile all .pyc files in virtualenv.
- # Not stricly required
+ # Recompile all .pyc files in venv. Not stricly required
# But useful for printing valid source file paths in case of python exceptions.
# Requires minimum 1GB RAM, comment next two commands in case of < 1GB RAM
- # _gaiohttp.py excluded due to https://github.com/benoitc/gunicorn/issues/810
-
- printf "Compile all .py in %s/..." "${virtualenv}/bin"
+ printf "Compile all .py in %s/..." "${venv}/bin"
python2 -m compileall \
- -q -f -d "${virtualenv#$pkgdir}/bin" \
- -- "${virtualenv}/bin" && \
+ -q -f -d "${venv#$pkgdir}/bin" \
+ -- "${venv}/bin" && \
printf 'done.\n'
- printf "Compile all .py in %s/..." "${virtualenv}/lib/python2.7"
+ # _gaiohttp.py excluded due to https://github.com/benoitc/gunicorn/issues/810
+ printf "Compile all .py in %s/..." "${venv}/lib/python2.7"
python2 -m compileall \
- -q -f -d "${virtualenv#$pkgdir}/lib/python2.7" \
+ -q -f -d "${venv#$pkgdir}/lib/python2.7" \
-x '.*/gunicorn/workers/_gaiohttp.py' \
- -- "${virtualenv}/lib/python2.7" && \
+ -- "${venv}/lib/python2.7" && \
printf 'done.\n'
}
diff --git a/seahub-preupgrade b/seahub-preupgrade
deleted file mode 100755
index 678d0331b17f..000000000000
--- a/seahub-preupgrade
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env sh
-
-if [ "$(basename $(pwd))" != "seafile-server" ]; then
- echo "Must be run from within a seafile server instance's 'seafile-server' subdirectory"
- exit 1
-fi
-
-echo "Please ensure that the seafile server is stopped, then press [ENTER] to proceed"
-read
-
-echo "Preparing local seahub for upgrade..."
-
-# Ensure newest upgrade scripts are available
-# Symlink will not help, because upgrade scripts uses relative to self paths. So make copy, same for seahub
-rm -rf ./upgrade
-cp -r --preserve=mode,timestamps --reflink=auto /usr/share/seafile-server/scripts/upgrade ./
-
-# Backup old seahub version
-rm -rf seahub-old
-mv seahub seahub-old
-
-# Copy new seahub
-cp -r --preserve=mode,timestamps --reflink=auto /usr/share/seafile-server/seahub ./
-
-echo "Done, you should now execute the appropriate upgrade script by calling './upgrade/SCRIPT'."
-echo "More on https://wiki.archlinux.org/index.php/Seafile#Upgrading"