spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.44k stars 3.09k forks source link

Electrum 4.0.5 AppImage reproducibility issue (kerberos, git) #6747

Closed SomberNight closed 2 years ago

SomberNight commented 3 years ago

When building electrum-4.0.5-x86_64.AppImage, ThomasV and I got the same hash, however travis got a different one.

54dd4cdb42fe967eb9c3454ef45b1bd35b281475d4a15e5582a911e3d671d2a5  electrum-4.0.5-x86_64.AppImage_offi
31965018e5574248c9596c7f5e39fa0f345e607592b26efc087edce7842eb0a7  electrum-4.0.5-x86_64.AppImage_travis
$ cd dist/
$ ./electrum-*-x86_64.AppImage_offi --appimage-extract
$ mv squashfs-root/ squashfs-root1/
$ ./electrum-*-x86_64.AppImage_travis --appimage-extract
$ mv squashfs-root/ squashfs-root2/
$ $(cd squashfs-root1; find -type f -exec sha256sum '{}' \; > ./../sha256sum1)
$ $(cd squashfs-root2; find -type f -exec sha256sum '{}' \; > ./../sha256sum2)
$ diff sha256sum1 sha256sum2 > d
$ cat d
3404,3407c3404,3407
< cff7984ed5a6e5d8710e25092ee0d4a9b9154ce1ddb2def2b60922ce5cf492f1  ./usr/lib/x86_64-linux-gnu/libkrb5support.so.0
< 95884dfd68d850bf34b84ec2d39f09c0f3fa2f5c03dbf5b6551bb749d550fe90  ./usr/lib/x86_64-linux-gnu/libkrb5.so.3
< 1041cc971c8080eda29c08e5eba848d6a6193124bdc5abb1fb1b9534d34e29ea  ./usr/lib/x86_64-linux-gnu/libk5crypto.so.3
< 9b09dbbb942b25462ea5861e0a730cc3240eab16c5b658e1ccec92b9f295f899  ./usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
---
> 5fd25a60f941f3f806b70c37ddc5f06b13f2e9e28e06c3d16e910eeccc27c1b0  ./usr/lib/x86_64-linux-gnu/libkrb5support.so.0
> 574a2beadf1d002adaec3c5fa802fc15182b7b62241840139a7e3f067a27c69c  ./usr/lib/x86_64-linux-gnu/libkrb5.so.3
> bab97a51b1b4c26c747b230101f632c60fabe6a451e2309fabe3f3fecab4640d  ./usr/lib/x86_64-linux-gnu/libk5crypto.so.3
> 331c4e02f4bbfec63e538f05a06273332b19fbfc4aa3f78d6e3d6efea04cf0ce  ./usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2

I have tried building a fresh docker image (with docker build --no-cache) and got the same as travis now. So travis must have gotten newer packages than what ThomasV and I had already installed.

This is not the first time this has happened... (see e.g. https://github.com/spesmilo/electrum/issues/6357) Not sure how we could properly fix this and not keep playing whack-a-mole with these .so files.

SomberNight commented 3 years ago
root@29ca75e8d0cd:/opt/electrum/contrib/build-linux/appimage# dpkg -S libkrb5support.so.0
libkrb5support0:amd64: /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
libkrb5support0:amd64: /usr/lib/x86_64-linux-gnu/libkrb5support.so.0

root@29ca75e8d0cd:/opt/electrum/contrib/build-linux/appimage# dpkg -S libkrb5.so.3
libkrb5-3:amd64: /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
libkrb5-3:amd64: /usr/lib/x86_64-linux-gnu/libkrb5.so.3

root@29ca75e8d0cd:/opt/electrum/contrib/build-linux/appimage# dpkg -S libk5crypto.so.3
libk5crypto3:amd64: /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
libk5crypto3:amd64: /usr/lib/x86_64-linux-gnu/libk5crypto.so.3

root@29ca75e8d0cd:/opt/electrum/contrib/build-linux/appimage# dpkg -S libgssapi_krb5.so.2
libgssapi-krb5-2:amd64: /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
libgssapi-krb5-2:amd64: /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2

I am not even sure why we have all this kerberos stuff installed.

SomberNight commented 3 years ago

Ahh they are pulled in by git...

root@29ca75e8d0cd:/opt/electrum/contrib/build-linux/appimage# apt-cache rdepends libgssapi-krb5-2
libgssapi-krb5-2
Reverse Depends:
  openssh-client
  libkrb5support0
  libcurl3-gnutls
  libk5crypto3

root@29ca75e8d0cd:/opt/electrum/contrib/build-linux/appimage# apt-cache rdepends libcurl3-gnutls
libcurl3-gnutls
Reverse Depends:
  git
SomberNight commented 2 years ago

I think this kind of issue has been categorically fixed by https://github.com/spesmilo/electrum/pull/7926