Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-67283

Use SPDX-License-Identifier: XXX in source files

    XMLWordPrintable

Details

    • User Story
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Other
    • None
    • cd4db512a (dev), ae7b07e08 (6.5)

    Description

      Let's replace our current license disclaimer in files by an SPDX-License-Identifier.

      Advantages

      • More concise (less visual clutter at the beginning of the file)
      • easy to parse by third-party tools
      • easy to validate

      See e.g. the Linux kernel that switched to SPDX-License-Identifier: https://lwn.net/Articles/739183/ . Also KDE has done so.

      A template for setting up using SPDX-License-Identifier is available at https://reuse.software/spec/ . I'm not yet sure whether we can (and should) follow the framework 100% (there's e.g. a requirement to mark the license of every file, which is a bit annoying say for image files, and 3rd party code). But we should only deviate from the suggestions where necessary.

      SPDX License Mapping

      QT_BEGIN_LICENSE SPDX Identifier
      QT_BEGIN_LICENSE:BSD LicenseRef-Qt-Commercial OR BSD-3-Clause
      QT_BEGIN_LICENSE:COMM LicenseRef-Qt-Commercial
      QT_BEGIN_LICENSE:FDL LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
      QT_BEGIN_LICENSE:GPL LicenseRef-Qt-Commercial OR GPL-3.0-only
      QT_BEGIN_LICENSE:GPL-EXCEPT LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
      QT_BEGIN_LICENSE:LGPL LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
      QT_BEGIN_LICENSE:LGPL-NOGPL2 LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-3.0-only
      QT_BEGIN_LICENSE:LGPL-ONLY LGPL-2.1-only
      QT_BEGIN_LICENSE:LGPL3 LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only
      QT_BEGIN_LICENSE:LGPL3-COMM LicenseRef-Qt-Commercial OR LGPL-3.0-only
      QT_BEGIN_LICENSE:MIT MIT

      License files

      Current license files (LICENSE.*) are removed from the main directory of each repository. Instead, licenses named after SPDX identifier:

      • LICENSES/LicenseRef-Qt-Commercial.txt
      • LICENSES/BSD-3-Clause.txt
      • ...

      Qt-Commercial would be a meta-license, like it is currently:

      Licensees holding valid commercial Qt licenses may use this file in
      accordance with the commercial license agreement provided with the
      Software or, alternatively, in accordance with the terms contained in
      a written agreement between you and The Qt Company. For licensing terms
      and conditions see https://www.qt.io/terms-conditions. For further
      information use the contact form at https://www.qt.io/contact-us.

      Action Points

      • Update qtqa license scanner so that it does not bark on missing QT_BEGIN_LICENSE: headers. Instead, consider adapting https://git.fsfe.org/reuse/tool .
      • Mass-change all files, repository by repository (ignoring 3rd party code for now)

      Attachments

        Issue Links

          Activity

            People

              lugerard Lucie Gerard
              kkohne Kai Köhne
              Votes:
              2 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

                Created:
                Updated: