Bootstrappable Flatpak

This commit is contained in:
tobtoht 2023-05-06 13:48:11 +02:00
parent 18fe61117b
commit 8deb30e0ef
No known key found for this signature in database
GPG key ID: E45B10DD027D2472
19 changed files with 432 additions and 26 deletions

View file

@ -86,6 +86,8 @@ jobs:
host: "x86_64-linux-gnu"
- name: "x86_64-linux-gnu.no-tor-bundle"
host: "x86_64-linux-gnu.no-tor-bundle"
- name: "x86_64-linux-gnu.flatpak"
host: "x86_64-linux-gnu.flatpak"
- name: "aarch64-linux-gnu"
host: "aarch64-linux-gnu"
- name: "arm-linux-gnueabihf"

View file

@ -30,6 +30,7 @@ $(package)_patches += windows_func_fix.patch
$(package)_patches += WindowsToolchain.cmake
$(package)_patches += revert_f99ee441.patch
$(package)_patches += CVE-2023-34410-qtbase-6.5.diff
#$(package)_patches += fix-static-fontconfig-static-linking.patch
$(package)_qttools_file_name=qttools-$($(package)_suffix)
$(package)_qttools_sha256_hash=5744df9e84b2a86f7f932ffc00341c7d7209e741fd1c0679a32b855fcceb2329
@ -72,7 +73,6 @@ $(package)_config_opts += -no-linuxfb
#$(package)_config_opts += -no-libproxy # Needed
$(package)_config_opts += -no-libudev
$(package)_config_opts += -no-mtdev
$(package)_config_opts += -no-openssl # Needed
$(package)_config_opts += -openssl-linked
$(package)_config_opts += -no-openvg
$(package)_config_opts += -no-reduce-relocations

View file

@ -0,0 +1,72 @@
diff --git a/cmake/FindExpat.cmake b/cmake/FindExpat.cmake
new file mode 100644
index 0000000000..cdba26e72e
--- /dev/null
+++ b/cmake/FindExpat.cmake
@@ -0,0 +1,9 @@
+set(Expat_FOUND 0)
+
+find_package(PkgConfig QUIET)
+
+pkg_check_modules(EXPAT expat IMPORTED_TARGET)
+
+if(TARGET PkgConfig::EXPAT)
+ set(Expat_FOUND 1)
+endif()
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index b29be1a768..7446d7b1ae 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -673,6 +673,14 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_cssparser
text/qcssparser.cpp text/qcssparser_p.h
)
+qt_internal_extend_target(Gui CONDITION QT_FEATURE_fontconfig AND QT_FEATURE_freetype AND UNIX AND NOT APPLE
+ SOURCES
+ text/unix/qfontconfigdatabase.cpp text/unix/qfontconfigdatabase_p.h
+ text/unix/qfontenginemultifontconfig.cpp text/unix/qfontenginemultifontconfig_p.h
+ LIBRARIES
+ Fontconfig::Fontconfig
+)
+
qt_internal_extend_target(Gui CONDITION QT_FEATURE_freetype
SOURCES
text/freetype/qfontengine_ft.cpp text/freetype/qfontengine_ft_p.h
@@ -681,17 +689,14 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_freetype
WrapFreetype::WrapFreetype
)
-qt_internal_extend_target(Gui CONDITION UNIX AND NOT APPLE
- SOURCES
- text/unix/qgenericunixfontdatabase_p.h
+qt_internal_extend_target(Gui CONDITION QT_FEATURE_fontconfig AND UNIX AND NOT APPLE
+ LIBRARIES
+ PkgConfig::EXPAT
)
-qt_internal_extend_target(Gui CONDITION QT_FEATURE_fontconfig AND QT_FEATURE_freetype AND UNIX AND NOT APPLE
+qt_internal_extend_target(Gui CONDITION UNIX AND NOT APPLE
SOURCES
- text/unix/qfontconfigdatabase.cpp text/unix/qfontconfigdatabase_p.h
- text/unix/qfontenginemultifontconfig.cpp text/unix/qfontenginemultifontconfig_p.h
- LIBRARIES
- Fontconfig::Fontconfig
+ text/unix/qgenericunixfontdatabase_p.h
)
qt_internal_extend_target(Gui CONDITION APPLE AND NOT MACOS
diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake
index d8319c120b..1ff24eebaf 100644
--- a/src/gui/configure.cmake
+++ b/src/gui/configure.cmake
@@ -43,6 +43,7 @@ if(QT_FEATURE_system_zlib)
qt_add_qmake_lib_dependency(freetype zlib)
endif()
qt_find_package(Fontconfig PROVIDED_TARGETS Fontconfig::Fontconfig MODULE_NAME gui QMAKE_LIB fontconfig)
+qt_find_package(Expat PROVIDED_TARGETS PkgConfig::EXPAT MODULE_NAME gui QMAKE_LIB expat)
qt_add_qmake_lib_dependency(fontconfig freetype)
qt_find_package(gbm PROVIDED_TARGETS gbm::gbm MODULE_NAME gui QMAKE_LIB gbm)
qt_find_package(WrapSystemHarfbuzz 2.6.0 PROVIDED_TARGETS WrapSystemHarfbuzz::WrapSystemHarfbuzz MODULE_NAME gui QMAKE_LIB harfbuzz)
--
2.41.0

View file

@ -0,0 +1,8 @@
[Flatpak Ref]
Name=org.featherwallet.Feather
Branch=stable
Title=Feather Wallet
Url=https://featherwalet.org/flatpak/
RuntimeRepo=https://featherwalet.org/flatpak/org.featherwallet.Empty
IsRuntime=false
GPGKey=mQINBF/HogkBEAChsjCJUsZhDxOx5FrnRA3X5/mJd2xdKskLSPFtnYiQUtKvpRW6i/RVNMkTwFovzbXB6ucKJtY+OoEMu7xDhIkDWp//UlfHuP9AWAvqbhq6V5xVrZ419oQ7JNN4gwAI8+ZjcNq3IVFQQ9mZ3py9t1IUdgWtWM3P/SD7vWiPIjG0D3Bt3Ptl/mZjIFZZWUtFBItJLkiTpW0Ue4t98XMP6mvQiQ/LhP82OtSyCZ6agj4Wa3ve5KjApdEqamBGytx2kmN+AQFgMt66yOvr+97zzuEzI6mlWYORzOc1CFMsmPd6bu/dtQ4Z96T8PNI6i1Lv5VqvqC7RBErvD7hO36JZb8j+PnbE1YADTKrw0HmgpI6d3RLyVop3n6ZQri0+nZ+TH0JG74MiihyZIz826zJO5OIwltexRcW0ZiRSpRCxZekU894lEs5QSxacRLeqM8ZVawB+9brqbeU3IJxmOCZgXLkkns0dBiSWGxtt+Tji+KXjogNfghmAdVw9NQoBS+W5+pBtKEORD0YIGiUou9a7ukyMe2uvsl7rT+7BCOdvYtMBRbsfV5NPs644wfJNIGa7OOjkWhuGwy6BVKTohDhJdKeZUpiTPKLV7ZLHjT4pkjuJgGQB7c+wv7QYeUpwARwQNi8ZHuij2loG3Fb4l+3ejkcvivw0DLnDDhv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ZjV3P36M6UaBeCyqeD7b3fJ5IJcLwD9NR0ustnn8IJ9zEwn+LY8kjRG8J3V57t2qAVGkMCiXnwFu3Vb+AYozOYi2ibu/N9QXV4dTHarw64HUtLu/HEtcYuzuM5nGOXYvWPz3pQBtlqsyrhIfeaywQ+O55h5/KBo8Ig==

View file

@ -0,0 +1,8 @@
[Flatpak Repo]
Title=Feather Wallet
Url=https://featherwallet.org/flatpak
Homepage=https://featherwallet.org/
Comment=Official Flatpak repository for Feather Wallet
Description=Official Flatpak repository for Feather Wallet
Icon=https://featherwallet.org/flatpak/icon.png
GPGKey=mQINBF/HogkBEAChsjCJUsZhDxOx5FrnRA3X5/mJd2xdKskLSPFtnYiQUtKvpRW6i/RVNMkTwFovzbXB6ucKJtY+OoEMu7xDhIkDWp//UlfHuP9AWAvqbhq6V5xVrZ419oQ7JNN4gwAI8+ZjcNq3IVFQQ9mZ3py9t1IUdgWtWM3P/SD7vWiPIjG0D3Bt3Ptl/mZjIFZZWUtFBItJLkiTpW0Ue4t98XMP6mvQiQ/LhP82OtSyCZ6agj4Wa3ve5KjApdEqamBGytx2kmN+AQFgMt66yOvr+97zzuEzI6mlWYORzOc1CFMsmPd6bu/dtQ4Z96T8PNI6i1Lv5VqvqC7RBErvD7hO36JZb8j+PnbE1YADTKrw0HmgpI6d3RLyVop3n6ZQri0+nZ+TH0JG74MiihyZIz826zJO5OIwltexRcW0ZiRSpRCxZekU894lEs5QSxacRLeqM8ZVawB+9brqbeU3IJxmOCZgXLkkns0dBiSWGxtt+Tji+KXjogNfghmAdVw9NQoBS+W5+pBtKEORD0YIGiUou9a7ukyMe2uvsl7rT+7BCOdvYtMBRbsfV5NPs644wfJNIGa7OOjkWhuGwy6BVKTohDhJdKeZUpiTPKLV7ZLHjT4pkjuJgGQB7c+wv7QYeUpwARwQNi8ZHuij2loG3Fb4l+3ejkcvivw0DLnDDhvUY57ezq53JwARAQABtCVGZWF0aGVyV2FsbGV0IDxkZXZAZmVhdGhlcndhbGxldC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3V57t2qAVGkMCiXnwFu3Vb+AYozOYi2ibu/N9QXV4dTHarw64HUtLu/HEtcYuzuM5nGOXYvWPz3pQBtlqsyrhIfeaywQ+O55h5/KBo8Ig==

118
contrib/flatpak/flatpak.scm Normal file
View file

@ -0,0 +1,118 @@
(use-modules (gnu)
(gnu packages)
(gnu packages base)
(gnu packages bash)
(gnu packages certs)
(gnu packages check)
(gnu packages compression)
(gnu packages elf)
(gnu packages fonts)
(gnu packages fontutils)
(gnu packages gcc)
(gnu packages gettext)
(gnu packages glib)
(gnu packages libusb)
(gnu packages linux)
(gnu packages moreutils)
(gnu packages shells)
(gnu packages tls)
(gnu packages xorg)
(gnu packages xdisorg)
(guix build-system gnu)
(guix download)
((guix licenses) #:prefix license:)
(guix packages)
(guix profiles)
(guix utils))
(define-public feather-binary
(package
(name "feather-binary")
(version (getenv "VERSION"))
(source (origin
(method url-fetch)
(uri (getenv "FILE"))
(sha256 (base32 (getenv "HASH")))))
(build-system gnu-build-system)
(propagated-inputs
(list nss-certs
dbus
coreutils-minimal))
(inputs (list fontconfig
(list gcc "lib")
libxkbcommon
libxcb
xcb-util-cursor
xcb-util-wm
xcb-util-image
xcb-util-keysyms
xcb-util-renderutil))
(arguments
(list
#:strip-binaries? #f
#:phases
#~(modify-phases %standard-phases
(delete 'bootstrap)
(delete 'configure)
(delete 'build)
(delete 'check)
(delete 'validate-runpath)
(add-before 'install 'patchelff
(lambda* (#:key inputs outputs propagated-inputs #:allow-other-keys)
(let ((binary "feather")
(runpath '("gcc"
"dbus"
"fontconfig-minimal"
"libxkbcommon"
"libxcb"
"xcb-util-cursor"
"xcb-util-wm"
"xcb-util-image"
"xcb-util-keysyms"
"xcb-util-renderutil")))
(define* (maybe-make-rpath entries name)
(let ((entry (assoc-ref entries name)))
(if entry
(string-append entry "/lib")
#f)))
(define* (make-rpath name)
(or
(maybe-make-rpath inputs name)
(maybe-make-rpath propagated-inputs name)
(error (format #f "`~a' not found among the inputs nor the outputs." name))))
(let ((rpath (string-join
(map make-rpath runpath)
":")))
(invoke "patchelf" "--set-rpath" rpath binary))
#t)))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((target (string-append (assoc-ref outputs "out") "/bin/feather")))
(mkdir-p (string-append (assoc-ref outputs "out") "/bin/"))
(copy-file "./feather" target)))))))
(native-inputs (list
patchelf
unzip))
(home-page "https://featherwallet.org/")
(synopsis "A free, open-source Monero wallet")
(description
"Feather is a free, open-source Monero wallet for Linux, Tails, Windows and macOS.")
(license license:bsd-3)))
(define utf8-locales
(make-glibc-utf8-locales
glibc
#:locales (list "en_US")
#:name "utf8-locales"))
(packages->manifest
(append
(list feather-binary
strace
utf8-locales
font-wqy-zenhei
font-gnu-unifont)))

View file

@ -0,0 +1,75 @@
#!/usr/bin/env bash
set -ex
APP_ID="org.featherwallet.Feather"
get_store_path() {
find gnu/store -maxdepth 1 -type d -name "*$1*" | sort | head -n 1
}
cd /flatpak
# Create build dir
mkdir build
cd build
mkdir export
cp -a /feather/contrib/flatpak/share export
rm -rf export/share/app-info
# Copy the metadata file
cp /feather/contrib/flatpak/metadata .
mkdir files
cd files
# Copy metadata
cp -a /feather/contrib/flatpak/share .
touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" share/metainfo/${APP_ID}.metainfo.xml
gzip -c share/metainfo/${APP_ID}.metainfo.xml > share/app-info/xmls/${APP_ID}.xml.gz
# Extract guix pack
tar xf /pack .
# Get store paths
GUIX_BASH_STATIC=$(get_store_path "bash-static")
GUIX_COREUTILS=$(get_store_path "coreutils-minimal")
GUIX_GLIBC=$(get_store_path "glibc")
GUIX_PROFILE=$(get_store_path "profile")
GLIBC_VERSION="${GUIX_GLIBC##*-}"
# Patch ln
LN_PATH="${GUIX_COREUTILS}/bin/ln"
chmod 655 "${LN_PATH}"
patchelf --set-rpath "/app/${GUIX_GLIBC}/lib" "${LN_PATH}"
patchelf --set-interpreter "/app/${GUIX_GLIBC}/lib/ld-linux-x86-64.so.2" "${LN_PATH}"
# Fonts
# fontconfig looks in /app/share/fonts
ln -s "/${GUIX_PROFILE}/share/fonts" share/fonts
ln -s "/${GUIX_PROFILE}/share/locale" share/locale
ln -s "/${GUIX_PROFILE}/share/dbus-1" share/dbus-1
ln -s "/${GUIX_PROFILE}/share/xml" share/xml
chmod 555 "${LN_PATH}"
# create startup.sh
cat << EOF > startup.sh
#!/app/${GUIX_BASH_STATIC}/bin/bash
/app/${LN_PATH} -s /app/gnu /gnu
export PATH="/${GUIX_PROFILE}/bin"
mkdir -p /etc/ssl
# Qt expects certs to be here, see: qtbase/src/network/ssl/qsslsocket.cpp
ln -s /${GUIX_PROFILE}/etc/ssl/certs /etc/ssl/certs
mkdir -p /run/current-system/locale/${GLIBC_VERSION}
ln -s /${GUIX_PROFILE}/lib/locale/${GLIBC_VERSION}/en_US.UTF-8 /run/current-system/locale/${GLIBC_VERSION}
# Feather interpreter is set to /lib64/ld-linux-x86-64.so.2
# Guix pack includes glibc twice if we add glibc to the inputs in flatpak.scm, so this is an alternative to patching
ln -s /${GUIX_GLIBC}/lib /lib64
feather
EOF
chmod 555 startup.sh

View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -ex
mkdir empty
cd empty
mkdir export files usr
cat << EOF > metadata
[Runtime]
name=org.featherwallet.Empty
runtime=org.featherwallet.Empty/x86_64/empty
sdk=org.featherwallet.Empty/x86_64/empty
EOF

11
contrib/flatpak/metadata Normal file
View file

@ -0,0 +1,11 @@
[Application]
name=org.featherwallet.Feather
runtime=org.featherwallet.Empty/x86_64/stable
sdk=org.featherwallet.Empty/x86_64/stable
command=/app/startup.sh
[Context]
shared=network;ipc;
sockets=x11;wayland;
devices=all;
filesystems=~/Monero:create;

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View file

@ -0,0 +1,11 @@
[Desktop Entry]
Type=Application
Name=Feather Wallet
GenericName=Monero Wallet
Comment=A free Monero desktop wallet
Icon=org.featherwallet.Feather
Exec=/app/startup.sh
Terminal=false
Categories=Network;Qt;Finance
StartupNotify=false
StartupWMClass=feather

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>org.featherwallet.Feather</id>
<name>Feather</name>
<summary>Monero desktop wallet</summary>
<metadata_license>CC0-1.0</metadata_license>
<project_license>BSD-3-Clause</project_license>
<categories>
<category>Network</category>
<category>Qt</category>
<category>Finance</category>
<category>Office</category>
</categories>
<description>
<p>Feather is a Monero wallet for desktop with the following features:</p>
<ul>
<li>
Easy-to-use, small and fast - Feather
runs well on any modern hardware, including virtual machines
and live operating systems.
</li>
<li>
Beginner friendly, but also caters to advanced Monero
users by providing a feature set that is on par with the official CLI.
</li>
<li>
Ships with sane defaults that suit most users, but
can also be configured for high or uncommon threat models.
</li>
<li>
Serves as a testing grounds for experimental features
that may later be adopted in the reference wallets.
</li>
</ul>
</description>
<launchable type="desktop-id">org.featherwallet.Feather.desktop</launchable>
<screenshots>
<screenshot type="default">
<image>https://featherwallet.org/img/receive_light.png</image>
</screenshot>
</screenshots>
<url type="homepage">https://featherwallet.org/</url>
<url type="bugtracker">https://github.com/feather-wallet/feather</url>
<url type="donation">https://docs.featherwallet.org/guides/donate</url>
<url type="contact">https://docs.featherwallet.org/guides/report-an-issue</url>
<url type="help">https://docs.featherwallet.org</url>
<url type="vcs-browser">https://github.com/feather-wallet/feather</url>
</component>

View file

@ -81,6 +81,7 @@ mkdir -p "$VERSION_BASE"
# Default to building for all supported HOSTs (overridable by environment)
export HOSTS="${HOSTS:-x86_64-linux-gnu aarch64-linux-gnu arm-linux-gnueabihf
x86_64-linux-gnu.no-tor-bundle
x86_64-linux-gnu.flatpak
riscv64-linux-gnu
x86_64-w64-mingw32 x86_64-w64-mingw32.installer
x86_64-apple-darwin arm64-apple-darwin}"
@ -316,6 +317,7 @@ for host in $HOSTS; do
# Required for 'contrib/guix/manifest.scm' to output the right manifest
# for the particular $HOST we're building for
export HOST="${host_split[0]}"
export OPTIONS="${host_split[1]}"
# shellcheck disable=SC2030
cat << EOF
@ -441,6 +443,31 @@ EOF
DIST_ARCHIVE_BASE=/outdir-base/dist-archive \
OPTIONS="${host_split[1]}" \
bash -c "cd /feather && bash contrib/guix/libexec/build.sh"
case "$OPTIONS" in
flatpak)
export FILE="$(outdir_for_host "$host")/${DISTNAME}-flatpak.zip"
export HASH=$(guix hash "${FILE}")
export VERSION=${VERSION}
time-machine pack -S /opt/gnu/bin=bin --manifest="${PWD}/contrib/flatpak/flatpak.scm"
PACK=$(time-machine pack --manifest="${PWD}/contrib/flatpak/flatpak.scm")
time-machine environment --ad-hoc tar gzip findutils grep patchelf coreutils-minimal bash \
--container \
--pure \
--no-cwd \
--share="$PWD"=/feather \
--share="$PACK"=/pack \
--share="$(outdir_for_host "$host")"=/flatpak \
--keep-failed \
--fallback \
--user="user" \
${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
-- env SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \
bash -c "cd /feather && bash contrib/flatpak/make_flatpak.sh"
;;
esac
)
done

View file

@ -293,6 +293,9 @@ mkdir -p "$DISTSRC"
CMAKEVARS+=" -DTOR_DIR=Off -DTOR_VERSION=Off"
ANONDIST+="-a"
;;
flatpak)
CMAKEVARS+=" -DCHECK_UPDATES=Off -DSELF_CONTAINED=Off"
;;
esac
;;
*gnueabihf)
@ -335,11 +338,13 @@ mkdir -p "$DISTSRC"
case "$HOST" in
*linux*)
bash contrib/AppImage/build-appimage.sh
APPIMAGENAME=${DISTNAME}${ANONDIST}${LINUX_ARCH}.AppImage
mv feather.AppImage "${APPIMAGENAME}"
cp "${APPIMAGENAME}" "${INSTALLPATH}/"
cp "${APPIMAGENAME}" "${OUTDIR}/"
if [ "$OPTIONS" != "flatpak" ]; then
bash contrib/AppImage/build-appimage.sh
APPIMAGENAME=${DISTNAME}${ANONDIST}${LINUX_ARCH}.AppImage
mv feather.AppImage "${APPIMAGENAME}"
cp "${APPIMAGENAME}" "${INSTALLPATH}/"
cp "${APPIMAGENAME}" "${OUTDIR}/"
fi
;;
esac
@ -372,9 +377,6 @@ mkdir -p "$DISTSRC"
cd installed
case "$HOST" in
*linux*)
mv feather "${DISTNAME}"
;;
*darwin*)
mv "feather.app" "Feather.app"
;;
@ -412,22 +414,32 @@ mkdir -p "$DISTSRC"
esac
;;
*linux*)
case "$OPTIONS" in
"")
find . -not -name "*.AppImage" -print0 \
| xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}"
find . -not -name "*.AppImage" \
| sort \
| zip -X@ "${OUTDIR}/${DISTNAME}-linux${LINUX_ARCH}${ANONDIST}.zip" \
|| ( rm -f "${OUTDIR}/${DISTNAME}-linux${LINUX_ARCH}${ANONDIST}.zip" && exit 1 )
;;
esac
find . -name "*.AppImage" -print0 \
| xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}"
find . -name "*.AppImage" \
| sort \
| zip -X@ "${OUTDIR}/${DISTNAME}-linux${LINUX_ARCH}-appimage${ANONDIST}.zip" \
|| ( rm -f "${OUTDIR}/${DISTNAME}-linux${LINUX_ARCH}-appimage${ANONDIST}.zip" && exit 1 )
if [ "$OPTIONS" != "flatpak" ]; then
mv feather "${DISTNAME}"
case "$OPTIONS" in
"")
find . -not -name "*.AppImage" -print0 \
| xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}"
find . -not -name "*.AppImage" \
| sort \
| zip -X@ "${OUTDIR}/${DISTNAME}-linux${LINUX_ARCH}${ANONDIST}.zip" \
|| ( rm -f "${OUTDIR}/${DISTNAME}-linux${LINUX_ARCH}${ANONDIST}.zip" && exit 1 )
;;
esac
find . -name "*.AppImage" -print0 \
| xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}"
find . -name "*.AppImage" \
| sort \
| zip -X@ "${OUTDIR}/${DISTNAME}-linux${LINUX_ARCH}-appimage${ANONDIST}.zip" \
|| ( rm -f "${OUTDIR}/${DISTNAME}-linux${LINUX_ARCH}-appimage${ANONDIST}.zip" && exit 1 )
else
find . -print0 \
| xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}"
find . \
| sort \
| zip -X@ "${OUTDIR}/${DISTNAME}-flatpak.zip" \
|| ( rm -f "${OUTDIR}/${DISTNAME}-flatpak.zip" && exit 1 )
fi
;;
*darwin*)
find . -print0 \

2
monero

@ -1 +1 @@
Subproject commit bbebb167879679703fd8f92970b336c25f4ee28c
Subproject commit 3938ed0534781105bd7c797f32c0c865df136fe6