Source: gcab
Version: 0.7-3
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timezone toolchain
X-Debbugs-Cc: [email protected]
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed
that gcab generates .cab files that are not reproducible. This
affects packages such as fwupd.
This is because the embedded dates are encoded with the current
timezone.
Patch attached.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` [email protected] / chris-lamb.co.uk
`-
diff --git a/libgcab/gcab-file.c b/libgcab/gcab-file.c
index b55fbb5..e367610 100644
--- a/libgcab/gcab-file.c
+++ b/libgcab/gcab-file.c
@@ -136,7 +136,7 @@ gcab_file_update_info (GCabFile *self, GFileInfo *info)
g_file_info_get_modification_time (info, &tv);
time = tv.tv_sec;
- m = localtime (&time);
+ m = gmtime (&time);
self->cfile.name = self->name;
self->cfile.usize = g_file_info_get_size (info);