From 68d8f721f3d171449f3514f4cc63ea2720bd57b5 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 17 Apr 2024 15:31:50 +0100 Subject: [PATCH 1/6] codegen: Trivially add SPDX-License-Identifier to codegen Python files The license and copyright are already stated in human-readable form in these files, so this should be uncontroversial. Signed-off-by: Philip Withnall Helps: #1415 --- gio/gdbus-2.0/codegen/__init__.py | 2 ++ gio/gdbus-2.0/codegen/codegen.py | 2 ++ gio/gdbus-2.0/codegen/codegen_docbook.py | 2 ++ gio/gdbus-2.0/codegen/codegen_main.py | 2 ++ gio/gdbus-2.0/codegen/config.py.in | 2 ++ gio/gdbus-2.0/codegen/dbustypes.py | 2 ++ gio/gdbus-2.0/codegen/gdbus-codegen.in | 2 ++ gio/gdbus-2.0/codegen/parser.py | 2 ++ gio/gdbus-2.0/codegen/utils.py | 2 ++ 9 files changed, 18 insertions(+) diff --git a/gio/gdbus-2.0/codegen/__init__.py b/gio/gdbus-2.0/codegen/__init__.py index ed324d7cf..f54f49267 100644 --- a/gio/gdbus-2.0/codegen/__init__.py +++ b/gio/gdbus-2.0/codegen/__init__.py @@ -4,6 +4,8 @@ # # Copyright (C) 2008-2011 Red Hat, Inc. # +# SPDX-License-Identifier: LGPL-2.1-or-later +# # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either diff --git a/gio/gdbus-2.0/codegen/codegen.py b/gio/gdbus-2.0/codegen/codegen.py index 2e8ef8e2a..54ae80c9b 100644 --- a/gio/gdbus-2.0/codegen/codegen.py +++ b/gio/gdbus-2.0/codegen/codegen.py @@ -6,6 +6,8 @@ # Copyright (C) 2008-2018 Red Hat, Inc. # Copyright (C) 2018 Iñigo Martínez # +# SPDX-License-Identifier: LGPL-2.1-or-later +# # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either diff --git a/gio/gdbus-2.0/codegen/codegen_docbook.py b/gio/gdbus-2.0/codegen/codegen_docbook.py index 2bffd61f9..b9436c4af 100644 --- a/gio/gdbus-2.0/codegen/codegen_docbook.py +++ b/gio/gdbus-2.0/codegen/codegen_docbook.py @@ -4,6 +4,8 @@ # # Copyright (C) 2008-2011 Red Hat, Inc. # +# SPDX-License-Identifier: LGPL-2.1-or-later +# # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either diff --git a/gio/gdbus-2.0/codegen/codegen_main.py b/gio/gdbus-2.0/codegen/codegen_main.py index d5353f570..510dd7849 100644 --- a/gio/gdbus-2.0/codegen/codegen_main.py +++ b/gio/gdbus-2.0/codegen/codegen_main.py @@ -6,6 +6,8 @@ # Copyright (C) 2008-2011 Red Hat, Inc. # Copyright (C) 2018 Iñigo Martínez # +# SPDX-License-Identifier: LGPL-2.1-or-later +# # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either diff --git a/gio/gdbus-2.0/codegen/config.py.in b/gio/gdbus-2.0/codegen/config.py.in index 4e6df5a09..aebc424d5 100644 --- a/gio/gdbus-2.0/codegen/config.py.in +++ b/gio/gdbus-2.0/codegen/config.py.in @@ -4,6 +4,8 @@ # # Copyright (C) 2008-2011 Red Hat, Inc. # +# SPDX-License-Identifier: LGPL-2.1-or-later +# # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either diff --git a/gio/gdbus-2.0/codegen/dbustypes.py b/gio/gdbus-2.0/codegen/dbustypes.py index e16ea52f9..5b33f07cb 100644 --- a/gio/gdbus-2.0/codegen/dbustypes.py +++ b/gio/gdbus-2.0/codegen/dbustypes.py @@ -4,6 +4,8 @@ # # Copyright (C) 2008-2011 Red Hat, Inc. # +# SPDX-License-Identifier: LGPL-2.1-or-later +# # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in index 8f9f3108c..877505e12 100755 --- a/gio/gdbus-2.0/codegen/gdbus-codegen.in +++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in @@ -4,6 +4,8 @@ # # Copyright (C) 2008-2011 Red Hat, Inc. # +# SPDX-License-Identifier: LGPL-2.1-or-later +# # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either diff --git a/gio/gdbus-2.0/codegen/parser.py b/gio/gdbus-2.0/codegen/parser.py index 207e4d3c9..e8e826e02 100644 --- a/gio/gdbus-2.0/codegen/parser.py +++ b/gio/gdbus-2.0/codegen/parser.py @@ -4,6 +4,8 @@ # # Copyright (C) 2008-2011 Red Hat, Inc. # +# SPDX-License-Identifier: LGPL-2.1-or-later +# # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py index 08f1ba973..6399945f2 100644 --- a/gio/gdbus-2.0/codegen/utils.py +++ b/gio/gdbus-2.0/codegen/utils.py @@ -4,6 +4,8 @@ # # Copyright (C) 2008-2011 Red Hat, Inc. # +# SPDX-License-Identifier: LGPL-2.1-or-later +# # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either From c8d199dc0d959fc0ce046e9c400805d1f88a9440 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 17 Apr 2024 15:32:42 +0100 Subject: [PATCH 2/6] reuse: License all .gitignore files as CC0-1.0 (public domain) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They’re all too trivial to actually have an enforceable copyright on. Signed-off-by: Philip Withnall Helps: #1415 --- .reuse/dep5 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.reuse/dep5 b/.reuse/dep5 index 72a4790ab..f44bce0d1 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -21,6 +21,13 @@ Files: Copyright: See individual files License: CC0-1.0 +# .gitignore files are too simple to be copyrightable +Files: + .gitignore + **/.gitignore +Copyright: See individual files +License: CC0-1.0 + # Translation files are explicitly contributed under the license of the project, # but by multiple authors Files: po/*.po From 34050a5c12f4344d38e8203806e82ff7d30bef9f Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 17 Apr 2024 15:33:24 +0100 Subject: [PATCH 3/6] codegen: Add license and copyright headers to remaining files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `.flake8` file has a trivial version history, so the copyright is straightforward from that. `meson.build` has a more complex history, but the only significant contributions were from Centricular. From `git log gio/gdbus-2.0/codegen/meson.build`, the other (following) commits are too trivial to be copyrightable: - d10be6102f28e63f5d85c9d8500af28dff2b7ca7 - 30b25a6fd9b48fb94542919288481e0c5f4e77e9 - 95fa229f34f8efdbe44091d1f3f9a87c3139bd52 - 631c3534b784b44578860c1971c4ebd297c40f33 - 00d7568e4f2590af8d7947ca222c9451ada5c2ff - 9734e4854ebeaee684d566daa97cb518c4488b0e - 65be80c3edbcf3f10ae63f529a53ba95dddf6186 - 66e4ba806a8e7c4ad933d3b3c063f45f4ccf4504 - a1c78d63ef758df68d01d43d3be8d7c3cb600bea - a73ca336aa7b0e535338868b296f658a62f0fd77 - 19353017a786e90e00c29890ba6ca2ef88798df4 - b4231844a27352062324a2486f0169315aef5a9c - 4cb945d780d73319b56cac04f4cbb8f609b8cdc0 - 4ce58df8540f25f823418a1d45ddb07ada52ec22 - e2433308c465df3dd6fd6c34b893ca36da050e39 - 013980d8398b1010c0e3414e5d1f06030fa557d2 Both files were contributed while the `COPYING` file for GLib was LGPL-2.1-or-later, so both were previously implicitly licensed as that. Let’s make that explicit. Signed-off-by: Philip Withnall Helps: #1415 --- gio/gdbus-2.0/codegen/.flake8 | 3 +++ gio/gdbus-2.0/codegen/meson.build | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/gio/gdbus-2.0/codegen/.flake8 b/gio/gdbus-2.0/codegen/.flake8 index 9450a2832..5fe8778a8 100644 --- a/gio/gdbus-2.0/codegen/.flake8 +++ b/gio/gdbus-2.0/codegen/.flake8 @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2022 Emmanuele Bassi +# SPDX-License-Identifier: LGPL-2.1-or-later + [flake8] # We are generating long lines through templates max-line-length = 120 diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build index a8dfd6287..67ea9f2ee 100644 --- a/gio/gdbus-2.0/codegen/meson.build +++ b/gio/gdbus-2.0/codegen/meson.build @@ -1,3 +1,20 @@ +# Copyright 2016, 2017 Centricular +# +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, see . + gdbus_codegen_files = [ '__init__.py', 'codegen.py', From 417f6a4bde9bb1254522637f203dda025ea50e1f Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 17 Apr 2024 15:42:54 +0100 Subject: [PATCH 4/6] inotify: Trivially add SPDX-License-Identifier to inotify files The license and copyright are already stated in human-readable form in these files, so this should be uncontroversial. Signed-off-by: Philip Withnall Helps: #1415 --- gio/inotify/ginotifyfilemonitor.c | 2 ++ gio/inotify/ginotifyfilemonitor.h | 2 ++ gio/inotify/inotify-helper.c | 2 ++ gio/inotify/inotify-helper.h | 2 ++ gio/inotify/inotify-kernel.c | 2 ++ gio/inotify/inotify-kernel.h | 2 ++ gio/inotify/inotify-missing.c | 2 ++ gio/inotify/inotify-missing.h | 2 ++ gio/inotify/inotify-path.c | 2 ++ gio/inotify/inotify-path.h | 2 ++ gio/inotify/inotify-sub.c | 2 ++ gio/inotify/inotify-sub.h | 2 ++ 12 files changed, 24 insertions(+) diff --git a/gio/inotify/ginotifyfilemonitor.c b/gio/inotify/ginotifyfilemonitor.c index b2364cc2c..87d0c1dfa 100644 --- a/gio/inotify/ginotifyfilemonitor.c +++ b/gio/inotify/ginotifyfilemonitor.c @@ -3,6 +3,8 @@ * Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2007 Sebastian Dröge. * + * SPDX-License-Identifier: LGPL-2.1-or-later + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either diff --git a/gio/inotify/ginotifyfilemonitor.h b/gio/inotify/ginotifyfilemonitor.h index 2b40ff2f6..22636b9f9 100644 --- a/gio/inotify/ginotifyfilemonitor.h +++ b/gio/inotify/ginotifyfilemonitor.h @@ -3,6 +3,8 @@ * Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2007 Sebastian Dröge. * + * SPDX-License-Identifier: LGPL-2.1-or-later + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either diff --git a/gio/inotify/inotify-helper.c b/gio/inotify/inotify-helper.c index c2b98b167..ef4b741c3 100644 --- a/gio/inotify/inotify-helper.c +++ b/gio/inotify/inotify-helper.c @@ -4,6 +4,8 @@ Copyright (C) 2007 John McCutchan + SPDX-License-Identifier: LGPL-2.1-or-later + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either diff --git a/gio/inotify/inotify-helper.h b/gio/inotify/inotify-helper.h index 340f33d39..7f9fba5eb 100644 --- a/gio/inotify/inotify-helper.h +++ b/gio/inotify/inotify-helper.h @@ -2,6 +2,8 @@ Copyright (C) 2007 John McCutchan + SPDX-License-Identifier: LGPL-2.1-or-later + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either diff --git a/gio/inotify/inotify-kernel.c b/gio/inotify/inotify-kernel.c index f950a2174..19eac09c4 100644 --- a/gio/inotify/inotify-kernel.c +++ b/gio/inotify/inotify-kernel.c @@ -2,6 +2,8 @@ Copyright (C) 2005 John McCutchan Copyright © 2015 Canonical Limited + SPDX-License-Identifier: LGPL-2.1-or-later + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either diff --git a/gio/inotify/inotify-kernel.h b/gio/inotify/inotify-kernel.h index c11cd7cdf..464229a6c 100644 --- a/gio/inotify/inotify-kernel.h +++ b/gio/inotify/inotify-kernel.h @@ -1,6 +1,8 @@ /* Copyright (C) 2005 John McCutchan + SPDX-License-Identifier: LGPL-2.1-or-later + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either diff --git a/gio/inotify/inotify-missing.c b/gio/inotify/inotify-missing.c index b71b2d339..01546da43 100644 --- a/gio/inotify/inotify-missing.c +++ b/gio/inotify/inotify-missing.c @@ -4,6 +4,8 @@ Copyright (C) 2005 John McCutchan + SPDX-License-Identifier: LGPL-2.1-or-later + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either diff --git a/gio/inotify/inotify-missing.h b/gio/inotify/inotify-missing.h index f0ccdce35..0cd531dec 100644 --- a/gio/inotify/inotify-missing.h +++ b/gio/inotify/inotify-missing.h @@ -2,6 +2,8 @@ Copyright (C) 2006 John McCutchan + SPDX-License-Identifier: LGPL-2.1-or-later + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either diff --git a/gio/inotify/inotify-path.c b/gio/inotify/inotify-path.c index e1129cd72..b7343e462 100644 --- a/gio/inotify/inotify-path.c +++ b/gio/inotify/inotify-path.c @@ -5,6 +5,8 @@ Copyright (C) 2006 John McCutchan Copyright (C) 2009 Codethink Limited + SPDX-License-Identifier: LGPL-2.1-or-later + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either diff --git a/gio/inotify/inotify-path.h b/gio/inotify/inotify-path.h index 26f6dfd8b..0b21a1a09 100644 --- a/gio/inotify/inotify-path.h +++ b/gio/inotify/inotify-path.h @@ -1,6 +1,8 @@ /* Copyright (C) 2005 John McCutchan + SPDX-License-Identifier: LGPL-2.1-or-later + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either diff --git a/gio/inotify/inotify-sub.c b/gio/inotify/inotify-sub.c index baa6b6e11..89c991b56 100644 --- a/gio/inotify/inotify-sub.c +++ b/gio/inotify/inotify-sub.c @@ -4,6 +4,8 @@ Copyright (C) 2006 John McCutchan + SPDX-License-Identifier: LGPL-2.1-or-later + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either diff --git a/gio/inotify/inotify-sub.h b/gio/inotify/inotify-sub.h index fcde4f4cd..d7bda6a29 100644 --- a/gio/inotify/inotify-sub.h +++ b/gio/inotify/inotify-sub.h @@ -2,6 +2,8 @@ Copyright (C) 2006 John McCutchan + SPDX-License-Identifier: LGPL-2.1-or-later + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either From 8138246ab8f55e2243b7eae8a428643aa09bf815 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 17 Apr 2024 15:43:31 +0100 Subject: [PATCH 5/6] inotify: Add license and copyright headers to meson.build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The copyright from `git log gio/inotify/meson.build` is now included in the file header. The following commits are too trivial to be copyrightable: - d10be6102f28e63f5d85c9d8500af28dff2b7ca7 - 03e86d000fee7f59e793f7367f9db510a209b30a - 1741fc2c6eb8e11f4e786ccc5c19c0da327630a5 - 8733d172a39a890f87f61579872c1aeba7c5e4c4 The file was contributed while the `COPYING` file for GLib was LGPL-2.1-or-later, so was previously implicitly licensed as that. Let’s make that explicit. Signed-off-by: Philip Withnall Helps: #1415 --- gio/inotify/meson.build | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gio/inotify/meson.build b/gio/inotify/meson.build index 8c7d6aaa0..4c51c33c9 100644 --- a/gio/inotify/meson.build +++ b/gio/inotify/meson.build @@ -1,3 +1,24 @@ +# Copyright 2016 Centricular +# Copyright 2018 Endless Mobile, Inc. +# Copyright 2022 Collabora, Ltd. +# Copyright 2023 Eli Schwartz +# Copyright 2023 Canonical Ltd. +# +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, see . + inotify_sources = [ 'inotify-kernel.c', 'inotify-sub.c', From ba219db83b9407020156bb69bd086b79fa89f137 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 17 Apr 2024 15:47:02 +0100 Subject: [PATCH 6/6] tests: Update the reuse lint limits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit More files now have their copyright and/or licensing tagged explicitly, so let’s reduce the wiggle room for regressions. Signed-off-by: Philip Withnall See: #1415 --- tests/reuse.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/reuse.sh b/tests/reuse.sh index e9d9e0641..590a72843 100755 --- a/tests/reuse.sh +++ b/tests/reuse.sh @@ -36,8 +36,8 @@ git submodule update --init >&2 # suitable copyright/licensing information has increased from a baseline # FIXME: Eventually this script can check whether *any* files are missing # information. But for now, let’s slowly improve the baseline. -files_without_copyright_information_max=343 -files_without_license_information_max=414 +files_without_copyright_information_max=336 +files_without_license_information_max=386 # The || true is because `reuse lint` will exit with status 1 if the project is not compliant # FIXME: Once https://github.com/fsfe/reuse-tool/issues/512 or