From nobody Fri May 3 21:02:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+71863+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+71863+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1613785936; cv=none; d=zohomail.com; s=zohoarc; b=ehN1SkcE4cvKruz8FrHrmhvHUtZEPoJGe6xdHqjygXDIVciKqZr8B4GribZ7eAsaAAAdF0eJ1Ekq0sZ0XddLT5ACXJUbZipfjZPc9GzIWnIZpg3GWgvduKNdiLMts2dpQj2GJ8tmbWtse+JEt4WJYBwXgekS1m8U7OlbiaWdkvc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613785936; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=ZYDx4Xhxs52QRRejmUf7Rfn6xiLx9oVON8//BirVfho=; b=M15v2BX29A+/cAyDwS0ryfaUvNZjmlhBHrKKK9UCiDt9wljtoOoCOvJD2JIJtltG5P5CFb3YdA56Rl9WGY69lLoFven9H/XSbwNCHqA+VCxkhMnF/XklORD1nM6BM3U9MR8JDMs+RHX0lCWI2C8CsgtIakNZc212h1ccWAYz1fs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+71863+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1613785936502496.3103155113663; Fri, 19 Feb 2021 17:52:16 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id ZED4YY1788612xCamR72jA26; Fri, 19 Feb 2021 17:52:16 -0800 X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web08.1803.1613785929212115790 for ; Fri, 19 Feb 2021 17:52:10 -0800 X-Received: from localhost.localdomain ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Sat, 20 Feb 2021 09:52:03 +0800 X-WM-Sender: fengyunhua@byosoft.com.cn From: "fengyunhua" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen Subject: [edk2-devel] [PATCH v2] BaseTools: Fix BrotliCompress run issue on Linux Date: Sat, 20 Feb 2021 09:50:30 +0800 Message-Id: <20210220015030.1359-1-fengyunhua@byosoft.com.cn> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,fengyunhua@byosoft.com.cn X-Gm-Message-State: ruS8DrqSU8FEMP96nY74NXLzx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1613785936; bh=qKiq87cdEcSygW+pbTpuTO3VgtDDrJYD+vlmwvob0GQ=; h=Cc:Date:From:Reply-To:Subject:To; b=PyI5vPHndjQnqXDafyFtDtQyv4+DDq3ZHaIdbtaeXRUZfRCIWJRa7D8Q+SB+uiYYUyB NHubofH7CVFwiLAwRtIsW4bdyXtLcA3NBMEwu5KtPqCHoxHu0oFkHUBFN3OhLzcNzI5vc YQOeAXB413rF27qsamu8ZUGuLksudX7JeGU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3210 BrotliCompress changed, but not completely on Linux Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Signed-off-by: Yunhua Feng Reviewed-by: Liming Gao --- .../BinPipWrappers/PosixLike/BrotliCompress | 28 +++++++++++++++++- BaseTools/BinWrappers/PosixLike/Brotli | 29 ------------------- .../BinWrappers/PosixLike/BrotliCompress | 28 +++++++++++++++++- 3 files changed, 54 insertions(+), 31 deletions(-) delete mode 100755 BaseTools/BinWrappers/PosixLike/Brotli diff --git a/BaseTools/BinPipWrappers/PosixLike/BrotliCompress b/BaseTools/= BinPipWrappers/PosixLike/BrotliCompress index 663860bb3e..426f2a2ef1 100755 --- a/BaseTools/BinPipWrappers/PosixLike/BrotliCompress +++ b/BaseTools/BinPipWrappers/PosixLike/BrotliCompress @@ -8,6 +8,10 @@ QLT=3D"-q 9 -w 22" ARGS=3D =20 +full_cmd=3D${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028= for a discussion of why $0 is not a good choice here +dir=3D$(dirname "$full_cmd") +cmd=3D${full_cmd##*/} + while test $# -gt 0 do case $1 in @@ -31,4 +35,26 @@ do shift done =20 -exec Brotli $QLT $ARGS + +if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] +then + exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" +elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] +then + if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] + then + echo "BaseTools C Tool binary was not found ($cmd)" + echo "You may need to run:" + echo " make -C $EDK_TOOLS_PATH/Source/C" + else + exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" $QLT $ARGS + fi +elif [ -e "$dir/../../Source/C/bin/$cmd" ] +then + exec "$dir/../../Source/C/bin/$cmd" $QLT $ARGS +else + echo "Unable to find the real '$cmd' to run" + echo "This message was printed by" + echo " $0" + exit 127 +fi diff --git a/BaseTools/BinWrappers/PosixLike/Brotli b/BaseTools/BinWrappers= /PosixLike/Brotli deleted file mode 100755 index 0945d86d92..0000000000 --- a/BaseTools/BinWrappers/PosixLike/Brotli +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -full_cmd=3D${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028= for a discussion of why $0 is not a good choice here -dir=3D$(dirname "$full_cmd") -cmd=3D${full_cmd##*/} - -if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] -then - exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" -elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] -then - if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] - then - echo "BaseTools C Tool binary was not found ($cmd)" - echo "You may need to run:" - echo " make -C $EDK_TOOLS_PATH/Source/C" - else - exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" - fi -elif [ -e "$dir/../../Source/C/bin/$cmd" ] -then - exec "$dir/../../Source/C/bin/$cmd" "$@" -else - echo "Unable to find the real '$cmd' to run" - echo "This message was printed by" - echo " $0" - exit 127 -fi - diff --git a/BaseTools/BinWrappers/PosixLike/BrotliCompress b/BaseTools/Bin= Wrappers/PosixLike/BrotliCompress index 663860bb3e..426f2a2ef1 100755 --- a/BaseTools/BinWrappers/PosixLike/BrotliCompress +++ b/BaseTools/BinWrappers/PosixLike/BrotliCompress @@ -8,6 +8,10 @@ QLT=3D"-q 9 -w 22" ARGS=3D =20 +full_cmd=3D${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028= for a discussion of why $0 is not a good choice here +dir=3D$(dirname "$full_cmd") +cmd=3D${full_cmd##*/} + while test $# -gt 0 do case $1 in @@ -31,4 +35,26 @@ do shift done =20 -exec Brotli $QLT $ARGS + +if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] +then + exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" +elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] +then + if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] + then + echo "BaseTools C Tool binary was not found ($cmd)" + echo "You may need to run:" + echo " make -C $EDK_TOOLS_PATH/Source/C" + else + exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" $QLT $ARGS + fi +elif [ -e "$dir/../../Source/C/bin/$cmd" ] +then + exec "$dir/../../Source/C/bin/$cmd" $QLT $ARGS +else + echo "Unable to find the real '$cmd' to run" + echo "This message was printed by" + echo " $0" + exit 127 +fi --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#71863): https://edk2.groups.io/g/devel/message/71863 Mute This Topic: https://groups.io/mt/80771547/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-