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

Add SPDX linter CI job #683

Closed
3 tasks done
XVilka opened this issue Feb 22, 2021 · 11 comments · Fixed by #1578
Closed
3 tasks done

Add SPDX linter CI job #683

XVilka opened this issue Feb 22, 2021 · 11 comments · Fixed by #1578
Assignees
Labels
blocker documentation Improvements or additions to documentation help wanted Extra attention is needed high-priority infrastructure
Milestone

Comments

@XVilka
Copy link
Member

XVilka commented Feb 22, 2021

Currently Rizin uses SPDX identificators but not all files were converted.
Thus, it's important to be consistent everywhere.

  • Convert all missing files to SPDX identifiers
  • Where copyright is missing add lines like:
SPDX-FileCopyrightText: © {$year_of_file_creation} {$name_of_copyright_holder} <{$contact}>
  • Add a SPDX CI linter checker (reuse lint)

For example, header could look like this:

//  SPDX-FileCopyrightText: 2019 Jane Doe <jane@example.com>
//  SPDX-License-Identifier: GPL-3.0-or-later

Read more at https://reuse.software/tutorial/
Tools are:

Also related #209 (those files should be excluded from check)

@XVilka XVilka added documentation Improvements or additions to documentation infrastructure labels Feb 22, 2021
@XVilka XVilka changed the title Add SPDX linter Add SPDX linter CI job Feb 22, 2021
@XVilka XVilka added the help wanted Extra attention is needed label Feb 23, 2021
@XVilka XVilka added this to the 0.2.0 milestone Feb 23, 2021
@ret2libc
Copy link
Member

ret2libc commented Mar 2, 2021

@ret2libc ret2libc self-assigned this Mar 2, 2021
@XVilka
Copy link
Member Author

XVilka commented Mar 5, 2021

Current status:

rizin on  dev [$] took 40s 
[i] ℤ reuse lint                                                                                                                                                                                                                  13:53:58 
# MISSING COPYRIGHT AND LICENSING INFORMATION

The following files have no copyright and licensing information:
* librz/asm/arch/arm/winedbg/be_arm.h
* librz/asm/arch/ppc/libvle/vle.h
* librz/asm/arch/ppc/libvle/vle_internal.h
* librz/asm/arch/riscv/riscv-opc.h
* librz/asm/arch/spc700/spc700_opcode_table.h
* librz/asm/arch/tms320/c55x/table.h
* librz/asm/binutils_as.h
* librz/asm/p/asm_snes.h
* librz/bin/format/le/le.h
* librz/bin/format/le/le_specs.h
* librz/bin/format/mach0/coresymbolication.h
* librz/bin/format/mach0/fatmach0.h
* librz/bin/format/mach0/mach0.h
* librz/bin/format/mach0/mach0_specs.h
* librz/bin/format/ne/ne.h
* librz/bin/format/ne/ne_specs.h
* librz/bin/format/nin/gba.h
* librz/bin/format/nin/n3ds.h
* librz/bin/format/nin/nds.h
* librz/bin/format/nin/nin.h
* librz/bin/format/objc/mach064_classes.h
* librz/bin/format/objc/mach0_classes.h
* librz/bin/format/omf/omf.h
* librz/bin/format/omf/omf_specs.h
* librz/bin/format/pe/dotnet.h
* librz/bin/format/pe/pemixed.h
* librz/bin/format/psxexe/psxexe.h
* librz/bin/format/qnx/qnx_specs.h
* librz/bin/format/xbe/kernel.h
* librz/bin/format/xbe/xbe.h
* librz/bin/format/xnu/rz_cf_dict.h
* librz/bin/format/zimg/zimg.h
* librz/bin/mangling/demangler.h
* librz/bin/mangling/demangler_types.h
* librz/bin/mangling/microsoft_demangle.h
* librz/debug/p/bfvm.h
* subprojects/packagefiles/libzip-1.7.3/cmake-config.h.in
* subprojects/packagefiles/libzip-1.7.3/cmake-zipconf.h.in
* subprojects/packagefiles/libzip-1.7.3/create_zip_err_str.py
* subprojects/packagefiles/libzip-1.7.3/meson_options.txt
* subprojects/yxml/.gitignore
* test/unit/test_inflate_deflate.c


# SUMMARY

* Bad licenses:
* Deprecated licenses:
* Licenses without file extension:
* Missing licenses:
* Unused licenses:
* Used licenses: Apache-2.0, BSD-2-Clause, BSD-3-Clause, CC-BY-SA-4.0, CC0-1.0, GPL-1.0-or-later, GPL-2.0-only, GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.0-or-later, LGPL-2.1-only, LGPL-2.1-or-later, LGPL-3.0-only, MIT, MS-PL, NCSA, RSA-MD
* Read errors: 0
* Files with copyright information: 3073 / 3115
* Files with license information: 3073 / 3115

Unfortunately, your project is not compliant with version 3.0 of the REUSE Specification :-(

@XVilka
Copy link
Member Author

XVilka commented Mar 16, 2021

This is relevant to us for all these copied third-party sources:

@ret2libc
Copy link
Member

We are almost there with this! :) We can do it!

@mxmehl
Copy link

mxmehl commented Apr 27, 2021

So great to see you working on this!

Regarding CI jobs, I just would like to make sure you are aware of REUSE's information for developers. Including it in CI is simple, and you might also want to consider registering your project to the API to get a dynamic fancy badge to show off :)

@ret2libc

This comment has been minimized.

@wargio

This comment has been minimized.

@wargio

This comment has been minimized.

@XVilka XVilka mentioned this issue Aug 30, 2021
4 tasks
@XVilka
Copy link
Member Author

XVilka commented Aug 30, 2021

Roughly 40 files left to convert/account for.

@XVilka XVilka mentioned this issue Sep 2, 2021
4 tasks
XVilka added a commit that referenced this issue Sep 2, 2021
XVilka added a commit that referenced this issue Sep 2, 2021
* Fix #683 - enable SPDX linter checks
* Add license to the last remaining file
@mxmehl
Copy link

mxmehl commented Sep 17, 2021

Congratulations, good job!

If you want, you could also register the project at the REUSE API and get a shiny badge :)

@XVilka
Copy link
Member Author

XVilka commented Sep 18, 2021

Done: https://api.reuse.software/info/github.com/rizinorg/rizin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker documentation Improvements or additions to documentation help wanted Extra attention is needed high-priority infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants