1
0
Commit Graph

34 Commits

Author SHA1 Message Date
SomberNight
31b176169a contrib: mv locale-related scripts to contrib/locale/ 2025-04-14 17:18:37 +00:00
SomberNight
1144d9b8ea build: add script build_cleanlocale.sh 2025-04-14 17:18:34 +00:00
SomberNight
3567a4cfb0 mv git submodule electrum-locale from contrib to electrum/locale
- this merges `contrib/deterministic-build/locale` and `electrum/locale`
- it is now once again possible have translations when running from a local git clone
    - which was already possible in the past before crowdin removed their unauthenticated APIs
        - see https://github.com/spesmilo/electrum/issues/9531
    - however, the translations available are the often-old frozen strings from electrum-locale
        - while previously one could just download the latest strings from crowdin
2025-04-14 17:18:30 +00:00
SomberNight
b70da1d3b9 build: set YARL_NO_EXTENSIONS for all builds
due to cython version mismatch -- easier to just disable the compilation for now
2025-04-01 16:59:26 +00:00
SomberNight
f35437f03c build: set ELECTRUM_ECC_DONT_COMPILE=1, instead manually build lib
Haven't checked if electrum-ecc compiles libsecp reproducibly.
For now let's just keep the old flow.
(but if we spent time on making that compilation reproducible,
the appimage and the macos builds could use it directly)
2024-10-10 15:46:18 +00:00
SomberNight
cfe8502f96 qt desktop gui: upgrade qt5->qt6
closes https://github.com/spesmilo/electrum/issues/8007
2024-09-18 15:48:38 +00:00
SomberNight
0d0aa0f04a build: appimage: dl xcb-util as debian src pkg instead of upstream git
The upstream git repo has been unreachable for at least days.
2024-09-10 15:45:07 +00:00
SomberNight
9508f76b7f appimage build: bump python version (3.10.13->3.11.9) 2024-04-18 17:18:44 +00:00
SomberNight
5369be66da appimage build: build zbar ourselves
to be able to package new version, which has security fixes
2024-01-10 20:48:27 +00:00
SomberNight
615cb66692 appimage build: bump python version (3.10.11->3.10.13) 2023-12-24 05:15:39 +00:00
SomberNight
16c3c3c4c0 appimage build: bump python version (3.9.15->3.10.11) 2023-06-02 17:17:36 +00:00
SomberNight
cede16a522 libsecp256k1: update hardcoded .so lib name in binaries
follow-up 2a2b683d23

TODO: maybe we should drop the version number in the lib name we bundle...
2023-04-21 14:42:51 +00:00
SomberNight
f25e384654 build: fail if not inside git clone
related: https://github.com/spesmilo/electrum/issues/8284
2023-03-28 22:35:19 +00:00
ghost43
0eea47c78d libsecp256k1: update hardcoded .so lib name in binaries (#8186)
follow-up 7d83335e34
2023-02-04 01:36:19 +00:00
SomberNight
65ae281180 build: don't hardcode num worker threads "make -j4" 2022-12-03 22:50:18 +00:00
SomberNight
1e404f4e30 binaries: update python and openssl
note: python 3.9.x is now in source-only mode, so could not update to latest...
it is time to investigate upgrading to python 3.10 in the win and mac binaries
2022-11-05 14:41:23 +00:00
SomberNight
6f311c8930 appimage build: better caching, both locally and on CI 2022-11-04 15:49:16 +00:00
SomberNight
34488478e6 appimage build: build and include libxcb-util1
fixes https://github.com/spesmilo/electrum/issues/8011

> Upgraded from Appimage 4.1.5 to 4.3.2 on MX-Linux 19.
> The new version fails to start with:
>
> ```
> $ electrum
> qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
> This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may > fix this problem.
>
> Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
>
> Aborted (core dumped)
> ```

debian 10 only distributes libxcb-util0.
debian 11 distributes libxcb-util1.
our base image atm is debian 10, so we build the package from source.
2022-10-11 18:24:02 +00:00
SomberNight
b5900eae98 contrib: reformat most shell scripts
Mostly just indentations.
For consistency, to conform to .editorconfig.
2022-09-27 14:55:22 +00:00
SomberNight
0abecffe6d mac build: force using source dist for most of our python dependencies
We compile from tar.gz, instead of using pre-built binary wheels from PyPI.
(or if the dep is pure-python, use tar.gz instead of "source-only" wheel)

-----
Some unorganised things below for future reference.

```
$ dsymutil -dump-debug-map dist1/hid.cpython-39-darwin.so
warning: (x86_64) /private/var/folders/1n/zc14m3td0rg4nt0ftklmm7z00000gn/T/pip-install-bm88zvc1/hidapi_cd307bc31ab34252b77d11d6d7212fc5/build/temp.macosx-10.9-x86_64-3.9/hid.o unable to open object file: No such file or directory
warning: (x86_64) /private/var/folders/1n/zc14m3td0rg4nt0ftklmm7z00000gn/T/pip-install-bm88zvc1/hidapi_cd307bc31ab34252b77d11d6d7212fc5/build/temp.macosx-10.9-x86_64-3.9/hidapi/mac/hid.o unable to open object file: No such file or directory
---
triple:          'x86_64-apple-darwin'
binary-path:     'dist1/hid.cpython-39-darwin.so'
...
```

```
$ nm -pa dist1/hid.cpython-39-darwin.so
```

- https://stackoverflow.com/questions/10044697/where-how-does-apples-gcc-store-dwarf-inside-an-executable
- https://github.com/pypa/pip/issues/6505
- https://github.com/pypa/pip/issues/7808#issuecomment-770275723
- https://github.com/NixOS/nixpkgs/pull/91272
- https://github.com/cython/cython/pull/1576
- 9d2ba1611b/Cython/Compiler/ModuleNode.py (L913)
2022-09-26 12:16:02 +00:00
SomberNight
019d213325 Revert "mac build: force using source dist for most of our python dependencies"
This reverts commit 0c2a885c66.

Reverting for now due to reproducibility issues:
```
error: /Users/vagrant/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate: can't open file: /tmp/electrum_compare_dmg/signed_app/Electrum.app/Contents/MacOS/libffi.8.dylib (No such file or directory)
```
`Electrum.app/Contents/MacOS/libffi.8.dylib` is included when building on one machine, but missing on the other...
Will have to investigate later.

related https://github.com/spesmilo/electrum/pull/7918
2022-08-17 17:07:22 +00:00
SomberNight
c2b5e3ec15 build: use build-locale.sh in all build scripts 2022-08-16 19:06:47 +00:00
SomberNight
7e2fab809d appimage build: better parameterise python version 2022-08-10 21:03:55 +02:00
SomberNight
0c2a885c66 mac build: force using source dist for most of our python dependencies
We compile from tar.gz, instead of using pre-built binary wheels from PyPI.
(or if the dep is pure-python, use tar.gz instead of "source-only" wheel)

-----
Some unorganised things below for future reference.

```
$ dsymutil -dump-debug-map dist1/hid.cpython-39-darwin.so
warning: (x86_64) /private/var/folders/1n/zc14m3td0rg4nt0ftklmm7z00000gn/T/pip-install-bm88zvc1/hidapi_cd307bc31ab34252b77d11d6d7212fc5/build/temp.macosx-10.9-x86_64-3.9/hid.o unable to open object file: No such file or directory
warning: (x86_64) /private/var/folders/1n/zc14m3td0rg4nt0ftklmm7z00000gn/T/pip-install-bm88zvc1/hidapi_cd307bc31ab34252b77d11d6d7212fc5/build/temp.macosx-10.9-x86_64-3.9/hidapi/mac/hid.o unable to open object file: No such file or directory
---
triple:          'x86_64-apple-darwin'
binary-path:     'dist1/hid.cpython-39-darwin.so'
...
```

```
$ nm -pa dist1/hid.cpython-39-darwin.so
```

- https://stackoverflow.com/questions/10044697/where-how-does-apples-gcc-store-dwarf-inside-an-executable
- https://github.com/pypa/pip/issues/6505
- https://github.com/pypa/pip/issues/7808#issuecomment-770275723
- https://github.com/NixOS/nixpkgs/pull/91272
- https://github.com/cython/cython/pull/1576
- 9d2ba1611b/Cython/Compiler/ModuleNode.py (L913)
2022-08-06 07:52:03 +02:00
SomberNight
6633ef4c35 build appimage: bump pkg2appimage version
should fix https://github.com/spesmilo/electrum/issues/7784
by including commit 1e3ecde6b9
2022-04-25 21:04:46 +02:00
SomberNight
634611272a build appimage: make binary somewhat smaller by excluding stuff
4.1.5->4.2.1, the appimage grew 54M->66M. This change shrinks it back to 58M.
```
$ ls -lah
total 224M
drwxrwxr-x  5 user user 4.0K Mar 27 18:18 .
drwxrwxr-x 16 user user 4.0K Mar 23 16:02 ..
-rwxrw-r--  1 user user  48M Dec 18  2020 electrum-4.0.9-x86_64.AppImage
-rwxrw-r--  1 user user  54M Jan 19 14:25 electrum-4.1.5-x86_64.AppImage
-rwxr-xr-x  1 user user  58M Mar 27 18:12 electrum-4.2.1-dirty-x86_64.AppImage
-rwxrw-r--  1 user user  66M Mar 27 15:00 electrum-4.2.1-x86_64.AppImage
```
I've used the great `ncdu` tool to investigate file sizes.
```
$ du squashfs-root-415/usr/lib/python3.7/ --max-depth=1 | sort -nr | head -n8
154608	squashfs-root-415/usr/lib/python3.7/
138864	squashfs-root-415/usr/lib/python3.7/site-packages
4720	squashfs-root-415/usr/lib/python3.7/lib-dynload
1744	squashfs-root-415/usr/lib/python3.7/encodings
664	squashfs-root-415/usr/lib/python3.7/pydoc_data
460	squashfs-root-415/usr/lib/python3.7/distutils
460	squashfs-root-415/usr/lib/python3.7/asyncio
436	squashfs-root-415/usr/lib/python3.7/email

$ du squashfs-root-421/usr/lib/python3.9/ --max-depth=1 | sort -nr | head -n8
194088	squashfs-root-421/usr/lib/python3.9/
143512	squashfs-root-421/usr/lib/python3.9/site-packages
33824	squashfs-root-421/usr/lib/python3.9/config-3.9-x86_64-linux-gnu
5244	squashfs-root-421/usr/lib/python3.9/lib-dynload
1720	squashfs-root-421/usr/lib/python3.9/encodings
696	squashfs-root-421/usr/lib/python3.9/pydoc_data
520	squashfs-root-421/usr/lib/python3.9/asyncio
464	squashfs-root-421/usr/lib/python3.9/distutils
```
We should delete `usr/lib/python3.9/config-3.9-x86_64-linux-gnu/` (which is 33M unpacked)
With py3.7 (electrum 4.1.5), this folder was named `config-3.7m-x86_64-linux-gnu`,
presumably because the default config to compile py3.7 was `--with-pymalloc`,
but maybe it is not for py3.9... ? not sure. (see https://peps.python.org/pep-3149/ )
2022-03-27 19:27:55 +02:00
SomberNight
98d32f41d5 build: (reproducibility) always uses "pip install" with "--no-build-isolation"
fixes https://github.com/spesmilo/electrum/issues/7737
fixes https://github.com/spesmilo/electrum/issues/7736
related 8559d1eb72
2022-03-26 02:45:47 +01:00
SomberNight
1bb7ef92e7 binaries: bump python 3.9.10->3.9.11; and for android 3.8.12->3.8.13
This is bumping the python versions bundled inside our binaries.
For macOS and AppImage, from 3.9.10 to 3.9.11.
For Android, from 3.8.12 to 3.8.13.

Windows is left untouched as I am having issues with the wine build when using 3.9.11.
(see https://github.com/spesmilo/electrum/pull/7721#issuecomment-1071901116 )
2022-03-18 16:21:24 +01:00
SomberNight
5e2cee6a31 build appimage: rm importlib-metadata workaround
The importlib-metadata pkg is no longer needed apparently (since we bumped the min python to 3.8).
2022-02-22 17:14:23 +01:00
SomberNight
bb5b52f2d7 binaries: bump python 3.9.7->3.9.10 2022-02-17 16:51:13 +01:00
SomberNight
ca2d1eea45 build appimage: update appimagetool and stop using fork of mksquashfs
The latest release of appimagetool bundles a new enough version of
mksquashfs. We had been building a fork of mksquashfs but all the
relevant patches there had been upstreamed.

Note: we still need a wrapper when calling mksquashfs, as appimagetool
calls it with "-mkfs-time 0" and we have the SOURCE_DATE_EPOCH env var
set; and these two would conflict.
Two ways to fix: either unset SOURCE_DATE_EPOCH for that context, or
build a wrapper that removes the "-mkfs-time 0". The former would be
cleaner but for some reason I did not manage to build reproducibly
that way. The latter seems to work.

related:
- https://github.com/AppImage/AppImageKit/issues/929#issuecomment-580769875
  > Now official squashfs 4.4 makes reproducible images by default
- https://github.com/AppImage/AppImageKit/pull/996
2021-09-23 18:49:44 +02:00
SomberNight
11146d352f appimage build: bump python 3.8.12->3.9.7 2021-09-20 19:31:41 +02:00
SomberNight
fb3ce438d6 appimage build: bump python 3.7.10->3.8.12 2021-09-20 19:31:38 +02:00
SomberNight
3df1c3bbf7 build: rename some scripts
also, merge sdist/build.sh and sdist/make_tgz into sdist/make_sdist.sh
2021-06-18 16:29:03 +02:00