This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 216630 - Build needs to automate check for legal problems
Summary: Build needs to automate check for legal problems
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Cosmos (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Jagmit CLA
QA Contact: Hubert Leung CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 216591
  Show dependency tree
 
Reported: 2008-01-25 15:27 EST by Ruth Lee CLA
Modified: 2012-01-03 13:46 EST (History)
1 user (show)

See Also:


Attachments
Updated version of the EPL checking tool (68.06 KB, application/octet-stream)
2008-03-18 11:45 EDT, Ruth Lee CLA
no flags Details
build script (12.05 KB, application/octet-stream)
2008-08-05 12:26 EDT, Jagmit CLA
no flags Details
missing about.html (890 bytes, application/octet-stream)
2008-08-05 12:26 EDT, Jagmit CLA
no flags Details
build reports (3.91 KB, application/octet-stream)
2008-08-05 12:50 EDT, Jagmit CLA
no flags Details
build report_v2 (3.91 KB, application/octet-stream)
2008-08-07 17:26 EDT, Jagmit CLA
no flags Details
build report_v3 (3.92 KB, application/octet-stream)
2008-08-20 12:44 EDT, Jagmit CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ruth Lee CLA 2008-01-25 15:27:29 EST
The build currently checks for missing copyrights, out of date copyrights, etc., but it doesn't check for missing legal files such as about.html.

When I worked on TPTP, I wrote a script that we could reuse. This script is packaged with some other scripts in a zip file: http://dev.eclipse.org/viewcvs/index.cgi/test-results/platform/org.eclipse.hyades.use.cases/resources/Doc_smoke.zip?root=TPTP_Project&view=co

Now I notice that someone has updated the utilities since I left. I've sent him an email to find out what was changed and why. We may need to use his version (he created a copy) rather than the version that I created. I'll update this bugzilla to clarify this once I've heard back.
Comment 1 Ruth Lee CLA 2008-02-06 13:31:49 EST
No changes were made other than to add a .bat file for convenience when running the scripts.
Comment 2 Ruth Lee CLA 2008-02-06 13:37:55 EST
Upgrading to critical/P1 because we need to keep track of the third-party plug-ins and plug-ins with encryption. 

The scripts that I wrote in TPTP parse the about.html files in every plug-in, whether directory or JAR plug-in, and produces a list of plug-ins:
  * plug-ins with missing legal files
  * plug-ins with non-EPL content
  * plug-ins with encryption
  * plug-ins with the standard EPL license

I would like for us to create a list of the approved third-party plug-ins that COSMOS is shipping. Then we should adapt that script to compare that known list against the results found when parsing the driver. If any plug-ins show up in the build that are not in the approved list we need to pull them from CVS immediately.

Comment 3 Ruth Lee CLA 2008-02-07 22:11:44 EST
Because the build doesn't do this work today, it's more accurate to make this bugzilla an enhancement.
Comment 4 Ruth Lee CLA 2008-03-18 11:45:06 EDT
Created attachment 92811 [details]
Updated version of the EPL checking tool

I found that some assumptions that I made when I first created that tool were incorrect. In the COSMOS zips, there is no one "plugins" directory to check. Instead, there can be multiple "plugins" and "lib" directories. 

Also, I started to add support to the program to be able to check the built zip files directly instead of needing to unzip the zips to check the plug-ins directory. This work needs to be completed. I added a "// TODO" comment in the .java file to indicate the part of the code that needs to be updated.

I am attaching the latest version of this utility. Note that I also updated the resources directory because some versions of about.html weren't in the resources directory, leading to some false positive "Unknown license" flags.
Comment 5 Ruth Lee CLA 2008-03-18 12:05:13 EDT
To summarize the conversation that I had with Jagmit, this is what we need to do for this enhancement.

1. FindNonEPLPlugins.java needs to be updated so that it can search the zip files directly instead of needing to unzip the drivers.
2. The build needs to run this tool as a post-build step on the built zips. This utility will check the built zips to ensure that all legal files are present and will flag unknown or special licenses (third party, cryptography, disassembler).
   2.1 First, the build needs to check if any plug-ins are missing an about.html file. If a plug-in is found to be missing a legal file, an email needs to be sent to cosmos-mgmt to notify the Leads. (I expect that in the short term it'll be delegated to me to follow up, but the Leads still need to be notified.)
   2.2 We need to flag any unexpected special licenses. It is expected that COSMOS has some special licenses, such as for Apache Muse, but we need to send an email to cosmos-mgmt when a new special license is found. That is, we need to maintain a list of plug-ins that have a special license and when this tool is completed it will compare the plug-ins that have a special license to the known list of special licenses and if any new special licenses are found an email needs to be sent to cosmos-mgmt. (Note that some of the COSMOS redistributed plug-ins, although we have IPZillas for them, don't have an about.html. That needs to be fixed first before we can implement this step.)


Comment 6 Jagmit CLA 2008-03-20 09:34:38 EDT
Now I can run this tools on the ziped files and get the output FindNonEPLPlugins.txt.  But still get exceptions (Error while unzipping file. archive is: null The exception text is invalid CEN header (bad signature)) for few jars.  Have to investigate, why this is happening. 

  
Comment 7 Ruth Lee CLA 2008-03-20 11:07:47 EDT
Hi Jagmit,

That's a known problem. If you look in the file you'll see a //TODO Jagmit line. That's where the file is created.

Note that if there's another way of parsing an embedded JAR other than extracting it that would be better than the algorithm that I chose. (i.e., extracting the JAR from the driver ZIP.) It would be best if we didn't have to extract anything at all.

FYI, I started to modify this program again to search distributions for source files. There will be updates. Can you contain your work on this just to figuring out how we can parse the content of a JAR file that's embedded in a zip? 

Thanks,
Ruth.
Comment 8 Jagmit CLA 2008-04-22 11:46:40 EDT
Have made update to program.  Now it can parse jars, within a zip file.
As discussed before, have created the new wiki pages, which lists BadorMissingCopyright and MissingAbout.html. 

And linked these new pages from the current candidate wiki page (http://wiki.eclipse.org/COSMOS/COSMOS_i10_candidate).
Comment 9 Jagmit CLA 2008-06-19 10:37:17 EDT
Have made the update, so that FindNonEPLPlugins run part of every build, and the produced a report missing About.html.  Here is the output  http://download.eclipse.org/technology/cosmos/1.0.0/COSMOS-1.0.0-200806090849/FindNonEPLPlugins.txt

I tried publishing the report to the download page, but the report section got broken on making this modification. I will publish this report after the end of current i11 iteration.

Comment 10 Jagmit CLA 2008-08-05 12:26:16 EDT
Created attachment 109182 [details]
build script
Comment 11 Jagmit CLA 2008-08-05 12:26:48 EDT
Created attachment 109183 [details]
missing about.html
Comment 12 Jagmit CLA 2008-08-05 12:50:11 EDT
Created attachment 109188 [details]
build reports
Comment 13 Jagmit CLA 2008-08-07 17:26:02 EDT
Created attachment 109467 [details]
build report_v2
Comment 14 Jagmit CLA 2008-08-07 17:26:56 EDT
Hi saurabh, 

can you apply these patches
Comment 15 Jagmit CLA 2008-08-20 12:44:33 EDT
Created attachment 110471 [details]
build report_v3

build reports
Comment 16 Jagmit CLA 2008-08-20 12:45:11 EDT
saurabh:

Can you apply this patch (build report_v3)
Comment 17 Saurabh Dravid CLA 2008-08-21 10:30:58 EDT
Patch is applied.
Comment 18 Jagmit CLA 2008-08-21 10:38:10 EDT
I see the report, which list the plugins with missing about.html at the download page
http://download.eclipse.org/technology/cosmos/1.0.0/COSMOS-1.0.0-200808191109/FindNonEPLPlugins.txt

Please let me if it is ok.
Comment 19 Jagmit CLA 2008-08-22 13:48:34 EDT
Marking this bug as fixed, please open if anything else is remaining to be completed
Comment 20 Paul Slauenwhite CLA 2009-06-30 09:38:04 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this originator of this enhancement/defect has an inactive Bugzilla account and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.
Comment 21 Paul Slauenwhite CLA 2009-06-30 09:55:46 EDT
This enhancement/defect was mistaken closed as part of the TPTP 4.6 Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes) since the originator of this enhancement/defect has an inactive Bugzilla account.  If this enhancement/defect is still unresolved and reproducible, please re-open.