From 61fd0bd1e791384a4255c7a5008d984cb6410577 Mon Sep 17 00:00:00 2001 From: Dmitriy Bogdanov Date: Wed, 19 Oct 2016 17:17:26 +0400 Subject: [PATCH 1/3] Bump version to 2.1.2 --- .SRCINFO | 4 ++-- PKGBUILD | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 21951d0..71f7c1f 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = wallabag pkgdesc = Self hostable application for saving web pages - pkgver = 2.0.5 + pkgver = 2.1.2 pkgrel = 1 url = http://www.wallabag.org/ install = wallabag.install @@ -17,7 +17,7 @@ pkgbase = wallabag backup = etc/webapps/wallabag/parameters.yml backup = usr/share/webapps/wallabag/parameters.yml source = wallabag.tar.xz::http://wllbg.org/latest-v2-package - sha256sums = c3df0fe67782538cc7fbdeedb48845a8a23eceb11b58888fbd8ee3b97f8842fc + sha256sums = f3acfde5a945bcd0a65f2549fc2f577bc6fc633ba901df27e7dc88c07feb2406 pkgname = wallabag diff --git a/PKGBUILD b/PKGBUILD index 5b8a857..e5ebb92 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Philipp Schmitt (philippschmittco) pkgname=wallabag -pkgver=2.0.5 +pkgver=2.1.2 pkgrel=1 pkgdesc='Self hostable application for saving web pages' arch=('any') @@ -21,7 +21,7 @@ optdepends=( install="$pkgname.install" options=(!strip) source=("${pkgname}.tar.xz::http://wllbg.org/latest-v2-package") -sha256sums=('c3df0fe67782538cc7fbdeedb48845a8a23eceb11b58888fbd8ee3b97f8842fc') +sha256sums=('f3acfde5a945bcd0a65f2549fc2f577bc6fc633ba901df27e7dc88c07feb2406') backup=("etc/webapps/${pkgname}/parameters.yml" "usr/share/webapps/${pkgname}/parameters.yml") From 4dc334c2fec4dc713d99d08c2db6cef6e5dbec3a Mon Sep 17 00:00:00 2001 From: Dmitriy Bogdanov Date: Wed, 19 Oct 2016 17:35:20 +0400 Subject: [PATCH 2/3] Move "data" and "var" directories to /var/lib/wallabag/ --- .SRCINFO | 2 ++ PKGBUILD | 12 ++++++++++-- wallabag.install | 27 ++++++++++++++++++--------- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 71f7c1f..8ced9bc 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -16,6 +16,8 @@ pkgbase = wallabag options = !strip backup = etc/webapps/wallabag/parameters.yml backup = usr/share/webapps/wallabag/parameters.yml + backup = var/lib/wallabag/data/db/wallabag.sqlite + backup = usr/share/webapps/wallabag/data/db/wallabag.sqlite source = wallabag.tar.xz::http://wllbg.org/latest-v2-package sha256sums = f3acfde5a945bcd0a65f2549fc2f577bc6fc633ba901df27e7dc88c07feb2406 diff --git a/PKGBUILD b/PKGBUILD index e5ebb92..deca386 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -23,7 +23,9 @@ options=(!strip) source=("${pkgname}.tar.xz::http://wllbg.org/latest-v2-package") sha256sums=('f3acfde5a945bcd0a65f2549fc2f577bc6fc633ba901df27e7dc88c07feb2406') backup=("etc/webapps/${pkgname}/parameters.yml" - "usr/share/webapps/${pkgname}/parameters.yml") + "usr/share/webapps/${pkgname}/parameters.yml" + "var/lib/${pkgname}/data/db/wallabag.sqlite" + "usr/share/webapps/${pkgname}/data/db/wallabag.sqlite") package() { cd "${pkgdir}" @@ -37,5 +39,11 @@ package() { chown -R http:http ${pkgdir}/etc/webapps/${pkgname} ln -s /etc/webapps/${pkgname}/parameters.yml "${WALLABAG_CONF_DIR}"/ - chown -R http:http "${pkgdir}/usr/share/webapps/wallabag" + _VAR_DIR="${pkgdir}/var/lib/${pkgname}/" + install -d "$_VAR_DIR" + mv "${pkgdir}/usr/share/webapps/${pkgname}/"{data,var} "$_VAR_DIR" + ln -s "/var/lib/${pkgname}/"{data,var} "${pkgdir}/usr/share/webapps/${pkgname}/" + chown -R http:http "$_VAR_DIR" + + chown -R http:http "${pkgdir}/usr/share/webapps/${pkgname}" } diff --git a/wallabag.install b/wallabag.install index 55b211b..bbb2880 100644 --- a/wallabag.install +++ b/wallabag.install @@ -1,10 +1,10 @@ post_install() { - echo "" - echo "==> Installed in : /usr/share/webapps/wallabag" - echo "" - echo "==> Config is at /etc/webapps/wallabag/config/parameters.yml" - echo "" + echo "" + echo "==> Installed in : /usr/share/webapps/wallabag" + echo "" + echo "==> Config is at /etc/webapps/wallabag/config/parameters.yml" + echo "" echo -n "Change the configuration to fit to your current setup, and then " echo "init wallabag by launching:" echo "php /usr/share/webapps/wallabag/bin/console wallabag:install --env=prod" @@ -15,15 +15,24 @@ post_install() { pre_upgrade() { - # save old untracked config and make it tracked - if [[ -f /usr/share/webapps/wallabag/app/config/parameters.yml && \ + # save old untracked config and make it tracked + if [[ -f /usr/share/webapps/wallabag/app/config/parameters.yml && \ ! -h /usr/share/webapps/wallabag/app/config/parameters.yml ]]; then install -Dm644 \ /usr/share/webapps/wallabag/app/config/parameters.yml \ -t /etc/webapps/wallabag/ - fi + fi + # also move `data` and `var` to /var/lib/wallabag/ + if [[ -d /usr/share/webapps/wallabag/data && \ + ! -h /usr/share/webapps/wallabag/data && \ + -d /usr/share/webapps/wallabag/var && \ + ! -h /usr/share/webapps/wallabag/var ]]; then + install -d /var/lib/wallabag/ + chown http:http /var/lib/wallabag/ + mv /usr/share/webapps/wallabag/{data,var} /var/lib/wallabag/ + fi } post_upgrade() { - rm -rf /usr/share/webapps/wallabag/var/cache/* + rm -rf /var/lib/wallabag/var/cache/* } From fa716cdc1b13b36b069748eb6f5e6bff17fc1974 Mon Sep 17 00:00:00 2001 From: Dmitriy Bogdanov Date: Wed, 19 Oct 2016 18:35:09 +0400 Subject: [PATCH 3/3] Update optdeps and post-install comment --- .SRCINFO | 2 ++ PKGBUILD | 2 ++ wallabag.install | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.SRCINFO b/.SRCINFO index 8ced9bc..eafc0ac 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -13,6 +13,8 @@ pkgbase = wallabag optdepends = php-mysql: For MySQL storage optdepends = php-pgsql: For postgres storage optdepends = php-sqlite: For sqlite storage + optdepends = rabbitmq: For async import + optdepends = redis: For async import options = !strip backup = etc/webapps/wallabag/parameters.yml backup = usr/share/webapps/wallabag/parameters.yml diff --git a/PKGBUILD b/PKGBUILD index deca386..ce118c0 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -17,6 +17,8 @@ optdepends=( 'php-mysql: For MySQL storage' 'php-pgsql: For postgres storage' 'php-sqlite: For sqlite storage' + 'rabbitmq: For async import' + 'redis: For async import' ) install="$pkgname.install" options=(!strip) diff --git a/wallabag.install b/wallabag.install index bbb2880..1b342a2 100644 --- a/wallabag.install +++ b/wallabag.install @@ -10,7 +10,10 @@ post_install() { echo "php /usr/share/webapps/wallabag/bin/console wallabag:install --env=prod" echo "" echo -n "To setup your webserver and enable the needed php extensions, " - echo "plase read: http://doc.wallabag.org/en/master/user/installation.html" + echo "please read: http://doc.wallabag.org/en/master/user/installation.html" + echo "" + echo -n "If you upgraded from 2.0.x, you might need to check the upgrade guide: " + echo "http://doc.wallabag.org/en/master/user/upgrade-2.0.x-2.1.1.html" }