Commit Graph

18 Commits

Author SHA1 Message Date
Patrick Georgi e342cd3322 util/lint: Add BSD-4-Clause-UC to acceptable licenses
While a 4 clause BSD license "with advertising" is incompatible to the
GPL, the University of California declared the problematic clause null
and void.

See ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Change-Id: I4ebb822f64989a5fc8f686e548a94653508d1113
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39282
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-03-06 07:47:58 +00:00
Elyes HAOUAS 8297fa1e20 util: Remove old reference to ROMCC
Change-Id: Ia1a37db8341281102ae8ae9c03f1ce76d8d126eb
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39075
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-02-24 14:23:32 +00:00
Martin Roth e348eba641 util/lint: Update license header text for SPDX headers.
In preparation to update to SPDX license headers, add identifiers
for the licenses seen in the coreboot project and create a command
line parameter allowing only SPDX license identifiers to be detected.

Here are example locations of these licenses:
Apache-2.0 - src/soc/sifive
BSD-3-Clause - Throughout coreboot & libpayload source
GPL-2.0-only - Throughout coreboot source
GPL-2.0-or-later - Throughout coreboot source
GPL-3.0-only - util/amdtools
GPL-3.0-or-later - src/lib/[gcov/libgcov/gnat]
ISC - src/lib/ubsan.c, soc/qualcomm/ipq806x/include/soc/gsbi.h, others
MIT - soc/nvidia/tegra210/mipi_dsi.c, files in mainboard/cavium/
X11 - include/device/drm_dp_helper.h, drivers/aspeed/common/ast_tables.h

Signed-off-by: Martin Roth <martin@coreboot.org>
Change-Id: I07a7ca408ac8563e03e189d05ef7729dfb6fc24e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36175
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2020-01-02 14:48:48 +00:00
Ronald G. Minnich 688eec1b97 lint-000-license-headers: add SPDX-License-Identifier: GPL-2.0-or-later
Change-Id: Icbf21b02d3092815bbe876eceea72ebba8dd54da
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: https://review.coreboot.org/28599
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-09-14 08:54:28 +00:00
Martin Roth bdad9a8e72 util/lint: Update lint-000-license-headers linter
- Add some directories and files to the ignore list
- Add the LGPL as a recognized header.  It's used in some files that
were pulled into coreboot from other sources.

Change-Id: I53423205f1cbf142a294ee5d24e885741a44dfcd
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/26572
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-06-02 21:00:22 +00:00
Martin Roth dea13331a1 util/lint: Ignore whitespace, newlines, and licenses in vbt files
Change-Id: I84f612db058d83936ddd5a6baa32c993e5b0f594
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/26064
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-09 16:19:36 +00:00
Alex Thiessen f4ceff37c8 util/lint: Check license headers of git hooks
Now that all the files under util/gitconfig have their license headers,
enable lint-000-license-headers to check the directory too.

Change-Id: I242256f72ac70553535509f83166c6d1ddb16fdc
Signed-off-by: Alex Thiessen <alex.thiessen.de+coreboot@gmail.com>
Reviewed-on: https://review.coreboot.org/23098
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-01-10 09:50:37 +00:00
Martin Roth ed0ee0a83d util/lint: Update license header lint scripts
- Check for original LinuxBIOS header from LANL
- Check for the BSD style license used in x86emu

- Add top level checks for src/cpu and src/vboot
- Add drivers dir check for aspeed, emulation, and sil
- Add mainboard dir check for digitallogic

Change-Id: Ie1ef6a39fd1d184815d22235d43780caedb2ca95
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/19122
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Chris Ching <chingcodes@google.com>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-08-10 15:53:17 +00:00
Martin Roth 03e9d6aa13 util/lint: Don't check license text for files with under 5 lines
Change-Id: I7c1e3cf558d447838819b4d6a63d93d48d5f13e0
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/18316
Tested-by: build bot (Jenkins)
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2017-02-14 18:37:40 +01:00
Naresh G Solanki 358b2b379b util/lint: Exclude devicetree files with custom name from license check
As devicetree files can have different name followed by extension cb
Exclude all .cb file from the license header check.

Change-Id: I37b651eedd77cbf3d3e65ff0f027f971b0a2d2ac
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/17186
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-30 00:10:05 +01:00
Martin Roth 84129b8c68 util/lint: update lint-000-license-headers
- Add some additional filters for files that do not require
license headers.
- Add an alternative wording for the BSD license that is used
in several files.
- Add string for dummy files
- Stop checking if there are no files left.
- Remove 'local' keyword which is not posix compliant.

Change-Id: I2ed1b0572b5fbe84ea86173b7ec2106454399547
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/14324
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-13 17:37:53 +02:00
Martin Roth f8db028a32 lint: Check license headers for both paragraphs of the GPL
If the GPLv2 or GPLv2+ license header is being used on a
coreboot file, make sure it has two paragraphs as specified by
the Common License Header section in the developer guidelines
in the coreboot wiki.

Change-Id: Ifffa0fa7272f5a4b129d4b7b8a515f8795bc2401
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13119
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-02 03:24:57 +01:00
Martin Roth c4511e2b73 util/lint: Update license linter, make stable version
- Split the script up to make it easier to update and read.
- Check for multiple different license strings. Not all files are GPL
licensed.
- Don't validate 0 length files
- Update list of files to exclude from the license header check.
- Add command line option to set directories to check

- Add stable version to check a few directories that are fixed.  This
just calls the non-stable version with the directories to check.

Change-Id: I90d4e93a20b4e1638ce4f43f8acbee72dc588625
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12909
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-18 04:15:53 +01:00
Patrick Georgi a73b93157f tree: drop last paragraph of GPL copyright header
It encourages users from writing to the FSF without giving an address.
Linux also prefers to drop that and their checkpatch.pl (that we
imported) looks out for that.

This is the result of util/scripts/no-fsf-addresses.sh with no further
editing.

Change-Id: Ie96faea295fe001911d77dbc51e9a6789558fbd6
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/11888
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2015-10-31 21:37:39 +01:00
Patrick Georgi b890a1228d Remove address from GPLv2 headers
As per discussion with lawyers[tm], it's not a good idea to
shorten the license header too much - not for legal reasons
but because there are tools that look for them, and giving
them a standard pattern simplifies things.

However, we got confirmation that we don't have to update
every file ever added to coreboot whenever the FSF gets a
new lease, but can drop the address instead.

util/kconfig is excluded because that's imported code that
we may want to synchronize every now and then.

$ find * -type f -exec sed -i "s:Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *MA[, ]*02110-1301[, ]*USA:Foundation, Inc.:" {} +
$ find * -type f -exec sed -i "s:Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA:Foundation, Inc.:" {} +
$ find * -type f -exec sed -i "s:Foundation, Inc., 59 Temple Place[-, ]*Suite 330, Boston, MA *02111-1307[, ]*USA:Foundation, Inc.:" {} +
$ find * -type f -exec sed -i "s:Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.:Foundation, Inc.:" {} +
$ find * -type f
	-a \! -name \*.patch \
	-a \! -name \*_shipped \
	-a \! -name LICENSE_GPL \
	-a \! -name LGPL.txt \
	-a \! -name COPYING \
	-a \! -name DISCLAIMER \
	-exec sed -i "/Foundation, Inc./ N;s:Foundation, Inc.* USA\.* *:Foundation, Inc. :;s:Foundation, Inc. $:Foundation, Inc.:" {} +

Change-Id: Icc968a5a5f3a5df8d32b940f9cdb35350654bef9
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/9233
Tested-by: build bot (Jenkins)
Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
2015-05-21 20:50:25 +02:00
Patrick Georgi 40c845d352 lint: provide better GPL license text test
Still not lint-stable due to too many open issues, but
at least it doesn't try to touch files that aren't part
of the repository anymore.

Change-Id: I654b15480094c7731a7d0d17fa1622a0b41ac34a
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/6584
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
2014-08-11 19:13:25 +02:00
Stefan Reinauer 2c19f5d333 exclude src/vendorcode from GPLv2 license checks.
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6609 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2011-05-23 17:16:44 +00:00
Patrick Georgi e882630d47 Add test to check for up-to-date GPL license headers to lint.
"make lint" should not stop after first failed test.
Improve "make lint" output.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6097 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-11-19 10:16:43 +00:00