Skip to contentSkip to conversation

populate_sdk_ext.bbclass: add ESDK_MANIFEST_EXCLUDES

PATCH In review Chen Qi 2 participants 6 messages Sep 29, 2020 1 message not in the archive

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/3 populate_sdk_ext.bbclass: add ESDK_MANIFEST_EXCLUDES

Add ESDK_MANIFEST_EXCLUDES to enable excluding items in sdk-conf-manifest.

By default, files under conf/ are all added to sdk-conf-manifest, as the manifest file is set to 'conf/*'.

However, there are situations where some configuration files under conf/ directory are not intended to be added to sdk-conf-manifest, thus adding ESDK_MANIFEST_EXCLUDES to enable users to do this.

This variable takes the form of glob matching.
e.g.
ESDK_MANIFEST_EXCLUDES = "conf/autogen*"
This would exclude all files under conf/ starting with 'autogen' from sdk-conf-manifest.

---
 meta/classes/populate_sdk_ext.bbclass | 6 ++++++
 1 file changed, 6 insertions(+)
meta/classes/populate_sdk_ext.bbclass +6 -0
index d659b6940a..6f35b612c2 100644
@@ -522,12 +522,18 @@ python copy_buildsystem () {
     # sdk_ext_postinst() below) thus the checksum we take here would always
     # be different.
     manifest_file_list = ['conf/*']
+    esdk_manifest_excludes = (d.getVar('ESDK_MANIFEST_EXCLUDES') or '').split()
+    esdk_manifest_excludes_list = []
+    for exclude_item in esdk_manifest_excludes:
+        esdk_manifest_excludes_list += glob.glob(os.path.join(baseoutpath, exclude_item))
     manifest_file = os.path.join(baseoutpath, 'conf', 'sdk-conf-manifest')
     with open(manifest_file, 'w') as f:
         for item in manifest_file_list:
             for fn in glob.glob(os.path.join(baseoutpath, item)):
                 if fn == manifest_file:
                     continue
+                if fn in esdk_manifest_excludes_list:
+                    continue
                 chksum = bb.utils.sha256_file(fn)
                 f.write('%s\t%s\n' % (chksum, os.path.relpath(fn, baseoutpath)))
 }
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/3 testsdk.py: remove workspace/sources to avoid failure in case of multilib

When multilib is enabled, there are multiple environment scripts, and the test cases for eSDK are executed for each environment script.

And we will have the following problem when executing test cases for the second environment script.

ERROR: Source tree path /.../workspace/sources/librdfa already exists and is not empty

So after executing test cases for one environment, we clean up the sources diretory to avoid such failure.

---
 meta/lib/oeqa/sdkext/testsdk.py | 3 +++
 1 file changed, 3 insertions(+)
meta/lib/oeqa/sdkext/testsdk.py +3 -0
index c5c46df6cd..ffd185ec55 100644
@@ -99,6 +99,9 @@ class TestSDKExt(TestSDKBase):
             if not result.wasSuccessful():
                 fail = True
 
+            # Clean the workspace/sources to avoid `devtool add' failure because of non-empty source directory
+            bb.utils.remove(sdk_dir+'workspace/sources', True)
+
         if fail:
             bb.fatal("%s - FAILED - check the task log and the commands log" % pn)
 
Signature · 1 line
2.17.1
author
#2 lore raw

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

In reply to 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.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
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.5.1.bb +1 -0
index b8ad23a0d8..b06ce2d0af 100644
@@ -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"
 
Signature · 1 line
2.17.1
#3 lore raw

Re: [OE-core][PATCH 3/3] nfs-utils: fix configure error on some hosts

Quoted 5 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.

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

Quoted 62 lines
---
 ...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
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.5.1.bb +1 -1
index b8ad23a0d8..b06ce2d0af 100644
@@ -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

author
#4 lore raw

Re: [OE-core][PATCH 3/3] nfs-utils: fix configure error on some hosts

Quoted 7 lines · Khem Raj
Quoted 4 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.

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

Quoted 62 lines
Quoted 62 lines
---
  ...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

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.5.1.bb +1 -1
index b8ad23a0d8..b06ce2d0af 100644
@@ -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

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#6 lore raw

Re: [OE-core][PATCH 3/3] nfs-utils: fix configure error on some hosts

Just found that it's already been fixed by the following patch.

commit 2e0b4c99f5d49c84a3a2992fb686d27693f3d8c6

Author: Taras Kondratiuk <[email protected]>
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.

Please ignore my patch.

Best Regards,
Chen Qi

Quoted 89 lines · Chen Qi
Quoted 7 lines · Khem Raj
Quoted 4 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.

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

Quoted 69 lines
Quoted 69 lines
---
  ...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

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

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

meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-avoid-hardcoding-rpcgen-path.patch +31 -1
@@ -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.5.1.bb +0 -0
index b8ad23a0d8..b06ce2d0af 100644
@@ -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"

Signature · 1 line
2.17.1