Commit graph

31 commits

Author SHA1 Message Date
SomberNight
4cec098d2d
build: create a standalone build script for libsecp256k1
heavily based on Electron-Cash/Electron-Cash@eda015908e
2020-02-11 16:48:24 +01:00
SomberNight
a5cd34dc08
follow-up prev (oops, only committed part of the changes) 2020-01-22 18:26:29 +01:00
Axel Gembe
4406eebbfe
Build: Uninstall Cython from AppImage
Cython is not needed at runtime.

-----

taken from c64910055d

related #5859
2020-01-22 12:27:17 +01:00
SomberNight
80025a3af4
requirements-hw: re-add Cython
this reverts ec496a8222
Cython must be pinned down for reproducible builds
related #5859
2020-01-22 12:08:30 +01:00
SomberNight
1c4728ecc6
appimage binary: bump python version (3.6.8->3.7.6) 2020-01-16 19:12:24 +01:00
SomberNight
7c090f92ce
binaries: use "--no-dependencies" option for pip install
All (incl indirect) dependencies are already listed in deterministic-build/requirements*.txt.
This option makes it easier to manually rm a dependency from that list for e.g. testing.
2020-01-10 19:01:32 +01:00
Axel Gembe
880bd16883
AppImage: Improve binary stripping
Slightly reduces file size, improves build speed and makes build more
reproducible.

The .comment section contained GCC version information which could cause
different build output from just a minor update in GCC. The information is not
needed so we strip this.

The strip command was invoked using xargs, spawning a new process for each file.
This is inefficient as xargs can correctly run the strip command with multiple
file names.

-----

taken from 43aaf9572f
2019-12-17 21:41:17 +01:00
SomberNight
b381fd84fb
build: when building libsecp256k1, patch Makefile.am before autogen.sh
apparently this could have caused issues on MacOS

based on Electron-Cash/Electron-Cash@69f6cd0aa0
2019-09-08 18:47:30 +02:00
SomberNight
3d7cb935ff
appimage: don't rm jsonschema-*.dist-info as pkg needs it 2019-09-02 19:21:53 +02:00
SomberNight
fc5248550c
appimage build: change base to ubuntu 16.04
ubuntu 14.04 is EOL
2019-08-09 20:56:20 +02:00
SomberNight
249e3d496b
appimage build: rm "build" folder if present as it makes build non-reproducible
AFAICT the "build" is created if you "python setup.py install" electrum,
which is now deprecated in any case.
2019-07-19 04:52:26 +02:00
SomberNight
c67705e116
appimage build: build was failing on some host systems
On Ubuntu host, build succeeded; but e.g. on Manjaro host, it failed with:
```
./build.sh: line 233: /opt/electrum/contrib/build-linux/appimage/../../../contrib/build-linux/appimage/.cache/appimage/appimagetool: No such file or directory
```
2019-07-10 20:26:25 +02:00
Axel Gembe
69b673b8a1
AppImage: Bundle more binaries to increase compatibility
This slightly increases the AppImage size but allows us to be more
compatible with older distributions.

-----

taken from Electron-Cash/Electron-Cash@96644acd6f
2019-07-04 23:35:52 +02:00
Axel Gembe
0d1a473bb0
AppImage: Disable pip warnings about script install locations
It warns about scripts being installed in a location that is not on the
path, but that is inconsequential as they are not used.

-----

taken from Electron-Cash/Electron-Cash@9a29017c5d
2019-07-04 22:31:56 +02:00
SomberNight
9f28f8bcc6
Appimage: follow-up b69249f6c3
libsecp256k1.a needs to be deleted as it's not reproducible...
2019-06-23 04:17:46 +02:00
SomberNight
266484e0fd
Appimage: nits. use "fail"
somewhat based on same script in Electron-Cash/Electron-Cash
2019-06-23 04:13:28 +02:00
Axel Gembe
bb59a1298a
AppImage: Patch Python sysconfigdata
When building in docker on macOS, python builds with .exe extension
because the case insensitive file system of macOS leaks into docker.
This causes the build to result in a different output on macOS compared
to Linux. We simply patch sysconfigdata to remove the extension.

Some more info: https://bugs.python.org/issue27631
2019-06-23 04:13:23 +02:00
SomberNight
ec496a8222
requirements-hw: rm Cython
not actually needed
based on Electron-Cash/Electron-Cash@70de1a2b53
2019-06-23 03:06:36 +02:00
Axel Gembe
b69249f6c3
AppImage: Remove unused binaries
There are a lot of dupliacted files, testing files and unused libraries
present in the AppImage. Removing these reduces the AppImage size
significantly.

-----

taken from Electron-Cash/Electron-Cash@cff5fb1289
2019-06-23 02:56:33 +02:00
Axel Gembe
501fd8f9e5
AppImage: Improve reproducible Python build reliability on Linux
There was a problem where Python would not properly include the faketime
timestamp sometimes. This patch replaces faketime with a patch that is
used by Ubuntu for reproducible builds by exporting BUILD_DATE and
BUILD_TIME with the desired values.

-----

taken from Electron-Cash/Electron-Cash@9532508a3f
2019-06-23 02:47:16 +02:00
Axel Gembe
ae714772c3
AppImage: Make build reproducible
We build our own mksquashfs from squashfskit which supports generating
reproducible squashfs images. We use a small wrapper script to remove
the -mkfs-fixed-time which appimagekit passes but squashfskits
mksquashfs does not support.

-----

taken from Electron-Cash/Electron-Cash@dd1f106f4f
see AppImage/AppImageKit#929
2019-06-23 02:40:29 +02:00
SomberNight
c7b64f4794
AppImage: update appimagetool version 2019-06-11 20:24:51 +02:00
SomberNight
63e5119ceb
builds: parallelise "make" by setting "-j4" 2019-06-11 20:02:28 +02:00
Axel Gembe
cd52350f5d
AppImage: Remove unused PyQt5 modules
We already delete unused Qt modules, but we weren't deleting their PyQt5 modules.

-----

taken from Electron-Cash/Electron-Cash@e044c94677
2019-05-15 19:04:42 +02:00
Axel Gembe
5afda62ee3
AppImage: Remove Qt.so to prevent importing from PyQt5.Qt
Importing from PyQt5.Qt is an unnecessary fallback that loads every PyQt5 module.

-----

taken from Electron-Cash/Electron-Cash@d69471b31d
2019-05-15 19:03:18 +02:00
Axel Gembe
c3b92aa13a
AppImage: Copy libusb binary into image
pkg2appimage excludes libusb-1.0.so by default for no good reason:

83483c2971/excludelist (L112)

This can cause an issue when the AppImage loads the systems libusb but the
systems libusb in turn loads libudev from the AppImage. The kernel ABI for
libusb will not be changing so it is safe to bundle it into the AppImage.

-----

taken from Electron-Cash/Electron-Cash@25d45fdcbf
2019-05-15 19:01:39 +02:00
SomberNight
f432320576
appimage build: nits.
also touch symbolic links
2019-04-12 16:54:22 +02:00
SomberNight
03ab64e39f
appimage: towards deterministic builds
same-machine build almost works.

$ 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..
2019-03-06 04:53:18 +01:00
SomberNight
699562c78d
bump libsecp256k1 version 2019-02-08 16:17:52 +01:00
SomberNight
2c71b9da0c
icons: instead of symlinks, just mv "icons" dir
symlinks are really inconvenient on Windows
(when running from cloned source)

follow-up #5055
2019-02-07 20:01:52 +01:00
SomberNight
a754f9fe10
initial commit for building AppImages for Linux x86_64 2019-02-03 23:45:30 +01:00