diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..e69de29 diff --git a/.gitignore b/.gitignore index 6d683a2..e72c193 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1 @@ -am-utils-6.1.5.tar.gz -*~ -*.log -*.rpm -/am-utils-6.2.0-1.git.bb13dea6.tar.gz /am-utils-6.2.tar.gz diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7dcaf1f --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +# Makefile for source rpm: am-utils +# $Id$ +NAME := am-utils +SPECFILE = $(firstword $(wildcard *.spec)) + +include ../common/Makefile.common diff --git a/am-utils-6.2-add-get_nfs_xprt-and-put_nfs_xprt-functions.patch b/am-utils-6.2-add-get_nfs_xprt-and-put_nfs_xprt-functions.patch index 56e3b55..c24b20e 100644 --- a/am-utils-6.2-add-get_nfs_xprt-and-put_nfs_xprt-functions.patch +++ b/am-utils-6.2-add-get_nfs_xprt-and-put_nfs_xprt-functions.patch @@ -24,7 +24,7 @@ Signed-off-by: Ian Kent 3 files changed, 91 insertions(+), 1 deletion(-) diff --git a/conf/transp/transp_sockets.c b/conf/transp/transp_sockets.c -index 6326007..98f79c8 100644 +index 6326007..a6e0054 100644 --- a/conf/transp/transp_sockets.c +++ b/conf/transp/transp_sockets.c @@ -45,6 +45,7 @@ @@ -89,7 +89,7 @@ index 6326007..98f79c8 100644 /* * Create the amq service for amd (both TCP and UDP) diff --git a/conf/transp/transp_tli.c b/conf/transp/transp_tli.c -index d26a511..ea565cc 100644 +index d26a511..bfdb526 100644 --- a/conf/transp/transp_tli.c +++ b/conf/transp/transp_tli.c @@ -45,7 +45,8 @@ diff --git a/am-utils-6.2-allow-autoconf-2.72.patch b/am-utils-6.2-allow-autoconf-2.72.patch deleted file mode 100644 index ff2d70d..0000000 --- a/am-utils-6.2-allow-autoconf-2.72.patch +++ /dev/null @@ -1,28 +0,0 @@ -am-utils-6.2 - allow autoconf 2.72 - -From: Ian Kent - -am-utils creates configure at build time and requires versions of autoconf -that are known to work ok. - -Allow autoconf version 2.72 to get a build. - -Signed-off-by: Ian Kent ---- - bootstrap | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/bootstrap b/bootstrap -index d454c63..55b2084 100755 ---- a/bootstrap -+++ b/bootstrap -@@ -10,7 +10,8 @@ validateversion() { - case "$v" in - *2.69) ;; - *2.71) ;; -- *) echo "am-utils requires autoconf 2.69 or 2.71, you have:" -+ *2.72) ;; -+ *) echo "am-utils requires autoconf 2.69, 2.71 or 2.72, you have:" - echo " $v" - exit 1;; - esac diff --git a/am-utils-6.2-allow-old-autoconf-version.patch b/am-utils-6.2-allow-old-autoconf-version.patch new file mode 100644 index 0000000..9b0edae --- /dev/null +++ b/am-utils-6.2-allow-old-autoconf-version.patch @@ -0,0 +1,12 @@ +diff -up am-utils-6.2/bootstrap.autoconf-version am-utils-6.2/bootstrap +--- am-utils-6.2/bootstrap.autoconf-version 2016-01-24 10:15:30.064158815 +0800 ++++ am-utils-6.2/bootstrap 2016-01-24 10:16:00.884635887 +0800 +@@ -8,7 +8,7 @@ + validateversion() { + local v="$(autoreconf --version 2>&1 | head -1)" + case "$v" in +- *2.69) ;; ++ *2.63) ;; + *) echo "am-utils requires autoconf 2.69, you have:" + echo " $v" + exit 1;; 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 deleted file mode 100644 index b8208ff..0000000 --- a/am-utils-6.2-convert-AC_HELP_STRING-to-AS_HELP_STRING.patch +++ /dev/null @@ -1,95 +0,0 @@ -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 deleted file mode 100644 index d4cd3cf..0000000 --- a/am-utils-6.2-convert-AC_TRY_COMPILE-to-AC_COMPILE_IFELSE.patch +++ /dev/null @@ -1,272 +0,0 @@ -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 deleted file mode 100644 index 6b753c4..0000000 --- a/am-utils-6.2-convert-AC_TRY_LINK-to-AC_LINK_IFELSE.patch +++ /dev/null @@ -1,67 +0,0 @@ -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 deleted file mode 100644 index 5230395..0000000 --- a/am-utils-6.2-convert-AC_TRY_RUN-to-AC_RUN_IFELSE.patch +++ /dev/null @@ -1,277 +0,0 @@ -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 deleted file mode 100644 index 9744db4..0000000 --- a/am-utils-6.2-convert-AM_CONFIG_HEADER-to-AC_CONFIG_HEADERS.patch +++ /dev/null @@ -1,25 +0,0 @@ -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-include-linux_mount_h.patch b/am-utils-6.2-dont-include-linux_mount_h.patch deleted file mode 100644 index 2f8aaf5..0000000 --- a/am-utils-6.2-dont-include-linux_mount_h.patch +++ /dev/null @@ -1,35 +0,0 @@ -am-utils-6.2 - dont include linux/mount.h - -From: Ian Kent - -Updates to glibc to add support for fsconfig() et. al. have introduced -conflicts between sys/mount.h and the corresponding kernel header -linux/mount.h. - -But sys/mount.h and linux/mount.h provide very close to the same -definitions except that sys/mount.h has some additional function -declarations. - -So add a macro define to the amd include file to stop its inclusion -of linux/mount.h when including linux/fs.h so that sys/mount.h is -used instead. - -Signed-off-by: Ian Kent ---- - include/mount_headers1.h | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/include/mount_headers1.h b/include/mount_headers1.h -index 7d518a06..af9a90ee 100644 ---- a/include/mount_headers1.h -+++ b/include/mount_headers1.h -@@ -160,6 +160,9 @@ - # endif /* HAVE_LINUX_LIST_H */ - # include - # else -+# ifdef HAVE_SYS_MOUNT_H -+# define _LINUX_MOUNT_H -+# endif /* HAVE_SYS_MOUNT_H */ - # include - # endif/* (!__GLIBC__ || __GLIBC__ < 2) */ - #endif /* HAVE_LINUX_FS_H */ 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 deleted file mode 100644 index d97c535..0000000 --- a/am-utils-6.2-dont-prevent-building-with-autoconf-2_71.patch +++ /dev/null @@ -1,26 +0,0 @@ -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-SEGV-on-quick-reply-error.patch b/am-utils-6.2-fix-SEGV-on-quick-reply-error.patch deleted file mode 100644 index 3d7c268..0000000 --- a/am-utils-6.2-fix-SEGV-on-quick-reply-error.patch +++ /dev/null @@ -1,33 +0,0 @@ -am-utils-6.2 - fix SEGV on quick reply error - -From: Ian Kent - -Clearly a programming mistake on my part, odd it hasn't been seen -before ... - -Signed-off-by: Ian Kent ---- - amd/nfs_subr.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/amd/nfs_subr.c b/amd/nfs_subr.c -index b88a40c8..c0ca0e42 100644 ---- a/amd/nfs_subr.c -+++ b/amd/nfs_subr.c -@@ -1293,6 +1293,8 @@ nfs_quick_reply3(am_node *mp, int error) - am_post_op_attr *post_op_obj; - int ret; - -+ post_op_dir = &result.res_u.ok.dir_attributes; -+ - if (error) { - /* - * Return the error that was passed to us. -@@ -1300,7 +1302,6 @@ nfs_quick_reply3(am_node *mp, int error) - post_op_dir->attributes_follow = 0; - result.status = nfs_error(error); - } else { -- post_op_dir = &result.res_u.ok.dir_attributes; - post_op_obj = &result.res_u.ok.obj_attributes; - am_fattr3 *fattr3; - nfsfattr *fattr; diff --git a/am-utils-6.2-fix-autoconf-check-in-bootstrap.patch b/am-utils-6.2-fix-autoconf-check-in-bootstrap.patch new file mode 100644 index 0000000..325621a --- /dev/null +++ b/am-utils-6.2-fix-autoconf-check-in-bootstrap.patch @@ -0,0 +1,13 @@ +diff -up am-utils-6.2/bootstrap.autoconf am-utils-6.2/bootstrap +--- am-utils-6.2/bootstrap.autoconf 2016-11-30 14:57:05.419388173 +0800 ++++ am-utils-6.2/bootstrap 2016-11-30 14:57:40.177131005 +0800 +@@ -9,7 +9,8 @@ validateversion() { + local v="$(autoreconf --version 2>&1 | head -1)" + case "$v" in + *2.63) ;; +- *) echo "am-utils requires autoconf 2.69, you have:" ++ *2.69) ;; ++ *) echo "am-utils requires autoconf 2.69 or 2.63, 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 deleted file mode 100644 index 8373b4d..0000000 --- a/am-utils-6.2-fix-double-quote-escaping.patch +++ /dev/null @@ -1,64 +0,0 @@ -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-fix-fedora-mock-build-fail.patch b/am-utils-6.2-fix-fedora-mock-build-fail.patch deleted file mode 100644 index 7fb2b0c..0000000 --- a/am-utils-6.2-fix-fedora-mock-build-fail.patch +++ /dev/null @@ -1,82 +0,0 @@ -am-utils-6.2 - fix fedora mock build fail - -From: Ian Kent - -NFSv4 really needs to be used here but fedora mock builds don't seem -to be able to see the kernel modules. And when NFSv4 is a module, and -has not been used yet, the test fails. - -So use the existing hack to ensure NFSv4 is seen as supported for both -check_fs_mntent.m4 and check_mount_type.m4 in m4/macros. - -Signed-off-by: Ian Kent ---- - m4/macros/check_fs_mntent.m4 | 23 +++++++++++++---------- - m4/macros/check_mount_type.m4 | 18 ++++++++++++++++++ - 2 files changed, 31 insertions(+), 10 deletions(-) - -diff --git a/m4/macros/check_fs_mntent.m4 b/m4/macros/check_fs_mntent.m4 -index 45ac4974..de3d9a91 100644 ---- a/m4/macros/check_fs_mntent.m4 -+++ b/m4/macros/check_fs_mntent.m4 -@@ -141,18 +141,21 @@ do - break - fi - -- if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" -+ if test $ac_fs_tmp = "nfs3" -o $ac_fs_tmp = "nfs4" - then -- # hack hack hack -- # in 6.1, which has fallback to v2/udp, we might want -- # to always use version 4. -- # in 6.0 we do not have much choice -- # -- let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" -- if test $nfs_mount_version -ge 4 -+ if test "$ac_cv_header_linux_nfs_mount_h" = "yes" - then -- eval "ac_cv_fs_$ac_fs_name=yes" -- break -+ # hack hack hack -+ # in 6.1, which has fallback to v2/udp, we might want -+ # to always use version 4. -+ # in 6.0 we do not have much choice -+ # -+ let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" -+ if test $nfs_mount_version -ge 4 -+ then -+ eval "ac_cv_fs_$ac_fs_name=yes" -+ break -+ fi - fi - fi - -diff --git a/m4/macros/check_mount_type.m4 b/m4/macros/check_mount_type.m4 -index 88f85323..69354221 100644 ---- a/m4/macros/check_mount_type.m4 -+++ b/m4/macros/check_mount_type.m4 -@@ -155,6 +155,24 @@ do - break - fi - -+ if test $ac_fs_tmp = "nfs4" -+ then -+ if test "$ac_cv_header_linux_nfs_mount_h" = "yes" -+ then -+ # hack hack hack -+ # in 6.1, which has fallback to v2/udp, we might want -+ # to always use version 4. -+ # in 6.0 we do not have much choice -+ # -+ let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" -+ if test $nfs_mount_version -ge 4 -+ then -+ eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" -+ break -+ fi -+ fi -+ fi -+ - # run a test program for bsdi3 - AC_RUN_IFELSE( - [AC_LANG_SOURCE( diff --git a/am-utils-6.2-fix-fsmount-naming-conflict.patch b/am-utils-6.2-fix-fsmount-naming-conflict.patch deleted file mode 100644 index 30de666..0000000 --- a/am-utils-6.2-fix-fsmount-naming-conflict.patch +++ /dev/null @@ -1,307 +0,0 @@ -am-utils-6.2 - fix fsmount naming conflict - -From: Ian Kent - -The mount API's new fsmount() system call conflicts with am-utils -struct fsmount so rename it and realted program variables from -fsmount to fs_mount. - -Signed-off-by: Ian Kent ---- - fsinfo/fsi_analyze.c | 14 +++++++------- - fsinfo/fsi_data.h | 6 +++--- - fsinfo/fsi_gram.y | 16 ++++++++-------- - fsinfo/fsi_util.c | 10 +++++----- - fsinfo/fsinfo.h | 4 ++-- - fsinfo/wr_bparam.c | 2 +- - fsinfo/wr_fstab.c | 26 +++++++++++++------------- - 7 files changed, 39 insertions(+), 39 deletions(-) - -diff --git a/fsinfo/fsi_analyze.c b/fsinfo/fsi_analyze.c -index 78598b85..0b92cfd7 100644 ---- a/fsinfo/fsi_analyze.c -+++ b/fsinfo/fsi_analyze.c -@@ -404,7 +404,7 @@ fixup_required_disk_info(disk_fs *dp) - - - static void --fixup_required_mount_info(fsmount *fp, dict_ent *de) -+fixup_required_mount_info(fs_mount *fp, dict_ent *de) - { - if (!ISSET(fp->f_mask, FM_FROM)) { - if (de->de_count != 1) { -@@ -417,24 +417,24 @@ fixup_required_mount_info(fsmount *fp, dict_ent *de) - if (!mp) - abort(); - fp->f_ref = mp; -- set_fsmount(fp, FM_FROM, mp->m_dk->d_host->h_hostname); -+ set_fs_mount(fp, FM_FROM, mp->m_dk->d_host->h_hostname); - fsi_log("set: %s comes from %s", fp->f_volname, fp->f_from); - } - } - - if (!ISSET(fp->f_mask, FM_FSTYPE)) { -- set_fsmount(fp, FM_FSTYPE, xstrdup("nfs")); -+ set_fs_mount(fp, FM_FSTYPE, xstrdup("nfs")); - fsi_log("set: fstype is %s", fp->f_fstype); - } - - if (!ISSET(fp->f_mask, FM_OPTS)) { -- set_fsmount(fp, FM_OPTS, xstrdup("rw,nosuid,grpid,defaults")); -+ set_fs_mount(fp, FM_OPTS, xstrdup("rw,nosuid,grpid,defaults")); - fsi_log("set: opts are %s", fp->f_opts); - } - - if (!ISSET(fp->f_mask, FM_LOCALNAME)) { - if (fp->f_ref) { -- set_fsmount(fp, FM_LOCALNAME, xstrdup(fp->f_volname)); -+ set_fs_mount(fp, FM_LOCALNAME, xstrdup(fp->f_volname)); - fsi_log("set: localname is %s", fp->f_localname); - } else { - lerror(fp->f_ioloc, "cannot determine localname since volname %s is not uniquely defined", fp->f_volname); -@@ -476,10 +476,10 @@ static void - analyze_mounts(host *hp) - { - qelem *q = hp->h_mount; -- fsmount *fp; -+ fs_mount *fp; - int netbootp = 0; - -- ITER(fp, fsmount, q) { -+ ITER(fp, fs_mount, q) { - char *p; - char *nn = xstrdup(fp->f_volname); - int req; -diff --git a/fsinfo/fsi_data.h b/fsinfo/fsi_data.h -index 4cc341d8..3a190626 100644 ---- a/fsinfo/fsi_data.h -+++ b/fsinfo/fsi_data.h -@@ -47,7 +47,7 @@ typedef struct dict_data dict_data; - typedef struct dict_ent dict_ent; - typedef struct disk_fs disk_fs; - typedef struct ether_if ether_if; --typedef struct fsmount fsmount; -+typedef struct fs_mount fs_mount; - typedef struct host host; - typedef struct ioloc ioloc; - typedef struct fsi_mount fsi_mount; -@@ -85,7 +85,7 @@ struct host { - qelem q; - int h_mask; - ioloc *h_ioloc; -- fsmount *h_netroot, *h_netswap; -+ fs_mount *h_netroot, *h_netswap; - #define HF_HOST 0 - char *h_hostname; /* The full name of the host */ - char *h_lochost; /* The name of the host with local domains stripped */ -@@ -181,7 +181,7 @@ struct fsi_mount { - * disk_fs_strings in analyze.c will - * need updating. - */ --struct fsmount { -+struct fs_mount { - qelem f_q; - fsi_mount *f_ref; - ioloc *f_ioloc; -diff --git a/fsinfo/fsi_gram.y b/fsinfo/fsi_gram.y -index 85d19aa5..17d32401 100644 ---- a/fsinfo/fsi_gram.y -+++ b/fsinfo/fsi_gram.y -@@ -56,7 +56,7 @@ extern qelem *list_of_hosts, *list_of_automounts; - qelem *q; - char *s; - fsi_mount *m; -- fsmount *f; -+ fs_mount *f; - } - - %token tARCH -@@ -372,7 +372,7 @@ list_of_mounts : - { $$ = 0; } - - | list_of_mounts tMOUNT tSTR localinfo_list -- { set_fsmount($4, FM_VOLNAME, $3); -+ { set_fs_mount($4, FM_VOLNAME, $3); - if ($1) - $$ = $1; - else -@@ -392,22 +392,22 @@ list_of_mounts : - */ - localinfo_list : - /* empty */ -- { $$ = new_fsmount(); } -+ { $$ = new_fs_mount(); } - - | localinfo_list tDIRECT -- { $$ = $1; set_fsmount($$, FM_DIRECT, ""); } -+ { $$ = $1; set_fs_mount($$, FM_DIRECT, ""); } - - | localinfo_list tAS tSTR -- { $$ = $1; set_fsmount($$, FM_LOCALNAME, $3); } -+ { $$ = $1; set_fs_mount($$, FM_LOCALNAME, $3); } - - | localinfo_list tFROM tSTR -- { $$ = $1; set_fsmount($$, FM_FROM, $3); } -+ { $$ = $1; set_fs_mount($$, FM_FROM, $3); } - - | localinfo_list tFSTYPE tSTR -- { $$ = $1; set_fsmount($$, FM_FSTYPE, $3); } -+ { $$ = $1; set_fs_mount($$, FM_FSTYPE, $3); } - - | localinfo_list tOPTS tSTR -- { $$ = $1; set_fsmount($$, FM_OPTS, $3); } -+ { $$ = $1; set_fs_mount($$, FM_OPTS, $3); } - - | localinfo_list error '=' tSTR - { yyerror("unknown mount attribute"); } -diff --git a/fsinfo/fsi_util.c b/fsinfo/fsi_util.c -index f8ff313c..d53ff0df 100644 ---- a/fsinfo/fsi_util.c -+++ b/fsinfo/fsi_util.c -@@ -581,7 +581,7 @@ new_mount(void) - - - void --set_fsmount(fsmount *fp, int k, char *v) -+set_fs_mount(fs_mount *fp, int k, char *v) - { - int m = 1 << k; - -@@ -623,13 +623,13 @@ set_fsmount(fsmount *fp, int k, char *v) - } - - --fsmount * --new_fsmount(void) -+fs_mount * -+new_fs_mount(void) - { -- fsmount *fp = CALLOC(struct fsmount); -+ fs_mount *fp = CALLOC(struct fs_mount); - - fp->f_ioloc = current_location(); -- show_new("fsmount"); -+ show_new("fs_mount"); - return fp; - } - -diff --git a/fsinfo/fsinfo.h b/fsinfo/fsinfo.h -index 7a871631..896f8bec 100644 ---- a/fsinfo/fsinfo.h -+++ b/fsinfo/fsinfo.h -@@ -63,7 +63,7 @@ extern dict *new_dict(void); - extern dict_ent *dict_locate(dict *, char *); - extern disk_fs *new_disk_fs(void); - extern ether_if *new_ether_if(void); --extern fsmount *new_fsmount(void); -+extern fs_mount *new_fs_mount(void); - extern host *new_host(void); - extern int dict_iter(dict *, int (*)(qelem *)); - extern int errors; -@@ -94,7 +94,7 @@ extern void lwarning(ioloc *l, char *fmt, ...) - __attribute__((__format__(__printf__, 2, 3))); - extern void rem_que(qelem *); - extern void set_disk_fs(disk_fs *, int, char *); --extern void set_fsmount(fsmount *, int, char *); -+extern void set_fs_mount(fs_mount *, int, char *); - extern void set_mount(fsi_mount *, int, char *); - extern void show_area_being_processed(char *area, int n); - extern void show_new(char *msg); -diff --git a/fsinfo/wr_bparam.c b/fsinfo/wr_bparam.c -index 00befa9c..b318d5d3 100644 ---- a/fsinfo/wr_bparam.c -+++ b/fsinfo/wr_bparam.c -@@ -49,7 +49,7 @@ - * Write a host/path in NFS format - */ - static int --write_nfsname(FILE *ef, fsmount *fp, char *hn) -+write_nfsname(FILE *ef, fs_mount *fp, char *hn) - { - int errors = 0; - char *h = xstrdup(fp->f_ref->m_dk->d_host->h_hostname); -diff --git a/fsinfo/wr_fstab.c b/fsinfo/wr_fstab.c -index 166353eb..4daf161d 100644 ---- a/fsinfo/wr_fstab.c -+++ b/fsinfo/wr_fstab.c -@@ -48,22 +48,22 @@ - - /* forward definitions */ - static void write_aix1_dkfstab(FILE *ef, disk_fs *dp); --static void write_aix1_dkrmount(FILE *ef, char *hn, fsmount *fp); -+static void write_aix1_dkrmount(FILE *ef, char *hn, fs_mount *fp); - static void write_aix3_dkfstab(FILE *ef, disk_fs *dp); --static void write_aix3_dkrmount(FILE *ef, char *hn, fsmount *fp); -+static void write_aix3_dkrmount(FILE *ef, char *hn, fs_mount *fp); - static int write_dkfstab(FILE *ef, qelem *q, void (*output) (FILE *, disk_fs *)); --static int write_dkrmount(FILE *ef, qelem *q, char *hn, void (*output) (FILE *, char *, fsmount *)); -+static int write_dkrmount(FILE *ef, qelem *q, char *hn, void (*output) (FILE *, char *, fs_mount *)); - static void write_generic_dkfstab(FILE *ef, disk_fs *dp); --static void write_generic_dkrmount(FILE *ef, char *hn, fsmount *fp); -+static void write_generic_dkrmount(FILE *ef, char *hn, fs_mount *fp); - static void write_ultrix_dkfstab(FILE *ef, disk_fs *dp); --static void write_ultrix_dkrmount(FILE *ef, char *hn, fsmount *fp); -+static void write_ultrix_dkrmount(FILE *ef, char *hn, fs_mount *fp); - - /* ----------------------------------------------- */ - - static struct os_fstab_type { - char *os_name; - void (*op_fstab) (FILE *ef, disk_fs *dp); -- void (*op_mount) (FILE *ef, char *hn, fsmount *fp); -+ void (*op_mount) (FILE *ef, char *hn, fs_mount *fp); - } os_tabs[] = { - - { -@@ -117,7 +117,7 @@ write_aix1_dkfstab(FILE *ef, disk_fs *dp) - - - static void --write_aix1_dkrmount(FILE *ef, char *hn, fsmount *fp) -+write_aix1_dkrmount(FILE *ef, char *hn, fs_mount *fp) - { - char *h = xstrdup(fp->f_ref->m_dk->d_host->h_hostname); - char *hp = xstrdup(h); -@@ -166,7 +166,7 @@ write_aix3_dkfstab(FILE *ef, disk_fs *dp) - - - static void --write_aix3_dkrmount(FILE *ef, char *hn, fsmount *fp) -+write_aix3_dkrmount(FILE *ef, char *hn, fs_mount *fp) - { - char *h = xstrdup(fp->f_ref->m_dk->d_host->h_hostname); - -@@ -200,7 +200,7 @@ write_ultrix_dkfstab(FILE *ef, disk_fs *dp) - - - static void --write_ultrix_dkrmount(FILE *ef, char *hn, fsmount *fp) -+write_ultrix_dkrmount(FILE *ef, char *hn, fs_mount *fp) - { - char *h = xstrdup(fp->f_ref->m_dk->d_host->h_hostname); - -@@ -234,7 +234,7 @@ write_generic_dkfstab(FILE *ef, disk_fs *dp) - - - static void --write_generic_dkrmount(FILE *ef, char *hn, fsmount *fp) -+write_generic_dkrmount(FILE *ef, char *hn, fs_mount *fp) - { - char *h; - -@@ -291,12 +291,12 @@ write_dkfstab(FILE *ef, qelem *q, void (*output) (FILE *, disk_fs *)) - - - static int --write_dkrmount(FILE *ef, qelem *q, char *hn, void (*output) (FILE *, char *, fsmount *)) -+write_dkrmount(FILE *ef, qelem *q, char *hn, void (*output) (FILE *, char *, fs_mount *)) - { - int errors = 0; -- fsmount *fp; -+ fs_mount *fp; - -- ITER(fp, fsmount, q) -+ ITER(fp, fs_mount, q) - (*output) (ef, hn, fp); - - return errors; diff --git a/am-utils-6.2-fix-linux-nfs-kernel-module-search.patch b/am-utils-6.2-fix-linux-nfs-kernel-module-search.patch deleted file mode 100644 index 41c539c..0000000 --- a/am-utils-6.2-fix-linux-nfs-kernel-module-search.patch +++ /dev/null @@ -1,134 +0,0 @@ -am-utils-6.2 - fix linux nfs kernel module search - -From: Ian Kent - -The configure macros AMU_CHECK_FS_MNTENT() and AMU_CHECK_MOUNT_TYPE() -haven't been updated for a log time. In particular kernel modules that -are xz compressed aren't considered. - -Also the containing subdirectory name isn't always the the same as -the module name and needs to be special cased. - -The cases I found have been fixed, there are probably more but this -is enough to get us started. - -Signed-off-by: Ian Kent ---- - amd/amfs_host.c | 1 + - configure.ac | 6 +++--- - m4/macros/check_fs_mntent.m4 | 17 +++++++++++++++-- - m4/macros/check_mount_type.m4 | 29 +++++++++++++++++++++++++---- - 4 files changed, 44 insertions(+), 9 deletions(-) - -diff --git a/amd/amfs_host.c b/amd/amfs_host.c -index a363c5cc..deaf69fa 100644 ---- a/amd/amfs_host.c -+++ b/amd/amfs_host.c -@@ -50,6 +50,7 @@ - #endif /* HAVE_CONFIG_H */ - #include - #include -+#include - - static char *amfs_host_match(am_opts *fo); - static int amfs_host_init(mntfs *mf); -diff --git a/configure.ac b/configure.ac -index ef4dab0e..408964d8 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -808,8 +808,8 @@ dnl NFS related tests need to happen earlier: many things depend on them - AMU_STRUCT_FIELD_NFS_FH - AMU_STRUCT_NFS_FH - AMU_STRUCT_NFS_FH3 --AMU_CHECK_FS_MNTENT(nfs3) --AMU_CHECK_FS_MNTENT(nfs4) -+AMU_CHECK_FS_MNTENT(nfsv3 nfs3, nfs3) -+AMU_CHECK_FS_MNTENT(nfsv4 nfs4, nfs4) - dnl ====================================================================== - - dnl ----------------------------------------------------------------------- -@@ -1117,7 +1117,7 @@ dnl check for mount(2) type/name for filesystem (MNTTYPE_*, MOUNT_*) - AC_MSG_NOTICE(*** MOUNTING TYPES ***) - AMU_CHECK_MOUNT_TYPE(nfs) - AMU_CHECK_MOUNT_TYPE(nfs3) --AMU_CHECK_MOUNT_TYPE(nfs4) -+AMU_CHECK_MOUNT_TYPE(nfsv4 nfs4, nfs4) - AMU_CHECK_MOUNT_TYPE(lustre) - AMU_CHECK_MOUNT_TYPE(ext4 ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix, ufs) - AMU_CHECK_MOUNT_TYPE(xfs) -diff --git a/m4/macros/check_fs_mntent.m4 b/m4/macros/check_fs_mntent.m4 -index e612b4ec..45ac4974 100644 ---- a/m4/macros/check_fs_mntent.m4 -+++ b/m4/macros/check_fs_mntent.m4 -@@ -98,12 +98,25 @@ do - fi - - # look for a loadable filesystem module (linux 2.4+) -- if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko -+ ac_fs_subdir=$ac_fs_tmp -+ if test -n "$2" -+ then -+ if test "$ac_fs_tmp" = "nfsv3" -o "$ac_fs_tmp" = "nfsv4" -+ then -+ ac_fs_subdir="nfs" -+ fi -+ fi -+ if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_subdir/$ac_fs_tmp.ko.xz -+ then -+ eval "ac_cv_fs_$ac_fs_name=yes" -+ break -+ fi -+ if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_subdir/$ac_fs_tmp.ko - then - eval "ac_cv_fs_$ac_fs_name=yes" - break - fi -- if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o -+ if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_subdir/$ac_fs_tmp.o - then - eval "ac_cv_fs_$ac_fs_name=yes" - break -diff --git a/m4/macros/check_mount_type.m4 b/m4/macros/check_mount_type.m4 -index c779e0bf..88f85323 100644 ---- a/m4/macros/check_mount_type.m4 -+++ b/m4/macros/check_mount_type.m4 -@@ -104,14 +104,35 @@ do - fi - - # look for a loadable filesystem module (linux 2.4+) -- if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko -+ # special casing here assumes preferred option name will be -+ # first in the list. -+ ac_fs_option="$ac_fs_tmp" -+ ac_fs_subdir=$ac_fs_tmp -+ if test -n "$2" - then -- eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" -+ if test "$ac_fs_tmp" = "nfsv3" -o "$ac_fs_tmp" = "nfsv4" -+ then -+ ac_fs_subdir="nfs" -+ ac_fs_option="$ac_fs_name" -+ fi -+ if test "$ac_fs_tmp" = "vfat" -o "$ac_fs_tmp" = "msdos" -+ then -+ ac_fs_subdir="fat" -+ fi -+ fi -+ if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_subdir/$ac_fs_tmp.ko.xz -+ then -+ eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_option\\\"" - break - fi -- if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o -+ if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_subdir/$ac_fs_tmp.ko - then -- eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" -+ eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_option\\\"" -+ break -+ fi -+ if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_subdir/$ac_fs_tmp.o -+ then -+ eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_option\\\"" - break - fi - diff --git a/am-utils-6.2-fix-mountd-version-used-when-mount-is-nfs-v4.patch b/am-utils-6.2-fix-mountd-version-used-when-mount-is-nfs-v4.patch deleted file mode 100644 index 7aafc46..0000000 --- a/am-utils-6.2-fix-mountd-version-used-when-mount-is-nfs-v4.patch +++ /dev/null @@ -1,29 +0,0 @@ -am-utils-6.2 - fix mountd version used when mount is nfs v4 - -From: Ian Kent - -If we are trying to mount the exports of a type host map entry and the -mounts are NFS v4 make sure mountd version 3 is used in the same way it -is used for NFS v3 mounts. - -Signed-off-by: Ian Kent ---- - amd/amfs_host.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/amd/amfs_host.c b/amd/amfs_host.c -index a3468ecd..a363c5cc 100644 ---- a/amd/amfs_host.c -+++ b/amd/amfs_host.c -@@ -346,8 +346,9 @@ amfs_host_mount(am_node *am, mntfs *mf) - host = mf->mf_server->fs_host; - sin = *mf->mf_server->fs_ip; - plog(XLOG_INFO, "amfs_host_mount: NFS version %d", (int) mf->mf_server->fs_version); --#ifdef HAVE_FS_NFS3 -- if (mf->mf_server->fs_version == NFS_VERSION3) -+#if defined(HAVE_FS_NFS3) || defined(HAVE_FS_NFS4) -+ if (mf->mf_server->fs_version == NFS_VERSION3 || -+ mf->mf_server->fs_version == NFS_VERSION4) - mnt_version = AM_MOUNTVERS3; - else - #endif /* HAVE_FS_NFS3 */ diff --git a/am-utils-6.2-update-configure_ac.patch b/am-utils-6.2-update-configure_ac.patch deleted file mode 100644 index 8fd5935..0000000 --- a/am-utils-6.2-update-configure_ac.patch +++ /dev/null @@ -1,84 +0,0 @@ -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 8b20351..df20d5c 100644 --- a/am-utils-6.2-use-linux-libtirpc-if-present.patch +++ b/am-utils-6.2-use-linux-libtirpc-if-present.patch @@ -10,12 +10,12 @@ Signed-off-by: Ian Kent Makefile.am | 3 ++- configure.ac | 4 ++++ include/am_compat.h | 8 ++++++-- - m4/macros/check_linux_libtirpc.m4 | 15 +++++++++++++++ - 4 files changed, 27 insertions(+), 3 deletions(-) + m4/macros/check_linux_libtirpc.m4 | 13 +++++++++++++ + 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 m4/macros/check_linux_libtirpc.m4 diff --git a/Makefile.am b/Makefile.am -index bae4615e..e094e950 100644 +index bae4615..e094e95 100644 --- a/Makefile.am +++ b/Makefile.am @@ -146,7 +146,8 @@ EXTRA_DIST_M4 = \ @@ -29,7 +29,7 @@ index bae4615e..e094e950 100644 EXTRA_DIST_CONF = \ conf/autofs/autofs_default.h \ diff --git a/configure.ac b/configure.ac -index ce619257..98b444d3 100644 +index ce61925..98b444d 100644 --- a/configure.ac +++ b/configure.ac @@ -222,6 +222,9 @@ dnl lots of code. So I am forced to use a special purpose macro that sets @@ -51,7 +51,7 @@ index ce619257..98b444d3 100644 cdfs/cdfs_mount.h \ fs/udf/udf_mount.h \ diff --git a/include/am_compat.h b/include/am_compat.h -index 3463f3fa..d6826fc7 100644 +index 3463f3f..d6826fc 100644 --- a/include/am_compat.h +++ b/include/am_compat.h @@ -454,11 +454,15 @@ struct hsfs_args { @@ -74,22 +74,20 @@ 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..7b40e45c +index 0000000..918423c --- /dev/null +++ b/m4/macros/check_linux_libtirpc.m4 -@@ -0,0 +1,15 @@ +@@ -0,0 +1,13 @@ +dnl ###################################################################### +dnl Check for Linux libtirpc library +AC_DEFUN([AMU_CHECK_LIBTIRPC],[ ++TIRPC_CPPFLAGS="" ++TIRPC_LIBS="" ++ +AC_CHECK_HEADER(tirpc/netconfig.h,[ -+ amu_check_libtirpc_save_CPPFLAGS=$CPPFLAGS -+ CPPFLAGS="$CPPFLAGS -I/usr/include/tirpc" -+ AC_CHECK_LIB(tirpc,clnt_tli_create,,amu_check_libtirpc=notfound)]) -+ if test "$amu_check_libtirpc" = "notfound" -+ then -+ CPPFLAGS="$amu_check_libtirpc_save_CPPFLAGS" -+ else -+ AC_DEFINE(HAVE_LIBTIRPC, 1, [Define to 1 if you have libtirpc headers installed]) -+ fi ++ TIRPC_CPPFLAGS="-I/usr/include/tirpc" ++ AC_DEFINE(HAVE_LIBTIRPC, 1, [Define to 1 if you have libtirpc headers installed]) ++ AC_CHECK_LIB(tirpc, clnt_tli_create, [TIRPC_LIBS="-ltirpc"], [TIRPC_CPPFLAGS=""])]) ++ AMU_CFLAGS="$AMU_CFLAGS $TIRPC_CPPFLAGS" ++ LIBS="$LIBS $TIRPC_LIBS" +]) -+dnl ====================================================================== diff --git a/am-utils-configure-c99.patch b/am-utils-configure-c99.patch deleted file mode 100644 index f4f1a83..0000000 --- a/am-utils-configure-c99.patch +++ /dev/null @@ -1,214 +0,0 @@ -Fix various autoconf helper macros not to require support for implicit -ints and implicit function declarations in the compiler. These C -language features have been removed from C99, and future compilers -will not accept them by default. - -diff --git a/m4/macros/check_fs_mntent.m4 b/m4/macros/check_fs_mntent.m4 -index de3d9a918283bb1d..7800d3eff0f59e71 100644 ---- a/m4/macros/check_fs_mntent.m4 -+++ b/m4/macros/check_fs_mntent.m4 -@@ -165,15 +165,15 @@ do - [[ - #include - #include --main() -+int main(void) - { - int i; - struct vfsconf vf; - i = getvfsbyname("$ac_fs_tmp", &vf); - if (i < 0) -- exit(1); -+ return 1; - else -- exit(0); -+ return 0; - } - ]])], [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 6ac6440c47e8edd8..daa61cbaef3b09e9 100644 ---- a/m4/macros/check_gnu_getopt.m4 -+++ b/m4/macros/check_gnu_getopt.m4 -@@ -17,7 +17,7 @@ int main() - int isGNU = 0; - - rf = fopen("conftestresult", "w"); -- if (rf == NULL) exit(1); -+ if (rf == NULL) return 1; - - while ( (c = getopt(argc, argv, "x")) != -1 ) { - switch ( c ) { -@@ -25,11 +25,11 @@ int main() - isGNU=1; - break; - default: -- exit(1); -+ return 1; - } - } - fprintf(rf, isGNU ? "yes" : "no"); -- exit(0); -+ return 0; - } - ]])],[ - ac_cv_sys_gnu_getopt="`cat conftestresult`" -diff --git a/m4/macros/check_mnttab_type.m4 b/m4/macros/check_mnttab_type.m4 -index a840991e95e3ba81..398314910d80337a 100644 ---- a/m4/macros/check_mnttab_type.m4 -+++ b/m4/macros/check_mnttab_type.m4 -@@ -121,15 +121,15 @@ do - [[ - #include - #include --main() -+int main(void) - { - int i; - struct vfsconf vf; - i = getvfsbyname("$ac_fs_tmp", &vf); - if (i < 0) -- exit(1); -+ return 1; - else -- exit(0); -+ return 0; - } - ]])], [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 693542219f7aee90..1b0de6ccb0b7cafd 100644 ---- a/m4/macros/check_mount_type.m4 -+++ b/m4/macros/check_mount_type.m4 -@@ -179,15 +179,15 @@ do - [[ - #include - #include --main() -+int main(void) - { - int i; - struct vfsconf vf; - i = getvfsbyname("$ac_fs_tmp", &vf); - if (i < 0) -- exit(1); -+ return 1; - else -- exit(0); -+ return 0; - } - ]])], [eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" - break -diff --git a/m4/macros/check_varargs_macros.m4 b/m4/macros/check_varargs_macros.m4 -index 93c26ffced82fdcc..1dbd4fb59e3d1c88 100644 ---- a/m4/macros/check_varargs_macros.m4 -+++ b/m4/macros/check_varargs_macros.m4 -@@ -9,6 +9,7 @@ ac_cv_varargs_macros, - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -+void bar(const char *, ...); - #define foo(str,size,fmt,...) bar(__FILE__,__LINE__,(str),(size),(fmt),__VA_ARGS__) - ]], - [[ -@@ -20,6 +21,7 @@ foo(a, sizeof(a), "%d,%d", 1, 2); - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -+void bar(const char *, ...); - #define foo(str,size,args...) bar(__FILE__,__LINE__,(str),(size),(fmt),args) - ]], - [[ -diff --git a/m4/macros/expand_cpp_hex.m4 b/m4/macros/expand_cpp_hex.m4 -index 13c7c832b0d764fb..7b915d0431b8f688 100644 ---- a/m4/macros/expand_cpp_hex.m4 -+++ b/m4/macros/expand_cpp_hex.m4 -@@ -14,17 +14,16 @@ AC_RUN_IFELSE( - [AC_LANG_SOURCE( - [[ - [$1] --main(argc) --int argc; -+int main(int argc) - { - #ifdef $2 - if (argc > 1) - printf("0x%x", $2); --exit(0); -+return 0; - #else - # error no such option $2 - #endif --exit(1); -+return 1; - }]])], 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 e58649e83013265e..798e7fd7590f4ca7 100644 ---- a/m4/macros/expand_cpp_int.m4 -+++ b/m4/macros/expand_cpp_int.m4 -@@ -16,17 +16,16 @@ AC_RUN_IFELSE( - [AC_LANG_SOURCE( - [[ - [$1] --main(argc) --int argc; -+int main(int argc) - { - #ifdef $2 - if (argc > 1) - printf("%d", $2); --exit(0); -+return 0; - #else - # error no such option $2 - #endif --exit(1); -+return 1; - }]])], 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 e014b7e4fc9d8030..256ddee09303fde4 100644 ---- a/m4/macros/expand_cpp_string.m4 -+++ b/m4/macros/expand_cpp_string.m4 -@@ -14,17 +14,16 @@ AC_RUN_IFELSE( - [AC_LANG_SOURCE( - [[ - [$1] --main(argc) --int argc; -+int main(int argc) - { - #ifdef $2 - if (argc > 1) - printf("%s", $2); --exit(0); -+return 0; - #else - # error no such option $2 - #endif --exit(1); -+return 1; - }]])], 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 f9390020aa934c3e..c8c350f533f80a82 100644 ---- a/m4/macros/expand_run_string.m4 -+++ b/m4/macros/expand_run_string.m4 -@@ -8,11 +8,10 @@ AC_RUN_IFELSE( - [AC_LANG_SOURCE( - [[ - $1 --main(argc) --int argc; -+int main(int argc) - { - $2 --exit(0); -+return 0; - }]])], - [ - value=`./conftest dummy 2>>config.log` diff --git a/am-utils.conf b/am-utils.conf index ef3d7cb..388e673 100644 --- a/am-utils.conf +++ b/am-utils.conf @@ -28,10 +28,6 @@ fully_qualified_hosts = no cache_duration = 300 # Fedora doesn't support NFSv2, use the amd NFSv3 server. auto_nfs_version = 3 -# The latest Fedora kernel builds disable UDP so unless a custom build -# is done the internal amd automount server must use the autofs protocol -# not the NFS protocol. -mount_type = autofs # DEFINE AN AMD MOUNT POINT [ /net ] diff --git a/am-utils.init b/am-utils.init index cde8a1f..f508817 100755 --- a/am-utils.init +++ b/am-utils.init @@ -7,127 +7,89 @@ # on demand. # processname: amd # config: /etc/amd.conf -### BEGIN INIT INFO -# Provides: amd -# Required-Start: $local_fs -# Required-Stop: $local_fs -# Short-Description: start and stop early amd -# Description: Start and stop amd automounter -### END INIT INFO +# # We require the /etc/amd.conf file, but supply it in the package, so it # should always be there. [ -f /etc/amd.conf ] || exit $? +[ -f /etc/sysconfig/amd ] || exit $? -# source function library. +# Source function library. . /etc/init.d/functions -[ -e /etc/sysconfig/amd ] && . /etc/sysconfig/amd +# Recover AMDOPTS from /etc/sysconfig/amd. +if [ -f /etc/sysconfig/amd ] ; then + . /etc/sysconfig/amd +fi -DAEMON=amd +RETVAL=0 prog=amd -exec=/usr/sbin/amd -config=/etc/amd.conf -optconfig=/etc/sysconfig/amd -lockfile=/var/lock/subsys/$DAEMON +amd=/usr/sbin/amd -[ -e $optconfig ] && . $optconfig - -check() { - # Check that we're a privileged user - [ $(id -u) -eq 0 ] || exit 4 -} - -start () { - check - [ -x $exec ] || exit 5 - [ -f $config ] || exit 6 - [ -f $optconfig ] || exit 6 +start() { echo -n $"Starting $prog: " - daemon $exec -F $config $AMDOPTS $OPTIONS $MOUNTPTS - retval=$? + daemon $amd -F /etc/amd.conf $AMDOPTS $OPTIONS $MOUNTPTS + RETVAL=$? echo - [ $retval -eq 0 ] && touch $lockfile - return $retval + [ $RETVAL = 0 ] && touch /var/lock/subsys/amd + return $RETVAL } -stop () { - check - echo -n $"Stopping $prog: " - killproc $exec +stop() { + echo -n $"Stopping $prog: " + killproc $amd -TERM + # this part is from wait4amd2die delay=3 count=10 i=1 - retval=1 maxcount=`expr $count + 1` while [ $i != $maxcount ]; do # run amq /usr/sbin/amq > /dev/null 2>&1 - if [ $? != 0 ]; then + if [ $? != 0 ] + then # amq failed to run (because amd is dead) - retval=0 - break + rm -f /var/lock/subsys/amd /var/run/amd.pid + echo + return 0 fi sleep $delay i=`expr $i + 1` done - - echo - [ $retval -eq 0 ] && rm -f $lockfile - return $retval -} - - -restart() { - stop - start -} - -reload() { - restart -} - -force_reload() { - restart -} - -rh_status() { - status $DAEMON -} - -rh_status_q() { - rh_status >/dev/null 2>&1 + failure $"amd shutdown" + echo + echo "amd is still up" + return 1 } +# See how we were called. case "$1" in start) - rh_status_q && exit 0 - $1 + start ;; - stop) - rh_status_q || exit 0 - $1 - ;; - restart) - $1 - ;; - reload) - rh_status_q || exit 7 - $1 - ;; - force-reload) - force_reload + stop) + stop ;; status) - rh_status + status $amd + RETVAL=$? ;; - condrestart|try-restart) - rh_status_q || exit 0 - restart + restart) + stop + start + ;; + condrestart) + if [ -f /var/lock/subsys/amd ]; then + stop + start + fi + ;; + reload) + action $"Reloading $prog:" killall -HUP $amd ;; *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" - exit 2 + echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}" + exit 1 esac -exit $? +exit $RETVAL diff --git a/am-utils.spec b/am-utils.spec index 7f08678..c2baa69 100644 --- a/am-utils.spec +++ b/am-utils.spec @@ -2,47 +2,41 @@ Summary: Automount utilities including an updated version of Amd Name: am-utils Version: 6.2.0 %define upstream_version 6.2 -Release: 62%{?dist} -# Automatically converted from old format: BSD - review is highly recommended. -License: LicenseRef-Callaway-BSD +Release: 27%{?dist} +License: BSD Epoch: 5 +Group: System Environment/Daemons URL: http://am-utils.org # Git repository git://git.fsl.cs.sunysb.edu/am-utils-6.2.git Source: ftp://ftp.am-utils.org/pub/am-utils/am-utils-%{upstream_version}.tar.gz -Source1: amd.service +Source1: am-utils.init Source2: am-utils.conf Source3: am-utils.sysconf Source4: am-utils.net.map BuildRequires: gdbm-devel +BuildRequires: hesiod-devel BuildRequires: openldap-devel BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: bison BuildRequires: flex -BuildRequires: systemd-units +BuildRequires: tcp_wrappers-devel BuildRequires: texinfo BuildRequires: gcc BuildRequires: m4 BuildRequires: libtirpc-devel -BuildRequires: kernel-headers -#BuildRequires: libnsl2-devel -BuildRequires: rpcsvc-proto-devel -BuildRequires: make -Requires: rpcbind +Requires: portmap Requires: grep Requires: gawk Requires: findutils Requires: libtirpc -#Requires: libnsl2 -Requires(pre): /usr/bin/grep -Requires(post): systemd-sysv -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units +Requires(pre): /bin/grep +Requires(post): /sbin/install-info +Requires(preun): /sbin/install-info # Fix problems with possible future libtool rebases (#1181698) Patch1: am-utils-6.2-dont-include-auto-generated-macros-in-aclinlude_m4.patch @@ -63,48 +57,38 @@ Patch14: am-utils-6.2-fix-NFSv3-lookup-dir-attribute-return-value.patch Patch15: am-utils-6.2-fix-NFSv3-readdir-post_op_dir-attributes-return.patch Patch16: am-utils-6.2-fix-NFSv3-unlink3_or_rmdir3-post_op-attributes-return.patch -Patch17: am-utils-6.2-fix-Linux-NFS-recognition-of-umounts.patch -Patch18: am-utils-6.2-add-get_nfs_xprt-and-put_nfs_xprt-functions.patch -Patch19: am-utils-6.2-use-new-get_nfs_xprt-and-put_nfs_xprt-functions.patch -Patch20: am-utils-6.2-add-NFSv3-nfs_quick_reply-functionality.patch -Patch21: am-utils-6.2-add-NFSv3-rpc-request-validation.patch -Patch22: am-utils-6.2-fix-wcc-attr-usage-in-unlink3_or_rmdir3.patch +# The git changelog entry doesn't say why autoconf 2.69 is required. +# Changing the check to require RHEL-6 autoconf version 2.63 does +# build cleanly and appears to work ok. Perhaps the libtool change +# (ie. patch1 above) resolves whatever problem that commit was meant +# to deal with. +Patch17: am-utils-6.2-allow-old-autoconf-version.patch -Patch23: am-utils-6.2-Add-the-sys-alias-for-unix-as-well-as-none-and-null.patch -Patch24: am-utils-6.2-Default-to-string-mount-options-for-NFSv4.patch -Patch25: am-utils-6.2-Improve-debugging-for-unmounting.patch -Patch26: am-utils-6.2-add-more-debugging-in-the-unmount-path.patch -Patch27: am-utils-6.2-There-is-really-no-ti-rpc-nfsv4-so-dont-send-one.patch -Patch28: am-utils-6.2-Fix-SEGV-on-amq-entries-that-print-times.patch -Patch29: am-utils-6.2-Make-hasmntval-return-an-0-on-error-1-on-success.patch -Patch30: am-utils-6.2-Update-the-ctime-of-the-directory-too-since-it-changed.patch +Patch18: am-utils-6.2-fix-Linux-NFS-recognition-of-umounts.patch +Patch19: am-utils-6.2-add-get_nfs_xprt-and-put_nfs_xprt-functions.patch +Patch20: am-utils-6.2-use-new-get_nfs_xprt-and-put_nfs_xprt-functions.patch +Patch21: am-utils-6.2-add-NFSv3-nfs_quick_reply-functionality.patch +Patch22: am-utils-6.2-add-NFSv3-rpc-request-validation.patch +Patch23: am-utils-6.2-fix-wcc-attr-usage-in-unlink3_or_rmdir3.patch -Patch31: am-utils-6.2-use-linux-libtirpc-if-present.patch -Patch32: am-utils-6.2-fix-compiler-assignment-warning-due-to-libtirpc.patch -Patch33: am-utils-6.2-fix-logical-not-comparison-in-get_ldap_timestamp.patch -Patch34: am-utils-6.2-fix-umount-to-mount-race.patch +Patch24: am-utils-6.2-Add-the-sys-alias-for-unix-as-well-as-none-and-null.patch +Patch25: am-utils-6.2-Default-to-string-mount-options-for-NFSv4.patch +Patch26: am-utils-6.2-Improve-debugging-for-unmounting.patch +Patch27: am-utils-6.2-add-more-debugging-in-the-unmount-path.patch +Patch28: am-utils-6.2-There-is-really-no-ti-rpc-nfsv4-so-dont-send-one.patch +Patch29: am-utils-6.2-Fix-SEGV-on-amq-entries-that-print-times.patch +Patch30: am-utils-6.2-Make-hasmntval-return-an-0-on-error-1-on-success.patch +Patch31: am-utils-6.2-Update-the-ctime-of-the-directory-too-since-it-changed.patch -Patch35: am-utils-6.2-fix-nfsv3-fh-length-in-NFS_FH_DREF.patch +Patch32: am-utils-6.2-use-linux-libtirpc-if-present.patch +Patch33: am-utils-6.2-fix-compiler-assignment-warning-due-to-libtirpc.patch +Patch34: am-utils-6.2-fix-logical-not-comparison-in-get_ldap_timestamp.patch +Patch35: am-utils-6.2-fix-umount-to-mount-race.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 +# So I can work on this with other than RHEL-6. +Patch36: am-utils-6.2-fix-autoconf-check-in-bootstrap.patch -Patch44: am-utils-6.2-fix-fsmount-naming-conflict.patch -Patch45: am-utils-6.2-fix-SEGV-on-quick-reply-error.patch -Patch46: am-utils-6.2-fix-mountd-version-used-when-mount-is-nfs-v4.patch - -Patch47: am-utils-6.2-fix-linux-nfs-kernel-module-search.patch -Patch48: am-utils-6.2-dont-include-linux_mount_h.patch -Patch49: am-utils-6.2-fix-fedora-mock-build-fail.patch -Patch50: am-utils-configure-c99.patch - -Patch51: am-utils-6.2-allow-autoconf-2.72.patch +Patch37: am-utils-6.2-fix-nfsv3-fh-length-in-NFS_FH_DREF.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 @@ -115,10 +99,6 @@ Patch51: am-utils-6.2-allow-autoconf-2.72.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 @@ -133,60 +113,43 @@ mounting and unmounting filesystems. %prep %setup -q -n %{name}-%{upstream_version} -%patch -P 1 -p1 -%patch -P 2 -p1 -%patch -P 3 -p1 -%patch -P 4 -p1 -%patch -P 5 -p1 -%patch -P 6 -p1 -%patch -P 7 -p1 -%patch -P 8 -p1 -%patch -P 9 -p1 -%patch -P 10 -p1 -%patch -P 11 -p1 -%patch -P 12 -p1 -%patch -P 13 -p1 -%patch -P 14 -p1 -%patch -P 15 -p1 -%patch -P 16 -p1 -%patch -P 17 -p1 -%patch -P 18 -p1 -%patch -P 19 -p1 -%patch -P 20 -p1 -%patch -P 21 -p1 -%patch -P 22 -p1 -%patch -P 23 -p1 -%patch -P 24 -p1 -%patch -P 25 -p1 -%patch -P 26 -p1 -%patch -P 27 -p1 -%patch -P 28 -p1 -%patch -P 29 -p1 -%patch -P 30 -p1 -%patch -P 31 -p1 -%patch -P 32 -p1 -%patch -P 33 -p1 -%patch -P 34 -p1 -%patch -P 35 -p1 -%patch -P 36 -p1 -%patch -P 37 -p1 -%patch -P 38 -p1 -%patch -P 39 -p1 -%patch -P 40 -p1 -%patch -P 41 -p1 -%patch -P 42 -p1 -%patch -P 43 -p1 - -%patch -P 44 -p1 -%patch -P 45 -p1 -%patch -P 46 -p1 - -%patch -P 47 -p1 -%patch -P 48 -p1 -%patch -P 49 -p1 -%patch -P 50 -p1 - -%patch -P 51 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 +%patch27 -p1 +%patch28 -p1 +%patch29 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 +%patch35 -p1 +%patch36 -p1 +%patch37 -p1 ./bootstrap @@ -198,8 +161,7 @@ chmod +x find-requires %configure \ --enable-shared \ --enable-am-cflags="-DHAVE_LINUX_NFS_MOUNT_H" \ - --enable-libs="-lresolv" \ - --without-hesiod \ + --enable-libs="-lnsl -lresolv" \ --enable-debug sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool @@ -210,10 +172,9 @@ make %{?_smp_flags} %install %makeinstall -mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig -mkdir -p ${RPM_BUILD_ROOT}%{_unitdir} +mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/{sysconfig,rc.d/init.d} -install -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}/%{_unitdir}/ +install -m 755 $RPM_SOURCE_DIR/am-utils.init $RPM_BUILD_ROOT/etc/rc.d/init.d/amd install -m 644 %{SOURCE2} ${RPM_BUILD_ROOT}/%{_sysconfdir}/amd.conf install -m 644 %{SOURCE3} ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/amd install -m 640 %{SOURCE4} ${RPM_BUILD_ROOT}/%{_sysconfdir}/amd.net @@ -253,26 +214,27 @@ fi %post /sbin/ldconfig -%systemd_post amd.service +/sbin/chkconfig --add amd +if [ -f %{_infodir}/am-utils.info.gz ]; then + /sbin/install-info %{_infodir}/am-utils.info.gz %{_infodir}/dir || : +fi %preun -%systemd_preun amd.service +if [ $1 -eq 0 ]; then + # Package removal, not upgrade + if [ -f %{_infodir}/am-utils.info.gz ]; then + /sbin/install-info --delete %{_infodir}/am-utils.info.gz %{_infodir}/dir || : + fi + /sbin/service amd stop >/dev/null 2>&1 + /sbin/chkconfig --del amd +fi %postun -%systemd_postun_with_restart amd.service - +if [ $1 -ge 1 ]; then + /sbin/service amd condrestart >/dev/null 2>&1 +fi /sbin/ldconfig -%triggerun -- am-utils < 6.1.5-19 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply amd -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save amd >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del amd >/dev/null 2>&1 || : -/bin/systemctl try-restart amd.service >/dev/null 2>&1 || : - %files %doc doc/*.ps AUTHORS BUGS ChangeLog NEWS README* scripts/*-sample %dir /.automount @@ -283,154 +245,25 @@ fi %config(noreplace) %{_sysconfdir}/amd.net %config(noreplace) %{_sysconfdir}/amd.conf %config(noreplace) %{_sysconfdir}/sysconfig/amd -%{_unitdir}/amd.service +%config /etc/rc.d/init.d/amd %{_infodir}/*info*.gz %{_libdir}/libamu.so* %changelog -* Fri Jan 16 2026 Fedora Release Engineering - 5:6.2.0-62 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Wed Jul 23 2025 Fedora Release Engineering - 5:6.2.0-61 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Thu Jan 16 2025 Fedora Release Engineering - 5:6.2.0-60 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Wed Aug 28 2024 Miroslav Suchý - 5:6.2.0-59 -- convert license to SPDX - -* Tue Jul 30 2024 Ian Kent - 5:6.2.0-58 -- allow autoconf 2.72. -- remove BuildRequires (and Requires) libnsl2. -- also remove references to libnsl in configure invocation. - -* Wed Jul 17 2024 Fedora Release Engineering - 5:6.2.0-57 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Mon Jan 22 2024 Fedora Release Engineering - 5:6.2.0-56 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 5:6.2.0-55 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Wed Jul 19 2023 Fedora Release Engineering - 5:6.2.0-54 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Thu Feb 16 2023 Florian Weimer - 5:6.2.0-53 -- Port configure script to C99 (#2170414) - -* Wed Jan 18 2023 Fedora Release Engineering - 5:6.2.0-52 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Mon Aug 15 2022 Ian Kent - 5:6.2.0-50 -- remove BuildRequires: kernel-modules for s390x. -- add hack to ensure NFSv4 is seen as supported on s390x. - -* Mon Aug 15 2022 Ian Kent - 5:6.2.0-50 -- add BuildRequires: kernel-modules for s390x. - -* Mon Aug 15 2022 Ian Kent - 5:6.2.0-49 -- fix linux nfs kernel module search. -- dont include linux/mount.h. - -* Thu Aug 04 2022 Ian Kent - 5:6.2.0-48 -- fix fsmount naming conflict. -- fix SEGV on quick reply error. -- fix mountd version used when mount is nfs v4. -- set mount_type = autofs in default installed configuration. - -* Wed Jul 20 2022 Fedora Release Engineering - 5:6.2.0-47 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed Jan 19 2022 Fedora Release Engineering - 5:6.2.0-46 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* 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 - -* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 5:6.2.0-43 -- Rebuilt for updated systemd-rpm-macros - See https://pagure.io/fesco/issue/2583. - -* Tue Jan 26 2021 Fedora Release Engineering - 5:6.2.0-42 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Fri Jul 31 2020 Fedora Release Engineering - 5:6.2.0-41 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Jul 27 2020 Fedora Release Engineering - 5:6.2.0-40 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Jan 28 2020 Fedora Release Engineering - 5:6.2.0-39 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Wed Jul 24 2019 Fedora Release Engineering - 5:6.2.0-38 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Wed Apr 24 2019 Björn Esser - 5:6.2.0-37 -- Remove hardcoded gzip suffix from GNU info pages - -* Thu Jan 31 2019 Fedora Release Engineering - 5:6.2.0-36 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Oct 29 2018 Ian Kent - 5:6.2.0-34 -- disable hesiod support. - -* Thu Jul 12 2018 Fedora Release Engineering - 5:6.2.0-34 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Feb 06 2018 Ian Kent - 5:6.2.0-33 -- replace workaround for missing RPC code with package rpcsvc-proto-devel. - -* Tue Feb 06 2018 Ian Kent - 5:6.2.0-32 -- add libnsl2 Requires and libnsl2-devel BuildRequires. - -* Tue Feb 06 2018 Ian Kent - 5:6.2.0-31 -- try to workaround the removal of RPC code from glibc. - -* Sun Feb 04 2018 Ian Kent - 5:6.2.0-30 -- Add "BuildRequires: kernel-headers" for linux/version.h requirement. - -* Sun Feb 04 2018 Ian Kent - 5:6.2.0-29 -- Remove "BuildRequires: tcp_wrappers-devel" as tcp_wrappers is depricated. - -* Sun Feb 04 2018 Ian Kent - 5:6.2.0-28 -- Update "Requires(pre)" to use /usr/bin/grep instead of /bin/grep. - -* Thu Aug 24 2017 Ian Kent - 5:6.2.0-27 +* Thu Aug 29 2017 Ian Kent - 5:6.2.0-27 - fix nfsv3 fh length in NFS_FH_DREF(). -* Wed Aug 02 2017 Fedora Release Engineering - 5:6.2.0-26 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 5:6.2.0-25 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 5:6.2.0-24 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - * Thu Dec 1 2016 Ian Kent - 5:6.2.0-23 +- change bootstrap script to not object to different autoconf version. - fix fix-umount-to-mount-race patch (bug 1399213). * Mon Oct 3 2016 Ian Kent - 5:6.2.0-22 - fix ambiguous else due to dlog() macro usage. -* Wed Sep 14 2016 Ian Kent - 5:6.2.0-21 +* Mon Oct 3 2016 Ian Kent - 5:6.2.0-21 - fix typo in libtirpc configure macro. -* Wed Sep 14 2016 Ian Kent - 5:6.2.0-20 +* Mon Oct 3 2016 Ian Kent - 5:6.2.0-20 - print_nfs_common_args() is only needed with DEBUG. - uid_t might be a different size than unsigned int. - remove set but not used variable s. @@ -453,7 +286,7 @@ fi - fix logical not comparison in get_ldap_timestamp(). - fix umount to mount race. -* Wed Mar 2 2016 Ian Kent - 5:6.2.0-12 +* Wed Mar 2 2016 Ian Kent - 5:6.2.0-8 - add get_nfs_xprt() and put_nfs_xprt() functions. - use new get_nfs_xprt() and put_nfs_xprt() functions. - add NFSv3 nfs_quick_reply() functionality. @@ -461,26 +294,13 @@ fi - fix wcc attr usage in unlink3_or_rmdir3(). - use Linux libtirpc if present. -* Mon Feb 29 2016 Ian Kent - 5:6.2.0-11 +* Mon Feb 29 2016 Ian Kent - 5:6.2.0-7 - fix Linux NFS recognition of umounts. -- add systemd dependency on nfs-lock.service. -* Wed Feb 03 2016 Fedora Release Engineering - 5:6.2.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild +* Tue Feb 2 2016 Ian Kent - 5:6.2.0-6 +- fix permissions on amd.conf. -* Tue Feb 2 2016 Ian Kent - 5:6.2.0-9 -- Update Requires: portmap to Requires: rpcbind. - -* Tue Feb 2 2016 Ian Kent - 5:6.2.0-8 -- fix systemd unit dependencies. - -* Tue Feb 2 2016 Ian Kent - 5:6.2.0-7 -- fix permissions on amd.service and amd.conf. - -* Thu Dec 17 2015 Ian Kent - 5:6.2.0-6 -- fix revision 5 changelog entry. - -* Thu Dec 17 2015 Ian Kent - 5:6.2.0-5 +* Sun Jan 24 2016 Ian Kent - 5:6.2.0-5 - update to upstream source release 6.2. - use starting revision 5 to ensure package will update from previous package. - add configure option enable-debug so we can get logs of any problems with @@ -493,6 +313,7 @@ fi - fix NFSv3 readdir post_op_dir attributes return. - fix NFSv3 unlink3_or_rmdir3() post_op attributes return. - fix mtime update on NFSv3 lookup. +- allow old autoconf version. * Tue Jun 16 2015 Fedora Release Engineering - 5:6.2.0-4.20140906gitbb13dea6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/amd.service b/amd.service deleted file mode 100644 index e20da2e..0000000 --- a/amd.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=automount daemon that mounts devices and NFS hosts on demand -After=syslog.target network.target network-online.target rpcbind.service -Wants=network-online.target rpcbind.service nfs-lock.service - -[Service] -EnvironmentFile=-/etc/sysconfig/amd -Type=forking -ExecStart=/usr/sbin/amd -F /etc/amd.conf $AMDOPTS $OPTIONS $MOUNTPTS - -[Install] -WantedBy=multi-user.target