2016-10-04 18:14:38 +02:00
|
|
|
#! /usr/bin/env sh
|
|
|
|
|
2016-07-19 15:54:17 +02:00
|
|
|
# output_env.sh
|
|
|
|
#
|
2020-08-19 16:54:51 +02:00
|
|
|
# Copyright The Mbed TLS Contributors
|
Update license headers to Apache-2.0 OR GPL-2.0-or-later
This will allow us to ship the LTS branches in a single archive
This commit was generated using the following script:
# ========================
#!/bin/sh
header1='\ * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later\
*\
* This file is provided under the Apache License 2.0, or the\
* GNU General Public License v2.0 or later.\
*\
* **********\
* Apache License 2.0:\
*\
* 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\
*\
* 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.\
*\
* **********\
*\
* **********\
* GNU General Public License v2.0 or later:\
*\
* 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 2 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, write to the Free Software Foundation, Inc.,\
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\
*\
* **********'
find -path './.git' -prune -o '(' -name '*.c' -o -name '*.cpp' -o -name '*.fmt' -o -name '*.h' ')' -print | xargs sed -i "
# Normalize the first line of the copyright headers (no text on the first line of a block comment)
/^\/\*.*Copyright.*Arm/I s/\/\*/&\n */
# Insert new copyright header
/SPDX-License-Identifier/ i\
$header1
# Delete old copyright header
/SPDX-License-Identifier/,$ {
# Delete lines until the one preceding the mbedtls declaration
N
1,/This file is part of/ {
/This file is part of/! D
}
}
"
# Format copyright header for inclusion into scripts
header2=$(echo "$header1" | sed 's/^\\\? \* \?/#/')
find -path './.git' -prune -o '(' -name '*.gdb' -o -name '*.pl' -o -name '*.py' -o -name '*.sh' ')' -print | xargs sed -i "
# Insert new copyright header
/SPDX-License-Identifier/ i\
$header2
# Delete old copyright header
/SPDX-License-Identifier/,$ {
# Delete lines until the one preceding the mbedtls declaration
N
1,/This file is part of/ {
/This file is part of/! D
}
}
"
# ========================
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2020-06-05 13:02:18 +02:00
|
|
|
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
|
|
|
#
|
|
|
|
# This file is provided under the Apache License 2.0, or the
|
|
|
|
# GNU General Public License v2.0 or later.
|
|
|
|
#
|
|
|
|
# **********
|
|
|
|
# Apache License 2.0:
|
2020-05-26 01:54:15 +02:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
Update license headers to Apache-2.0 OR GPL-2.0-or-later
This will allow us to ship the LTS branches in a single archive
This commit was generated using the following script:
# ========================
#!/bin/sh
header1='\ * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later\
*\
* This file is provided under the Apache License 2.0, or the\
* GNU General Public License v2.0 or later.\
*\
* **********\
* Apache License 2.0:\
*\
* 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\
*\
* 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.\
*\
* **********\
*\
* **********\
* GNU General Public License v2.0 or later:\
*\
* 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 2 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, write to the Free Software Foundation, Inc.,\
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\
*\
* **********'
find -path './.git' -prune -o '(' -name '*.c' -o -name '*.cpp' -o -name '*.fmt' -o -name '*.h' ')' -print | xargs sed -i "
# Normalize the first line of the copyright headers (no text on the first line of a block comment)
/^\/\*.*Copyright.*Arm/I s/\/\*/&\n */
# Insert new copyright header
/SPDX-License-Identifier/ i\
$header1
# Delete old copyright header
/SPDX-License-Identifier/,$ {
# Delete lines until the one preceding the mbedtls declaration
N
1,/This file is part of/ {
/This file is part of/! D
}
}
"
# Format copyright header for inclusion into scripts
header2=$(echo "$header1" | sed 's/^\\\? \* \?/#/')
find -path './.git' -prune -o '(' -name '*.gdb' -o -name '*.pl' -o -name '*.py' -o -name '*.sh' ')' -print | xargs sed -i "
# Insert new copyright header
/SPDX-License-Identifier/ i\
$header2
# Delete old copyright header
/SPDX-License-Identifier/,$ {
# Delete lines until the one preceding the mbedtls declaration
N
1,/This file is part of/ {
/This file is part of/! D
}
}
"
# ========================
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2020-06-05 13:02:18 +02:00
|
|
|
# **********
|
|
|
|
#
|
|
|
|
# **********
|
|
|
|
# GNU General Public License v2.0 or later:
|
|
|
|
#
|
|
|
|
# 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 2 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, write to the Free Software Foundation, Inc.,
|
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# **********
|
|
|
|
#
|
2016-07-19 15:54:17 +02:00
|
|
|
# Purpose
|
|
|
|
#
|
|
|
|
# To print out all the relevant information about the development environment.
|
|
|
|
#
|
|
|
|
# This includes:
|
|
|
|
# - architecture of the system
|
|
|
|
# - type and version of the operating system
|
2020-05-25 13:11:32 +02:00
|
|
|
# - version of make and cmake
|
2016-09-04 13:28:44 +02:00
|
|
|
# - version of armcc, clang, gcc-arm and gcc compilers
|
|
|
|
# - version of libc, clang, asan and valgrind if installed
|
2016-07-19 15:54:17 +02:00
|
|
|
# - version of gnuTLS and OpenSSL
|
|
|
|
|
2016-10-04 18:14:38 +02:00
|
|
|
print_version()
|
|
|
|
{
|
|
|
|
BIN="$1"
|
|
|
|
shift
|
|
|
|
ARGS="$1"
|
|
|
|
shift
|
2020-03-05 16:18:53 +01:00
|
|
|
VARIANT="$1"
|
2016-10-04 18:14:38 +02:00
|
|
|
shift
|
|
|
|
|
2020-02-27 13:58:27 +01:00
|
|
|
if [ -n "$VARIANT" ]; then
|
2020-02-26 16:29:40 +01:00
|
|
|
VARIANT=" ($VARIANT)"
|
|
|
|
fi
|
|
|
|
|
2020-02-27 13:58:27 +01:00
|
|
|
if ! type "$BIN" > /dev/null 2>&1; then
|
2020-02-26 16:29:40 +01:00
|
|
|
echo " * ${BIN##*/}$VARIANT: Not found."
|
2016-10-04 18:14:38 +02:00
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
BIN=`which "$BIN"`
|
|
|
|
VERSION_STR=`$BIN $ARGS 2>&1`
|
|
|
|
|
|
|
|
# Apply all filters
|
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
FILTER="$1"
|
|
|
|
shift
|
|
|
|
VERSION_STR=`echo "$VERSION_STR" | $FILTER`
|
|
|
|
done
|
|
|
|
|
2020-03-05 16:18:53 +01:00
|
|
|
if [ -z "$VERSION_STR" ]; then
|
|
|
|
VERSION_STR="Version could not be determined."
|
|
|
|
fi
|
|
|
|
|
2020-02-26 16:29:40 +01:00
|
|
|
echo " * ${BIN##*/}$VARIANT: ${BIN} : ${VERSION_STR} "
|
2016-10-04 18:14:38 +02:00
|
|
|
}
|
2016-07-19 15:54:17 +02:00
|
|
|
|
2020-02-27 13:58:27 +01:00
|
|
|
echo "** Platform:"
|
|
|
|
echo
|
|
|
|
|
|
|
|
if [ `uname -s` = "Linux" ]; then
|
2020-02-26 16:29:40 +01:00
|
|
|
echo "Linux variant"
|
|
|
|
lsb_release -d -c
|
|
|
|
else
|
|
|
|
echo "Unknown Unix variant"
|
|
|
|
fi
|
|
|
|
|
2016-07-19 15:54:17 +02:00
|
|
|
echo
|
2016-09-27 16:05:15 +02:00
|
|
|
|
2020-02-26 16:29:40 +01:00
|
|
|
print_version "uname" "-a" ""
|
2020-03-05 16:18:53 +01:00
|
|
|
|
2020-02-27 13:58:27 +01:00
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo "** Tool Versions:"
|
|
|
|
echo
|
2020-02-26 16:29:40 +01:00
|
|
|
|
2020-05-25 13:11:32 +02:00
|
|
|
print_version "make" "--version" "" "head -n 1"
|
|
|
|
echo
|
|
|
|
|
|
|
|
print_version "cmake" "--version" "" "head -n 1"
|
|
|
|
echo
|
|
|
|
|
2018-03-21 08:35:07 +01:00
|
|
|
if [ "${RUN_ARMCC:-1}" -ne 0 ]; then
|
|
|
|
: "${ARMC5_CC:=armcc}"
|
2020-02-26 16:29:40 +01:00
|
|
|
print_version "$ARMC5_CC" "--vsn" "" "head -n 2"
|
2018-03-21 08:35:07 +01:00
|
|
|
echo
|
2016-07-19 15:54:17 +02:00
|
|
|
|
2018-03-21 08:35:07 +01:00
|
|
|
: "${ARMC6_CC:=armclang}"
|
2020-02-26 16:29:40 +01:00
|
|
|
print_version "$ARMC6_CC" "--vsn" "" "head -n 2"
|
2018-03-21 08:35:07 +01:00
|
|
|
echo
|
|
|
|
fi
|
2016-07-19 15:54:17 +02:00
|
|
|
|
2020-02-26 16:29:40 +01:00
|
|
|
print_version "arm-none-eabi-gcc" "--version" "" "head -n 1"
|
|
|
|
echo
|
|
|
|
|
|
|
|
print_version "gcc" "--version" "" "head -n 1"
|
2016-07-19 15:54:17 +02:00
|
|
|
echo
|
|
|
|
|
2020-02-26 16:29:40 +01:00
|
|
|
print_version "clang" "--version" "" "head -n 2"
|
2016-07-19 15:54:17 +02:00
|
|
|
echo
|
|
|
|
|
2020-02-26 16:29:40 +01:00
|
|
|
print_version "ldd" "--version" "" "head -n 1"
|
2016-07-19 15:54:17 +02:00
|
|
|
echo
|
|
|
|
|
2020-02-26 16:29:40 +01:00
|
|
|
print_version "valgrind" "--version" ""
|
2016-07-19 15:54:17 +02:00
|
|
|
echo
|
|
|
|
|
2020-02-26 16:29:40 +01:00
|
|
|
print_version "gdb" "--version" "" "head -n 1"
|
2016-07-19 15:54:17 +02:00
|
|
|
echo
|
2016-09-05 13:24:47 +02:00
|
|
|
|
2020-03-05 16:18:53 +01:00
|
|
|
print_version "perl" "--version" "" "head -n 2" "grep ."
|
|
|
|
echo
|
|
|
|
|
|
|
|
print_version "python" "--version" "" "head -n 1"
|
|
|
|
echo
|
|
|
|
|
2020-05-25 13:55:21 +02:00
|
|
|
print_version "python3" "--version" "" "head -n 1"
|
|
|
|
echo
|
|
|
|
|
2020-03-06 15:50:49 +01:00
|
|
|
print_version "pylint3" "--version" "" "sed /^.*config/d" "grep pylint"
|
2020-03-05 16:18:53 +01:00
|
|
|
echo
|
|
|
|
|
2016-10-04 18:14:38 +02:00
|
|
|
: ${OPENSSL:=openssl}
|
2020-02-26 16:29:40 +01:00
|
|
|
print_version "$OPENSSL" "version" "default"
|
2016-10-04 18:14:38 +02:00
|
|
|
echo
|
2016-09-05 13:24:47 +02:00
|
|
|
|
|
|
|
if [ -n "${OPENSSL_LEGACY+set}" ]; then
|
2020-02-26 16:29:40 +01:00
|
|
|
print_version "$OPENSSL_LEGACY" "version" "legacy"
|
|
|
|
else
|
|
|
|
echo " * openssl (legacy): Not configured."
|
2016-07-19 15:54:17 +02:00
|
|
|
fi
|
2020-02-26 16:29:40 +01:00
|
|
|
echo
|
2016-07-19 15:54:17 +02:00
|
|
|
|
2016-10-04 18:14:38 +02:00
|
|
|
: ${GNUTLS_CLI:=gnutls-cli}
|
2020-02-26 16:29:40 +01:00
|
|
|
print_version "$GNUTLS_CLI" "--version" "default" "head -n 1"
|
2016-07-19 15:54:17 +02:00
|
|
|
echo
|
|
|
|
|
2016-10-04 18:14:38 +02:00
|
|
|
: ${GNUTLS_SERV:=gnutls-serv}
|
2020-02-26 16:29:40 +01:00
|
|
|
print_version "$GNUTLS_SERV" "--version" "default" "head -n 1"
|
2016-07-19 15:54:17 +02:00
|
|
|
echo
|
2016-09-05 13:24:47 +02:00
|
|
|
|
|
|
|
if [ -n "${GNUTLS_LEGACY_CLI+set}" ]; then
|
2020-02-26 16:29:40 +01:00
|
|
|
print_version "$GNUTLS_LEGACY_CLI" "--version" "legacy" "head -n 1"
|
|
|
|
else
|
|
|
|
echo " * gnutls-cli (legacy): Not configured."
|
2016-09-05 13:24:47 +02:00
|
|
|
fi
|
2020-02-26 16:29:40 +01:00
|
|
|
echo
|
2016-09-05 13:24:47 +02:00
|
|
|
|
|
|
|
if [ -n "${GNUTLS_LEGACY_SERV+set}" ]; then
|
2020-02-26 16:29:40 +01:00
|
|
|
print_version "$GNUTLS_LEGACY_SERV" "--version" "legacy" "head -n 1"
|
|
|
|
else
|
|
|
|
echo " * gnutls-serv (legacy): Not configured."
|
2016-07-19 15:54:17 +02:00
|
|
|
fi
|
2020-02-26 16:29:40 +01:00
|
|
|
echo
|
2016-07-19 15:54:17 +02:00
|
|
|
|
2020-02-26 16:29:40 +01:00
|
|
|
echo " * Installed asan versions:"
|
2020-02-27 13:58:27 +01:00
|
|
|
if type dpkg-query >/dev/null 2>/dev/null; then
|
|
|
|
if ! dpkg-query -f '${Status} ${Package}: ${Version}\n' -W 'libasan*' |
|
|
|
|
awk '$3 == "installed" && $4 !~ /-/ {print $4, $5}' |
|
|
|
|
grep .
|
|
|
|
then
|
|
|
|
echo " No asan versions installed."
|
|
|
|
fi
|
2016-07-19 15:54:17 +02:00
|
|
|
else
|
2020-02-27 13:58:27 +01:00
|
|
|
echo " Unable to determine the asan version without dpkg."
|
2016-07-19 15:54:17 +02:00
|
|
|
fi
|
|
|
|
echo
|