external/onlineupdate/UnpackedTarball_onlineupdate.mk | 1 + external/onlineupdate/inifiles.patch | 11 +++++++++++ 2 files changed, 12 insertions(+)
New commits: commit 15159fabd8c6c994a0010fc17f8b471263bb5380 Author: Stephan Bergmann <[email protected]> AuthorDate: Fri Jan 12 14:00:35 2024 +0100 Commit: Michael Stahl <[email protected]> CommitDate: Mon Jan 15 10:51:15 2024 +0100 Windows MAR update issues with program/{setup,version}.ini At least on Windows, our MSI install sets differ from our archive install sets in that their program/setup.ini and program/version.ini files have differing content: For one, they have ProductCode, UpdateCode, and MsiProductVersion (the latter only in version.ini) lines that have empty values in archive install sets and non-empty values in MSI install sets. For another, setup.ini in MSI install sets has additional ALLUSERS, BASISINSTALLLOCATION, FINDPRODUCT, INSTALLLOCATION, OFFICEINSTALLLOCATION, and UREINSTALLLOCATION lines that are completely missing in archive install sets. This is a problem when building MAR updates with create-partial-info: Both ini files contain the buildid, so will always change between builds, so will always be recorded in MAR updates. But when they are recorded as "patch", actually applying the MAR update file (generated from archive install sets) to an installation (originating from an MSI install set) will fail, as the size of the ini file in the installation doesn't match the expected size recorded in the MAR update file. I naively but strongly assume that those differences in ini file content are historic junk by now that have no practical consequences (i.e., I assume that no code actually makes use of those ini file entries). Which would mean that it should actually be harmless to replace an installation's (MSI-originating) ini files with smaller (archive-originating) ones during an update. So for now I work around that problem by always forcing these two files to be recorded as a full "add" rather than as a "patch" in the generated MAR update file. In parallel, I will look into the history of all those problematic ini file entries, and will try to verify that they are indeed unused junk, and will try to clean that up. (So that ultimately there will be no more differences between MSI and archive versions.) Change-Id: I9b22bd83889b569598162c37f9bf1a0857177063 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161974 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 9f7d7fe531527f9039bbbca5e6e75f09b2d175f2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161992 Reviewed-by: Michael Stahl <[email protected]> diff --git a/external/onlineupdate/UnpackedTarball_onlineupdate.mk b/external/onlineupdate/UnpackedTarball_onlineupdate.mk index 166ede0a6b9b..43c189b84a18 100644 --- a/external/onlineupdate/UnpackedTarball_onlineupdate.mk +++ b/external/onlineupdate/UnpackedTarball_onlineupdate.mk @@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,onlineupdate, \ ifeq ($(OS),WNT) $(eval $(call gb_UnpackedTarball_add_patches,onlineupdate, \ external/onlineupdate/cygpath.patch \ + external/onlineupdate/inifiles.patch \ )) endif diff --git a/external/onlineupdate/inifiles.patch b/external/onlineupdate/inifiles.patch new file mode 100644 index 000000000000..1d285f09af1b --- /dev/null +++ b/external/onlineupdate/inifiles.patch @@ -0,0 +1,11 @@ +--- tools/update-packaging/make_incremental_update.sh ++++ tools/update-packaging/make_incremental_update.sh +@@ -226,7 +227,7 @@ + patchsize=$(get_file_size "$patchfile") + fullsize=$(get_file_size "$workdir/$f") + +- if [ $patchsize -lt $fullsize ]; then ++ if [ $patchsize -lt $fullsize ] && [ "$f" != program/setup.ini ] && [ "$f" != program/version.ini ]; then + make_patch_instruction "$f" "$updatemanifestv3" + mv -f "$patchfile" "$workdir/$f.patch" + rm -f "$workdir/$f"
