Skip to content

Fix source code file license headers#303

Merged
wolfgangmm merged 2 commits into
eXist-db:masterfrom
adamretter:hotfix/license-headers
Jul 21, 2025
Merged

Fix source code file license headers#303
wolfgangmm merged 2 commits into
eXist-db:masterfrom
adamretter:hotfix/license-headers

Conversation

@adamretter
Copy link
Copy Markdown
Contributor

@adamretter adamretter commented Jun 24, 2025

Previously the files had a jumble of varying license header definitions that were all LGPL 2.1. I have added the license-maven-plugin and configured it to be the same as eXist-db so that you have consistent LGPL 2.1 header definitions. I then applied the plugin over the source files, it added license headers where they were missing, and corrected the incorrect ones.

From now on the plugin will enforce that all source files have the correct license header at build time, if they don't the build will fail with details of which files need to be updated with the correct license header.

NOTE This should be merged before #298

Copy link
Copy Markdown

@marmoure marmoure left a comment

Choose a reason for hiding this comment

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

LGTM thanks @adamretter for template.

@adamretter adamretter force-pushed the hotfix/license-headers branch from 8d596e0 to f1c5f62 Compare June 24, 2025 11:44
@dizzzz
Copy link
Copy Markdown
Member

dizzzz commented Jun 25, 2025

Thnx @adamretter for the PR.

In the community notes we discussed the 'license bloat', from which we'd like to get rid of; We'll probably introduce a 'spdx statement' for each of all source files (instead).

@adamretter
Copy link
Copy Markdown
Contributor Author

adamretter commented Jun 25, 2025

In the community notes we discussed the 'license bloat', from which we'd like to get rid of;

@dizzzz I am not sure what you mean by 'license bloat'. Can you explain please?
I took a look at the notes, but it seems if you were not present at the call then they don't help anyone else understand what was discussed there.

We'll probably introduce a 'spdx statement' for each of all source files (instead).

@dizzzz That would seem to be incompatible with LGPL 2.1. See: https://opensource.org/license/lgpl-2-1#:~:text=How%20to%20Apply%20These%20Terms%20to%20Your%20New%20Libraries

@dizzzz
Copy link
Copy Markdown
Member

dizzzz commented Jun 26, 2025

'license bloat' is al about the extremely large headers in the code base, partly contributed by you.
The item is in the notes but indeed quite 'compact'. The LICENSE file on top of the distributions remains there.

@adamretter
Copy link
Copy Markdown
Contributor Author

adamretter commented Jun 26, 2025

extremely large headers

@dizzzz What do you consider to be extremely large? We were simply following the prescribed instructions for applying the relevant licensing in the code base.

partly contributed by you.

Yes, it was a lot of work. I had to email and get consent from many past contributors. The PR was here - eXist-db/exist#3305. You yourself approved it, and @joewiz merged it.

The LICENSE file on top of the distributions remains there.

As it should.

As this PR improves the current situation significantly, and already has two approvals (the required amount), and there is no other alternative PR available right now, why not merge this? If someone wants to improve it later they are welcome to do so when they are ready of course.

@dizzzz
Copy link
Copy Markdown
Member

dizzzz commented Jun 26, 2025

The spdx remark from my side was not specific targeted on monex.

Large is for me all larger than a few lines e.g. the full LGPL header; A good example are the duplicate headers that have been added by you on a many places.

There is a consensus that the headers of all source files are just too large whilst they have no added value, except adding lines of code;

@reinhapa pointed out that many projects, e.g. the Linux kernel, changed the source code headers style in something much compacter and more comprehensible

example: https://github.com/torvalds/linux/blob/master/block/badblocks.c

in the community call we really liked this idea.

@adamretter
Copy link
Copy Markdown
Contributor Author

A good example are the duplicate headers that have been added by you on a many places.

@dizzzz Can you provide an example(s) please?

@dizzzz
Copy link
Copy Markdown
Member

dizzzz commented Jun 26, 2025

I did tried to remember from the top of my head, but then realized I checked the wrong repo; it is in the exist-db files in the elemental repo :-) eg https://github.com/evolvedbinary/elemental/blob/main/extensions/webdav/src/main/java/org/exist/webdav/ExistResourceFactory.java

@adamretter
Copy link
Copy Markdown
Contributor Author

adamretter commented Jun 26, 2025

then realized I checked the wrong repo

@dizzzz So not a problem for you in Monex or eXist-db then :-)

Can we get this merged now then please?

Copy link
Copy Markdown
Contributor

@duncdrum duncdrum left a comment

Choose a reason for hiding this comment

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

Failing test. Otherwise as @dizzzz already mentioned. Addressing the license headers is a concern, but the way to go is SPDX links, not going further in a direction we try to get away from.

…code file headers are correct, consistent, and follow eXist-db
@adamretter adamretter force-pushed the hotfix/license-headers branch from f1c5f62 to 8a89f81 Compare July 1, 2025 21:36
@adamretter
Copy link
Copy Markdown
Contributor Author

Failing test.

@duncdrum Tests are passing.

Addressing the license headers is a concern, but the way to go is SPDX links, not going further in a direction we try to get away from.

I am wondering who is making the decision on that. I can see this PR already has 2 approvals from reviewers and no rejections. So it would seem that the reviewers want this. Why just not merge this, and then if someone wants to do the SPDX change in future they are free to send a PR to do that.

@line-o line-o self-requested a review July 2, 2025 07:49
Copy link
Copy Markdown
Member

@line-o line-o left a comment

Choose a reason for hiding this comment

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

The community decided to not follow this approach but use SPDX headers instead.

@adamretter
Copy link
Copy Markdown
Contributor Author

adamretter commented Jul 2, 2025

The community decided to not follow this approach but use SPDX headers instead.

@line-o Thank you for the update. In what community was this decided please, and when? Were the other reviewers who previously reviewed and approved this PR present (cc @marmoure @reinhapa)?

@reinhapa
Copy link
Copy Markdown
Member

reinhapa commented Jul 2, 2025

Were the other reviewers who previously reviewed and approved this PR present
@adamretter I missed that meeting and was informed after having a look a this PR.

@adamretter
Copy link
Copy Markdown
Contributor Author

adamretter commented Jul 2, 2025

I missed that meeting and was informed after having a look a this PR.

@reinhapa Thanks for replying, can you tell us which meeting that was?

@reinhapa
Copy link
Copy Markdown
Member

reinhapa commented Jul 3, 2025

@reinhapa Thanks for replying, can you tell us which meeting that was?

It was discussed in the 2025-06-23 - eXist Community Call

@adamretter
Copy link
Copy Markdown
Contributor Author

@wolfgangmm At the Community Call last night, you said you saw no reason not to merge this one. As it now has +2 reviews and your approval. Could you merge it please?

@wolfgangmm wolfgangmm merged commit 2497019 into eXist-db:master Jul 21, 2025
2 checks passed
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.

7 participants