AppImage / AppImage/AppImageKit
problems making appimage reproducible
- 主要言語
- 言語のデータがありません
- スター
- 9.4k
- フォーク
- 588
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I am trying to make the [AppImage binary for Electrum](https://github.com/spesmilo/electrum/tree/03ab64e39f210f16ac8419974c67eea03a19da6c/contrib/build-linux/appimage) reproducible/deterministic.
Looking at e.g. https://github.com/AppImage/AppImageKit/issues/625, I take it this should be possible.
I am using [appimagetool release 11](https://github.com/spesmilo/electrum/blob/03ab64e39f210f16ac8419974c67eea03a19da6c/contrib/build-linux/appimage/build.sh#L32).
I think I've managed to build *almost* identical binaries (only been testing on one machine for now).
Would like to request pointers/help regarding what might be missing.
If I build two binaries, and run --appimage-extract on them, the extracted folders seem identical (e.g. recursive md5sum, and then diff of that, is empty)
diff of recursive md5sum of extracted contents
```
cd dist/
./electrum-3.3.4-76-geb04551-dirty-x86_64.AppImage1 --appimage-extract
mv squashfs-root/ squashfs-root1/
./electrum-3.3.4-76-geb04551-dirty-x86_64.AppImage2 --appimage-extract
mv squashfs-root/ squashfs-root2/
$(cd squashfs-root1; find -type f -exec md5sum '{}' \; > ./../md5sum1)
$(cd squashfs-root2; find -type f -exec md5sum '{}' \; > ./../md5sum2)
diff md5sum1 md5sum2 # << empty
```
So that's good I guess :)
If I use diffoscope to compare the binaries themselves, it tells me the only difference is due to an elf section called `digest_md5`:
```
$ diffoscope dist/electrum-3.3.4-76-geb04551-dirty-x86_64.AppImage1 dist/electrum-3.3.4-76-geb04551-dirty-x86_64.AppImage2
|############################| 100% Time: 0:00:05
--- dist/electrum-3.3.4-76-geb04551-dirty-x86_64.AppImage1
+++ dist/electrum-3.3.4-76-geb04551-dirty-x86_64.AppImage2
├── readelf --wide --decompress --hex-dump=.digest_md5 {}
│ @@ -1,4 +1,4 @@
│
│ Hex dump of section '.digest_md5':
│ - 0x00000000 77e356ea eefe1459 a40f00d9 ab5c0e00 w.V....Y.....\..
│ + 0x00000000 1dda23b5 31f9024c fe6d2755 e930a41a ..#.1..L.m'U.0..
```
I've found [this in the appimage docs](https://docs.appimage.org/introduction/software-overview.html#digest-md5):
> digest-md5
> Calculates the MD5 digest used for desktop integration purposes for a given AppImage. This digest depends on the path, not on the contents.
Is that in the docs related to this elf section?
Any idea what I need to make the build deterministic?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。