@@ -13,10 +13,6 @@ CONTRIB_APPIMAGE="$CONTRIB/build-linux/appimage"
1313DISTDIR=" $PROJECT_ROOT /dist"
1414BUILD_UID=$( /usr/bin/stat -c %u " $PROJECT_ROOT " )
1515
16- # when bumping the runtime commit also check if the `type2-runtime-reproducible-build.patch` still works
17- TYPE2_RUNTIME_COMMIT=" 5e7217b7cfeecee1491c2d251e355c3cf8ba6e4d"
18- TYPE2_RUNTIME_REPO=" https://github.com/AppImage/type2-runtime.git"
19-
2016. " $CONTRIB " /build_tools_util.sh
2117
2218
5248
5349# build the type2-runtime binary, this build step uses a separate docker container
5450# defined in the type2-runtime repo (patched with type2-runtime-reproducible-build.patch)
55- TYPE2_RUNTIME_REPO_DIR=" $PROJECT_ROOT_OR_FRESHCLONE_ROOT /contrib/build-linux/appimage/.cache/appimage/type2-runtime"
56- (
57- if [ -f " $TYPE2_RUNTIME_REPO_DIR /runtime-x86_64" ]; then
58- info " type2-runtime already built, skipping"
59- exit 0
60- fi
61- clone_or_update_repo " $TYPE2_RUNTIME_REPO " " $TYPE2_RUNTIME_COMMIT " " $TYPE2_RUNTIME_REPO_DIR "
62-
63- # Apply patch to make runtime build reproducible
64- info " Applying type2-runtime patch..."
65- cd " $TYPE2_RUNTIME_REPO_DIR "
66- git apply " $CONTRIB_APPIMAGE /patches/type2-runtime-reproducible-build.patch" || fail " Failed to apply runtime repo patch"
51+ " $CONTRIB_APPIMAGE /make_type2_runtime.sh" || fail " Error building type2-runtime."
6752
68- info " building type2-runtime in build container..."
69- cd " $TYPE2_RUNTIME_REPO_DIR /scripts/docker"
70- env ARCH=x86_64 ./build-with-docker.sh
71- mv " ./runtime-x86_64" " $TYPE2_RUNTIME_REPO_DIR /"
72-
73- # clean up the empty created 'out' dir to prevent permission issues
74- rm -rf " $TYPE2_RUNTIME_REPO_DIR /out"
75-
76- info " runtime build successful: $( sha256sum " $TYPE2_RUNTIME_REPO_DIR /runtime-x86_64" ) "
77- )
53+ DOCKER_RUN_FLAGS=" "
54+ if sh -c " : >/dev/tty" > /dev/null 2> /dev/null; then
55+ info " /dev/tty is available and usable"
56+ DOCKER_RUN_FLAGS=" -it"
57+ fi
7858
7959info " building binary..."
8060# check uid and maybe chown. see #8261
@@ -84,7 +64,7 @@ if [ ! -z "$ELECBUILD_COMMIT" ] ; then # fresh clone (reproducible build)
8464 sudo chown -R 1000:1000 " $FRESH_CLONE "
8565 fi
8666fi
87- docker run -it \
67+ docker run $DOCKER_RUN_FLAGS \
8868 --name electrum-appimage-builder-cont \
8969 -v " $PROJECT_ROOT_OR_FRESHCLONE_ROOT " :/opt/electrum \
9070 --rm \
0 commit comments