Bug#828683: [Pkg-mc-devel] Bug#828683: mc: please make the build reproducible
Hi Reiner, On Mon, 27 Jun 2016, Reiner Herrmann wrote: You are right, the mtime of the file is used for the manpage timestamp. But there is still a patch modifying the manpage: mcedit_full_path.patch. When this patch is upstreamed, the SOURCE_DATE_EPOCH patch is not needed, though it would still help when the manpages are patched. Thank you for the confirmation that my guesses are correct! However, I'm hesitant to apply SOURCE_DATE_EPOCH to anything that looks like a nail. I believe that patching of upstream sources by Debian is such an oft occurring situation, that I would rather look for at solution at the packaging level. After all, builds from *upstream* sources are *already* reproducible, in this case, it's the Debian build procedure that is injecting randomness here. For instance, it seems to me that it is only logical to set the mtime of patched files to the mtime of the last patch that touched them, and this will make the source mtime dependent builds fully reproducible. Have you already thought of that, and if yes, what are the counter arguments against this approach? -- Sincerely yours, Yury V. Zaytsev
Bug#828683: [Pkg-mc-devel] Bug#828683: mc: please make the build reproducible
On Sun, Jun 26, 2016 at 10:21:49PM +0200, Yury V. Zaytsev wrote: > On Sun, 26 Jun 2016, Reiner Herrmann wrote: > > >While working on the "reproducible builds" effort [1], we have noticed > >that mc could not be built reproducibly. It embeds the current date into > >the mcedit manpage during build. > > Ok, I think that I can now see what went wrong here: Debian used to patch > mcedit manpage, and so, mtime of the manpage file was set to the current > time during the build. Our build system faithfully hardcoded this into the > resulting man file. > > Since then, however, I've upstreamed the patch and it was removed from > 3:4.8.17-1, so I'm really wondering why it is still not working for you... You are right, the mtime of the file is used for the manpage timestamp. But there is still a patch modifying the manpage: mcedit_full_path.patch. When this patch is upstreamed, the SOURCE_DATE_EPOCH patch is not needed, though it would still help when the manpages are patched. signature.asc Description: Digital signature
Bug#828683: [Pkg-mc-devel] Bug#828683: mc: please make the build reproducible
On Sun, 26 Jun 2016, Reiner Herrmann wrote: While working on the "reproducible builds" effort [1], we have noticed that mc could not be built reproducibly. It embeds the current date into the mcedit manpage during build. Ok, I think that I can now see what went wrong here: Debian used to patch mcedit manpage, and so, mtime of the manpage file was set to the current time during the build. Our build system faithfully hardcoded this into the resulting man file. Since then, however, I've upstreamed the patch and it was removed from 3:4.8.17-1, so I'm really wondering why it is still not working for you... -- Sincerely yours, Yury V. Zaytsev
Bug#828683: [Pkg-mc-devel] Bug#828683: mc: please make the build reproducible
Hi Reiner, On Sun, 26 Jun 2016, Reiner Herrmann wrote: Yes, it is standardized [1] and already supported by a lot of build tools [2], e.g. even by gcc. Other distributions and FreeBSD are currently also in the process of adopting it. Thank you for the clarifications! Maybe you could consider including these links in the original reports to mitigate such follow-up questions... I've had a look at our build system, and my impression is that your patch should not be necessary. Please have a look at doc/man/date-of-man-include.am and in particular at MAN_DATE_CMD variable and following targets. It encodes mtime of the source man file in the output, rather than the build date, so, as long as the source date is not modified, the build should be reproducible. I believe that the lines that you have patched are currently unused and should be simply removed. Am I missing something? -- Sincerely yours, Yury V. Zaytsev
Bug#828683: [Pkg-mc-devel] Bug#828683: mc: please make the build reproducible
Hi Reiner, On Sun, 26 Jun 2016, Reiner Herrmann wrote: While working on the "reproducible builds" effort [1], we have noticed that mc could not be built reproducibly. It embeds the current date into the mcedit manpage during build. That's my fault: the dates were originally entered by hand, which, of course, soon enough resulted in that they were no longer current, so I campaigned for them to be set automatically during the build. The attached patch uses SOURCE_DATE_EPOCH as a deterministic timestamp instead. I wouldn't mind upstreaming this patch as long as SOURCE_DATE_EPOCH is at least halfway standardized. Could you please tell me whether this is Debian-specific, or other distros are also adopting this convention? Many thanks! -- Sincerely yours, Yury V. Zaytsev
Bug#828683: [Pkg-mc-devel] Bug#828683: mc: please make the build reproducible
On Sun, Jun 26, 2016 at 09:00:50PM +0200, Yury V. Zaytsev wrote: > >The attached patch uses SOURCE_DATE_EPOCH as a deterministic timestamp > >instead. > > I wouldn't mind upstreaming this patch as long as SOURCE_DATE_EPOCH is at > least halfway standardized. Could you please tell me whether this is > Debian-specific, or other distros are also adopting this convention? Thanks for intending to upstream it! Yes, it is standardized [1] and already supported by a lot of build tools [2], e.g. even by gcc. Other distributions and FreeBSD are currently also in the process of adopting it. [1]: https://reproducible-builds.org/specs/source-date-epoch/ [2]: https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Reading_the_variable signature.asc Description: Digital signature