README.md (2097B)
1 AppImage binary for Electrum 2 ============================ 3 4 ✓ _This binary should be reproducible, meaning you should be able to generate 5 binaries that match the official releases._ 6 7 This assumes an Ubuntu host, but it should not be too hard to adapt to another 8 similar system. The host architecture should be x86_64 (amd64). 9 The docker commands should be executed in the project's root folder. 10 11 We currently only build a single AppImage, for x86_64 architecture. 12 Help to adapt these scripts to build for (some flavor of) ARM would be welcome, 13 see [issue #5159](https://github.com/spesmilo/electrum/issues/5159). 14 15 16 1. Install Docker 17 18 ``` 19 $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 20 $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" 21 $ sudo apt-get update 22 $ sudo apt-get install -y docker-ce 23 ``` 24 25 2. Build image 26 27 ``` 28 $ sudo docker build -t electrum-appimage-builder-img contrib/build-linux/appimage 29 ``` 30 31 3. Build binary 32 33 ``` 34 $ sudo docker run -it \ 35 --name electrum-appimage-builder-cont \ 36 -v $PWD:/opt/electrum \ 37 --rm \ 38 --workdir /opt/electrum/contrib/build-linux/appimage \ 39 electrum-appimage-builder-img \ 40 ./build.sh 41 ``` 42 43 4. The generated binary is in `./dist`. 44 45 46 ## FAQ 47 48 ### How can I see what is included in the AppImage? 49 Execute the binary as follows: `./electrum*.AppImage --appimage-extract` 50 51 ### How to investigate diff between binaries if reproducibility fails? 52 ``` 53 cd dist/ 54 ./electrum-*-x86_64.AppImage1 --appimage-extract 55 mv squashfs-root/ squashfs-root1/ 56 ./electrum-*-x86_64.AppImage2 --appimage-extract 57 mv squashfs-root/ squashfs-root2/ 58 $(cd squashfs-root1; find -type f -exec sha256sum '{}' \; > ./../sha256sum1) 59 $(cd squashfs-root2; find -type f -exec sha256sum '{}' \; > ./../sha256sum2) 60 diff sha256sum1 sha256sum2 > d 61 cat d 62 ``` 63 64 For file metadata, e.g. timestamps: 65 ``` 66 rsync -n -a -i --delete squashfs-root1/ squashfs-root2/ 67 ``` 68 69 Useful binary comparison tools: 70 - vbindiff 71 - diffoscope