Documentation/Building Guide AOO/Rat Scan

From Apache OpenOffice Wiki
Jump to: navigation, search

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

  1. Add --with-rat-scan to your configure call. In this form bootstrap 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.
  2. Run configure and bootstrap as usual.
  3. To run the rat scan there are two ways:
    1. Go to main/instsetoo_native, run build --all and wait. This will run the Rat scan while the whole office is built.
    2. Alternatively go to main/saxon, run build --all and deliver.
      Then switch to ext_libraries/ratscan/ and run build. 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.
  4. 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 the main/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 the main/rat-excludes file and in keeping it up-to-date.
  • I added a second file besides main/rat-excludes named main/rat-excludes-solver to exclude all files in the local (like main/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.
Personal tools