diff --git a/AUTHORS.rst b/AUTHORS.rst index 9a8224dc7da..590a52e51b4 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -13,6 +13,7 @@ The following organizations or individuals have contributed to ScanCode: - Arnaud Jeansen @ajeans - Arnav Mandal @arnav-mandal1234 - Aryan Kenchappagol @aryanxk02 +- Ashutosh Panda @Ashutosh-Panda2004 - Avi Aryan @aviaryan - Aviral Verma @avirlrma - Ayush @macayu17 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index abc3ae41ad2..81a9f12ff45 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -26,6 +26,12 @@ Next release ``ValueError: did not find any 'pre_scan' hooks``. https://github.com/aboutcode-org/scancode-toolkit/issues/5363 +- Fix a GPL-2.0-only license notice, as found in the Linux kernel ``ray_cs.c`` + driver, being detected as another GPL variant. Add rules for the + ``version 2 only`` and ``version 2 or later`` notice variants that end with + the old Free Software Foundation postal address. + https://github.com/aboutcode-org/scancode-toolkit/issues/5039 + v33.0.0rc1 - 2026-05-14 ------------------------ diff --git a/src/licensedcode/data/rules/gpl-2.0-plus_1156.RULE b/src/licensedcode/data/rules/gpl-2.0-plus_1156.RULE new file mode 100644 index 00000000000..4845dc6e5a8 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0-plus_1156.RULE @@ -0,0 +1,18 @@ +--- +license_expression: gpl-2.0-plus +is_license_notice: yes +relevance: 100 +--- + +This driver is free software; you can redistribute it and/or modify +it under the terms of version 2 or later of the {{GNU General Public License}} as +published by the Free Software Foundation. + +It 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA diff --git a/src/licensedcode/data/rules/gpl-2.0_1487.RULE b/src/licensedcode/data/rules/gpl-2.0_1487.RULE new file mode 100644 index 00000000000..c61a97a5ae8 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1487.RULE @@ -0,0 +1,18 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +This driver is free software; you can redistribute it and/or modify +it under the terms of version 2 only of the {{GNU General Public License}} as +published by the Free Software Foundation. + +It 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA diff --git a/tests/licensedcode/data/datadriven/lic1/ray_cs_gpl-2.0-plus.c b/tests/licensedcode/data/datadriven/lic1/ray_cs_gpl-2.0-plus.c new file mode 100644 index 00000000000..f61772ad2d6 --- /dev/null +++ b/tests/licensedcode/data/datadriven/lic1/ray_cs_gpl-2.0-plus.c @@ -0,0 +1,14 @@ +/* + * This driver is free software; you can redistribute it and/or modify + * it under the terms of version 2 or later of the GNU General Public License as + * published by the Free Software Foundation. + * + * It 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ diff --git a/tests/licensedcode/data/datadriven/lic1/ray_cs_gpl-2.0-plus.c.yml b/tests/licensedcode/data/datadriven/lic1/ray_cs_gpl-2.0-plus.c.yml new file mode 100644 index 00000000000..ae3e311a6a8 --- /dev/null +++ b/tests/licensedcode/data/datadriven/lic1/ray_cs_gpl-2.0-plus.c.yml @@ -0,0 +1,2 @@ +license_expressions: + - gpl-2.0-plus diff --git a/tests/licensedcode/data/datadriven/lic1/ray_cs_gpl-2.0.c b/tests/licensedcode/data/datadriven/lic1/ray_cs_gpl-2.0.c new file mode 100644 index 00000000000..7f6ff8d8ac4 --- /dev/null +++ b/tests/licensedcode/data/datadriven/lic1/ray_cs_gpl-2.0.c @@ -0,0 +1,14 @@ +/* + * This driver is free software; you can redistribute it and/or modify + * it under the terms of version 2 only of the GNU General Public License as + * published by the Free Software Foundation. + * + * It 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ diff --git a/tests/licensedcode/data/datadriven/lic1/ray_cs_gpl-2.0.c.yml b/tests/licensedcode/data/datadriven/lic1/ray_cs_gpl-2.0.c.yml new file mode 100644 index 00000000000..a118efcc9c6 --- /dev/null +++ b/tests/licensedcode/data/datadriven/lic1/ray_cs_gpl-2.0.c.yml @@ -0,0 +1,2 @@ +license_expressions: + - gpl-2.0