diff --git a/.github/workflows/binary-static-analysis.yml b/.github/workflows/binary-static-analysis.yml index 0d3678e6..09b2130f 100644 --- a/.github/workflows/binary-static-analysis.yml +++ b/.github/workflows/binary-static-analysis.yml @@ -21,8 +21,6 @@ jobs: strategy: fail-fast: false - matrix: - python-version: [3.9] steps: - name: Checkout repository @@ -33,21 +31,25 @@ jobs: fetch-depth: 2 submodules: 'recursive' - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} + - name: Init Hermit + uses: cashapp/activate-hermit@v1 - - name: Display Python version + - name: Install Clang run: | - python -c "import sys; print(sys.version)" + sudo apt-get update + sudo apt install clang -y - - name: Install build dependencies + - name: Install python packages run: | - scripts/ubuntu_install_protobuf.sh + cd ${{ github.workspace }} + pip install --upgrade pip + pip install -r ./core/requirements.txt - name: Build subzero CORE run: | + cd ${{ github.workspace }} + export CC=`which clang` + export CXX=`which clang++` scripts/build_core.sh # Run binary static analysis diff --git a/.github/workflows/clang-static-analysis.yml b/.github/workflows/clang-static-analysis.yml index c7bf68ba..55849110 100644 --- a/.github/workflows/clang-static-analysis.yml +++ b/.github/workflows/clang-static-analysis.yml @@ -21,8 +21,6 @@ jobs: strategy: fail-fast: false - matrix: - python-version: [3.9] steps: - name: Checkout repository @@ -33,23 +31,27 @@ jobs: fetch-depth: 2 submodules: 'recursive' - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} + - name: Init Hermit + uses: cashapp/activate-hermit@v1 - - name: Display Python version + - name: Install clang and clang-tools run: | - python -c "import sys; print(sys.version)" + sudo apt-get update + sudo apt install clang clang-tools -y - - name: Install build dependencies - run: scripts/ubuntu_install_protobuf.sh + - name: Install python packages + run: | + cd ${{ github.workspace }} + pip install --upgrade pip + pip install -r ./core/requirements.txt - - name: Install clang tools + # Build CORE + - name: Build Subzero Core run: | - sudo apt-get update - sudo apt-get install clang-tools-14 -y - sudo ln -sf /usr/bin/clang-check-14 /usr/bin/clang-check + cd ${{ github.workspace }} + export CC=`which clang` + export CXX=`which clang++` + ./scripts/build_core.sh # Run static analysis - name: Run clang static analysis diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 01fb476a..1b5e01b3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -25,7 +25,7 @@ jobs: fail-fast: false matrix: language: ['cpp', 'java'] - python-version: [3.9] + python-version: [3.12] steps: - name: Checkout repository @@ -36,18 +36,21 @@ jobs: fetch-depth: 2 submodules: 'recursive' - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} + - name: Init Hermit + uses: cashapp/activate-hermit@v1 - - name: Display Python version + - if: ${{ matrix.language == 'cpp' }} + name: Install Clang run: | - python -c "import sys; print(sys.version)" + sudo apt-get update + sudo apt install clang -y - if: ${{ matrix.language == 'cpp' }} - name: Install dependencies - run: scripts/ubuntu_install_protobuf.sh + name: Install python packages + run: | + cd ${{ github.workspace }} + pip install --upgrade pip + pip install -r ./core/requirements.txt # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -67,7 +70,11 @@ jobs: # Use custom build process for C/C++ - if: ${{ matrix.language == 'cpp' }} name: Build Subzero Core (C/C++) - run: scripts/build_core.sh + run: | + cd ${{ github.workspace }} + export CC=`which clang` + export CXX=`which clang++` + ./scripts/build_core.sh - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/fuzzing-regression-test.yml b/.github/workflows/fuzzing-regression-test.yml index 6c93c2e6..942c0aff 100644 --- a/.github/workflows/fuzzing-regression-test.yml +++ b/.github/workflows/fuzzing-regression-test.yml @@ -21,8 +21,6 @@ jobs: strategy: fail-fast: false - matrix: - python-version: [3.9] steps: - name: Checkout repository @@ -33,30 +31,27 @@ jobs: fetch-depth: 2 submodules: 'recursive' - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} + - name: Init Hermit + uses: cashapp/activate-hermit@v1 - - name: Display Python version + - name: Install Clang run: | - python -c "import sys; print(sys.version)" - - - name: Install dependencies - run: scripts/ubuntu_install_protobuf.sh + sudo apt-get update + sudo apt install clang -y - - name: Setup Clang - uses: egor-tensin/setup-clang@v1.4 - with: - version: latest - platform: x64 + - name: Install python packages + run: | + cd ${{ github.workspace }} + pip install --upgrade pip + pip install -r ./core/requirements.txt # Build CORE with ASAN, UBSAN, and libfuzzer - name: Build Subzero Core (ASAN+UBSAN+FUZZER) run: | + cd ${{ github.workspace }} export CC=`which clang` export CXX=`which clang++` - scripts/build_core.sh -DENABLE_ASAN=ON -DENABLE_UBSAN=ON -DENABLE_FUZZER=ON + ./scripts/build_core.sh -DENABLE_ASAN=ON -DENABLE_UBSAN=ON -DENABLE_FUZZER=ON - name: Run Subzero CORE Fuzzing regression test run: | diff --git a/.github/workflows/java-test.yml b/.github/workflows/java-test.yml index 2a081e8b..235244a1 100644 --- a/.github/workflows/java-test.yml +++ b/.github/workflows/java-test.yml @@ -21,8 +21,6 @@ jobs: strategy: fail-fast: false - matrix: - python-version: [3.9] steps: - name: Checkout repository @@ -33,11 +31,11 @@ jobs: fetch-depth: 2 submodules: 'recursive' - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 + - name: Init Hermit + uses: cashapp/activate-hermit@v1 # Unit tests for Java - name: Run Unit tests run: | cd ${{ github.workspace }}/java - ./gradlew test --info + gradle test --info diff --git a/.github/workflows/signtx-test-asan.yml b/.github/workflows/signtx-test-asan.yml index c783e5f4..f9237066 100644 --- a/.github/workflows/signtx-test-asan.yml +++ b/.github/workflows/signtx-test-asan.yml @@ -21,8 +21,6 @@ jobs: strategy: fail-fast: false - matrix: - python-version: [3.9] steps: - name: Checkout repository @@ -33,30 +31,33 @@ jobs: fetch-depth: 2 submodules: 'recursive' - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Display Python version - run: | - python -c "import sys; print(sys.version)" - - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 - - - name: Install dependencies - run: scripts/ubuntu_install_protobuf.sh + - name: Init Hermit + uses: cashapp/activate-hermit@v1 # Build Java targets - name: Build Java run: | cd ${{ github.workspace }}/java - ./gradlew clean build --info + gradle build --info + + - name: Install Clang + run: | + sudo apt-get update + sudo apt install clang -y + + - name: Install python packages + run: | + cd ${{ github.workspace }} + pip install --upgrade pip + pip install -r ./core/requirements.txt # Build CORE with ASAN - name: Build Subzero Core with ASAN - run: scripts/build_core.sh -DENABLE_ASAN=ON + run: | + cd ${{ github.workspace }} + export CC=`which clang` + export CXX=`which clang++` + ./scripts/build_core.sh -DENABLE_ASAN=ON - name: Run Subzero CORE with ASAN run: | diff --git a/.github/workflows/signtx-test-msan.yml b/.github/workflows/signtx-test-msan.yml index 7f516ed2..0fe964da 100644 --- a/.github/workflows/signtx-test-msan.yml +++ b/.github/workflows/signtx-test-msan.yml @@ -21,8 +21,6 @@ jobs: strategy: fail-fast: false - matrix: - python-version: [3.9] steps: - name: Checkout repository @@ -33,39 +31,33 @@ jobs: fetch-depth: 2 submodules: 'recursive' - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Display Python version - run: | - python -c "import sys; print(sys.version)" - - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 - - - name: Install dependencies - run: scripts/ubuntu_install_protobuf.sh + - name: Init Hermit + uses: cashapp/activate-hermit@v1 # Build Java targets - name: Build Java run: | cd ${{ github.workspace }}/java - ./gradlew clean build --info + gradle build --info - - name: Setup Clang (for MSAN) - uses: egor-tensin/setup-clang@v1.4 - with: - version: latest - platform: x64 + - name: Install Clang + run: | + sudo apt-get update + sudo apt install clang -y + + - name: Install python packages + run: | + cd ${{ github.workspace }} + pip install --upgrade pip + pip install -r ./core/requirements.txt # Build CORE with MSAN - name: Build Subzero Core with MSAN run: | + cd ${{ github.workspace }} export CC=`which clang` export CXX=`which clang++` - scripts/build_core.sh -DENABLE_MSAN=ON + ./scripts/build_core.sh -DENABLE_MSAN=ON - name: Run Subzero CORE with MSAN run: | diff --git a/.github/workflows/signtx-test-ubsan.yml b/.github/workflows/signtx-test-ubsan.yml index 7f6df633..a5342007 100644 --- a/.github/workflows/signtx-test-ubsan.yml +++ b/.github/workflows/signtx-test-ubsan.yml @@ -21,8 +21,6 @@ jobs: strategy: fail-fast: false - matrix: - python-version: [3.9] steps: - name: Checkout repository @@ -33,30 +31,33 @@ jobs: fetch-depth: 2 submodules: 'recursive' - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Display Python version - run: | - python -c "import sys; print(sys.version)" - - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 - - - name: Install dependencies - run: scripts/ubuntu_install_protobuf.sh + - name: Init Hermit + uses: cashapp/activate-hermit@v1 # Build Java targets - name: Build Java run: | cd ${{ github.workspace }}/java - ./gradlew clean build --info + gradle build --info + + - name: Install Clang + run: | + sudo apt-get update + sudo apt install clang -y + + - name: Install python packages + run: | + cd ${{ github.workspace }} + pip install --upgrade pip + pip install -r ./core/requirements.txt # Build CORE with UBSAN - name: Build Subzero Core with UBSAN - run: scripts/build_core.sh -DENABLE_UBSAN=ON + run: | + cd ${{ github.workspace }} + export CC=`which clang` + export CXX=`which clang++` + scripts/build_core.sh -DENABLE_UBSAN=ON - name: Run Subzero CORE with UBSAN run: | diff --git a/.github/workflows/signtx-test.yml b/.github/workflows/signtx-test.yml index d5d4a898..91afe4af 100644 --- a/.github/workflows/signtx-test.yml +++ b/.github/workflows/signtx-test.yml @@ -21,8 +21,6 @@ jobs: strategy: fail-fast: false - matrix: - python-version: [3.9] steps: - name: Checkout repository @@ -33,30 +31,33 @@ jobs: fetch-depth: 2 submodules: 'recursive' - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Display Python version - run: | - python -c "import sys; print(sys.version)" - - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 - - - name: Install dependencies - run: scripts/ubuntu_install_protobuf.sh + - name: Init Hermit + uses: cashapp/activate-hermit@v1 # Build Java targets - name: Build Java run: | cd ${{ github.workspace }}/java - ./gradlew clean build --info + gradle build --info + + - name: Install Clang + run: | + sudo apt-get update + sudo apt install clang -y + + - name: Install python packages + run: | + cd ${{ github.workspace }} + pip install --upgrade pip + pip install -r ./core/requirements.txt # Build CORE - name: Build Subzero Core - run: scripts/build_core.sh + run: | + cd ${{ github.workspace }} + export CC=`which clang` + export CXX=`which clang++` + ./scripts/build_core.sh - name: Run Subzero CORE run: | diff --git a/.gitignore b/.gitignore index 76c14707..23585199 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ vendor/ .venv3 +.hermit/ diff --git a/bin/.cmake-3.30.5.pkg b/bin/.cmake-3.30.5.pkg new file mode 120000 index 00000000..383f4511 --- /dev/null +++ b/bin/.cmake-3.30.5.pkg @@ -0,0 +1 @@ +hermit \ No newline at end of file diff --git a/bin/.gradle-8.10.2.pkg b/bin/.gradle-8.10.2.pkg new file mode 120000 index 00000000..383f4511 --- /dev/null +++ b/bin/.gradle-8.10.2.pkg @@ -0,0 +1 @@ +hermit \ No newline at end of file diff --git a/bin/.make-4.4.pkg b/bin/.make-4.4.pkg new file mode 120000 index 00000000..383f4511 --- /dev/null +++ b/bin/.make-4.4.pkg @@ -0,0 +1 @@ +hermit \ No newline at end of file diff --git a/bin/.openjdk-21.0.3_9.pkg b/bin/.openjdk-21.0.3_9.pkg new file mode 120000 index 00000000..383f4511 --- /dev/null +++ b/bin/.openjdk-21.0.3_9.pkg @@ -0,0 +1 @@ +hermit \ No newline at end of file diff --git a/bin/.protoc-28.3.pkg b/bin/.protoc-28.3.pkg new file mode 120000 index 00000000..383f4511 --- /dev/null +++ b/bin/.protoc-28.3.pkg @@ -0,0 +1 @@ +hermit \ No newline at end of file diff --git a/bin/.python3-3.12.3.pkg b/bin/.python3-3.12.3.pkg new file mode 120000 index 00000000..383f4511 --- /dev/null +++ b/bin/.python3-3.12.3.pkg @@ -0,0 +1 @@ +hermit \ No newline at end of file diff --git a/bin/README.hermit.md b/bin/README.hermit.md new file mode 100644 index 00000000..e889550b --- /dev/null +++ b/bin/README.hermit.md @@ -0,0 +1,7 @@ +# Hermit environment + +This is a [Hermit](https://github.com/cashapp/hermit) bin directory. + +The symlinks in this directory are managed by Hermit and will automatically +download and install Hermit itself as well as packages. These packages are +local to this environment. diff --git a/bin/activate-hermit b/bin/activate-hermit new file mode 100755 index 00000000..fe28214d --- /dev/null +++ b/bin/activate-hermit @@ -0,0 +1,21 @@ +#!/bin/bash +# This file must be used with "source bin/activate-hermit" from bash or zsh. +# You cannot run it directly +# +# THIS FILE IS GENERATED; DO NOT MODIFY + +if [ "${BASH_SOURCE-}" = "$0" ]; then + echo "You must source this script: \$ source $0" >&2 + exit 33 +fi + +BIN_DIR="$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")" +if "${BIN_DIR}/hermit" noop > /dev/null; then + eval "$("${BIN_DIR}/hermit" activate "${BIN_DIR}/..")" + + if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ]; then + hash -r 2>/dev/null + fi + + echo "Hermit environment $("${HERMIT_ENV}"/bin/hermit env HERMIT_ENV) activated" +fi diff --git a/bin/ccmake b/bin/ccmake new file mode 120000 index 00000000..32691c80 --- /dev/null +++ b/bin/ccmake @@ -0,0 +1 @@ +.cmake-3.30.5.pkg \ No newline at end of file diff --git a/bin/cmake b/bin/cmake new file mode 120000 index 00000000..32691c80 --- /dev/null +++ b/bin/cmake @@ -0,0 +1 @@ +.cmake-3.30.5.pkg \ No newline at end of file diff --git a/bin/cmake-gui b/bin/cmake-gui new file mode 120000 index 00000000..32691c80 --- /dev/null +++ b/bin/cmake-gui @@ -0,0 +1 @@ +.cmake-3.30.5.pkg \ No newline at end of file diff --git a/bin/cpack b/bin/cpack new file mode 120000 index 00000000..32691c80 --- /dev/null +++ b/bin/cpack @@ -0,0 +1 @@ +.cmake-3.30.5.pkg \ No newline at end of file diff --git a/bin/ctest b/bin/ctest new file mode 120000 index 00000000..32691c80 --- /dev/null +++ b/bin/ctest @@ -0,0 +1 @@ +.cmake-3.30.5.pkg \ No newline at end of file diff --git a/bin/gradle b/bin/gradle new file mode 120000 index 00000000..72d776c1 --- /dev/null +++ b/bin/gradle @@ -0,0 +1 @@ +.gradle-8.10.2.pkg \ No newline at end of file diff --git a/bin/hermit b/bin/hermit new file mode 100755 index 00000000..7fef7692 --- /dev/null +++ b/bin/hermit @@ -0,0 +1,43 @@ +#!/bin/bash +# +# THIS FILE IS GENERATED; DO NOT MODIFY + +set -eo pipefail + +export HERMIT_USER_HOME=~ + +if [ -z "${HERMIT_STATE_DIR}" ]; then + case "$(uname -s)" in + Darwin) + export HERMIT_STATE_DIR="${HERMIT_USER_HOME}/Library/Caches/hermit" + ;; + Linux) + export HERMIT_STATE_DIR="${XDG_CACHE_HOME:-${HERMIT_USER_HOME}/.cache}/hermit" + ;; + esac +fi + +export HERMIT_DIST_URL="${HERMIT_DIST_URL:-https://github.com/cashapp/hermit/releases/download/stable}" +HERMIT_CHANNEL="$(basename "${HERMIT_DIST_URL}")" +export HERMIT_CHANNEL +export HERMIT_EXE=${HERMIT_EXE:-${HERMIT_STATE_DIR}/pkg/hermit@${HERMIT_CHANNEL}/hermit} + +if [ ! -x "${HERMIT_EXE}" ]; then + echo "Bootstrapping ${HERMIT_EXE} from ${HERMIT_DIST_URL}" 1>&2 + INSTALL_SCRIPT="$(mktemp)" + # This value must match that of the install script + INSTALL_SCRIPT_SHA256="180e997dd837f839a3072a5e2f558619b6d12555cd5452d3ab19d87720704e38" + if [ "${INSTALL_SCRIPT_SHA256}" = "BYPASS" ]; then + curl -fsSL "${HERMIT_DIST_URL}/install.sh" -o "${INSTALL_SCRIPT}" + else + # Install script is versioned by its sha256sum value + curl -fsSL "${HERMIT_DIST_URL}/install-${INSTALL_SCRIPT_SHA256}.sh" -o "${INSTALL_SCRIPT}" + # Verify install script's sha256sum + openssl dgst -sha256 "${INSTALL_SCRIPT}" | \ + awk -v EXPECTED="$INSTALL_SCRIPT_SHA256" \ + '$2!=EXPECTED {print "Install script sha256 " $2 " does not match " EXPECTED; exit 1}' + fi + /bin/bash "${INSTALL_SCRIPT}" 1>&2 +fi + +exec "${HERMIT_EXE}" --level=fatal exec "$0" -- "$@" diff --git a/bin/hermit.hcl b/bin/hermit.hcl new file mode 100644 index 00000000..081cbe83 --- /dev/null +++ b/bin/hermit.hcl @@ -0,0 +1,2 @@ +github-token-auth { +} diff --git a/bin/jar b/bin/jar new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jar @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jarsigner b/bin/jarsigner new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jarsigner @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/java b/bin/java new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/java @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/javac b/bin/javac new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/javac @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/javadoc b/bin/javadoc new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/javadoc @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/javap b/bin/javap new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/javap @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jcmd b/bin/jcmd new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jcmd @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jconsole b/bin/jconsole new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jconsole @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jdb b/bin/jdb new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jdb @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jdeprscan b/bin/jdeprscan new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jdeprscan @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jdeps b/bin/jdeps new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jdeps @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jfr b/bin/jfr new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jfr @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jhsdb b/bin/jhsdb new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jhsdb @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jimage b/bin/jimage new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jimage @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jinfo b/bin/jinfo new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jinfo @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jlink b/bin/jlink new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jlink @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jmap b/bin/jmap new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jmap @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jmod b/bin/jmod new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jmod @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jpackage b/bin/jpackage new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jpackage @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jps b/bin/jps new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jps @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jrunscript b/bin/jrunscript new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jrunscript @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jshell b/bin/jshell new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jshell @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jstack b/bin/jstack new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jstack @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jstat b/bin/jstat new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jstat @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jstatd b/bin/jstatd new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jstatd @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/jwebserver b/bin/jwebserver new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/jwebserver @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/keytool b/bin/keytool new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/keytool @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/make b/bin/make new file mode 120000 index 00000000..46c11963 --- /dev/null +++ b/bin/make @@ -0,0 +1 @@ +.make-4.4.pkg \ No newline at end of file diff --git a/bin/pip b/bin/pip new file mode 120000 index 00000000..0289f6d3 --- /dev/null +++ b/bin/pip @@ -0,0 +1 @@ +.python3-3.12.3.pkg \ No newline at end of file diff --git a/bin/pip3 b/bin/pip3 new file mode 120000 index 00000000..0289f6d3 --- /dev/null +++ b/bin/pip3 @@ -0,0 +1 @@ +.python3-3.12.3.pkg \ No newline at end of file diff --git a/bin/pip3.12 b/bin/pip3.12 new file mode 120000 index 00000000..0289f6d3 --- /dev/null +++ b/bin/pip3.12 @@ -0,0 +1 @@ +.python3-3.12.3.pkg \ No newline at end of file diff --git a/bin/protoc b/bin/protoc new file mode 120000 index 00000000..d1b99ff0 --- /dev/null +++ b/bin/protoc @@ -0,0 +1 @@ +.protoc-28.3.pkg \ No newline at end of file diff --git a/bin/pydoc3 b/bin/pydoc3 new file mode 120000 index 00000000..0289f6d3 --- /dev/null +++ b/bin/pydoc3 @@ -0,0 +1 @@ +.python3-3.12.3.pkg \ No newline at end of file diff --git a/bin/pydoc3.12 b/bin/pydoc3.12 new file mode 120000 index 00000000..0289f6d3 --- /dev/null +++ b/bin/pydoc3.12 @@ -0,0 +1 @@ +.python3-3.12.3.pkg \ No newline at end of file diff --git a/bin/python b/bin/python new file mode 120000 index 00000000..0289f6d3 --- /dev/null +++ b/bin/python @@ -0,0 +1 @@ +.python3-3.12.3.pkg \ No newline at end of file diff --git a/bin/python3 b/bin/python3 new file mode 120000 index 00000000..0289f6d3 --- /dev/null +++ b/bin/python3 @@ -0,0 +1 @@ +.python3-3.12.3.pkg \ No newline at end of file diff --git a/bin/python3-config b/bin/python3-config new file mode 120000 index 00000000..0289f6d3 --- /dev/null +++ b/bin/python3-config @@ -0,0 +1 @@ +.python3-3.12.3.pkg \ No newline at end of file diff --git a/bin/python3.12 b/bin/python3.12 new file mode 120000 index 00000000..0289f6d3 --- /dev/null +++ b/bin/python3.12 @@ -0,0 +1 @@ +.python3-3.12.3.pkg \ No newline at end of file diff --git a/bin/python3.12-config b/bin/python3.12-config new file mode 120000 index 00000000..0289f6d3 --- /dev/null +++ b/bin/python3.12-config @@ -0,0 +1 @@ +.python3-3.12.3.pkg \ No newline at end of file diff --git a/bin/rmiregistry b/bin/rmiregistry new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/rmiregistry @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/bin/serialver b/bin/serialver new file mode 120000 index 00000000..aafd4380 --- /dev/null +++ b/bin/serialver @@ -0,0 +1 @@ +.openjdk-21.0.3_9.pkg \ No newline at end of file diff --git a/core/README.md b/core/README.md index 8d06b413..1ef3c611 100644 --- a/core/README.md +++ b/core/README.md @@ -69,20 +69,34 @@ filesystem with the host. # Getting started (locally) +1. Install Hermit on your system following the instructions at [https://cashapp.github.io/hermit/](https://cashapp.github.io/hermit/). +2. Install clang using the standard installation method for your OS (google it if necessary). The clang package for hermit doesn't work properly so this is the only dependency that cannot be "hermit-ized". +3. Run the following commands: +``` git clone --recursive https://github.com/square/subzero.git - cd subzero/core + cd subzero + . bin/activate-hermit # not necessary if you enable hermit shell hooks + cd core mkdir build cd build CURRENCY=btc-testnet cmake ../ make ./subzero +``` # nCipher (without signed code) +1. Install hermit as instructed above +2. Make sure you have the proprietary ncipher libraries and cross-compiler (you need to get these from nCipher). See core/codesafe.cmake for some details. (TODO: document what versions of ncipher software are needed) +3. Run the following commands: +``` git clone --recursive https://github.com/square/subzero.git - cd subzero/core + cd subzero + . bin/activate-hermit # not necessary if you enable hermit shell hooks + cd core mkdir build cd build TARGET=nCipher CURRENCY=btc-testnet cmake ../ make make run +``` \ No newline at end of file diff --git a/core/requirements.txt b/core/requirements.txt new file mode 100644 index 00000000..c9c3cbfe --- /dev/null +++ b/core/requirements.txt @@ -0,0 +1,2 @@ +protobuf==5.28.3 +setuptools==75.3.0 diff --git a/core/trezor-crypto/CMakeLists.txt b/core/trezor-crypto/CMakeLists.txt index 5def9067..9ef6a923 100644 --- a/core/trezor-crypto/CMakeLists.txt +++ b/core/trezor-crypto/CMakeLists.txt @@ -28,7 +28,7 @@ target_include_directories(TrezorCrypto PUBLIC chacha20poly1305) target_include_directories(TrezorCrypto PUBLIC ed25519-donna) target_compile_options(TrezorCrypto PRIVATE "-std=c99") -add_definitions(-Wno-cast-qual -Wno-incompatible-pointer-types -Wno-missing-prototypes) +add_definitions(-Wno-cast-qual -Wno-incompatible-pointer-types -Wno-missing-prototypes -Wno-implicit-function-declaration) if(MSVC) set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) diff --git a/java/gradle/verification-metadata.xml b/java/gradle/verification-metadata.xml index c9b438f6..d2f084c1 100644 --- a/java/gradle/verification-metadata.xml +++ b/java/gradle/verification-metadata.xml @@ -62,11 +62,6 @@ - - - - - @@ -289,14 +284,6 @@ - - - - - - - - @@ -310,11 +297,6 @@ - - - - - @@ -378,9 +360,6 @@ - - - @@ -433,33 +412,12 @@ - - - - - - - - - - - - - - - - - - - - - @@ -542,11 +500,6 @@ - - - - - @@ -892,40 +845,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1058,14 +977,6 @@ - - - - - - - - @@ -1090,17 +1001,6 @@ - - - - - - - - - - - @@ -1109,76 +1009,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1485,11 +1320,24 @@ + + + + + + + + + + + + + @@ -1609,6 +1457,14 @@ + + + + + + + + @@ -1625,6 +1481,22 @@ + + + + + + + + + + + + + + + + @@ -1633,6 +1505,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -1641,6 +1537,14 @@ + + + + + + + + @@ -1649,6 +1553,14 @@ + + + + + + + + @@ -1657,6 +1569,14 @@ + + + + + + + + @@ -1665,6 +1585,14 @@ + + + + + + + + @@ -1673,6 +1601,22 @@ + + + + + + + + + + + + + + + + @@ -1684,6 +1628,17 @@ + + + + + + + + + + + @@ -1692,6 +1647,14 @@ + + + + + + + + @@ -1700,6 +1663,14 @@ + + + + + + + + @@ -1708,6 +1679,22 @@ + + + + + + + + + + + + + + + + @@ -1716,6 +1703,14 @@ + + + + + + + + @@ -1724,6 +1719,14 @@ + + + + + + + + @@ -1732,6 +1735,14 @@ + + + + + + + + @@ -1740,6 +1751,14 @@ + + + + + + + + @@ -1756,6 +1775,14 @@ + + + + + + + + @@ -1764,6 +1791,22 @@ + + + + + + + + + + + + + + + + @@ -1772,6 +1815,14 @@ + + + + + + + + @@ -1780,6 +1831,14 @@ + + + + + + + + @@ -1788,6 +1847,14 @@ + + + + + + + + @@ -1796,6 +1863,14 @@ + + + + + + + + @@ -1804,6 +1879,14 @@ + + + + + + + + @@ -1812,6 +1895,17 @@ + + + + + + + + + + + @@ -1844,6 +1938,14 @@ + + + + + + + + @@ -1852,6 +1954,14 @@ + + + + + + + + @@ -1860,6 +1970,14 @@ + + + + + + + + @@ -1921,27 +2039,6 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/java/gradle/wrapper/gradle-wrapper.jar b/java/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index c1962a79..00000000 Binary files a/java/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/java/gradle/wrapper/gradle-wrapper.properties b/java/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 37aef8d3..00000000 --- a/java/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip -networkTimeout=10000 -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/java/gradlew b/java/gradlew deleted file mode 100755 index aeb74cbb..00000000 --- a/java/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/java/gradlew.bat b/java/gradlew.bat deleted file mode 100644 index 6689b85b..00000000 --- a/java/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/scripts/ubuntu_install_protobuf.sh b/scripts/ubuntu_install_protobuf.sh deleted file mode 100755 index 191ec324..00000000 --- a/scripts/ubuntu_install_protobuf.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -set -euxo pipefail - -PROTO_VERSION="21.0" -PROTOC_ZIP="protoc-${PROTO_VERSION}-linux-x86_64.zip" -cd /tmp -sudo apt-get update -sudo apt-get install libtool curl make g++ unzip -y -curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTO_VERSION}/${PROTOC_ZIP} -sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc -sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*' -sudo chmod 755 /usr/local/bin/protoc -sudo chmod -R 755 /usr/local/include -# For debugging -protoc --version -python -m pip install --upgrade pip -python -m pip install protobuf==4.21.1