Merge branch 'master' into master-android

This commit is contained in:
Evgeny Poberezkin
2025-12-11 18:26:19 +00:00
102 changed files with 3539 additions and 1227 deletions
+7 -2
View File
@@ -138,10 +138,15 @@ build() {
mkdir -p "$android_tmp_folder"
unzip -oqd "$android_tmp_folder" "$android_apk_output"
# Determenistic build
find "$android_tmp_folder" -type f -exec chmod 644 {} +
find "$android_tmp_folder" -type d -exec chmod 755 {} +
find "$android_tmp_folder" -exec touch -h -d '@1764547200' {} +
(
cd "$android_tmp_folder" && \
zip -rq5 "$tmp/$android_apk_output_final" . && \
zip -rq0 "$tmp/$android_apk_output_final" resources.arsc res
find . -type f -print0 | sort -z | xargs -0 zip -X -rq5 "$tmp/$android_apk_output_final" && \
find res resources.arsc -type f -print0 | sort -z | xargs -0 zip -X -rq0 "$tmp/$android_apk_output_final"
)
zipalign -p -f 4 "$tmp/$android_apk_output_final" "$PWD/$android_apk_output_final"
+37
View File
@@ -0,0 +1,37 @@
#!/usr/bin/env sh
set -eu
export SOURCE_DATE_EPOCH=1764547200
CLI_VERSION="$1"
CLI_PATH_TO_BIN="${2:-/out/simplex-chat}"
BUILD_FOLDER="${3:-/out/deb-build}"
size=$(stat -c '%s' "$CLI_PATH_TO_BIN" | awk '{printf "%.0f\n", ($1+1023)/1024}')
arch=$(case "$(uname -m)" in x86_64) printf "amd64" ;; aarch64) printf "arm64" ;; *) printf "unknown" ;; esac)
package='simplex-chat'
mkdir "$BUILD_FOLDER"
cd "$BUILD_FOLDER"
mkdir -p ./${package}/DEBIAN
mkdir -p ./${package}/usr/bin
cat > ./${package}/DEBIAN/control << EOF
Package: ${package}
Version: ${CLI_VERSION}
Section: Messenger
Priority: optional
Architecture: ${arch}
Maintainer: SimpleX Chat <chat@simplex.chat>
Description: SimpleX - the first messaging platform that has no user identifiers of any kind - 100% private by design! (CLI)
Installed-Size: ${size}
EOF
cp "$CLI_PATH_TO_BIN" ./${package}/usr/bin/simplex-chat
chmod +x ./${package}/usr/bin/simplex-chat
find ./${package} -exec touch -d "@${SOURCE_DATE_EPOCH}" {} +
dpkg-deb --build --root-owner-group --uniform-compression ./${package}
strip-nondeterminism "./${package}.deb"
@@ -38,6 +38,48 @@
</description>
<releases>
<release version="6.4.8" date="2025-12-11">
<url type="details">https://simplex.chat/blog/20250729-simplex-chat-v6-4-1-welcome-contacts-protect-groups-app-security.html</url>
<description>
<p>New in v6.4.8:</p>
<ul>
<li>fix stuck message reception and other events after passphrase change (e.g., during desktop app initial start)</li>
</ul>
<p>New in v6.4-6.4.7:</p>
<ul>
<li>new UX to connect.</li>
<li>review new group members.</li>
<li>chat with group admins.</li>
<li>new UI languages: Catalan, Indonesian, Romanian and Vietnamese.</li>
<li>Linux app builds for aarch64 CPUs</li>
<li>UI support for bot commands.</li>
<li>support markdown hyperlinks, such as [click here](https://example.com).</li>
<li>option to remove tracking parameters from the links.</li>
<li>better information about network errors.</li>
</ul>
</description>
</release>
<release version="6.4.7" date="2025-11-03">
<url type="details">https://simplex.chat/blog/20250729-simplex-chat-v6-4-1-welcome-contacts-protect-groups-app-security.html</url>
<description>
<p>New in v6.4.7:</p>
<ul>
<li>fix exporting database larger than 4gb.</li>
</ul>
<p>New in v6.4-6.4.6:</p>
<ul>
<li>new UX to connect.</li>
<li>review new group members.</li>
<li>chat with group admins.</li>
<li>new UI languages: Catalan, Indonesian, Romanian and Vietnamese.</li>
<li>Linux app builds for aarch64 CPUs</li>
<li>UI support for bot commands.</li>
<li>support markdown hyperlinks, such as [click here](https://example.com).</li>
<li>option to remove tracking parameters from the links.</li>
<li>better information about network errors.</li>
</ul>
</description>
</release>
<release version="6.4.6" date="2025-10-05">
<url type="details">https://simplex.chat/blog/20250729-simplex-chat-v6-4-1-welcome-contacts-protect-groups-app-security.html</url>
<description>
+1 -1
View File
@@ -1,5 +1,5 @@
{
"https://github.com/simplex-chat/simplexmq.git"."1ae3e8d0be957aa5090e88f25e6dc42d4af1a334" = "1cwahakq63jk7g0bbkdgpnnwa8i0i8s8j7azdpjral4d6cj4q4q0";
"https://github.com/simplex-chat/simplexmq.git"."2ca440dd2dfd494ff2bb40cc0409d08069d02e04" = "1jc1a9vh59l0l5hxlin1spv03afrgmmiml5xnakhbi4rk67n0wwr";
"https://github.com/simplex-chat/hs-socks.git"."a30cc7a79a08d8108316094f8f2f82a0c5e1ac51" = "0yasvnr7g91k76mjkamvzab2kvlb1g5pspjyjn2fr6v83swjhj38";
"https://github.com/simplex-chat/direct-sqlcipher.git"."f814ee68b16a9447fbb467ccc8f29bdd3546bfd9" = "1ql13f4kfwkbaq7nygkxgw84213i0zm7c1a8hwvramayxl38dq5d";
"https://github.com/simplex-chat/sqlcipher-simple.git"."a46bd361a19376c5211f1058908fc0ae6bf42446" = "1z0r78d8f0812kxbgsm735qf6xx8lvaz27k1a0b4a2m0sshpd5gl";
+117 -99
View File
@@ -20,115 +20,133 @@ package direct-sqlcipher
export DOCKER_BUILDKIT=1
version=${TAG#v}
version=${version%-*}
cleanup() {
docker exec -t "${container_name}" sh -c 'rm -rf ./dist-newstyle ./apps' 2>/dev/null || :
rm -rf -- "${tempdir}"
docker rm --force "${container_name}" 2>/dev/null || :
docker image rm "${image_name}" 2>/dev/null || :
cd "${init_dir}"
docker exec -t "${container_name}" sh -c 'rm -rf ./dist-newstyle ./apps' 2>/dev/null || :
rm -rf -- "${tempdir}"
docker rm --force "${container_name}" 2>/dev/null || :
docker image rm "${image_name}" 2>/dev/null || :
cd "${init_dir}"
}
trap 'cleanup' EXIT INT
mkdir -p "${init_dir}/${TAG}-${repo_name}/from-source" "${init_dir}/${TAG}-${repo_name}/prebuilt"
git -C "${tempdir}" clone "${repo}.git" &&\
cd "${tempdir}/${repo_name}" &&\
git checkout "${TAG}"
cd "${tempdir}/${repo_name}" &&\
git checkout "${TAG}"
for os in '22.04' '24.04'; do
os_url="$(printf '%s' "${os}" | tr '.' '_')"
os_url="$(printf '%s' "${os}" | tr '.' '_')"
cli_name="simplex-chat-ubuntu-${os_url}-x86_64"
deb_name="simplex-desktop-ubuntu-${os_url}-x86_64.deb"
appimage_name="simplex-desktop-x86_64.AppImage"
cli_name="simplex-chat-ubuntu-${os_url}-x86_64"
deb_name="simplex-desktop-ubuntu-${os_url}-x86_64.deb"
appimage_name="simplex-desktop-x86_64.AppImage"
# Build image
docker build \
--no-cache \
--build-arg TAG="${os}" \
--build-arg GHC="${ghc}" \
-f "${tempdir}/${repo_name}/Dockerfile.build" \
-t "${image_name}" \
.
# Build image
docker build \
--no-cache \
--build-arg TAG="${os}" \
--build-arg GHC="${ghc}" \
-f "${tempdir}/${repo_name}/Dockerfile.build" \
-t "${image_name}" \
.
printf '%s' "${cabal_local}" > "${tempdir}/${repo_name}/cabal.project.local"
printf '%s' "${cabal_local}" > "${tempdir}/${repo_name}/cabal.project.local"
# Run container in background
docker run -t -d \
--name "${container_name}" \
--device /dev/fuse \
--cap-add SYS_ADMIN \
--security-opt apparmor:unconfined \
-v "${tempdir}/${repo_name}:/project" \
"${image_name}"
# Run container in background
docker run -t -d \
--name "${container_name}" \
--device /dev/fuse \
--cap-add SYS_ADMIN \
--security-opt apparmor:unconfined \
-v "${tempdir}/${repo_name}:/project" \
"${image_name}"
# Consistent permissions
docker exec \
-t "${container_name}" \
sh -c 'find /project -type d -exec chmod 755 {} \; ; find /project -type f -perm /111 -exec chmod 755 {} \; ; find /project -type f ! -perm /111 -exec chmod 644 {} \;'
# Consistent permissions
docker exec \
-t "${container_name}" \
sh -c 'find /project -type d -exec chmod 755 {} \; ; find /project -type f -perm /111 -exec chmod 755 {} \; ; find /project -type f ! -perm /111 -exec chmod 644 {} \;'
# CLI
docker exec \
-t "${container_name}" \
sh -c 'cabal clean && cabal update && cabal build -j && mkdir -p /out && for i in simplex-chat; do bin=$(find /project/dist-newstyle -name "$i" -type f -executable) && chmod +x "$bin" && mv "$bin" /out/; done && strip /out/simplex-chat'
# CLI
docker exec \
-t "${container_name}" \
sh -c 'cabal clean && cabal update && cabal build -j && mkdir -p /out && for i in simplex-chat; do bin=$(find /project/dist-newstyle -name "$i" -type f -executable) && chmod +x "$bin" && mv "$bin" /out/; done && strip /out/simplex-chat'
# Copy CLI
docker cp \
"${container_name}":/out/simplex-chat \
"${init_dir}/${TAG}-${repo_name}/from-source/${cli_name}"
# Copy CLI
docker cp \
"${container_name}":/out/simplex-chat \
"${init_dir}/${TAG}-${repo_name}/from-source/${cli_name}"
# Download prebuilt CLI binary
curl -L \
--output-dir "${init_dir}/${TAG}-${repo_name}/prebuilt/" \
-O "${repo}/releases/download/${TAG}/${cli_name}"
# Download prebuilt CLI binary
curl -L \
--output-dir "${init_dir}/${TAG}-${repo_name}/prebuilt/" \
-O "${repo}/releases/download/${TAG}/${cli_name}"
# Desktop: deb
docker exec \
-t "${container_name}" \
sh -c './scripts/desktop/make-deb-linux.sh'
# CLI: deb
docker exec \
-t "${container_name}" \
sh -c "./scripts/desktop/build-cli-deb.sh ${version}"
# Copy deb
docker cp \
"${container_name}":/project/apps/multiplatform/release/main/deb/simplex_x86_64.deb \
"${init_dir}/${TAG}-${repo_name}/from-source/${deb_name}"
# Copy CLI: deb
docker cp \
"${container_name}":/out/deb-build/simplex-chat.deb \
"${init_dir}/${TAG}-${repo_name}/from-source/${cli_name}.deb"
# Download prebuilt deb package
curl -L \
--output-dir "${init_dir}/${TAG}-${repo_name}/prebuilt/" \
-O "${repo}/releases/download/${TAG}/${deb_name}"
# Download prebuilt CLI: deb binary
curl -L \
--output-dir "${init_dir}/${TAG}-${repo_name}/prebuilt/" \
-O "${repo}/releases/download/${TAG}/${cli_name}.deb"
# Desktop: appimage. Build only on 22.04
case "$os" in
22.04)
# Appimage
docker exec \
-t "${container_name}" \
sh -c './scripts/desktop/make-appimage-linux.sh && mv ./apps/multiplatform/release/main/*imple*.AppImage ./apps/multiplatform/release/main/simplex.appimage'
# Desktop: deb
docker exec \
-t "${container_name}" \
sh -c './scripts/desktop/make-deb-linux.sh'
# Copy appimage
docker cp \
"${container_name}":/project/apps/multiplatform/release/main/simplex.appimage \
"${init_dir}/${TAG}-${repo_name}/from-source/${appimage_name}"
# Copy deb
docker cp \
"${container_name}":/project/apps/multiplatform/release/main/deb/simplex_x86_64.deb \
"${init_dir}/${TAG}-${repo_name}/from-source/${deb_name}"
# Download prebuilt appimage binary
curl -L \
--output-dir "${init_dir}/${TAG}-${repo_name}/prebuilt/" \
-O "${repo}/releases/download/${TAG}/${appimage_name}"
;;
esac
# Important! Remove dist-newstyle for the next interation
docker exec \
-t "${container_name}" \
sh -c 'rm -rf ./dist-newstyle ./apps/multiplatform'
# Download prebuilt deb package
curl -L \
--output-dir "${init_dir}/${TAG}-${repo_name}/prebuilt/" \
-O "${repo}/releases/download/${TAG}/${deb_name}"
# Also restore git to previous state
git reset --hard && git clean -dfx
# Desktop: appimage. Build only on 22.04
case "$os" in
22.04)
# Appimage
docker exec \
-t "${container_name}" \
sh -c './scripts/desktop/make-appimage-linux.sh && mv ./apps/multiplatform/release/main/*imple*.AppImage ./apps/multiplatform/release/main/simplex.appimage'
# Stop containers, delete images
docker stop "${container_name}"
docker rm --force "${container_name}"
docker image rm "${image_name}"
# Copy appimage
docker cp \
"${container_name}":/project/apps/multiplatform/release/main/simplex.appimage \
"${init_dir}/${TAG}-${repo_name}/from-source/${appimage_name}"
# Download prebuilt appimage binary
curl -L \
--output-dir "${init_dir}/${TAG}-${repo_name}/prebuilt/" \
-O "${repo}/releases/download/${TAG}/${appimage_name}"
;;
esac
# Important! Remove dist-newstyle for the next interation
docker exec \
-t "${container_name}" \
sh -c 'rm -rf ./dist-newstyle ./apps/multiplatform'
# Also restore git to previous state
git reset --hard && git clean -dfx
# Stop containers, delete images
docker stop "${container_name}"
docker rm --force "${container_name}"
docker image rm "${image_name}"
done
# Cleanup
@@ -145,27 +163,27 @@ bad=0
# Check hashes for all binaries
for file in "${path_bin}"/from-source/*; do
# Extract binary name
app="$(basename ${file})"
# Extract binary name
app="$(basename ${file})"
# Compute hash for compiled binary
compiled=$(sha256sum "${path_bin}/from-source/${app}" | awk '{print $1}')
# Compute hash for prebuilt binary
prebuilt=$(sha256sum "${path_bin}/prebuilt/${app}" | awk '{print $1}')
# Compute hash for compiled binary
compiled=$(sha256sum "${path_bin}/from-source/${app}" | awk '{print $1}')
# Compute hash for prebuilt binary
prebuilt=$(sha256sum "${path_bin}/prebuilt/${app}" | awk '{print $1}')
# Compare
if [ "${compiled}" != "${prebuilt}" ]; then
# If hashes doesn't match, set bad...
bad=1
# Compare
if [ "${compiled}" != "${prebuilt}" ]; then
# If hashes doesn't match, set bad...
bad=1
# ... and print affected binary
printf "%s - sha256sum hash doesn't match\n" "${app}"
fi
# ... and print affected binary
printf "%s - sha256sum hash doesn't match\n" "${app}"
fi
done
# If everything is still okay, compute checksums file
if [ "${bad}" = 0 ]; then
sha256sum "${path_bin}"/from-source/* | sed -e "s|$PWD/||g" -e 's|from-source/||g' -e "s|-$repo_name||g" > "${path_bin}/_sha256sums"
sha256sum "${path_bin}"/from-source/* | sed -e "s|$PWD/||g" -e 's|from-source/||g' -e "s|-$repo_name||g" > "${path_bin}/_sha256sums"
printf 'Checksums computed - %s\n' "${path_bin}/_sha256sums"
printf 'Checksums computed - %s\n' "${path_bin}/_sha256sums"
fi