From: OpenOCD-Gerrit <ope...@us...> - 2020-11-07 20:52:34
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 6dbfdcd00f190b79f24a7c231137fb5eea52bc95 (commit) via 2edcb065d45b7f0ee8adf260c792e0c2f3829a60 (commit) via 25e1c0f4c054eef25d1b9ad2507ee33faa05b345 (commit) from 990a01b70203a512b120e562dd991c29ee9201b2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6dbfdcd00f190b79f24a7c231137fb5eea52bc95 Author: Tarek BOCHKATI <tar...@gm...> Date: Mon Nov 2 16:31:27 2020 +0100 GitHub/WorkFlow: fix for CVE-2020-15228 According the CVE-2020-15228 documented in: - https://github.com/advisories/GHSA-mfwh-5m23-j46w - https://nvd.nist.gov/vuln/detail/CVE-2020-15228 the `set-env` commands will be disabled in the near future and should be replaced by: echo "FOO=BAR" >> $GITHUB_ENV idem for `add-path`, should be replaced by: echo "/path/to/add" >> $GITHUB_PATH Change-Id: I725c9ccd861a0d1580ac22491b6d716ec65973d1 Signed-off-by: Tarek BOCHKATI <tar...@gm...> Reviewed-on: http://openocd.zylin.com/5866 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 123ee66bd..e9a95ffb5 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -24,7 +24,7 @@ jobs: mkdir -p $DL_DIR && cd $DL_DIR wget "https://github.com/libusb/libusb/releases/download/v${LIBUSB1_VER}/libusb-${LIBUSB1_VER}.tar.bz2" tar -xjf libusb-${LIBUSB1_VER}.tar.bz2 - echo "::set-env name=LIBUSB1_SRC::$PWD/libusb-${LIBUSB1_VER}" + echo "LIBUSB1_SRC=$PWD/libusb-${LIBUSB1_VER}" >> $GITHUB_ENV - name: Prepare hidapi env: HIDAPI_VER: 0.9.0 @@ -34,7 +34,7 @@ jobs: tar -xzf hidapi-${HIDAPI_VER}.tar.gz cd hidapi-hidapi-${HIDAPI_VER} ./bootstrap - echo "::set-env name=HIDAPI_SRC::$PWD" + echo "HIDAPI_SRC=$PWD" >> $GITHUB_ENV - name: Prepare libftdi env: LIBFTDI_VER: 1.4 @@ -42,7 +42,7 @@ jobs: mkdir -p $DL_DIR && cd $DL_DIR wget "http://www.intra2net.com/en/developer/libftdi/download/libftdi1-${LIBFTDI_VER}.tar.bz2" tar -xjf libftdi1-${LIBFTDI_VER}.tar.bz2 - echo "::set-env name=LIBFTDI_SRC::$PWD/libftdi1-${LIBFTDI_VER}" + echo "LIBFTDI_SRC=$PWD/libftdi1-${LIBFTDI_VER}" >> $GITHUB_ENV - name: Prepare capstone env: CAPSTONE_VER: 4.0.2 @@ -78,8 +78,8 @@ jobs: # prepare the artifact ARTIFACT="openocd-${OPENOCD_TAG}-${HOST}.tar.gz" tar -czf $ARTIFACT * - echo "::set-env name=ARTIFACT_NAME::$ARTIFACT" - echo "::set-env name=ARTIFACT_PATH::$PWD/$ARTIFACT" + echo "ARTIFACT_NAME=$ARTIFACT" >> $GITHUB_ENV + echo "ARTIFACT_PATH=$PWD/$ARTIFACT" >> $GITHUB_ENV - name: Publish OpenOCD packaged for windows uses: actions/upload-artifact@v1 with: commit 2edcb065d45b7f0ee8adf260c792e0c2f3829a60 Author: Tarek BOCHKATI <tar...@gm...> Date: Mon Nov 2 12:58:15 2020 +0100 Github: add capstone in windows snapshots Change-Id: I402c18ff72de715ce4012bce3df72aaed7159d50 Signed-off-by: Tarek BOCHKATI <tar...@gm...> Reviewed-on: http://openocd.zylin.com/5915 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 2b73f9c8c..123ee66bd 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -43,6 +43,16 @@ jobs: wget "http://www.intra2net.com/en/developer/libftdi/download/libftdi1-${LIBFTDI_VER}.tar.bz2" tar -xjf libftdi1-${LIBFTDI_VER}.tar.bz2 echo "::set-env name=LIBFTDI_SRC::$PWD/libftdi1-${LIBFTDI_VER}" + - name: Prepare capstone + env: + CAPSTONE_VER: 4.0.2 + run: | + mkdir -p $DL_DIR && cd $DL_DIR + CAPSTONE_NAME=${CAPSTONE_VER} + CAPSTONE_FOLDER=capstone-${CAPSTONE_VER} + wget "https://github.com/aquynh/capstone/archive/${CAPSTONE_VER}.tar.gz" + tar -xzf ${CAPSTONE_VER}.tar.gz + echo "CAPSTONE_SRC=$PWD/capstone-${CAPSTONE_VER}" >> $GITHUB_ENV - name: Package OpenOCD for windows env: MAKE_JOBS: 2 @@ -50,6 +60,7 @@ jobs: LIBUSB1_CONFIG: --enable-shared --enable-static HIDAPI_CONFIG: --enable-shared --disable-static --disable-testgui LIBFTDI_CONFIG: "-DCMAKE_TOOLCHAIN_FILE='${{ env.LIBFTDI_SRC }}/cmake/Toolchain-i686-w64-mingw32.cmake' -DBUILD_TESTS:BOOL=off -DFTDIPP:BOOL=off -DPYTHON_BINDINGS:BOOL=off -DEXAMPLES:BOOL=off -DDOCUMENTATION:BOOL=off -DFTDI_EEPROM:BOOL=off" + CAPSTONE_CONFIG: "CAPSTONE_BUILD_CORE_ONLY=yes CAPSTONE_STATIC=yes CAPSTONE_SHARED=no" run: | # set snapshot tag OPENOCD_TAG="`git tag --points-at HEAD`" commit 25e1c0f4c054eef25d1b9ad2507ee33faa05b345 Author: Tarek BOCHKATI <tar...@gm...> Date: Mon Nov 2 16:12:11 2020 +0100 contrib/cross-build.sh: build capstone from source tested with capstone 4.0.2, with the following options CAPSTONE_CONFIG="CAPSTONE_ARCHS=arm,aarch64 CAPSTONE_BUILD_CORE_ONLY=yes CAPSTONE_STATIC=yes CAPSTONE_SHARED=no" Change-Id: I40297772664e85c3d0f9358c85bfd901b5eba8b1 Signed-off-by: Tarek BOCHKATI <tar...@gm...> Reviewed-on: http://openocd.zylin.com/5914 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/contrib/cross-build.sh b/contrib/cross-build.sh index 821d48ec7..8b31a3f00 100755 --- a/contrib/cross-build.sh +++ b/contrib/cross-build.sh @@ -14,8 +14,8 @@ # paths refer to the build file system. # # This script is probably more useful as a reference than as a complete build -# tool but for some configurations it may be usable as-is. It only cross- -# builds libusb-1.0, hidapi and libftdi from source, but the script can be +# tool but for some configurations it may be usable as-is. It only cross-builds +# libusb-1.0, hidapi, libftdi and capstone from source, but the script can be # extended to build other prerequisites in a similar manner. # # Usage: @@ -39,17 +39,20 @@ WORK_DIR=$PWD : ${LIBUSB1_SRC:=/path/to/libusb1} : ${HIDAPI_SRC:=/path/to/hidapi} : ${LIBFTDI_SRC:=/path/to/libftdi} +: ${CAPSTONE_SRC:=/path/to/capstone} OPENOCD_SRC=`readlink -m $OPENOCD_SRC` LIBUSB1_SRC=`readlink -m $LIBUSB1_SRC` HIDAPI_SRC=`readlink -m $HIDAPI_SRC` LIBFTDI_SRC=`readlink -m $LIBFTDI_SRC` +CAPSTONE_SRC=`readlink -m $CAPSTONE_SRC` HOST_TRIPLET=$1 BUILD_DIR=$WORK_DIR/$HOST_TRIPLET-build LIBUSB1_BUILD_DIR=$BUILD_DIR/libusb1 HIDAPI_BUILD_DIR=$BUILD_DIR/hidapi LIBFTDI_BUILD_DIR=$BUILD_DIR/libftdi +CAPSTONE_BUILD_DIR=$BUILD_DIR/capstone OPENOCD_BUILD_DIR=$BUILD_DIR/openocd ## Root of host file tree @@ -129,6 +132,26 @@ if [ -d $LIBFTDI_SRC ] ; then make install DESTDIR=$SYSROOT fi +# capstone build & install into sysroot +if [ -d $CAPSTONE_SRC ] ; then + mkdir -p $CAPSTONE_BUILD_DIR + cd $CAPSTONE_BUILD_DIR + cp -r $CAPSTONE_SRC/* . + make install DESTDIR=$SYSROOT PREFIX=$PREFIX \ + CROSS="${HOST_TRIPLET}-" \ + $CAPSTONE_CONFIG + # fix the generated capstone.pc + CAPSTONE_PC_FILE=${SYSROOT}${PREFIX}/lib/pkgconfig/capstone.pc + sed -i '/^libdir=/d' $CAPSTONE_PC_FILE + sed -i '/^includedir=/d' $CAPSTONE_PC_FILE + sed -i '/^archive=/d' $CAPSTONE_PC_FILE + sed -i '1s;^;prefix=/usr \ +exec_prefix=${prefix} \ +libdir=${exec_prefix}/lib \ +includedir=${prefix}/include\n\n;' $CAPSTONE_PC_FILE +fi + + # OpenOCD build & install into sysroot mkdir -p $OPENOCD_BUILD_DIR cd $OPENOCD_BUILD_DIR ----------------------------------------------------------------------- Summary of changes: .github/workflows/snapshot.yml | 21 ++++++++++++++++----- contrib/cross-build.sh | 27 +++++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 7 deletions(-) hooks/post-receive -- Main OpenOCD repository |