Skip to contentSkip to conversation

nfs-utils: fix configure error on some hosts

PATCH In review Chen Qi 2 participants 2 messages Apr 29, 2020

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/1 nfs-utils: fix configure error on some hosts

nfs-utils' configure.ac hardcodes the rpcgen's searching path. However, on some hosts, rpcgen is missing but SDK provides one. We should avoid the hardcoding so that nfs-utils could be built correctly under SDK.

---
 ...gure.ac-avoid-hardcoding-rpcgen-path.patch | 31 +++++++++++++++++++
 .../nfs-utils/nfs-utils_2.4.3.bb              |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch
meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch new file +31 -0
new file mode 100644
index 0000000000..5602e5be57
@@ -0,0 +1,31 @@
+From b9049fbf051e559941298afd57ec43d6f6a5490d Mon Sep 17 00:00:00 2001
+From: Chen Qi <[email protected]>
+Date: Wed, 29 Apr 2020 08:56:05 +0000
+Subject: [PATCH] configure.ac: avoid hardcoding rpcgen path
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <[email protected]>
+---
+ configure.ac | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f9efdb7..8e8aeaa 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -152,8 +152,9 @@ AC_ARG_WITH(rpcgen,
+ 	rpcgen_cflags=-Werror=strict-prototypes
+ 	RPCGEN_PATH=
+ 	if test "$rpcgen_path" = "yes"; then
+-	    for p in /usr/local/bin/rpcgen /usr/bin/rpcgen /bin/rpcgen
+-	    do if test -f $p ; then RPCGEN_PATH=$p ; break; fi ; done
++	    #for p in /usr/local/bin/rpcgen /usr/bin/rpcgen /bin/rpcgen
++	    #do if test -f $p ; then RPCGEN_PATH=$p ; break; fi ; done
++	    RPCGEN_PATH=`which rpcgen`
+ 		if test -z "$RPCGEN_PATH"; then
+ 			AC_MSG_ERROR([Please install rpcgen or use --with-rpcgen])
+ 		fi
+-- 
+2.24.1
+
meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.3.bb +1 -0
index 9bdb6f4ae4..05877d57f1 100644
@@ -31,6 +31,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
            file://0001-cacheio-use-intmax_t-for-formatted-IO.patch \
            file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \
            file://clang-warnings.patch \
+           file://0001-configure.ac-avoid-hardcoding-rpcgen-path.patch \
            "
 SRC_URI[md5sum] = "06020c76f531ed97f3145514901e0e7c"
 SRC_URI[sha256sum] = "af65fce5dd8370cff9ead67baac5a6cd69c376dcadfef264dc2c78c904f26599"
Signature · 1 line
2.17.1
#1 lore raw
Quoted 32 lines · Chen Qi

nfs-utils' configure.ac hardcodes the rpcgen's searching path. However, on some hosts, rpcgen is missing but SDK provides one. We should avoid the hardcoding so that nfs-utils could be built correctly under SDK.

---
  ...gure.ac-avoid-hardcoding-rpcgen-path.patch | 31 +++++++++++++++++++
  .../nfs-utils/nfs-utils_2.4.3.bb              |  1 +
  2 files changed, 32 insertions(+)

create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch

meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch new file +15 -0
new file mode 100644
index 0000000000..5602e5be57
@@ -0,0 +1,31 @@
+From b9049fbf051e559941298afd57ec43d6f6a5490d Mon Sep 17 00:00:00 2001
+From: Chen Qi <[email protected]>
+Date: Wed, 29 Apr 2020 08:56:05 +0000
+Subject: [PATCH] configure.ac: avoid hardcoding rpcgen path
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <[email protected]>
+---
+ configure.ac | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f9efdb7..8e8aeaa 100644
+--- a/configure.ac

meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch line 25

Quoted 10 lines
meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch new file +10 -0
++++ b/configure.ac
+@@ -152,8 +152,9 @@ AC_ARG_WITH(rpcgen,
+ 	rpcgen_cflags=-Werror=strict-prototypes
+ 	RPCGEN_PATH=
+ 	if test "$rpcgen_path" = "yes"; then
+-	    for p in /usr/local/bin/rpcgen /usr/bin/rpcgen /bin/rpcgen
+-	    do if test -f $p ; then RPCGEN_PATH=$p ; break; fi ; done
++	    #for p in /usr/local/bin/rpcgen /usr/bin/rpcgen /bin/rpcgen
++	    #do if test -f $p ; then RPCGEN_PATH=$p ; break; fi ; done
++	    RPCGEN_PATH=`which rpcgen`

Perhaps pass it via configure argument, since which can find random version too.

Quoted 22 lines
meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch new file +6 -0
+ 		if test -z "$RPCGEN_PATH"; then
+ 			AC_MSG_ERROR([Please install rpcgen or use --with-rpcgen])
+ 		fi
+--
+2.24.1
+
meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.3.bb +1 -0
index 9bdb6f4ae4..05877d57f1 100644
@@ -31,6 +31,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
             file://0001-cacheio-use-intmax_t-for-formatted-IO.patch \
             file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \
             file://clang-warnings.patch \
+           file://0001-configure.ac-avoid-hardcoding-rpcgen-path.patch \
             "
  SRC_URI[md5sum] = "06020c76f531ed97f3145514901e0e7c"
  SRC_URI[sha256sum] = "af65fce5dd8370cff9ead67baac5a6cd69c376dcadfef264dc2c78c904f26599"