Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect https://software.reuse new copyright syntax #1816

Closed
pombredanne opened this issue Nov 5, 2019 · 8 comments
Closed

Detect https://software.reuse new copyright syntax #1816

pombredanne opened this issue Nov 5, 2019 · 8 comments

Comments

@pombredanne
Copy link
Member

Description

See https://github.com/fsfe/reuse-tool/blob/4fe435ad269e26df38d4c6a5abc4747908dac8cc/src/reuse/_comment.py#L2 in the form of:

# SPDX-FileCopyrightText: 2019 Free Software Foundation Europe e.V.
# SPDX-FileCopyrightText: 2019 Kirill Elagin
@hahasuperking
Copy link

@pombredanne Can you please assign the ticket to me?

@carmenbianca
Copy link
Contributor

SPDX recently formalised this in spdx/spdx-spec#196

Though it's not formally released at the moment.

@pombredanne
Copy link
Member Author

@carmenbianca 👍 thanks!

@carmenbianca
Copy link
Contributor

Might this be a duplicate of #1022? Or vice versa.

@rainerth
Copy link

Any plans to enhance scancode towards reuse / SPDX-2.1 compatibility? We use reuse for a new OS project and it would be fantastic to use scancode. Currently this kind of headers are not detected:

// SPDX-FileCopyrightText: 2009-2020 Company, authors: Joe Doe
//
// SPDX-License-Identifier: MPL-2.0

Or
// SPDX-FileCopyrightText: Company
// SPDX-FileContributor: authors: Joe Doe
// SPDX-FileContributor: modified by Bill Smith bill@smi.th
//
// SPDX-License-Identifier: MPL-2.0

@pombredanne
Copy link
Member Author

These are detected alright:

# SPDX-FileCopyrightText: 2019 Free Software Foundation Europe e.V.
# SPDX-FileCopyrightText: 2019 Kirill Elagin

yield this with:
scancode -c --yaml -

        copyrights:
            -   copyright: Copyright 2019 Free Software Foundation Europe e.V.
                start_line: 1
                end_line: 1
            -   copyright: Copyright 2019 Kirill Elagin
                start_line: 2
                end_line: 2
        holders:
            -   holder: Free Software Foundation Europe e.V.
                start_line: 1
                end_line: 1
            -   holder: Kirill Elagin
                start_line: 2
                end_line: 2

pombredanne added a commit that referenced this issue Feb 2, 2022
This will help detect SPDX-FileContributor tags

Reported-by: Rainer Thieringer @rainerth
Reference: #1816
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
pombredanne added a commit that referenced this issue Feb 2, 2022
Reported-by: Rainer Thieringer @rainerth
Reference: #1816
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
@pombredanne
Copy link
Member Author

Any plans to enhance scancode towards reuse / SPDX-2.1 compatibility? We use reuse for a new OS project and it would be fantastic to use scancode. Currently this kind of headers are not detected:

// SPDX-FileCopyrightText: 2009-2020 Company, authors: Joe Doe
//
// SPDX-License-Identifier: MPL-2.0

Or
// SPDX-FileCopyrightText: Company
// SPDX-FileContributor: authors: Joe Doe
// SPDX-FileContributor: modified by Bill Smith bill@smi.th
//
// SPDX-License-Identifier: MPL-2.0

@rainerth The SPDX-FileContributor is SPDX alright but seldom seen used in a file and not a reuse spec...It would be easy enough to add this as an "author" tag in ScanCode ... I can see enough instances of it in the wild to add it

So I pushed this #2838
and now we get this:

 * SPDX-FileCopyrightText: 2008 Red Hat Inc.
 * SPDX-FileContributor: Adam Jackson <ajax@redhat.com>
 * SPDX-FileContributor: Bill Nottingham <notting@redhat.com>
 * SPDX-FileContributor: Ray Strode <rstrode@redhat.com>

detected as:

copyrights:
    -   copyright: Copyright 2008 Red Hat Inc.
        start_line: 1
        end_line: 1
holders:
    -   holder: Red Hat Inc.
        start_line: 1
        end_line: 1
authors:
    -   author: Adam Jackson <ajax@redhat.com>
        start_line: 2
        end_line: 2
    -   author: Bill Nottingham <notting@redhat.com>
        start_line: 3
        end_line: 3
    -   author: Ray Strode <rstrode@redhat.com>
        start_line: 4
        end_line: 4

@pombredanne
Copy link
Member Author

Feedback welcomed on the PR. Closing this for now

pombredanne added a commit that referenced this issue Feb 2, 2022
This will help detect SPDX-FileContributor tags
But not plain "contributor" words

Reported-by: Rainer Thieringer @rainerth
Reference: #1816
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants