Blog: http://blog.nachtarbeiter.net/
Mozilla-related emails: bugzilla at nachtarbeiter dot net
Improving relic
Continuation chars fix
If you run relic on some of the new Tamarin files (js/tamarin), you'll see the problem. These have had a duff license block applied which relic doesn't correctly fix - it doesn't insert the "continuation character" at the beginning of each line because it's not there in the original. " *" is an example of a continuation character for the /* */ comment type.
The change: when writing out the new license block, we need to use the continuation char defined inside relic for that comment type, not one scanned from the file itself.
Examples:
- mozilla/js/tamarin/core/abcFormat.txt
- mozilla/js/tamarin/test/shell.as
- mozilla/js/tamarin/test/as3/AbcDecoder/useNS.as
- mozilla/js/tamarin/test/as3/AbcDecoder/typeAnnotation.as
- mozilla/js/tamarin/test/as3/AbcDecoder/accessSpecifiers.as
Make relic cope with non-tri-license Version headers
People have started using the LICENSE BLOCK headers with a different license name, and relic doesn't cope well. It should. One example is ./gfx/thebes/src/gfxQuartzFontCache.mm . Relic should probably categorise these as "unknown license" for now.
Make relic stop scanning a file if it detects a proper complete MPL/LGPL/GPL license block
At the moment, several files are labelled as silly things like "mpl/gpl/lgpl/mpl/gpl/lgpl", because they have a proper license block, but then another copy of the license in the body (because they autogenerate a file, for example). That needs to stop, but ideally without preventing us flagging up the case where there are two license headers in a file, one after the other.
To fix this, we stop scanning, if the second license block is more than 10 lines away from the first license block.
Some examples:
- mozilla/calendar/base/src/maketzdata.pl
- mozilla/extensions/java/xpcom/interfaces/gen-nsError.pl
- mozilla/intl/chardet/tools/genverifier.pm
- mozilla/intl/chardet/tools/gencyrillic.pl
- mozilla/intl/chardet/tools/charfreqtostat.pl
- mozilla/intl/chardet/tools/GenCyrillicClass.cpp
- mozilla/intl/lwbrk/tools/anzx4501.pl
Turn relic into a Tinderbox test
If I'm not to spend the rest of my life checking licensing, we need to turn relic into a tinderbox test, so people know immediately when they've checked in bad files or blocks. That is, we need a command line switch which puts it into a mode where it returns 0 if the results are of a certain form, or 1 (and some errors) otherwise (See http://developer.mozilla.org/en/docs/How_to_add_a_build-time_test for more info)
The form would be that all files either have MPL/LGPL/GPL (complete), unknown license or no license, and there are no processing errors.