You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/07/07 02:24:30 UTC

[incubator-nuttx] branch master updated (3472de3 -> b994d1f)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 3472de3  Revert "sched/sched/sched_releasetcb.c:  Handle custom stack allocations."
     new 407c5db  check-release-candidate.sh script
     new 5fb9356  changing script name to match checkpatch.sh
     new ef3ba54  cleanup unneeded cd and rm commands
     new dbc025b  add examples to usage info
     new 1076b74  changed header comment filename to match current
     new b994d1f  fixing problem with trap not removing tempdir

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:
 tools/checkrelease.sh | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 132 insertions(+)
 create mode 100755 tools/checkrelease.sh


[incubator-nuttx] 01/06: check-release-candidate.sh script

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 407c5db66b696f6d91ba729ccfa664e250e32c53
Author: Adam Feuer <ad...@adamfeuer.com>
AuthorDate: Sat Jul 4 14:47:02 2020 -0700

    check-release-candidate.sh script
    
    Squashed commit of the following:
    
    commit 40b788f8a0e79aa90734813a557c17f90fb9cdbe
    Author: Adam Feuer <ad...@adamfeuer.com>
    Date:   Sat Jul 4 14:45:13 2020 -0700
    
        updated license header to APL 2.0; updated usage
    
    commit 81984aeeb503d90f30cb1d0c62a888e2a23235ed
    Author: Adam Feuer <ad...@adamfeuer.com>
    Date:   Thu Jul 2 18:32:05 2020 -0700
    
    move tar.gz files to current dir
    
    - for convenience, so user can untar them and build
    
    commit e1a3100402e39703ea08daa16e2388d4572413dc
    Author: Adam Feuer <ad...@adamfeuer.com>
    Date:   Wed Jul 1 13:17:37 2020 -0700
    
    added trap; copyright header; can take release name
    
    - instead of URL, optionally
    
    commit e0109214c5b887b4b662120ce59c59520d8a5918
    Author: Adam Feuer <ad...@adamfeuer.com>
    Date:   Wed Jul 1 12:54:54 2020 -0700
    
    trap and remove tempfile; set -e to catch errors
    
    commit 196dc4ca4285b821cce644561296a2034e9a671e
    Author: Adam Feuer <ad...@adamfeuer.com>
    Date:   Wed Jul 1 12:15:01 2020 -0700
    
    using wget recursive and cut-dir to download files
    
    - as per PR feedback
    
    commit 127c22bbc14cabe2a59b238b75c21711b000e41b
    Author: Adam Feuer <ad...@adamfeuer.com>
    Date:   Wed Jul 1 11:35:01 2020 -0700
    
    intial addition
---
 tools/check-nuttx-release.sh | 129 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 129 insertions(+)

diff --git a/tools/check-nuttx-release.sh b/tools/check-nuttx-release.sh
new file mode 100755
index 0000000..664579d
--- /dev/null
+++ b/tools/check-nuttx-release.sh
@@ -0,0 +1,129 @@
+#!/bin/bash
+#############################################################################
+# tools/check-nuttx-release.sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you 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
+#
+#   http://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.
+#
+#############################################################################
+
+set -e
+
+BASE_URL="https://dist.apache.org/repos/dist/dev/incubator/nuttx"
+TEMPDIR="dist.apache.org"
+ORIGINAL_DIR="$(pwd)"
+trap "rm -rf $TEMPDIR" EXIT
+
+function download_release() {
+    rm -rf "$TEMPDIR"
+    wget -r -np -R "index.html*" -P . --cut-dirs 7 "$URL"
+    cd "$TEMPDIR"
+}
+
+function check_sha512() {
+    # check release sha512
+    RELEASE_FILE=$1
+    echo "Checking $RELEASE_FILE sha512..."
+    sha512sum -c "$RELEASE_FILE.sha512"
+}
+
+function check_gpg() {
+    # check nuttx sha512 and gpg
+    RELEASE_FILE=$1
+    echo "Checking $RELEASE_FILE GPG signature:"
+    gpg --verify "$RELEASE_FILE.asc" "$RELEASE_FILE"
+    echo
+}
+
+function check_required_files() {
+    # check nuttx for required files
+    RELEASE_FILE=$1
+    RELEASE_DIR=$2 
+    rm -rf "$RELEASE_DIR"
+    tar xf "$RELEASE_FILE"
+    ERROR=0
+    if [ ! -f "$RELEASE_DIR/LICENSE" ]; then
+        echo "LICENSE file not present."
+        ERROR=1
+    fi
+    if [ ! -f "$RELEASE_DIR/NOTICE" ]; then
+        echo "NOTICE file not present."
+        ERROR=1
+    fi
+    if [ ! -f "$RELEASE_DIR/README.txt" ]; then
+        echo "README.txt file not present."
+        ERROR=1
+    fi
+    if [ ! -f "$RELEASE_DIR/DISCLAIMER-WIP" ]; then
+        echo "DISCLAIMER-WIP file not present."
+        ERROR=1
+    fi
+    if [ 0 -eq $ERROR ]; then
+        echo "OK: All required files exist."
+    fi
+}
+
+function check_nuttx() {
+    # check nuttx sha512 and gpg
+    RELEASE_FILE="$(ls *.tar.gz|head -1)"
+    check_sha512 "$RELEASE_FILE" 
+    check_gpg "$RELEASE_FILE"
+    check_required_files "$RELEASE_FILE" "nuttx"
+    mv "$RELEASE_FILE" ..
+}
+
+function check_nuttx_apps() {
+    # check nuttx-apps sha512 and gpg
+    RELEASE_FILE="$(ls *.tar.gz|head -2| tail -1)"
+    check_sha512 "$RELEASE_FILE"
+    check_gpg "$RELEASE_FILE"
+    check_required_files "$RELEASE_FILE" "apps"
+    mv "$RELEASE_FILE" ..
+}
+
+function usage() {
+    echo "Usage: $0 <URL-of-release-candidate-directory-or-release-name>"
+    echo "   Given release name or release full URL, downloads all files in"
+    echo "   in that directory (which should include nuttx and nuttx-apps"
+    echo "   sha512, asc, and tar.gz files, checks their SHA512 and GPG "
+    echo "   signatures, and checks the unpacked directories for required "
+    echo "   files. Creates a temporary directory to do its work in."
+    echo
+    echo "   nuttx and nuttx-apps tar.gz files are left in the current"
+    echo "   directory."
+    echo 
+}
+
+if [ "-h" == "$1" ]; then
+    usage
+    exit 0
+fi
+
+if [ -z "$1" ]; then
+    usage
+    exit 0
+fi
+
+ARG=$1
+if [[ "$ARG" =~ ^"http".* ]]; then
+  URL="$1/"
+else
+  URL="$BASE_URL/$1/"
+fi
+
+download_release
+check_nuttx 
+check_nuttx_apps 
+cd "$ORIGINAL_DIR"


[incubator-nuttx] 05/06: changed header comment filename to match current

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 1076b748a25d613b40c5ad1e33750cb4a48e911f
Author: Adam Feuer <ad...@adamfeuer.com>
AuthorDate: Mon Jul 6 12:38:45 2020 -0700

    changed header comment filename to match current
---
 tools/checkrelease.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/checkrelease.sh b/tools/checkrelease.sh
index ef0aeac..2f2ddd1 100755
--- a/tools/checkrelease.sh
+++ b/tools/checkrelease.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 #############################################################################
-# tools/check-nuttx-release.sh
+# tools/checkrelease.sh
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with


[incubator-nuttx] 02/06: changing script name to match checkpatch.sh

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5fb9356eca8a6ff594af87cf85def1d78f82ac1c
Author: Adam Feuer <ad...@adamfeuer.com>
AuthorDate: Mon Jul 6 12:28:52 2020 -0700

    changing script name to match checkpatch.sh
    
    - as per PR feedback
---
 tools/{check-nuttx-release.sh => checkrelease.sh} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/tools/check-nuttx-release.sh b/tools/checkrelease.sh
similarity index 100%
rename from tools/check-nuttx-release.sh
rename to tools/checkrelease.sh


[incubator-nuttx] 03/06: cleanup unneeded cd and rm commands

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ef3ba54c9c743a483b2f869fef2df1b67f4f1714
Author: Adam Feuer <ad...@adamfeuer.com>
AuthorDate: Mon Jul 6 12:34:41 2020 -0700

    cleanup unneeded cd and rm commands
---
 tools/checkrelease.sh | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/checkrelease.sh b/tools/checkrelease.sh
index 664579d..c1fb6cf 100755
--- a/tools/checkrelease.sh
+++ b/tools/checkrelease.sh
@@ -27,7 +27,6 @@ ORIGINAL_DIR="$(pwd)"
 trap "rm -rf $TEMPDIR" EXIT
 
 function download_release() {
-    rm -rf "$TEMPDIR"
     wget -r -np -R "index.html*" -P . --cut-dirs 7 "$URL"
     cd "$TEMPDIR"
 }
@@ -126,4 +125,3 @@ fi
 download_release
 check_nuttx 
 check_nuttx_apps 
-cd "$ORIGINAL_DIR"


[incubator-nuttx] 04/06: add examples to usage info

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit dbc025bb88066addd640a9d4659130801963658c
Author: Adam Feuer <ad...@adamfeuer.com>
AuthorDate: Mon Jul 6 12:36:40 2020 -0700

    add examples to usage info
    
    - as per PR feedback
---
 tools/checkrelease.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/checkrelease.sh b/tools/checkrelease.sh
index c1fb6cf..ef0aeac 100755
--- a/tools/checkrelease.sh
+++ b/tools/checkrelease.sh
@@ -96,13 +96,18 @@ function usage() {
     echo "Usage: $0 <URL-of-release-candidate-directory-or-release-name>"
     echo "   Given release name or release full URL, downloads all files in"
     echo "   in that directory (which should include nuttx and nuttx-apps"
-    echo "   sha512, asc, and tar.gz files, checks their SHA512 and GPG "
+    echo "   sha512, asc, and tar.gz files), checks the release SHA512 and GPG "
     echo "   signatures, and checks the unpacked directories for required "
     echo "   files. Creates a temporary directory to do its work in."
     echo
     echo "   nuttx and nuttx-apps tar.gz files are left in the current"
     echo "   directory."
     echo 
+    echo "Examples:"
+    echo
+    echo "  $0 9.1.0-RC1"
+    echo "  $0 https://dist.apache.org/repos/dist/dev/incubator/nuttx/9.1.0-RC1/"
+    echo
 }
 
 if [ "-h" == "$1" ]; then


[incubator-nuttx] 06/06: fixing problem with trap not removing tempdir

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit b994d1f0b6c46cfef00c44551b4d955ef8133dc3
Author: Adam Feuer <ad...@adamfeuer.com>
AuthorDate: Mon Jul 6 12:51:34 2020 -0700

    fixing problem with trap not removing tempdir
    
    - needs to be in original dir to work
---
 tools/checkrelease.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/checkrelease.sh b/tools/checkrelease.sh
index 2f2ddd1..5677836 100755
--- a/tools/checkrelease.sh
+++ b/tools/checkrelease.sh
@@ -24,7 +24,7 @@ set -e
 BASE_URL="https://dist.apache.org/repos/dist/dev/incubator/nuttx"
 TEMPDIR="dist.apache.org"
 ORIGINAL_DIR="$(pwd)"
-trap "rm -rf $TEMPDIR" EXIT
+trap "{ cd $ORIGINAL_DIR; rm -rf $TEMPDIR; }" EXIT
 
 function download_release() {
     wget -r -np -R "index.html*" -P . --cut-dirs 7 "$URL"