From b10da3053f0f0d9f6d4b65c3599394c4d5cac0e2 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 19 Jul 2024 09:53:41 +0200 Subject: [PATCH] rasdaemon: enforce SPDX license tags Replace license text comments with SPDX tags. For files that don't have any license, use the COPYING license (GPL-2.0). Signed-off-by: Mauro Carvalho Chehab --- .github/workflows/ci.yml | 2 ++ .github/workflows/gen_release.pl | 2 ++ .github/workflows/on_tag.yml | 2 ++ .travis.yml | 2 ++ Makefile.am | 2 ++ bitfield.c | 21 ++++----------------- bitfield.h | 17 ++--------------- configure.ac | 2 ++ contrib/edac-fake-inject | 1 + contrib/edac-tests | 1 + contrib/mc_event_trigger | 2 ++ contrib/mem_fail_trigger | 2 ++ contrib/qemu_einj.py | 2 +- labels/apple | 2 ++ labels/asrock | 2 ++ labels/asus | 2 ++ labels/dell | 2 ++ labels/gigabyte | 6 ++++-- labels/intel | 2 ++ labels/lenovo | 4 +++- labels/supermicro | 2 ++ man/Makefile.am | 2 ++ man/ras-mc-ctl.8.in | 4 +++- man/rasdaemon.1.in | 4 +++- mce-amd-k8.c | 19 +++---------------- mce-amd-smca.c | 10 +--------- mce-amd.c | 10 +--------- mce-intel-broadwell-de.c | 15 +-------------- mce-intel-broadwell-epex.c | 16 ++-------------- mce-intel-dunnington.c | 18 +++--------------- mce-intel-haswell.c | 16 ++-------------- mce-intel-i10nm.c | 16 ++-------------- mce-intel-ivb.c | 16 ++-------------- mce-intel-knl.c | 16 +--------------- mce-intel-nehalem.c | 18 +++--------------- mce-intel-p4-p6.c | 18 +++--------------- mce-intel-sb.c | 18 +++--------------- mce-intel-skylake-xeon.c | 16 ++-------------- mce-intel-tulsa.c | 18 +++--------------- mce-intel.c | 20 ++++---------------- misc/ras-mc-ctl.service.in | 2 ++ misc/rasdaemon.env | 2 ++ misc/rasdaemon.service.in | 2 ++ misc/rasdaemon.spec.in | 2 ++ new_ver.sh | 1 + non-standard-ampere.c | 8 ++------ non-standard-ampere.h | 8 ++------ non-standard-hisi_hip08.c | 8 ++------ non-standard-hisilicon.c | 8 ++------ non-standard-hisilicon.h | 8 ++------ non-standard-jaguarmicro.c | 8 ++------ non-standard-jaguarmicro.h | 8 ++------ non-standard-yitian.c | 8 ++------ non-standard-yitian.h | 8 ++------ queue.c | 12 ++---------- queue.h | 12 ++---------- ras-aer-handler.c | 18 +++--------------- ras-aer-handler.h | 18 +++--------------- ras-arm-handler.c | 11 ++--------- ras-arm-handler.h | 11 ++--------- ras-cpu-isolation.c | 12 ++---------- ras-cpu-isolation.h | 12 ++---------- ras-cxl-handler.c | 12 ++---------- ras-cxl-handler.h | 12 ++---------- ras-devlink-handler.c | 16 ++-------------- ras-devlink-handler.h | 16 ++-------------- ras-diskerror-handler.c | 16 ++-------------- ras-diskerror-handler.h | 16 ++-------------- ras-events.c | 18 +++--------------- ras-events.h | 18 +++--------------- ras-extlog-handler.c | 16 ++-------------- ras-extlog-handler.h | 16 ++-------------- ras-logger.h | 16 ++-------------- ras-mc-handler.c | 18 +++--------------- ras-mc-handler.h | 18 +++--------------- ras-mce-handler.c | 20 ++++---------------- ras-mce-handler.h | 18 +++--------------- ras-memory-failure-handler.c | 12 ++---------- ras-memory-failure-handler.h | 12 ++---------- ras-non-standard-handler.c | 11 ++--------- ras-non-standard-handler.h | 11 ++--------- ras-page-isolation.c | 12 ++---------- ras-page-isolation.h | 12 ++---------- ras-record.c | 18 +++--------------- ras-record.h | 18 +++--------------- ras-report.c | 11 ++--------- ras-report.h | 11 ++--------- rasdaemon.c | 18 +++--------------- rbtree.c | 16 ++-------------- rbtree.h | 15 +-------------- scripts/spelling.txt | 4 ++-- trigger.c | 2 ++ trigger.h | 2 ++ types.h | 17 +---------------- util/Makefile.am | 1 + util/ras-mc-ctl.in | 15 +-------------- 96 files changed, 207 insertions(+), 794 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b27d8a0..81500b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0 + name: CI on: diff --git a/.github/workflows/gen_release.pl b/.github/workflows/gen_release.pl index 75a698e..c21d172 100755 --- a/.github/workflows/gen_release.pl +++ b/.github/workflows/gen_release.pl @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0 + #!/usr/bin/perl my $body_path = shift or die "Need a file name to store the release body"; diff --git a/.github/workflows/on_tag.yml b/.github/workflows/on_tag.yml index 71f2b09..2b5d423 100644 --- a/.github/workflows/on_tag.yml +++ b/.github/workflows/on_tag.yml @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0 + name: Create release on tag on: diff --git a/.travis.yml b/.travis.yml index b6aa28f..61101f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0 + language: cpp compiler: gcc dist: bionic diff --git a/Makefile.am b/Makefile.am index 56a8a63..b6821f3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0 + AM_DISTCHECK_CONFIGURE_FLAGS = --enable-all ACLOCAL_AMFLAGS=-I m4 SUBDIRS = util man diff --git a/bitfield.c b/bitfield.c index 7766579..a0003d7 100644 --- a/bitfield.c +++ b/bitfield.c @@ -1,22 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 /* - * Copyright (C) 2013 Mauro Carvalho Chehab + * Copyright (C) 2013 Mauro Carvalho Chehab * - * The code below were adapted from Andi Kleen/Intel/SuSe mcelog code, - * released under GNU Public General License, v.2 - * - * 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 + * The code below were adapted from Andi Kleen/Intel/SUSE mcelog code, + * released under GNU Public General License, v.2. */ #include diff --git a/bitfield.h b/bitfield.h index b38db42..6754540 100644 --- a/bitfield.h +++ b/bitfield.h @@ -1,20 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* - * The code below came from Andi Kleen/Intel/SuSe mcelog code, + * The code below came from Andi Kleen/Intel/SUSE mcelog code, * released under GNU Public General License, v.2 - * - * 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 */ #include diff --git a/configure.ac b/configure.ac index 9495a9d..1059f3c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0 + AC_INIT([RASdaemon],[0.8.1]) AM_SILENT_RULES([yes]) AC_CANONICAL_TARGET diff --git a/contrib/edac-fake-inject b/contrib/edac-fake-inject index e0bbae7..8ba533a 100755 --- a/contrib/edac-fake-inject +++ b/contrib/edac-fake-inject @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-2.0 MC="$(ls -d /sys/devices/system/edac/mc/mc? |sed -e s,.*/mc,,)" diff --git a/contrib/edac-tests b/contrib/edac-tests index 4910de2..8872001 100755 --- a/contrib/edac-tests +++ b/contrib/edac-tests @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-2.0 FILE=new-$(hostname)-$(date +"%Y-%m-%d-%H-%M-%S").txt run() { diff --git a/contrib/mc_event_trigger b/contrib/mc_event_trigger index 5c6ccfa..9862595 100755 --- a/contrib/mc_event_trigger +++ b/contrib/mc_event_trigger @@ -1,4 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# # This shell script can be executed by rasdaemon in daemon mode when a # mc_event is occured, environment variables include all information # reported by tracepoint. diff --git a/contrib/mem_fail_trigger b/contrib/mem_fail_trigger index a3ac362..d75ce50 100755 --- a/contrib/mem_fail_trigger +++ b/contrib/mem_fail_trigger @@ -1,4 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# # This shell script can be executed by rasdaemon in daemon mode when a # memory_failure_event is occured, environment variables include all # information reported by tracepoint. diff --git a/contrib/qemu_einj.py b/contrib/qemu_einj.py index 611d923..0c28660 100755 --- a/contrib/qemu_einj.py +++ b/contrib/qemu_einj.py @@ -3,7 +3,7 @@ # pylint: disable=C0301, C0114 # SPDX-License-Identifier: GPL-2.0 # -# Copyright (C) 2024 Mauro Carvalho Chehab +# Copyright (C) 2024 Mauro Carvalho Chehab import argparse import json diff --git a/labels/apple b/labels/apple index 2fece6e..264c75e 100644 --- a/labels/apple +++ b/labels/apple @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0 + # RASDAEMON Motherboard DIMM labels Database file. # # Vendor-name and model-name are found from the program 'dmidecode' diff --git a/labels/asrock b/labels/asrock index d7dd29a..30ae8ea 100644 --- a/labels/asrock +++ b/labels/asrock @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0 + # RASDAEMON Motherboard DIMM labels Database file. # # Vendor-name and model-name are found from the program 'dmidecode' diff --git a/labels/asus b/labels/asus index a18e8a1..83090b4 100644 --- a/labels/asus +++ b/labels/asus @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0 + # RASDAEMON Motherboard DIMM labels Database file. # # Vendor-name and model-name are found from the program 'dmidecode' diff --git a/labels/dell b/labels/dell index dadf2c1..005dc03 100644 --- a/labels/dell +++ b/labels/dell @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0 + # RASDAEMON Motherboard DIMM labels Database file. # # Vendor-name and model-name are found from the program 'dmidecode' diff --git a/labels/gigabyte b/labels/gigabyte index 31b6ad6..5cc7e46 100644 --- a/labels/gigabyte +++ b/labels/gigabyte @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0 + # vendor: GIGABYTE model: MZ62-HD0-00 @@ -6,8 +8,8 @@ vendor: GIGABYTE #