Documentation/Building Guide AOO/Rat Scan
From Apache OpenOffice Wiki
Introduction
The report generated by the Rat(release audit tool) scan list the licenses of all files that belong to the Apache OpenOffice project. The scan can be run while OpenOffice is built from source. The resulting report is a HTML file and can be found at ext_sources/ratscan/<platform>/misc/aoo-3.5-rat-scan-output.html
.
How to run
- Add
--with-rat-scan
to yourconfigure
call. In this formbootstrap
will download the pre-built Rat binaries (some platform independent jars).
Use the form--with-rat-scan=<path-to-rat-0.8>
to specify where on your system the pre-installed rat libraries can be found. - Run
configure
andbootstrap
as usual. - To run the rat scan there are two ways:
- Go to
main/instsetoo_native
, runbuild --all
and wait. This will run the Rat scan while the whole office is built. - Alternatively go to
main/saxon
, runbuild --all
anddeliver
.
Then switch toext_libraries/ratscan/
and runbuild
. This will only build the necessary prequisites (saxon) and run the scan. The advantage of this method is that you get the scan report faster and that there is only a minimal set of solver files (files that are created during the build) that have to be excluded.
- Go to
- If everything went well (at the moment only on Linux everything goes well) then you can find the rat report in
ext_libraries/ratscan/<platform>/misc/aoo-3.5-rat-scan-output.html
.
Notes
- The rat scan currently only runs without error on Linux. Well, the actual scan runs without error on all platforms. The XSLT transformation that creates the html report from the intermediate XML file breaks. This is because the XML report contains binary data from some files. The binary data can not be read by saxon, the XSLT transformator.
In order to fix this we have to update themain/rat-excludes
file and modify rat to not include binary data.
Sadly saxon does not contain line numbers in its error messages. Finding the offending binary file in the multi-megabyte XML report is not so easy. - The
ratscan/
module can not only create the rat report. It can also produce a list of all files that are excluded from the scan. This list can help in cleaning themain/rat-excludes
file and in keeping it up-to-date. - I added a second file besides
main/rat-excludes
namedmain/rat-excludes-solver
to exclude all files in the local (likemain/sw/wntmsci12/
) and global (main/solver/
) solver directory trees from the rat scan. Using a separate file for this has the advantage that in the list of excluded files (see above) the solver files can be listed separatley from the other excluded files and therefore not clutter the list.