Skip to content

Commit

Permalink
Include new pronom signature files (#1103)
Browse files Browse the repository at this point in the history
* included new binary signature files and test objects from the skeleton suite

* included new container signature files
  • Loading branch information
sparkhi authored May 10, 2024
1 parent f7d2c75 commit 0c72b1d
Show file tree
Hide file tree
Showing 143 changed files with 93,786 additions and 18,573 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
/**
* Test internal API against skeleton sample. Unfortunately skeleton sample is in different project,
* but it works if we use relative path.
*
* The test looks at puid mentioned in the filename and expects that as a result from the API
*
*/
Expand Down Expand Up @@ -97,7 +96,7 @@ public static Collection<Object[]> data() throws IOException, SignatureParseExce
* from the API for the test skeleton suite.
* Following table describes the current puids that are ignored because the identification using current
* signature file does not match the indicated puid in filename
* ---------------- Current signature file V114 ----------------
* ---------------- Current signature file V118 ----------------
* fmt-1062-signature-id-1435.3fr fmt/353 Signature
* fmt-1157-signature-id-1539.nfo
* fmt-1739-signature-id-2077.toast fmt/468 Signature
Expand All @@ -107,9 +106,8 @@ public static Collection<Object[]> data() throws IOException, SignatureParseExce
* @return Puids that are ignored for the current signature file
*/
private static Set<String> getIgnoredPuids() {
Set<String> ignorePuid = Stream.of("fmt/1062", "fmt/1157", "fmt/1757", "fmt/1739")
return Stream.of("fmt/1062", "fmt/1157", "fmt/1757", "fmt/1739")
.collect(Collectors.toCollection(HashSet::new));
return ignorePuid;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ public void should_report_when_there_is_an_extension_mismatch() throws IOExcepti

@Test
public void should_report_correct_version_for_the_binary_and_container_signature() {
assertThat(api.getContainerSignatureVersion(), is("20230822"));
assertThat(api.getContainerSignatureVersion(), is("20240501"));
assertThat(api.getDroidVersion(), is(ResourceBundle.getBundle("options").getString("version_no")));
assertThat(api.getBinarySignatureVersion(), is("114"));
assertThat(api.getBinarySignatureVersion(), is("118"));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
*/
public class DroidAPITestUtils {
public static DroidAPI createApi() throws SignatureParseException {
Path signaturePath = Paths.get("../droid-results/custom_home/signature_files/DROID_SignatureFile_V114.xml");
Path containerPath = Paths.get("../droid-results/custom_home/container_sigs/container-signature-20230822.xml");
Path signaturePath = Paths.get("../droid-results/custom_home/signature_files/DROID_SignatureFile_V118.xml");
Path containerPath = Paths.get("../droid-results/custom_home/container_sigs/container-signature-20240501.xml");
return DroidAPI.getInstance(signaturePath, containerPath); //Create only once instance of Droid.
}
}
6 changes: 3 additions & 3 deletions droid-binary/bin/Using sigtool.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ You can read an existing binary or container signature file, and output a new si

For example, if you ran:
```
sigtool --file "DROID_SignatureFile_V114.xml"
sigtool --file "DROID_SignatureFile_V118.xml"
```
It would write a new XML file to the console. You can pipe this into a new file using your shell. The signature file will be transformed to use the new syntax, e.g.:
```
Expand All @@ -106,7 +106,7 @@ It would write a new XML file to the console. You can pipe this into a new file
```
You can see that it's transformed a binary signature file using container syntax (the default). If we wanted to use the older binary syntax for this transformation, we could write:
```
sigtool --binary --file "DROID_SignatureFile_V114.xml"
sigtool --binary --file "DROID_SignatureFile_V118.xml"
```
It would give this output (snippet):
```
Expand All @@ -125,7 +125,7 @@ It would give this output (snippet):
## Summarise all signatures in a syntax file.
You can obtain a summary of all signatures in a signature file into a tab-delimited format, by specifying the --expression option. For example, running:
```
sigtool --expression --file "DROID_SignatureFile_V114.xml"
sigtool --expression --file "DROID_SignatureFile_V118.xml"
```
Would give the following output (snippet):

Expand Down
4 changes: 2 additions & 2 deletions droid-command-line/src/main/resources/options.properties
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ droid -Pr "profile.maxBytesToScan=32768" -a "C:\\Files\\A Folder" -p "C:\\Result
Properties which can be overridden are those prefixed by "profile" in the droid.properties file contained in the droid home folder, \
normally found in the .droid6 home folder under the user's home folder. These currently include the following properties:\n \
profile.defaultThrottle = 0 \n \
profile.defaultBinarySigFileVersion = DROID_SignatureFile_V114 \n \
profile.defaultContainerSigFileVersion = container-signature-20230822 \n \
profile.defaultBinarySigFileVersion = DROID_SignatureFile_V118 \n \
profile.defaultContainerSigFileVersion = container-signature-20240501 \n \
profile.processTar = true \n \
profile.processZip = true \n \
profile.processGzip = true \n \
Expand Down
Loading

0 comments on commit 0c72b1d

Please sign in to comment.