This is an example procedure for the Apache Forrest project. Others may find it useful. ------------------------------------------------------------------------ The relicense task is described at http://forrest.apache.org/tasks.html#legal-monitoring The "avoid" file is used to skip known situations, e.g. some files should not be touched. See Forrest's at http://svn.apache.org/repos/asf/forrest/trunk/etc/relicense-avoid.txt Before commencing, do 'tree -d > relicense-tree.txt' which will form a listing of what sections have already been done and the issues that remain. Or perhaps you are brave enough to do the whole trunk at once. ------------------------------------------------------------------------ * Do the whole tree, a section at a time, using insert_license.pl script. * cd to a directory as high as you dare, e.g. "site-author" or "main" * Ensure no local svn edits pending. * In another window, do a practice run: insert_license.pl -p \ /path/to/svn/forrest/main relicense-avoid.txt > relicense.log * Review the summary output and grep the relicence.log file. * Investigate the files that are listed as having problems. * grep for special patterns like "WARN" and "dual license", etc. * grep "Insert new license" to see which files would have a license inserted. * You may need to add more filename patterns to your *-avoid.txt file. * Do more practice runs. * When happy, do a production run by ommitting the -p practice mode. * Again review the summary output and grep the relicence.log file. * Some files may need to be fixed by hand. * Note sections that are finished and remaining issues in relicense-tree.txt * Do a 'svn diff' and make sure that it is what you expected: See ./verify-diff.sh which removes expected patterns from a diff listing. If some text remains, then you might have a problem. * Then 'svn commit'. * If the log reveals that there are old Apache licenses headers, then use the script ./update_AL20.pl * Tweak the insert_license.pl script to address new issues. ------------------------------------------------------------------------