AppImage / AppImage/AppImageKit

problems making appimage reproducible

Đang mở
#929 20 bình luận 2 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
9.4k
Fork
588
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.