Package Details: gam 3.51-3

Git Clone URL: https://aur.archlinux.org/gam.git (read-only)
Package Base: gam
Description: Command line tool for Google Apps Administrators to manage domain and user settings; patched for managed installation
Upstream URL: https://github.com/jay0lee/GAM
Licenses: Apache
Submitter: altercation
Maintainer: altercation (jamesan)
Last Packager: altercation
Votes: 2
Popularity: 0.007193
First Submitted: 2015-08-18 14:14
Last Updated: 2015-08-18 21:10

Dependencies (2)

Required by (0)

Sources (2)

Latest Comments

jamesan commented on 2015-10-21 14:23

I just reported the out-of-date status for this package. The latest version of GAM refactors how its file paths are derived (i.e. getGamPath() is no longer used), so the patch file no longer works (and amending it isn't trivial).

There's also a number of changes to align the PKGBUILD with the current packaging guidelines. You can find these changes I made in this diff:
https://github.com/jamesan/arch-package-unofficial/commit/00d7cb2658ef8ddb3066df6e2b240b8012ab2f9d

altercation commented on 2015-08-18 21:13

This package installs GAM to your Arch system. Because you aren't running GAM out of some podunk subdirectory in $HOME, you can't easily set up the client_secrets.json and oath2.txt files in the GAM directory itself (well, you could but that would be BAD since that would mean dumping stuff into a managed installed package directory in the system, and the whole point of this package is keeping things neat and clean).

So I patched GAM to allow arbitrary paths for those two key files. You can place client_secrets.json and oauth2.txt where ever you wish to and then export their full paths in the following environment variables:

CLIENTSECRETS
OAUTHFILE

For example:

export CLIENTSECRETS=/home/username/.config/gam/client_secrets.json
export OATHFILE=/home/username/.config/gam/domainxyz.com/oauth2.txt

It should be clear that this, like GAM's current support for GAM directory relative oauth2.txt export, allows you to easily manage multiple domains with this single GAM installation.

Additionally, you will need to export the location of your GAMCACHE directory (normally this is also stored in the gam.py directory, but again since this is now under /opt/gam/ we are not doing that). For example, I use this in my scripts:

export GAMCACHE="${XDG_CACHE_HOME:-${HOME}/.cache}/gam"

or, if you want different caches based on different managed domains (assuming you are assigning $DOMAIN)

export GAMCACHE="${XDG_CACHE_HOME:-${HOME}/.cache}/gam/$DOMAIN"

altercation commented on 2015-08-18 20:44

Warning: I'm working out some kinks in this solution. Happy to receive issues/reports on it.

altercation commented on 2015-08-18 20:16

This package installs GAM to your Arch system. Because you aren't running GAM out of some podunk subdirectory in $HOME, you can't easily set up the client_secrets.json and oath2.txt files in the GAM directory itself (well, you could but that would be BAD since that would mean dumping stuff into a managed installed package directory in the system, and the whole point of this package is keeping things neat and clean).

So I patched GAM to allow arbitrary paths for those two key files. You can place client_secrets.json and oauth2.txt where ever you wish to and then export their full paths in the following environment variables:

CLIENTSECRETS
OAUTHFILE

For example:

export CLIENTSECRETS=/home/username/.config/gam/client_secrets.json
export OATHFILE=/home/username/.config/gam/domainxyz.com/oauth2.txt

It should be clear that this, like GAM's current support for GAM directory relative oauth2.txt export, allows you to easily manage multiple domains with this single GAM installation.