From ce707b6f96af98e01435474bebfe91d050f20fe5 Mon Sep 17 00:00:00 2001 From: Finn Date: Tue, 16 Jun 2020 21:37:37 -0700 Subject: [PATCH] Update to 2.92 --- signal-server-patches/apply-patches.sh | 4 ++-- signal-server-patches/remove-sqs.patch | 17 +++++++++-------- signal-server.Dockerfile | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/signal-server-patches/apply-patches.sh b/signal-server-patches/apply-patches.sh index ab4e9e9..c4ac067 100755 --- a/signal-server-patches/apply-patches.sh +++ b/signal-server-patches/apply-patches.sh @@ -1,6 +1,6 @@ #!/bin/bash set -euo pipefail for patch in /tmp/signal-server-patches/*.patch; do - echo "patch -p1 < \$patch" - patch -p1 < $patch + echo "patch -p1 < ${patch}" + patch -p1 < "${patch}" done diff --git a/signal-server-patches/remove-sqs.patch b/signal-server-patches/remove-sqs.patch index a2b6125..d63a306 100644 --- a/signal-server-patches/remove-sqs.patch +++ b/signal-server-patches/remove-sqs.patch @@ -1,19 +1,20 @@ -diff --git a/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java b/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java -index bd05995..0d12f57 100644 +diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java b/service/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java +index af8b89a..c4cad9d 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java -@@ -66,26 +66,7 @@ public class DirectoryQueue { +@@ -67,27 +67,7 @@ public class DirectoryQueue { } - private void sendMessage(String action, String user) { + private void sendMessage(String action, UUID uuid, String number) { - final Map messageAttributes = new HashMap<>(); -- messageAttributes.put("id", new MessageAttributeValue().withDataType("String").withStringValue(user)); +- messageAttributes.put("id", new MessageAttributeValue().withDataType("String").withStringValue(number)); +- messageAttributes.put("uuid", new MessageAttributeValue().withDataType("String").withStringValue(uuid.toString())); - messageAttributes.put("action", new MessageAttributeValue().withDataType("String").withStringValue(action)); - SendMessageRequest sendMessageRequest = new SendMessageRequest() - .withQueueUrl(queueUrl) - .withMessageBody("-") -- .withMessageDeduplicationId(user + action) -- .withMessageGroupId(user) +- .withMessageDeduplicationId(UUID.randomUUID().toString()) +- .withMessageGroupId(number) - .withMessageAttributes(messageAttributes); - try { - sqs.sendMessage(sendMessageRequest); @@ -26,7 +27,7 @@ index bd05995..0d12f57 100644 - } catch (Throwable t) { - logger.warn("sqs unexpected error: ", t); - } -+ logger.info("Pretending to send SQS message: " + user + " " + action); ++ logger.info("Pretending to send SQS message: " + action); } } diff --git a/signal-server.Dockerfile b/signal-server.Dockerfile index 31db6e7..caaa4fb 100644 --- a/signal-server.Dockerfile +++ b/signal-server.Dockerfile @@ -8,7 +8,7 @@ RUN mvn install -DskipTests FROM debian:buster RUN apt-get update && apt-get install -y openjdk-11-jre-headless -COPY --from=build /usr/local/src/Signal-Server/service/target/TextSecureServer-2.55.jar /usr/share/TextSecureServer.jar +COPY --from=build /usr/local/src/Signal-Server/service/target/TextSecureServer-2.92.jar /usr/share/TextSecureServer.jar COPY migrate-and-start-server.sh /usr/bin/migrate-and-start-server RUN useradd signal RUN chown -R signal /usr/share/TextSecureServer.jar