aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2021-02-14 15:44:37 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2021-02-14 16:08:10 +0000
commit3f5e3dc47a76160b0c64533df633acbe5680f0d3 (patch)
tree02b39dada6db3bfc89ddf4dabe879b8c191c2385
parentb1a4c1f1dd567a8f5adbb957dd9f7ea0b09fec8c (diff)
downloadaports-3f5e3dc47a76160b0c64533df633acbe5680f0d3.tar.gz
aports-3f5e3dc47a76160b0c64533df633acbe5680f0d3.tar.bz2
aports-3f5e3dc47a76160b0c64533df633acbe5680f0d3.tar.xz
community/patchwork: upgrade to 3.0.0
removed pwclient subpackage since now is shipped as separated package. Is no longer part of patchwork repository
-rw-r--r--community/patchwork/0002-remove-uneeded-bashism-from-tools-and-change-path.patch13
-rw-r--r--community/patchwork/APKBUILD22
-rw-r--r--community/patchwork/dependencies-fix.patch15
-rw-r--r--community/patchwork/py-django-rest-framwork-py-django-filter.patch40
4 files changed, 14 insertions, 76 deletions
diff --git a/community/patchwork/0002-remove-uneeded-bashism-from-tools-and-change-path.patch b/community/patchwork/0002-remove-uneeded-bashism-from-tools-and-change-path.patch
index 858568f7be..ad8d8ae981 100644
--- a/community/patchwork/0002-remove-uneeded-bashism-from-tools-and-change-path.patch
+++ b/community/patchwork/0002-remove-uneeded-bashism-from-tools-and-change-path.patch
@@ -1,5 +1,5 @@
diff --git a/tools/patchwork-update-commits b/tools/patchwork-update-commits
-index c84a6305e3..2d34f4f9a9 100755
+index 269dac9..b7bc2ec 100755
--- a/tools/patchwork-update-commits
+++ b/tools/patchwork-update-commits
@@ -1,4 +1,4 @@
@@ -8,17 +8,22 @@ index c84a6305e3..2d34f4f9a9 100755
#
# Patchwork - automated patch tracking system
# Copyright (C) 2010 Jeremy Kerr <jk@ozlabs.org>
+@@ -18,3 +18,4 @@ while read -r commit; do
+ hash=$(git diff "$commit~..$commit" | python "$PW_DIR/hasher.py")
+ pwclient update -s Accepted -c "$commit" -h "$hash"
+ done
++
diff --git a/tools/post-receive.hook b/tools/post-receive.hook
-index 8098ce825a..b8a1fd2f2a 100755
+index 9f2f050..0136ca1 100755
--- a/tools/post-receive.hook
+++ b/tools/post-receive.hook
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
+
# Patchwork - automated patch tracking system
# Copyright (C) 2010 martin f. krafft <madduck@madduck.net>
- #
-@@ -21,7 +21,7 @@
+@@ -8,7 +8,7 @@
# Git post-receive hook to update Patchwork patches after Git pushes
set -eu
diff --git a/community/patchwork/APKBUILD b/community/patchwork/APKBUILD
index 023963ba47..5866561e02 100644
--- a/community/patchwork/APKBUILD
+++ b/community/patchwork/APKBUILD
@@ -1,8 +1,8 @@
# Con#tributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=patchwork
-pkgver=2.1.5
-pkgrel=1
+pkgver=3.0.0
+pkgrel=0
pkgdesc="Web-based patch tracking system"
url="https://github.com/getpatchwork/patchwork"
arch="noarch"
@@ -19,15 +19,12 @@ subpackages="
$pkgname-doc
$pkgname-uwsgi-apache2:apache2_wsgi
$pkgname-uwsgi-nginx:nginx_wsgi
- pwclient:pwclient
"
source="patchwork-$pkgver.tar.gz::https://github.com/getpatchwork/patchwork/archive/v$pkgver.tar.gz
- dependencies-fix.patch
0001-support-busybox-readlink.patch
0002-remove-uneeded-bashism-from-tools-and-change-path.patch
nginx-uwsgi-patchwork-conf.ini
nginx-patchwork.conf
- py-django-rest-framwork-py-django-filter.patch
"
@@ -67,17 +64,8 @@ nginx_wsgi() {
"$subpkgdir"/etc/uwsgi/conf.d/patchwork.ini
}
-pwclient() {
- pkgdesc="command-line client for patchwork"
- depends="python3"
- install -Dm775 "$pkgdir"/usr/share/webapps/patchwork/patchwork/bin/pwclient \
- "$subpkgdir"/usr/bin/pwclient
-}
-
-sha512sums="4283301859707ea871e4d7b21c687afc4c6d6383b657d456c90fd8cc559489c17210f5f3147b8d0b18dd9f9e2ffcc24948fd6d9204bac0e10ffe0097e4e3f826 patchwork-2.1.5.tar.gz
-1721531735c02d2f3d0241341ffe4620c66771cf99fb9b597156bcc3b19b5cdfd17835d4e79f2fdfef33c1f3bf13444174b3fb0c9363520574918d924dae454c dependencies-fix.patch
+sha512sums="40e013142af8bdcdba1fc2f8fbec656de36b2f35b1d11aeae77e60ffd9ca00656a03554695b90a5ea271e28a0ec31688d766da958829c0cf69e14b94a54543ed patchwork-3.0.0.tar.gz
5facc2c2620b2d614011bcdc06bb481fb1481c79333579e5a7fa5b8bc4f97d1651cc8c4632a5e150b62674d64c00345341229319f1edb2016721868e84146826 0001-support-busybox-readlink.patch
-f6d3590b3ac53797e0ae25fe50ab0935608be5ded44665599cbc91e93558895eddc6a7a717153d81fc194b314d7854686577ef5ecf9e0302b7824ce3b3863f7b 0002-remove-uneeded-bashism-from-tools-and-change-path.patch
+432b7981679499183ebb5ad8caa560a059ba11bad1e6489256f2a44808846110a1aaf08728509869cb0d898514b4368f8924316e7bde9d5f5db2ffea7d471813 0002-remove-uneeded-bashism-from-tools-and-change-path.patch
28911a25e00a254237f7214fb681e5e984a2eae331e610be62967d5e246958e0f8d3f84861d8fd17c1190c1df72a25f28ddb33843b3679a3864beb00cb4b4961 nginx-uwsgi-patchwork-conf.ini
-862dd2522236a0b18d2a8d06f1ad91ad0fd0936fa502d95e09556641e67d42e1212821bfd7fb98923e4fe8b8a7369ded8c23831fb496b1e2833d9831c1b23725 nginx-patchwork.conf
-5f1d5189bde5ba4494aec3e9517583a58791f50632c67b5e17a05cd2b9beaef02b5c12dfbb7d076e8af49c5dffe6fb3f4739897a58a2c7d2915baf19fb26c4fc py-django-rest-framwork-py-django-filter.patch"
+862dd2522236a0b18d2a8d06f1ad91ad0fd0936fa502d95e09556641e67d42e1212821bfd7fb98923e4fe8b8a7369ded8c23831fb496b1e2833d9831c1b23725 nginx-patchwork.conf"
diff --git a/community/patchwork/dependencies-fix.patch b/community/patchwork/dependencies-fix.patch
deleted file mode 100644
index 74834d4fd9..0000000000
--- a/community/patchwork/dependencies-fix.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/requirements-prod.txt b/requirements-prod.txt
-index d249ad8..27f9e5e 100644
---- a/requirements-prod.txt
-+++ b/requirements-prod.txt
-@@ -1,5 +1,5 @@
--Django>=1.8,<2.0
--djangorestframework>=3.4,<3.7
--django-filter>=1.0,<1.1
--psycopg2>=2.7,<2.8
--sqlparse==0.2.4
-+Django>=1.8
-+djangorestframework>=3.4
-+django-filter>=1.0
-+psycopg2>=2.7
-+sqlparse>0.2.4
diff --git a/community/patchwork/py-django-rest-framwork-py-django-filter.patch b/community/patchwork/py-django-rest-framwork-py-django-filter.patch
index acae36cabd..31da3132f3 100644
--- a/community/patchwork/py-django-rest-framwork-py-django-filter.patch
+++ b/community/patchwork/py-django-rest-framwork-py-django-filter.patch
@@ -76,43 +76,3 @@ index 14768ef..16a6490 100644
search_fields = ('name',)
ordering_fields = ('id', 'name', 'date', 'submitter', 'received_all')
ordering = 'id'
-diff --git a/patchwork/compat.py b/patchwork/compat.py
-index 3bbff44..d1d89c1 100644
---- a/patchwork/compat.py
-+++ b/patchwork/compat.py
-@@ -46,16 +46,35 @@ if settings.ENABLE_REST_API:
- # The django-filter library renamed 'Filter.name' to 'Filter.field_name' in
- # 1.1.
- #
-+# DjangoFilterBackend
-+
-+# The django-filter library changed the default strictness level in 2.0
-+#
- # https://django-filter.readthedocs.io/en/master/guide/migration.html#migrating-to-2-0
-
- if settings.ENABLE_REST_API:
- import django_filters # noqa
-+ from django_filters import rest_framework # noqa
-+ from rest_framework import exceptions # noqa
-
- if django_filters.VERSION >= (1, 1):
- NAME_FIELD = 'field_name'
- else:
- NAME_FIELD = 'name'
-
-+ if django_filters.VERSION >= (2, 0):
-+ # TODO(stephenfin): Enable strict mode in API v2.0, possibly with a
-+ # bump in the minimum version of django-filter [1]
-+ #
-+ # [1] https://github.com/carltongibson/django-filter/pull/983
-+ class DjangoFilterBackend(rest_framework.DjangoFilterBackend):
-+ def filter_queryset(self, request, queryset, view):
-+ try:
-+ return super().filter_queryset(request, queryset, view)
-+ except exceptions.ValidationError:
-+ return queryset.none()
-+ else:
-+ DjangoFilterBackend = rest_framework.DjangoFilterBackend
-
- # reverse, reverse_lazy
- #