Skip to content

Optimize readability of the NOTICE file#559

Merged
matthiasblaesing merged 2 commits intoapache:masterfrom
matthiasblaesing:optimize_notice
May 28, 2018
Merged

Optimize readability of the NOTICE file#559
matthiasblaesing merged 2 commits intoapache:masterfrom
matthiasblaesing:optimize_notice

Conversation

@matthiasblaesing
Copy link
Contributor

While looking into NETBEANS-827 it was found, that the NOTICE file is
difficult to read, as no clear sections were visible.

This adjust the output as such, that:

  • the primary header is separated from the following entries by
    two empty lines
  • all imported entries are normalized, so that multiple empty lines
    are collapsed into one empty line
  • all imported entries are separated from each other by two empty
    lines

To illustrate here are the pre- and post picture:

notice-pre.txt
notice-post.txt

I tried to see what NETBEANS-827 is about and at first I did not even find the entry. The corresponding entry is:

Apache Commons Net
Copyright 2001-2017 The Apache Software Foundation

From my interpretation of the legal FAQ this is the correct form, but in the "pre" version is difficult to find.

While looking into NETBEANS-827 it was found, that the NOTICE file is
difficult to read, as no clear sections were visible.

This adjust the output as such, that:

- the primary header is separated from the following entries by
  two empty lines
- all imported entries are normalized, so that multiple empty lines
  are collapsed into one empty line
- all imported entries are separated from each other by two empty
  lines
@matthiasblaesing matthiasblaesing requested a review from jlahoda May 25, 2018 19:50
@matthiasblaesing
Copy link
Contributor Author

The filter in build.xml removes the two empty lines in the postprocessing from notice-temp to NOTICE. I only looked at the notice-temp output and just did a full build and also checked the final NOTICE file.

@emilianbold
Copy link
Member

I don't see the primary header getting more lines. Other than that it's a good fix.

@matthiasblaesing
Copy link
Contributor Author

Sorry - the wording was not precise. Please see the attached screenshot of the comparison:

  • red is what I meant by "primary header" (the netbeans NOTICE) with the two empty lines
  • blue are the imported entries from dependencies with the seperating empty lines

auswahl_001

@emilianbold
Copy link
Member

I see. I don't know if we must have some structure inside the NOTICE file but now that I look at this screenshot it would be even more readable if each entry would have some tabs in front.

Example:

Apache Ant
Copyright ...

    The sync task is based on code
    taken from etc etc


Apache Commons Compress
Copyright ...

    The file x/y/x has been derived
    from code found on example.com

@matthiasblaesing
Copy link
Contributor Author

We don't "need" the structure, but we need to assemble a NOTICE file based on our dependencies (at least this is my current understanding) and it needs to be accepted by the reviewers. The final NOTICE file holds information for required notices from the codebase and the dependencies of the project, that are bundled with the files. See http://www.apache.org/dev/licensing-howto.html#alv2-dep for details.

The approach in netbeans (consisting of modules) was, that each module declares its dependencies (external/binaries) and for each dependency the license ("-license.txt" was recorded. This scheme was enhanced for apache netbeans, by also supporting an "-notice.txt" file, that holds required notice information.

The notice information of each included module is then merged into the global file, suppressing duplicates. The file is mostly copied verbatim (only multiple empty lines are collapsed into one). To make the suggested indention possible, there would need to be a fixed notice file format. This is not the case (as you saw in the ini4j case), so I stayed with this minimal formating, just makeing grouping of information visible.

@emilianbold
Copy link
Member

OK, I don't have strong feelings about it. Just an extra newline doesn't seem to group very well to me, we might as well use '===' or something. But if it helps you pinpoint dependencies faster, it's fine.

Copy link
Contributor

@jlahoda jlahoda left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@matthiasblaesing matthiasblaesing merged commit 88932d0 into apache:master May 28, 2018
@matthiasblaesing matthiasblaesing deleted the optimize_notice branch August 28, 2018 18:37
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.

3 participants