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

Check SPDX license header in source codes #173

Merged
merged 8 commits into from
Mar 6, 2023

Conversation

mwperina
Copy link
Member

@mwperina mwperina commented Mar 2, 2023

Each source file should contain SPDX license header to clearly identify
the license it's published with.
More information about SPDX can be found at:

This PR adds checking SPDX headers in C, shell, XML and meson.build files.

Signed-off-by: Martin Perina mperina@redhat.com

@mwperina
Copy link
Member Author

mwperina commented Mar 2, 2023

Action doesn't work if source code doesn't contain SPDX header enarx/spdx#16
But this is the most important flow, it raise an error if SPDX header is not found, so looking for different solution

@mwperina mwperina marked this pull request as ready for review March 2, 2023 18:15
@mwperina mwperina force-pushed the add-spdx-header branch 2 times, most recently from c98ef0f to 27c80b5 Compare March 2, 2023 18:16
Each source file should contain SPDX license header to clearly identify
the license it's published with.
More information about SPDX can be found at:

* https://opensource.com/article/18/1/spdx-and-licensing
* https://spdx.dev/

Signed-off-by: Martin Perina <mperina@redhat.com>
1. Adds SPDX header mentioning GPL-2.0-or-later license into hirte
   original C source code files
2. Adds GPL-2.0-or-later into approved licenses

Signed-off-by: Martin Perina <mperina@redhat.com>
Adds LGPL-2.1-or-later to the list of existing licenses, because it's
used in `src/libhirte/common/list.h` containing list macros copied from
systemd.

Signed-off-by: Martin Perina <mperina@redhat.com>
Adds BSD-3-Clause to the list of existing licenses, because it's used in
`src/libhirte/ini/`, which contains parsing of ini files copied from
https://github.com/benhoyt/inih

Signed-off-by: Martin Perina <mperina@redhat.com>
Adds MIT to the list of existing licenses, because it's used in
`src/libhirte/hashmap/`, which contains hashmap implementation
copied from https://github.com/tidwall/hashmap.c

Signed-off-by: Martin Perina <mperina@redhat.com>
Adds SPDX header check also to XML files, which are included in hirte
packages.

Signed-off-by: Martin Perina <mperina@redhat.com>
Adds SPDX header check also to meson.build files.

Signed-off-by: Martin Perina <mperina@redhat.com>
Adds SPDX header check also to shell files.

Signed-off-by: Martin Perina <mperina@redhat.com>
Copy link
Member

@engelmi engelmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mwperina mwperina merged commit 2c5edff into eclipse-bluechi:main Mar 6, 2023
@mwperina mwperina deleted the add-spdx-header branch March 6, 2023 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants