From 39586e5876dcee781b1d9df3d790567af83ce6b0 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 21 Nov 2019 11:32:37 +0100 Subject: [PATCH] Fork 78.0.3904.108 from TIS --- .gitattributes | 1 + .gitignore | 3 + WAPT/changelog.txt | 1 + WAPT/control | 38 +++++ WAPT/icon.png | Bin 0 -> 2484 bytes WAPT/wapt.psproj | 295 +++++++++++++++++++++++++++++++++ googlechromestandaloneenterprise.msi | 3 + googlechromestandaloneenterprise64.msi | 3 + master_preferences.j2 | 30 ++++ setup.py | 143 ++++++++++++++++ 10 files changed, 517 insertions(+) create mode 100644 .gitattributes create mode 100644 WAPT/changelog.txt create mode 100644 WAPT/control create mode 100644 WAPT/icon.png create mode 100644 WAPT/wapt.psproj create mode 100644 googlechromestandaloneenterprise.msi create mode 100644 googlechromestandaloneenterprise64.msi create mode 100644 master_preferences.j2 create mode 100644 setup.py diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..90c0ba7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.msi filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/.gitignore b/.gitignore index e61bca2..45a2896 100644 --- a/.gitignore +++ b/.gitignore @@ -114,3 +114,6 @@ dmypy.json # Pyre type checker .pyre/ +WAPT/certificate.crt +WAPT/manifest.sha256 +WAPT/signature.sha256 \ No newline at end of file diff --git a/WAPT/changelog.txt b/WAPT/changelog.txt new file mode 100644 index 0000000..866bb26 --- /dev/null +++ b/WAPT/changelog.txt @@ -0,0 +1 @@ +https://support.google.com/chrome/a/answer/7679408 \ No newline at end of file diff --git a/WAPT/control b/WAPT/control new file mode 100644 index 0000000..04e65ff --- /dev/null +++ b/WAPT/control @@ -0,0 +1,38 @@ +package : fws-chrome +version : 78.0.3904.108-6 +architecture : all +section : base +priority : optional +name : Google Chrome +categories : Internet +maintainer : Daniel Berteaud +description : Google Chrome is a web browser created by Google and based on the open source project Chromium +depends : +conflicts : +maturity : PROD +locale : all +target_os : windows +min_os_version : 6.1 +max_os_version : +min_wapt_version : 1.7 +sources : https://cloud.google.com/chrome-enterprise/browser/download/ +installed_size : +impacted_process : chrome.exe +description_fr : Google Chrome est un navigateur web créé par Google et basé sur le projet open source Chromium +description_pl : +description_de : +description_es : +audit_schedule : +editor : Google +keywords : browser,navigateur,Google,Chrome,Chromium +licence : Freeware +homepage : https://www.google.com/chrome/ +package_uuid : a154eb6c-cd7d-4e19-9d75-43596d8595a7 +valid_from : +valid_until : +forced_install_on : +signer : Daniel Berteaud +signer_fingerprint: 3c9415559e2dedbc4390e3faa2c28d3b67265baa5b35902d2764d9e41c3b3f0a +signature : tZph2uBpBxXMgtr7lxh6/Qa5U3UEaeK67CS7NAwx0/hmI9hlSmtWTPYrhOUAa6rDjTOwY1hR76ojdLlYLRK4W7yzZG0ej6QxammWEh3qzh47mHADMwXiVxzktvYfrBj/mVRjdX/G5Z0hPHqCyAlMraXZkVa9HnWqY/FNswkOyYmayEW5HTJg+K9JE8yEGnd5VAnzKqrBIXo2aTcwCDcctiNqrTEOhcrNBZfA0gcC/yHwbKkmeP3Z1zLdMOUyIazsxZ5qqfeHRzVHXAG9u1wPFaQjNJt70eMUdXZ4UlmVWTMzBNlcMJnDo65LjL+LkRiunTYVKNSUSKzG8WyS3wygmg== +signature_date : 2019-11-21T11:12:26.124000 +signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,signer,signer_fingerprint,signature_date,signed_attributes \ No newline at end of file diff --git a/WAPT/icon.png b/WAPT/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a01304a55a13078ed73a59705179954157e0caba GIT binary patch literal 2484 zcmV;l2}|~gP)>hK5H1EpTM;kRTBTmG+_6#u2)W?}P!xnvK@B|nz9%`!$;mlM@Uq?6>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GQrAQmd<-DS!PgDBfJKKVzt8wn8Z-!_;F5T~dt~Bi6HNI~ z!DTz0daKk~Mw6(F<~mrSPnZzUGjPM#Ky{v-4oo++vMLvLY4~tXxDM6sUE=0=O!}*N zqFi=+!;{y^d#0TR#z*048(ZXszFFuJ*nNAzkT*pKXOeig8cy+}V1i63>C!f%K2j91eBM#;q zUQU5z64l6_svXWTibkQoX+y1fDFq&X?;fMQ9|ZvSHZj-1uVFBt`#T$WL{$zU>UVEe z=wQ@lnZW>fdk{>`Qw{v<3upOEj9I4~9dg>#5wb=fI(abnt-yC73peQ2lc2#UylOM( z8Vd;sye+`ngJ8h1J}`K;5`$eI+u0|NfWZWhc`Jc8Na2+^qZo`XHUn6NUG;7gczYoC zV?gGLJPCiI?J&T%vU$IY77c!`oj1bzUNyWbN6%z{)X!X^UPn~vkcs2&Z8EOweW*F{ zB8A5!7M?b^VU3jS^q$K{V5}v10g-naaJ2DDSf2;N%Cq9Ba8zKX?@2AI%m&@LLildj z9PojrduRZ%>vuxYsWjL2f!efm1ALlz@U&eh_WM*8QJLLD1;e6$rfX?s7NOS<=0bks zUN~et58Zc6F#O;iA$(nZy%F+G?SY8>T3Ed=6J|RV3y3@!ect7O&&1)Cn>ouWm_gZ$ zkOoMF5$9}_wH!kDdTEgw!jM7{d}CuO!^B~qI#}}^DEeK(n4sQFgqLR>_ZMj;I~MeNp|Hx$t56ok*?|2Sz`$PcSfv^WEmp%4 z6#apwhTj($-FOtdQlM4soP*%sdKp6dYeXy+SyjYCokmR2$txz?}e6Y9c1WkVekrq?uu z=ouo8^lG`9&?_YwVE!hFb;39wPKZWr3VM-xp+-tH@u4MJeQ0Us$YQ;>fmigI@b1wJ zfNPR@dbyw{Dwt`G8<}b5mCd#YB#VCN18;9}R#0i}SX`#A4J}n)3MtMQxOqh}GTY3v yBMr>9#9f+c;nmKx@^|29|4;l^gCCC-C20000= Version(package_version): + print('File %s version is : %s ' % (chrome_bin_path,get_file_properties(chrome_bin_path)['ProductVersion'])) + print('Package version is : %s ' % package_version) + uninstallkey_from_file = get_msi_properties(bin_name)['ProductCode'] + if uninstall_key_exists(uninstallkey_from_file): + uninstallkey.append(uninstallkey_from_file) + skip = True + + if (not skip) or (force == True) : + def get_version_chrome(key): + return get_file_properties(chrome_bin_path)['ProductVersion'] + install_msi_if_needed(bin_name + ,min_version=package_version + ,get_version=get_version_chrome) + + # Disabling Google Chrome auto updates + for task in ['GoogleUpdateTaskMachineCore', 'GoogleUpdateTaskMachineUA']: + if task_exists(task): + disable_task(task) + + registry_setstring(HKEY_LOCAL_MACHINE,'SOFTWARE\\Policies\\Google\\Update','UpdateDefault',0,type=REG_DWORD) + registry_setstring(HKEY_LOCAL_MACHINE,'SOFTWARE\\Policies\\Google\\Update','DisableAutoUpdateChecksCheckboxValue',1,type=REG_DWORD) + registry_setstring(HKEY_LOCAL_MACHINE,'SOFTWARE\\Policies\\Google\\Update','AutoUpdateCheckPeriodMinutes',0,type=REG_DWORD) + if iswin64(): + registry_setstring(HKEY_LOCAL_MACHINE,'SOFTWARE\\Wow6432Node\\Google\\Update','UpdateDefault',0,type=REG_DWORD) + registry_setstring(HKEY_LOCAL_MACHINE,'SOFTWARE\\Wow6432Node\\Google\\Update','DisableAutoUpdateChecksCheckboxValue',1,type=REG_DWORD) + registry_setstring(HKEY_LOCAL_MACHINE,'SOFTWARE\\Wow6432Node\\Google\\Update','AutoUpdateCheckPeriodMinutes',0,type=REG_DWORD) + + # Disabling Google Chrome telemtry + registry_setstring(HKEY_LOCAL_MACHINE,'SOFTWARE\\Policies\\Explorer\\DisallowRun','chrome_telemetry','Software_Reporter_Tool.exe',type=REG_SZ) + + # Adding master preferences file + jinja2 = Environment( + loader=FileSystemLoader(os.getcwd()), + trim_blocks=True + ) + open(makepath(chrome_app_path,'master_preferences'),'w').write( + jinja2.get_template('master_preferences.j2').render( + web_home_page = variables['web_home_page'] + ) + ) + + # Return used storage of the program. (place it on the bottom) + get_disk_free_space_after = get_disk_free_space(programfiles) + free_space_after_diff = get_disk_free_space_before - get_disk_free_space_after + print("Storage used: " + str(free_space_after_diff)) + + +def uninstall(): + print('uninstalling %s' % control.asrequirement()) + + if uninstall_key_exists('Google Chrome'): + if not "msiexec" in ' '.join(list(uninstall_cmd('Google Chrome'))).lower(): + versionsoft = get_file_properties(chrome_bin_path)['ProductVersion'] + run('"%s" --uninstall --system-level --force-uninstall --qn' % makepath(install_location('Google Chrome'),versionsoft,'Installer','setup.exe'),accept_returncodes=[19]) + + +def session_setup(): + print('Session setup for %s' % control.asrequirement()) + print('Disabling Telemetry') + + swreporter_path=makepath(user_local_appdata,'Google','Chrome','User Data','SwReporter') + + if isdir(swreporter_path): + remove_tree(swreporter_path) + + +def update_package(): + print('Update package content from upstream binary sources') + from waptpackage import PackageEntry + import requests + import json + + # Get latest version number from official website + latest_version = json.loads(wgets('http://omahaproxy.appspot.com/all.json?os=win64&channel=stable'))[0]['versions'][0]['version'] + pe = PackageEntry() + control = pe.load_control_from_wapt(os.getcwd()) + current_version = control['version'].split('-',1)[0] + + base_url = 'https://dl.google.com/tag/s/dl/chrome/install/' + if Version(latest_version) > Version(current_version): + print('Latest ' + control.name + ' version is: ' + latest_version) + + for file in ['googlechromestandaloneenterprise64.msi', 'googlechromestandaloneenterprise.msi']: + url_dl = base_url + file + + # Downloading latest binaries + if isfile(file): + remove_file(file) + + print('Downloading ' + file + ' from ' + url_dl) + wget(url_dl, file) + + pe.version = latest_version + '-0' + pe.maturity = 'PREPROD' + pe.save_control_to_wapt(os.getcwd()) + print('Package updated to %s' % latest_version) + + else: + print('This package is already up-to-date') + for file in ['googlechromestandaloneenterprise64.msi', 'googlechromestandaloneenterprise.msi']: + if not isfile(file): + url_dl = base_url + file + print('%s file is missing, downloading it from %s' % (file, url_dl)) + wget(url_dl, file) + +if __name__ == '__main__': + update_package() +