Compare commits

...

39 Commits

Author SHA1 Message Date
Ross Scroggs
b996fa4a04
Update README.md 2025-05-05 11:54:16 -07:00
Ross Scroggs
61733417c4
Update gam-install.sh 2025-04-22 14:06:37 -07:00
Ross Scroggs
d2ac96c112
Create version_info.txt.in 2025-04-16 15:56:00 -07:00
Ross Scroggs
0a73650d26
Build 7.06.04 2025-04-16 15:33:24 -07:00
Ross Scroggs
bb9e3a3578
Upgraded to OpenSSL 3.5.0. 2025-04-08 09:59:38 -07:00
Ross Scroggs
3b104da4b6
Updated progress messages for gam <UserTypeEntity> print filelist|filecounts|filesharecounts|filetree select shareddriveid <SharedDriveID> 2025-04-07 17:20:23 -07:00
Ross Scroggs
4747f94403
Fix chrome policy bugs 2025-04-03 17:10:35 -07:00
Ross Scroggs
70ff65d7e9
Updated code to validate both <RegularExpression> and <ReplacementString> 2025-04-01 12:49:46 -07:00
Ross Scroggs
7d884e5645
Added replaceregex <RegularExpression> <ReplacementString> <Tag> <String> 2025-03-31 13:25:36 -07:00
Ross Scroggs
1f09fda38b
Updated show events to honor show_convert_cr_nl 2025-03-30 08:17:08 -07:00
Ross Scroggs
3dca043039
Updated commands that delete drive ACLs 2025-03-28 10:43:59 -07:00
Ross Scroggs
9004489e8a
Added option transpose [<Boolean>] to redirect csv 2025-03-27 20:41:03 -07:00
Ross Scroggs
46d1267ddb
Download/upload Google App Scripts 2025-03-25 20:25:16 -07:00
Ross Scroggs
ec3c3411ed
1010390002 2025-03-24 20:29:02 -07:00
Ross Scroggs
8e845f1ae4
Point to GAM-team 2025-03-23 06:59:05 -07:00
Ross Scroggs
3229d2675a
Update gam-install.sh to use GAM7 2025-03-22 20:42:39 -07:00
Ross Scroggs
36eb0dea98
Update build.yml 2025-03-22 09:53:31 -07:00
Ross Scroggs
8c027f9a8a
Update winget.yml 2025-03-22 09:53:18 -07:00
Ross Scroggs
2eb3208a5a
Update build.yml 2025-03-22 09:29:11 -07:00
Ross Scroggs
cbbad30b0e
Update build.yml 2025-03-22 08:58:49 -07:00
Ross Scroggs
31ce9e1f6f
Fix patchelf 2025-03-22 08:38:02 -07:00
Ross Scroggs
8e1e0eefa3
Updated license product names to match Google. 2025-03-22 07:51:06 -07:00
Ross Scroggs
75252ad682
Update build.yml 2025-03-21 09:14:51 -07:00
Ross Scroggs
e25bf38f94
Update build.yml 2025-03-20 18:22:54 -07:00
Ross Scroggs
5db8fd2bca
Update build.yml 2025-03-20 18:18:42 -07:00
Ross Scroggs
83b2953602
Update build.yml 2025-03-20 17:59:04 -07:00
Ross Scroggs
25458dc7a3
Update build.yml 2025-03-20 17:53:35 -07:00
Ross Scroggs
fcaf9e796b
Build cleanup 2025-03-20 13:14:00 -07:00
Ross Scroggs
ba867032d7
Travis build hacking 2025-03-20 08:49:58 -07:00
Ross Scroggs
a49fb23c04
Update build.yml 2025-03-20 07:47:17 -07:00
Ross Scroggs
0c262dcf51
Update build.yml 2025-03-20 07:45:19 -07:00
Ross Scroggs
0bd20a0b71
Build hacking 2025-03-20 07:41:56 -07:00
Ross Scroggs
83460b12b0
staticx hacking 2025-03-19 18:23:31 -07:00
Ross Scroggs
79d62b28f2
Fixed bug in gam update chromepolicy where appid was misinterpreted 2025-03-18 23:21:48 -07:00
Ross Scroggs
f7ffd876f6
Added new GWSE licenses 2025-03-18 12:24:54 -07:00
Ross Scroggs
9f464aa147
Increment version 2025-03-18 10:21:24 -07:00
Ross Scroggs
c57aaebb23
Updated various chat space commands to handle service not available 2025-03-18 09:25:53 -07:00
Ross Scroggs
ce2d150317
Fixed bug in `gam calendars <CalendarEntity> print events matchfield 2025-03-17 13:54:00 -07:00
Ross Scroggs
5ad0573b5f
Fixed bug in gam calendars <CalendarEntity> print events matchfield 2025-03-17 13:11:47 -07:00
26 changed files with 1244 additions and 895 deletions

View File

@ -42,17 +42,17 @@ jobs:
- os: ubuntu-24.04-arm
jid: 4
goal: build
arch: arm64
arch: aarch64
openssl_archs: linux-aarch64
- os: ubuntu-22.04-arm
jid: 5
goal: build
arch: arm64
arch: aarch64
openssl_archs: linux-aarch64
- os: ubuntu-22.04-arm
jid: 6
goal: build
arch: arm64
arch: aarch64
openssl_archs: linux-aarch64
staticx: yes
- os: macos-13
@ -63,10 +63,15 @@ jobs:
- os: macos-14
jid: 8
goal: build
arch: arm64
arch: aarch64
openssl_archs: darwin64-arm64
- os: macos-15
jid: 9
goal: build
arch: aarch64
openssl_archs: darwin64-arm64
- os: windows-2022
jid: 9
jid: 10
goal: build
arch: Win64
openssl_archs: VC-WIN64A
@ -85,7 +90,7 @@ jobs:
with:
path: |
cache.tar.xz
key: gam-${{ matrix.jid }}-2025026
key: gam-${{ matrix.jid }}-20250408
- name: Untar Cache archive
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
@ -544,9 +549,11 @@ jobs:
# arm64 needs to build a wheel and needs scons to build
sudo apt-get -qq --yes install scons
"${PYTHON}" -m pip install --upgrade patchelf-wrapper
"${PYTHON}" -m pip install --upgrade staticx
# "${PYTHON}" -m pip install --upgrade staticx
# install latest github src for staticx
"${PYTHON}" -m pip install --upgrade "git+https://github.com/JonathonReinhart/staticx"
- name: Make StaticX
- name: Make StaticX GAM build
if: matrix.staticx == 'yes'
run: |
case $RUNNER_ARCH in

View File

@ -10,7 +10,7 @@ jobs:
- uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: taers232c.GAMADV-XTD3
release-tag: v7.05.08
release-tag: v7.05.13
max-versions-to-keep: 1 # keep only latest versions
installers-regex: '\.msi$'
token: ${{ secrets.WINGET_TOKEN }}

View File

@ -1,98 +0,0 @@
if: tag IS blank
os: linux
language: python
dist: focal
# Force rebuild X
env:
global:
- BUILD_PYTHON_VERSION=3.12.5
- MIN_PYTHON_VERSION=3.12.5
- LINUX_BUILD_OPENSSL_VERSION=3.3.1
- LINUX_MIN_OPENSSL_VERSION=3.3.1
- MIN_OPENSSL_VERSION=$LINUX_MIN_OPENSSL_VERSION
- PATCHELF_VERSION=0.12
# PYINSTALLER_VERSION can be full commit hash or version like v4.10
- PYINSTALLER_VERSION=v6.9.0
- DIST_UPGRADE=false
cache:
directories:
- $HOME/.cache/pip
- $HOME/python
- $HOME/ssl
jobs:
fast_finish: true
include:
- os: linux
name: "Linux ARM64 Focal"
dist: focal
arch: arm64
language: shell
env:
- BUILD_PYTHON_VERSION=3.12.8
filter_secrets: false
- os: linux
name: "Linux ARM64 Bionic"
dist: bionic
arch: arm64
language: shell
filter_secrets: false
- os: linux
name: "Linux 64-bit Focal"
dist: focal
language: shell
env:
- BUILD_PYTHON_VERSION=3.12.8
- os: linux
name: "Linux 64-bit Bionic"
dist: bionic
language: shell
before_install:
- export GAMOS="${TRAVIS_OS_NAME}";
- export SCRIPT_OS_NAME="${GAMOS}";
if [ "${TRAVIS_CPU_ARCH}" == "amd64" ]; then
export PLATFORM="x86_64";
else
export PLATFORM="${TRAVIS_CPU_ARCH}";
fi
- source src/travis/${SCRIPT_OS_NAME}-before-install.sh
install:
- source src/travis/${SCRIPT_OS_NAME}-install.sh
script:
- $gam version | grep travis # travis should be part of the path (not /tmp or such)
# Determine which Python version GAM is built with and ensure it's at least build version from above.
- vline=$($gam version | grep "Python "); python_line=($vline); this_python=${python_line[1]}; $python tools/a_atleast_b.py $this_python $MIN_PYTHON_VERSION
# Determine which OpenSSL version GAM is built with and ensure it's at least build version from above.
#- vline=$($gam config config tls_min_version TLSv1_3 version extended | grep "OpenSSL "); openssl_line=($vline); this_openssl=${openssl_line[1]}; $python tools/a_atleast_b.py $this_openssl $MIN_OPENSSL_VERSION
# Builds should default TLS 1.2 or 1.3 to Google
#- $gam version extended | grep TLSv1\.[23]
# expect fail since server doesn't support our TLS version
- $gam config tls_min_version TLSv1_2 version extended location tls-v1-0.badssl.com:1010; [[ $? == 3 ]]
before_deploy:
# Comment out for Linux Xenial and Trusty
#- yes | gem update --system --force
- gem install bundler
- gem install faraday-net_http -v '3.3.0' # Fix faraday version
- gem install uri
- gem install logger
- export TRAVIS_TAG="preview"
- unset LD_LIBRARY_PATH
deploy:
provider: releases
token: $GITHUB_TOKEN
file_glob: true
overwrite: true
file: gamadv-xtd3-$GAMVERSION-*
skip_cleanup: true
draft: true
edge: true
on:
repo: taers232c/GAMADV-XTD3

View File

@ -1,18 +1,12 @@
# Introduction
GAMADV-XTD3 is a free, open source command line tool for Google Workspace (formerly G Suite) Administrators to manage domain and user settings quickly and easily.
GAM is a command line tool for Google Workspace admins to manage domain and user settings quickly and easily.
GAMADV-XTD3 is built with Python 3.
GAMADV-XTD3 has been replaced with GAM7.
This page provides simple instructions for downloading, installing and starting to use GAMADV-XTD3.
GAMADV-XTD3 runs on all versions of Google Workspace; Google Apps Free Edition has limited API support and not all GAM commands work.
GAMADV-XTD3 is a rewrite/extension of Jay Lee's [GAM], without his efforts, this version wouldn't exist.
GAMADV-XTD3 is backwards compatible with [GAM], meaning that if your command works with regular GAM, it will also work with GAMADV-XTD3. There may be differences in output, but the syntax is compatible.
* [How to Upgrade GAMADV-XTD3 to GAM7](https://github.com/GAM-team/GAM/wiki/How-to-Upgrade-GAMADV-XTD3-to-GAM7)
# Documentation
Documentation for GAMADV-XTD3 is hosted in the [GitHub GAMADV-XTD3 Wiki] and in Gam*.txt files.
Documentation for GAMADV-XTD3 is hosted in the [GitHub Wiki] and in Gam*.txt files.
# Mailing List / Discussion group
The GAM mailing list / discussion group is hosted on [Google Groups]. You can join the list and interact via email, or just post from the web itself.
@ -64,14 +58,13 @@ or authentications because new features have been included.
You can install multiple versions of GAM and GAMADV-XTD3 in different parallel directories.
[GAM]: https://github.com/GAM-team/GAM
[GitHub Releases]: https://github.com/taers232c/GAMADV-XTD3/releases
[GitHub]: https://github.com/taers232c/GAMADV-XTD3/tree/master
[GitHub GAMADV-XTD3 Wiki]: https://github.com/taers232c/GAMADV-XTD3/wiki
[GitHub Releases]: https://github.com/GAM-team/GAM/releases
[GitHub]: https://github.com/GAM-team/GAM/tree/master
[GitHub Wiki]: https://github.com/GAM-team/GAM/wiki
[Google Groups]: https://groups.google.com/group/google-apps-manager
[Downloads-Installs]: https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads-Installs
[Configuration]: https://github.com/taers232c/GAMADV-XTD3/wiki/gam.cfg
[Install]: https://github.com/taers232c/GAMADV-XTD3/wiki/How-to-Install-Advanced-GAM
[UpdateAdvanced]: https://github.com/taers232c/GAMADV-XTD3/wiki/How-to-Update-Advanced-GAM
[UpgradeFromStandard]: https://github.com/taers232c/GAMADV-XTD3/wiki/How-to-Upgrade-from-Standard-GAM
[Updates]: https://github.com/taers232c/GAMADV-XTD3/wiki/GAM-Updates
[UpgradeFromAdvanced]: https://github.com/taers232c/GAMADV-XTD3/wiki/How-to-Upgrade-from-GAMADV-X-or-GAMADV-XTD
[Downloads-Installs]: https://github.com/GAM-team/GAM/wiki/Downloads-Installs
[Configuration]: https://github.com/GAM-team/GAM/wiki/gam.cfg
[Install]: https://github.com/GAM-team/GAM/wiki/How-to-Install-Advanced-GAM
[UpdateAdvanced]: https://github.com/GAM-team/GAM/wiki/How-to-Update-Advanced-GAM
[UpgradeFromStandard]: https://github.com/GAM-team/GAM/wiki/How-to-Upgrade-from-Standard-GAM
[Updates]: https://github.com/GAM-team/GAM/wiki/GAM-Updates

View File

@ -102,7 +102,7 @@ If an item contains spaces, it should be surrounded by ".
banana|basil|blueberry|flamingo|graphite|grape|
lavender|peacock|sage|tangerine|tomato
<FileFormat> ::=
csv|doc|dot|docx|dotx|epub|html|jpeg|jpg|mht|odp|ods|odt|
csv|doc|dot|docx|dotx|epub|html|jpeg|jpg|json|mht|odp|ods|odt|
pdf|png|ppt|pot|potx|pptx|rtf|svg|tsv|txt|xls|xlt|xlsx|xltx|zip|
ms|microsoft|openoffice|
<LabelColorHex> ::=
@ -266,6 +266,7 @@ If an item contains spaces, it should be surrounded by ".
appsheetstandard | appsheetenterprisestandard | 1010380002 | AppSheet Enterprise Standard |
appsheetplus | appsheetenterpriseplus | 1010380003 | AppSheet Enterprise Plus |
assuredcontrols | 1010390001 | Assured Controls |
assuredcontrolsplus | 1010390002 | Assured Controls Plus |
bce | beyondcorp | beyondcorpenterprise | cep | chromeenterprisepremium | 1010400001 | Chrome Enterprise Premium |
cdm | chrome | googlechromedevicemanagement | Google-Chrome-Device-Management |
cloudidentity | identity | 1010010001 | Cloud Identity |
@ -281,11 +282,15 @@ If an item contains spaces, it should be surrounded by ".
gsuitebasic | gafb | gafw | basic | Google-Apps-For-Business |
gsuitebusiness | gau | gsb | unlimited | Google-Apps-Unlimited |
gsuitebusinessarchived | gsbau | businessarchived | 1010340002 | Google Workspace Business - Archived User |
gsuiteedu | gafe | gsuiteeducation | Google-Apps-For-Education |
gsuiteenterprisearchived | gseau | enterprisearchived | 1010340001 | Google Workspace Enterprise Plus - Archived User |
gsuiteenterpriseeducation | gsefe | e4e | 1010310002 | Google Workspace for Education Plus - Legacy |
gsuiteenterpriseeducationstudent | gsefes | e4es | 1010310003 | Google Workspace for Education Plus - Legacy (Student) |
gsuitegov | gafg | gsuitegovernment | Google-Apps-For-Government |
gsuitelite | gal | gsl | lite | Google-Apps-Lite |
gwef | workspaceeducationfundamentals | 1010070001 | Google Workspace for Education Fundamentals |
gwefau | gwefarchived | workspaceeducationfundamentalsarchived | 1010340007 | Google Workspace for Education Fundamentals - Archived User |
gwegmo | workspaceeducationgmailonly | 1010070004 | Google Workspace for Education Gmail Only |
gwep | workspaceeducationplus | 1010310008 | Google Workspace for Education Plus |
gwepstaff | workspaceeducationplusstaff | 1010310009 | Google Workspace for Education Plus (Staff) |
gwepstudent | workspaceeducationplusstudent | 1010310010 | Google Workspace for Education Plus (Extra Student)|
@ -348,6 +353,9 @@ If an item contains spaces, it should be surrounded by ".
now|today
<RegularExpression> ::= <String>
See: https://docs.python.org/3/library/re.html
<REMatchPattern> ::= <RegularExpression>
<RESearchPattern> ::= <RegularExpression>
<RESubstitution> ::= <String>>
<ProjectID> ::= <String>
Must match this Python Regular Expression: [a-z][a-z0-9-]{4,28}[a-z0-9]
<ServiceAccountName> ::= <String>
@ -812,7 +820,7 @@ Specify a collection of ChromeOS devices by directly specifying them or by speci
(gcsdoc(:<FieldName>)+ <StorageBucketObjectName>))
[warnifnodata] [columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>]
[endcsv|(fields <FieldNameList>)]
(matchfield|skipfield <FieldName> <RegularExpression>)*
(matchfield|skipfield <FieldName> <RESearchPattern>)*
[delimiter <Character>])|
(croscsvfile_sn
((<FileName>(:<FieldName>)+ [charset <Charset>] )|
@ -822,7 +830,7 @@ Specify a collection of ChromeOS devices by directly specifying them or by speci
(gcsdoc(:<FieldName>)+ <StorageBucketObjectName>))
[warnifnodata] [columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>]
[endcsv|(fields <FieldNameList>)]
(matchfield|skipfield <FieldName> <RegularExpression>)*
(matchfield|skipfield <FieldName> <RESearchPattern>)*
[delimiter <Character>])|
(datafile
cros|cros_sn|cros_ous|cros_ous_and_children
@ -839,7 +847,7 @@ Specify a collection of ChromeOS devices by directly specifying them or by speci
(gcsdoc(:<FieldName>)+ <StorageBucketObjectName>))
[warnifnodata] [columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>]
[endcsv|(fields <FieldNameList>)]
(matchfield|skipfield <FieldName> <RegularExpression>)*
(matchfield|skipfield <FieldName> <REMatchPattern>)*
[delimiter <Character>])|
(csvkmd
cros|cros_sn|cros_ous|cros_ous_and_children
@ -849,9 +857,9 @@ Specify a collection of ChromeOS devices by directly specifying them or by speci
(gcscsv <StorageBucketObjectName>)|
(gcsdoc <StorageBucketObjectName>))
[charset <Charset>] [columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>] [fields <FieldNameList>])
keyfield <FieldName> [keypattern <RegularExpression>] [keyvalue <String>] [delimiter <Character>]
subkeyfield <FieldName> [keypattern <RegularExpression>] [keyvalue <String>] [delimiter <Character>]
(matchfield|skipfield <FieldName> <RegularExpression>)*
keyfield <FieldName> [keypattern <REMatchPattern>] [keyvalue <String>] [delimiter <Character>]
subkeyfield <FieldName> [keypattern <REMatchPattern>] [keyvalue <String>] [delimiter <Character>]
(matchfield|skipfield <FieldName> <REMatchPattern>)*
[datafield <FieldName>(:<FieldName>)* [delimiter <Character>]])
(croscsvdata <FieldName>(:<FieldName>*))
@ -898,7 +906,7 @@ Specify a collection of Users by directly specifying them or by specifiying item
(gcsdoc(:<FieldName>)+ <StorageBucketObjectName>))
[warnifnodata] [columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>]
[endcsv|(fields <FieldNameList>)]
(matchfield|skipfield <FieldName> <RegularExpression>)*
(matchfield|skipfield <FieldName> <REMatchPattern>)*
[delimiter <Character>])|
(datafile
users|groups|groups_ns|groups_susp|groups_inde|ous|ous_ns|ous_susp|
@ -919,7 +927,7 @@ Specify a collection of Users by directly specifying them or by specifiying item
(gcsdoc(:<FieldName>)+ <StorageBucketObjectName>))
[warnifnodata] [columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>]
[endcsv|(fields <FieldNameList>)]
(matchfield|skipfield <FieldName> <RegularExpression>)*
(matchfield|skipfield <FieldName> <REMatchPattern>)*
[delimiter <Character>])|
(csvkmd
users|groups|groups_ns|groups_susp|groups_inde|ous|ous_ns|ous_susp|
@ -931,9 +939,9 @@ Specify a collection of Users by directly specifying them or by specifiying item
(gcscsv <StorageBucketObjectName>)|
(gcsdoc <StorageBucketObjectName>))
[charset <Charset>] [columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>] [fields <FieldNameList>])
keyfield <FieldName> [keypattern <RegularExpression>] [keyvalue <String>] [delimiter <Character>]
subkeyfield <FieldName> [keypattern <RegularExpression>] [keyvalue <String>] [delimiter <Character>]
(matchfield|skipfield <FieldName> <RegularExpression>)*
keyfield <FieldName> [keypattern <REMatchPattern>] [keyvalue <String>] [delimiter <Character>]
subkeyfield <FieldName> [keypattern <REMatchPattern>] [keyvalue <String>] [delimiter <Character>]
(matchfield|skipfield <FieldName> <REMatchPattern>)*
[datafield <FieldName>(:<FieldName>)* [delimiter <Character>]])
(csvdata <FieldName>(:<FieldName>*))
@ -965,7 +973,7 @@ Specify a collection of items by directly specifying them; the item type is dete
(gcsdoc(:<FieldName>)+ <StorageBucketObjectName>))
[warnifnodata] [columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>]
[endcsv|(fields <FieldNameList>)]
(matchfield|skipfield <FieldName> <RegularExpression>)*
(matchfield|skipfield <FieldName> <REMatchPattern>)*
[delimiter <Character>]
<CSVkmdSelector> ::=
@ -979,9 +987,9 @@ Specify a collection of items by directly specifying them; the item type is dete
(gcscsv <StorageBucketObjectName>)|
(gcsdoc <StorageBucketObjectName>))
[charset <Charset>] [columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>] [fields <FieldNameList>])
keyfield <FieldName> [keypattern <RegularExpression>] [keyvalue <String>] [delimiter <Character>]
subkeyfield <FieldName> [keypattern <RegularExpression>] [keyvalue <String>] [delimiter <Character>]
(matchfield|skipfield <FieldName> <RegularExpression>)*
keyfield <FieldName> [keypattern <REMatchPattern>] [keyvalue <String>] [delimiter <Character>]
subkeyfield <FieldName> [keypattern <REMatchPattern>] [keyvalue <String>] [delimiter <Character>]
(matchfield|skipfield <FieldName> <REMatchPattern>)*
[datafield <FieldName>(:<FieldName>)* [delimiter <Character>]]
<CSVSubkeySelector> ::= csvsubkey <FieldName>
<CSVDataSelector> ::= csvdata <FieldName>(:<FieldName>)*
@ -1271,8 +1279,8 @@ If the pattern {{Section}} appears in <FileName>, it will be replaced with the n
For redirect csv, the optional arguments must appear in the order shown.
<Redirect> ::=
redirect csv <FileName> [multiprocess] [append] [noheader] [charset <Charset>]
[columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>]
[sortheaders <StringList>] [timestampcolumn <String>]
[columndelimiter <Character>] [quotechar <Character>] [noescapechar [<Boolean>]]
[sortheaders <StringList>] [timestampcolumn <String>] [transpose [<Bopolean>]]
[todrive <ToDriveAttribute>*] |
redirect stdout <FileName> [multiprocess] [append] |
redirect stdout null [multiprocess] |
@ -1319,13 +1327,13 @@ gam tbatch <BatchContent> [showcmds [<Boolean>]]
gam csv <CSVLoopContent> [warnifnodata]
[columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>] [fields <FieldNameList>]
(matchfield|skipfield <FieldName> <RegularExpression>)* [showcmds [<Boolean>]]
(matchfield|skipfield <FieldName> <REMatchPattern>)* [showcmds [<Boolean>]]
[skiprows <Integer>] [maxrows <Integer>]
gam <GAMArgumentList>
gam loop <CSVLoopContent> [warnifnodata]
[columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>] [fields <FieldNameList>]
(matchfield|skipfield <FieldName> <RegularExpression>)* [showcmds [<Boolean>]]
(matchfield|skipfield <FieldName> <REMatchPattern>)* [showcmds [<Boolean>]]
[skiprows <Integer>] [maxrows <Integer>]
gam <GAMArgumentList>
@ -1506,7 +1514,7 @@ gam print alias|aliases [todrive <ToDriveAttribute>*]
[limittoou <OrgUnitItem>])
[user|users <EmailAddressList>] [group|groups <EmailAddressList>]
[select <UserTypeEntity>]
[aliasmatchpattern <RegularExpression>]
[aliasmatchpattern <REMatchPattern>]
[shownoneditable] [nogroups] [nousers]
[onerowpertarget] [delimiter <Character>]
[suppressnoaliasrows]
@ -1622,20 +1630,20 @@ gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*]
(matchfield attendeesonlydomainlist <DomainNameList>)|
(matchfield attendeesdomainlist <DomainNameList>)|
(matchfield attendeesnotdomainlist <DomainNameList>)|
(matchfield attendeespattern <RegularExpression>)|
(matchfield attendeespattern <RESearchPattern>)|
(matchfield attendeesstatus [<AttendeeAttendance>] [<AttendeeStatus>] <EmailAddressEntity>)|
(matchfield creatoremail <RegularExpression>)|
(matchfield creatorname <RegularExpression>)|
(matchfield description <RegularExpression>)|
(matchfield hangoutlink <RegularExpression>)|
(matchfield location <RegularExpression>)|
(matchfield organizeremail <RegularExpression>)|
(matchfield organizername <RegularExpression>)|
(matchfield creatoremail <RESearchPattern>)|
(matchfield creatorname <RESearchPattern>)|
(matchfield description <RESearchPattern>)|
(matchfield hangoutlink <RESearchPattern>)|
(matchfield location <RESearchPattern>)|
(matchfield organizeremail <RESearchPattern>)|
(matchfield organizername <RESearchPattern>)|
(matchfield organizerself <Boolean>)|
(matchfield status <RegularExpression>)|
(matchfield summary <RegularExpression>)|
(matchfield transparency <RegularExpression>)|
(matchfield visibility <RegularExpression>)
(matchfield status <RESearchPattern>)|
(matchfield summary <RESearchPattern>)|
(matchfield transparency <RESearchPattern>)|
(matchfield visibility <RESearchPattern>)
<EventIDEntity> ::=
(id|eventid <EventId>) |
@ -1713,7 +1721,7 @@ The following attributes are equivalent:
(clearsharedproperty <PropertyKey>)|
(removeattendee <EmailAddress>)|
(removeresource <ResourceID>)|
(replacedescription <RegularExpression> <String>)|
(replacedescription <REMatchPattern> <RESubstitution>)|
(selectremoveattendees <UserTypeEntity>)
<EventNotificationAttribute> ::=
@ -1903,7 +1911,7 @@ gam calendar|calendars <CalendarEntity> modify <CalendarSettings>+
<ChatContent> ::=
((text <String>)|
(textfile <FileName> [charset <CharSet>])|
(textfile <FileName> [charset <Charset>])|
(gdoc <UserGoogleDoc>)|
(gcsdoc <StorageBucketObjectName>))
@ -3142,7 +3150,7 @@ gam info courses <CourseEntity> [owneraccess]
[formatjson]
gam print courses [todrive <ToDriveAttribute>*]
(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] [states <CourseStateList>])
[owneremail] [owneremailmatchpattern <RegularExpression>]
[owneremail] [owneremailmatchpattern <REMatchPattern>]
[alias|aliases|aliasesincolumns [delimiter <Character>]]
[show all|students|teachers] [countsonly]
[timefilter creationtime|updatetime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
@ -3469,14 +3477,14 @@ gam show domainaliases|aliasdomains
<ContactSelection> ::=
[query <QueryContact>]
[emailmatchpattern <RegularExpression> [emailmatchtype work|home|other|<String>]]
[emailmatchpattern <REMatchPattern> [emailmatchtype work|home|other|<String>]]
[updated_min <Date>]
gam create contact <ContactAttribute>+
[(csv [todrive <ToDriveAttribute>*] (addcsvdata <FieldName> <String>)*))| returnidonly]
gam update contacts <ContactEntity>|<ContactSelection> <ContactAttribute>+
gam clear contacts <ContactEntity>|<ContactSelection>
[emailclearpattern <RegularExpression>] [emailcleartype work|home|other|<String>]
[emailclearpattern <REMatchPattern>] [emailcleartype work|home|other|<String>]
[delete_cleared_contacts_with_no_emails]
gam dedup contacts <ContactEntity>|<ContactSelection> [matchType [<Boolean>]]
gam delete contacts <ContactEntity>|<ContactSelection>
@ -3753,7 +3761,7 @@ gam update group|groups <GroupEntity> update [<GroupRole>]
gam update group|groups <GroupEntity> clear [member] [manager] [owner]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[emailclearpattern|emailretainpattern <RegularExpression>]
[emailclearpattern|emailretainpattern <REMatchPattern>]
[removedomainnostatusmembers]
[preview] [actioncsv]
gam delete group|groups <GroupEntity> [noactionifalias]
@ -3842,14 +3850,14 @@ gam info group|groups <GroupEntity>
[internal] [internaldomains <DomainNameList>] [external]
[notsuspended|suspended] [notarchived|archived]
[types <GroupMemberTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
[memberemaildisplaypattern|memberemailskippattern <REMatchPattern>]
[formatjson]
gam print groups [todrive <ToDriveAttribute>*]
[([domain|domains <DomainNameEntity>] ([member|showownedby <EmailItem>]|[(query <QueryGroup>)|(queries <QueryGroupList>)]))|
(group|group_ns|group_susp <GroupItem>)|
(select <GroupEntity>)]
[emailmatchpattern [not] <RegularExpression>] [namematchpattern [not] <RegularExpression>]
[descriptionmatchpattern [not] <RegularExpression>] (matchsetting [not] <GroupAttribute>)*
[emailmatchpattern [not] <REMatchPattern>] [namematchpattern [not] <REMatchPattern>]
[descriptionmatchpattern [not] <REMatchPattern>] (matchsetting [not] <GroupAttribute>)*
[admincreatedmatch <Boolean>]
[maxresults <Number>]
[allfields|([basic] [settings] <GroupFieldName>* [fields <GroupFieldNameList>])]
@ -3861,7 +3869,7 @@ gam print groups [todrive <ToDriveAttribute>*]
[includederivedmembership]
[notsuspended|suspended] [notarchived|archived]
[types <GroupMemberTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
[memberemaildisplaypattern|memberemailskippattern <REMatchPattern>]
[convertcrnl] [delimiter <Character>] [sortheaders]
[formatjson [quotechar <Character>]]
[showitemcountonly]
@ -3889,8 +3897,8 @@ gam print group-members [todrive <ToDriveAttribute>*]
[([domain|domains <DomainNameEntity>] ([member|showownedby <EmailItem>]|[(query <QueryGroup>)|(queries <QueryGroupList>)]))|
(group|group_ns|group_susp <GroupItem>)|
(select <GroupEntity>)]
[emailmatchpattern [not] <RegularExpression>] [namematchpattern [not] <RegularExpression>]
[descriptionmatchpattern [not] <RegularExpression>]
[emailmatchpattern [not] <REMatchPattern>] [namematchpattern [not] <REMatchPattern>]
[descriptionmatchpattern [not] <REMatchPattern>]
[admincreatedmatch <Boolean>]
[roles <GroupRoleList>] [members] [managers] [owners]
[internal] [internaldomains <DomainNameList>] [external]
@ -3898,7 +3906,7 @@ gam print group-members [todrive <ToDriveAttribute>*]
<MembersFieldName>* [fields <MembersFieldNameList>]
[notsuspended|suspended] [notarchived|archived]
[types <GroupMemberTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
[memberemaildisplaypattern|memberemailskippattern <REMatchPattern>]
[userfields <UserFieldNameList>]
[allschemas|(schemas|custom|customschemas <SchemaNameList>)]
[(recursive [noduplicates])|includederivedmembership] [nogroupemail]
@ -3909,18 +3917,22 @@ gam print group-members [todrive <ToDriveAttribute>*]
[([domain|domains <DomainNameEntity>] ([member|showownedby <EmailItem>]|[(query <QueryGroup>)|(queries <QueryGroupList>)]))|
(group|group_ns|group_susp <GroupItem>)|
(select <GroupEntity>)]
[emailmatchpattern [not] <RegularExpression>] [namematchpattern [not] <RegularExpression>]
[descriptionmatchpattern [not] <RegularExpression>]
[emailmatchpattern [not] <REMatchPattern>] [namematchpattern [not] <REMatchPattern>]
[descriptionmatchpattern [not] <REMatchPattern>]
[admincreatedmatch <Boolean>]
[roles <GroupRoleList>] [members] [managers] [owners] [depth <Number>]
[internal] [internaldomains <DomainNameList>] [external]
[notsuspended|suspended] [notarchived|archived]
[types <GroupMemberTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
[memberemaildisplaypattern|memberemailskippattern <REMatchPattern>]
[includederivedmembership]
# Cloud Identity Groups
<CBCMBrowser> ::= id:cbcm-browser.<DeviceId>
<ChromeOSDevice> ::= id:chrome-os-device.<DeviceId>
<BrowserDeviceList> ::= "(<CBCMBrowser>|<ChromeOSDevice>)(,(<CBCMBrowser>|<ChromeOSDevice>))*"
<CIGroupFieldsName> ::=
additionalgroupkeys|
createtime|
@ -3950,12 +3962,12 @@ gam update cigroups <GroupEntity> create|add [<GroupRole>]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[expire|expires <Time>] [preview] [actioncsv]
<UserTypeEntity>
<UserTypeEntity>|<BrowserDeviceList>
gam update cigroups <GroupEntity> delete|remove [<GroupRole>]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[preview] [actioncsv]
<UserTypeEntity>
<UserTypeEntity>|<BrowserDeviceList>
gam update cigroups <GroupEntity> sync [<GroupRole>|ignorerole]
[usersonly|groupsonly] [addonly|removeonly]
[notsuspended|suspended] [notarchived|archived]
@ -3968,7 +3980,7 @@ gam update cigroups <GroupEntity> update [<GroupRole>]
<UserTypeEntity>
gam update cigroups <GroupEntity> clear [member] [manager] [owner]
[usersonly|groupsonly]
[emailclearpattern|emailretainpattern <RegularExpression>]
[emailclearpattern|emailretainpattern <REMatchPattern>]
[preview] [actioncsv]
gam delete cigroups <GroupEntity>
@ -3979,19 +3991,19 @@ gam info cigroups <GroupEntity>
[roles <GroupRoleList>] [members] [managers] [owners]
[internal] [internaldomains <DomainNameList>] [external]
[types <CIGroupMemberTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
[memberemaildisplaypattern|memberemailskippattern <REMatchPattern>]
[formatjson]
gam print cigroups [todrive <ToDriveAttribute>*]
[(cimember|ciowner <UserItem>)|(select <GroupEntity>)|(query <String>)]
[showownedby <UserItem>]
[emailmatchpattern [not] <RegularExpression>] [namematchpattern [not] <RegularExpression>]
[descriptionmatchpattern [not] <RegularExpression>]
[emailmatchpattern [not] <REMatchPattern>] [namematchpattern [not] <REMatchPattern>]
[descriptionmatchpattern [not] <REMatchPattern>]
[basic|allfields|(<CIGroupFieldName>* [fields <CIGroupFieldNameList>])]
[roles <GroupRoleList>] [memberrestrictions]
[members|memberscount] [managers|managerscount] [owners|ownerscount] [totalcount] [countsonly]
[internal] [internaldomains <DomainNameList>] [external]
[types <CIGroupMemberTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
[memberemaildisplaypattern|memberemailskippattern <REMatchPattern>]
[convertcrnl] [delimiter <Character>]
[formatjson [quotechar <Character>]]
[showitemcountonly]
@ -4013,11 +4025,11 @@ gam info cimember <UserTypeEntity> <GroupEntity>
gam print cigroup-members [todrive <ToDriveAttribute>*]
[(cimember|ciowner <UserItem>)|(cigroup <GroupItem>)|(select <GroupEntity>)]
[showownedby <UserItem>]
[emailmatchpattern [not] <RegularExpression>] [namematchpattern [not] <RegularExpression>]
[descriptionmatchpattern [not] <RegularExpression>]
[emailmatchpattern [not] <REMatchPattern>] [namematchpattern [not] <REMatchPattern>]
[descriptionmatchpattern [not] <REMatchPattern>]
[roles <GroupRoleList>] [members] [managers] [owners]
[types <CIGroupMemberTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
[memberemaildisplaypattern|memberemailskippattern <REMatchPattern>]
<CIGroupMembersFieldName>* [fields <CIGroupMembersFieldNameList>]
[minimal|basic|full]
[(recursive [noduplicates]) | includederivedmembership] [nogroupemail]
@ -4025,11 +4037,11 @@ gam print cigroup-members [todrive <ToDriveAttribute>*]
gam show cigroup-members
[(cimember|ciowner <UserItem>)|(cigroup <GroupItem>)|(select <GroupEntity>)]
[showownedby <UserItem>]
[emailmatchpattern [not] <RegularExpression>] [namematchpattern [not] <RegularExpression>]
[descriptionmatchpattern [not] <RegularExpression>]
[emailmatchpattern [not] <REMatchPattern>] [namematchpattern [not] <REMatchPattern>]
[descriptionmatchpattern [not] <REMatchPattern>]
[roles <GroupRoleList>] [members] [managers] [owners]
[types <CIGroupMemberTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
[memberemaildisplaypattern|memberemailskippattern <REMatchPattern>]
[minimal|basic|full]
[(depth <Number>) | includederivedmembership]
@ -4164,11 +4176,11 @@ gam info policies <CIPolicyNameEntity>
[formatjson]
gam print policies [todrive <ToDriveAttribute>*]
[filter <String>] [nowarnings] [noappnames]
[group <RegularExpression>] [ou|org|orgunit <RegularExpression>]
[group <REMatchPattern>] [ou|org|orgunit <REMatchPattern>]
[formatjson [quotechar <Character>]]
gam show policies
[filter <String>] [nowarnings] [noappnames]
[group <RegularExpression>] [ou|org|orgunit <RegularExpression>]
[group <REMatchPattern>] [ou|org|orgunit <REMatchPattern>]
[formatjson]
# Inbound SSO
@ -4726,8 +4738,10 @@ gam sendemail [recipient|to] <RecipientEntity>
[from <EmailAddress>] [mailbox <EmailAddress>] [replyto <EmailAddress>]
[cc <RecipientEntity>] [bcc <RecipientEntity>] [singlemessage]
[subject <String>]
[<MessageContent>] (replace <Tag> <String>)*
[html [<Boolean>]] (attach <FileName> [charset <CharSet>])*
[<MessageContent>]
(replace <Tag> <String>)*
(replaceregex <RESearchPattern> <RESubstitution> <Tag> <String>)*
[html [<Boolean>]] (attach <FileName> [charset <Charset>])*
(embedimage <FileName> <String>)*
[newuser <EmailAddress> firstname|givenname <String> lastname|familyname <string> password <Password>]
(<SMTPDateHeader> <Time>)* (<SMTPHeader> <String>)* (header <String> <String>)*
@ -4735,8 +4749,10 @@ gam <UserTypeEntity> sendemail recipient|to <RecipientEntity>
[replyto <EmailAddress>]
[cc <RecipientEntity>] [bcc <RecipientEntity>] [singlemessage]
[subject <String>]
[<MessageContent>] (replace <Tag> <String>)*
[html [<Boolean>]] (attach <FileName> [charset <CharSet>])*
[<MessageContent>]
(replace <Tag> <String>)*
(replaceregex <RESearchPattern> <RESubstitution> <Tag> <String>)*
[html [<Boolean>]] (attach <FileName> [charset <Charset>])*
(embedimage <FileName> <String>)*
[newuser <EmailAddress> firstname|givenname <String> lastname|familyname <string> password <Password>]
(<SMTPDateHeader> <Time>)* (<SMTPHeader> <String>)* (header <String> <String>)*
@ -4744,8 +4760,10 @@ gam <UserTypeEntity> sendemail from <EmailAddress>
[replyto <EmailAddress>]
[cc <RecipientEntity>] [bcc <RecipientEntity>] [singlemessage]
[subject <String>]
[<MessageContent>] (replace <Tag> <String>)*
[html [<Boolean>]] (attach <FileName> [charset <CharSet>])*
[<MessageContent>]
(replace <Tag> <String>)*
(replaceregex <RESearchPattern> <RESubstitution> <Tag> <String>)*
[html [<Boolean>]] (attach <FileName> [charset <Charset>])*
(embedimage <FileName> <String>)*
[newuser <EmailAddress> firstname|givenname <String> lastname|familyname <string> password <Password>]
(<SMTPDateHeader> <Time>)* (<SMTPHeader> <String>)* (header <String> <String>)*
@ -4806,12 +4824,12 @@ gam show shareddriveinfo <SharedDriveEntity>
[formatjson]
gam print shareddrives [todrive <ToDriveAttribute>*]
[teamdriveadminquery|query <QueryTeamDrive>]
[matchname <RegularExpression>] [orgunit|org|ou <OrgUnitPath>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
[fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
[formatjson [quotechar <Character>]]
gam show shareddrives
[teamdriveadminquery|query <QueryTeamDrive>]
[matchname <RegularExpression>] [orgunit|org|ou <OrgUnitPath>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
[fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
[formatjson] [noorgunits [<Boolean>]]
@ -4845,13 +4863,13 @@ gam <UserTypeEntity> show shareddriveinfo <SharedDriveEntity>
[formatjson]
gam <UserTypeEntity> print shareddrives [todrive <ToDriveAttribute>*]
adminaccess [teamdriveadminquery|query <QueryTeamDrive>]
[matchname <RegularExpression>] [orgunit|org|ou <OrgUnitPath>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
(role|roles <SharedDriveACLRoleList>)*
[fields <SharedDriveFieldNameList>]
[formatjson [quotechar <Character>]]
gam <UserTypeEntity> show shareddrives
adminaccess [teamdriveadminquery|query <QueryTeamDrive>]
[matchname <RegularExpression>] [orgunit|org|ou <OrgUnitPath>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
(role|roles <SharedDriveACLRoleList>)*
[fields <SharedDriveFieldNameList>]
[formatjson]
@ -4879,13 +4897,13 @@ gam <UserTypeEntity> show shareddriveinfo <SharedDriveEntity>
[guiroles [<Boolean>]] [formatjson]
gam <UserTypeEntity> print shareddrives [todrive <ToDriveAttribute>*]
[teamdriveadminquery|query <QueryTeamDrive>]
[matchname <RegularExpression>] [orgunit|org|ou <OrgUnitPath>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
(role|roles <SharedDriveACLRoleList>)*
[fields <SharedDriveFieldNameList>]
[guiroles [<Boolean>]] [formatjson [quotechar <Character>]]
gam <UserTypeEntity> show shareddrives
[teamdriveadminquery|query <QueryTeamDrive>]
[matchname <RegularExpression>] [orgunit|org|ou <OrgUnitPath>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
(role|roles <SharedDriveACLRoleList>)*
[fields <SharedDriveFieldNameList>]
[guiroles [<Boolean>]] [formatjson]
@ -5028,7 +5046,7 @@ gam sync teamdriveacls <SharedDriveEntity> with <SharedDriveEntity>
gam print teamdriveacls [todrive <ToDriveAttribute>*]
[teamdriveadminquery|query <QueryTeamDrive>]
[matchname <RegularExpression>] [orgunit|org|ou <OrgUnitPath>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
[user|group <EmailAddress> [checkgroups]] (role|roles <SharedDriveACLRoleList>)*
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields <DrivePermissionsFieldNameList>)]
@ -5036,7 +5054,7 @@ gam print teamdriveacls [todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]]
gam show teamdriveacls
[teamdriveadminquery|query <QueryTeamDrive>]
[matchname <RegularExpression>] [orgunit|org|ou <OrgUnitPath>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
[user|group <EmailAddress> [checkgroups]] (role|roles <SharedDriveACLRoleList>)*
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields <DrivePermissionsFieldNameList>)]
@ -5057,7 +5075,7 @@ gam <UserTypeEntity> sync teamdriveacls <SharedDriveEntity> with <SharedDriveEnt
gam <UserTypeEntity> print teamdriveacls [todrive <ToDriveAttribute>*]
[adminaccess|asadmin] [teamdriveadminquery|query <QueryTeamDrive>]
[matchname <RegularExpression>] [orgunit|org|ou <OrgUnitPath>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
[user|group <EmailAddress> [checkgroups]] (role|roles <SharedDriveACLRoleList>)*
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields <DrivePermissionsFieldNameList>)]
@ -5066,7 +5084,7 @@ gam <UserTypeEntity> print teamdriveacls [todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]]
gam <UserTypeEntity> show teamdriveacls
[adminaccess|asadmin] [teamdriveadminquery|query <QueryTeamDrive>]
[matchname <RegularExpression>] [orgunit|org|ou <OrgUnitPath>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
[user|group <EmailAddress> [checkgroups]] (role|roles <SharedDriveACLRoleList>)*
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields <DrivePermissionsFieldNameList>)]
@ -5266,19 +5284,19 @@ gam delete vaultexport|export <ExportItem> matter <MatterItem>
gam delete vaultexport|export <MatterItem> <ExportItem>
gam download vaultexport|export <ExportItem> matter <MatterItem>
[targetfolder <FilePath>] [targetname <FileName>] [noverify] [noextract] [ziptostdout]
[bucketmatchpattern <RegularExpression>] [objectmatchpattern <RegularExpression>]
[bucketmatchpattern <REMatchPattern>] [objectmatchpattern <REMatchPattern>]
[downloadattempts <Integer>] [retryinterval <Integer>]
gam download vaultexport|export <MatterItem> <ExportItem>
[targetfolder <FilePath>] [targetname <FileName>] [noverify] [noextract] [ziptostdout]
[bucketmatchpattern <RegularExpression>] [objectmatchpattern <RegularExpression>]
[bucketmatchpattern <REMatchPattern>] [objectmatchpattern <REMatchPattern>]
[downloadattempts <Integer>] [retryinterval <Integer>]
gam copy vaultexport|export <ExportItem> matter <MatterItem>
[targetbucket <String>] [targetprefix <String>]
[bucketmatchpattern <RegularExpression>] [objectmatchpattern <RegularExpression>]
[bucketmatchpattern <REMatchPattern>] [objectmatchpattern <REMatchPattern>]
[copyattempts <Integer>] [retryinterval <Integer>]
gam copy vaultexport|export <MatterItem> <ExportItem>
[targetbucket <String>] [targetprefix <String>]
[bucketmatchpattern <RegularExpression>] [objectmatchpattern <RegularExpression>]
[bucketmatchpattern <REMatchPattern>] [objectmatchpattern <REMatchPattern>]
[copyattempts <Integer>] [retryinterval <Integer>]
<VaultExportFieldName> ::=
@ -5551,7 +5569,9 @@ gam create|add user <EmailAddress> [ignorenullpassword] <UserAttribute>*
[mailbox <EmailAaddress>]
[replyto <EmailAaddress>]
[<NotifyMessageContent>]
(replace <Tag> <UserReplacement>)*]
(replace <Tag> <UserReplacement>)*
(replaceregex <RESearchPattern> <RESubstitution> <Tag> <UserReplacement>)*
]
[logpassword <FileName>]
[addnumericsuffixonduplicate <Number>]
@ -5559,8 +5579,8 @@ gam <UserTypeEntity> waitformailbox [retries <Number>]
gam update user <UserItem> [ignorenullpassword] <UserAttribute>*
[verifynotinvitable|alwaysevict] [noactionifalias]
[updateprimaryemail <RegularExpression> <EmailReplacement>]
[updateoufromgroup <FileName> [charset <CharSet>]
[updateprimaryemail <RESearchPattern> <RESubstitution>]
[updateoufromgroup <FileName> [charset <Charset>]
[columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>]
[fields <FieldNameList>] [keyfield <FieldName>] [datafield <FieldName>]]
[immutableous <OrgUnitEntity>]|
@ -5572,10 +5592,12 @@ gam update user <UserItem> [ignorenullpassword] <UserAttribute>*
[subject <String>]
[notifypassword <String>]
[from <EmailAaddress>]
[mailbox <EmailAaddress>]
[replyto <EmailAaddress>]
[mailbox <EmailAddress>]
[replyto <EmailAddress>]
[<NotifyMessageContent>]
(replace <Tag> <UserReplacement>)*]
(replace <Tag> <UserReplacement>)*
(replaceregex <RESearchPattern> <RESubstitution> <Tag> <UserReplacement>)*
]
[notifyonupdate [<Boolean>]] [setchangepasswordoncreate [<Boolean>]]
[logpassword <FileName>]
gam delete user <UserItem> [noactionifalias]
@ -5594,9 +5616,9 @@ gam info user [<UserItem>]
[formatjson]
gam update users <UserTypeEntity> [ignorenullpassword] <UserAttribute>*
[verifynotinvitable] [noactionifalias]
[updateprimaryemail <RegularExpression> <EmailReplacement>]
[updateoufromgroup <FileName> [charset <CharSet>]
[verifynotinvitable|alwaysevict] [noactionifalias]
[updateprimaryemail <RESearchPattern> <RESubstitution>]
[updateoufromgroup <FileName> [charset <Charset>]
[columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>]
[fields <FieldNameList>] [keyfield <FieldName>] [datafield <FieldName>]]
[clearschema <SchemaName>|<SchemaNameField>]
@ -5606,13 +5628,15 @@ gam update users <UserTypeEntity> [ignorenullpassword] <UserAttribute>*
[notify <EmailAddressList>
[subject <String>]
[notifypassword <String>]
[from <EmailAaddress>]
[mailbox <EmailAaddress>]
[from <EmailAddress>]
[mailbox <EmailAddress>]
[replyto <EmailAaddress>]
[<NotifyMessageContent>]
(replace <Tag> <UserReplacement>)*]
(replace <Tag> <UserReplacement>)*
(replaceregex <RESearchPattern> <RESubstitution> <Tag> <UserReplacement>)*
]
[notifyonupdate [<Boolean>]] [setchangepasswordoncreate [<Boolean>]]
[logpassword <FileName>]
[verifynotinvitable]
gam delete users <UserTypeEntity> [noactionifalias]
gam undelete users <UserEntity> [ou|org|orgunit <OrgUnitPath>]
gam suspend users <UserTypeEntity> [noactionifalias]
@ -5629,9 +5653,11 @@ gam info users <UserTypeEntity>
[formatjson]
gam <UserTypeEntity> update users [ignorenullpassword] <UserAttribute>*
[verifynotinvitable] [noactionifalias]
[updateprimaryemail <RegularExpression> <EmailReplacement>]
[updateoufromgroup <CSVFileInput> [keyfield <FieldName>] [datafield <FieldName>]]
[verifynotinvitable|alwaysevict] [noactionifalias]
[updateprimaryemail <RESearchPattern> <RESubstitution>]
[updateoufromgroup <FileName> [charset <Charset>]
[columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>]
[fields <FieldNameList>] [keyfield <FieldName>] [datafield <FieldName>]]
[clearschema <SchemaName>|<SchemaNameField>]
[createifnotfound] [notfoundpassword (random [<Integer>])|blocklogin|<Password>]
(groups [<GroupRole>] [[delivery] <DeliverySetting>] <GroupEntity>)*
@ -5640,12 +5666,14 @@ gam <UserTypeEntity> update users [ignorenullpassword] <UserAttribute>*
[subject <String>]
[notifypassword <String>]
[from <EmailAaddress>]
[mailbox <EmailAaddress>]
[mailbox <EmailAddress>]
[replyto <EmailAddress>]
[<NotifyMessageContent>]
(replace <Tag> <UserReplacement>)*]
(replace <Tag> <UserReplacement>)*
(replaceregex <RESearchPattern> <RESubstitution> <Tag> <UserReplacement>)*
]
[notifyonupdate [<Boolean>]] [setchangepasswordoncreate [<Boolean>]]
[logpassword <FileName>]
[verifynotinvitable]
gam <UserTypeEntity> delete users [noactionifalias]
gam <UserEntity> undelete users [ou|org|orgunit <OrgUnitPath>]
gam <UserTypeEntity> suspend users [noactionifalias]
@ -5679,7 +5707,7 @@ gam print users [todrive <ToDriveAttribute>*]
[userview] [basic|full|allfields|(<UserFieldName>*|fields <UserFieldNameList>)]
[delimiter <Character>] [sortheaders [<Boolean>]] [scalarsfirst [<Boolean>]]
[formatjson [quotechar <Character>]] [quoteplusphonenumbers]
[issuspended <Boolean>] [aliasmatchpattern <RegularExpression>]
[issuspended <Boolean>] [aliasmatchpattern <REMatchPattern>]
[showvalidcolumn] (addcsvdata <FieldName> <String>)*
[showitemcountonly]
@ -5696,7 +5724,7 @@ gam print users [todrive <ToDriveAttribute>*] select <UserTypeEntity>
[userview] [basic|full|allfields|(<UserFieldName>*|fields <UserFieldNameList>)]
[delimiter <Character>] [sortheaders [<Boolean>]] [scalarsfirst [<Boolean>]]
[formatjson [quotechar <Character>]] [quoteplusphonenumbers]
[issuspended <Boolean>] [aliasmatchpattern <RegularExpression>]
[issuspended <Boolean>] [aliasmatchpattern <REMatchPattern>]
[showvalidcolumn] (addcsvdata <FieldName> <String>)*
[showitemcountonly]
@ -5711,7 +5739,7 @@ gam <UserTypeEntity> print users [todrive <ToDriveAttribute>*]
[userview] [basic|full|allfields|(<UserFieldName>*|fields <UserFieldNameList>)]
[delimiter <Character>] [sortheaders [<Boolean>]] [scalarsfirst [<Boolean>]]
[formatjson [quotechar <Character>]] [quoteplusphonenumbers]
[issuspended <Boolean>] [aliasmatchpattern <RegularExpression>]
[issuspended <Boolean>] [aliasmatchpattern <REMatchPattern>]
[showvalidcolumn] (addcsvdata <FieldName> <String>)*
[showitemcountonly]
@ -5950,19 +5978,19 @@ gam <UserTypeEntity> transfer calendars|seccals <UserItem> [<UserCalendarEntity>
<EventMatchProperty> ::=
(matchfield attendees <EmailAddressEntity>)|
(matchfield attendeespattern <RegularExpression>)|
(matchfield attendeespattern <RESearchPattern>)|
(matchfield attendeesstatus [<AttendeeAttendance>] [<AttendeeStatus>] <EmailAddressEntity>)|
(matchfield creatoremail <RegularExpression>)|
(matchfield creatorname <RegularExpression>)|
(matchfield description <RegularExpression>)|
(matchfield hangoutlink <RegularExpression>)|
(matchfield location <RegularExpression>)|
(matchfield organizeremail <RegularExpression>)|
(matchfield organizername <RegularExpression>)|
(matchfield status <RegularExpression>)|
(matchfield summary <RegularExpression>)|
(matchfield transparency <RegularExpression>)|
(matchfield visibility <RegularExpression>)
(matchfield creatoremail <RESearchPattern>)|
(matchfield creatorname <RESearchPattern>)|
(matchfield description <RESearchPattern>)|
(matchfield hangoutlink <RESearchPattern>)|
(matchfield location <RESearchPattern>)|
(matchfield organizeremail <RESearchPattern>)|
(matchfield organizername <RESearchPattern>)|
(matchfield status <RESearchPattern>)|
(matchfield summary <RESearchPattern>)|
(matchfield transparency <RESearchPattern>)|
(matchfield visibility <RESearchPattern>)
<EventIDEntity> ::=
(id|eventid <EventId>) |
@ -6039,7 +6067,7 @@ The following attributes are equivalent:
(clearprivateproperty <PropertyKey>)|
(clearsharedproperty <PropertyKey>)|
(removeattendee <EmailAddress>)|
(replacedescription <RegularExpression> <String>)|
(replacedescription <REMatchPattern> <RESubstitution>)|
(selectremoveattendees <UserTypeEntity>)
<EventNotificationAttribute> ::=
@ -6156,7 +6184,7 @@ gam <UserTypeEntity> print focustime|outofoffice|workinglocation
<ChatContent> ::=
((text <String>)|
(textfile <FileName> [charset <CharSet>])|
(textfile <FileName> [charset <Charset>])|
(gdoc <UserGoogleDoc>)|
(gcsdoc <StorageBucketObjectName>))
@ -6492,7 +6520,7 @@ gam <UserTypeEntity> print chatevents [todrive <ToDriveAttribute>*]
gam <UserTypeEntity> create|add drivefile
[(localfile <FileName>|-)|(url <URL>)]
[(drivefilename|newfilename <DriveFileName>) | (replacefilename <RegularExpression> <String>)*]
[(drivefilename|newfilename <DriveFileName>) | (replacefilename <REMatchPattern> <RESubstitution>)*]
[stripnameprefix <String>] [noduplicate]
[timestamp [<Boolean>]] [timeformat <String>]
<DriveFileCreateAttribute>*
@ -6513,12 +6541,12 @@ gam <UserTypeEntity> create|add drivefile
gam <UserTypeEntity> update drivefile <DriveFileEntity> [copy] [returnidonly|returnlinkonly]
[(localfile <FileName>|-)|(url <URL>)]
[retainname | (newfilename <DriveFileName>) | (replacefilename <RegularExpression> <String>)*]
[retainname | (newfilename <DriveFileName>) | (replacefilename <REMatchPattern> <RESubstitution>)*]
[stripnameprefix <String>]
[timestamp [<Boolean>]] [timeformat <String>]
<DriveFileUpdateAttribute>*
[(gsheet|csvsheet <SheetEntity> [clearfilter])|(addsheet <String>)]
[charset <CharSet>] [columndelimiter <Character>]
[charset <Charset>] [columndelimiter <Character>]
<DriveFileCopyAttribute> ::=
(contentrestrictions (readonly false)|(readonly true [reason <String>]) [ownerrestricted [<Boolean>]])|
@ -6537,7 +6565,7 @@ gam <UserTypeEntity> update drivefile <DriveFileEntity> [copy] [returnidonly|ret
(writerscanshare|writerscantshare [<Boolean>])
gam <UserTypeEntity> copy drivefile <DriveFileEntity>
[newfilename <DriveFileName>] (replacefilename <RegularExpression> <String>)*
[newfilename <DriveFileName>] (replacefilename <REMatchPattern> <RESubstitution>)*
[stripnameprefix <String>]
[excludetrashed]
[(csv [todrive <ToDriveAttribute>*] (addcsvdata <FieldName> <String>)*) |
@ -6547,11 +6575,11 @@ gam <UserTypeEntity> copy drivefile <DriveFileEntity>
[mergewithparent [<Boolean>]] [recursive [depth <Number>]]
<DriveFileCopyAttribute>*
[skipids <DriveFileEntity>]
[copysubfiles [<Boolean>]] [filenamematchpattern <RegularExpression>]
[copysubfiles [<Boolean>]] [filenamematchpattern <REMatchPattern>]
[filemimetype [not] <MimeTypeList>]
[copysubfilesownedby any|me|others]
[copysubfolders [<Boolean>]] [foldernamematchpattern <RegularExpression>]
[copysubshortcuts [<Boolean>]] [shortcutnamematchpattern <RegularExpression>]
[copysubfolders [<Boolean>]] [foldernamematchpattern <REMatchPattern>]
[copysubshortcuts [<Boolean>]] [shortcutnamematchpattern <REMatchPattern>]
[duplicatefiles overwriteolder|overwriteall|duplicatename|uniquename|skip]
[duplicatefolders merge|duplicatename|uniquename|skip]
[copiedshortcutspointtocopiedfiles [<Boolean>]]
@ -7132,10 +7160,11 @@ gam <UserTypeEntity> print filecounts [todrive <ToDriveAttribute>*]
[anyowner|(showownedby any|me|others)]
[showmimetype [not] <MimeTypeList>] [showmimetype category <MimeTypeNameList>]
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
[filenamematchpattern <RegularExpression>]
[filenamematchpattern <REMatchPattern>]
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
[excludetrashed]
[showsize] [showmimetypesize] [showlastmodification]
[showsize] [showmimetypesize]
[showlastmodification] [pathdelimiter <Character>]
(addcsvdata <FieldName> <String>)*
[summary none|only|plus] [summaryuser <String>]
gam <UserTypeEntity> show filecounts
@ -7147,10 +7176,11 @@ gam <UserTypeEntity> show filecounts
[anyowner|(showownedby any|me|others)]
[showmimetype [not] <MimeTypeList>] [showmimetype category <MimeTypeNameList>]
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
[filenamematchpattern <RegularExpression>]
[filenamematchpattern <REMatchPattern>]
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
[excludetrashed]
[showsize] [showmimetypesize] [showlastmodification]
[showsize] [showmimetypesize]
[showlastmodification] [pathdelimiter <Character>]
[summary none|only|plus] [summaryuser <String>]
gam <UserTypeEntity> print filesharecounts [todrive <ToDriveAttribute>*]
@ -7179,7 +7209,7 @@ gam <UserTypeEntity> print filetree [todrive <ToDriveAttribute>*]
[anyowner|(showownedby any|me|others)]
[showmimetype [not] <MimeTypeList>] [showmimetype category <MimeTypeNameList>]
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
[filenamematchpattern <RegularExpression>]
[filenamematchpattern <REMatchPattern>]
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
[excludetrashed]
[fields <FileTreeFieldNameList>]
@ -7191,7 +7221,7 @@ gam <UserTypeEntity> show filetree
[anyowner|(showownedby any|me|others)]
[showmimetype [not] <MimeTypeList>] [showmimetype category <MimeTypeNameList>]
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
[filenamematchpattern <RegularExpression>]
[filenamematchpattern <REMatchPattern>]
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
[excludetrashed]
[fields <FileTreeFieldNameList>]
@ -7212,7 +7242,7 @@ gam <UserTypeEntity> print filelist [todrive <ToDriveAttribute>*]
[anyowner|(showownedby any|me|others)]
[showmimetype [not] <MimeTypeList>] [showmimetype category <MimeTypeNameList>] [mimetypeinquery [<Boolean>]]
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
[filenamematchpattern <RegularExpression>]
[filenamematchpattern <REMatchPattern>]
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>] [pmfilter] [oneitemperrow]
[excludetrashed]
[maxfiles <Integer>] [nodataheaders <String>]
@ -7280,6 +7310,14 @@ gam <UserTypeEntity> print driveactivity [todrive <ToDriveAttribute>*]
usageindrivetrash
<DriveSettingsFieldNameList> ::= "<DriveSettingsFieldName>(,<DriveSettingsFieldName>)*"
gam <UserTypeEntity> print drivelastmodification [todrive <ToDriveAttribute>*]
[select <SharedDriveEntity>]
[pathdelimiter <Character>]
(addcsvdata <FieldName> <String>)*
gam <UserTypeEntity> show drivelastmodification
[select <SharedDriveEntity>]
[pathdelimiter <Character>]
gam <UserTypeEntity> print drivesettings [todrive <ToDriveAttribute>*]
[allfields|<DriveSettingsFieldName>*|(fields <DriveSettingsFieldNameList>)]
[delimiter <Character>] [showusagebytes]
@ -7408,8 +7446,8 @@ gam <UserTypeEntity> update labelsettings <LabelName> [name <String>]
[messagelistvisibility hide|show] [labellistvisibility hide|show|showifunread]
[backgroundcolor "<LabelColorHex>|<LabelBackgroundColorHex>|custom:<ColorHex>"]
[textcolor "<LabelColorHex>|<LabelTextColorHex>|custom:<ColorHex>"]
gam <UserTypeEntity> update label|labels [search <RegularExpression>] [replace <LabelReplacement>] [merge [keepoldlabel]]
gam <UserTypeEntity> delete label|labels <LabelName>|regex:<RegularExpression>|--ALL_LABELS--
gam <UserTypeEntity> update label|labels [search <REMatchPattern>] [replace <LabelReplacement>] [merge [keepoldlabel]]
gam <UserTypeEntity> delete label|labels <LabelName>|regex:<REMatchPattern>|--ALL_LABELS--
gam <UserTypeEntity> delete labellist <LabelNameEntity>
gam <UserTypeEntity> delete labelid <LabelID>
gam <UserTypeEntity> delete labelidlist <LabelIDEntity>
@ -7523,22 +7561,28 @@ gam <UserTypeEntity> print labels|label [todrive <ToDriveAttribute>*]
(emlfile <FileName> [charset <Charset>])
gam <UserTypeEntity> draft message
<MessageContent> (replace <Tag> <UserReplacement>)*
<MessageContent>
(replace <Tag> <UserReplacement>)*
(replaceregex <RESearchPattern> <RESubstitution> <Tag> <UserReplacement>)*
(<SMTPDateHeader> <Time>)* (<SMTPHeader> <String>)* (header <String> <String>)*
(attach <FileName> [charset <CharSet>])*
(attach <FileName> [charset <Charset>])*
(embedimage <FileName> <String>)*
gam <UserTypeEntity> import message
<MessageContent> (replace <Tag> <UserReplacement>)*
<MessageContent>
(replace <Tag> <UserReplacement>)*
(replaceregex <RESearchPattern> <RESubstitution> <Tag> <UserReplacement>)*
(<SMTPDateHeader> <Time>)* (<SMTPHeader> <String>)* (header <String> <String>)*
(addlabel <LabelName>)* [labels <LabelNameList>]
(attach <FileName> [charset <CharSet>])*
(attach <FileName> [charset <Charset>])*
(embedimage <FileName> <String>)*
[deleted [<Boolean>]] [checkspam|nevermarkspam [<Boolean>]] [processforcalendar [<Boolean>]]
gam <UserTypeEntity> insert message
<MessageContent> (replace <Tag> <UserReplacement>)*
<MessageContent>
(replace <Tag> <UserReplacement>)*
(replaceregex <RESearchPattern> <RESubstitution> <Tag> <UserReplacement>)*
(<SMTPDateHeader> <Time>)* (<SMTPHeader> <String>)* (header <String> <String>)*
(addlabel <LabelName>)* [labels <LabelNameList>]
(attach <FileName> [charset <CharSet>])*
(attach <FileName> [charset <Charset>])*
(embedimage <FileName> <String>)*
[deleted [<Boolean>]]
@ -7587,25 +7631,25 @@ gam <UserTypeEntity> forward thread|thtreads recipient|to <RecipientEntity>
gam <UserTypeEntity> show messages|threads
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])*
[quick|notquick] [max_to_show <Number>] [includespamtrash])|(ids <MessageIDEntity>)
[labelmatchpattern <RegularExpression>] [sendermatchpattern <RegularExpression>]
[labelmatchpattern <REMatchPattern>] [sendermatchpattern <REMatchPattern>]
[countsonly|positivecountsonly] [useronly]
[headers all|<SMTPHeaderList>] [dateheaderformat iso|rfc2822|<String>] [dateheaderconverttimezone [<Boolean>]]
[showlabels] [delimiter <Character>] [showbody] [showhtml] [showdate] [showsize] [showsnippet]
[maxmessagesperthread <Number>]
[[attachmentnamepattern <RegularExpression>]
[[attachmentnamepattern <REMatchPattern>]
[showattachments [noshowtextplain]]
[saveattachments [targetfolder <FilePath>] [overwrite [<Boolean>]]]
[uploadattachments [<DriveFileParentAttribute>]]]
gam <UserTypeEntity> print messages|threads [todrive <ToDriveAttribute>*]
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])*
[quick|notquick] [max_to_print <Number>] [includespamtrash])|(ids <MessageIDEntity>)
[labelmatchpattern <RegularExpression>] [sendermatchpattern <RegularExpression>]
[labelmatchpattern <REMatchPattern>] [sendermatchpattern <REMatchPattern>]
[countsonly|positivecountsonly] [useronly]
[headers all|<SMTPHeaderList>] [dateheaderformat iso|rfc2822|<String> [dateheaderconverttimezone [<Boolean>]]]
[showlabels] [delimiter <Character>] [showbody] [showhtml] [showdate] [showsize] [showsnippet]
[maxmessagesperthread <Number>]
[convertcrnl] [delimiter <Character>]
[[attachmentnamepattern <RegularExpression>]
[[attachmentnamepattern <REMatchPattern>]
[showattachments [noshowtextplain]]]
(addcsvdata <FieldName> <String>)*
@ -7617,13 +7661,17 @@ gam <UserTypeEntity> print gmailprofile [todrive <ToDriveAttribute>*]
# Users - Gmail - Send As/Signature/Vacation
gam <UserTypeEntity> [create|add] sendas <EmailAddress> [name] <String>
[<SendAsContent> (replace <Tag> <UserReplacement>)*]
[<SendAsContent>
(replace <Tag> <UserReplacement>)*
(replaceregex <RESearchPattern> <RESubstitution> <Tag> <UserReplacement>)*]
[html [<Boolean>]] [replyto <EmailAddress>] [default] [treatasalias <Boolean>]
[smtpmsa.host <SMTPHostName> smtpmsa.port 25|465|587
smtpmsa.username <UserName> smtpmsa.password <Password>
[smtpmsa.securitymode none|ssl|starttls]]
gam <UserTypeEntity> update sendas <EmailAddress> [name <String>]
[<SendAsContent> (replace <Tag> <UserReplacement>)*]
[<SendAsContent>
(replace <Tag> <UserReplacement>)*
(replaceregex <RESearchPattern> <RESubstitution> <Tag> <UserReplacement>)*]
[html [<Boolean>]] [replyto <EmailAddress>] [default] [treatasalias <Boolean>]
gam <UserTypeEntity> delete sendas <EmailAddressEntity>
gam <UserTypeEntity> info sendas <EmailAddressEntity> [compact|format|html]
@ -7633,7 +7681,9 @@ gam <UserTypeEntity> print sendas [compact]
[primary|default] [verifyonly] [todrive <ToDriveAttribute>*]
gam <UserTypeEntity> signature|sig
<SignatureContent> (replace <Tag> <UserReplacement>)*
<SignatureContent>
(replace <Tag> <UserReplacement>)*
(replaceregex <RESearchPattern> <RESubstitution> <Tag> <UserReplacement>)*
[html [<Boolean>]] [replyto <EmailAddress>] [default] [treatasalias <Boolean>]
[name <String>]
[primary]
@ -7643,7 +7693,9 @@ gam <UserTypeEntity> print signature [compact]
[primary|default] [verifyonly] [todrive <ToDriveAttribute>*]
gam <UserTypeEntity> vacation [<Boolean>] [subject <String>]
[<VacationMessageContent> (replace <Tag> <UserReplacement>)*]
[<VacationMessageContent>
(replace <Tag> <UserReplacement>)*
(replaceregex <RESearchPattern> <RESubstitution> <Tag> <UserReplacement>)*]
[html [<Boolean>]] [contactsonly [<Boolean>]] [domainonly [<Boolean>]]
[start|startdate <Date>|Started] [end|enddate <Date>|NotSpecified]
gam <UserTypeEntity> show vacation [compact|format|html] [enabledonly]
@ -7722,7 +7774,7 @@ gam <UserTypeEntity> add group|groups
([<GroupRole>] [[delivery] <DeliverySetting>] <GroupEntity>)+
gam <UserTypeEntity> delete group|groups
[(domain <DomainName>)|(customerid <CustomerID>)|
(emailmatchpattern [not] <RegularExpression>)|<GroupEntity>]
(emailmatchpattern [not] <REMatchPattern>)|<GroupEntity>]
gam <UserTypeEntity> update group|groups
[(domain <DomainName>)|(customerid <CustomerID>)]) [<GroupRole>] [[delivery] <DeliverySetting>]
([<GroupRole>] [[delivery] <DeliverySetting>] [<GroupEntity>])*
@ -7770,7 +7822,7 @@ gam <UserTypeEntity> check isinvitable [todrive <ToDriveAttribute>*]
<NoteContent> ::=
((text <String>)|
(textfile <FileName> [charset <CharSet>])|
(textfile <FileName> [charset <Charset>])|
(gdoc <UserGoogleDoc>)|
(gcsdoc <StorageBucketObjectName>)|
<JSONData>)
@ -7995,7 +8047,7 @@ gam <UserItem> print meettranscripts <MeetConferenceName> [todrive <ToDriveAttri
<PeopleUserContactSelection> ::=
[(selectcontactgroup <PeopleContactGroupItem>)|
[query <QueryContact>]]
[emailmatchpattern <RegularExpression> [emailmatchtype work|home|other|<String>]]
[emailmatchpattern <REMatchPattern> [emailmatchtype work|home|other|<String>]]
gam <UserTypeEntity> create contact
[<PeopleContactAttribute>+]
@ -8010,7 +8062,7 @@ gam <UserTypeEntity> delete contacts
gam <UserTypeEntity> clear contacts
<PeopleResourceNameEntity>|<PeopleUserContactSelection>
[emailclearpattern <RegularExpression>] [emailcleartype work|home|other|<String>]
[emailclearpattern <REMatchPattern>] [emailcleartype work|home|other|<String>]
[delete_cleared_contacts_with_no_emails]
gam <UserTypeEntity> dedup contacts
@ -8038,7 +8090,7 @@ gam <UserTypeEntity> info contacts
<PeoplePrintShowUserContactSelection> ::=
[(selectcontactgroup <PeopleContactGroupItem>)|(filtercontactgroup <PeopleContactGroupItem>)|
([query <QueryContact>] [selectmaincontacts|selectothercontacts])]
[emailmatchpattern <RegularExpression> [emailmatchtype work|home|other|<String>]]
[emailmatchpattern <REMatchPattern> [emailmatchtype work|home|other|<String>]]
gam <UserTypeEntity> show contacts
<PeoplePrintShowUserContactSelection>
@ -8061,7 +8113,7 @@ gam <UserTypeEntity> print contacts [todrive <ToDriveAttribute>*]
<OtherContactsSelection> ::=
[query <QueryContact>]
[emailmatchpattern <RegularExpression> [emailmatchtype work|home|other|<String>]]
[emailmatchpattern <REMatchPattern> [emailmatchtype work|home|other|<String>]]
gam <UserTypeEntity> copy othercontacts
<OtherContactsResourceNameEntity>|<OtherContactsSelection>
@ -8271,13 +8323,13 @@ gam <UserTypeEntity> show shareddriveinfo <SharedDriveEntity> [fields <SharedDri
[formatjson]
gam <UserTypeEntity> print shareddrives [todrive <ToDriveAttribute>*]
[adminaccess|asadmin [teamdriveadminquery|query <QueryTeamDrive>]]
[matchname <RegularExpression>] [orgunit|org|ou <OrgUnitPath>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
(role|roles <SharedDriveACLRoleList>)*
[fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
[formatjson [quotechar <Character>]]
gam <UserTypeEntity> show shareddrives
[adminaccess|asadmin [teamdriveadminquery|query <QueryTeamDrive>]]
[matchname <RegularExpression>] [orgunit|org|ou <OrgUnitPath>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
(role|roles <SharedDriveACLRoleList>)*
[fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
[formatjson]

View File

@ -1,3 +1,195 @@
7.06.04
Fixed bug in `gam report <ActivityApplictionName>` where a report with no activities
was not displaying any output.
7.06.03
Fixed bug in `gam <UserTypeEntity> print|show drivelastmodification` that caused a trap
when an empty drive was specified.
7.06.02
Updated `gam <UserTypeEntity> print|show filecounts ... showlastmodification` to include
file mimetype and path information for the last modified file.
Added simple commands to get information about the last modified file on a drive.
By default, a user's My Drive is processed; optionally, a Shared Drive can be processed.
```
gam <UserTypeEntity> print drivelastmodification [todrive <ToDriveAttribute>*]
[select <SharedDriveEntity>]
[pathdelimiter <Character>]
(addcsvdata <FieldName> <String>)*
gam <UserTypeEntity> show drivelastmodification
[select <SharedDriveEntity>]
[pathdelimiter <Character>]
```
7.06.01
Updated `gam <UserTypeEntity> create|update drivefileacl ... expiration <Time>`
to handle additional API errors.
Updated to Python 3.13.3.
7.06.00
Upgraded to OpenSSL 3.5.0.
Fixed bug in `gam print cigroups` where `createTime`, `updateTime` and `statusTime`
were not converted according to `gam.cfg timezone`.
7.05.22
Updated progress messages for `gam <UserTypeEntity> print filelist|filecounts|filesharecounts|filetree select shareddriveid <SharedDriveID>`
to display the ID of the SharedDrive that is being accessed.
```
Getting all Drive Files/Folders for user@domain.com on Shared Drive ID: <SharedDriveID
Got 33 Drive Files/Folders for user@domain.com on Shared Drive ID: <SharedDriveID>...
```
7.05.21
Fixed bug in `gam update chromepolicy` that generated an error like the following
when JSON data was read from a file.
```
ERROR: JSON: {'error': {'code': 400, 'message': 'Invalid enum value: {prefix}{value} for enum type: chrome.policy.api.v1.devicepolicy.AllowNewUsersEnum', 'status': 'INVALID_ARGUMENT'}}
```
Fixed bug in `gam create chromepolicyimage` that caused a trap.
7.05.20
Updated code to validate both `<RegularExpression>` and `<ReplacementString>`
in the following command line options; this will expose errors when the command
is being parsed rather than at run-time.
```
replaceregex <RegularExpression> <ReplacementString>
replacedescription <RegularExpression> <ReplacementString>
replacefilename <RegularExpression> <ReplacementString>
```
7.05.19
Added `replaceregex <RegularExpression> <ReplacementString> <Tag> <String>` to the following commands:
```
gam sendemail subject <String> <MessageContent>
gam <UserTypeEntity> sendemail subject <String> <MessageContent>
```
The `<RegularExpression>` is used as a match pattern against `<String>` to produce `<ReplacementString>`.
Instances of `{Tag}` will be replaced by `<ReplacementString>` in the message subject and body.
Added `replaceregex <RegularExpression> <ReplacementString> <Tag> <UserReplacement>` to the following commands:
```
gam create user <NotifyMessageContent>
gam update user <NotifyMessageContent>
gam update users <NotifyMessageContent>
gam <UserTypeEntity> update users <NotifyMessageContent>
gam <UserTypeEntity> draft message <MessageContent>
gam <UserTypeEntity> import message <MessageContent>
gam <UserTypeEntity> insert messageo <MessageContent>
gam <UserTypeEntity> create sendas <SendAsContent>
gam <UserTypeEntity> update sendas <SendAsContent>
gam <UserTypeEntity> signature <SignatureContent>
gam <UserTypeEntity> vacation subject <String> <VacationMessageContent>
```
The `<RegularExpression>` is used as a match pattern against `<UserReplacement>` to produce `<ReplacementString>`.
Instances of `{Tag}` will be replaced by `<ReplacementString>` in the indicated items.
For example, when adding a phone number to a signature, an unformatted number can be formatted:
```
replaceregex "(\d{3})(\d{3})(\d{4})" "(\1) \2-\3" Phone "9876543210"
replaces 9876543210 with (987) 654-3210
replaceregex "(\+\d{2})(\d{3})(\d{3})(\d{3})" "\1 \2 \3 \4" Phone "+61987654321"
replaces +61421221506 with +61 987 654 321
```
7.05.18
Updated `gam calendars <CalendarEntity> show events` and `gam <UserTypeEntity> show events`
to display the event description according to `show_convert_cr_nl` in `gam.cfg`;
previously, GAM assumed `show_convert_cr_nl = true`.
```
show_convert_cr_nl = false
description:
Line 1
Line 2
Line 3
show_convert_cr_nl = true
description: Line 1\nLine 2\nLine 3\n
```
7.05.17
Updated commands that delete drive ACLs to handle the following error:
```
ERROR: 403: cannotDeletePermission - The authenticated user does not have the required access to delete the permission.
```
7.05.16
Added option `transpose [<Boolean>]` to `redirect csv` that causes
GAM to transpose CSV output rows and columns. This will most useful
when a `countsonly` option is used in a `print` or `report` command.
7.05.15
Updated `gam <UserTypeEntity> get drivefile` and `gam <UserTypeEntity> create drivefile`
to allow downloading and uploading of Google Apps Scripts.
```
$ gam user user1@domain.com get drivefile 1ZY-YkS3E0OKipALra_XzfIh9cvxoILSbb8TRdHBFCpyB_mXI_J8FmjHv format json
User: user1@domain.com, Download 1 Drive File
User: user1@domain.com, Drive File: Test Project, Downloaded to: /Users/gamteam/GamWork/Test Project.json, Type: Google Doc
$ gam user user2@domain.com create drivefile localfile "Test Project.json" mimetype application/vnd.google-apps.script+json drivefilename "Test Project"
User: user2@domain.com, Drive File: Test Project(1Ok_svw55VTreZ5CzcViJDLfEzVRi-Un8D9eG6I5pIeVyRl2YsmNiy3C_), Created with content from: Test Project.json
```
7.05.14
Added the following License SKU:
```
ProductId SKUId Display Name
101039 1010390002 Assured Controls Plus
```
7.05.13
Updated license product names to match Google.
7.05.12
Fixed bug in `gam update chromepolicy` where `appid` was misinterpreted for `chrome.devices.kiosk` policies
and an error was generated.
```
ERROR: Chrome Policy Schema: customers/C123abc456/policySchemas/<Field>, Does not exist
```
7.05.11
Added the following License SKUs:
```
ProductId SKUId Display Name
Google-Apps 1010070001 Google Workspace for Education Fundamentals
Google-Apps 1010070004 Google Workspace for Education Gmail Only
101034 1010340007 Google Workspace for Education Fundamentals - Archived User
```
7.05.10
Updated various chat space commands to handle the following error:
```
ERROR: 503: serviceNotAvailable - The service is currently unavailable
```
7.05.09
Fixed bug in `gam calendars <CalendarEntity> print events matchfield attendeesstatus required accepted resource_calendar@resource.calendar.google.com`
that caused a trap.
7.05.08
Added error message to `gam report` commands to indicate forbidden access;
@ -21,7 +213,7 @@ display a link to the Wiki `Set up a Chat Bot` instructions.
Added options `password prompt` and `password uniqueprompt` to `gam create user <EmailAddress>`
and `gam update users <UserTypeEntity>` that prompt you to enter a password from stdin.
See [User Passwords](https://github.com/taers232c/GAMADV-XTD3/wiki/Users#passwords)
See [User Passwords](https://github.com/GAM-team/GAM/wiki/Users#passwords)
7.05.04
@ -160,7 +352,7 @@ gam [<UserTypeEntity>] print siteactivity
Added option `maxmessagesperthread <Number>` to `gam <UserTypeEntity> print|show threads`
that limits the number of messages displayed per thread. The default is 0, there is no limit.
For, example this can be used if you only want to see the first message of each thread.
For example, this can be used if you only want to see the first message of each thread.
```
gam user user@domain.com print|show threads maxmessagesperthread 1
```
@ -171,10 +363,19 @@ were displayed.
Fixed bug in `gam <UserTypeEntity> print filelist countsonly showsize` where sizes were
all shown as 0 unless`sizefield size` was specified.
7.03.08
Only used in GAM Team version
Improved pip install.
Yubikey as optional should now be working also. So:
pip install --upgrade gam7
skips Yubikey.
To install with yubikey support (assuming you have installed the necessary swig and libpcsclite-dev packages already) run:
pip install --upgrade gam7[yubikey]
7.03.07
@ -187,18 +388,18 @@ Updated `gam create vaultexport` to include `corpus gemini`.
Added option `rawfields "<BrowserFieldNameList>"` to `gam info|print|show browsers` that allows
specification of complex field lists with selected subfields.
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Chrome-Browser-Cloud-Management#raw-fields
* See: https://github.com/GAM-team/GAM/wiki/Chrome-Browser-Cloud-Management#raw-fields
7.03.05
Only used in GAM Team version
Make GAM pip-installable: "pip install gam7"
7.03.04
Added option `security` to `gam create cigroup` that allows creation of a security group
in a single command.
Updated to Python 3.13.2 where possible.
Updated to Python 3.13.2.
7.03.03
@ -329,6 +530,12 @@ Improved the error message displayed for user service account access commands wh
7.01.04
Admin role assignments are now in the v1 stable API, use that and remove custom local workaround for the beta. #1724
Remove duplicate local JSON discovery files. #1724
Suppress "UserWarning: Attribute's length must be..." messages on service accounts with long emails. #1725
Added options `internal`, `internaldomains <DomainNameList>` and `external` to these commands
that expand the options for viewing group members:
```
@ -347,7 +554,7 @@ By default, when listing group members, GAM does not take the domain of the memb
Members without an email address, e.g. `customer`, `chromeosdevice` and `cbcmbrowser` are considered internal.
Updated to Python 3.13.1 where possible.
Updated to Python 3.13.1.
7.01.03
@ -393,7 +600,7 @@ for `[R] 35) Meet API (supports readonly)` as it is a special case.
7.00.39
Due to build site changes, GAM will no longer run on MacOS 12 Monterey.
Supported MacOS versions are now in the download filename.
Minor code fixes.
@ -560,7 +767,7 @@ as files/folders are being identified for processing.
Added option `<JSONData>` to `gam create|update caalevel`.
Updated to Python 3.13.0 where possible.
Updated to Python 3.13.0.
7.00.15
@ -577,7 +784,7 @@ ERROR: 500: unknownError - Unknown Error.
7.00.13
Align version number with GAM7.
Version bump in order to confirm MSI installs are operating properly
7.00.12
@ -587,6 +794,9 @@ will show the user's display name as the API doesn't return the user's email add
Updated support for `Folders with limited access`; this is a work in progress.
Windows builds now use PyInstaller's onedir config for improved performance. You may notice a lib
folder now exists underneath the GAM install path. GAM commands should start significantly faster.
7.00.11
Updated to Python 3.12.7 where possible.

View File

@ -8,7 +8,7 @@ GAM installation script.
OPTIONS:
-h show help.
-d Directory where gam folder will be installed. Default is \$HOME/bin/
-a Architecture to install (i386, x86_64, x86_64_legacy, arm, arm64). Default is to detect your arch with "uname -m".
-a Architecture to install (x86_64, arm64). Default is to detect your arch with "uname -m".
-o OS we are running (linux, macos). Default is to detect your OS with "uname -s".
-b OS version. Default is to detect on MacOS and Linux.
-l Just upgrade GAM to latest version. Skips project creation and auth.
@ -16,12 +16,12 @@ OPTIONS:
-u Admin user email address to use with GAM. Default is to prompt.
-r Regular user email address. Used to test service account access to user data. Default is to prompt.
-v Version to install (latest, prerelease, draft, 3.8, etc). Default is latest.
-s Strip gamadv-xtd3 component from extracted files, files will be downloaded directly to $target_dir
-s Strip gam component from extracted files, files will be downloaded directly to $target_dir
EOF
}
target_dir="$HOME/bin"
target_gam="gamadv-xtd3/gam"
target_folder="$target_dir/gamadv-xtd3"
gamarch=$(uname -m)
gamos=$(uname -s)
osversion=""
@ -30,15 +30,13 @@ upgrade_only=false
gamversion="latest"
adminuser=""
regularuser=""
gam_x86_64_glibc_vers="2.39 2.35 2.31 2.27"
gam_arm64_glibc_vers="2.39 2.35 2.31 2.27"
strip_gam="--strip-components 0"
strip_gam="--strip-components 1"
while getopts "hd:a:o:b:lp:u:r:v:s" OPTION
do
case $OPTION in
h) usage; exit;;
d) target_dir="$OPTARG";;
d) target_dir="${OPTARG%/}"; target_folder="$target_dir/gamadv-xtd3";;
a) gamarch="$OPTARG";;
o) gamos="$OPTARG";;
b) osversion="$OPTARG";;
@ -47,13 +45,11 @@ do
u) adminuser="$OPTARG";;
r) regularuser="$OPTARG";;
v) gamversion="$OPTARG";;
s) strip_gam="--strip-components 1"; target_gam="gam";;
s) strip_gam="--strip-components 1"; target_folder="$target_dir";;
?) usage; exit;;
esac
done
# remove possible / from end of target_dir
target_dir=${target_dir%/}
target_gam="$target_folder/gam"
update_profile() {
[ "$2" -eq 1 ] || [ -f "$1" ] || return 1
@ -90,7 +86,6 @@ version_gt()
# MacOS < 10.13 doesn't support sort -V
echo "" | sort -V > /dev/null 2>&1
vsort_failed=$?
echo "Check:${2}"
if [ "${1}" = "${2}" ]; then
true
elif (( $vsort_failed != 0 )); then
@ -100,87 +95,12 @@ else
fi
}
case $gamos in
[lL]inux)
gamos="linux"
if [ "$osversion" == "" ]; then
this_glibc_ver=$(ldd --version | awk '/ldd/{print $NF}')
else
this_glibc_ver=$osversion
fi
echo "This Linux distribution uses glibc $this_glibc_ver"
case $gamarch in
x86_64)
useglibc="legacy"
for gam_glibc_ver in $gam_x86_64_glibc_vers; do
if version_gt $this_glibc_ver $gam_glibc_ver; then
useglibc="glibc$gam_glibc_ver"
echo_green "Using GAM compiled against $useglibc"
break
fi
done
gamfile="linux-x86_64-$useglibc.tar.xz";;
arm|arm64|aarch64)
useglibc=""
for gam_glibc_ver in $gam_arm64_glibc_vers; do
if version_gt $this_glibc_ver $gam_glibc_ver; then
useglibc="glibc$gam_glibc_ver"
echo_green "Using GAM compiled against $useglibc"
break
fi
done
if [ "$useglibc" == "" ]; then
echo_red "Sorry, you need to be running at least glibc $useglibc to run GAM"
exit
fi
gamfile="linux-arm64-$useglibc.tar.xz";;
*)
echo_red "ERROR: this installer currently only supports x86_64 and arm64 Linux. Looks like you're running on $gamarch. Exiting."
exit
esac
;;
[Mm]ac[Oo][sS]|[Dd]arwin)
gamos="macos"
fullversion=$(sw_vers -productVersion)
osversion=${fullversion:0:2}
case $gamarch in
x86_64)
gamfile="macos-x86_64.tar.xz"
minimum_version=13
;;
arm|arm64|aarch64)
gamfile="macos-arm64.tar.xz"
minimum_version=13
;;
*)
echo_red "ERROR: this installer currently only supports x86_64 and arm64 MacOS. Looks like you're running on $gamarch. Exiting."
exit
;;
esac
if [[ "$osversion" -ge "$minimum_version" ]]; then
echo_green "You are running MacOS ${fullversion}, good. Using GAM with ${gamfile}."
else
echo_red "Sorry, you are running MacOS ${fullversion} but GAM on ${gamarch} requires MacOS ${minimum_version}. Exiting."
exit
fi
;;
MINGW64_NT*)
gamos="windows"
echo "You are running Windows"
gamfile="-windows-x86_64.zip"
;;
*)
echo_red "Sorry, this installer currently only supports Linux and MacOS. Looks like you're running on $gamos. Exiting."
exit
;;
esac
if [ "$gamversion" == "latest" ]; then
release_url="https://api.github.com/repos/taers232c/GAMADV-XTD3/releases/latest"
release_url="https://api.github.com/repos/GAM-team/GAM/releases/latest"
elif [ "$gamversion" == "prerelease" -o "$gamversion" == "draft" ]; then
release_url="https://api.github.com/repos/taers232c/GAMADV-XTD3/releases"
release_url="https://api.github.com/repos/GAM-team/GAM/releases"
else
release_url="https://api.github.com/repos/taers232c/GAMADV-XTD3/releases/tags/v$gamversion"
release_url="https://api.github.com/repos/GAM-team/GAM/releases/tags/v$gamversion"
fi
if [ -z ${GHCLIENT+x} ]; then
@ -190,6 +110,12 @@ else
check_type="authenticated"
curl_opts=( "$GHCLIENT" )
fi
curl_ver=$(curl --version|head -1|cut -d " " -f 2)
if [[ "${curl_ver:0:4}" < "7.76" ]]; then
curl_fail=( )
else
curl_fail=( "--fail-with-body" )
fi
echo_yellow "Checking GitHub URL $release_url for $gamversion GAM release ($check_type)..."
release_json=$(curl \
--silent \
@ -197,9 +123,16 @@ release_json=$(curl \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"$release_url" \
2>&1 /dev/null)
"${curl_fail[@]}")
curl_exit_code=$?
if [ $curl_exit_code -ne 0 ]; then
echo_red "ERROR retrieving URL: ${release_json}"
exit
else
echo_green "done"
fi
echo_yellow "Getting file and download URL..."
echo_yellow "Calculating download URL for this device..."
# Python is sadly the nearest to universal way to safely handle JSON with Bash
# At least this code should be compatible with just about any Python version ever
# unlike GAM itself. If some users don't have Python we can try grep / sed / etc
@ -221,11 +154,9 @@ if type(release) is list:
break
try:
for asset in release['assets']:
if asset[attrib].endswith('$gamfile'):
print(asset[attrib])
break
else:
print('ERROR: Attribute: {0} for $gamfile version {1} not found'.format(attrib, gamversion))
print(asset[attrib])
#else:
# print('ERROR: Attribute: {0} for version {1} not found'.format(attrib, gamversion))
except KeyError:
print('ERROR: assets value not found in JSON value of:\n\n%s' % release)"
@ -251,38 +182,158 @@ if (( $rc != 0 )); then
echo_red "ERROR: No version of python installed."
exit
fi
# also sort the URLs once so we're evaluating newest OS version first
download_urls=$(echo "$release_json" | \
$pycmd -c "$pycode" browser_download_url "$gamversion" | \
sort --version-sort --reverse)
if [[ ${download_urls:0:5} = "ERROR" ]]; then
echo_red "${download_urls}"
exit
fi
case $gamos in
[lL]inux)
gamos="linux"
download_urls=$(echo -e "$download_urls" | grep -e "-linux-")
if [ "$osversion" == "" ]; then
this_glibc_ver=$(ldd --version | awk '/ldd/{print $NF}')
else
this_glibc_ver=$osversion
fi
echo "This Linux distribution uses glibc $this_glibc_ver"
case $gamarch in
x86_64)
download_urls=$(echo -e "$download_urls" | grep -e "-x86_64-")
gam_x86_64_glibc_vers=$(echo -e "$download_urls" | \
grep --only-matching 'glibc[0-9\.]*\.tar\.xz$' \
| cut -c 6-9 )
useglibc="legacy"
for gam_glibc_ver in $gam_x86_64_glibc_vers; do
if version_gt $this_glibc_ver $gam_glibc_ver; then
useglibc="glibc$gam_glibc_ver"
echo_green "Using GAM compiled against $useglibc"
break
fi
done
download_url=$(echo -e "$download_urls" | grep "$useglibc")
;;
arm|arm64|aarch64)
download_urls=$(echo -e "$download_urls" | grep -e "-arm64-\|-aarch64-")
gam_arm64_glibc_vers=$(echo -e "$download_urls" | \
grep --only-matching 'glibc[0-9\.]*\.tar\.xz$' | \
cut -c 6-9)
useglibc="legacy"
for gam_glibc_ver in $gam_arm64_glibc_vers; do
if version_gt $this_glibc_ver $gam_glibc_ver; then
useglibc="glibc$gam_glibc_ver"
echo_green "Using GAM compiled against $useglibc"
break
fi
done
download_url=$(echo -e "$download_urls" | grep "$useglibc")
;;
*)
echo_red "ERROR: this installer currently only supports x86_64 and arm64 Linux. Looks like you're running on $gamarch. Exiting."
exit
esac
;;
[Mm]ac[Oo][sS]|[Dd]arwin)
gamos="macos"
currentversion=$(sw_vers -productVersion | awk -F '.' '{print $1 "." $2}')
# override osversion only if it wasn't set by cli arguments
osversion=${osversion:-${currentversion}}
# override osversion only if it wasn't set by cli arguments
download_urls=$(echo -e "$download_urls" | grep -e "-macos")
case $gamarch in
x86_64)
archgrep="-x86_64"
;;
arm|arm64|aarch64)
archgrep="-arm64\|-aarch64"
;;
*)
echo_red "ERROR: this installer currently only supports x86_64 and arm64 MacOS. Looks like you're running on ${gamarch}. Exiting."
exit
;;
esac
gam_macos_urls=$(echo -e "$download_urls" | \
grep -e $archgrep)
versionless_urls=$(echo -e "$gam_macos_urls" | \
grep -e "-macos-")
if [ "$versionless_urls" == "" ]; then
# versions after 7.00.38 include MacOS version info
gam_macos_vers=$(echo -e "$gam_macos_urls" | \
grep --only-matching -e '-macos[0-9\.]*' | \
cut -c 7-10)
for gam_mac_ver in $gam_macos_vers; do
if version_gt $currentversion $gam_mac_ver; then
download_url=$(echo -e "$gam_macos_urls" | grep "$gam_mac_ver")
echo_green "You are running MacOS ${currentversion} Using GAM compiled against ${gam_mac_ver}"
break
fi
done
if [ -z ${download_url+x} ]; then
echo_red "Sorry, you are running MacOS ${osversion} but GAM on ${gamarch} requires MacOS ${gam_mac_ver} or newer. Exiting."
exit
fi
else
# versions 7.00.38 and older don't include version info
case $gamarch in
x86_64)
minimum_version=13
;;
arm|arm64|aarch64)
minimum_version=14
;;
esac
download_url=$(echo -e "$download_urls" | grep -e $archgrep)
if version_gt "$osversion" "$minimum_version"; then
echo_green "You are running MacOS ${osversion}, good. Downloading GAM from ${download_url}."
else
echo_red "Sorry, you are running MacOS ${osversion} but GAM on ${gamarch} requires MacOS ${minimum_version}. Exiting."
exit
fi
if [ -z ${download_url+x} ]; then
echo_red "Sorry, you are running MacOS ${currentversion} but GAM on ${gamarch} requires MacOS ${minimum_version}. Exiting."
exit
fi
fi
;;
MINGW64_NT*)
gamos="windows"
echo "You are running Windows"
download_url=$(echo -e "$download_urls" | \
grep -e "-windows-" | \
grep ".zip")
;;
*)
echo_red "Sorry, this installer currently only supports Linux and MacOS. Looks like you're running on ${gamos}. Exiting."
exit
;;
esac
browser_download_url=$(echo "$release_json" | $pycmd -c "$pycode" browser_download_url "$gamversion")
if [[ ${browser_download_url:0:5} = "ERROR" ]]; then
echo_red "${browser_download_url}"
exit
fi
name=$(echo "$release_json" | $pycmd -c "$pycode" name "$gamversion")
if [[ ${name:0:5} = "ERROR" ]]; then
echo_red "${name}"
exit
fi
# Temp dir for archive
temp_archive_dir=$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir')
# Clean up after ourselves even if we are killed with CTRL-C
trap "rm -rf $temp_archive_dir" EXIT
echo_yellow "Downloading file $name from $browser_download_url to $temp_archive_dir ($check_type)..."
# hack to grab the end of the URL which should be the filename.
name=$(echo -e "$download_url" | rev | cut -f1 -d "/" | rev)
echo_yellow "Downloading ${download_url} to $temp_archive_dir ($check_type)..."
# Save archive to temp w/o losing our path
if [ -z ${GHCLIENT+x} ]; then
(cd "$temp_archive_dir" && curl -O -L $browser_download_url)
else
(cd "$temp_archive_dir" && curl -O -L $GHCLIENT $browser_download_url)
fi
(cd "$temp_archive_dir" && curl -O -L -s "${curl_opts[@]}" "$download_url")
mkdir -p "$target_dir"
mkdir -p "$target_folder"
echo_yellow "Deleting contents of $target_folder/lib"
rm -frv "$target_folder/lib"
echo_yellow "Extracting archive to $target_dir"
echo_yellow "Extracting archive to $target_folder"
if [[ "$name" =~ tar.xz|tar.gz|tar ]]; then
tar $strip_gam -xf "$temp_archive_dir"/"$name" -C "$target_dir"
tar $strip_gam -xf "$temp_archive_dir"/"$name" -C "$target_folder"
elif [[ "$name" == *.zip ]]; then
unzip -o "${temp_archive_dir}/${name}" -d "${target_dir}"
unzip -o "${temp_archive_dir}/${name}" -d "${target_folder}"
else
echo "I don't know what to do with files like ${name}. Giving up."
exit 1
@ -297,7 +348,7 @@ fi
# Update profile to add gam command
if [ "$update_profile" = true ]; then
alias_line="alias gam=\"${target_dir// /\\ }/$target_gam\""
alias_line="alias gam=\"$target_gam\""
if [ "$gamos" == "linux" ]; then
update_profile "$HOME/.bash_aliases" 0 || update_profile "$HOME/.bash_profile" 0 || update_profile "$HOME/.bashrc" 0
update_profile "$HOME/.zshrc" 0
@ -311,7 +362,7 @@ fi
if [ "$upgrade_only" = true ]; then
echo_green "Here's information about your GAM upgrade:"
"$target_dir/$target_gam" version extended
"$target_gam" version extended
rc=$?
if (( $rc != 0 )); then
echo_red "ERROR: Failed running GAM for the first time with return code $rc. Please report this error to GAM mailing list. Exiting."
@ -323,7 +374,7 @@ if [ "$upgrade_only" = true ]; then
fi
# Set config command
config_cmd="config no_browser false"
#config_cmd="config no_browser false"
while true; do
read -p "Can you run a full browser on this machine? (usually Y for MacOS, N for Linux if you SSH into this machine) " yn
@ -332,7 +383,8 @@ while true; do
break
;;
[Nn]*)
config_cmd="config no_browser true"
# config_cmd="config no_browser true"
touch "$target_folder/nobrowser.txt" > /dev/null 2>&1
break
;;
*)
@ -350,7 +402,8 @@ while true; do
if [ "$adminuser" == "" ]; then
read -p "Please enter your Google Workspace admin email address: " adminuser
fi
"$target_dir/$target_gam" $config_cmd create project $adminuser
# "$target_gam" $config_cmd create project $adminuser
"$target_gam" create project $adminuser
rc=$?
if (( $rc == 0 )); then
echo_green "Project creation complete."
@ -375,7 +428,8 @@ while $project_created; do
read -p "Are you ready to authorize GAM to perform Google Workspace management operations as your admin account? (yes or no) " yn
case $yn in
[Yy]*)
"$target_dir/$target_gam" $config_cmd oauth create $adminuser
# "$target_gam" $config_cmd oauth create $adminuser
"$target_gam" oauth create $adminuser
rc=$?
if (( $rc == 0 )); then
echo_green "Admin authorization complete."
@ -404,7 +458,8 @@ while $admin_authorized; do
read -p "Please enter the email address of a regular Google Workspace user: " regularuser
fi
echo_yellow "Great! Checking service account scopes.This will fail the first time. Follow the steps to authorize and retry. It can take a few minutes for scopes to PASS after they've been authorized in the admin console."
"$target_dir/$target_gam" $config_cmd user $regularuser check serviceaccount
# "$target_gam" $config_cmd user $regularuser check serviceaccount
"$target_gam" user $regularuser check serviceaccount
rc=$?
if (( $rc == 0 )); then
echo_green "Service account authorization complete."
@ -425,7 +480,8 @@ while $admin_authorized; do
done
echo_green "Here's information about your new GAM installation:"
"$target_dir/$target_gam" $config_cmd save version extended
#"$target_gam" $config_cmd save version extended
"$target_gam" version extended
rc=$?
if (( $rc != 0 )); then
echo_red "ERROR: Failed running GAM for the first time with $rc. Please report this error to GAM mailing list. Exiting."

View File

@ -1,12 +1,30 @@
# -*- mode: python ; coding: utf-8 -*-
from os import getenv
from re import search
import re
from sys import platform
from PyInstaller.utils.hooks import copy_metadata
from gam.gamlib.glverlibs import GAM_VER_LIBS
with open("gam/__init__.py") as f:
version_file = f.read()
version = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M).group(1)
version_list = [int(i) for i in version.split('.')]
while len(version_list) < 4:
version_list.append(0)
version_tuple = tuple(version_list)
version_str = str(version_tuple)
with open("version_info.txt.in") as f:
version_info = f.read()
version_info = version_info.replace("{VERSION}", version).replace(
"{VERSION_TUPLE}", version_str
)
with open("version_info.txt", "w") as f:
f.write(version_info)
print(version_info)
datas = []
for pkg in GAM_VER_LIBS:
datas += copy_metadata(pkg, recursive=True)
@ -50,6 +68,8 @@ pyz = PYZ(a.pure,
target_arch = None
codesign_identity = None
entitlements_file = None
manifest = None
version = 'version_info.txt'
match platform:
case "darwin":
if getenv('arch') == 'universal2':
@ -62,6 +82,7 @@ match platform:
case "win32":
target_arch = None
strip = False
manifest = 'gam.exe.manifest'
case _:
target_arch = None
strip = True
@ -83,6 +104,7 @@ if getenv('PYINSTALLER_BUILD_ONEDIR') == 'yes':
debug=debug,
bootloader_ignore_signals=bootloader_ignore_signals,
strip=strip,
manifest=manifest,
upx=upx,
console=console,
# put most everyting under a lib/ subfolder
@ -92,6 +114,7 @@ if getenv('PYINSTALLER_BUILD_ONEDIR') == 'yes':
target_arch=target_arch,
codesign_identity=codesign_identity,
entitlements_file=entitlements_file,
version=version,
)
coll = COLLECT(
exe,
@ -115,6 +138,7 @@ else:
name=name,
debug=debug,
bootloader_ignore_signals=bootloader_ignore_signals,
manifest=manifest,
strip=strip,
upx=upx,
console=console,
@ -123,4 +147,6 @@ else:
target_arch=target_arch,
codesign_identity=codesign_identity,
entitlements_file=entitlements_file,
version=version,
)

View File

@ -2,10 +2,10 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" >
<Product
Id="*"
Name="GAMADV-XTD3"
Name="GAM7"
Language="1033"
Version="$(env.GAMVERSION)"
Manufacturer="Ross Scroggs - ross.scroggs@gmail.com"
Manufacturer="GAM Team - google-apps-manager@googlegroups.com"
UpgradeCode="D86B52B2-EFE9-4F9D-8BA3-9D84B9B2D319">
<Package
InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
@ -22,7 +22,7 @@
<Feature
Id="gam"
Title="GAMADV-XTD3"
Title="GAM7"
Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
@ -32,8 +32,11 @@
<SetDirectory Id="WINDOWSVOLUME" Value="[WindowsVolume]"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="WINDOWSVOLUME">
<Directory Id="INSTALLFOLDER" Name="GAMADV-XTD3" />
</Directory>
<Directory Id="INSTALLFOLDER" Name="GAM7">
<Directory Id="lib" Name="lib">
</Directory>
</Directory>
</Directory>
</Directory>
</Fragment>
@ -42,7 +45,7 @@
<ComponentGroup
Id="ProductComponents"
Directory="INSTALLFOLDER"
Source="dist/gamadv-xtd3">
Source="dist/gam/gam7">
<Component Id="gam_exe" Guid="d046ea24-c9f8-40ca-84db-70b0119933ff">
<File Name="gam.exe" KeyPath="yes" />
<Environment Id="PATH" Name="PATH" Value="[INSTALLFOLDER]" Permanent="yes" Part="last" Action="set" System="yes" />
@ -62,6 +65,7 @@
<Component Id="cacerts_pem" Guid="61fe2b2d-1646-4bed-b844-193965e97727">
<File Name="cacerts.pem" KeyPath="yes" />
</Component>
<ComponentGroupRef Id="Lib" />
</ComponentGroup>
</Fragment>

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# GAMADV-XTD3
# GAM
#
# Copyright 2023, All Rights Reserved.
#

View File

@ -818,16 +818,16 @@ smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
# Issuer: CN=COMODO Certification Authority O=COMODO CA Limited
# Subject: CN=COMODO Certification Authority O=COMODO CA Limited
# Label: "COMODO Certification Authority"
# Serial: 43390818032842818540635488309124489234
# MD5 Fingerprint: 20:E7:4F:82:C2:7E:94:80:34:82:8A:13:A9:17:1D:97
# SHA1 Fingerprint EE:86:93:87:FF:FD:83:49:AB:5A:D1:43:22:58:87:89:A4:57:B0:12
# SHA256 Fingerprint: 1A:0D:20:44:5D:E5:BA:18:62:D1:9E:F8:80:85:8C:BC:E5:01:02:B3:6E:8F:0A:04:0C:3C:69:E7:45:22:FE:6E
# Serial: 104350513648249232941998508985834464573
# MD5 Fingerprint: 5c:48:dc:f7:42:72:ec:56:94:6d:1c:cc:71:35:80:75
# SHA1 Fingerprint: 66:31:bf:9e:f7:4f:9e:b6:c9:d5:a6:0c:ba:6a:be:d1:f7:bd:ef:7b
# SHA256 Fingerprint: 0c:2c:d6:3d:f7:80:6f:a3:99:ed:e8:09:11:6b:57:5b:f8:79:89:f0:65:18:f9:80:8c:86:05:03:17:8b:af:66
-----BEGIN CERTIFICATE-----
MIID0DCCArigAwIBAgIQIKTEf93f4cdTYwcTiHdgEjANBgkqhkiG9w0BAQUFADCB
MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCB
gTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNV
BAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0xMTAxMDEwMDAw
MDBaFw0zMDEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3Jl
BAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEyMDEwMDAw
MDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3Jl
YXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFDT01P
RE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0
aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3
@ -836,14 +836,16 @@ UcEbVASY06m/weaKXTuH+7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI
Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV4EajcNxo2f8ESIl33rXp
+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA1KGzqSX+
DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5O
nKVIrLsm9wIDAQABo0IwQDAdBgNVHQ4EFgQUC1jli8ZMFTekQKkwqSG+RzZaVv8w
DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
ggEBAC/JxBwHO89hAgCx2SFRdXIDMLDEFh9sAIsQrK/xR9SuEDwMGvjUk2ysEDd8
t6aDZK3N3w6HM503sMZ7OHKx8xoOo/lVem0DZgMXlUrxsXrfViEGQo+x06iF3u6X
HWLrp+cxEmbDD6ZLLkGC9/3JG6gbr+48zuOcrigHoSybJMIPIyaDMouGDx8rEkYl
Fo92kANr3ryqImhrjKGsKxE5pttwwn1y6TPn/CbxdFqR5p2ErPioBhlG5qfpqjQi
pKGfeq23sqSaM4hxAjwu1nqyH6LKwN0vEJT9s4yEIHlG1QXUEOTS22RPuFvuG8Ug
R1uUq27UlTMdphVx8fiUylQ5PsE=
nKVIrLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW
/zAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6g
PKA6hjhodHRwOi8vY3JsLmNvbW9kb2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9u
QXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOCAQEAPpiem/Yb6dc5t3iuHXIY
SdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CPOGEIqB6BCsAv
IC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/
RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4
zJVSk/BwJVmcIGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5dd
BA6+C4OmF4O5MBKgxTMVBbkN+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IB
ZQ==
-----END CERTIFICATE-----
# Operating CA: Sectigo

View File

@ -579,6 +579,8 @@ class GamCLArgs():
ARG_DRIVELABELS = 'drivelabels'
ARG_DRIVELABELPERMISSION = 'drivelabelpermission'
ARG_DRIVELABELPERMISSIONS = 'drivelabelpermissions'
ARG_DRIVELASTMODIFICATION = 'drivelastmodification'
ARG_DRIVELASTMODIFICATIONS = 'drivelastmodifications'
ARG_DRIVESETTINGS = 'drivesettings'
ARG_DRIVETRASH = 'drivetrash'
ARG_EMPTYDRIVEFOLDERS = 'emptydrivefolders'
@ -952,7 +954,6 @@ class GamCLArgs():
OB_LABEL_ID_LIST = 'LabelIDLIst'
OB_LABEL_NAME = 'LabelName'
OB_LABEL_NAME_LIST = 'LabelNameList'
OB_LABEL_REPLACEMENT = 'LabelReplacement'
OB_LANGUAGE_LIST = 'LanguageList'
OB_LOOKERSTUDIO_PERMISSION_ENTITY = 'LookerStudioPermissionEntity'
OB_MATTER_ITEM = 'MatterItem'
@ -991,6 +992,7 @@ class GamCLArgs():
OB_RESOURCE_ENTITY = 'ResourceEntity'
OB_RESOURCE_ID = 'ResourceID'
OB_RE_PATTERN = 'REPattern'
OB_RE_SUBSTITUTION = 'RESubstitution'
OB_ROLE_ASSIGNMENT_ID = 'RoleAssignmentID'
OB_ROLE_ITEM = 'RoleItem'
OB_ROLE_LIST = 'RoleList'

View File

@ -37,6 +37,7 @@ CANNOT_CHANGE_OWNER_ACL = 'cannotChangeOwnerAcl'
CANNOT_CHANGE_OWN_PRIMARY_SUBSCRIPTION = 'cannotChangeOwnPrimarySubscription'
CANNOT_COPY_FILE = 'cannotCopyFile'
CANNOT_DELETE_ONLY_REVISION = 'cannotDeleteOnlyRevision'
CANNOT_DELETE_PERMISSION = 'cannotDeletePermission'
CANNOT_DELETE_PRIMARY_CALENDAR = 'cannotDeletePrimaryCalendar'
CANNOT_DELETE_PRIMARY_SENDAS = 'cannotDeletePrimarySendAs'
CANNOT_DELETE_RESOURCE_WITH_CHILDREN = 'cannotDeleteResourceWithChildren'
@ -47,6 +48,7 @@ CANNOT_MOVE_TRASHED_ITEM_INTO_TEAMDRIVE = 'cannotMoveTrashedItemIntoTeamDrive'
CANNOT_MOVE_TRASHED_ITEM_OUT_OF_TEAMDRIVE = 'cannotMoveTrashedItemOutOfTeamDrive'
CANNOT_REMOVE_OWNER = 'cannotRemoveOwner'
CANNOT_SET_EXPIRATION = 'cannotSetExpiration'
CANNOT_SET_EXPIRATION_ON_ANYONE_OR_DOMAIN = 'cannotSetExpirationOnAnyoneOrDomain'
CANNOT_SHARE_GROUPS_WITHLINK = 'cannotShareGroupsWithLink'
CANNOT_SHARE_USERS_WITHLINK = 'cannotShareUsersWithLink'
CANNOT_SHARE_TEAMDRIVE_TOPFOLDER_WITH_ANYONEORDOMAINS = 'cannotShareTeamDriveTopFolderWithAnyoneOrDomains'
@ -70,6 +72,7 @@ DOMAIN_POLICY = 'domainPolicy'
DOWNLOAD_QUOTA_EXCEEDED = 'downloadQuotaExceeded'
DUPLICATE = 'duplicate'
EVENT_DURATION_EXCEEDS_LIMIT = 'eventDurationExceedsLimit'
EXPIRATION_DATES_MUST_BE_IN_THE_FUTURE = 'expirationDatesMustBeInTheFuture'
EXPIRATION_DATE_NOT_ALLOWED_FOR_SHARED_DRIVE_MEMBERS = 'expirationDateNotAllowedForSharedDriveMembers'
FAILED_PRECONDITION = 'failedPrecondition'
FIELD_IN_USE = 'fieldInUse'
@ -210,7 +213,8 @@ DRIVE_COPY_THROW_REASONS = DRIVE_ACCESS_THROW_REASONS+[CANNOT_COPY_FILE, BAD_REQ
STORAGE_QUOTA_EXCEEDED, TEAMDRIVE_FILE_LIMIT_EXCEEDED, TEAMDRIVE_HIERARCHY_TOO_DEEP]
DRIVE_GET_THROW_REASONS = DRIVE_USER_THROW_REASONS+[FILE_NOT_FOUND, DOWNLOAD_QUOTA_EXCEEDED]
DRIVE3_CREATE_ACL_THROW_REASONS = [BAD_REQUEST, INVALID, INVALID_SHARING_REQUEST, OWNERSHIP_CHANGE_ACROSS_DOMAIN_NOT_PERMITTED,
CANNOT_SET_EXPIRATION, EXPIRATION_DATE_NOT_ALLOWED_FOR_SHARED_DRIVE_MEMBERS,
CANNOT_SET_EXPIRATION, CANNOT_SET_EXPIRATION_ON_ANYONE_OR_DOMAIN,
EXPIRATION_DATES_MUST_BE_IN_THE_FUTURE, EXPIRATION_DATE_NOT_ALLOWED_FOR_SHARED_DRIVE_MEMBERS,
NOT_FOUND, TEAMDRIVE_DOMAIN_USERS_ONLY_RESTRICTION, TEAMDRIVE_TEAM_MEMBERS_ONLY_RESTRICTION,
TARGET_USER_ROLE_LIMITED_BY_LICENSE_RESTRICTION, INSUFFICIENT_ADMINISTRATOR_PRIVILEGES, SHARING_RATE_LIMIT_EXCEEDED,
PUBLISH_OUT_NOT_PERMITTED, SHARE_IN_NOT_PERMITTED, SHARE_OUT_NOT_PERMITTED, SHARE_OUT_NOT_PERMITTED_TO_USER,
@ -227,7 +231,8 @@ DRIVE3_GET_ACL_REASONS = DRIVE_USER_THROW_REASONS+[FILE_NOT_FOUND, FORBIDDEN, IN
INSUFFICIENT_ADMINISTRATOR_PRIVILEGES, INSUFFICIENT_FILE_PERMISSIONS,
UNKNOWN_ERROR, INVALID]
DRIVE3_UPDATE_ACL_THROW_REASONS = [BAD_REQUEST, INVALID_OWNERSHIP_TRANSFER, CANNOT_REMOVE_OWNER,
CANNOT_SET_EXPIRATION, EXPIRATION_DATE_NOT_ALLOWED_FOR_SHARED_DRIVE_MEMBERS,
CANNOT_SET_EXPIRATION, CANNOT_SET_EXPIRATION_ON_ANYONE_OR_DOMAIN,
EXPIRATION_DATES_MUST_BE_IN_THE_FUTURE, EXPIRATION_DATE_NOT_ALLOWED_FOR_SHARED_DRIVE_MEMBERS,
OWNERSHIP_CHANGE_ACROSS_DOMAIN_NOT_PERMITTED,
NOT_FOUND, TEAMDRIVE_DOMAIN_USERS_ONLY_RESTRICTION, TEAMDRIVE_TEAM_MEMBERS_ONLY_RESTRICTION,
TARGET_USER_ROLE_LIMITED_BY_LICENSE_RESTRICTION, INSUFFICIENT_ADMINISTRATOR_PRIVILEGES, SHARING_RATE_LIMIT_EXCEEDED,
@ -246,7 +251,7 @@ DRIVE3_UPDATE_ACL_THROW_REASONS = [BAD_REQUEST, INVALID_OWNERSHIP_TRANSFER, CANN
DRIVE3_DELETE_ACL_THROW_REASONS = [BAD_REQUEST, CANNOT_REMOVE_OWNER,
CANNOT_MODIFY_INHERITED_TEAMDRIVE_PERMISSION,
INSUFFICIENT_ADMINISTRATOR_PRIVILEGES, SHARING_RATE_LIMIT_EXCEEDED,
NOT_FOUND, PERMISSION_NOT_FOUND]
NOT_FOUND, PERMISSION_NOT_FOUND, CANNOT_DELETE_PERMISSION]
DRIVE3_MODIFY_LABEL_THROW_REASONS = DRIVE_USER_THROW_REASONS+[FILE_NOT_FOUND, NOT_FOUND, FORBIDDEN, INTERNAL_ERROR,
FILE_NEVER_WRITABLE, APPLY_LABEL_FORBIDDEN,
INSUFFICIENT_ADMINISTRATOR_PRIVILEGES, INSUFFICIENT_FILE_PERMISSIONS,
@ -299,6 +304,7 @@ REASON_MESSAGE_MAP = {
('userId', USER_NOT_FOUND),
('memberKey', INVALID_MEMBER),
('A system error has occurred', SYSTEM_ERROR),
('Expiration dates must be in the future', EXPIRATION_DATES_MUST_BE_IN_THE_FUTURE),
('Invalid attribute value', INVALID_ATTRIBUTE_VALUE),
('Invalid Customer Id', INVALID_CUSTOMER_ID),
('Invalid Input: INVALID_OU_ID', INVALID_ORGUNIT),
@ -382,6 +388,8 @@ class cannotCopyFile(Exception):
pass
class cannotDeleteOnlyRevision(Exception):
pass
class cannotDeletePermission(Exception):
pass
class cannotDeletePrimaryCalendar(Exception):
pass
class cannotDeletePrimarySendAs(Exception):
@ -402,6 +410,8 @@ class cannotRemoveOwner(Exception):
pass
class cannotSetExpiration(Exception):
pass
class cannotSetExpirationOnAnyoneOrDomain(Exception):
pass
class cannotShareGroupsWithLink(Exception):
pass
class cannotShareUsersWithLink(Exception):
@ -446,6 +456,8 @@ class duplicate(Exception):
pass
class eventDurationExceedsLimit(Exception):
pass
class expirationDatesMustBeInTheFuture(Exception):
pass
class expirationDateNotAllowedForSharedDriveMembers(Exception):
pass
class failedPrecondition(Exception):
@ -676,6 +688,7 @@ REASON_EXCEPTION_MAP = {
CANNOT_CHANGE_OWN_PRIMARY_SUBSCRIPTION: cannotChangeOwnPrimarySubscription,
CANNOT_COPY_FILE: cannotCopyFile,
CANNOT_DELETE_ONLY_REVISION: cannotDeleteOnlyRevision,
CANNOT_DELETE_PERMISSION: cannotDeletePermission,
CANNOT_DELETE_PRIMARY_CALENDAR: cannotDeletePrimaryCalendar,
CANNOT_DELETE_PRIMARY_SENDAS: cannotDeletePrimarySendAs,
CANNOT_DELETE_RESOURCE_WITH_CHILDREN: cannotDeleteResourceWithChildren,
@ -686,6 +699,7 @@ REASON_EXCEPTION_MAP = {
CANNOT_MOVE_TRASHED_ITEM_OUT_OF_TEAMDRIVE: cannotMoveTrashedItemOutOfTeamDrive,
CANNOT_REMOVE_OWNER: cannotRemoveOwner,
CANNOT_SET_EXPIRATION: cannotSetExpiration,
CANNOT_SET_EXPIRATION_ON_ANYONE_OR_DOMAIN: cannotSetExpirationOnAnyoneOrDomain,
CANNOT_SHARE_GROUPS_WITHLINK: cannotShareGroupsWithLink,
CANNOT_SHARE_USERS_WITHLINK: cannotShareUsersWithLink,
CANNOT_SHARE_TEAMDRIVE_TOPFOLDER_WITH_ANYONEORDOMAINS: cannotShareTeamDriveTopFolderWithAnyoneOrDomains,
@ -708,6 +722,7 @@ REASON_EXCEPTION_MAP = {
DOWNLOAD_QUOTA_EXCEEDED: downloadQuotaExceeded,
DUPLICATE: duplicate,
EVENT_DURATION_EXCEEDS_LIMIT: eventDurationExceedsLimit,
EXPIRATION_DATES_MUST_BE_IN_THE_FUTURE: expirationDatesMustBeInTheFuture,
EXPIRATION_DATE_NOT_ALLOWED_FOR_SHARED_DRIVE_MEMBERS: expirationDateNotAllowedForSharedDriveMembers,
FAILED_PRECONDITION: failedPrecondition,
FIELD_IN_USE: fieldInUse,

View File

@ -85,6 +85,8 @@ CSV_OUTPUT_ROW_FILTER_MODE = 'corm'
CSV_OUTPUT_ROW_LIMIT = 'corl'
# Add timestamp column to CSV output file
CSV_OUTPUT_TIMESTAMP_COLUMN = 'cotc'
# Transpose output rows/columns
CSV_OUTPUT_TRANSPOSE = 'cotr'
# Output sort headers
CSV_OUTPUT_SORT_HEADERS = 'cosh'
# CSV todrive options
@ -250,6 +252,7 @@ Globals = {
CSV_OUTPUT_ROW_LIMIT: 0,
CSV_OUTPUT_SORT_HEADERS: [],
CSV_OUTPUT_TIMESTAMP_COLUMN: None,
CSV_OUTPUT_TRANSPOSE: False,
CSV_TODRIVE: {},
CURRENT_API_SERVICES: {},
CURRENT_CLIENT_API: None,

View File

@ -118,7 +118,7 @@ Your workspace is configured to disable service account private key uploads.
Please go to:
https://github.com/taers232c/GAMADV-XTD3/wiki/Authorization#authorize-service-account-key-uploads
https://github.com/GAM-team/GAM/wiki/Authorization#authorize-service-account-key-uploads
Follow the steps to allow a service account private key upload for the project ({0}) just created.
Once those steps are completed, you can continue with your project authentication.
@ -322,7 +322,7 @@ INVALID_NUMBER_OF_CHAT_SPACE_MEMBERS = '{0} type {1} number of members, {2}, mus
INVALID_ORGUNIT = 'Invalid Organizational Unit'
INVALID_PATH = 'Invalid Path'
INVALID_PERMISSION_ATTRIBUTE_TYPE = 'permission attribute {0} not allowed with type {1}'
INVALID_REGION = 'See: https://github.com/taers232c/GAMADV-XTD3/wiki/Context-Aware-Access-Levels#caa-region-codes'
INVALID_REGION = 'See: https://github.com/GAM-team/GAM/wiki/Context-Aware-Access-Levels#caa-region-codes'
INVALID_QUERY = 'Invalid Query'
INVALID_RE = 'Invalid RE'
INVALID_REQUEST = 'Invalid Request'

View File

@ -22,7 +22,7 @@
# Products/SKUs
_PRODUCTS = {
'101001': 'Cloud Identity Free',
'101001': 'Cloud Identity',
'101005': 'Cloud Identity Premium',
'101031': 'Google Workspace for Education',
'101033': 'Google Voice',
@ -47,6 +47,10 @@ _SKUS = {
'product': '101001', 'aliases': ['identity', 'cloudidentity'], 'displayName': 'Cloud Identity'},
'1010050001': {
'product': '101005', 'aliases': ['identitypremium', 'cloudidentitypremium'], 'displayName': 'Cloud Identity Premium'},
'1010070001': {
'product': 'Google-Apps', 'aliases': ['gwef', 'workspaceeducationfundamentals'], 'displayName': 'Google Workspace for Education Fundamentals'},
'1010070004': {
'product': 'Google-Apps', 'aliases': ['gwegmo', 'workspaceeducationgmailonly'], 'displayName': 'Google Workspace for Education Gmail Only'},
'1010310002': {
'product': '101031', 'aliases': ['gsefe', 'e4e', 'gsuiteenterpriseeducation'], 'displayName': 'Google Workspace for Education Plus - Legacy'},
'1010310003': {
@ -83,6 +87,8 @@ _SKUS = {
'product': '101038', 'aliases': ['appsheetplus', 'appsheetenterpriseplus'], 'displayName': 'AppSheet Enterprise Plus'},
'1010390001': {
'product': '101039', 'aliases': ['assuredcontrols'], 'displayName': 'Assured Controls'},
'1010390002': {
'product': '101039', 'aliases': ['assuredcontrolsplus'], 'displayName': 'Assured Controls Plus'},
'1010400001': {
'product': '101040', 'aliases': ['beyondcorp', 'beyondcorpenterprise', 'bce', 'cep', 'chromeenterprisepremium'], 'displayName': 'Chrome Enterprise Premium'},
'1010430001': {
@ -111,6 +117,8 @@ _SKUS = {
'product': 'Google-Apps', 'aliases': ['standard', 'free'], 'displayName': 'G Suite Legacy'},
'Google-Apps-For-Business': {
'product': 'Google-Apps', 'aliases': ['gafb', 'gafw', 'basic', 'gsuitebasic'], 'displayName': 'G Suite Basic'},
'Google-Apps-For-Education': {
'product': 'Google-Apps', 'aliases': ['gafe', 'gsuiteeducation', 'gsuiteedu'], 'displayName': 'Google Workspace for Education - Fundamentals'},
'Google-Apps-For-Government': {
'product': 'Google-Apps', 'aliases': ['gafg', 'gsuitegovernment', 'gsuitegov'], 'displayName': 'Google Workspace Government'},
'Google-Apps-For-Postini': {
@ -121,7 +129,7 @@ _SKUS = {
'product': 'Google-Apps', 'aliases': ['gau', 'gsb', 'unlimited', 'gsuitebusiness'], 'displayName': 'G Suite Business'},
'1010020020': {
'product': 'Google-Apps', 'aliases': ['gae', 'gse', 'enterprise', 'gsuiteenterprise',
'wsentplus', 'workspaceenterpriseplus'], 'displayName': 'Google Workspace Enterprise Plus'},
'wsentplus', 'workspaceenterpriseplus'], 'displayName': 'Google Workspace Enterprise Plus (formerly G Suite Enterprise)'},
'1010020025': {
'product': 'Google-Apps', 'aliases': ['wsbizplus', 'workspacebusinessplus'], 'displayName': 'Google Workspace Business Plus'},
'1010020026': {
@ -148,14 +156,16 @@ _SKUS = {
'product': '101034', 'aliases': ['wsbizstarterarchived', 'workspacebusinessstarterarchived'], 'displayName': 'Google Workspace Business Starter - Archived User'},
'1010340006': {
'product': '101034', 'aliases': ['wsbizstanarchived', 'workspacebusinessstanarchived'], 'displayName': 'Google Workspace Business Standard - Archived User'},
'1010340007': {
'product': '101034', 'aliases': ['gwefau', 'gwefarchived', 'workspaceeducationfundamentalsarchived'], 'displayName': 'Google Workspace for Education Fundamentals - Archived User'},
'1010060001': {
'product': '101006', 'aliases': ['gsuiteessentials', 'essentials',
'd4e', 'driveenterprise', 'drive4enterprise',
'wsess', 'workspaceesentials'], 'displayName': 'Google Workspace Essentials'},
'wsess', 'workspaceesentials'], 'displayName': 'Google Workspace Essentials (formerly G Suite Essentials)'},
'1010060003': {
'product': 'Google-Apps', 'aliases': ['wsentess', 'workspaceenterpriseessentials'], 'displayName': 'Google Workspace Enterprise Essentials'},
'1010060005': {
'product': 'Google-Apps', 'aliases': ['wsessplus', 'workspaceessentialsplus'], 'displayName': 'Google Workspace Essentials Plus'},
'product': 'Google-Apps', 'aliases': ['wsessplus', 'workspaceessentialsplus'], 'displayName': 'Google Workspace Enterprise Essentials Plus'},
'Google-Drive-storage-20GB': {
'product': 'Google-Drive-storage', 'aliases': ['drive20gb', '20gb', 'googledrivestorage20gb'], 'displayName': 'Google Drive Storage 20GB'},
'Google-Drive-storage-50GB': {

View File

@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
__version__ = "2.156.0"
__version__ = "2.164.0"

View File

@ -1,20 +0,0 @@
rm -rf gamadv-xtd3
rm -rf build
rm -rf dist
export gampath="dist/gamadv-xtd3"
rm -rf $gampath
mkdir -p $gampath
pyinstaller --clean --noupx --strip -F --distpath=$gampath gam.spec
export gam="$gampath/gam"
$gam version extended
export GAMVERSION=`$gam version simple | head -n 1 | cut -c1-7`
cp LICENSE $gampath/
cp license.rtf $gampath/
cp Gam*.txt $gampath/
cp cacerts.pem $gampath/
arch=$(uname -m)
this_glibc_ver=$(ldd --version | awk '/ldd/{print $NF}')
GAM_ARCHIVE=gamadv-xtd3-$GAMVERSION-linux-$arch-glibc$this_glibc_ver.tar.xz
rm -f $GAM_ARCHIVE
tar -C dist/ --create --xz --file $GAM_ARCHIVE gamadv-xtd3

View File

@ -1,19 +0,0 @@
rm -rf gamadv-xtd3
rm -rf build
rm -rf dist
export gampath="dist/gamadv-xtd3"
rm -rf $gampath
mkdir -p $gampath
pyinstaller --clean --noupx --strip -F --distpath=$gampath gam.spec
export gam="$gampath/gam"
$gam version extended
export GAMVERSION=`$gam version simple | head -n 1 | cut -c1-7`
cp LICENSE $gampath/
cp license.rtf $gampath/
#cp Gam*.txt $gampath/
cp cacerts.pem $gampath/
arch=$(uname -m)
GAM_ARCHIVE=gamadv-xtd3-$GAMVERSION-macos-$arch.tar
rm -f $GAM_ARCHIVE
tar -C dist/ --create --file $GAM_ARCHIVE gamadv-xtd3

View File

@ -1,14 +1,14 @@
chardet
cryptography
distro; sys_platform == 'linux'
distro; sys_platform=='linux'
filelock
google-api-python-client
google-auth
google-auth-httplib2
google-auth-oauthlib
httplib2
google-api-python-client>=2.166.0
google-auth-httplib2>=0.2.0
google-auth-oauthlib>=1.2.1
google-auth>=2.38.0
httplib2>=0.22.0
lxml
passlib
passlib>=1.7.4
pathvalidate
python-dateutil
yubikey-manager[yubikey]>=5.0
yubikey-manager[yubikey]>=5.6.1

View File

@ -1,12 +1,12 @@
[metadata]
name = Advanced GAM for Google Workspace
version = attr: gam.__init__.__version__
name = GAM for Google Workspace
version = attr: gam.var.GAM_VERSION
description = Command line management for Google Workspaces
long_description = file: README.md
long_description = file: readme.md
long_description_content_type = text/markdown
url = https://github.com/taers232c/GAMADV-XTD3
author = Ross Scroggs
author_email = ross.scroggs@gmail.com
url = https://github.com/GAM-team/GAM
author = GAM Team
author_email = google-apps-manager@googlegroups.com
license = Apache
license_files = LICENSE
keywords = google, oauth2, gsuite, google-apps, google-admin-sdk, google-drive, google-cloud, google-calendar, gam, google-api, oauth2-client, google-workspace
@ -23,15 +23,16 @@ classifiers =
packages = find:
python_requires = >= 3.8
install_requires =
lxml
cryptography >= 40.0.1
chardet
cryptography
distro; sys_platform == 'linux'
filelock >= 3.8.0
google-api-python-client >= 2.82
google-auth-httplib2 >= 0.1.0
google-auth-oauthlib >= 1.0.0
google-auth >= 2.16.3
httplib2 >= 0.22.0
filelock
google-api-python-client >= 2.36
google-auth-httplib2
google-auth-oauthlib >= 0.4.6
google-auth >= 2.3.3
httplib2 >= 0.20.2
lxml
passlib >= 1.7.4
pathvalidate
python-dateutil

View File

@ -1,114 +0,0 @@
echo "RUNNING: apt update..."
sudo apt-get --yes update > /dev/null
export mypath=$(pwd)
echo "We are running on Ubuntu $TRAVIS_DIST $PLATFORM"
ldd --version
export LD_LIBRARY_PATH=~/ssl/lib:~/python/lib
export cpucount=$(nproc --all)
echo "This device has $cpucount CPUs for compiling..."
sudo apt-get --yes install xz-utils > /dev/null
sudo apt-get --yes install libwww-curl-perl > /dev/null
export SSLVER=$(~/ssl/bin/openssl version)
export SSLRESULT=$?
export PYVER=$(~/python/bin/python3 -V)
export PYRESULT=$?
sudo apt-get --yes install libxml2-dev > /dev/null
sudo apt-get --yes install libxslt-dev > /dev/null
if [ $SSLRESULT -ne 0 ] || [[ "$SSLVER" != "OpenSSL $LINUX_BUILD_OPENSSL_VERSION "* ]] || [ $PYRESULT -ne 0 ] || [[ "$PYVER" != "Python $BUILD_PYTHON_VERSION"* ]]; then
echo "SSL Result: $SSLRESULT - SSL Ver: $SSLVER - Py Result: $PYRESULT - Py Ver: $PYVER"
if [ $SSLRESULT -ne 0 ]; then
echo "sslresult -ne 0"
fi
if [[ "$SSLVER" != "OpenSSL $LINUX_BUILD_OPENSSL_VERSION "* ]]; then
echo "sslver not equal to..."
fi
if [ $PYRESULT -ne 0 ]; then
echo "pyresult -ne 0"
fi
if [[ "$PYVER" != "Python $BUILD_PYTHON_VERSION" ]]; then
echo "pyver not equal to..."
fi
cd ~
rm -rf ssl
rm -rf python
mkdir ssl
mkdir python
echo "RUNNING: apt upgrade..."
sudo apt-mark hold openssh-server
if [[ "$DIST_UPGRADE" == "true" ]]; then
sudo apt-get --yes upgrade
sudo apt-get --yes --with-new-pkgs upgrade
fi
echo "Installing build tools..."
sudo apt-get --yes install build-essential
echo "Installing deps for python3"
sudo cp -v /etc/apt/sources.list /tmp
sudo chmod a+rwx /tmp/sources.list
echo "deb-src http://archive.ubuntu.com/ubuntu/ $TRAVIS_DIST main" >> /tmp/sources.list
sudo cp -v /tmp/sources.list /etc/apt
sudo apt-get --yes update
sudo apt-get --yes install swig libpcsclite-dev
sudo apt-get --yes build-dep python3
sudo apt-get --yes install setuptools
# Compile latest OpenSSL
ls -l ${mypath}/sslinstalls
cp ${mypath}/sslinstalls/openssl-$LINUX_BUILD_OPENSSL_VERSION.tar.gz .
echo "Extracting OpenSSL..."
tar xf openssl-$LINUX_BUILD_OPENSSL_VERSION.tar.gz
cd openssl-$LINUX_BUILD_OPENSSL_VERSION
echo "Compiling OpenSSL $LINUX_BUILD_OPENSSL_VERSION..."
./config shared --prefix=$HOME/ssl --libdir=lib no-fips
echo "Running make for OpenSSL..."
make -j$cpucount -s
echo "Running make install for OpenSSL..."
make install_sw > /dev/null
cd ~
# Compile latest Python
echo "Downloading Python $BUILD_PYTHON_VERSION..."
curl -O --silent "https://www.python.org/ftp/python/${BUILD_PYTHON_VERSION}/Python-${BUILD_PYTHON_VERSION}.tar.xz"
echo "Extracting Python..."
tar xf "Python-${BUILD_PYTHON_VERSION}.tar.xz"
cd Python-${BUILD_PYTHON_VERSION}
echo "Compiling Python ${BUILD_PYTHON_VERSION}..."
safe_flags="--with-openssl=$HOME/ssl --enable-shared --prefix=${HOME}/python --with-ensurepip=upgrade --disable-test-modules"
unsafe_flags="--enable-optimizations --with-lto"
if [ "${TRAVIS_DIST}" == "focal" ] && [ "${PLATFORM}" == "arm64" ]; then
unsafe_flags=""
fi
if [ ! -e Makefile ]; then
echo "running configure with safe and unsafe"
./configure $safe_flags $unsafe_flags > /dev/null
fi
make -j$cpucount -s
RESULT=$?
echo "First make exited with $RESULT"
if [ $RESULT != 0 ]; then
echo "Trying Python compile again without unsafe flags..."
make clean
./configure $safe_flags > /dev/null
make -j$cpucount -s
echo "Sticking with safe Python for now..."
fi
echo "Installing Python..."
make install > /dev/null
cd ~
fi
python=~/python/bin/python3
pip=~/python/bin/pip3
cd $mypath
echo "Upgrading pip packages..."
sudo apt-get --yes install swig libpcsclite-dev libxslt1-dev
$pip install --upgrade pip
$pip install --upgrade packaging
$pip list --outdated | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip install -U
$pip cache remove lxml
$pip install --upgrade -r src/requirements.txt
$pip install wheel
#$pip install --upgrade git+https://github.com/pyinstaller/pyinstaller.git@$PYINSTALLER_VERSION
$pip install git+https://github.com/pyinstaller/pyinstaller.git@$PYINSTALLER_VERSION --force-reinstall

View File

@ -1,23 +0,0 @@
cd src
export gampath="dist/gamadv-xtd3"
rm -rf $gampath
mkdir -p $gampath
export gampath=$(readlink -e $gampath)
$python -OO -m PyInstaller --clean --distpath $gampath gam.spec
export gam="${gampath}/gam"
$gam version extended nooffseterror
export GAMVERSION=`$gam version simple | head -n 1 | cut -c1-7`
cp LICENSE $gampath/
cp license.rtf $gampath/
cp Gam*.txt $gampath/
cp cacerts.pem $gampath/
this_glibc_ver=$(ldd --version | awk '/ldd/{print $NF}')
GAM_ARCHIVE=gamadv-xtd3-$GAMVERSION-$GAMOS-$PLATFORM-glibc$this_glibc_ver.tar.xz
echo "GAM Archive:" $GAM_ARCHIVE
# tar will cd to dist and tar up gam/
tar -C dist/ --create --file $GAM_ARCHIVE --xz gamadv-xtd3
echo "PyInstaller GAM info:"
#$gam version extended
$gam version
echo "GAM packages:"
ls -l gamadv-xtd3-*.tar.xz

42
src/version_info.txt.in Normal file
View File

@ -0,0 +1,42 @@
# UTF-8
#
# For more details about fixed file info 'ffi' see:
# http://msdn.microsoft.com/en-us/library/ms646997.aspx
VSVersionInfo(
ffi=FixedFileInfo(
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
# Set not needed items to zero 0.
filevers={VERSION_TUPLE},
prodvers={VERSION_TUPLE},
# Contains a bitmask that specifies the valid bits 'flags'r
mask=0x3f,
# Contains a bitmask that specifies the Boolean attributes of the file.
flags=0x0,
# The operating system for which this file was designed.
# 0x4 - NT and there is no need to change it.
OS=0x4,
# The general type of file.
# 0x1 - the file is an application.
fileType=0x2,
# The function of the file.
# 0x0 - the function is not defined for this fileType
subtype=0x0,
# Creation date and time stamp.
date=(0, 0)
),
kids=[
StringFileInfo(
[
StringTable(
'040904b0',
[StringStruct('CompanyName', 'GAM-team'),
StringStruct('FileDescription', 'CLI for Google Workspace admins'),
StringStruct('FileVersion', '{VERSION}'),
StringStruct('LegalCopyright', 'Copyright (c) 2024 GAM team'),
StringStruct('OriginalFilename', 'gam.exe'),
StringStruct('ProductName', 'GAM'),
StringStruct('ProductVersion', '{VERSION}')])
]),
VarFileInfo([VarStruct('Translation', [1033, 1200])])
]
)

View File

@ -1,38 +0,0 @@
set GAMPLATFORM=gamadv-xtd3
set GAMVERSION=%1
set WIXVERSION=3.11
rmdir /q /s build
rmdir /q /s dist
del /q /f %GAMPLATFORM%-%GAMVERSION%-windows-x86.zip
del /q /f %GAMPLATFORM%-%GAMVERSION%-windows-x86.msi
del /q /f %GAMPLATFORM%-%GAMVERSION%-windows-x86_64.zip
del /q /f %GAMPLATFORM%-%GAMVERSION%-windows-x86_64.msi
rmdir /q /s %GAMPLATFORM%
c:\python38-32\scripts\pyinstaller --clean --noupx -F --distpath=%GAMPLATFORM% windows-gam.spec
xcopy LICENSE %GAMPLATFORM%\
xcopy license.rtf %GAMPLATFORM%\
xcopy gam-setup.bat %GAMPLATFORM%\
xcopy Gam*.txt %GAMPLATFORM%\
xcopy cacerts.pem %GAMPLATFORM%\
"%ProgramFiles%\7-Zip\7z.exe" a -tzip %GAMPLATFORM%-%GAMVERSION%-windows-x86.zip %GAMPLATFORM%\ -xr!.svn
del /q /f *.wixobj
del /q /f *.wixpdb
"%ProgramFiles(x86)%\WiX Toolset v%WIXVERSION%\bin\candle.exe" -arch x86 gam.wxs
"%ProgramFiles(x86)%\WiX Toolset v%WIXVERSION%\bin\light.exe" -ext "%ProgramFiles(x86)%\WiX Toolset v%WIXVERSION%\bin\WixUIExtension.dll" gam.wixobj -o %GAMPLATFORM%-%GAMVERSION%-windows-x86.msi
del /q /f *.wixpdb
rmdir /q /s %GAMPLATFORM%
c:\python38-64\scripts\pyinstaller --clean --noupx -F --distpath=%GAMPLATFORM% windows-gam.spec
xcopy LICENSE %GAMPLATFORM%\
xcopy license.rtf %GAMPLATFORM%\
xcopy gam-setup.bat %GAMPLATFORM%\
xcopy Gam*.txt %GAMPLATFORM%\
xcopy cacerts.pem %GAMPLATFORM%\
"%ProgramFiles%\7-Zip\7z.exe" a -tzip %GAMPLATFORM%-%GAMVERSION%-windows-x86_64.zip %GAMPLATFORM%\ -xr!.svn
del /q /f *.wixobj
del /q /f *.wixpdb
"%ProgramFiles(x86)%\WiX Toolset v%WIXVERSION%\bin\candle.exe" -arch x64 gam.wxs
"%ProgramFiles(x86)%\WiX Toolset v%WIXVERSION%\bin\light.exe" -ext "%ProgramFiles(x86)%\WiX Toolset v%WIXVERSION%\bin\WixUIExtension.dll" gam.wixobj -o %GAMPLATFORM%-%GAMVERSION%-windows-x86_64.msi
del /q /f *.wixpdb