You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@creadur.apache.org by "David Crossley (JIRA)" <ji...@apache.org> on 2009/03/01 03:26:12 UTC

[jira] Created: (RAT-42) independent scan of RAT own source files for license issues

independent scan of RAT own source files for license issues
-----------------------------------------------------------

                 Key: RAT-42
                 URL: https://issues.apache.org/jira/browse/RAT-42
             Project: RAT
          Issue Type: Task
    Affects Versions: 0.6
            Reporter: David Crossley
             Fix For: 0.6


Run an independent scan of RAT to assess its own source files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (RAT-42) independent scan of RAT own source files for license issues

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RAT-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12683193#action_12683193 ] 

David Crossley commented on RAT-42:
-----------------------------------

Don't forget that someone needs to fix the two documents alerted by the scan above ("3rdParty using AL v2.0"):

apache-rat-core/src/main/java/org/apache/rat/analysis/license/W3CDocLicense.java
apache-rat-core/src/test/resources/elements/Text.txt

Also a note that a RAT run should be detecting those issues.

> independent scan of RAT own source files for license issues
> -----------------------------------------------------------
>
>                 Key: RAT-42
>                 URL: https://issues.apache.org/jira/browse/RAT-42
>             Project: RAT
>          Issue Type: Task
>    Affects Versions: 0.6
>            Reporter: David Crossley
>             Fix For: 0.6
>
>         Attachments: patch-RAT-42.txt, rat-avoid.txt
>
>
> Run an independent scan of RAT to assess its own source files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (RAT-42) independent scan of RAT own source files for license issues

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/RAT-42?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Crossley updated RAT-42:
------------------------------

    Attachment: rat-avoid.txt

Attached file rat-avoid.txt used for insert_license.pl script.

> independent scan of RAT own source files for license issues
> -----------------------------------------------------------
>
>                 Key: RAT-42
>                 URL: https://issues.apache.org/jira/browse/RAT-42
>             Project: RAT
>          Issue Type: Task
>    Affects Versions: 0.6
>            Reporter: David Crossley
>             Fix For: 0.6
>
>         Attachments: patch-RAT-42.txt, rat-avoid.txt
>
>
> Run an independent scan of RAT to assess its own source files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (RAT-42) independent scan of RAT own source files for license issues

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/RAT-42?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Crossley updated RAT-42:
------------------------------

    Attachment: rat-avoid.txt

> independent scan of RAT own source files for license issues
> -----------------------------------------------------------
>
>                 Key: RAT-42
>                 URL: https://issues.apache.org/jira/browse/RAT-42
>             Project: RAT
>          Issue Type: Task
>    Affects Versions: 0.6
>            Reporter: David Crossley
>             Fix For: 0.6
>
>         Attachments: patch-RAT-42.txt, rat-avoid.txt
>
>
> Run an independent scan of RAT to assess its own source files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (RAT-42) independent scan of RAT own source files for license issues

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RAT-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677761#action_12677761 ] 

David Crossley commented on RAT-42:
-----------------------------------

I built a few tools before RAT was invented, to help with managing the Cocoon and Forrest projects.

As RAT is heading for a release, i thought it time to run an independent assessment of RAT's own source files.

My process detects various svn management issues. It then scans every text file to summarise and fix the license situation. I will describe it here so that others can run it.

Perhaps also some ideas from those tools can be incorporated into RAT in the future.

> independent scan of RAT own source files for license issues
> -----------------------------------------------------------
>
>                 Key: RAT-42
>                 URL: https://issues.apache.org/jira/browse/RAT-42
>             Project: RAT
>          Issue Type: Task
>    Affects Versions: 0.6
>            Reporter: David Crossley
>             Fix For: 0.6
>
>
> Run an independent scan of RAT to assess its own source files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (RAT-42) independent scan of RAT own source files for license issues

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RAT-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677762#action_12677762 ] 

David Crossley commented on RAT-42:
-----------------------------------

Process and results ...

See RAT-39 for fixing SVN issues before starting.

-----------------
Now ready to do 'insert_license.pl' in practice mode to summarise the licenses.
See https://svn.apache.org/repos/private/committers/relicense/src/perl/relicense.txt

./insert_license.pl -p /svn/asf/rat-incubator  > ~/Documents/work/incubator-rat/license-scan.txt

> Doing practice run. No files will be written
>
> Total 211 text files were investigated.
> New licenses would be inserted in 10 files.
> Skipped 193 files with an existing license:
>  (Apache v2.0=0, v2.0a=0, v2.0b=183)
>  (Apache v1.2=0, v1.1=0, v1.0=0)
>  (Other=2, PublicDomain=0)
>  (3rdParty using AL v2.0=8, v1.2=0, v1.1=0)
> Skipped 0 XML files with missing XML Declaration.
>
> Ignored 7 files of specified type (.txt .dcl .ent .pen .project)
> Skipped 1 files of unknown type.
>
> WARNING: 2 files had another license as well as the new
> Apache v2.0 license. (Scan the log output for lines with "WARN: dual".)
>
> List of unknown filename extensions and ignored filename extensions:
> (Add new fileTypes to this script if you want them to be catered for.)
> .apt=9 .txt=10 NoExtension=2
>
> List of all unique filename extensions:
> .apt=9 .fml=1 .html=4 .java=158 .properties=2 .py=1 .txt=10 .xml=22 .xsl=2 NoExtension=2
>
> Finished practice run.

-----------------
See the summary above and review the output logfile.

grep "WARN: dual" license-scan.txt
Two files that have "license" words in the body, and so trigger the license scanner.
Add those pathname patterns to file rat-avoid.txt

grep "licenseType=Other" license-scan.txt
All okay, added patterns to rat-avoid.txt

-----------------
Investigate the eight "3rdParty using AL v2.0" license headers that were reported.
grep "licenseType=F-AL-20" license-scan.txt

Most of them are just using a license header pattern that 'insert_license.pl' is not handling, so could add that handling to the script. In this case it is for "*.apt files, whatever they are.

However, two are real positive hits:
apache-rat-core/src/main/java/org/apache/rat/analysis/license/W3CDocLicense.java
apache-rat-core/src/test/resources/elements/Text.txt

-----------------
That leaves the 10 files that will get licenses inserted.
grep "Insert new license" license-scan.txt

Some are generated javadoc files. Add patterns to rat-avoid.txt

Some are in the test area and some are very basic files. I just add the license header anyway, that way everyone knows what they can do with the file.

The others are genuine missing license headers.

-----------------
Do another practice run, this time using the "avoid" file.

./insert_license.pl -p /svn/asf/rat-incubator ~/Documents/work/incubator-rat/rat-avoid.txt > ~/Documents/work/incubator-rat/license-scan.txt

> Doing practice run. No files will be written
>
> Total 202 text files were investigated.
> New licenses would be inserted in 7 files.
> Skipped 189 files with an existing license:
>  (Apache v2.0=0, v2.0a=0, v2.0b=181)
>  (Apache v1.2=0, v1.1=0, v1.0=0)
>  (Other=0, PublicDomain=0)
>  (3rdParty using AL v2.0=8, v1.2=0, v1.1=0)
> Skipped 0 XML files with missing XML Declaration.
> Avoided 9 files as specified in the avoidList
>
> Ignored 6 files of specified type (.txt .dcl .ent .pen .project)
> Skipped 0 files of unknown type.
> List of all unique filename extensions:
> .apt=9 .fml=1 .html=1 .java=156 .properties=2 .py=1 .txt=8 .xml=22 .xsl=2
>
> Finished practice run.

-----------------
The summary and the output look now look correct, so insert licenses:

./insert_license.pl /svn/asf/rat-incubator ~/Documents/work/incubator-rat/rat-avoid.txt > ~/Documents/work/incubator-rat/license-scan.txt

Do 'svn diff' ...  as expcected. See patch-RAT-42.txt

> independent scan of RAT own source files for license issues
> -----------------------------------------------------------
>
>                 Key: RAT-42
>                 URL: https://issues.apache.org/jira/browse/RAT-42
>             Project: RAT
>          Issue Type: Task
>    Affects Versions: 0.6
>            Reporter: David Crossley
>             Fix For: 0.6
>
>
> Run an independent scan of RAT to assess its own source files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (RAT-42) independent scan of RAT own source files for license issues

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/RAT-42?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Crossley updated RAT-42:
------------------------------

    Attachment:     (was: rat-avoid.txt)

> independent scan of RAT own source files for license issues
> -----------------------------------------------------------
>
>                 Key: RAT-42
>                 URL: https://issues.apache.org/jira/browse/RAT-42
>             Project: RAT
>          Issue Type: Task
>    Affects Versions: 0.6
>            Reporter: David Crossley
>             Fix For: 0.6
>
>         Attachments: patch-RAT-42.txt, rat-avoid.txt
>
>
> Run an independent scan of RAT to assess its own source files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (RAT-42) independent scan of RAT own source files for license issues

Posted by "Jochen Wiedmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/RAT-42?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Wiedmann resolved RAT-42.
--------------------------------

    Resolution: Fixed

Thanks for your hints, David. AFAIK, your changes are now applied in the trunk.

About running RAT on itself: This will be added to run automatically as soon as we have a first release. There is a bootstrapping problem before.


> independent scan of RAT own source files for license issues
> -----------------------------------------------------------
>
>                 Key: RAT-42
>                 URL: https://issues.apache.org/jira/browse/RAT-42
>             Project: RAT
>          Issue Type: Task
>    Affects Versions: 0.6
>            Reporter: David Crossley
>             Fix For: 0.6
>
>         Attachments: patch-RAT-42.txt, rat-avoid.txt
>
>
> Run an independent scan of RAT to assess its own source files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (RAT-42) independent scan of RAT own source files for license issues

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/RAT-42?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Crossley updated RAT-42:
------------------------------

    Attachment: patch-RAT-42.txt

See attached file patch-RAT-42.txt for the missing licenses.

Also remember above, that there are two other files which are "3rdParty using AL v2.0" license headers:
 apache-rat-core/src/main/java/org/apache/rat/analysis/license/W3CDocLicense.java
 apache-rat-core/src/test/resources/elements/Text.txt

> independent scan of RAT own source files for license issues
> -----------------------------------------------------------
>
>                 Key: RAT-42
>                 URL: https://issues.apache.org/jira/browse/RAT-42
>             Project: RAT
>          Issue Type: Task
>    Affects Versions: 0.6
>            Reporter: David Crossley
>             Fix For: 0.6
>
>         Attachments: patch-RAT-42.txt
>
>
> Run an independent scan of RAT to assess its own source files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.