[incubator-teaclave] branch master updated: Fix docker files.

2023-04-23 Thread hsun
This is an automated email from the ASF dual-hosted git repository.

hsun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave.git


The following commit(s) were added to refs/heads/master by this push:
 new e2c6e317 Fix docker files.
e2c6e317 is described below

commit e2c6e317946ebb711715432150d141937b0c8828
Author: Kousuke Saruta 
AuthorDate: Sun Apr 23 00:02:22 2023 +0900

Fix docker files.
---
 docker/build.ubuntu-1804-sgx-2.17.1.Dockerfile| 2 +-
 docker/build.ubuntu-1804-sgx-dcap-1.14.Dockerfile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docker/build.ubuntu-1804-sgx-2.17.1.Dockerfile 
b/docker/build.ubuntu-1804-sgx-2.17.1.Dockerfile
index d0ac1879..e35c907f 100644
--- a/docker/build.ubuntu-1804-sgx-2.17.1.Dockerfile
+++ b/docker/build.ubuntu-1804-sgx-2.17.1.Dockerfile
@@ -101,7 +101,7 @@ RUN apt-get update && apt-get install -q -y \
 libjpeg-dev \
 zlib1g-dev
 
-RUN pip3 install pyopenssl==21.0.0 toml cryptography yapf requests Pillow
+RUN pip3 install pyopenssl==21.0.0 toml cryptography yapf requests Pillow tomli
 
 # install TVM dependencies
 RUN apt-get install -q -y \
diff --git a/docker/build.ubuntu-1804-sgx-dcap-1.14.Dockerfile 
b/docker/build.ubuntu-1804-sgx-dcap-1.14.Dockerfile
index 41f11ca4..7c69e101 100644
--- a/docker/build.ubuntu-1804-sgx-dcap-1.14.Dockerfile
+++ b/docker/build.ubuntu-1804-sgx-dcap-1.14.Dockerfile
@@ -109,7 +109,7 @@ RUN apt-get update && apt-get install -q -y \
 libjpeg-dev \
 zlib1g-dev
 
-RUN pip3 install pyopenssl==21.0.0 toml cryptography yapf requests Pillow
+RUN pip3 install pyopenssl==21.0.0 toml cryptography yapf requests Pillow tomli
 
 # install TVM dependencies
 RUN apt-get install -q -y \


-
To unsubscribe, e-mail: commits-unsubscr...@teaclave.apache.org
For additional commands, e-mail: commits-h...@teaclave.apache.org



[incubator-teaclave] branch master updated: Fix deploy instruction for Azure to comply with SGX 2.17.

2023-04-23 Thread hsun
This is an automated email from the ASF dual-hosted git repository.

hsun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave.git


The following commit(s) were added to refs/heads/master by this push:
 new 4e15ab62 Fix deploy instruction for Azure to comply with SGX 2.17.
4e15ab62 is described below

commit 4e15ab62d94a9f9c9daaa21e48b890eb971b2ea8
Author: Kousuke Saruta 
AuthorDate: Sun Apr 23 09:35:49 2023 +

Fix deploy instruction for Azure to comply with SGX 2.17.
---
 docs/azure-confidential-computing.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/azure-confidential-computing.md 
b/docs/azure-confidential-computing.md
index bcb45d11..1fcf3fec 100644
--- a/docs/azure-confidential-computing.md
+++ b/docs/azure-confidential-computing.md
@@ -52,10 +52,11 @@ Build Teaclave.
 $ git clone https://github.com/apache/incubator-teaclave.git
 $ cd incubator-teaclave
 $ docker run --rm -v $(pwd):/teaclave -w /teaclave \
-  -it teaclave/teaclave-build-ubuntu-1804-sgx-2.14:latest \
+  -it teaclave/teaclave-build-ubuntu-1804-sgx-2.17.1:0.1.0 \
bash -c ". /root/.cargo/env && \
  . /opt/sgxsdk/environment && \
  mkdir -p build && cd build && \
+ git config --global --add safe.directory /teaclave && \
  cmake -DTEST_MODE=ON .. && \
  make"
 


-
To unsubscribe, e-mail: commits-unsubscr...@teaclave.apache.org
For additional commands, e-mail: commits-h...@teaclave.apache.org



[incubator-teaclave-sgx-sdk] branch henrysun007-remove-gpl created (now 5f51dd1f)

2023-04-23 Thread hsun
This is an automated email from the ASF dual-hosted git repository.

hsun pushed a change to branch henrysun007-remove-gpl
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git


  at 5f51dd1f Remove a GPL licensed file

This branch includes the following new commits:

 new 5f51dd1f Remove a GPL licensed file

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



-
To unsubscribe, e-mail: commits-unsubscr...@teaclave.apache.org
For additional commands, e-mail: commits-h...@teaclave.apache.org



[incubator-teaclave-sgx-sdk] 01/01: Remove a GPL licensed file

2023-04-23 Thread hsun
This is an automated email from the ASF dual-hosted git repository.

hsun pushed a commit to branch henrysun007-remove-gpl
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git

commit 5f51dd1f8d10aadd22beb72a238ef88063b2e967
Author: He Sun 
AuthorDate: Mon Apr 24 10:56:00 2023 +0800

Remove a GPL licensed file
---
 .../sgx_backtrace_sys/libbacktrace/move-if-change  | 83 --
 1 file changed, 83 deletions(-)

diff --git a/sgx_backtrace/sgx_backtrace_sys/libbacktrace/move-if-change 
b/sgx_backtrace/sgx_backtrace_sys/libbacktrace/move-if-change
deleted file mode 100644
index 88d95745..
--- a/sgx_backtrace/sgx_backtrace_sys/libbacktrace/move-if-change
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/sh
-# Like mv $1 $2, but if the files are the same, just delete $1.
-# Status is zero if successful, nonzero otherwise.
-
-VERSION='2012-01-06 07:23'; # UTC
-# The definition above must lie within the first 8 lines in order
-# for the Emacs time-stamp write hook (at end) to update it.
-# If you change this file with Emacs, please let the write hook
-# do its job.  Otherwise, update this string manually.
-
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see .
-
-usage="usage: $0 SOURCE DEST"
-
-help="$usage
-  or:  $0 OPTION
-If SOURCE is different than DEST, then move it to DEST; else remove SOURCE.
-
-  --help display this help and exit
-  --version  output version information and exit
-
-The variable CMPPROG can be used to specify an alternative to 'cmp'.
-
-Report bugs to ."
-
-version=`expr "$VERSION" : '\([^ ]*\)'`
-version="move-if-change (gnulib) $version
-Copyright (C) 2011 Free Software Foundation, Inc.
-License GPLv3+: GNU GPL version 3 or later 
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law."
-
-cmpprog=${CMPPROG-cmp}
-
-for arg
-do
-  case $arg in
---help | --hel | --he | --h)
-  exec echo "$help" ;;
---version | --versio | --versi | --vers | --ver | --ve | --v)
-  exec echo "$version" ;;
---)
-  shift
-  break ;;
--*)
-  echo "$0: invalid option: $arg" >&2
-  exit 1 ;;
-*)
-  break ;;
-  esac
-done
-
-test $# -eq 2 || { echo "$0: $usage" >&2; exit 1; }
-
-if test -r "$2" && $cmpprog -- "$1" "$2" >/dev/null; then
-  rm -f -- "$1"
-else
-  if mv -f -- "$1" "$2"; then :; else
-# Ignore failure due to a concurrent move-if-change.
-test -r "$2" && $cmpprog -- "$1" "$2" >/dev/null && rm -f -- "$1"
-  fi
-fi
-
-## Local Variables:
-## eval: (add-hook 'write-file-hooks 'time-stamp)
-## time-stamp-start: "VERSION='"
-## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
-## time-stamp-time-zone: "UTC"
-## time-stamp-end: "'; # UTC"
-## End:


-
To unsubscribe, e-mail: commits-unsubscr...@teaclave.apache.org
For additional commands, e-mail: commits-h...@teaclave.apache.org



[incubator-teaclave-trustzone-sdk] branch master updated (7a7d847 -> 61b22c5)

2023-04-23 Thread yuanz
This is an automated email from the ASF dual-hosted git repository.

yuanz pushed a change to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git


from 7a7d847  optee-teec: update OP-TEE implementation fields (#108)
 new e8d4da8  Make .gitignore more concise and precise
 new 61b22c5  Remove Cargo.lock for optee-utee and optee-teec

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore   |  12 +-
 optee-teec/Cargo.lock| 505 --
 optee-utee/Cargo.lock| 510 ---
 optee-utee/optee-utee-sys/Cargo.lock |  13 -
 4 files changed, 7 insertions(+), 1033 deletions(-)
 delete mode 100644 optee-teec/Cargo.lock
 delete mode 100644 optee-utee/Cargo.lock
 delete mode 100644 optee-utee/optee-utee-sys/Cargo.lock


-
To unsubscribe, e-mail: commits-unsubscr...@teaclave.apache.org
For additional commands, e-mail: commits-h...@teaclave.apache.org



[incubator-teaclave-trustzone-sdk] 01/02: Make .gitignore more concise and precise

2023-04-23 Thread yuanz
This is an automated email from the ASF dual-hosted git repository.

yuanz pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git

commit e8d4da860e99413caff18010ee8a46045c3425dd
Author: Thomas Hebb 
AuthorDate: Thu Apr 20 12:06:46 2023 -0400

Make .gitignore more concise and precise

Several of the patterns match files when they should only match
directories, match anywhere in the repo when they should only match at
the root, start with an unneeded `**/`, or a combination of all three.
Fix all such issues as per the .gitignore documentation[1].

[1] https://git-scm.com/docs/gitignore
---
 .gitignore | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/.gitignore b/.gitignore
index a7deff0..2ad8a27 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,9 +15,9 @@
 # specific language governing permissions and limitations
 # under the License.
 
-examples/**/proto/Cargo.lock
-**/*.rs.bk
+/examples/**/proto/Cargo.lock
+*.rs.bk
 .user_ta_header.o.d
-**/target
-optee/toolchains
-out
+target/
+/optee/toolchains
+/out


-
To unsubscribe, e-mail: commits-unsubscr...@teaclave.apache.org
For additional commands, e-mail: commits-h...@teaclave.apache.org



[incubator-teaclave-trustzone-sdk] 02/02: Remove Cargo.lock for optee-utee and optee-teec

2023-04-23 Thread yuanz
This is an automated email from the ASF dual-hosted git repository.

yuanz pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git

commit 61b22c5c15bfe88ecf0841c836ab70aefefb1592
Author: Thomas Hebb 
AuthorDate: Thu Apr 20 11:33:57 2023 -0400

Remove Cargo.lock for optee-utee and optee-teec

As per Cargo's documentation[1], only binary crates should check in
Cargo.lock. Library crates should not, since dependents will do their
own version resolution anyway.

This mostly reverts commit 0438ca956b39 ("Add Cargo.lock for optee-utee
and optee-teec").

[1] https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
---
 .gitignore   |   2 +
 optee-teec/Cargo.lock| 505 --
 optee-utee/Cargo.lock| 510 ---
 optee-utee/optee-utee-sys/Cargo.lock |  13 -
 4 files changed, 2 insertions(+), 1028 deletions(-)

diff --git a/.gitignore b/.gitignore
index 2ad8a27..9a36fc3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
+/optee-utee/Cargo.lock
+/optee-teec/Cargo.lock
 /examples/**/proto/Cargo.lock
 *.rs.bk
 .user_ta_header.o.d
diff --git a/optee-teec/Cargo.lock b/optee-teec/Cargo.lock
deleted file mode 100644
index 1e3c757..000
--- a/optee-teec/Cargo.lock
+++ /dev/null
@@ -1,505 +0,0 @@
-# This file is automatically @generated by Cargo.
-# It is not intended for manual editing.
-[[package]]
-name = "autocfg"
-version = "0.1.7"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-
-[[package]]
-name = "autocfg"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-
-[[package]]
-name = "bitflags"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-
-[[package]]
-name = "bitflags"
-version = "1.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-
-[[package]]
-name = "cc"
-version = "1.0.69"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-
-[[package]]
-name = "cfg-if"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-
-[[package]]
-name = "cloudabi"
-version = "0.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-dependencies = [
- "bitflags 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "ctest"
-version = "0.2.22"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-dependencies = [
- "cc 1.0.69 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "syntex_syntax2 0.0.2 
(registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "extprim"
-version = "1.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-dependencies = [
- "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.127 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "fuchsia-cprng"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-
-[[package]]
-name = "hex"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-
-[[package]]
-name = "itoa"
-version = "0.4.7"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-
-[[package]]
-name = "kernel32-sys"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-dependencies = [
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "libc"
-version = "0.2.99"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-
-[[package]]
-name = "log"
-version = "0.3.9"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-dependencies = [
- "log 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "log"
-version = "0.4.14"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-dependencies = [
- "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "num-traits"
-version = "0.2.14"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-dependencies = [
- "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "optee-teec"
-version = "0.1.0"
-dependencies = [
- "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.

[incubator-teaclave-trustzone-sdk] branch master updated (61b22c5 -> b2fbfb0)

2023-04-23 Thread yuanz
This is an automated email from the ASF dual-hosted git repository.

yuanz pushed a change to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git


from 61b22c5  Remove Cargo.lock for optee-utee and optee-teec
 new 5198497  setup.sh: fix up whitespace
 new 5147b27  setup.sh: quote variable expansions
 new 5684033  setup.sh: function from any working directory
 new e70763f  CI: use home directory workaround for tests too
 new a2b7bb0  Rework rustup/toolchain installation
 new b2fbfb0  CI: don't do things setup.sh does for us

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/ci.yml| 11 ++--
 .licenserc.yaml |  1 -
 rust-toolchain  |  1 -
 examples/aes-rs/Makefile => rust-toolchain.toml | 11 ++--
 setup.sh| 70 +++--
 5 files changed, 51 insertions(+), 43 deletions(-)
 delete mode 100644 rust-toolchain
 copy examples/aes-rs/Makefile => rust-toolchain.toml (82%)


-
To unsubscribe, e-mail: commits-unsubscr...@teaclave.apache.org
For additional commands, e-mail: commits-h...@teaclave.apache.org



[incubator-teaclave-trustzone-sdk] 03/06: setup.sh: function from any working directory

2023-04-23 Thread yuanz
This is an automated email from the ASF dual-hosted git repository.

yuanz pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git

commit 56840333edbb1f027e547689d3be97a493c8b759
Author: Thomas Hebb 
AuthorDate: Fri Apr 21 14:53:03 2023 -0400

setup.sh: function from any working directory

All the commands in this script assume they're run from the project
root, but we don't enforce that. Fix it by changing to the script's
directory before doing anything else.
---
 setup.sh | 4 
 1 file changed, 4 insertions(+)

diff --git a/setup.sh b/setup.sh
index ff3265e..4f8586a 100755
--- a/setup.sh
+++ b/setup.sh
@@ -19,6 +19,10 @@
 
 set -xe
 
+##
+# move to project root
+cd "$(dirname "$0")"
+
 ##
 # install Rust and select a proper version
 curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 
nightly-2021-09-20


-
To unsubscribe, e-mail: commits-unsubscr...@teaclave.apache.org
For additional commands, e-mail: commits-h...@teaclave.apache.org



[incubator-teaclave-trustzone-sdk] 06/06: CI: don't do things setup.sh does for us

2023-04-23 Thread yuanz
This is an automated email from the ASF dual-hosted git repository.

yuanz pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git

commit b2fbfb008d426349c5ad31bac4857174522dd89c
Author: Thomas Hebb 
AuthorDate: Fri Apr 21 15:44:57 2023 -0400

CI: don't do things setup.sh does for us
---
 .github/workflows/ci.yml | 6 --
 1 file changed, 6 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a4f02ed..04f21b5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -43,9 +43,6 @@ jobs:
 #  source environment &&
 #  make optee &&
 #  . ~/.cargo/env &&
-#  rustup component add rust-src &&
-#  rustup target install aarch64-unknown-linux-gnu 
arm-unknown-linux-gnueabihf &&
-#  rustup default nightly-2021-09-20 &&
 #  make examples
 #  - name: Run tests and examples
 #run: |
@@ -70,9 +67,6 @@ jobs:
   source environment &&
   make optee &&
   . ~/.cargo/env &&
-  rustup component add rust-src &&
-  rustup target install aarch64-unknown-linux-gnu 
arm-unknown-linux-gnueabihf &&
-  rustup default nightly-2021-09-20 &&
   (cd optee-utee && xargo build --target 
aarch64-unknown-optee-trustzone -vv) &&
   (cd optee-teec && cargo build --target aarch64-unknown-linux-gnu -vv)
   build-and-run-examples-in-OPTEE-repo:


-
To unsubscribe, e-mail: commits-unsubscr...@teaclave.apache.org
For additional commands, e-mail: commits-h...@teaclave.apache.org



[incubator-teaclave-trustzone-sdk] 01/06: setup.sh: fix up whitespace

2023-04-23 Thread yuanz
This is an automated email from the ASF dual-hosted git repository.

yuanz pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git

commit 519849766768109ac4a5240cf3848873693c6c45
Author: Thomas Hebb 
AuthorDate: Fri Apr 21 15:20:49 2023 -0400

setup.sh: fix up whitespace
---
 setup.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/setup.sh b/setup.sh
index 9ea2408..e0b2547 100755
--- a/setup.sh
+++ b/setup.sh
@@ -65,13 +65,13 @@ then
mkdir -p $OPTEE_DIR/$submodule && \
tar zxf $OPTEE_DIR/$OPTEE_RELEASE_VERSION.tar.gz \
-C $OPTEE_DIR/$submodule --strip-components 1
-   if [ ! $? -eq 0 ]
+   if [ ! $? -eq 0 ]
then
rm $OPTEE_DIR/$OPTEE_RELEASE_VERSION.tar.gz && \
rm -r $OPTEE_DIR/$submodule && \
echo "Downloaded file is damaged" && \
exit 1
-   fi
+   fi
rm $OPTEE_DIR/$OPTEE_RELEASE_VERSION.tar.gz
done
echo "Download finished"
@@ -88,7 +88,7 @@ LIBC_COMMIT_ID=1ddfbbbc190bec0f5ec32b08e97585b34d0c6b09
 
 if [ -d rust/ ]
 then
-rm -r rust/
+   rm -r rust/
 fi
 
 mkdir rust && cd rust


-
To unsubscribe, e-mail: commits-unsubscr...@teaclave.apache.org
For additional commands, e-mail: commits-h...@teaclave.apache.org



[incubator-teaclave-trustzone-sdk] 04/06: CI: use home directory workaround for tests too

2023-04-23 Thread yuanz
This is an automated email from the ASF dual-hosted git repository.

yuanz pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git

commit e70763f1f48dd5d28c3e9953eda5195c362cf338
Author: Thomas Hebb 
AuthorDate: Fri Apr 21 18:55:29 2023 -0400

CI: use home directory workaround for tests too

I'm not entirely sure why this step is needed, but I'm guessing it's a
result of actions/runner#863 clashing with the Docker container we build
in[1]. The "build-utee-teec" job already does this; this commit just
copies it over to the "build-and-run-examples-in-OPTEE-repo" job.

Without the step, the container's preinstalled rustup fails to work
properly. We'll soon be using the preinstalled version of rustup if it's
present, so we need this fix to keep the job passing.

[1] https://hub.docker.com/r/teaclave/teaclave-trustzone-sdk-build
---
 .github/workflows/ci.yml | 5 +
 1 file changed, 5 insertions(+)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 20191fc..a4f02ed 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -92,6 +92,11 @@ jobs:
   mkdir -p ~/optee-qemuv8 && cd ~/optee-qemuv8 &&
   repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml &&
   repo sync -j4 --no-clone-bundle
+  - name: Setting up $HOME
+run: |
+  cp /root/.bashrc $HOME/.bashrc &&
+  ln -sf /root/.rustup ~/.rustup &&
+  ln -sf /root/.cargo ~/.cargo
   - name: Build images and run tests
 run: |
   apt update && apt install libslirp-dev -y


-
To unsubscribe, e-mail: commits-unsubscr...@teaclave.apache.org
For additional commands, e-mail: commits-h...@teaclave.apache.org



[incubator-teaclave-trustzone-sdk] 05/06: Rework rustup/toolchain installation

2023-04-23 Thread yuanz
This is an automated email from the ASF dual-hosted git repository.

yuanz pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git

commit a2b7bb078e14da856b382bdcbe6dcd8590032331
Author: Thomas Hebb 
AuthorDate: Fri Apr 21 15:32:33 2023 -0400

Rework rustup/toolchain installation

Migrate "rust-toolchain", which sets a rustup toolchain override for the
directory, to the newer "rust-toolchain.toml" format[1] and rewrite the
toolchain-related logic in setup.sh. This has several benefits:

 - If the user already has rustup installed, we won't run the
   installation script again. That prevents us from messing with
   environments that set the rustup $PATH in a non-default way.
 - We no longer change rustup's system-wide default toolchain, which
   similarly prevents us from messing with the user's environment.
 - Thanks to the expanded capabilities of rust-toolchain.toml, users who
   build without first running "setup.sh" will get the components and
   targets they need in addition to the toolchain itself.
 - We now have a single source of truth for our preferred toolchain.
   setup.sh now just installs whatever's in rust-toolchain.toml instead
   of hardcoding a toolchain name.

[1] https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file
---
 .licenserc.yaml|  1 -
 rust-toolchain |  1 -
 .licenserc.yaml => rust-toolchain.toml | 24 +---
 setup.sh   | 22 +++---
 4 files changed, 20 insertions(+), 28 deletions(-)

diff --git a/.licenserc.yaml b/.licenserc.yaml
index ccce5cc..c65f735 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -26,7 +26,6 @@ header:
 - '**/*.md'
 - 'LICENSE'
 - 'NOTICE'
-- 'rust-toolchain'
 - '**/Cargo.lock'
 - '**/*.lds'
 - 'aarch64-unknown-optee-trustzone.json'
diff --git a/rust-toolchain b/rust-toolchain
deleted file mode 100644
index 513fbad..000
--- a/rust-toolchain
+++ /dev/null
@@ -1 +0,0 @@
-nightly-2021-09-20
diff --git a/.licenserc.yaml b/rust-toolchain.toml
similarity index 64%
copy from .licenserc.yaml
copy to rust-toolchain.toml
index ccce5cc..d482968 100644
--- a/.licenserc.yaml
+++ b/rust-toolchain.toml
@@ -15,23 +15,9 @@
 # specific language governing permissions and limitations
 # under the License.
 
-header:
-  license:
-spdx-id: Apache-2.0
-copyright-owner: Apache Software Foundation
+# Toolchain override for rustup
 
-  paths-ignore:
-- 'dist'
-- 'licenses'
-- '**/*.md'
-- 'LICENSE'
-- 'NOTICE'
-- 'rust-toolchain'
-- '**/Cargo.lock'
-- '**/*.lds'
-- 'aarch64-unknown-optee-trustzone.json'
-- 'arm-unknown-optee-trustzone.json'
-- 'KEYS'
-- 'DISCLAIMER-WIP'
-- '.gitmodules'
-- 'examples/tls_server-rs/ta/test-ca/**'
+[toolchain]
+channel = "nightly-2021-09-20"
+components = ["rust-src"]
+targets = ["aarch64-unknown-linux-gnu", "arm-unknown-linux-gnueabihf"]
diff --git a/setup.sh b/setup.sh
index 4f8586a..50030b9 100755
--- a/setup.sh
+++ b/setup.sh
@@ -24,15 +24,23 @@ set -xe
 cd "$(dirname "$0")"
 
 ##
-# install Rust and select a proper version
-curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 
nightly-2021-09-20
-source $HOME/.cargo/env
-rustup component add rust-src && rustup target install 
aarch64-unknown-linux-gnu arm-unknown-linux-gnueabihf
+# install rustup and stable Rust if needed
+if command -v rustup &>/dev/null ; then
+   rustup install stable
+else
+   curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
+   source "$HOME/.cargo/env"
+fi
+
+# Ensure the toolchain, components, and targets we've specified in
+# rust-toolchain.toml are ready to go. Since that file sets rustup's default
+# toolchain for the entire directory, all we need to do is run any
+# rustup-wrapped command to trigger installation. We've arbitrarily chosen
+# "cargo --version" since it has no other effect.
+cargo --version >/dev/null
 
 # install Xargo
-rustup default 1.56.0 && cargo +1.56.0 install xargo
-# switch to nightly
-rustup default nightly-2021-09-20
+cargo +stable install xargo
 
 
 # initialize submodules: optee_os / optee_client / build


-
To unsubscribe, e-mail: commits-unsubscr...@teaclave.apache.org
For additional commands, e-mail: commits-h...@teaclave.apache.org



[incubator-teaclave-trustzone-sdk] 02/06: setup.sh: quote variable expansions

2023-04-23 Thread yuanz
This is an automated email from the ASF dual-hosted git repository.

yuanz pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git

commit 5147b278c411af5a5689219d2ad7534e76f14c19
Author: Thomas Hebb 
AuthorDate: Fri Apr 21 14:47:05 2023 -0400

setup.sh: quote variable expansions

This prevents variables with whitespace from expanding as multiple
arguments.
---
 setup.sh | 38 +++---
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/setup.sh b/setup.sh
index e0b2547..ff3265e 100755
--- a/setup.sh
+++ b/setup.sh
@@ -34,17 +34,17 @@ rustup default nightly-2021-09-20
 # initialize submodules: optee_os / optee_client / build
 OPTEE_RELEASE_VERSION=3.20.0
 
-if [[ -z $OPTEE_DIR ]] || [[ $OPTEE_DIR == $PWD/optee ]]
+if [[ -z "$OPTEE_DIR" ]] || [[ "$OPTEE_DIR" == "$(pwd)/optee" ]]
 then
-   OPTEE_DIR=$PWD/optee
-   echo optee dir: $OPTEE_DIR
-   OPTEE_SUBMODULES=("optee_os" "optee_client" "build")
+   OPTEE_DIR="$(pwd)/optee"
+   echo "optee dir: $OPTEE_DIR"
+   OPTEE_SUBMODULES=(optee_os optee_client build)
 
-   if [ ! -d $OPTEE_DIR ]
+   if [ ! -d "$OPTEE_DIR" ]
then
-   mkdir $OPTEE_DIR
+   mkdir "$OPTEE_DIR"
else
-   rm -r $OPTEE_DIR/*
+   rm -r "$OPTEE_DIR"/*
fi
 
# download optee release
@@ -53,26 +53,26 @@ then
do
echo "Downloading $submodule..."
curl --retry 5 -s -S \
-   -L 
https://github.com/OP-TEE/$submodule/archive/refs/tags/$OPTEE_RELEASE_VERSION.tar.gz
 \
-   -o $OPTEE_DIR/$OPTEE_RELEASE_VERSION.tar.gz
+   -L 
"https://github.com/OP-TEE/$submodule/archive/refs/tags/$OPTEE_RELEASE_VERSION.tar.gz";
 \
+   -o "$OPTEE_DIR/$OPTEE_RELEASE_VERSION.tar.gz"
if [ ! $? -eq 0 ]
then
-   rm $OPTEE_DIR/$OPTEE_RELEASE_VERSION.tar.gz && \
+   rm "$OPTEE_DIR/$OPTEE_RELEASE_VERSION.tar.gz" && \
echo "Download failed" && \
exit 1
fi
echo "Uncompressing $submodule..."
-   mkdir -p $OPTEE_DIR/$submodule && \
-   tar zxf $OPTEE_DIR/$OPTEE_RELEASE_VERSION.tar.gz \
-   -C $OPTEE_DIR/$submodule --strip-components 1
+   mkdir -p "$OPTEE_DIR/$submodule" && \
+   tar zxf "$OPTEE_DIR/$OPTEE_RELEASE_VERSION.tar.gz" \
+   -C "$OPTEE_DIR/$submodule" --strip-components 1
if [ ! $? -eq 0 ]
then
-   rm $OPTEE_DIR/$OPTEE_RELEASE_VERSION.tar.gz && \
-   rm -r $OPTEE_DIR/$submodule && \
+   rm "$OPTEE_DIR/$OPTEE_RELEASE_VERSION.tar.gz" && \
+   rm -r "$OPTEE_DIR/$submodule" && \
echo "Downloaded file is damaged" && \
exit 1
fi
-   rm $OPTEE_DIR/$OPTEE_RELEASE_VERSION.tar.gz
+   rm "$OPTEE_DIR/$OPTEE_RELEASE_VERSION.tar.gz"
done
echo "Download finished"
 else
@@ -95,17 +95,17 @@ mkdir rust && cd rust
 
 git clone https://github.com/mesalock-linux/rust.git && \
(cd rust && \
-   git checkout $RUST_COMMIT_ID && \
+   git checkout "$RUST_COMMIT_ID" && \
git submodule update --init library/stdarch && \
git submodule update --init library/backtrace)
 
 git clone https://github.com/mesalock-linux/compiler-builtins.git && \
(cd compiler-builtins && \
-   git checkout $COMPILER_BUILTINS_COMMIT_ID && \
+   git checkout "$COMPILER_BUILTINS_COMMIT_ID" && \
git submodule update --init libm)
 
 git clone https://github.com/mesalock-linux/libc.git && \
(cd libc && \
-   git checkout $LIBC_COMMIT_ID)
+   git checkout "$LIBC_COMMIT_ID")
 
 echo "Rust submodules initialized"


-
To unsubscribe, e-mail: commits-unsubscr...@teaclave.apache.org
For additional commands, e-mail: commits-h...@teaclave.apache.org



[incubator-teaclave-sgx-sdk] branch v2.0.0-preview updated: Remove a GPL licensed file

2023-04-23 Thread rduan
This is an automated email from the ASF dual-hosted git repository.

rduan pushed a commit to branch v2.0.0-preview
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git


The following commit(s) were added to refs/heads/v2.0.0-preview by this push:
 new bee5d8e4 Remove a GPL licensed file
bee5d8e4 is described below

commit bee5d8e408dfcaa3adfc73b8504211ffb15edad0
Author: He Sun 
AuthorDate: Mon Apr 24 10:56:00 2023 +0800

Remove a GPL licensed file
---
 .../sgx_backtrace_sys/libbacktrace/move-if-change  | 83 --
 1 file changed, 83 deletions(-)

diff --git a/sgx_backtrace/sgx_backtrace_sys/libbacktrace/move-if-change 
b/sgx_backtrace/sgx_backtrace_sys/libbacktrace/move-if-change
deleted file mode 100644
index 88d95745..
--- a/sgx_backtrace/sgx_backtrace_sys/libbacktrace/move-if-change
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/sh
-# Like mv $1 $2, but if the files are the same, just delete $1.
-# Status is zero if successful, nonzero otherwise.
-
-VERSION='2012-01-06 07:23'; # UTC
-# The definition above must lie within the first 8 lines in order
-# for the Emacs time-stamp write hook (at end) to update it.
-# If you change this file with Emacs, please let the write hook
-# do its job.  Otherwise, update this string manually.
-
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see .
-
-usage="usage: $0 SOURCE DEST"
-
-help="$usage
-  or:  $0 OPTION
-If SOURCE is different than DEST, then move it to DEST; else remove SOURCE.
-
-  --help display this help and exit
-  --version  output version information and exit
-
-The variable CMPPROG can be used to specify an alternative to 'cmp'.
-
-Report bugs to ."
-
-version=`expr "$VERSION" : '\([^ ]*\)'`
-version="move-if-change (gnulib) $version
-Copyright (C) 2011 Free Software Foundation, Inc.
-License GPLv3+: GNU GPL version 3 or later 
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law."
-
-cmpprog=${CMPPROG-cmp}
-
-for arg
-do
-  case $arg in
---help | --hel | --he | --h)
-  exec echo "$help" ;;
---version | --versio | --versi | --vers | --ver | --ve | --v)
-  exec echo "$version" ;;
---)
-  shift
-  break ;;
--*)
-  echo "$0: invalid option: $arg" >&2
-  exit 1 ;;
-*)
-  break ;;
-  esac
-done
-
-test $# -eq 2 || { echo "$0: $usage" >&2; exit 1; }
-
-if test -r "$2" && $cmpprog -- "$1" "$2" >/dev/null; then
-  rm -f -- "$1"
-else
-  if mv -f -- "$1" "$2"; then :; else
-# Ignore failure due to a concurrent move-if-change.
-test -r "$2" && $cmpprog -- "$1" "$2" >/dev/null && rm -f -- "$1"
-  fi
-fi
-
-## Local Variables:
-## eval: (add-hook 'write-file-hooks 'time-stamp)
-## time-stamp-start: "VERSION='"
-## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
-## time-stamp-time-zone: "UTC"
-## time-stamp-end: "'; # UTC"
-## End:


-
To unsubscribe, e-mail: commits-unsubscr...@teaclave.apache.org
For additional commands, e-mail: commits-h...@teaclave.apache.org