[3/3] nfs-utils: fix configure error on some hosts

Submitted by Qi.Chen@windriver.com on Sept. 29, 2020, 3:22 a.m. | Patch ID: 176873

Details

Message ID 20200929032216.32161-3-Qi.Chen@windriver.com
State New
Headers show

Commit Message

Qi.Chen@windriver.com Sept. 29, 2020, 3:22 a.m.
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.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 ...gure.ac-avoid-hardcoding-rpcgen-path.patch | 31 +++++++++++++++++++
 .../nfs-utils/nfs-utils_2.5.1.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

Patch hide | download patch | download mbox

diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch
new file mode 100644
index 0000000000..5602e5be57
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch
@@ -0,0 +1,31 @@ 
+From b9049fbf051e559941298afd57ec43d6f6a5490d Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+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 <Qi.Chen@windriver.com>
+---
+ 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
+
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb
index b8ad23a0d8..b06ce2d0af 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb
@@ -30,6 +30,7 @@  SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
            file://bugfix-adjust-statd-service-name.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[sha256sum] = "0f1c8170e16a07d9836bbf0836d48d0c842b6f0e0e8b18748f099751851d30c4"
 

Comments

Khem Raj Sept. 29, 2020, 4:23 a.m.
On Mon, Sep 28, 2020 at 8:22 PM Chen Qi <Qi.Chen@windriver.com> wrote:
>
> 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.
>

perhaps its better to always require --with-rpcgen there is no need to
look into host paths

> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  ...gure.ac-avoid-hardcoding-rpcgen-path.patch | 31 +++++++++++++++++++
>  .../nfs-utils/nfs-utils_2.5.1.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
>
> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch
> new file mode 100644
> index 0000000000..5602e5be57
> --- /dev/null
> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch
> @@ -0,0 +1,31 @@
> +From b9049fbf051e559941298afd57ec43d6f6a5490d Mon Sep 17 00:00:00 2001
> +From: Chen Qi <Qi.Chen@windriver.com>
> +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 <Qi.Chen@windriver.com>
> +---
> + 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
> +
> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb
> index b8ad23a0d8..b06ce2d0af 100644
> --- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb
> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb
> @@ -30,6 +30,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
>             file://bugfix-adjust-statd-service-name.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[sha256sum] = "0f1c8170e16a07d9836bbf0836d48d0c842b6f0e0e8b18748f099751851d30c4"
>
> --
> 2.17.1
>
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142890): https://lists.openembedded.org/g/openembedded-core/message/142890
Mute This Topic: https://lists.openembedded.org/mt/77189681/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Qi.Chen@windriver.com Sept. 29, 2020, 5:08 a.m.
On 09/29/2020 12:23 PM, Khem Raj wrote:
> On Mon, Sep 28, 2020 at 8:22 PM Chen Qi <Qi.Chen@windriver.com> wrote:
>> 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.
>>
> perhaps its better to always require --with-rpcgen there is no need to
> look into host paths

I agree. Thanks.
I'll send out V2.

Regards,
Chen Qi

>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> ---
>>   ...gure.ac-avoid-hardcoding-rpcgen-path.patch | 31 +++++++++++++++++++
>>   .../nfs-utils/nfs-utils_2.5.1.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
>>
>> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch
>> new file mode 100644
>> index 0000000000..5602e5be57
>> --- /dev/null
>> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch
>> @@ -0,0 +1,31 @@
>> +From b9049fbf051e559941298afd57ec43d6f6a5490d Mon Sep 17 00:00:00 2001
>> +From: Chen Qi <Qi.Chen@windriver.com>
>> +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 <Qi.Chen@windriver.com>
>> +---
>> + 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
>> +
>> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb
>> index b8ad23a0d8..b06ce2d0af 100644
>> --- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb
>> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb
>> @@ -30,6 +30,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
>>              file://bugfix-adjust-statd-service-name.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[sha256sum] = "0f1c8170e16a07d9836bbf0836d48d0c842b6f0e0e8b18748f099751851d30c4"
>>
>> --
>> 2.17.1
>>
>>
>> 
>>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142893): https://lists.openembedded.org/g/openembedded-core/message/142893
Mute This Topic: https://lists.openembedded.org/mt/77189681/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Qi.Chen@windriver.com Sept. 29, 2020, 5:13 a.m.
Just found that it's already been fixed by the following patch.

commit 2e0b4c99f5d49c84a3a2992fb686d27693f3d8c6
Author: Taras Kondratiuk <takondra@cisco.com>
Date:   Fri Jul 10 10:41:16 2020 -0700

     nfs-utils: use rpcgen tool from HOSTTOOLS_DIR

     nfs-utils configure searches for rpcgen tool only in default locations:
     "/usr/local/bin/rpcgen /usr/bin/rpcgen /bin/rpcgen".
     On some of our build machines the rpcgen is not present there and
     configure fails:
     | configure: error: Please install rpcgen or use --with-rpcgen

     HOSTTOOLS_DIR already contains a correct pointer to host rpcgen 
tool, so
     use it from there.

     Signed-off-by: Taras Kondratiuk <takondra@cisco.com>
     Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Please ignore my patch.

Best Regards,
Chen Qi

On 09/29/2020 01:08 PM, Chen Qi wrote:
> On 09/29/2020 12:23 PM, Khem Raj wrote:
>> On Mon, Sep 28, 2020 at 8:22 PM Chen Qi <Qi.Chen@windriver.com> wrote:
>>> 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.
>>>
>> perhaps its better to always require --with-rpcgen there is no need to
>> look into host paths
>
> I agree. Thanks.
> I'll send out V2.
>
> Regards,
> Chen Qi
>
>>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>>> ---
>>>   ...gure.ac-avoid-hardcoding-rpcgen-path.patch | 31 
>>> +++++++++++++++++++
>>>   .../nfs-utils/nfs-utils_2.5.1.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
>>>
>>> diff --git 
>>> a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch 
>>> b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch 
>>>
>>> new file mode 100644
>>> index 0000000000..5602e5be57
>>> --- /dev/null
>>> +++ 
>>> b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch
>>> @@ -0,0 +1,31 @@
>>> +From b9049fbf051e559941298afd57ec43d6f6a5490d Mon Sep 17 00:00:00 2001
>>> +From: Chen Qi <Qi.Chen@windriver.com>
>>> +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 <Qi.Chen@windriver.com>
>>> +---
>>> + 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
>>> +
>>> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb 
>>> b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb
>>> index b8ad23a0d8..b06ce2d0af 100644
>>> --- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb
>>> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb
>>> @@ -30,6 +30,7 @@ SRC_URI = 
>>> "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
>>>              file://bugfix-adjust-statd-service-name.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[sha256sum] = 
>>> "0f1c8170e16a07d9836bbf0836d48d0c842b6f0e0e8b18748f099751851d30c4"
>>>
>>> -- 
>>> 2.17.1
>>>
>>>
>>>
>>>
>
>
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142894): https://lists.openembedded.org/g/openembedded-core/message/142894
Mute This Topic: https://lists.openembedded.org/mt/77189681/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-