Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH 1/3] Move readhistfile() after flockhistfile().



> 2019/03/12 6:04, Jason L Tibbitts III <tibbs@xxxxxxxxxxx> wrote:
> 
>>>>>> "BS" == Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:
> 
> BS> I don't know Fedora very well; feedback from the list would be
> BS> beneficial.
> 
> Note that Fedora in general doesn't have this problem.  I can certainly
> build the zsh source RPM without issues on my Fedora systems,

The problem occurs only if HAVE_NIS is defined, and it is defined only
if you are using NIS. In configure.ac, line 2083:

AH_TEMPLATE([HAVE_NIS],
[Define to 1 if you have NIS.])
AC_CACHE_CHECK(for NIS, zsh_cv_sys_nis,
[test -f /usr/bin/ypcat && /usr/bin/ypcat passwd.byname > /dev/null 2>&1 && \
zsh_cv_sys_nis=yes || zsh_cv_sys_nis=no])
if test x$zsh_cv_sys_nis = xyes; then
  AC_DEFINE(HAVE_NIS)
fi

so HAVE_NIS is defined only if "ypcat passwd.byname" succeeds, i.e.,
only if you are currently using NIS on your Fedora box.

RPC is removed from glibc-2.26; on Fedora 28 or later (and probably on
other recent/future distributions which use glib-2.26 or later) RPC
is in libtirpc whose headers are in /usr/include/tirpc/.

Below is a simple patch, but it is "minimal" and feel free to extend it.

# Is it better to allow anyone who has required libraries to build
# NIS-aware zsh even if he/she is not using NIS? Or add an option
# like --enable-nis?


diff --git a/configure.ac b/configure.ac
index 5513e25f1..8a2664ed2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2087,6 +2087,10 @@ AC_CACHE_CHECK(for NIS, zsh_cv_sys_nis,
 zsh_cv_sys_nis=yes || zsh_cv_sys_nis=no])
 if test x$zsh_cv_sys_nis = xyes; then
   AC_DEFINE(HAVE_NIS)
+dnl RPC is removed from glibc-2.26 and replaced by libtirpc
+  AC_CHECK_HEADER(rpc/rpc.h, [],
+  [test -f /usr/include/tirpc/rpc/rpc.h && \
+   CPPFLAGS="$CPPFLAGS -I/usr/include/tirpc"])
 dnl Some systems (Solaris 2.x, Linux Redhat 5.x) require
 dnl libnsl (Network Services Library) to find yp_all
   AC_SEARCH_LIBS(yp_all, nsl)




Messages sorted by: Reverse Date, Date, Thread, Author