[OE-core] [PATCH] autoconf-doc: improve reproducibility

Burton, Ross ross.burton at intel.com
Wed Feb 7 10:38:11 UTC 2018


A neater fix might be to drop the documentation change from the patch we're
applying, as it's unlikely that people will be reading the autoconf
documentation.

Ross

On 7 February 2018 at 01:42, Juro Bystricky <juro.bystricky at intel.com>
wrote:

> autoconf-doc package contains autoconf.info.
> This file contains date when this file was created, i.e:
>
>      "This manual (31 January 2018) .."
>
> Therefore, two builds done on two different days will show different dates
> for
> otherwise identical files, hence breaking reproducibility.
> The date is obtained from mtime of "autoconf.texi", unfortunately we patch
> this
> file and change the mtime as a consequence.
> The date serves as a document version identifier, so preserving the
> original mtime of
> "autoconf.texi" would be misleading, as we actually did modify the
> document on purpose.
> The fix is to set the mtime of "autoconf.texi" based on SOURCE_DATE_EPOCH.
>
> [YOCTO #12524]
>
> Signed-off-by: Juro Bystricky <juro.bystricky at intel.com>
> ---
>  meta/recipes-devtools/autoconf/autoconf.inc | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/meta/recipes-devtools/autoconf/autoconf.inc
> b/meta/recipes-devtools/autoconf/autoconf.inc
> index df81bc6..f5156f7 100644
> --- a/meta/recipes-devtools/autoconf/autoconf.inc
> +++ b/meta/recipes-devtools/autoconf/autoconf.inc
> @@ -48,6 +48,15 @@ do_configure() {
>         oe_runconf
>  }
>
> +do_compile_prepend_class-target() {
> +       # mtime of autoconf.texi will end up as embedded date in
> autoconf.info.
> +       # We patch autoconf.texi, so that modifies mtime each time.
> +       # To ensure reproducibility, set the mtime to SOURCE_DATE_EPOCH
> +       if [ -n "${SOURCE_DATE_EPOCH}" ]; then
> +               touch -d @${SOURCE_DATE_EPOCH} ${S}/doc/autoconf.texi
> +       fi
> +}
> +
>  do_install_append() {
>      rm -rf ${D}${datadir}/emacs
>  }
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180207/e3bc9c14/attachment-0002.html>


More information about the Openembedded-core mailing list