From bf5ee6b5d0a9a5f0c058b1881dbcca0ee78ca9c7 Mon Sep 17 00:00:00 2001 From: Ian Kent Date: Sun, 29 Aug 2021 12:15:38 +0800 Subject: [PATCH] - add changes for bug 1942977. --- ...ert-AC_HELP_STRING-to-AS_HELP_STRING.patch | 95 ++++++ ...-AC_TRY_COMPILE-to-AC_COMPILE_IFELSE.patch | 272 +++++++++++++++++ ...onvert-AC_TRY_LINK-to-AC_LINK_IFELSE.patch | 67 +++++ ...-convert-AC_TRY_RUN-to-AC_RUN_IFELSE.patch | 277 ++++++++++++++++++ ...M_CONFIG_HEADER-to-AC_CONFIG_HEADERS.patch | 25 ++ ...-prevent-building-with-autoconf-2_71.patch | 26 ++ am-utils-6.2-fix-double-quote-escaping.patch | 64 ++++ am-utils-6.2-update-configure_ac.patch | 84 ++++++ ...ls-6.2-use-linux-libtirpc-if-present.patch | 9 +- am-utils.spec | 33 ++- 10 files changed, 947 insertions(+), 5 deletions(-) create mode 100644 am-utils-6.2-convert-AC_HELP_STRING-to-AS_HELP_STRING.patch create mode 100644 am-utils-6.2-convert-AC_TRY_COMPILE-to-AC_COMPILE_IFELSE.patch create mode 100644 am-utils-6.2-convert-AC_TRY_LINK-to-AC_LINK_IFELSE.patch create mode 100644 am-utils-6.2-convert-AC_TRY_RUN-to-AC_RUN_IFELSE.patch create mode 100644 am-utils-6.2-convert-AM_CONFIG_HEADER-to-AC_CONFIG_HEADERS.patch create mode 100644 am-utils-6.2-dont-prevent-building-with-autoconf-2_71.patch create mode 100644 am-utils-6.2-fix-double-quote-escaping.patch create mode 100644 am-utils-6.2-update-configure_ac.patch diff --git a/am-utils-6.2-convert-AC_HELP_STRING-to-AS_HELP_STRING.patch b/am-utils-6.2-convert-AC_HELP_STRING-to-AS_HELP_STRING.patch new file mode 100644 index 0000000..b8208ff --- /dev/null +++ b/am-utils-6.2-convert-AC_HELP_STRING-to-AS_HELP_STRING.patch @@ -0,0 +1,95 @@ +am-utils-6.2 - convert AC_HELP_STRING to AS_HELP_STRING + +From: Ian Kent + +autoconf 2.71 autoreconf tells us AC_HELP_STRING is obsolete. +Use AS_HELP_STRING instead. + +Signed-off-by: Ian Kent +--- + m4/macros/opt_amu_cflags.m4 | 2 +- + m4/macros/opt_cppflags.m4 | 2 +- + m4/macros/opt_debug.m4 | 2 +- + m4/macros/opt_ldflags.m4 | 2 +- + m4/macros/opt_libs.m4 | 2 +- + m4/macros/with_addon.m4 | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/m4/macros/opt_amu_cflags.m4 b/m4/macros/opt_amu_cflags.m4 +index 1194786b..e94dbc24 100644 +--- a/m4/macros/opt_amu_cflags.m4 ++++ b/m4/macros/opt_amu_cflags.m4 +@@ -4,7 +4,7 @@ dnl NOTE: this is only for final compiltions, not for configure tests) + AC_DEFUN([AMU_OPT_AMU_CFLAGS], + [AC_MSG_CHECKING(for additional C option compilation flags) + AC_ARG_ENABLE(am-cflags, +-AC_HELP_STRING([--enable-am-cflags=ARG], ++AS_HELP_STRING([--enable-am-cflags=ARG], + [compile package with ARG additional C flags]), + [ + if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then +diff --git a/m4/macros/opt_cppflags.m4 b/m4/macros/opt_cppflags.m4 +index 9cb72362..97197212 100644 +--- a/m4/macros/opt_cppflags.m4 ++++ b/m4/macros/opt_cppflags.m4 +@@ -4,7 +4,7 @@ dnl NOTE: this is for configuration as well as compilations! + AC_DEFUN([AMU_OPT_CPPFLAGS], + [AC_MSG_CHECKING(for configuration/compilation (-I) preprocessor flags) + AC_ARG_ENABLE(cppflags, +-AC_HELP_STRING([--enable-cppflags=ARG], ++AS_HELP_STRING([--enable-cppflags=ARG], + [configure/compile with ARG (-I) preprocessor flags]), + [ + if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then +diff --git a/m4/macros/opt_debug.m4 b/m4/macros/opt_debug.m4 +index b6f044e9..bca938ac 100644 +--- a/m4/macros/opt_debug.m4 ++++ b/m4/macros/opt_debug.m4 +@@ -4,7 +4,7 @@ dnl and "no" means none. + AC_DEFUN([AMU_OPT_DEBUG], + [AC_MSG_CHECKING(for debugging options) + AC_ARG_ENABLE(debug, +-AC_HELP_STRING([--enable-debug=ARG],[enable debugging (yes/mem/no)]), ++AS_HELP_STRING([--enable-debug=ARG],[enable debugging (yes/mem/no)]), + [ + if test "$enableval" = yes; then + AC_MSG_RESULT(yes) +diff --git a/m4/macros/opt_ldflags.m4 b/m4/macros/opt_ldflags.m4 +index cf3ee432..51c66601 100644 +--- a/m4/macros/opt_ldflags.m4 ++++ b/m4/macros/opt_ldflags.m4 +@@ -4,7 +4,7 @@ dnl NOTE: this is for configuration as well as compilations! + AC_DEFUN([AMU_OPT_LDFLAGS], + [AC_MSG_CHECKING(for configuration/compilation (-L) library flags) + AC_ARG_ENABLE(ldflags, +-AC_HELP_STRING([--enable-ldflags=ARG], ++AS_HELP_STRING([--enable-ldflags=ARG], + [configure/compile with ARG (-L) library flags]), + [ + if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then +diff --git a/m4/macros/opt_libs.m4 b/m4/macros/opt_libs.m4 +index e7414860..40d496ba 100644 +--- a/m4/macros/opt_libs.m4 ++++ b/m4/macros/opt_libs.m4 +@@ -4,7 +4,7 @@ dnl NOTE: this is for configuration as well as compilations! + AC_DEFUN([AMU_OPT_LIBS], + [AC_MSG_CHECKING(for configuration/compilation (-l) library flags) + AC_ARG_ENABLE(libs, +-AC_HELP_STRING([--enable-libs=ARG], ++AS_HELP_STRING([--enable-libs=ARG], + [configure/compile with ARG (-l) library flags]), + [ + if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then +diff --git a/m4/macros/with_addon.m4 b/m4/macros/with_addon.m4 +index d8ea8cfa..c3d8a7fa 100644 +--- a/m4/macros/with_addon.m4 ++++ b/m4/macros/with_addon.m4 +@@ -4,7 +4,7 @@ AC_DEFUN([AMU_WITH_ADDON], + [AC_MSG_CHECKING([if $1 is wanted]) + ac_upcase=`echo $1|tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + AC_ARG_WITH($1, +- AC_HELP_STRING([--with-$1], ++ AS_HELP_STRING([--with-$1], + [enable $2 support (default=yes if found)] + ),[ + if test "$withval" = "yes"; then diff --git a/am-utils-6.2-convert-AC_TRY_COMPILE-to-AC_COMPILE_IFELSE.patch b/am-utils-6.2-convert-AC_TRY_COMPILE-to-AC_COMPILE_IFELSE.patch new file mode 100644 index 0000000..d4cd3cf --- /dev/null +++ b/am-utils-6.2-convert-AC_TRY_COMPILE-to-AC_COMPILE_IFELSE.patch @@ -0,0 +1,272 @@ +am-utils-6.2 - convert AC_TRY_COMPILE to AC_COMPILE_IFELSE + +From: Ian Kent + +autoconf 2.71 autoreconf tells us AC_TRY_COMPILE is obsolete. +Convert to use the AC_COMPILE_IFELSE instead. + +Signed-off-by: Ian Kent +--- + m4/macros/c_void_p.m4 | 9 +++++---- + m4/macros/check_varargs_macros.m4 | 24 ++++++++++++++---------- + m4/macros/extern_optarg.m4 | 11 ++++++----- + m4/macros/field_mntent_t_mnt_time_string.m4 | 7 ++++--- + m4/macros/mount_headers.m4 | 4 ++-- + m4/macros/struct_mntent.m4 | 7 ++++--- + m4/macros/struct_mnttab.m4 | 7 ++++--- + m4/macros/try_compile_anyfs.m4 | 8 +++++--- + m4/macros/try_compile_nfs.m4 | 7 ++++--- + m4/macros/try_compile_rpc.m4 | 8 +++++--- + 10 files changed, 53 insertions(+), 39 deletions(-) + +diff --git a/m4/macros/c_void_p.m4 b/m4/macros/c_void_p.m4 +index 3977c9be..64e998ff 100644 +--- a/m4/macros/c_void_p.m4 ++++ b/m4/macros/c_void_p.m4 +@@ -6,11 +6,12 @@ AC_CACHE_CHECK(if compiler can handle void *, + ac_cv_c_void_p, + [ + # try to compile a program which uses void * +-AC_TRY_COMPILE( +-[ ], +-[ ++AC_COMPILE_IFELSE( ++[AC_LANG_PROGRAM( ++[[ ]], ++[[ + void *vp; +-], ac_cv_c_void_p=yes, ac_cv_c_void_p=no) ++]])], ac_cv_c_void_p=yes, ac_cv_c_void_p=no) + ]) + if test "$ac_cv_c_void_p" = yes + then +diff --git a/m4/macros/check_varargs_macros.m4 b/m4/macros/check_varargs_macros.m4 +index 44bd3edf..93c26ffc 100644 +--- a/m4/macros/check_varargs_macros.m4 ++++ b/m4/macros/check_varargs_macros.m4 +@@ -6,23 +6,27 @@ AC_CACHE_CHECK(if compiler can handle variable-length macros, + ac_cv_varargs_macros, + [ + # try C99 style +-AC_TRY_COMPILE( +-[ ++AC_COMPILE_IFELSE( ++[AC_LANG_PROGRAM( ++[[ + #define foo(str,size,fmt,...) bar(__FILE__,__LINE__,(str),(size),(fmt),__VA_ARGS__) +-], +-[ ++]], ++[[ + char a[80]; + foo(a, sizeof(a), "%d,%d", 1, 2); +-], ac_cv_varargs_macros=c99, ++]] ++)], ac_cv_varargs_macros=c99, + # else try gcc style +-AC_TRY_COMPILE( +-[ ++AC_COMPILE_IFELSE( ++[AC_LANG_PROGRAM( ++[[ + #define foo(str,size,args...) bar(__FILE__,__LINE__,(str),(size),(fmt),args) +-], +-[ ++]], ++[[ + char a[80]; + foo(a, sizeof(a), "%d,%d", 1, 2); +-], ac_cv_varargs_macros=gcc, ac_cv_varargs_macros=none)) ++]] ++)], ac_cv_varargs_macros=gcc, ac_cv_varargs_macros=none)) + ]) + if test "$ac_cv_varargs_macros" = c99 + then +diff --git a/m4/macros/extern_optarg.m4 b/m4/macros/extern_optarg.m4 +index 70cb50ae..b082b061 100644 +--- a/m4/macros/extern_optarg.m4 ++++ b/m4/macros/extern_optarg.m4 +@@ -6,8 +6,9 @@ AC_CACHE_CHECK(if external definition for optarg[] exists, + ac_cv_extern_optarg, + [ + # try to compile program that uses the variable +-AC_TRY_COMPILE( +-[ ++AC_COMPILE_IFELSE( ++[AC_LANG_PROGRAM( ++[[ + #ifdef HAVE_STDIO_H + # include + #endif /* HAVE_STDIO_H */ +@@ -23,10 +24,10 @@ AC_TRY_COMPILE( + #ifdef HAVE_ERRNO_H + # include + #endif /* HAVE_ERRNO_H */ +-], +-[ ++]], ++[[ + char *cp = optarg; +-], ac_cv_extern_optarg=yes, ac_cv_extern_optarg=no) ++]])], ac_cv_extern_optarg=yes, ac_cv_extern_optarg=no) + ]) + if test "$ac_cv_extern_optarg" = yes + then +diff --git a/m4/macros/field_mntent_t_mnt_time_string.m4 b/m4/macros/field_mntent_t_mnt_time_string.m4 +index 42ad647b..9ed83f46 100644 +--- a/m4/macros/field_mntent_t_mnt_time_string.m4 ++++ b/m4/macros/field_mntent_t_mnt_time_string.m4 +@@ -6,7 +6,8 @@ AC_CACHE_CHECK(if mntent_t field mnt_time exist as type string, + ac_cv_field_mntent_t_mnt_time_string, + [ + # try to compile a program +-AC_TRY_COMPILE( ++AC_COMPILE_IFELSE( ++[AC_LANG_PROGRAM( + AMU_MOUNT_HEADERS( + [ + /* now set the typedef */ +@@ -20,13 +21,13 @@ typedef struct mnttab mntent_t; + # endif /* not HAVE_STRUCT_MNTTAB */ + #endif /* not HAVE_STRUCT_MNTENT */ + ]), +-[ ++[[ + mntent_t mtt; + char *cp = "test"; + int i; + mtt.mnt_time = cp; + i = mtt.mnt_time[0]; +-], ac_cv_field_mntent_t_mnt_time_string=yes, ac_cv_field_mntent_t_mnt_time_string=no) ++]])], ac_cv_field_mntent_t_mnt_time_string=yes, ac_cv_field_mntent_t_mnt_time_string=no) + ]) + if test "$ac_cv_field_mntent_t_mnt_time_string" = yes + then +diff --git a/m4/macros/mount_headers.m4 b/m4/macros/mount_headers.m4 +index cf7b9103..3a1226f4 100644 +--- a/m4/macros/mount_headers.m4 ++++ b/m4/macros/mount_headers.m4 +@@ -1,12 +1,12 @@ + dnl ###################################################################### + dnl an M4 macro to include a list of common headers being used everywhere + define(AMU_MOUNT_HEADERS, +-[ ++[[ + #include "${srcdir}/include/mount_headers1.h" + #include AMU_NFS_PROTOCOL_HEADER + #include "${srcdir}/include/mount_headers2.h" + + $1 +-] ++]] + ) + dnl ====================================================================== +diff --git a/m4/macros/struct_mntent.m4 b/m4/macros/struct_mntent.m4 +index d9f48119..9a9ad18b 100644 +--- a/m4/macros/struct_mntent.m4 ++++ b/m4/macros/struct_mntent.m4 +@@ -6,12 +6,13 @@ AC_CACHE_CHECK(for struct mntent, + ac_cv_have_struct_mntent, + [ + # try to compile a program which may have a definition for the structure +-AC_TRY_COMPILE( ++AC_COMPILE_IFELSE( ++[AC_LANG_PROGRAM( + AMU_MOUNT_HEADERS + , +-[ ++[[ + struct mntent mt; +-], ac_cv_have_struct_mntent=yes, ac_cv_have_struct_mntent=no) ++]])], ac_cv_have_struct_mntent=yes, ac_cv_have_struct_mntent=no) + ]) + if test "$ac_cv_have_struct_mntent" = yes + then +diff --git a/m4/macros/struct_mnttab.m4 b/m4/macros/struct_mnttab.m4 +index ed1cb563..4eabbaa4 100644 +--- a/m4/macros/struct_mnttab.m4 ++++ b/m4/macros/struct_mnttab.m4 +@@ -6,12 +6,13 @@ AC_CACHE_CHECK(for struct mnttab, + ac_cv_have_struct_mnttab, + [ + # try to compile a program which may have a definition for the structure +-AC_TRY_COMPILE( ++AC_COMPILE_IFELSE( ++[AC_LANG_PROGRAM( + AMU_MOUNT_HEADERS + , +-[ ++[[ + struct mnttab mt; +-], ac_cv_have_struct_mnttab=yes, ac_cv_have_struct_mnttab=no) ++]])], ac_cv_have_struct_mnttab=yes, ac_cv_have_struct_mnttab=no) + ]) + if test "$ac_cv_have_struct_mnttab" = yes + then +diff --git a/m4/macros/try_compile_anyfs.m4 b/m4/macros/try_compile_anyfs.m4 +index 22a57198..cd34eee4 100644 +--- a/m4/macros/try_compile_anyfs.m4 ++++ b/m4/macros/try_compile_anyfs.m4 +@@ -6,8 +6,9 @@ dnl [$2] action to take if the program compiled (3rd arg to AC_TRY_COMPILE) + dnl [$3] action to take if program did not compile (4rd arg to AC_TRY_COMPILE) + AC_DEFUN([AC_TRY_COMPILE_ANYFS], + [# try to compile a program which may have a definition for a structure +-AC_TRY_COMPILE( +-[ ++AC_COMPILE_IFELSE( ++[AC_LANG_PROGRAM( ++[[ + #ifdef HAVE_SYS_TYPES_H + # include + #endif /* HAVE_SYS_TYPES_H */ +@@ -180,6 +181,7 @@ struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ + #ifdef HAVE_FS_UDF_UDF_MOUNT_H + # include + #endif /* HAVE_FS_UDF_UDF_MOUNT_H */ +-], [$1], [$2], [$3]) ++]], [[$1]] ++)], [$2], [$3]) + ]) + dnl ====================================================================== +diff --git a/m4/macros/try_compile_nfs.m4 b/m4/macros/try_compile_nfs.m4 +index d04e1961..9a7a3892 100644 +--- a/m4/macros/try_compile_nfs.m4 ++++ b/m4/macros/try_compile_nfs.m4 +@@ -6,8 +6,9 @@ dnl [$2] action to take if the program compiled (3rd arg to AC_TRY_COMPILE) + dnl [$3] action to take if program did not compile (4rd arg to AC_TRY_COMPILE) + AC_DEFUN([AC_TRY_COMPILE_NFS], + [# try to compile a program which may have a definition for a structure +-AC_TRY_COMPILE( +-AMU_MOUNT_HEADERS +-, [$1], [$2], [$3]) ++AC_COMPILE_IFELSE( ++[AC_LANG_PROGRAM( ++AMU_MOUNT_HEADERS, ++[[$1]])], [$2], [$3]) + ]) + dnl ====================================================================== +diff --git a/m4/macros/try_compile_rpc.m4 b/m4/macros/try_compile_rpc.m4 +index 5c95348c..f98bea7d 100644 +--- a/m4/macros/try_compile_rpc.m4 ++++ b/m4/macros/try_compile_rpc.m4 +@@ -6,8 +6,9 @@ dnl [$2] action to take if the program compiled (3rd arg to AC_TRY_COMPILE) + dnl [$3] action to take if program did not compile (4rd arg to AC_TRY_COMPILE) + AC_DEFUN([AC_TRY_COMPILE_RPC], + [# try to compile a program which may have a definition for a structure +-AC_TRY_COMPILE( +-[ ++AC_COMPILE_IFELSE( ++[AC_LANG_PROGRAM( ++[[ + #ifdef HAVE_SYS_TYPES_H + # include + #endif /* HAVE_SYS_TYPES_H */ +@@ -18,6 +19,7 @@ AC_TRY_COMPILE( + #if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) + # include + #endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */ +-], [$1], [$2], [$3]) ++]], [[$1]] ++)], [$2], [$3]) + ]) + dnl ====================================================================== diff --git a/am-utils-6.2-convert-AC_TRY_LINK-to-AC_LINK_IFELSE.patch b/am-utils-6.2-convert-AC_TRY_LINK-to-AC_LINK_IFELSE.patch new file mode 100644 index 0000000..6b753c4 --- /dev/null +++ b/am-utils-6.2-convert-AC_TRY_LINK-to-AC_LINK_IFELSE.patch @@ -0,0 +1,67 @@ +am-utils-6.2 - convert AC_TRY_LINK to AC_LINK_IFELSE + +From: Ian Kent + +autoconf 2.71 autoreconf tells us AC_TRY_LINK is obsolete. +Convert to use the AC_LINK_IFELSE instead. + +Signed-off-by: Ian Kent +--- + m4/macros/check_lib2.m4 | 30 ++++++++++++++++++------------ + 1 file changed, 18 insertions(+), 12 deletions(-) + +diff --git a/m4/macros/check_lib2.m4 b/m4/macros/check_lib2.m4 +index 64e6bb5b..7d4e5a5e 100644 +--- a/m4/macros/check_lib2.m4 ++++ b/m4/macros/check_lib2.m4 +@@ -16,32 +16,38 @@ AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, + + # first try with base library, without auxiliary library + LIBS="-l$1 $LIBS" +-AC_TRY_LINK(dnl +-ifelse([$2], [main], , dnl Avoid conflicting decl of main. ++dnl ithe ifelse() macro is used to avoid conflicting decl of main. ++AC_LINK_IFELSE( ++[AC_LANG_SOURCE( ++[[ ++ifelse([$2], [main], , + [/* Override any gcc2 internal prototype to avoid an error. */ + ] + [/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char $2(); +-]), +- [$2()], +- eval "ac_cv_lib_$ac_lib_var=\"$1\"", +- eval "ac_cv_lib_$ac_lib_var=no") ++])]], ++ [[$2()]])], ++ [eval "ac_cv_lib_$ac_lib_var=\"$1\""], ++ [eval "ac_cv_lib_$ac_lib_var=no"]) + + # if OK, set to no auxiliary library, else try auxiliary library + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = no"; then + LIBS="-l$1 $5 $LIBS" +- AC_TRY_LINK(dnl +- ifelse([$2], [main], , dnl Avoid conflicting decl of main. ++dnl ithe ifelse() macro is used to avoid conflicting decl of main. ++ AC_LINK_IFELSE( ++ [AC_LANG_SOURCE( ++ [[ ++ ifelse([$2], [main], , + [/* Override any gcc2 internal prototype to avoid an error. */ + ] + [/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char $2(); +- ]), +- [$2()], +- eval "ac_cv_lib_$ac_lib_var=\"$1 $5\"", +- eval "ac_cv_lib_$ac_lib_var=no") ++ ])]], ++ [[$2()]])], ++ [eval "ac_cv_lib_$ac_lib_var=\"$1 $5\""], ++ [eval "ac_cv_lib_$ac_lib_var=no"]) + fi + + LIBS="$ac_save_LIBS" diff --git a/am-utils-6.2-convert-AC_TRY_RUN-to-AC_RUN_IFELSE.patch b/am-utils-6.2-convert-AC_TRY_RUN-to-AC_RUN_IFELSE.patch new file mode 100644 index 0000000..5230395 --- /dev/null +++ b/am-utils-6.2-convert-AC_TRY_RUN-to-AC_RUN_IFELSE.patch @@ -0,0 +1,277 @@ +am-utils-6.2 - convert AC_TRY_RUN to AC_RUN_IFELSE + +From: Ian Kent + +autoconf 2.71 autoreconf tells us AC_TRY_RUN is obsolete. +Convert to use the AC_RUN_IFELSE instead. + +Signed-off-by: Ian Kent +--- + m4/macros/check_fs_mntent.m4 | 7 ++++--- + m4/macros/check_gnu_getopt.m4 | 6 ++++-- + m4/macros/check_libwrap_severity.m4 | 14 ++++++++------ + m4/macros/check_mnttab_type.m4 | 7 ++++--- + m4/macros/check_mount_type.m4 | 7 ++++--- + m4/macros/expand_cpp_hex.m4 | 7 ++++--- + m4/macros/expand_cpp_int.m4 | 7 ++++--- + m4/macros/expand_cpp_string.m4 | 7 ++++--- + m4/macros/expand_run_string.m4 | 7 ++++--- + m4/macros/func_bad_hasmntopt.m4 | 5 +++-- + 10 files changed, 43 insertions(+), 31 deletions(-) + +diff --git a/m4/macros/check_fs_mntent.m4 b/m4/macros/check_fs_mntent.m4 +index 6146c7ee..e612b4ec 100644 +--- a/m4/macros/check_fs_mntent.m4 ++++ b/m4/macros/check_fs_mntent.m4 +@@ -144,8 +144,9 @@ do + fi + + # run a test program for bsdi3 +- AC_TRY_RUN( +- [ ++ AC_RUN_IFELSE( ++ [AC_LANG_SOURCE( ++ [[ + #include + #include + main() +@@ -158,7 +159,7 @@ main() + else + exit(0); + } +- ], [eval "ac_cv_fs_$ac_fs_name=yes" ++ ]])], [eval "ac_cv_fs_$ac_fs_name=yes" + break + ] + ) +diff --git a/m4/macros/check_gnu_getopt.m4 b/m4/macros/check_gnu_getopt.m4 +index 76315321..6ac6440c 100644 +--- a/m4/macros/check_gnu_getopt.m4 ++++ b/m4/macros/check_gnu_getopt.m4 +@@ -3,7 +3,9 @@ dnl Do we have a GNUish getopt + AC_DEFUN([AMU_CHECK_GNU_GETOPT], + [ + AC_CACHE_CHECK([for GNU getopt], ac_cv_sys_gnu_getopt, [ +-AC_TRY_RUN([ ++AC_RUN_IFELSE( ++[AC_LANG_SOURCE( ++[[ + #include + #include + int main() +@@ -29,7 +31,7 @@ int main() + fprintf(rf, isGNU ? "yes" : "no"); + exit(0); + } +-],[ ++]])],[ + ac_cv_sys_gnu_getopt="`cat conftestresult`" + ],[ + ac_cv_sys_gnu_getopt="fail" +diff --git a/m4/macros/check_libwrap_severity.m4 b/m4/macros/check_libwrap_severity.m4 +index 955ba55a..f57ffcb1 100644 +--- a/m4/macros/check_libwrap_severity.m4 ++++ b/m4/macros/check_libwrap_severity.m4 +@@ -8,22 +8,24 @@ AC_CACHE_CHECK([if libwrap wants caller to define allow_severity and deny_severi + SAVEDLIBS="$LIBS" + LIBS="$LIBS -lwrap" + # run program one without defining our own severity variables +-AC_TRY_RUN( +-[ ++AC_RUN_IFELSE( ++[AC_LANG_SOURCE( ++[[ + int main() + { + exit(0); + } +-],[ac_tmp_val1="yes"],[ac_tmp_val1="no"]) ++]])],[ac_tmp_val1="yes"],[ac_tmp_val1="no"]) + # run program two with defining our own severity variables +-AC_TRY_RUN( +-[ ++AC_RUN_IFELSE( ++[AC_LANG_SOURCE( ++[[ + int deny_severity, allow_severity, rfc931_timeout; + int main() + { + exit(0); + } +-],[ac_tmp_val2="yes"],[ac_tmp_val2="no"]) ++]])],[ac_tmp_val2="yes"],[ac_tmp_val2="no"]) + # restore original value of $LIBS + LIBS="$SAVEDLIBS" + # now decide what to do +diff --git a/m4/macros/check_mnttab_type.m4 b/m4/macros/check_mnttab_type.m4 +index 61e1c01b..a840991e 100644 +--- a/m4/macros/check_mnttab_type.m4 ++++ b/m4/macros/check_mnttab_type.m4 +@@ -116,8 +116,9 @@ do + fi + + # then run a test program for bsdi3, tru64, and others +- AC_TRY_RUN( +- [ ++ AC_RUN_IFELSE( ++ [AC_LANG_SOURCE( ++ [[ + #include + #include + main() +@@ -130,7 +131,7 @@ main() + else + exit(0); + } +- ], [eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" ++ ]])], [eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + ] + ) +diff --git a/m4/macros/check_mount_type.m4 b/m4/macros/check_mount_type.m4 +index 9b08def7..c779e0bf 100644 +--- a/m4/macros/check_mount_type.m4 ++++ b/m4/macros/check_mount_type.m4 +@@ -135,8 +135,9 @@ do + fi + + # run a test program for bsdi3 +- AC_TRY_RUN( +- [ ++ AC_RUN_IFELSE( ++ [AC_LANG_SOURCE( ++ [[ + #include + #include + main() +@@ -149,7 +150,7 @@ main() + else + exit(0); + } +- ], [eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" ++ ]])], [eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + ] + ) +diff --git a/m4/macros/expand_cpp_hex.m4 b/m4/macros/expand_cpp_hex.m4 +index 0c7a9e42..13c7c832 100644 +--- a/m4/macros/expand_cpp_hex.m4 ++++ b/m4/macros/expand_cpp_hex.m4 +@@ -10,8 +10,9 @@ AC_EGREP_CPP(0x, + [$1] + $2, + value="notfound" +-AC_TRY_RUN( +-[ ++AC_RUN_IFELSE( ++[AC_LANG_SOURCE( ++[[ + [$1] + main(argc) + int argc; +@@ -24,7 +25,7 @@ exit(0); + # error no such option $2 + #endif + exit(1); +-}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") ++}]])], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") + , + value="notfound" + ) +diff --git a/m4/macros/expand_cpp_int.m4 b/m4/macros/expand_cpp_int.m4 +index 37253769..e58649e8 100644 +--- a/m4/macros/expand_cpp_int.m4 ++++ b/m4/macros/expand_cpp_int.m4 +@@ -12,8 +12,9 @@ AC_EGREP_CPP( + [$1] + $2, + value="notfound" +-AC_TRY_RUN( +-[ ++AC_RUN_IFELSE( ++[AC_LANG_SOURCE( ++[[ + [$1] + main(argc) + int argc; +@@ -26,7 +27,7 @@ exit(0); + # error no such option $2 + #endif + exit(1); +-}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") ++}]])], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") + , + value="notfound" + ) +diff --git a/m4/macros/expand_cpp_string.m4 b/m4/macros/expand_cpp_string.m4 +index 51293c4f..e014b7e4 100644 +--- a/m4/macros/expand_cpp_string.m4 ++++ b/m4/macros/expand_cpp_string.m4 +@@ -10,8 +10,9 @@ AC_EGREP_CPP(\".*\", + [$1] + $2, + value="notfound" +-AC_TRY_RUN( +-[ ++AC_RUN_IFELSE( ++[AC_LANG_SOURCE( ++[[ + [$1] + main(argc) + int argc; +@@ -24,7 +25,7 @@ exit(0); + # error no such option $2 + #endif + exit(1); +-}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") ++}]])], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") + , + value="notfound" + ) +diff --git a/m4/macros/expand_run_string.m4 b/m4/macros/expand_run_string.m4 +index 2cb964e1..f9390020 100644 +--- a/m4/macros/expand_run_string.m4 ++++ b/m4/macros/expand_run_string.m4 +@@ -4,15 +4,16 @@ dnl Takes: (header, code-to-run, [action-if-found, [action-if-not-found]]) + AC_DEFUN([AMU_EXPAND_RUN_STRING], + [ + value="notfound" +-AC_TRY_RUN( +-[ ++AC_RUN_IFELSE( ++[AC_LANG_SOURCE( ++[[ + $1 + main(argc) + int argc; + { + $2 + exit(0); +-}], ++}]])], + [ + value=`./conftest dummy 2>>config.log` + test -z "$value" && value="notfound" +diff --git a/m4/macros/func_bad_hasmntopt.m4 b/m4/macros/func_bad_hasmntopt.m4 +index d458bd30..9071e595 100644 +--- a/m4/macros/func_bad_hasmntopt.m4 ++++ b/m4/macros/func_bad_hasmntopt.m4 +@@ -3,7 +3,8 @@ dnl Check if we have as buggy hasmntopt() libc function + AC_DEFUN([AMU_FUNC_BAD_HASMNTOPT], + [ + AC_CACHE_CHECK([for working hasmntopt], ac_cv_func_hasmntopt_working, +-[AC_TRY_RUN( ++[AC_RUN_IFELSE( ++[AC_LANG_SOURCE( + AMU_MOUNT_HEADERS( + [[ + #ifdef HAVE_MNTENT_H +@@ -47,7 +48,7 @@ int main() + exit(1); + exit(0); + } +-]]), ++]]))], + [ac_cv_func_hasmntopt_working=yes], + [ac_cv_func_hasmntopt_working=no] + )]) diff --git a/am-utils-6.2-convert-AM_CONFIG_HEADER-to-AC_CONFIG_HEADERS.patch b/am-utils-6.2-convert-AM_CONFIG_HEADER-to-AC_CONFIG_HEADERS.patch new file mode 100644 index 0000000..9744db4 --- /dev/null +++ b/am-utils-6.2-convert-AM_CONFIG_HEADER-to-AC_CONFIG_HEADERS.patch @@ -0,0 +1,25 @@ +am-utils-6.2 - convert AM_CONFIG_HEADER to AC_CONFIG_HEADERS + +From: Ian Kent + +autoconf 2.71 autoreconf tells us AM_CONFIG_HEADER macro is obsolete. +Use AC_CONFIG_HEADERS instead. + +Signed-off-by: Ian Kent +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 98b444d3..e1bc3290 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -18,7 +18,7 @@ AC_INIT([am-utils], + AC_MSG_NOTICE(*** INITIALIZATION ***) + AC_CONFIG_SRCDIR([amd/amd.c]) + AC_CONFIG_MACRO_DIR([m4]) +-AM_CONFIG_HEADER(config.h) ++AC_CONFIG_HEADERS(config.h) + AH_TOP([ + /* + * Start of am-utils-6.x config.h file. diff --git a/am-utils-6.2-dont-prevent-building-with-autoconf-2_71.patch b/am-utils-6.2-dont-prevent-building-with-autoconf-2_71.patch new file mode 100644 index 0000000..d97c535 --- /dev/null +++ b/am-utils-6.2-dont-prevent-building-with-autoconf-2_71.patch @@ -0,0 +1,26 @@ +am-utils-6.2 - dont prevent autoconf 2.7 build + +From: Ian Kent + +Fedora is updating to autoconf 2.71, stop bootstrap from preventing +the build. + +Signed-off-by: Ian Kent +--- + bootstrap | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/bootstrap b/bootstrap +index 000b0167..d454c631 100755 +--- a/bootstrap ++++ b/bootstrap +@@ -9,7 +9,8 @@ validateversion() { + local v="$(autoreconf --version 2>&1 | head -1)" + case "$v" in + *2.69) ;; +- *) echo "am-utils requires autoconf 2.69, you have:" ++ *2.71) ;; ++ *) echo "am-utils requires autoconf 2.69 or 2.71, you have:" + echo " $v" + exit 1;; + esac diff --git a/am-utils-6.2-fix-double-quote-escaping.patch b/am-utils-6.2-fix-double-quote-escaping.patch new file mode 100644 index 0000000..8373b4d --- /dev/null +++ b/am-utils-6.2-fix-double-quote-escaping.patch @@ -0,0 +1,64 @@ +am-utils-6.2 - fix double quote escaping + +From: Ian Kent + +autoconf 2.71 autoreconf tells us that back quotes and double quotes +must not be escaped in certain cases. + +Signed-off-by: Ian Kent +--- + m4/macros/package_bugreport.m4 | 2 +- + m4/macros/package_name.m4 | 2 +- + m4/macros/package_version.m4 | 2 +- + m4/macros/with_addon.m4 | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/m4/macros/package_bugreport.m4 b/m4/macros/package_bugreport.m4 +index 8e1688d9..d2d08412 100644 +--- a/m4/macros/package_bugreport.m4 ++++ b/m4/macros/package_bugreport.m4 +@@ -3,6 +3,6 @@ dnl Bugreport name + AC_DEFUN([AMU_PACKAGE_BUGREPORT], + [AC_MSG_CHECKING(bug-reporting address) + AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$1") +-AC_MSG_RESULT(\"$1\") ++AC_MSG_RESULT("$1") + ]) + dnl ====================================================================== +diff --git a/m4/macros/package_name.m4 b/m4/macros/package_name.m4 +index 27f5711b..c2b3e013 100644 +--- a/m4/macros/package_name.m4 ++++ b/m4/macros/package_name.m4 +@@ -3,6 +3,6 @@ dnl Package name + AC_DEFUN([AMU_PACKAGE_NAME], + [AC_MSG_CHECKING(package name) + AC_DEFINE_UNQUOTED(PACKAGE_NAME, "$1") +-AC_MSG_RESULT(\"$1\") ++AC_MSG_RESULT("$1") + ]) + dnl ====================================================================== +diff --git a/m4/macros/package_version.m4 b/m4/macros/package_version.m4 +index 0d6c6ef2..2ddd4ade 100644 +--- a/m4/macros/package_version.m4 ++++ b/m4/macros/package_version.m4 +@@ -3,6 +3,6 @@ dnl Version of package + AC_DEFUN([AMU_PACKAGE_VERSION], + [AC_MSG_CHECKING(version of package) + AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$1") +-AC_MSG_RESULT(\"$1\") ++AC_MSG_RESULT("$1") + ]) + dnl ====================================================================== +diff --git a/m4/macros/with_addon.m4 b/m4/macros/with_addon.m4 +index b061621c..d8ea8cfa 100644 +--- a/m4/macros/with_addon.m4 ++++ b/m4/macros/with_addon.m4 +@@ -12,7 +12,7 @@ if test "$withval" = "yes"; then + elif test "$withval" = "no"; then + with_$1=no + else +- AC_MSG_ERROR(please use \"yes\" or \"no\" with --with-$1) ++ AC_MSG_ERROR(please use "yes" or "no" with --with-$1) + fi + ],[ + with_$1=yes diff --git a/am-utils-6.2-update-configure_ac.patch b/am-utils-6.2-update-configure_ac.patch new file mode 100644 index 0000000..8fd5935 --- /dev/null +++ b/am-utils-6.2-update-configure_ac.patch @@ -0,0 +1,84 @@ +am-utils-6.2 - update configure.ac + +From: Ian Kent + +Make some changes to configure.ac suggested by autoupdate from autoconf +2.71. + +Also move AC_USE_SYSTEM_EXTENSIONS and AC_SEARCH_LIBS([strerror],[cposix]) +further up to elliminate some warnings. + +Signed-off-by: Ian Kent +--- + configure.ac | 18 +++++++----------- + 1 file changed, 7 insertions(+), 11 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e1bc3290..ef4dab0e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -12,9 +12,7 @@ dnl ###################################################################### + dnl INITIALIZATION + dnl AC_INIT + dnl new init style: PACKAGE, VERSION, BUG-REPORTING-ADDRESS +-AC_INIT([am-utils], +- sinclude([vers.m4]), +- [https://bugzilla.am-utils.org/ or am-utils@am-utils.org]) ++AC_INIT([am-utils],sinclude([vers.m4]),[https://bugzilla.am-utils.org/ or am-utils@am-utils.org]) + AC_MSG_NOTICE(*** INITIALIZATION ***) + AC_CONFIG_SRCDIR([amd/amd.c]) + AC_CONFIG_MACRO_DIR([m4]) +@@ -55,7 +53,7 @@ AH_BOTTOM([ + ]) + dnl + dnl AC_CONFIG_AUX_DIR(m4) +-AC_PREREQ(2.52) ++AC_PREREQ(2.69) + AC_REVISION($Revision: 1.134 $) + AC_COPYRIGHT([Copyright (c) 1997-2011 Erez Zadok]) + dnl find out system type +@@ -105,14 +103,14 @@ dnl ====================================================================== + dnl Particular Program Checks + AC_MSG_NOTICE(*** PARTICULAR PROGRAMS (part 1) ***) + dnl AC-PROG-LIBTOOL will run this, but we need this to squelch warnings +-dnl from autoconf about AMU_TRY_COMPILE running before AC_AIX/AC_ISC_POSIX ++dnl from autoconf about AMU_TRY_COMPILE running before AC_USE_SYSTEM_EXTENSIONS/AC_SEARCH_LIBS([strerror],[cposix]) ++AC_USE_SYSTEM_EXTENSIONS ++AC_SEARCH_LIBS([strerror],[cposix]) + AC_PROG_CC + AC_PROG_CPP + AC_PROG_CC_C_O + AC_PROG_GCC_TRADITIONAL + AC_PROG_MAKE_SET +-AC_ISC_POSIX +-AC_AIX + dnl XXX: available in autoconf-2.14 + dnl AC_PROG_CC_STDC + dnl ====================================================================== +@@ -148,7 +146,7 @@ dnl my version of prog_libtool will not build shared by default + dnl AM_PROG_LIBTOOL2 + dnl build static libraries by default + AC_DISABLE_SHARED +-dnl XXX: for autoconf-2.14: use AC_PROG_LIBTOOL, not AM_PROG_LIBTOOL ++dnl XXX: for autoconf-2.69: use LT_INIT, not AC_PROG_LIBTOOL + case ${host_os} in + # Temporarily undo renaming of "linux-gnu" to "linux", because + # libtool only looks for "linux-gnu". Sigh. +@@ -156,7 +154,7 @@ case ${host_os} in + esac + dnl this line must appear only once and on its own line + dnl (hence the double case statements above and below) +-AC_PROG_LIBTOOL ++LT_INIT + case ${host_os} in + # end temporary renaming of "linux-gnu" to "linux" + linux-gnu ) host_os=linux ;; +@@ -175,8 +173,6 @@ dnl ###################################################################### + dnl Some of these macros must be called before any call to the C compiler + AC_MSG_NOTICE(*** UNIX VARIANTS ***) + dnl UNIX VARIANTS +-dnl AC_AIX +-dnl AC_ISC_POSIX + AMU_LINUX_HEADERS + dnl ====================================================================== + diff --git a/am-utils-6.2-use-linux-libtirpc-if-present.patch b/am-utils-6.2-use-linux-libtirpc-if-present.patch index f1fa47b..8b20351 100644 --- a/am-utils-6.2-use-linux-libtirpc-if-present.patch +++ b/am-utils-6.2-use-linux-libtirpc-if-present.patch @@ -10,8 +10,8 @@ Signed-off-by: Ian Kent Makefile.am | 3 ++- configure.ac | 4 ++++ include/am_compat.h | 8 ++++++-- - m4/macros/check_linux_libtirpc.m4 | 14 ++++++++++++++ - 4 files changed, 26 insertions(+), 3 deletions(-) + m4/macros/check_linux_libtirpc.m4 | 15 +++++++++++++++ + 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 m4/macros/check_linux_libtirpc.m4 diff --git a/Makefile.am b/Makefile.am @@ -74,10 +74,10 @@ index 3463f3fa..d6826fc7 100644 #ifndef INADDR_NONE diff --git a/m4/macros/check_linux_libtirpc.m4 b/m4/macros/check_linux_libtirpc.m4 new file mode 100644 -index 00000000..0abd1ad3 +index 00000000..7b40e45c --- /dev/null +++ b/m4/macros/check_linux_libtirpc.m4 -@@ -0,0 +1,14 @@ +@@ -0,0 +1,15 @@ +dnl ###################################################################### +dnl Check for Linux libtirpc library +AC_DEFUN([AMU_CHECK_LIBTIRPC],[ @@ -92,3 +92,4 @@ index 00000000..0abd1ad3 + AC_DEFINE(HAVE_LIBTIRPC, 1, [Define to 1 if you have libtirpc headers installed]) + fi +]) ++dnl ====================================================================== diff --git a/am-utils.spec b/am-utils.spec index 7add392..c323f27 100644 --- a/am-utils.spec +++ b/am-utils.spec @@ -2,7 +2,7 @@ Summary: Automount utilities including an updated version of Amd Name: am-utils Version: 6.2.0 %define upstream_version 6.2 -Release: 44%{?dist} +Release: 45%{?dist} License: BSD Epoch: 5 URL: http://am-utils.org @@ -85,6 +85,15 @@ Patch34: am-utils-6.2-fix-umount-to-mount-race.patch Patch35: am-utils-6.2-fix-nfsv3-fh-length-in-NFS_FH_DREF.patch +Patch36: am-utils-6.2-fix-double-quote-escaping.patch +Patch37: am-utils-6.2-convert-AM_CONFIG_HEADER-to-AC_CONFIG_HEADERS.patch +Patch38: am-utils-6.2-convert-AC_HELP_STRING-to-AS_HELP_STRING.patch +Patch39: am-utils-6.2-convert-AC_TRY_COMPILE-to-AC_COMPILE_IFELSE.patch +Patch40: am-utils-6.2-convert-AC_TRY_LINK-to-AC_LINK_IFELSE.patch +Patch41: am-utils-6.2-convert-AC_TRY_RUN-to-AC_RUN_IFELSE.patch +Patch42: am-utils-6.2-update-configure_ac.patch +Patch43: am-utils-6.2-dont-prevent-building-with-autoconf-2_71.patch + # Not needed since autoreconf/libtool appear to do this automatically # Leaving it set doesn't appear to be a problem so leave it set in # case this changes. @@ -94,6 +103,10 @@ Patch35: am-utils-6.2-fix-nfsv3-fh-length-in-NFS_FH_DREF.patch %define _use_internal_dependency_generator 0 %define old_find_requires %{__find_requires} +# The sed munging of configure by _fix_broken_configure_for_lto +# causes a check failure so opt-out. +%global _lto_cflags %nil + %description Am-utils includes an updated version of Amd, the popular BSD automounter. An automounter is a program which maintains a cache @@ -143,6 +156,14 @@ mounting and unmounting filesystems. %patch33 -p1 %patch34 -p1 %patch35 -p1 +%patch36 -p1 +%patch37 -p1 +%patch38 -p1 +%patch39 -p1 +%patch40 -p1 +%patch41 -p1 +%patch42 -p1 +%patch43 -p1 ./bootstrap @@ -246,6 +267,16 @@ fi %{_libdir}/libamu.so* %changelog +* Sat Aug 28 2021 Ian Kent - 5:6.2.0-45 +- fix autoconf double quote escaping. +- convert autoconf AM_CONFIG_HEADER to AC_CONFIG_HEADERS. +- convert autoconf AC_HELP_STRING to AS_HELP_STRING. +- convert autoconf AC_TRY_COMPILE to AC_COMPILE_IFELSE. +- convert autoconf AC_TRY_LINK to AC_LINK_IFELSE. +- convert autoconf AC_TRY_RUN to AC_RUN_IFELSE. +- update autoconf configure.ac. +- dont prevent building with autoconf 2.71. + * Wed Jul 21 2021 Fedora Release Engineering - 5:6.2.0-44 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild