specs: Drop (or relax) GPG dates in expected output
I'm trying hard currently to make schleuder build reproducible. The current use of GPG dates in the output of some specs is non deterministic, therefore I would like to get rid of them. See this for an example. We're checking the fingerprint anyway, so comparing the date does't add any benefits, IMHO.
A failing reproducible builds test looks like the following:
-pub 4096R/59C71FB38AEE22E091C78259D06350440F759BD3 2016-12-06
+Date: Tue, 03 Oct 2017 07:36:13 +1400
+From: list108@example.org
+Sender: list108-bounce@example.org
+To: schleuder@example.org
+Message-ID: <59d2790d822c8_9d4c2aab236e70dc68397@i-capture-the-hostname.mail>
+In-Reply-To: <59d279099483e_9d4c2aab236e70dc6786f@i-capture-the-hostname.mail>
+References: <59d279099483e_9d4c2aab236e70dc6786f@i-capture-the-hostname.mail>
+Mime-Version: 1.0
+Content-Type: multipart/mixed;
+ boundary="--==_mimepart_59d2790d3595b_9d4c2aab236e70dc681c4";
+ charset=UTF-8
+Content-Transfer-Encoding: 7bit
+
+
+----==_mimepart_59d2790d3595b_9d4c2aab236e70dc681c4
+Content-Type: text/plain;
+ charset=UTF-8
+Content-Transfer-Encoding: 7bit
+
+All keys from the list's keyring matching '0x59c71fb38aee22e091c78259d06350440f759bd3' are attached to this message.
+----==_mimepart_59d2790d3595b_9d4c2aab236e70dc681c4
+Content-Type: application/pgp-keys
+Content-Transfer-Encoding: 7bit
+Content-Disposition: attachment;
+ filename=59C71FB38AEE22E091C78259D06350440F759BD3.asc
+
+pub 4096R/59C71FB38AEE22E091C78259D06350440F759BD3 2016-12-07
[...]
(Note 2016-12-06
vs. 2016-12-07
).
Question: Should we drop the dates completely or use something like match
with a regex
instead of eq
? The second approach seems good for parts like:
expect(key.oneline).to eql("0x421FBF7190640136788593CD9EE9BE5929CACC20 expiringkey@example.org 2017-08-03 [expires: 2037-07-29]")
Edited by georg