Skip to content
Snippets Groups Projects
Unverified Commit e51dec66 authored by boklm's avatar boklm
Browse files

Bug 40844: Fix reproducibility issue in hfsplus-tools when hwclock is set to local time

parent 1cc88d39
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,7 @@ tar -xf diskdev_cmds-[% c("version") %].tar.gz ...@@ -11,6 +11,7 @@ tar -xf diskdev_cmds-[% c("version") %].tar.gz
cd diskdev_cmds-[% c("version") %] cd diskdev_cmds-[% c("version") %]
patch -p1 < $rootdir/newfs_hfs.diff patch -p1 < $rootdir/newfs_hfs.diff
patch -p1 < $rootdir/ignore-timezone.diff
make -j[% c("num_procs") %] make -j[% c("num_procs") %]
......
...@@ -21,3 +21,6 @@ input_files: ...@@ -21,3 +21,6 @@ input_files:
# exist on Linux (at that path) and is not required on Linux either, and make # exist on Linux (at that path) and is not required on Linux either, and make
# the UUID deterministic. # the UUID deterministic.
- filename: newfs_hfs.diff - filename: newfs_hfs.diff
# Remove UTCToLocal conversion to avoid a different result when hwclock
# is set to local time or utc time (tor-browser-build#40844)
- filename: ignore-timezone.diff
diff -ru diskdev_cmds-540.1.linux3/newfs_hfs.tproj/makehfs.c diskdev_cmds-540.1.linux3.n/newfs_hfs.tproj/makehfs.c
--- diskdev_cmds-540.1.linux3/newfs_hfs.tproj/makehfs.c 2012-02-02 23:36:59.000000000 +0100
+++ diskdev_cmds-540.1.linux3.n/newfs_hfs.tproj/makehfs.c 2023-04-17 13:59:41.993000000 +0200
@@ -463,8 +463,7 @@
}
hp->lastMountedVersion = kHFSPlusMountVersion;
- /* NOTE: create date is in local time, not GMT! */
- hp->createDate = UTCToLocal(defaults->createDate);
+ hp->createDate = defaults->createDate;
hp->modifyDate = defaults->createDate;
hp->backupDate = 0;
hp->checkedDate = defaults->createDate;
...@@ -45,7 +45,7 @@ test -f "$libdmg_file" || \ ...@@ -45,7 +45,7 @@ test -f "$libdmg_file" || \
"You can build it with:" \ "You can build it with:" \
" ./rbm/rbm build --target no_containers libdmg-hfsplus" \ " ./rbm/rbm build --target no_containers libdmg-hfsplus" \
"See var/deps in projects/libdmg-hfsplus/config for the list of build dependencies" "See var/deps in projects/libdmg-hfsplus/config for the list of build dependencies"
hfstools_file="$script_dir/../../out/hfsplus-tools/hfsplus-tools-540.1.linux3-66de66.tar.gz" hfstools_file="$script_dir/../../out/hfsplus-tools/hfsplus-tools-540.1.linux3-81ff5b.tar.gz"
test -f "$hfstools_file" || \ test -f "$hfstools_file" || \
exit_error "$hfstools_file is missing." \ exit_error "$hfstools_file is missing." \
"You can build it with:" \ "You can build it with:" \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment