YIO-Remote / web-configurator

🖥️ web configurator - self hosted, locally available website
GNU General Public License v3.0
0 stars 3 forks source link

Add GPL file headers #10

Closed zehnm closed 4 years ago

zehnm commented 4 years ago

Same task as YIO-Remote/remote-software#349

Expected Behavior or Design

The YIO Remote software is licensed under GPL v3 or later (see license information in each GitHub repository). This should not just be reflected in the LICENSE.md file but also in every source file.

Current Behavior or Design

Almost no source file has a license information.

Possible Solution

Add the same file header to each and every source file. The new wifi control source files in feature/322-WiFi_rewrite branch have a file header defined. I suggest using this header as a template. See below in detailed description.

Detailed Description and Additional Information

Suggested license template for new files

I.e. entirely written by one author:

/******************************************************************************
 *
 * Copyright (C) <YEAR(S)> <AUTHOR> <EMAIL>
 *
 * This file is part of the YIO-Remote software project.
 *
 * YIO-Remote software 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 3 of the License, or
 * (at your option) any later version.
 *
 * YIO-Remote software 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 YIO-Remote software. If not, see <https://www.gnu.org/licenses/>.
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *****************************************************************************/

Suggested license template for derived files

I.e. using code from other GPL v3 compatible sources:

/******************************************************************************
 *
 * Copyright (C) <YEAR(S)> <AUTHOR> <EMAIL>
 *
 * Third party work used:
 *
 * <PROJECT_DESCRIPTION>
 * Copyright (C) <YEAR(S)> <ORIGINAL_AUTHOR> <ORIGINAL_EMAIL>
 * Licensed under <LICENSE>.
 *
 *
 * This file is part of the YIO-Remote software project.
 *
 * YIO-Remote software 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 3 of the License, or
 * (at your option) any later version.
 *
 * YIO-Remote software 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 YIO-Remote software. If not, see <https://www.gnu.org/licenses/>.
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *****************************************************************************/

Example wifi_wpasupplicant.h

/******************************************************************************
 *
 * Copyright (C) 2019 Markus Zehnder <business@markuszehnder.ch>
 *
 * Third party work used:
 *
 * DigitalRooster - QT/QML internet radio, podcast player and alarmclock.
 * Copyright (C) 2018 Thomas Ruschival <thomas@ruschival.de>
 * Licensed under GPL 3.0 or later.
 *
 * wpaCute - A graphical wpa_supplicant front end.
 * Copyright (C) 2018 loh.tar@googlemail.com
 * Licensed under BSD license.
 *
 *
 * This file is part of the YIO-Remote software project.
 *
 * YIO-Remote software 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 3 of the License, or
 * (at your option) any later version.
 *
 * YIO-Remote software 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 YIO-Remote software. If not, see <https://www.gnu.org/licenses/>.
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *****************************************************************************/
TombolaShepless commented 4 years ago

@zehnm Is this absolutely necessary? We're adding ~30 lines of comments to every file in the source code? Legally, is this required? If it's not then I'm reluctant to do it for the following reasons:

zehnm commented 4 years ago

I have just copied the task to each repository. You are right, for the web environment it doesn't make sense for every file. Legally nothing is required, but good practice for open source projects. My pragmatic suggestion: add the information to the main html / js file only. Does that work for you?

Tosko4 commented 4 years ago

I have just copied the task to each repository. You are right, for the web environment it doesn't make sense for every file. Legally nothing is required, but good practice for open source projects. My pragmatic suggestion: add the information to the main html / js file only. Does that work for you?

All sub-files could refer to the COPYING file with a copy of the GNU GPL. That would make one line instead of 30 in each file. And also when modifying, you have to alter only 1 file instead of many many many :P

TombolaShepless commented 4 years ago

So each file would be something like:

// Please refer to the LICENSE.md file
zehnm commented 4 years ago

What about:

// @License GPL-3.0-or-later - please refer to LICENSE.md file for details

This contains the official spdx license tag and is human readable. Or:

// @License GPL-3.0-or-later <https://spdx.org/licenses/GPL-3.0-or-later.html>
TombolaShepless commented 4 years ago

I'll let you guys pick which one out of those 2, let me know and I can update

Tosko4 commented 4 years ago

I vote for

// @License GPL-3.0-or-later - please refer to LICENSE.md file for details

zehnm commented 4 years ago

I'm fine with both, let's @martonborzak decide :-)

martonborzak commented 4 years ago

Well, let's do the short one then.