devtools: fix ninja break under default DESTDIR path
PATCH 1/1 devtools: fix ninja break under default DESTDIR path
If DPDK_ABI_REF_DIR is not set, the default DESTDIR is a relative path. This will break ninja in the ABI check test.
--- devtools/test-meson-builds.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
devtools/test-meson-builds.sh +1 -1
@@ -143,7 +143,7 @@ build () # <directory> <target compiler | cross file> <meson options> config $srcdir $builds_dir/$targetdir $cross --werror $* compile $builds_dir/$targetdir if [ -n "$DPDK_ABI_REF_VERSION" ]; then - abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION + abirefdir=${DPDK_ABI_REF_DIR:-$(pwd)/reference}/$DPDK_ABI_REF_VERSION if [ ! -d $abirefdir/$targetdir ]; then # clone current sources if [ ! -d $abirefdir/src ]; then
Signature · 1 line
2.7.4
Quoted 10 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Phil Yang
Sent: Thursday, July 9, 2020 8:53 AM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev] [PATCH] devtools: fix ninja break under default DESTDIR path
Quoted 3 lines
If
DPDK_ABI_REF_DIRis not set, the default DESTDIR is a relative path. This will break ninja in the ABI check test.
The commit message is not very clear. The problem is we're specifying ninja's destination dir in variable DESTDIR when invoking ninja install. If the DESTDIR is not an absolute path, ninja complains (when invoking install). This isn't directly related to DPDK_ABI_REF_DIR, it's more a problem with how we call install_target.
Quoted 24 lines
Fixes 777014e56d07 ("devtools: add ABI checks")Signed-off-by Phil Yang <[email protected]>--- devtools/test-meson-builds.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)devtools/test-meson-builds.sh index renamed from devtools/test-meson-builds.sh +0
-0a87de63..2bfcaca 100755
devtools/test-meson-builds.sh +0
-0@@ -143,7 +143,7 @@ build () # <directory> <target compiler | cross file><meson options>
devtools/test-meson-builds.sh +0
-1config $srcdir $builds_dir/$targetdir $cross --werror $* compile $builds_dir/$targetdir if [ -n "$DPDK_ABI_REF_VERSION" ]; then - abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION
devtools/test-meson-builds.sh +1
-0+ abirefdir=${DPDK_ABI_REF_DIR:-$(pwd)/reference}/$DPDK_ABI_REF_VERSION
devtools/test-meson-builds.sh +0
-1if [ ! -d $abirefdir/$targetdir ]; then # clone current sources if [ ! -d $abirefdir/src ]; then --
Quoted 2 lines
2.7.4
install_target on line 160 is called improperly. Let's fix it so that it matches line 169:install_target $abirefdir/build $(readlink -f $abirefdir/$targetdir)
This way we don't need to add $(pwd).
Quoted 11 lines · Juraj Linkeš
Quoted 1 line
Subject: [dpdk-dev] [PATCH] devtools: fix ninja break under default
DESTDIR
Quoted 5 lines
path
If
DPDK_ABI_REF_DIRis not set, the default DESTDIR is a relative path. This will break ninja in the ABI check test.The commit message is not very clear. The problem is we're specifying ninja's destination dir in variable DESTDIR when invoking ninja install. If the DESTDIR is not an absolute path, ninja complains (when invoking install). This isn't
Yes, this defect is due to 'ninja install' not happy with the relative path. Will reword the commit message in the next version.
Quoted 2 lines
directly related to
DPDK_ABI_REF_DIR, it's more a problem with how we callinstall_target.
If we have set 'DPDK_ABI_REF_DIR' before the test, 'abiref' should be an absolute path, but the default 'abiref' value is a relative path. So should we keep them align?
Quoted 24 lines
devtools/test-meson-
Quoted 9 lines
Fixes 777014e56d07 ("devtools: add ABI checks")Signed-off-by Phil Yang <[email protected]>--- devtools/test-meson-builds.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)devtools/test-meson- renamed from devtools/test-meson-builds.sh +0
-0
builds.shindexQuoted 14 lines
a87de63..2bfcaca 100755
devtools/test-meson-builds.sh +0
-0@@ -143,7 +143,7 @@ build () # <directory> <target compiler | cross file><meson options>
devtools/test-meson-builds.sh +0
-1config $srcdir $builds_dir/$targetdir $cross --werror $* compile $builds_dir/$targetdir if [ -n "$DPDK_ABI_REF_VERSION" ]; then - abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION
devtools/test-meson-builds.sh +1
-0+ abirefdir=${DPDK_ABI_REF_DIR:-$(pwd)/reference}/$DPDK_ABI_REF_VERSION
devtools/test-meson-builds.sh +0
-0if [ ! -d $abirefdir/$targetdir ]; then # clone current sources
Quoted 8 lines
Quoted 4 lines
if [ ! -d $abirefdir/src ]; then
--
2.7.4
install_targeton line 160 is called improperly. Let's fix it so that it matches line 169:install_target$abirefdir/build $(readlink -f $abirefdir/$targetdir)
If so we need to call readlink at line #161 as well as it does at line #171.
Quoted 2 lines
This way we don't need to add $(pwd).
If you don't prefer $(pwd), we can do it like this:
abirefdir=$(readlink -f ${DPDK_ABI_REF_DIR:- reference}/$DPDK_ABI_REF_VERSION)
Thanks,
Phil
Quoted 69 lines
-----Original Message-----
From: Phil Yang <[email protected]>
Sent: Sunday, September 20, 2020 11:32 AM
To: Juraj Linkeš <[email protected]>; [email protected]; [email protected]
Cc: Honnappa Nagarahalli <[email protected]>; Ruifeng Wang <[email protected]>; nd <[email protected]>; nd <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] devtools: fix ninja break under default DESTDIR pathQuoted 4 lines · Juraj Linkeš
Quoted 1 line
Subject: [dpdk-dev] [PATCH] devtools: fix ninja break under default
DESTDIR
Quoted 2 lines
path
Quoted 8 lines
Quoted 3 lines
If
DPDK_ABI_REF_DIRis not set, the default DESTDIR is a relative path. This will break ninja in the ABI check test.The commit message is not very clear. The problem is we're specifying ninja's destination dir in variable DESTDIR when invoking ninja install. If the DESTDIR is not an absolute path, ninja complains (when invoking install). This isn't
Yes, this defect is due to 'ninja install' not happy with the relative path. Will reword the commit message in the next version.
Quoted 2 lines
directly related to
DPDK_ABI_REF_DIR, it's more a problem with how we callinstall_target.If we have set '
DPDK_ABI_REF_DIR' before the test, 'abiref' should be an absolute path, but the default 'abiref' value is a relative path. So should we keep them align?Quoted 25 lines
devtools/test-meson-
Quoted 9 lines
Fixes 777014e56d07 ("devtools: add ABI checks")Signed-off-by Phil Yang <[email protected]>--- devtools/test-meson-builds.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)devtools/test-meson- renamed from devtools/test-meson-builds.sh +0
-0
builds.shindexQuoted 15 lines
a87de63..2bfcaca 100755
devtools/test-meson-builds.sh +0
-0@@ -143,7 +143,7 @@ build () # <directory> <target compiler | crossfile> <meson options>
devtools/test-meson-builds.sh +0
-1config $srcdir $builds_dir/$targetdir $cross --werror $* compile $builds_dir/$targetdir if [ -n "$DPDK_ABI_REF_VERSION" ]; then - abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION
devtools/test-meson-builds.sh +1
-0+ abirefdir=${DPDK_ABI_REF_DIR:-$(pwd)/reference}/$DPDK_ABI_REF_VERSION
devtools/test-meson-builds.sh +0
-0if [ ! -d $abirefdir/$targetdir ]; then # clone current sources if [ ! -d $abirefdir/src ]; thenQuoted 8 lines
Quoted 3 lines
--
2.7.4
install_targeton line 160 is called improperly. Let's fix it so that it matches line
169:install_target$abirefdir/build $(readlink -f $abirefdir/$targetdir)
Quoted 9 lines
If so we need to call readlink at line #161 as well as it does at line #171.
Quoted 2 lines
This way we don't need to add $(pwd).
If you don't prefer $(pwd), we can do it like this:
abirefdir=$(readlink -f ${DPDK_ABI_REF_DIR:- reference}/$DPDK_ABI_REF_VERSION)
I mostly wanted the code to be consistent and since readlink was already in the code I pointed that out. I think your last proposal is the best of the two worlds, but let's change the code everywhere (i.e. lines 170-174 as well).
Quoted 4 lines
Thanks,
Phil
PATCH v2 1/2 devtools: fix ninja install breakage under relative path
In reply to Phil YangAs the DESTDIR variable use as ninja's destination directory when invoking ninja install. If the DESTDIR is not an absolute path, ninja complains.
---
v2:
Use readlink to ensure consistent coding style. (Juraj)
v1:
Initial version.
devtools/test-meson-builds.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
devtools/test-meson-builds.sh +2 -1
@@ -143,7 +143,8 @@ build () # <directory> <target compiler | cross file> <meson options> config $srcdir $builds_dir/$targetdir $cross --werror $* compile $builds_dir/$targetdir if [ -n "$DPDK_ABI_REF_VERSION" ]; then - abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION + abirefdir=$(readlink -f \ + ${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION) if [ ! -d $abirefdir/$targetdir ]; then # clone current sources if [ ! -d $abirefdir/src ]; then
Signature · 1 line
2.7.4
PATCH v2 2/2 devtools: use absolute path for the build directory
The 'ninja install' needs absolute paths. Use the absolute path for the default build_dir to avoid repeatedly calling of readlink.
--- devtools/test-meson-builds.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
devtools/test-meson-builds.sh +4 -4
@@ -16,7 +16,7 @@ srcdir=$(dirname $(readlink -f $0))/.. MESON=${MESON:-meson} use_shared="--default-library=shared" -builds_dir=${DPDK_BUILD_TEST_DIR:-.} +builds_dir=$(readlink -f ${DPDK_BUILD_TEST_DIR:-.}) if command -v gmake >/dev/null 2>&1 ; then MAKE=gmake
@@ -168,11 +168,11 @@ build () # <directory> <target compiler | cross file> <meson options> fi install_target $builds_dir/$targetdir \ - $(readlink -f $builds_dir/$targetdir/install) + $builds_dir/$targetdir/install $srcdir/devtools/gen-abi.sh \ - $(readlink -f $builds_dir/$targetdir/install) + $builds_dir/$targetdir/install $srcdir/devtools/check-abi.sh $abirefdir/$targetdir \ - $(readlink -f $builds_dir/$targetdir/install) + $builds_dir/$targetdir/install fi }
Signature · 1 line
2.7.4
Re: [dpdk-dev] [PATCH v2 2/2] devtools: use absolute path for the build directory
Quoted 49 lines
-----Original Message-----
From: Phil Yang <[email protected]>
Sent: Wednesday, September 23, 2020 11:40 AM
To: [email protected]; [email protected]
Cc: Juraj Linkeš <[email protected]>; [email protected]; [email protected]; Bruce Richardson <[email protected]>
Subject: [PATCH v2 2/2] devtools: use absolute path for the build directoryThe 'ninja install' needs absolute paths. Use the absolute path for the default
build_dirto avoid repeatedly calling of readlink.Suggested-by Juraj Linkeš <[email protected]>Signed-off-by Phil Yang <[email protected]>--- devtools/test-meson-builds.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)devtools/test-meson-builds.sh index renamed from devtools/test-meson-builds.sh +0
-05236b9c..f43f715 100755
devtools/test-meson-builds.sh +1
-1@@ -16,7 +16,7 @@ srcdir=$(dirname $(readlink -f $0))/.. MESON=${MESON:-meson} use_shared="--default-library=shared" -builds_dir=${DPDK_BUILD_TEST_DIR:-.} +builds_dir=$(readlink -f ${DPDK_BUILD_TEST_DIR:-.}) if command -v gmake >/dev/null 2>&1 ; then MAKE=gmake@@ -168,11 +168,11 @@ build () # <directory> <target compiler | cross file><meson options>
devtools/test-meson-builds.sh +3
-4fi install_target $builds_dir/$targetdir \ - $(readlink -f $builds_dir/$targetdir/install) + $builds_dir/$targetdir/install $srcdir/devtools/gen-abi.sh \ - $(readlink -f $builds_dir/$targetdir/install) + $builds_dir/$targetdir/install $srcdir/devtools/check-abi.sh $abirefdir/$targetdir \ - $(readlink -f $builds_dir/$targetdir/install) + $builds_dir/$targetdir/install fi } --
Quoted 2 lines
2.7.4
Re: [dpdk-dev] [PATCH v2 1/2] devtools: fix ninja install breakage under relative path
In reply to Phil YangQuoted 46 lines
-----Original Message-----
From: Phil Yang <[email protected]>
Sent: Wednesday, September 23, 2020 11:40 AM
To: [email protected]; [email protected]
Cc: Juraj Linkeš <[email protected]>; [email protected]; [email protected]; [email protected]; Bruce Richardson <[email protected]>; Luca Boccassi <[email protected]>
Subject: [PATCH v2 1/2] devtools: fix ninja install breakage under relative pathAs the DESTDIR variable use as ninja's destination directory when invoking ninja install. If the DESTDIR is not an absolute path, ninja complains.
Fixes 777014e56d07 ("devtools: add ABI checks")Signed-off-by Phil Yang <[email protected]>---
v2:
Use readlink to ensure consistent coding style. (Juraj)v1:
Initial version.devtools/test-meson-builds.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)devtools/test-meson-builds.sh index renamed from devtools/test-meson-builds.sh +0
-0a87de63..5236b9c 100755
devtools/test-meson-builds.sh +0
-0@@ -143,7 +143,8 @@ build () # <directory> <target compiler | cross file><meson options>
devtools/test-meson-builds.sh +0
-1config $srcdir $builds_dir/$targetdir $cross --werror $* compile $builds_dir/$targetdir if [ -n "$DPDK_ABI_REF_VERSION" ]; then - abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION
devtools/test-meson-builds.sh +2
-0+ abirefdir=$(readlink -f \ + ${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION)
devtools/test-meson-builds.sh +0
-1if [ ! -d $abirefdir/$targetdir ]; then # clone current sources if [ ! -d $abirefdir/src ]; then --
Quoted 2 lines
2.7.4