diff options
author | Srevin Saju | 2022-02-04 13:13:56 +0300 |
---|---|---|
committer | Srevin Saju | 2022-02-04 13:15:53 +0300 |
commit | 6e19259ddd0b41abd6c9b200e03d95c530de01cb (patch) | |
tree | f0e09025163083c8e287e7a8b19cd47d22efe89d | |
parent | cd7f708a667a47de23bcf5c432b17ec379e5d04a (diff) | |
download | aur-archivy-git.tar.gz |
chore: bump archivy version
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | 286.patch | 50 | ||||
-rw-r--r-- | PKGBUILD | 15 |
3 files changed, 64 insertions, 12 deletions
@@ -1,7 +1,7 @@ pkgbase = archivy-git pkgdesc = A self-hosted knowledge repository, to preserve useful content to your knowledge bank. - pkgver = v1.4.0.r4.g1183863 - pkgrel = 4 + pkgver = v1.7.0.r2.g75ee46b + pkgrel = 1 url = https://github.com/archivy/archivy arch = any license = MIT @@ -24,14 +24,15 @@ pkgbase = archivy-git depends = python-click-plugins depends = python-html2text depends = python-flask-compress + depends = python-readability-lxml optdepends = elasticsearch provides = archivy conflicts = archivy - source = git+https://github.com/archivy/archivy.git#commit=11838634e6b171ba49533f6db1230ddd1a332eab + source = git+https://github.com/archivy/archivy.git#commit=75ee46be486c3196553a741c199b0d40445a71e1 source = 00-do-not-pin-requirements.patch - source = 01-flask-v2.patch + source = 286.patch sha256sums = SKIP sha256sums = 538f7d96138f421d70ed72a8f101c1095726d5ee53c19e6cd924b30ca6a7a3a4 - sha256sums = f385bd52038f102653a5def0488db28003baaeb52170180d03d5276e6d8fc6cc + sha256sums = 8748170782fb569eda458520fb6895dfe01744f3d7416c7428b5810fb032a3ee pkgname = archivy-git diff --git a/286.patch b/286.patch new file mode 100644 index 000000000000..a153654e1c44 --- /dev/null +++ b/286.patch @@ -0,0 +1,50 @@ +From f265b71a42f753e1600c6352f3a542aa0937821c Mon Sep 17 00:00:00 2001 +From: Srevin Saju <srevinsaju@sugarlabs.org> +Date: Fri, 4 Feb 2022 12:45:53 +0300 +Subject: [PATCH] fix: check is_relative_to based on resolved paths + +on Fedora 35, /home is a symlink to /var/home and hence +archivy has trouble trying to figure out if data directory is relative +to query_dir. + +Fixes the following traceback +``` +[2022-02-04 12:35:35,253] ERROR in app: Exception on /login [GET] +Traceback (most recent call last): + File "/usr/lib/python3.10/site-packages/flask/app.py", line 2073, in wsgi_app + response = self.full_dispatch_request() + File "/usr/lib/python3.10/site-packages/flask/app.py", line 1518, in full_dispatch_request + rv = self.handle_user_exception(e) + File "/usr/lib/python3.10/site-packages/flask/app.py", line 1516, in full_dispatch_request + rv = self.dispatch_request() + File "/usr/lib/python3.10/site-packages/flask/app.py", line 1502, in dispatch_request + return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) + File "/usr/lib/python3.10/site-packages/archivy/routes.py", line 271, in login + return render_template("users/login.html", form=form, title="Login") + File "/usr/lib/python3.10/site-packages/flask/templating.py", line 146, in render_template + ctx.app.update_template_context(context) + File "/usr/lib/python3.10/site-packages/flask/app.py", line 756, in update_template_context + context.update(func()) + File "/usr/lib/python3.10/site-packages/archivy/routes.py", line 32, in pass_defaults + dataobjs = data.get_items(load_content=False) + File "/usr/lib/python3.10/site-packages/archivy/data.py", line 103, in get_items + raise FileNotFoundError +FileNotFoundError +--- + archivy/data.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/archivy/data.py b/archivy/data.py +index 1cfe8bda..6ef0d3eb 100644 +--- a/archivy/data.py ++++ b/archivy/data.py +@@ -21,7 +21,8 @@ def get_data_dir(): + def is_relative_to(sub_path, parent): + """Implement pathlib `is_relative_to` only available in python 3.9""" + try: +- sub_path.resolve().relative_to(parent) ++ parent_path = Path(parent).resolve() ++ sub_path.resolve().relative_to(parent_path) + return True + except ValueError: + return False @@ -1,8 +1,8 @@ # Maintainer: Srevin Saju <srevinsaju@sugarlabs.org> pkgname=archivy-git -pkgver=v1.4.0.r4.g1183863 -pkgrel=4 +pkgver=v1.7.0.r2.g75ee46b +pkgrel=1 pkgdesc="A self-hosted knowledge repository, to preserve useful content to your knowledge bank." arch=('any') url="https://github.com/archivy/archivy" @@ -13,14 +13,15 @@ depends=('python-flask' 'python-flask-wtf' 'python-wtforms' 'python-beautifulsoup4' 'python-elasticsearch' 'python-dotenv' 'python-frontmatter' 'python-requests' 'python-tinydb' 'python-validators' 'python-flask-login' 'python-brotli' - 'python-click-plugins' 'python-html2text' 'python-flask-compress') + 'python-click-plugins' 'python-html2text' 'python-flask-compress' + 'python-readability-lxml') optdepends=('elasticsearch') -source=("git+https://github.com/archivy/archivy.git#commit=11838634e6b171ba49533f6db1230ddd1a332eab" +source=("git+https://github.com/archivy/archivy.git#commit=75ee46be486c3196553a741c199b0d40445a71e1" "00-do-not-pin-requirements.patch" - "01-flask-v2.patch") + "286.patch") sha256sums=('SKIP' '538f7d96138f421d70ed72a8f101c1095726d5ee53c19e6cd924b30ca6a7a3a4' - 'f385bd52038f102653a5def0488db28003baaeb52170180d03d5276e6d8fc6cc') + '8748170782fb569eda458520fb6895dfe01744f3d7416c7428b5810fb032a3ee') provides=("${pkgname%-git}") conflicts=("${pkgname%-git}") @@ -28,7 +29,7 @@ conflicts=("${pkgname%-git}") prepare() { cd "$srcdir/${pkgname%-git}" git apply "$srcdir/00-do-not-pin-requirements.patch" - git apply "$srcdir/01-flask-v2.patch" + git apply "$srcdir/286.patch" } build() { |