Skip to content
New issue

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

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

Already on GitHub? # to your account

GPL-2.0(*) templates: var text to handle variation in FSF address formatting? #1972

Closed
pmonks opened this issue May 16, 2023 · 8 comments
Closed
Assignees
Labels
XML markup change potential change or addition to XML markup in license
Milestone

Comments

@pmonks
Copy link
Contributor

pmonks commented May 16, 2023

In this GPL-2.0 license text, the FSF's address has been split across multiple lines, and 2 comma characters (,) removed, which means that matching of this text via the various GPL-2.0(*) templates fails. This was originally discovered in this Spdx-Java-Library issue.

In that issue, @goneall suggested that variations in this section of the license text could be handled in the GPL-2.0(*) templates via the addition of <var> elements.

@jlovejoy jlovejoy added the XML markup change potential change or addition to XML markup in license label May 17, 2023
@jlovejoy
Copy link
Member

hi @pmonks - so... white space (ie., split across multiple lines) shouldn't matter as per B.4 https://spdx.github.io/spdx-spec/v2.3/license-matching-guidelines-and-templates/

However, punctuation does matter (see B.6). So, would this mean we'd be adding markup just for the commas?

@goneall
Copy link
Member

goneall commented May 17, 2023

@jlovejoy Just to clarify - the issue is with the matching regular expression in the license XML - this will need to be fixed for matches to occur. In other words, there is an <alt tag with a match regular expression that assumes the text it is matching is in the same line - which is a bad assumption.

@jlovejoy
Copy link
Member

@goneall hmmm... so that could be a problem with any license that has an tag, then?

@goneall
Copy link
Member

goneall commented May 19, 2023

so that could be a problem with any license that has an tag, then?

@jlovejoy it has to do with that is in the match="..." string - I don't think this will be an issue for most of the licenses since they typically use .+ which will match line feeds.

@pmonks pmonks removed their assignment May 25, 2023
@jlovejoy
Copy link
Member

jlovejoy commented Jun 1, 2023

thanks @goneall - so... is there a PR needed here?

@goneall
Copy link
Member

goneall commented Jun 2, 2023

so... is there a PR needed here?

Yes - a change to the regex to allow for line feeds. Personally, I would just do a .{X,Y} where X is the minimum number of characters for a match and Y is the maximum number of character for a match rather than the specific text.

@jlovejoy jlovejoy added this to the 3.23 milestone Oct 1, 2023
pmonks added a commit to pmonks/license-list-XML that referenced this issue Dec 19, 2023
@jlovejoy
Copy link
Member

jlovejoy commented Jan 2, 2024

similar to #2279 - will let @goneall approve!

goneall added a commit that referenced this issue Jan 3, 2024
@goneall
Copy link
Member

goneall commented Jan 3, 2024

Resolved with #2279

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
XML markup change potential change or addition to XML markup in license
Projects
None yet
Development

No branches or pull requests

3 participants