Blame SOURCES/autofs-5.1.7-remove-mount_x-and-rpcgen-dependencies.patch

beb904
autofs-5.1.7 - remove mount.x and rpcgen dependencies
beb904
beb904
From: Ian Kent <raven@themaw.net>
beb904
beb904
Adding a local implementation to get the exports list from a server
beb904
means the the rpcgen generataed code is no longer needed so remove
beb904
mount.x and the build dependencies.
beb904
beb904
Signed-off-by: Ian Kent <raven@themaw.net>
beb904
---
beb904
 CHANGELOG           |    1 
beb904
 Makefile.conf.in    |    1 
beb904
 autofs.spec         |    2 
beb904
 configure           |   58 ---------
beb904
 configure.in        |    1 
beb904
 include/automount.h |    1 
beb904
 include/config.h.in |    3 
beb904
 lib/Makefile        |   26 ----
beb904
 lib/mount.x         |  345 ---------------------------------------------------
beb904
 9 files changed, 5 insertions(+), 433 deletions(-)
beb904
 delete mode 100644 lib/mount.x
beb904
beb904
--- autofs-5.1.4.orig/CHANGELOG
beb904
+++ autofs-5.1.4/CHANGELOG
beb904
@@ -1,5 +1,6 @@
beb904
 
beb904
 - add xdr_exports().
beb904
+- remove mount.x and rpcgen dependencies.
beb904
 
beb904
 xx/xx/2018 autofs-5.1.5
beb904
 - fix flag file permission.
beb904
--- autofs-5.1.4.orig/Makefile.conf.in
beb904
+++ autofs-5.1.4/Makefile.conf.in
beb904
@@ -65,7 +65,6 @@ FEDFS = @ENABLE_FEDFS@
beb904
 
beb904
 LEX = @PATH_LEX@
beb904
 YACC = @PATH_YACC@
beb904
-RPCGEN = @PATH_RPCGEN@
beb904
 RANLIB = @PATH_RANLIB@
beb904
 
beb904
 # Use libtirpc if requested and available
beb904
--- autofs-5.1.4.orig/configure
beb904
+++ autofs-5.1.4/configure
beb904
@@ -651,8 +651,6 @@ XML_CONFIG
beb904
 ENABLE_FEDFS
beb904
 sssldir
beb904
 HAVE_SSS_AUTOFS
beb904
-PATH_RPCGEN
beb904
-RPCGEN
beb904
 PATH_RANLIB
beb904
 RANLIB
beb904
 PATH_YACC
beb904
@@ -4322,62 +4320,6 @@ else
beb904
   as_fn_error $? "required program RANLIB not found" "$LINENO" 5
beb904
 fi
beb904
 
beb904
-for ac_prog in rpcgen
beb904
-do
beb904
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
beb904
-set dummy $ac_prog; ac_word=$2
beb904
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
beb904
-$as_echo_n "checking for $ac_word... " >&6; }
beb904
-if ${ac_cv_path_RPCGEN+:} false; then :
beb904
-  $as_echo_n "(cached) " >&6
beb904
-else
beb904
-  case $RPCGEN in
beb904
-  [\\/]* | ?:[\\/]*)
beb904
-  ac_cv_path_RPCGEN="$RPCGEN" # Let the user override the test with a path.
beb904
-  ;;
beb904
-  *)
beb904
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
beb904
-for as_dir in $searchpath
beb904
-do
beb904
-  IFS=$as_save_IFS
beb904
-  test -z "$as_dir" && as_dir=.
beb904
-    for ac_exec_ext in '' $ac_executable_extensions; do
beb904
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
beb904
-    ac_cv_path_RPCGEN="$as_dir/$ac_word$ac_exec_ext"
beb904
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
beb904
-    break 2
beb904
-  fi
beb904
-done
beb904
-  done
beb904
-IFS=$as_save_IFS
beb904
-
beb904
-  ;;
beb904
-esac
beb904
-fi
beb904
-RPCGEN=$ac_cv_path_RPCGEN
beb904
-if test -n "$RPCGEN"; then
beb904
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RPCGEN" >&5
beb904
-$as_echo "$RPCGEN" >&6; }
beb904
-else
beb904
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
beb904
-$as_echo "no" >&6; }
beb904
-fi
beb904
-
beb904
-
beb904
-  test -n "$RPCGEN" && break
beb904
-done
beb904
-
beb904
-if test -n "$RPCGEN"; then
beb904
-
beb904
-cat >>confdefs.h <<_ACEOF
beb904
-#define PATH_RPCGEN "$RPCGEN"
beb904
-_ACEOF
beb904
-
beb904
-  PATH_RPCGEN="$RPCGEN"
beb904
-else
beb904
-  as_fn_error $? "required program RPCGEN not found" "$LINENO" 5
beb904
-fi
beb904
-
beb904
 
beb904
 if test -z "$sssldir"; then
beb904
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sssd autofs library" >&5
beb904
--- autofs-5.1.4.orig/configure.in
beb904
+++ autofs-5.1.4/configure.in
beb904
@@ -165,7 +165,6 @@ AF_PATH_INCLUDE(E4FSCK, fsck.ext4 e4fsck
beb904
 AF_CHECK_PROG(LEX, flex lex, , $searchpath)
beb904
 AF_CHECK_PROG(YACC, bison, , $searchpath)
beb904
 AF_CHECK_PROG(RANLIB, ranlib, , $searchpath)
beb904
-AF_CHECK_PROG(RPCGEN, rpcgen, , $searchpath)
beb904
 
beb904
 AF_CHECK_SSS_LIB(SSS_AUTOFS, libsss_autofs.so)
beb904
 AC_SUBST(HAVE_SSS_AUTOFS)
beb904
--- autofs-5.1.4.orig/include/automount.h
beb904
+++ autofs-5.1.4/include/automount.h
beb904
@@ -32,7 +32,6 @@
beb904
 #include "macros.h"
beb904
 #include "log.h"
beb904
 #include "rpc_subs.h"
beb904
-#include "mounts.h"
beb904
 #include "parse_subs.h"
beb904
 #include "mounts.h"
beb904
 #include "dev-ioctl-lib.h"
beb904
--- autofs-5.1.4.orig/include/config.h.in
beb904
+++ autofs-5.1.4/include/config.h.in
beb904
@@ -135,9 +135,6 @@
beb904
 /* define if you have RANLIB */
beb904
 #undef PATH_RANLIB
beb904
 
beb904
-/* define if you have RPCGEN */
beb904
-#undef PATH_RPCGEN
beb904
-
beb904
 /* define if you have UMOUNT */
beb904
 #undef PATH_UMOUNT
beb904
 
beb904
--- autofs-5.1.4.orig/lib/Makefile
beb904
+++ autofs-5.1.4/lib/Makefile
beb904
@@ -8,10 +8,9 @@ include ../Makefile.rules
beb904
 SRCS = cache.c cat_path.c rpc_subs.c mounts.c log.c nsswitch.c \
beb904
 	nss_tok.c nss_parse.tab.c args.c alarm.c macros.c defaults.c \
beb904
 	parse_subs.c dev-ioctl-lib.c
beb904
-RPCS = mount.h mount_clnt.c mount_xdr.c
beb904
-OBJS = cache.o mount_clnt.o mount_xdr.o cat_path.o rpc_subs.o \
beb904
-	mounts.o log.o nsswitch.o nss_tok.o nss_parse.tab.o args.o \
beb904
-	alarm.o macros.o defaults.o parse_subs.o dev-ioctl-lib.o
beb904
+OBJS = cache.o cat_path.o rpc_subs.o mounts.o log.o nsswitch.o \
beb904
+	nss_tok.o nss_parse.tab.o args.o alarm.o macros.o defaults.o \
beb904
+	parse_subs.o dev-ioctl-lib.o
beb904
 
beb904
 YACCSRC = nss_tok.c nss_parse.tab.c nss_parse.tab.h
beb904
 
beb904
@@ -34,23 +33,6 @@ autofs.a: $(OBJS)
beb904
 	$(AR) $(ARFLAGS) $(LIB) $(OBJS)
beb904
 	-$(RANLIB) $(LIB)
beb904
 
beb904
-mount.h: mount.x
beb904
-	$(RPCGEN) -h -o mount.h mount.x
beb904
-
beb904
-mount_clnt.c: mount.h
beb904
-	$(RPCGEN) -l -o mount_clnt.c mount.x
beb904
-
beb904
-mount_clnt.o: mount_clnt.c
beb904
-	$(CC) $(CFLAGS) -o mount_clnt.o -c mount_clnt.c
beb904
-	$(STRIP) mount_clnt.o
beb904
-
beb904
-mount_xdr.c: mount.h
beb904
-	$(RPCGEN) -c -o mount_xdr.c mount.x
beb904
-
beb904
-mount_xdr.o: mount_xdr.c
beb904
-	$(CC) $(CFLAGS) -Wno-unused-variable -o mount_xdr.o -c mount_xdr.c
beb904
-	$(STRIP) mount_xdr.o
beb904
-
beb904
 nss_tok.c: nss_tok.l
beb904
 	$(LEX) -o$@ -Pnss_ $?
beb904
 
beb904
@@ -61,8 +43,6 @@ nss_tok.o: nss_tok.c nss_parse.tab.h
beb904
 
beb904
 nss_parse.tab.o: nss_parse.tab.c nss_parse.tab.h
beb904
 
beb904
-rpc_subs.o: mount.h
beb904
-
beb904
 install: all
beb904
 
beb904
 clean:
beb904
--- autofs-5.1.4.orig/lib/mount.x
beb904
+++ /dev/null
beb904
@@ -1,345 +0,0 @@
beb904
-%/*
beb904
-% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
beb904
-% * unrestricted use provided that this legend is included on all tape
beb904
-% * media and as a part of the software program in whole or part.  Users
beb904
-% * may copy or modify Sun RPC without charge, but are not authorized
beb904
-% * to license or distribute it to anyone else except as part of a product or
beb904
-% * program developed by the user or with the express written consent of
beb904
-% * Sun Microsystems, Inc.
beb904
-% *
beb904
-% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
beb904
-% * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
beb904
-% * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
beb904
-% *
beb904
-% * Sun RPC is provided with no support and without any obligation on the
beb904
-% * part of Sun Microsystems, Inc. to assist in its use, correction,
beb904
-% * modification or enhancement.
beb904
-% *
beb904
-% * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
beb904
-% * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
beb904
-% * OR ANY PART THEREOF.
beb904
-% *
beb904
-% * In no event will Sun Microsystems, Inc. be liable for any lost revenue
beb904
-% * or profits or other special, indirect and consequential damages, even if
beb904
-% * Sun has been advised of the possibility of such damages.
beb904
-% *
beb904
-% * Sun Microsystems, Inc.
beb904
-% * 2550 Garcia Avenue
beb904
-% * Mountain View, California  94043
beb904
-% */
beb904
-
beb904
-%/*
beb904
-% * Copyright (c) 1985, 1990 by Sun Microsystems, Inc.
beb904
-% */
beb904
-%
beb904
-%/* from @(#)mount.x	1.3 91/03/11 TIRPC 1.0 */
beb904
-
beb904
-/*
beb904
- * Protocol description for the mount program
beb904
- */
beb904
-
beb904
-#ifdef RPC_HDR
beb904
-%#ifndef _rpcsvc_mount_h
beb904
-%#define _rpcsvc_mount_h
beb904
-%#include <memory.h>
beb904
-#endif
beb904
-
beb904
-const MNTPATHLEN = 1024;	/* maximum bytes in a pathname argument */
beb904
-const MNTNAMLEN = 255;		/* maximum bytes in a name argument */
beb904
-const FHSIZE = 32;		/* size in bytes of a file handle */
beb904
-
beb904
-/*
beb904
- * The fhandle is the file handle that the server passes to the client.
beb904
- * All file operations are done using the file handles to refer to a file
beb904
- * or a directory. The file handle can contain whatever information the
beb904
- * server needs to distinguish an individual file.
beb904
- */
beb904
-typedef opaque fhandle[FHSIZE];	
beb904
-
beb904
-/*
beb904
- * If a status of zero is returned, the call completed successfully, and 
beb904
- * a file handle for the directory follows. A non-zero status indicates
beb904
- * some sort of error. The status corresponds with UNIX error numbers.
beb904
- */
beb904
-union fhstatus switch (unsigned fhs_status) {
beb904
-case 0:
beb904
-	fhandle fhs_fhandle;
beb904
-default:
beb904
-	void;
beb904
-};
beb904
-
beb904
-/*
beb904
- * The type dirpath is the pathname of a directory
beb904
- */
beb904
-typedef string dirpath<MNTPATHLEN>;
beb904
-
beb904
-/*
beb904
- * The type name is used for arbitrary names (hostnames, groupnames)
beb904
- */
beb904
-typedef string name<MNTNAMLEN>;
beb904
-
beb904
-/*
beb904
- * A list of who has what mounted
beb904
- */
beb904
-typedef struct mountbody *mountlist;
beb904
-struct mountbody {
beb904
-	name ml_hostname;
beb904
-	dirpath ml_directory;
beb904
-	mountlist ml_next;
beb904
-};
beb904
-
beb904
-/*
beb904
- * A list of netgroups
beb904
- */
beb904
-typedef struct groupnode *groups;
beb904
-struct groupnode {
beb904
-	name gr_name;
beb904
-	groups gr_next;
beb904
-};
beb904
-
beb904
-/*
beb904
- * A list of what is exported and to whom
beb904
- */
beb904
-typedef struct exportnode *exports;
beb904
-struct exportnode {
beb904
-	dirpath ex_dir;
beb904
-	groups ex_groups;
beb904
-	exports ex_next;
beb904
-};
beb904
-
beb904
-/*
beb904
- * POSIX pathconf information
beb904
- */
beb904
-struct ppathcnf {
beb904
-	int	pc_link_max;	/* max links allowed */
beb904
-	short	pc_max_canon;	/* max line len for a tty */
beb904
-	short	pc_max_input;	/* input a tty can eat all at once */
beb904
-	short	pc_name_max;	/* max file name length (dir entry) */
beb904
-	short	pc_path_max;	/* max path name length (/x/y/x/.. ) */
beb904
-	short	pc_pipe_buf;	/* size of a pipe (bytes) */
beb904
-	u_char	pc_vdisable;	/* safe char to turn off c_cc[i] */
beb904
-	char	pc_xxx;		/* alignment padding; cc_t == char */
beb904
-	short	pc_mask[2];	/* validity and boolean bits */
beb904
-};
beb904
-
beb904
-/*
beb904
- * NFSv3 file handle
beb904
- */
beb904
-const FHSIZE3 =	64;		/* max size of NFSv3 file handle in bytes */
beb904
-typedef opaque		fhandle3<FHSIZE3>;
beb904
-
beb904
-/*
beb904
- * NFSv3 mount status
beb904
- */
beb904
-enum mountstat3 {
beb904
-	MNT_OK			= 0,	/* no error */
beb904
-	MNT3ERR_PERM		= 1,	/* not owner */
beb904
-	MNT3ERR_NOENT		= 2,	/* no such file or directory */
beb904
-	MNT3ERR_IO		= 5,	/* I/O error */
beb904
-	MNT3ERR_ACCES		= 13,	/* Permission denied */
beb904
-	MNT3ERR_NOTDIR		= 20,	/* Not a directory */
beb904
-	MNT3ERR_INVAL		= 22,	/* Invalid argument */
beb904
-	MNT3ERR_NAMETOOLONG	= 63,	/* File name too long */
beb904
-	MNT3ERR_NOTSUPP		= 10004,/* Operation not supported */
beb904
-	MNT3ERR_SERVERFAULT	= 10006	/* A failure on the server */
beb904
-};
beb904
-
beb904
-/*
beb904
- * NFSv3 mount result
beb904
- */
beb904
-struct mountres3_ok {
beb904
-	fhandle3	fhandle;
beb904
-	int		auth_flavors<>;
beb904
-};
beb904
-
beb904
-union mountres3 switch (mountstat3 fhs_status) {
beb904
-case MNT_OK:
beb904
-	mountres3_ok	mountinfo; /* File handle and supported flavors */
beb904
-default:
beb904
-	void;
beb904
-};
beb904
-
beb904
-program MOUNTPROG {
beb904
-	/*
beb904
-	 * Version one of the mount protocol communicates with version two
beb904
-	 * of the NFS protocol. The only connecting point is the fhandle 
beb904
-	 * structure, which is the same for both protocols.
beb904
-	 */
beb904
-	version MOUNTVERS {
beb904
-		/*
beb904
-		 * Does no work. It is made available in all RPC services
beb904
-		 * to allow server reponse testing and timing
beb904
-		 */
beb904
-		void
beb904
-		MOUNTPROC_NULL(void) = 0;
beb904
-
beb904
-		/*	
beb904
-		 * If fhs_status is 0, then fhs_fhandle contains the
beb904
-	 	 * file handle for the directory. This file handle may
beb904
-		 * be used in the NFS protocol. This procedure also adds
beb904
-		 * a new entry to the mount list for this client mounting
beb904
-		 * the directory.
beb904
-		 * Unix authentication required.
beb904
-		 */
beb904
-		fhstatus 
beb904
-		MOUNTPROC_MNT(dirpath) = 1;
beb904
-
beb904
-		/*
beb904
-		 * Returns the list of remotely mounted filesystems. The 
beb904
-		 * mountlist contains one entry for each hostname and 
beb904
-		 * directory pair.
beb904
-		 */
beb904
-		mountlist
beb904
-		MOUNTPROC_DUMP(void) = 2;
beb904
-
beb904
-		/*
beb904
-		 * Removes the mount list entry for the directory
beb904
-		 * Unix authentication required.
beb904
-		 */
beb904
-		void
beb904
-		MOUNTPROC_UMNT(dirpath) = 3;
beb904
-
beb904
-		/*
beb904
-		 * Removes all of the mount list entries for this client
beb904
-		 * Unix authentication required.
beb904
-		 */
beb904
-		void
beb904
-		MOUNTPROC_UMNTALL(void) = 4;
beb904
-
beb904
-		/*
beb904
-		 * Returns a list of all the exported filesystems, and which
beb904
-		 * machines are allowed to import it.
beb904
-		 */
beb904
-		exports
beb904
-		MOUNTPROC_EXPORT(void)  = 5;
beb904
-
beb904
-		/*
beb904
-		 * Identical to MOUNTPROC_EXPORT above
beb904
-		 */
beb904
-		exports
beb904
-		MOUNTPROC_EXPORTALL(void) = 6;
beb904
-	} = 1;
beb904
-
beb904
-	/*
beb904
-	 * Version two of the mount protocol communicates with version two
beb904
-	 * of the NFS protocol.
beb904
-	 * The only difference from version one is the addition of a POSIX
beb904
-	 * pathconf call.
beb904
-	 */
beb904
-	version MOUNTVERS_POSIX {
beb904
-		/*
beb904
-		 * Does no work. It is made available in all RPC services
beb904
-		 * to allow server reponse testing and timing
beb904
-		 */
beb904
-		void
beb904
-		MOUNTPROC_NULL(void) = 0;
beb904
-
beb904
-		/*	
beb904
-		 * If fhs_status is 0, then fhs_fhandle contains the
beb904
-	 	 * file handle for the directory. This file handle may
beb904
-		 * be used in the NFS protocol. This procedure also adds
beb904
-		 * a new entry to the mount list for this client mounting
beb904
-		 * the directory.
beb904
-		 * Unix authentication required.
beb904
-		 */
beb904
-		fhstatus 
beb904
-		MOUNTPROC_MNT(dirpath) = 1;
beb904
-
beb904
-		/*
beb904
-		 * Returns the list of remotely mounted filesystems. The 
beb904
-		 * mountlist contains one entry for each hostname and 
beb904
-		 * directory pair.
beb904
-		 */
beb904
-		mountlist
beb904
-		MOUNTPROC_DUMP(void) = 2;
beb904
-
beb904
-		/*
beb904
-		 * Removes the mount list entry for the directory
beb904
-		 * Unix authentication required.
beb904
-		 */
beb904
-		void
beb904
-		MOUNTPROC_UMNT(dirpath) = 3;
beb904
-
beb904
-		/*
beb904
-		 * Removes all of the mount list entries for this client
beb904
-		 * Unix authentication required.
beb904
-		 */
beb904
-		void
beb904
-		MOUNTPROC_UMNTALL(void) = 4;
beb904
-
beb904
-		/*
beb904
-		 * Returns a list of all the exported filesystems, and which
beb904
-		 * machines are allowed to import it.
beb904
-		 */
beb904
-		exports
beb904
-		MOUNTPROC_EXPORT(void)  = 5;
beb904
-
beb904
-		/*
beb904
-		 * Identical to MOUNTPROC_EXPORT above
beb904
-		 */
beb904
-		exports
beb904
-		MOUNTPROC_EXPORTALL(void) = 6;
beb904
-
beb904
-		/*
beb904
-		 * POSIX pathconf info (Sun hack)
beb904
-		 */
beb904
-		ppathcnf
beb904
-		MOUNTPROC_PATHCONF(dirpath) = 7;
beb904
-	} = 2;
beb904
-
beb904
-	/*
beb904
-	 * Version 3 of the protocol is for NFSv3
beb904
-	 */
beb904
-	version MOUNTVERS_NFSV3 {
beb904
-		/*
beb904
-		 * Does no work. It is made available in all RPC services
beb904
-		 * to allow server reponse testing and timing
beb904
-		 */
beb904
-		void
beb904
-		MOUNTPROC3_NULL(void) = 0;
beb904
-
beb904
-		/*	
beb904
-		 * If fhs_status is 0, then fhs_fhandle contains the
beb904
-	 	 * file handle for the directory. This file handle may
beb904
-		 * be used in the NFS protocol. This procedure also adds
beb904
-		 * a new entry to the mount list for this client mounting
beb904
-		 * the directory.
beb904
-		 * Unix authentication required.
beb904
-		 */
beb904
-		mountres3 
beb904
-		MOUNTPROC3_MNT(dirpath) = 1;
beb904
-
beb904
-		/*
beb904
-		 * Returns the list of remotely mounted filesystems. The 
beb904
-		 * mountlist contains one entry for each hostname and 
beb904
-		 * directory pair.
beb904
-		 */
beb904
-		mountlist
beb904
-		MOUNTPROC3_DUMP(void) = 2;
beb904
-
beb904
-		/*
beb904
-		 * Removes the mount list entry for the directory
beb904
-		 * Unix authentication required.
beb904
-		 */
beb904
-		void
beb904
-		MOUNTPROC3_UMNT(dirpath) = 3;
beb904
-
beb904
-		/*
beb904
-		 * Removes all of the mount list entries for this client
beb904
-		 * Unix authentication required.
beb904
-		 */
beb904
-		void
beb904
-		MOUNTPROC3_UMNTALL(void) = 4;
beb904
-
beb904
-		/*
beb904
-		 * Returns a list of all the exported filesystems, and which
beb904
-		 * machines are allowed to import it.
beb904
-		 */
beb904
-		exports
beb904
-		MOUNTPROC3_EXPORT(void)  = 5;
beb904
-	} = 3;
beb904
-} = 100005;
beb904
-
beb904
-#ifdef RPC_HDR
beb904
-%#endif /*!_rpcsvc_mount_h*/
beb904
-#endif