Extracted BagIt classes to a new bagit-support library
Replaced BagIt classes with the bagit-support equivalents
Update some of the initialization for BagItDigests to conform to bag profiles correctly when exporting
Notes
The way the BagItDigest init was updated in the Exporter is to query first for the Manifests-Required, then Manifests-Allowed, then fallback to sha1. For Manifests-Required it makes sense to use each digest algorithm. I opted to do the same for Manifests-Allowed though I'm not 100% about that choice. We could try to alter this by picking a single algorithm to use, or maybe creating an issue to allow the user to specify what algorithm(s) to use (which would require additional validation against the profile, which shouldn't be a big deal).
Testing
Start a fresh fedora repository, e.g. with fcrepo4-docker FEDORA_TAG=5.1.0 docker-compose up -d
Create a binary
Create a bag-config.yml for export
bag-info.txt:
Source-Organization: fcrepo-import-export
Organization-Address: localhost
External-Description: Sample bag export for fcrepo-3233
Resolves: https://jira.lyrasis.org/browse/FCREPO-3233
Notes
The way the BagItDigest init was updated in the Exporter is to query first for the
Manifests-Required
, thenManifests-Allowed
, then fallback tosha1
. ForManifests-Required
it makes sense to use each digest algorithm. I opted to do the same forManifests-Allowed
though I'm not 100% about that choice. We could try to alter this by picking a single algorithm to use, or maybe creating an issue to allow the user to specify what algorithm(s) to use (which would require additional validation against the profile, which shouldn't be a big deal).Testing
FEDORA_TAG=5.1.0 docker-compose up -d
docker-compose down; FEDORA_TAG=5.1.0 docker-compose up -d