Your message dated Wed, 20 Apr 2016 22:20:22 +0000
with message-id <[email protected]>
and subject line Bug#815252: fixed in colord 1.3.2-1
has caused the Debian Bug report #815252,
regarding colord: please make the build reproducible (timestamps)
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
815252: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815252
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: colord
Version: 1.2.12-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timestamps
Control: block -1 by 814883
Hi!
While working on the “reproducible builds” effort [1], we have noticed
that colord could not be built reproducibly.
The attached patches remove extra timestamps when generating CMF and
spectra and implement support for SOURCE_DATE_EPOCH. Together with a
patched lcms2, they make colord reproducible in our current experimental
framework.
[1]: https://wiki.debian.org/ReproducibleBuilds
--
Lunar .''`.
[email protected] : :Ⓐ : # apt-get install anarchism
`. `'`
`-
From 97d54abbf3240a14b271ac7f8f79331adbf1a219 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <[email protected]>
Date: Sat, 20 Feb 2016 12:48:47 +0100
Subject: [PATCH 1/2] Stop writing a CREATED header in CMF and spectra
For the same input `cd-it8 create-cmf` and `cd-it8 create-sp`
will create the exact same output except for the creation time.
As the header is optional and prevents CMF and spectra to be built
reproducibly, we use cd_it8_set_enable_created() to remove it
from the output.
---
client/cd-it8.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/client/cd-it8.c b/client/cd-it8.c
index 987776a..26bc26d 100644
--- a/client/cd-it8.c
+++ b/client/cd-it8.c
@@ -303,6 +303,7 @@ cd_util_create_cmf (CdUtilPrivate *priv,
if (dot != NULL)
*dot = '\0';
cd_it8_set_title (cmf, title);
+ cd_it8_set_enable_created (cmf, FALSE);
/* save */
file = g_file_new_for_path (values[0]);
@@ -464,6 +465,7 @@ cd_util_create_sp (CdUtilPrivate *priv,
if (dot != NULL)
*dot = '\0';
cd_it8_set_title (cmf, title);
+ cd_it8_set_enable_created (cmf, FALSE);
/* save */
file = g_file_new_for_path (values[0]);
--
2.7.0
From fc72fa8fe89e1eae4cbda2f4eed806756e1fb88a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <[email protected]>
Date: Sat, 20 Feb 2016 12:55:57 +0100
Subject: [PATCH 2/2] cd-create-profile: Add support for SOURCE_DATE_EPOCH
When creating profiles, the current time used to be written in
the generated header as the creation date/time. This prevents
cd-create-profile from generating the same bytes, despite
getting the same input. Also, as cd-create-profile transforms
an XML description into a binary ICC profile, the current time
does not reflect will when the profile was actually created.
So we now use the modification time of the source file as the
creation date/time. However, if the SOURCE_DATE_EPOCH environment
variable is specified, its value will be used instead to ease
reproducible builds.
For more details about SOURCE_DATE_EPOCH, see
https://reproducible-builds.org/specs/source-date-epoch/
This uses cmsSetHeaderCreationDateTime() and thus requires a
version of lcms2 with this feature.
---
client/cd-create-profile.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/client/cd-create-profile.c b/client/cd-create-profile.c
index d9159a3..f0edee9 100644
--- a/client/cd-create-profile.c
+++ b/client/cd-create-profile.c
@@ -22,10 +22,14 @@
#include "config.h"
#include <glib/gi18n.h>
+#include <glib/gstdio.h>
#include <gio/gio.h>
#include <locale.h>
#include <lcms2.h>
#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <stdio.h>
#include <math.h>
#include <colord-private.h>
@@ -686,6 +690,55 @@ cd_util_icc_set_metadata_coverage (CdIcc *icc, GError **error)
}
/**
+ * cd_util_adjust_creation_time:
+ **/
+static gboolean
+cd_util_adjust_creation_time (CdUtilPrivate *priv, const char *source_filename, GError **error)
+{
+ GStatBuf st;
+ struct tm *creation_time;
+ time_t build_date = 0;
+ char *source_date_epoch_string;
+ unsigned long long source_date_epoch;
+ char *endptr;
+
+ /* adjust creation time to match the XML one or SOURCE_DATE_EPOCH if specified and older */
+ source_date_epoch_string = getenv ("SOURCE_DATE_EPOCH");
+ if (source_date_epoch_string) {
+ errno = 0;
+ source_date_epoch = strtoull (source_date_epoch_string, &endptr, 10);
+ if ((source_date_epoch == ERANGE && (source_date_epoch == ULLONG_MAX || source_date_epoch == 0))
+ || (errno != 0 && source_date_epoch == 0)) {
+ g_set_error (error, 1, 0, "Environment variable $SOURCE_DATE_EPOCH: strtoull: %s\n", g_strerror (errno));
+ return FALSE;
+ }
+ if (endptr == source_date_epoch_string) {
+ g_set_error (error, 1, 0, "Environment variable $SOURCE_DATE_EPOCH: No digits were found: %s\n", endptr);
+ return FALSE;
+ }
+ if (*endptr != '\0') {
+ g_set_error (error, 1, 0, "Environment variable $SOURCE_DATE_EPOCH: Trailing garbage: %s\n", endptr);
+ return FALSE;
+ }
+ if (source_date_epoch > ULONG_MAX) {
+ g_set_error (error, 1, 0, "Environment variable $SOURCE_DATE_EPOCH: value must be smaller than or equal to: %lu but was found to be: %llu \n", ULONG_MAX, source_date_epoch);
+ return FALSE;
+ }
+ build_date = source_date_epoch;
+ }
+
+ if (g_stat (source_filename, &st) >= 0) {
+ if (!build_date || st.st_mtime <= build_date) {
+ build_date = st.st_mtime;
+ }
+ }
+ if ((creation_time = gmtime (&build_date)) != NULL) {
+ cmsSetHeaderCreationDateTime (priv->lcms_profile, creation_time);
+ }
+ return TRUE;
+}
+
+/**
* cd_util_create_from_xml:
**/
static gboolean
@@ -764,6 +817,10 @@ cd_util_create_from_xml (CdUtilPrivate *priv,
cd_dom_get_node_data (tmp));
}
+ ret = cd_util_adjust_creation_time(priv, filename, error);
+ if (!ret)
+ return FALSE;
+
/* add CMS defines */
cd_icc_add_metadata (priv->icc,
CD_PROFILE_METADATA_CMF_PRODUCT,
--
2.7.0
signature.asc
Description: Digital signature
--- End Message ---
--- Begin Message ---
Source: colord
Source-Version: 1.3.2-1
We believe that the bug you reported is fixed in the latest version of
colord, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Christopher James Halse Rogers <[email protected]> (supplier of updated colord
package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Tue, 19 Apr 2016 17:27:34 +1000
Source: colord
Binary: libcolord-dev libcolord2 colord colord-sensor-argyll colord-data
gir1.2-colord-1.0 libcolorhug-dev libcolorhug2 gir1.2-colorhug-1.0
Architecture: source
Version: 1.3.2-1
Distribution: unstable
Urgency: medium
Maintainer: Christopher James Halse Rogers <[email protected]>
Changed-By: Christopher James Halse Rogers <[email protected]>
Description:
colord - system service to manage device colour profiles -- system daemon
colord-data - system service to manage device colour profiles -- data files
colord-sensor-argyll - system service to manage device colour profiles --
argyll sensor
gir1.2-colord-1.0 - GObject introspection data for the colord library
gir1.2-colorhug-1.0 - GObject introspection data for the colorhug library
libcolord-dev - system service to manage device colour profiles -- development
fi
libcolord2 - system service to manage device colour profiles -- runtime
libcolorhug-dev - library to access the ColorHug colourimeter -- development
files
libcolorhug2 - library to access the ColorHug colourimeter -- runtime
Closes: 780625 815252
Changes:
colord (1.3.2-1) unstable; urgency=medium
.
* New upstream 1.3.2 release (Closes: 815252)
* Add new symbols to libcolord2.symbols
* Install systemd user service and tmpfiles.d snippets
* Install new OceanOptics Spark sensor driver
* Demote colord to a Suggests of libcolord2 (Closes: 780625)
* Add new symbols to libcolorhug2
* Bump Standards-Version; no changes required.
* Retrospectively wrap 1.2.12-1's changelog to 80 characters.
* Cherry-pick 5256a116:
libcolord: Fix an assert failure when connecting to sensors.
Checksums-Sha1:
e32249d0a417d925cc54680125bd1022aa04d673 2880 colord_1.3.2-1.dsc
6e921b03c3575bf4b1f9adfddcd2891541e8ef82 1235968 colord_1.3.2.orig.tar.xz
39f38949eab6511fa346667afff8cbde121f3fc7 21848 colord_1.3.2-1.debian.tar.xz
Checksums-Sha256:
953e9e5464f6536ccebc4ee3d122667a19a3250526f92e26989e76fa6ab3a172 2880
colord_1.3.2-1.dsc
d4ab3f11ec5e98d1079242fda7ad0a84a51da93572405561362a6ce2c274b8f5 1235968
colord_1.3.2.orig.tar.xz
a9278b1a6c7137d1af3ecc03d2b2e88f2a0c1476156297cb2a9de93b9b85f61f 21848
colord_1.3.2-1.debian.tar.xz
Files:
5fdb7984211e8b4e02d83e26f80b1ace 2880 graphics optional colord_1.3.2-1.dsc
ceea6df374a2c36a8a4bafe50b11cdd1 1235968 graphics optional
colord_1.3.2.orig.tar.xz
3b9b48f773888844b486fb9cc8ba35d7 21848 graphics optional
colord_1.3.2-1.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJXF/sPAAoJEGrh3w1gjyLcm3sP/RTiQ1XeMSKxrPCrSPsq1CGK
aZc5r3dyw4axV1Y21UySEaYenOEmFJ+EXuAEr0meceNTg9iSI3TaLE9HrUJwcQHm
/yiGXsHkHaysSZ5C2rNWHpSvy3hcwEAoTp/JLUdW8SF12t3Yz0KE2cwFoWV27fYA
IRPJ6TKuhyz/G/suCZ94Mq9qhdw4klTQpruljdus6gID52vPltEdPyWii1qEy1Uc
+qdwYMC/SEp216FclWaBADppak652xPwNrbmD8w+s/pfpF7r+5du7thJAL/Q3HFi
K3m22GswgVVIPL2IfYiUg664auKSr4hkeTlNx4UyFrNiEs4fOOXkUAd5d1A+IB8E
i1zh1dZZjFtxtFPF2YM4duxRuTaNrVXbIClUPiSXOVH7x2Q+OUH5nRC+w1KNzFMG
mHFKbuS9KjANzHCPXkr9lV8f6KI+tMi4rPfDowjWpOVUlCtPLD5387OL/RziwLeU
n38rn0EC5oGQWtnxlYtldLcFYiIoBGchBby1AtAHK2I9DlYxnkdhYGRe1wE1oHR5
tz59p15X7CXoiP/LknjwLhx9foofDN5bchRNUKvjYgKTpMN0IioxFVPQ3W1P9n2o
BJONeCFmKBhAj7efbqTPzjya37Fa99/rJbSrzzx6pO4xzgAZ9MMRSwku9WROPNU9
azoJGfYjxIoM/95rlexV
=w+iL
-----END PGP SIGNATURE-----
--- End Message ---