Your message dated Thu, 06 Sep 2018 18:04:00 +0000
with message-id <[email protected]>
and subject line Bug#815252: fixed in colord 1.4.3-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: https://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.4.3-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: Mon, 03 Sep 2018 17:53:23 +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.4.3-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: 815252 889060 895102
Changes:
colord (1.4.3-1) unstable; urgency=medium
.
* New upstream version 1.4.3
- Switch to meson build system
- New upstream version respects SOURCE_DATE_EPOCH for generated
profiles, making the build reproducible! (Closes: 815252)
* Switch to dh_missing
* Fix order of adduser arguments in colord.postinst (Closes: 895102)
* Drop chown -R usage in colord.postinst (Closes: 889060)
* Refresh symbols files
* Refresh .install files
* debian/watch: Correctly identify as a Version=4 file.
* Bump Standards-Version
Checksums-Sha1:
fc55afff687b316e1660eb6b1f549ded10f2acfe 2818 colord_1.4.3-1.dsc
a845fb51a54dda936d1a9696e30cc3d947bfa628 1858552 colord_1.4.3.orig.tar.xz
c10cb2a218af4351fecd98e505fe363d0d003a9c 27932 colord_1.4.3-1.debian.tar.xz
Checksums-Sha256:
8508f3480b2191c557b48a6ce77d3c2122475f125ac1eda7bf3c0f316c223936 2818
colord_1.4.3-1.dsc
9a8e669ee1ea31632bee636cc57353f703c2ea9b64cd6e02bbaabe9a1e549df7 1858552
colord_1.4.3.orig.tar.xz
2881afba1f8550da4f4083bfdd1a38ca98d6d0efa351405c04afd0d169de7fff 27932
colord_1.4.3-1.debian.tar.xz
Files:
b6c85a817d304bbffd93fd769ba706ae 2818 graphics optional colord_1.4.3-1.dsc
f032ecac927e9078c41fff97800441e8 1858552 graphics optional
colord_1.4.3.orig.tar.xz
5c7bb169b5b32707b87b58ea722e7105 27932 graphics optional
colord_1.4.3-1.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJbkWlaAAoJED69RJA+2wSWxzYP/0ERvVqTi6lKGLoC7Bl3npun
VNZVgXP1T2eZqMeWLTPPLU9/cOIza3LXGfMkX3cAgAsRDRvyv+1HcFezgKwCLpSr
MZ2CGwNT1S6jlB1yTfpGTS+rLqIyLexuepehQNyrlObMeS+SXNqSA9/AxC4x3ZK9
ra5y4AcIW+fm7na0fykaFGUC0YbGJnjj3Nngh614C6Ww2815H4idKNzhtsE7RumI
+OZBPH31yWqNO25bC6376ogWMDqK2tJwIjnC/oLpVNxKOl4cQ45cYiQ2vXpf3BVd
OgMijTQYF3KX9zbBLeX+GuOVGueL9PkSHRuXM22zx/maeNCz8VfbwoNgnp5C5azW
e4aZk76n52aJTLSD7pNLUa9mbQHffFJ5k90ai+vEIfftiPdUFLSj4tSNM6QRvSSK
mEvMAaiWcmJis4l8YIklND2LquxcdXBLY0BRqwrtK5SLO53UlZ02wHUpdzUBnAY9
2IiJb+afcILCOatDjgQtsa872zCcvLguExATGnI0JrQ8vATyW6rGQF6Yp1SULl2k
YuCHwZUEMx4IcKSGPa2WD6IYL0TDi6IlHA4OENVX9RfVSHX0euKfB34St7fsjyZM
Nh8MSifJdVsYbXIkfI3nnquKHHUJwanlN+P/ZvhJB4qMOIwP14rQAFb+dPN5YSQs
GM/kAUiwv6/DdrNzs5X8
=Wrsx
-----END PGP SIGNATURE-----
--- End Message ---