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

Hongxu Jia hongxu.jia at windriver.com
Wed Dec 5 02:11:48 UTC 2018


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.
We restore reproducibility by removing the patch modifying "autoconf.texi".
As a consequence certain supplemental information will be not added to the documentation.
In particular:  more details on usage, and on workarounds for non-updated projects.

[YOCTO #12524]

Signed-off-by: Juro Bystricky <juro.bystricky at intel.com>

With applying this fix:

    "This manual (24 April 2012) .."

Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
---
 .../AC_HEADER_MAJOR-port-to-glibc-2.25.patch       | 89 ++++------------------
 1 file changed, 14 insertions(+), 75 deletions(-)

diff --git a/meta/recipes-devtools/autoconf/autoconf/AC_HEADER_MAJOR-port-to-glibc-2.25.patch b/meta/recipes-devtools/autoconf/autoconf/AC_HEADER_MAJOR-port-to-glibc-2.25.patch
index fc37236..b2d7dc0 100644
--- a/meta/recipes-devtools/autoconf/autoconf/AC_HEADER_MAJOR-port-to-glibc-2.25.patch
+++ b/meta/recipes-devtools/autoconf/autoconf/AC_HEADER_MAJOR-port-to-glibc-2.25.patch
@@ -1,4 +1,4 @@
-From e17a30e987d7ee695fb4294a82d987ec3dc9b974 Mon Sep 17 00:00:00 2001
+From b859ab1b211d348b46eca9158b7742f050c8115e Mon Sep 17 00:00:00 2001
 From: Eric Blake <eblake at redhat.com>
 Date: Wed, 14 Sep 2016 08:17:06 -0500
 Subject: [PATCH] AC_HEADER_MAJOR: port to glibc 2.25
@@ -35,85 +35,21 @@ this patch.
 * lib/autoconf/headers.m4 (AC_HEADER_MAJOR): Drop check for
 major within sys/types.h; it interferes with the need to check
 sysmacros.h first.
-* doc/autoconf.texi (Particular Headers) <AC_HEADER_MAJOR>: Expand
-details on usage, and on workarounds for non-updated projects.
 
 Signed-off-by: Eric Blake <eblake at redhat.com>
----
+
+Remove the documentation change from the patch
 Upstream-Status: Backport
 
- doc/autoconf.texi       |   35 +++++++++++++++++++++++++++++++----
- lib/autoconf/headers.m4 |   30 ++++++++++++++----------------
- 2 files changed, 45 insertions(+), 20 deletions(-)
+Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
+---
+ lib/autoconf/headers.m4 | 30 ++++++++++++++----------------
+ 1 file changed, 14 insertions(+), 16 deletions(-)
 
-Index: autoconf-2.69/doc/autoconf.texi
-===================================================================
---- autoconf-2.69.orig/doc/autoconf.texi
-+++ autoconf-2.69/doc/autoconf.texi
-@@ -15,7 +15,7 @@
- @c The ARG is an optional argument.  To be used for macro arguments in
- @c their documentation (@defmac).
- @macro ovar{varname}
-- at r{[}@var{\varname\}@r{]}@c
-+ at r{[}@var{\varname\}@r{]}
- @end macro
- 
- @c @dvar(ARG, DEFAULT)
-@@ -23,7 +23,7 @@
- @c The ARG is an optional argument, defaulting to DEFAULT.  To be used
- @c for macro arguments in their documentation (@defmac).
- @macro dvar{varname, default}
-- at r{[}@var{\varname\} = @samp{\default\}@r{]}@c
-+ at r{[}@var{\varname\} = @samp{\default\}@r{]}
- @end macro
- 
- @c Handling the indexes with Texinfo yields several different problems.
-@@ -5926,10 +5926,37 @@ Also see @code{AC_STRUCT_DIRENT_D_INO} a
- @cvindex MAJOR_IN_SYSMACROS
- @hdrindex{sys/mkdev.h}
- @hdrindex{sys/sysmacros.h}
--If @file{sys/types.h} does not define @code{major}, @code{minor}, and
-- at code{makedev}, but @file{sys/mkdev.h} does, define
-- at code{MAJOR_IN_MKDEV}; otherwise, if @file{sys/sysmacros.h} does, define
-- at code{MAJOR_IN_SYSMACROS}.
-+Detect the headers required to use @code{makedev}, @code{major}, and
-+ at code{minor}.  These functions may be defined by @file{sys/mkdev.h},
-+ at code{sys/sysmacros.h}, or @file{sys/types.h}.
-+
-+ at code{AC_HEADER_MAJOR} defines @code{MAJOR_IN_MKDEV} if they are in
-+ at file{sys/mkdev.h}, or @code{MAJOR_IN_SYSMACROS} if they are in
-+ at file{sys/sysmacros.h}.  If neither macro is defined, they are either in
-+ at file{sys/types.h} or unavailable.
-+
-+To properly use these functions, your code should contain something
-+like:
-+
-+ at verbatim
-+#include <sys/types.h>
-+#ifdef MAJOR_IN_MKDEV
-+# include <sys/mkdev.h>
-+#elif defined MAJOR_IN_SYSMACROS
-+# include <sys/sysmacros.h>
-+#endif
-+ at end verbatim
-+
-+Note: Configure scripts built with Autoconf 2.69 or earlier will not
-+detect a problem if @file{sys/types.h} contains definitions of
-+ at code{major}, @code{minor}, and/or @code{makedev} that trigger compiler
-+warnings upon use.  This is known to occur with GNU libc 2.25, where
-+those definitions are being deprecated to reduce namespace pollution.
-+If it is not practical to use Autoconf 2.70 to regenerate the configure
-+script of affected software, you can work around the problem by setting
-+ at samp{ac_cv_header_sys_types_h_makedev=no}, as an argument to
-+ at command{configure} or as part of a @file{config.site} site default file
-+(@pxref{Site Defaults}).
- @end defmac
- 
- @defmac AC_HEADER_RESOLV
-Index: autoconf-2.69/lib/autoconf/headers.m4
-===================================================================
---- autoconf-2.69.orig/lib/autoconf/headers.m4
-+++ autoconf-2.69/lib/autoconf/headers.m4
+diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4
+index 81a7fa2..a57d0d3 100644
+--- a/lib/autoconf/headers.m4
++++ b/lib/autoconf/headers.m4
 @@ -502,31 +502,29 @@ fi
  
  # AC_HEADER_MAJOR
@@ -160,3 +96,6 @@ Index: autoconf-2.69/lib/autoconf/headers.m4
  fi
  ])# AC_HEADER_MAJOR
  
+-- 
+2.7.4
+
-- 
2.7.4



More information about the Openembedded-core mailing list