Workaround for --disable-windows-build-signing --enable-dbgutil test builds

Change-Id: I8c14cfafd39b8575a5e1e236f965283718777416
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161663
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
(cherry picked from commit 344c887ed766cee0598cb77af17e6666fcbf5f90)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161673
diff --git a/external/onlineupdate/UnpackedTarball_onlineupdate.mk b/external/onlineupdate/UnpackedTarball_onlineupdate.mk
index e7f9a0c..d27a191 100644
--- a/external/onlineupdate/UnpackedTarball_onlineupdate.mk
+++ b/external/onlineupdate/UnpackedTarball_onlineupdate.mk
@@ -18,4 +18,13 @@ $(eval $(call gb_UnpackedTarball_add_patches,onlineupdate, \
    external/onlineupdate/lo.patch \
))

# The update maintenance service that is used on Windows has a couple of checks that files in the
# to-be-updated installation set are signed, which would fail for --disable-windows-build-signing;
# so, as a HACK for debugging purposes, silence those problematic checks for --enable-dbgutil:
ifeq ($(OS)-$(WINDOWS_BUILD_SIGNING)-$(ENABLE_DBGUTIL),WNT-FALSE-TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,onlineupdate, \
    external/onlineupdate/unsigned-hack.patch \
))
endif

# vim: set noet sw=4 ts=4:
diff --git a/external/onlineupdate/unsigned-hack.patch b/external/onlineupdate/unsigned-hack.patch
new file mode 100644
index 0000000..7ef3b76
--- /dev/null
+++ b/external/onlineupdate/unsigned-hack.patch
@@ -0,0 +1,20 @@
--- onlineupdate/source/service/workmonitor.cpp
+++ onlineupdate/source/service/workmonitor.cpp
@@ -395,7 +395,7 @@
   }
 
 #ifndef DISABLE_UPDATER_AUTHENTICODE_CHECK
-  return DoesBinaryMatchAllowedCertificates(installDir, updater);
+  return DoesBinaryMatchAllowedCertificates(installDir, updater)||true;
 #else
   return true;
 #endif
@@ -732,7 +732,7 @@
           if (!WriteStatusFailure(argv[4], SERVICE_INSTALL_DIR_REG_ERROR)) {
             LOG_WARN(("Could not write update.status for previous failure."));
           }
-          return FALSE;
+          //return FALSE;
         }
         RegCloseKey(baseKey);
       } else {