summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-11-15 17:17:48 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-11-15 18:47:38 +0100
commit5aff42b8a30a7e896b703babc6277fe97deb743f (patch)
tree4979ef73aa6ebd7a8f810ef67d55940e7de8cf26
parent44a916bcb2ec5b3483635b6324d6c26d9749bc4f (diff)
downloadvendor_replicant_artwork-5aff42b8a30a7e896b703babc6277fe97deb743f.tar.gz
vendor_replicant_artwork-5aff42b8a30a7e896b703babc6277fe97deb743f.tar.bz2
vendor_replicant_artwork-5aff42b8a30a7e896b703babc6277fe97deb743f.zip
Make the zip files reproducible
Running mat2 on the png files and running the following touch command (which is inspired from the one in the reproducible builds documentaiton[1]): cd tmp && find -print0 | \ xargs -0r touch --no-dereference \ --date="@0" isn't sufficient to make the zip files reproducible as we still end up with differences that diffoscope is unable to parse: +++ tests/data/replicant_banner_alpha.zip │┄ Format-specific differences are supported for ZIP archives but no file-specific differences were detected; falling back to a binary diff. file(1) reports: Zip archive data, at least v1.0 to extract, compression method=store │┄ Archive contents identical but files differ, possibly due to different compression levels. Falling back to binary comparison. @@ -5,15 +5,15 @@ 00000040: 0000 7265 706c 6963 616e 745f 6261 6e6e ..replicant_bann 00000050: 6572 5f61 6c70 6861 2072 6570 6c69 6361 er_alpha replica 00000060: 6e74 5f62 616e 6e65 725f 616c 7068 6120 nt_banner_alpha 00000070: 310a 7020 3020 3020 7265 706c 6963 616e 1.p 0 0 replican 00000080: 740a 504b 0304 0a00 0000 0000 0000 2100 t.PK..........!. 00000090: 0000 0000 0000 0000 0000 0000 0a00 1c00 ................ 000000a0: 7265 706c 6963 616e 742f 5554 0900 0300 replicant/UT.... -000000b0: 0000 00f2 9392 6175 780b 0001 04e8 0300 ......aux....... +000000b0: 0000 00e1 9392 6175 780b 0001 04e8 0300 ......aux....... 000000c0: 0004 e803 0000 504b 0304 0a00 0000 0000 ......PK........ 000000d0: 0000 2100 5160 ed0a 1740 0000 1740 0000 ..!.Q`...@...@.. 000000e0: 2400 1c00 7265 706c 6963 616e 742f 7265 $...replicant/re 000000f0: 706c 6963 616e 745f 6261 6e6e 6572 5f61 plicant_banner_a 00000100: 6c70 6861 2e70 6e67 5554 0900 0300 0000 lpha.pngUT...... 00000110: 0000 0000 0075 780b 0001 04e8 0300 0004 .....ux......... 00000120: e803 0000 8950 4e47 0d0a 1a0a 0000 000d .....PNG........ │ --- replicant_banner_alpha.zip ├── +++ tests/data/replicant_banner_alpha.zip │ @@ -5,15 +5,15 @@ │ 00000040: 0000 7265 706c 6963 616e 745f 6261 6e6e ..replicant_bann │ 00000050: 6572 5f61 6c70 6861 2072 6570 6c69 6361 er_alpha replica │ 00000060: 6e74 5f62 616e 6e65 725f 616c 7068 6120 nt_banner_alpha │ 00000070: 310a 7020 3020 3020 7265 706c 6963 616e 1.p 0 0 replican │ 00000080: 740a 504b 0304 0a00 0000 0000 0000 2100 t.PK..........!. │ 00000090: 0000 0000 0000 0000 0000 0000 0a00 1c00 ................ │ 000000a0: 7265 706c 6963 616e 742f 5554 0900 0300 replicant/UT.... │ -000000b0: 0000 00f2 9392 6175 780b 0001 04e8 0300 ......aux....... │ +000000b0: 0000 00e1 9392 6175 780b 0001 04e8 0300 ......aux....... │ 000000c0: 0004 e803 0000 504b 0304 0a00 0000 0000 ......PK........ │ 000000d0: 0000 2100 5160 ed0a 1740 0000 1740 0000 ..!.Q`...@...@.. │ 000000e0: 2400 1c00 7265 706c 6963 616e 742f 7265 $...replicant/re │ 000000f0: 706c 6963 616e 745f 6261 6e6e 6572 5f61 plicant_banner_a │ 00000100: 6c70 6861 2e70 6e67 5554 0900 0300 0000 lpha.pngUT...... │ 00000110: 0000 0000 0075 780b 0001 04e8 0300 0004 .....ux......... │ 00000120: e803 0000 8950 4e47 0d0a 1a0a 0000 000d .....PNG........ But running mat2 on the produced zip archives results in identical archives being produced accross several runs. The downside of that change is that we now depends on mat2 to create the zip files, and so we'll need to integrating mat2 in Android, or to make it use the host mat2 if we want to automatize the creation of the zip images. [1]https://reproducible-builds.org/docs/archives/ Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--Makefile11
-rwxr-xr-xbootanimation/scripts/bootanimation.sh1
-rw-r--r--tests/data/replicant_banner_alpha.zipbin0 -> 15950 bytes
-rw-r--r--tests/data/replicant_banner_black.zipbin0 -> 17141 bytes
-rw-r--r--tests/data/replicant_banner_white.zipbin0 -> 16000 bytes
-rw-r--r--tests/data/replicant_icon.zipbin0 -> 1168 bytes
-rw-r--r--tests/data/replicant_logo_alpha.zipbin0 -> 29091 bytes
-rw-r--r--tests/data/replicant_logo_black.zipbin0 -> 34984 bytes
-rw-r--r--tests/data/replicant_logo_white.zipbin0 -> 29091 bytes
9 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..6e8e8f9
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,11 @@
+.PHONY: check
+
+check:
+ bootanimation/scripts/bootanimation.sh
+ cmp replicant_banner_alpha.zip tests/data/replicant_banner_alpha.zip
+ cmp replicant_banner_black.zip tests/data/replicant_banner_black.zip
+ cmp replicant_banner_white.zip tests/data/replicant_banner_white.zip
+ cmp replicant_icon.zip tests/data/replicant_icon.zip
+ cmp replicant_logo_alpha.zip tests/data/replicant_logo_alpha.zip
+ cmp replicant_logo_black.zip tests/data/replicant_logo_black.zip
+ cmp replicant_logo_white.zip tests/data/replicant_logo_white.zip
diff --git a/bootanimation/scripts/bootanimation.sh b/bootanimation/scripts/bootanimation.sh
index f9452e0..a0792a0 100755
--- a/bootanimation/scripts/bootanimation.sh
+++ b/bootanimation/scripts/bootanimation.sh
@@ -33,6 +33,7 @@ p 0 0 replicant"
EOF
cd tmp
zip -r -0 "../$prefix.zip" ./*
+ mat2 --inplace ../$prefix.zip
cd ..
rm -rf tmp/
diff --git a/tests/data/replicant_banner_alpha.zip b/tests/data/replicant_banner_alpha.zip
new file mode 100644
index 0000000..8664155
--- /dev/null
+++ b/tests/data/replicant_banner_alpha.zip
Binary files differ
diff --git a/tests/data/replicant_banner_black.zip b/tests/data/replicant_banner_black.zip
new file mode 100644
index 0000000..3edd01c
--- /dev/null
+++ b/tests/data/replicant_banner_black.zip
Binary files differ
diff --git a/tests/data/replicant_banner_white.zip b/tests/data/replicant_banner_white.zip
new file mode 100644
index 0000000..affb524
--- /dev/null
+++ b/tests/data/replicant_banner_white.zip
Binary files differ
diff --git a/tests/data/replicant_icon.zip b/tests/data/replicant_icon.zip
new file mode 100644
index 0000000..0074d67
--- /dev/null
+++ b/tests/data/replicant_icon.zip
Binary files differ
diff --git a/tests/data/replicant_logo_alpha.zip b/tests/data/replicant_logo_alpha.zip
new file mode 100644
index 0000000..ba3cd3d
--- /dev/null
+++ b/tests/data/replicant_logo_alpha.zip
Binary files differ
diff --git a/tests/data/replicant_logo_black.zip b/tests/data/replicant_logo_black.zip
new file mode 100644
index 0000000..9a18e9d
--- /dev/null
+++ b/tests/data/replicant_logo_black.zip
Binary files differ
diff --git a/tests/data/replicant_logo_white.zip b/tests/data/replicant_logo_white.zip
new file mode 100644
index 0000000..a2dd052
--- /dev/null
+++ b/tests/data/replicant_logo_white.zip
Binary files differ