summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Schoonover (altercation)2015-08-18 23:10:26 +0200
committerEthan Schoonover (altercation)2015-08-18 23:10:26 +0200
commitc2b41b4fe079e824d8b2562c162351ede41c2fb7 (patch)
treed4e73979380702ba2310b1b894e997bc5f5bb43e
parent2bf1b94b936ac7beb7b2aa9f376be2abf5ecec0e (diff)
downloadaur-c2b41b4fe079e824d8b2562c162351ede41c2fb7.tar.gz
Modified patch to allow OATHFILE, CLIENTSECRETS, and GAMCACHE env vars
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD6
-rw-r--r--client_secrets.patch36
3 files changed, 35 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4368411f67e..690a9a51ccc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = gam
pkgdesc = Command line tool for Google Apps Administrators to manage domain and user settings; patched for managed installation
pkgver = 3.51
- pkgrel = 2
- url = http://code.google.com/p/google-apps-manager/
+ pkgrel = 3
+ url = https://github.com/jay0lee/GAM
arch = any
license = Apache
makedepends = tar gzip
@@ -11,7 +11,7 @@ pkgbase = gam
source = https://github.com/jay0lee/GAM/archive/v3.51.tar.gz
source = client_secrets.patch
md5sums = 0ab658cb70b375a4634d477edcd02123
- md5sums = b9f182cf06a9a058c7866a6930aeb755
+ md5sums = 89d247a2ab0612c0edf098d0284d9a8b
pkgname = gam
diff --git a/PKGBUILD b/PKGBUILD
index 32f53d8643a..73ee4fca16b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,11 +2,11 @@
pkgname=gam
pkgver=3.51
-pkgrel=2
+pkgrel=3
holdver=$pkgver
pkgdesc="Command line tool for Google Apps Administrators to manage domain and user settings; patched for managed installation"
arch=('any')
-url="http://code.google.com/p/google-apps-manager/"
+url="https://github.com/jay0lee/GAM"
license=('Apache')
depends=('python2')
makedepends=('tar gzip')
@@ -16,7 +16,7 @@ source=("https://github.com/jay0lee/GAM/archive/v${pkgver}.tar.gz"
"client_secrets.patch")
noextract=("v${pkgver}.tar.gz")
md5sums=('0ab658cb70b375a4634d477edcd02123'
- 'b9f182cf06a9a058c7866a6930aeb755')
+ '89d247a2ab0612c0edf098d0284d9a8b')
build() {
cd $srcdir
diff --git a/client_secrets.patch b/client_secrets.patch
index c6c7139d709..12d58c53c0a 100644
--- a/client_secrets.patch
+++ b/client_secrets.patch
@@ -1,5 +1,5 @@
---- old-gam.py 2015-08-18 17:20:00.268784523 +0200
-+++ gam.py 2015-08-18 18:33:22.165903501 +0200
+--- old-gam.py 2015-08-18 23:04:39.852955746 +0200
++++ gam.py 2015-08-18 23:05:42.805013976 +0200
@@ -319,7 +319,7 @@
global customerId
oauth2file = getGamPath()+u'oauth2.txt'
@@ -18,7 +18,18 @@
except KeyError:
pass
storage = oauth2client.file.Storage(oauth2file)
-@@ -589,7 +589,7 @@
+@@ -543,6 +543,10 @@
+ cache = None
+ if not os.path.isfile(getGamPath()+u'nocache.txt'):
+ cache = u'%sgamcache' % getGamPath()
++ try:
++ cache = os.environ[u'GAMCACHE']
++ except KeyError:
++ pass
+ http = httplib2.Http(ca_certs=getGamPath()+u'cacert.pem', disable_ssl_certificate_validation=disable_ssl_certificate_validation, cache=cache)
+ if os.path.isfile(getGamPath()+u'debug.gam'):
+ httplib2.debuglevel = 4
+@@ -589,7 +593,7 @@
global extra_args
oauth2servicefile = getGamPath()+u'oauth2service'
try:
@@ -27,7 +38,18 @@
except KeyError:
pass
oauth2servicefilejson = u'%s.json' % oauth2servicefile
-@@ -5520,7 +5520,7 @@
+@@ -627,6 +631,10 @@
+ cache = None
+ if not os.path.isfile(getGamPath()+u'nocache.txt'):
+ cache = '%sgamcache' % getGamPath()
++ try:
++ cache = os.environ[u'GAMCACHE']
++ except KeyError:
++ pass
+ http = httplib2.Http(ca_certs=getGamPath()+u'cacert.pem', disable_ssl_certificate_validation=disable_ssl_certificate_validation, cache=cache)
+ if os.path.isfile(getGamPath()+u'debug.gam'):
+ httplib2.debuglevel = 4
+@@ -5520,7 +5528,7 @@
except IndexError:
oauth2file = getGamPath()+u'oauth2.txt'
try:
@@ -36,7 +58,7 @@
except KeyError:
pass
storage = oauth2client.file.Storage(oauth2file)
-@@ -7898,7 +7898,7 @@
+@@ -7898,7 +7906,7 @@
except IndexError:
oauth2file = getGamPath()+u'oauth2.txt'
try:
@@ -45,7 +67,7 @@
except KeyError:
pass
storage = oauth2client.file.Storage(oauth2file)
-@@ -7941,7 +7941,7 @@
+@@ -7941,7 +7949,7 @@
def doDeleteOAuth():
oauth2file = getGamPath()+u'oauth2.txt'
try:
@@ -54,7 +76,7 @@
except KeyError:
pass
storage = oauth2client.file.Storage(oauth2file)
-@@ -7981,6 +7981,10 @@
+@@ -7981,6 +7989,10 @@
def doRequestOAuth(incremental_auth=False):
CLIENT_SECRETS = getGamPath()+u'client_secrets.json'