From 562bb6783a4f4dad39be98823992e4105b42bc87 Mon Sep 17 00:00:00 2001 From: Marek Fiala Date: Thu, 27 Jul 2023 16:08:52 +0200 Subject: [PATCH] feat(tools): Update ninja to v1.11.1 --- tools/idf_tools.py | 8 ++++++++ tools/tools.json | 26 +++++++++++++------------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/tools/idf_tools.py b/tools/idf_tools.py index 83a6ea1d00..89fa24397c 100755 --- a/tools/idf_tools.py +++ b/tools/idf_tools.py @@ -409,6 +409,14 @@ def unpack(filename, destination): # type: (str, str) -> None # https://bugs.python.org/issue17153 destination = str(destination) archive_obj.extractall(destination) + # ZipFile on Unix systems does not preserve file permissions while extracting it + # We need to reset the permissions afterward + if sys.platform != 'win32' and filename.endswith('zip') and isinstance(archive_obj, ZipFile): + for file_info in archive_obj.infolist(): + extracted_file = os.path.join(destination, file_info.filename) + extracted_permissions = file_info.external_attr >> 16 & 0o777 # Extract Unix permissions + if os.path.exists(extracted_file): + os.chmod(extracted_file, extracted_permissions) def splittype(url): # type: (str) -> Tuple[Optional[str], str] diff --git a/tools/tools.json b/tools/tools.json index ccf0562757..7e816b884c 100644 --- a/tools/tools.json +++ b/tools/tools.json @@ -674,26 +674,26 @@ "versions": [ { "linux-amd64": { - "sha256": "32bb769de4d57aa7ee0e292cfcb7553e7cc8ea0961f7aa2b3aee60aa407c4033", - "size": 106415, - "url": "https://dl.espressif.com/dl/ninja-1.10.2-linux64.tar.gz" + "sha256": "b901ba96e486dce377f9a070ed4ef3f79deb45f4ffe2938f8e7ddc69cfb3df77", + "size": 119463, + "url": "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip" }, "macos": { - "sha256": "847bb1ca4bc16d8dba6aeed3ecb5055498b86bc68c364c37583eb5738bb440f1", - "size": 240112, - "url": "https://dl.espressif.com/dl/ninja-1.10.2-osx.tar.gz" + "sha256": "482ecb23c59ae3d4f158029112de172dd96bb0e97549c4b1ca32d8fad11f873e", + "size": 277306, + "url": "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-mac.zip" }, "macos-arm64": { - "sha256": "847bb1ca4bc16d8dba6aeed3ecb5055498b86bc68c364c37583eb5738bb440f1", - "size": 240112, - "url": "https://dl.espressif.com/dl/ninja-1.10.2-osx.tar.gz" + "sha256": "482ecb23c59ae3d4f158029112de172dd96bb0e97549c4b1ca32d8fad11f873e", + "size": 277306, + "url": "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-mac.zip" }, - "name": "1.10.2", + "name": "1.11.1", "status": "recommended", "win64": { - "sha256": "bbde850d247d2737c5764c927d1071cbb1f1957dcabda4a130fa8547c12c695f", - "size": 262670, - "url": "https://dl.espressif.com/dl/ninja-1.10.2-win64.zip" + "sha256": "524b344a1a9a55005eaf868d991e090ab8ce07fa109f1820d40e74642e289abc", + "size": 285922, + "url": "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip" } } ]