add vaulteditor and fix build on arm (#114)

first working build for a long time
This commit is contained in:
simonfelding 2025-02-15 19:38:15 +01:00 committed by GitHub
parent a19458f703
commit d00645ffcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 12 deletions

View File

@ -1,3 +1,4 @@
# The build image could be golang, but it currently does not support riscv64. Only debian:sid does, at the time of writing.
FROM debian:sid-slim AS build FROM debian:sid-slim AS build
# Install dependencies # Install dependencies
@ -9,7 +10,7 @@ COPY build.sh VERSION /build/
RUN bash build.sh RUN bash build.sh
FROM debian:sid-slim FROM debian:sid-slim
LABEL maintainer="Xiaonan Shen <s@sxn.dev>" LABEL maintainer="Simon Felding <sife@adm.ku.dk>"
EXPOSE 25/tcp EXPOSE 25/tcp
EXPOSE 143/tcp EXPOSE 143/tcp
@ -25,5 +26,6 @@ COPY gpgparams entrypoint.sh /protonmail/
# Copy protonmail # Copy protonmail
COPY --from=build /build/proton-bridge/bridge /protonmail/ COPY --from=build /build/proton-bridge/bridge /protonmail/
COPY --from=build /build/proton-bridge/proton-bridge /protonmail/ COPY --from=build /build/proton-bridge/proton-bridge /protonmail/
COPY --from=build /build/proton-bridge/vault-editor /protonmail/
ENTRYPOINT ["bash", "/protonmail/entrypoint.sh"] ENTRYPOINT ["bash", "/protonmail/entrypoint.sh"]

View File

@ -9,15 +9,5 @@ git clone https://github.com/ProtonMail/proton-bridge.git
cd proton-bridge cd proton-bridge
git checkout v$VERSION git checkout v$VERSION
ARCH=$(uname -m)
if [[ $ARCH == "armv7l" ]] ; then
# This is expected to fail, and we use the following patch to fix
make build-nogui || true
# For 32bit architectures, there was a overflow error on the parser
# This is a workaround for this problem found at:
# https://github.com/antlr/antlr4/issues/2433#issuecomment-774514106
find $(go env GOPATH)/pkg/mod/github.com/\!proton\!mail/go-rfc5322*/ -type f -exec sed -i.bak 's/(1<</(int64(1)<</g' {} +
fi
# Build # Build
make build-nogui make build-nogui vault-editor