5 Commits

Author SHA1 Message Date
Paul Elliott
217565ef4e Improve error message
Make sure line number reported is correct for the overly long line, and
change the message to be more readable.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-04-12 16:18:29 +02:00
Paul Elliott
c24a1e86da Make assemble changelog script enforce line length
As I descovered, a changelog entry with a line length greater than 80
characters would still pass CI. This is a quick change to the script to
make it detect these descrepancies and fail.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-04-12 16:18:26 +02:00
Bence Szépkúti
a2947ac7bb Update copyright notices to use Linux Foundation guidance
As a result, the copyright of contributors other than Arm is now
acknowledged, and the years of publishing are no longer tracked in the
source files.

Also remove the now-redundant lines declaring that the files are part of
MbedTLS.

This commit was generated using the following script:

# ========================
#!/bin/sh

# Find files
find '(' -path './.git' -o -path './3rdparty' ')' -prune -o -type f -print | xargs sed -bi '

# Replace copyright attribution line
s/Copyright.*Arm.*/Copyright The Mbed TLS Contributors/I

# Remove redundant declaration and the preceding line
$!N
/This file is part of Mbed TLS/Id
P
D
'
# ========================

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2020-08-19 16:37:36 +02:00
Bence Szépkúti
f744bd72ee 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-15 12:48:48 +02:00
Gilles Peskine
cff94e33b0 Copy the changelog entry assembling script from development
This commit is the combined cherry-pick of the following commits:
dba4de0a1294d14840ccfc812799ef6b63725935
b695d5e30a87a8d574ad21393a037710396f27d3
7c3f7cdeae991733573ed2ab81a213f0784cd9cb
4d977a4f4011be14b52330b7224d5b8cf88dc85a
e248e83f9f23ffe07bc54579522bf3182018b68f
eebf24f7a8d138f656b8cd1f724bfc73d2c4f033
6e97c439592b51c4277328a3ef0e0f61ddccc059
c68c7c8864fd5eaea891712c5a3455c87aae4d40
ac0f0860f17b319c8dd36052f8df5bda075274af
42f384c186db02c0a96b9a0ae5c95df6eae92726
98a53aa3990a6a7730bb15d27e215d3163485ac2
13dc6342822bd4158f8dc4ed30bb2f88af2de356
7fa3eb7d44bd01beaeff145bc1f00a5af37e2751
28af958ea4299eea9e0e3a112f04fcf7e8fc7049
8f46bbf46f3387fa93dd69040d039ad5cdc1ed4b
27a1facd486dc178a1c2e597ccb006b7ccc30258
afc9db8bb71bd76dce45f5246f9ea5b52d59a700
a26079613a0fb75ba616657f9e15a73912a056ef
da14e8225e48250375c2f9aa07d195f7f5e9a5b8
37d670a1e17f86b3411fdf15c643b4e1caf7a503
974349d40e69b4e93102abebc79dd54e7beeb4bc
d8b6c77388f2c6756aa16bfe3932d956b4d1d2d1
2b242495e12ffb9010c177fa2d62fc01854e70b8
6e91009cfe0bf578ee6afb0cba09f188a238f4af
566407d6f68e906946ff80648c2bde9024bda192
8c4a84c5ded7bb19a5a607591b38971ed79b0a11
5e39c9e94f62d924ec94f8887baa088f05930b07
974232f045781a17b494f6993b2b02e150476653
40b3f411ecb16522beb073e1131f8e727be29ea4

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-04-21 18:34:06 +02:00