summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO7
-rw-r--r--0001-Allow-python-oauth2client-4.x.x.patch40
-rw-r--r--PKGBUILD32
3 files changed, 67 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index faca2f3702f9..c738cb21bad6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = gdrivefs-git
pkgdesc = A complete FUSE adapter for Google Drive
- pkgver = 0.14.12.r21.gc504de1
+ pkgver = 0.14.13.r5.gd307b04
pkgrel = 1
url = https://github.com/dsoprea/GDriveFS
arch = any
@@ -14,8 +14,9 @@ pkgbase = gdrivefs-git
depends = python-httplib2
depends = python-dateutil
depends = python-oauth2client
- source = git://github.com/dsoprea/GDriveFS
+ source = git+https://github.com/dsoprea/GDriveFS
+ source = 0001-Allow-python-oauth2client-4.x.x.patch
sha256sums = SKIP
+ sha256sums = d10039e8ce65da644099128740b6f821de71f77facb206029994bf4bbeef659a
pkgname = gdrivefs-git
-
diff --git a/0001-Allow-python-oauth2client-4.x.x.patch b/0001-Allow-python-oauth2client-4.x.x.patch
new file mode 100644
index 000000000000..330e39954edc
--- /dev/null
+++ b/0001-Allow-python-oauth2client-4.x.x.patch
@@ -0,0 +1,40 @@
+From f0a8ddc5c7ad9fe78d0f9ad55f20107ea1b1dd6f Mon Sep 17 00:00:00 2001
+From: Ivan Shapovalov <intelfx@intelfx.name>
+Date: Thu, 29 Dec 2022 22:38:59 +0300
+Subject: [PATCH] Allow python-oauth2client 4.x.x
+
+---
+ gdrivefs/gdfuse.py | 6 ------
+ gdrivefs/resources/requirements.txt | 2 +-
+ 2 files changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/gdrivefs/gdfuse.py b/gdrivefs/gdfuse.py
+index 7265f9e..7af85d5 100644
+--- a/gdrivefs/gdfuse.py
++++ b/gdrivefs/gdfuse.py
+@@ -851,12 +851,6 @@ def mount(auth_storage_filepath, mountpoint, debug=None, nothreads=None,
+ raise ValueError("Credential path is not valid: [%s]" %
+ (auth_storage_filepath,))
+
+- # If we don't check this here, it'll just cause a headache when things fail
+- # during the communication.
+- oauth2_version = tuple([int(c) for c in oauth2client.__version__.split('.')])
+- if oauth2_version >= (4, 0, 0):
+- raise Exception("Google does not like oauth2client >=4.0.0 .")
+-
+ fuse_opts = {}
+
+ if option_string:
+diff --git a/gdrivefs/resources/requirements.txt b/gdrivefs/resources/requirements.txt
+index 0f3f4c2..4c77c94 100644
+--- a/gdrivefs/resources/requirements.txt
++++ b/gdrivefs/resources/requirements.txt
+@@ -5,4 +5,4 @@ fusepy>=2.0.2
+ greenlet>=0.4.2
+ httplib2>=0.9.2
+ python-dateutil>=2.2
+-oauth2client<4.0.0
++oauth2client<5.0.0
+--
+2.39.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 8f5b5af9c3f7..8fc630247123 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,9 +3,9 @@
# Contributors: Javier Vazquez <j.e.vasquez.v at gmail dot com>
# Contributors: Nagy Gábor <ngm.hun at gmail dot com>
+_pkgname=GDriveFS
pkgname=gdrivefs-git
-_gitname=GDriveFS
-pkgver=0.14.12.r21.gc504de1
+pkgver=0.14.13.r5.gd307b04
pkgrel=1
pkgdesc='A complete FUSE adapter for Google Drive'
url='https://github.com/dsoprea/GDriveFS'
@@ -24,22 +24,36 @@ makedepends=(
)
license=('GPL2')
arch=('any')
-source=("git://github.com/dsoprea/${_gitname}")
-sha256sums=('SKIP')
+source=("git+https://github.com/dsoprea/GDriveFS"
+ '0001-Allow-python-oauth2client-4.x.x.patch')
+sha256sums=('SKIP'
+ 'd10039e8ce65da644099128740b6f821de71f77facb206029994bf4bbeef659a')
pkgver() {
- cd "${_gitname}"
+ cd "${_pkgname}"
git describe --long | sed 's/-/.r/;s/-/./'
}
+pkgver() {
+ cd "${_pkgname}"
+ git describe --long | sed 's/^v//;s/-/.r/;s/-/./'
+}
+
+prepare() {
+ cd "${_pkgname}"
+ for p in "${source[@]}"; do
+ if [[ ${p} == *.patch ]]; then
+ git apply "${srcdir}/${p}"
+ fi
+ done
+}
+
build() {
- cd "${_gitname}"
+ cd "${_pkgname}"
python setup.py build
}
package() {
- cd "${_gitname}"
+ cd "${_pkgname}"
python setup.py install --root="${pkgdir}" --optimize=1
}
-
-# vim:set ft=sh ts=2 sw=2 et: