summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD15
-rw-r--r--client_secrets.patch67
3 files changed, 81 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c9973070ff51..4368411f67e6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = gam
- pkgdesc = Command line tool for Google Apps Administrators to manage domain and user settings
+ pkgdesc = Command line tool for Google Apps Administrators to manage domain and user settings; patched for managed installation
pkgver = 3.51
- pkgrel = 1
+ pkgrel = 2
url = http://code.google.com/p/google-apps-manager/
arch = any
license = Apache
@@ -9,7 +9,9 @@ pkgbase = gam
depends = python2
noextract = v3.51.tar.gz
source = https://github.com/jay0lee/GAM/archive/v3.51.tar.gz
+ source = client_secrets.patch
md5sums = 0ab658cb70b375a4634d477edcd02123
+ md5sums = b9f182cf06a9a058c7866a6930aeb755
pkgname = gam
diff --git a/PKGBUILD b/PKGBUILD
index 0327ad219b97..32f53d8643a0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,9 +2,9 @@
pkgname=gam
pkgver=3.51
-pkgrel=1
+pkgrel=2
holdver=$pkgver
-pkgdesc="Command line tool for Google Apps Administrators to manage domain and user settings"
+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/"
license=('Apache')
@@ -12,14 +12,19 @@ depends=('python2')
makedepends=('tar gzip')
optdepends=()
provides=()
-source=("https://github.com/jay0lee/GAM/archive/v${pkgver}.tar.gz")
+source=("https://github.com/jay0lee/GAM/archive/v${pkgver}.tar.gz"
+ "client_secrets.patch")
noextract=("v${pkgver}.tar.gz")
-md5sums=('0ab658cb70b375a4634d477edcd02123')
+md5sums=('0ab658cb70b375a4634d477edcd02123'
+ 'b9f182cf06a9a058c7866a6930aeb755')
build() {
cd $srcdir
- mkdir build
+ [[ -d $srcdir/build ]] && rm -rf $srcdir/build
+ mkdir build
tar --gzip --extract --overwrite --strip-components=1 --directory=build --file=v${pkgver}.tar.gz
+ cd build
+ patch -uN -i ../client_secrets.patch || return 1
}
package() {
diff --git a/client_secrets.patch b/client_secrets.patch
new file mode 100644
index 000000000000..c6c7139d7090
--- /dev/null
+++ b/client_secrets.patch
@@ -0,0 +1,67 @@
+--- old-gam.py 2015-08-18 17:20:00.268784523 +0200
++++ gam.py 2015-08-18 18:33:22.165903501 +0200
+@@ -319,7 +319,7 @@
+ global customerId
+ oauth2file = getGamPath()+u'oauth2.txt'
+ try:
+- oauth2file = getGamPath()+os.environ[u'OAUTHFILE']
++ oauth2file = os.environ[u'OAUTHFILE']
+ except KeyError:
+ pass
+ storage = oauth2client.file.Storage(oauth2file)
+@@ -526,7 +526,7 @@
+ global domain, customerId, extra_args
+ oauth2file = getGamPath()+u'oauth2.txt'
+ try:
+- oauth2file = getGamPath()+os.environ[u'OAUTHFILE']
++ oauth2file = os.environ[u'OAUTHFILE']
+ except KeyError:
+ pass
+ storage = oauth2client.file.Storage(oauth2file)
+@@ -589,7 +589,7 @@
+ global extra_args
+ oauth2servicefile = getGamPath()+u'oauth2service'
+ try:
+- oauth2servicefile = getGamPath()+os.environ[u'OAUTHSERVICEFILE']
++ oauth2servicefile = os.environ[u'OAUTHSERVICEFILE']
+ except KeyError:
+ pass
+ oauth2servicefilejson = u'%s.json' % oauth2servicefile
+@@ -5520,7 +5520,7 @@
+ except IndexError:
+ oauth2file = getGamPath()+u'oauth2.txt'
+ try:
+- oauth2file = getGamPath()+os.environ[u'OAUTHFILE']
++ oauth2file = os.environ[u'OAUTHFILE']
+ except KeyError:
+ pass
+ storage = oauth2client.file.Storage(oauth2file)
+@@ -7898,7 +7898,7 @@
+ except IndexError:
+ oauth2file = getGamPath()+u'oauth2.txt'
+ try:
+- oauth2file = getGamPath()+os.environ[u'OAUTHFILE']
++ oauth2file = os.environ[u'OAUTHFILE']
+ except KeyError:
+ pass
+ storage = oauth2client.file.Storage(oauth2file)
+@@ -7941,7 +7941,7 @@
+ def doDeleteOAuth():
+ oauth2file = getGamPath()+u'oauth2.txt'
+ try:
+- oauth2file = getGamPath()+os.environ[u'OAUTHFILE']
++ oauth2file = os.environ[u'OAUTHFILE']
+ except KeyError:
+ pass
+ storage = oauth2client.file.Storage(oauth2file)
+@@ -7981,6 +7981,10 @@
+
+ def doRequestOAuth(incremental_auth=False):
+ CLIENT_SECRETS = getGamPath()+u'client_secrets.json'
++ try:
++ CLIENT_SECRETS = os.environ[u'CLIENTSECRETS']
++ except KeyError:
++ pass
+ MISSING_CLIENT_SECRETS_MESSAGE = u"""
+ WARNING: Please configure OAuth 2.0
+