Migrating XML datastreams from inline (X) to managed (M) using the modify-control-group migration tool results in invalid checksums depending on the options specified when the modify-control-group script is run.
Steps to reproduce this behavior:
- create a new test object via the admin interface - inline DC datastream with a checksum (in my testing, I'm using MD5)
- run the fedora-modify-control-group script on the DC datastream for the test object with default options
- call compare datastream checksum API on the test object's DC datastream - Fedora reports this as false.
I tested the migration script with a few different options, and it seems that setting the addXMLHeader option to true instead of the default false is sufficient for the checksum to remain valid after the migration (setting both addXMLHeader and reformat options to true also resulted in a valid checksum after the migration).
As a result of this apparent bug, I have large numbers of production XML datastreams that were migrated (quite a while ago) with this script using the default options, and the XML checksums are invalid (something I only discovered more recently while doing full-repository checksum auditing). We NEED a way to correct those invalid checksums.