Rebase omaha
See original GitHub issuehttps://github.com/google/omaha has been updated since we forked(https://github.com/brave/omaha). Our brave omaha is two years old behind latest.
Omaha started to support latest VS 2019 and Windows SDK 10.0.18362.1. also Python 2.7.x!
Rebase to latest https://github.com/brave/omaha/commit/f3558c7a2aaef352069c3dc87f9e68e0bf9b189f
Related devops PRs - https://github.com/brave/devops/issues/3597, https://github.com/brave/devops/issues/3591
Test
Test scenario with nightly stub and standalone installer. (Make sure that omaha updater is not installed on Windows. This can be done by uninstalling all brave browsers and waiting some time(or reboot) for uninstalling it by itself)
1 (for dev). build sub and standalone installer by yarn create_dist Release --skip_signing --build_omaha --tag_ap=x64-ni --channel=nightly
2. Run stub nightly installer and check latest one is installed
3. Uninstall all brave brrowser to remove omaha updater
4. Run standalone installer and check standalone’s version is installed.
5. Check update via browser and verify update check doesn’t have error
6. Check update via browser and veirfy new update is installed if server has latest one.
Rebase setup
- Follow https://github.com/google/omaha/blob/master/doc/DeveloperSetupGuide.md
- libzip-1.5.2 is used instead of recommended one from above docs.(Seems not compatible. got build error)
Build errors what I met after the rebase
- First failure:
'csc.exe' is not recognized as an internal or external command
- Fixed by installing .NET Framework 2.0
$ ./hammer-brave.bat
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.14
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64_x86'
scons: Reading SConscript files ...
scons: warning: No installed VCs
File "C:\swtoolkit\site_scons\site_init.py", line 426, in SiteInitMain
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\swtoolkit\site_scons\site_init.py", line 426, in SiteInitMain
scons: warning: No installed VCs
File "C:\swtoolkit\site_scons\site_tools\target_platform_windows.py", line 283, in generate
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\swtoolkit\site_scons\site_tools\target_platform_windows.py", line 283, in generate
Building versions: 1.3.99.0
python C:\Projects\brave\brave-browser\src\brave\vendor\omaha\omaha\tools\proxy_clsid_utils.py
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: scons-out
________Compiling resource scons-out\dbg-win\obj\clickonce\clickonce_bootstrap.res
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Copyright (C) Microsoft Corporation. All rights reserved.
csc.exe /target:winexe /platform:x86 /out:scons-out\dbg-win\obj\clickonce\clickonce_bootstrap_unsigned.exe /win32res:scons-out\dbg-win\obj\clickonce\clickonce_bootstrap.res clickonce\clickonce_bootstrap.cs
'csc.exe' is not recognized as an internal or external command,
operable program or batch file.
scons: *** [scons-out\dbg-win\obj\clickonce\clickonce_bootstrap_unsigned.exe] Error 1
scons: building terminated because of errors.
- Second build error -
libprotobuf.lib(zero_copy_stream_impl.obj) : error LNK2019
- fixed by using 3.6.0 version. Latest protobuf has more new files that Omaha doesn’t know.
- Source file list are defined in omaha/base/build.scons
libprotobuf.lib(zero_copy_stream_impl.obj) : error LNK2019: unresolved external symbol "int __cdecl google::protobuf::io::win32::close(int)" (?close@win32@io@protobuf@google@@YAHH@Z) referenced in function "int __cdecl google::protobuf::io::`anonymous namespace'::close_no_eintr(int)" (?close_no_eintr@?A0x33e3119a@io@protobuf@google@@YAHH@Z)
libprotobuf.lib(zero_copy_stream_impl.obj) : error LNK2019: unresolved external symbol "int __cdecl google::protobuf::io::win32::read(int,void *,unsigned int)" (?read@win32@io@protobuf@google@@YAHHPAXI@Z) referenced in function "public: virtual int __thiscall google::protobuf::io::FileInputStream::CopyingFileInputStream::Read(void *,int)" (?Read@CopyingFileInputStream@FileInputStream@io@protobuf@google@@UAEHPAXH@Z)
libprotobuf.lib(zero_copy_stream_impl.obj) : error LNK2019: unresolved external symbol "int __cdecl google::protobuf::io::win32::write(int,void const *,unsigned int)" (?write@win32@io@protobuf@google@@YAHHPBXI@Z) referenced in function "public: virtual bool __thiscall google::protobuf::io::FileOutputStream::CopyingFileOutputStream::Write(void const *,int)" (?Write@CopyingFileOutputStream@FileOutputStream@io@protobuf@google@@UAE_NPBXH@Z)
scons-out\dbg-win\obj\goopdate\goopdate_unsigned.dll : fatal error LNK1120: 3 unresolved externals
scons: *** [scons-out\dbg-win\obj\goopdate\goopdate_unsigned.dll] Error 1120
scons: building terminated because of errors.
- Third build error -
'mage' is not recognized as an internal or external command
- fixed by set “OMAHA_NETFX_TOOLS_DIR=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools” in hammer-brave.bat
"C:\Go/bin/go.exe" run C:\Projects\brave\brave-browser\src\brave\vendor\omaha\omaha/../common/certificate_tag/certificate_tag.go -set-superfluous-cert-tag=Gact2.0Omaha -padded-length=8206 -out scons-out\dbg-win\obj\installers\GoogleUpdateSetup.exe scons-out\dbg-win\obj\installers\authenticode_GoogleUpdateSetup.exe
Install file: "scons-out\dbg-win\obj\installers\GoogleUpdateSetup.exe" as "scons-out\dbg-win\clickonce_deployment\bin\GoogleUpdateSetup.exe"
'mage' is not recognized as an internal or external command,
operable program or batch file.
scons: *** [scons-out\dbg-win\obj\clickonce\clickonce_bootstrap.exe.manifest] Error 1
scons: building terminated because of errors.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top GitHub Comments
Thanks @diracdeltas for adding the
security
label 😄 As this client code is behind quite a bit, it presents a security problem alsoLabeling this as
QA/No
as the above will be checked during the1.15.x
release call using thec:\Omaha log.txt
logs to make sure that the delta files are being used.