I'm looking for feedback about the trade-offs of such changes.

I tested the upgrade, but not sure if it's valid:
% make install SUDO=doas
===> libsignal-protocol-c-2.3.2pl1 depends on: protobuf-c-* -> protobuf-c-1.3.2
===>  Verifying specs: m
===>  found m.10.1
===>  Installing libsignal-protocol-c-2.3.2pl1 from
/usr/ports/packages/amd64/all/
libsignal-protocol-c-2.3.2->2.3.2pl1: ok

--8X--
This allows for fewer files to be kept locally.
---
 Makefile               |  3 ++-
 distinfo               |  4 ++--
 .../patches/patch-tests_test_common_h           | 16 ----------------
 .../patches/patch-tests_test_common_openssl_c   |  2 +-
 .../patches/patch-tests_test_session_builder_c  | 17 -----------------
 .../patches/patch-tests_test_session_cipher_c   | 17 -----------------
 6 files changed, 5 insertions(+), 54 deletions(-)
 delete mode 100644 patches/patch-tests_test_common_h
 delete mode 100644 patches/patch-tests_test_session_builder_c
 delete mode 100644 patches/patch-tests_test_session_cipher_c

diff --git a/Makefile b/Makefile
index 4fbc5d05285..efc05d10289 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,8 @@ COMMENT =    ratcheting forward secrecy protocol

 GH_ACCOUNT =    signalapp
 GH_PROJECT =    libsignal-protocol-c
-GH_TAGNAME =    v2.3.2
+GH_COMMIT =    71954c53860b83e358c9d8c4898d003f16ace375
+DISTNAME =    ${GH_PROJECT}-2.3.2pl1

 SHARED_LIBS +=  signal-protocol-c         0.0 # 2.3

diff --git a/distinfo b/distinfo
index 7feefc130de..6a49354c04a 100644
--- a/distinfo
+++ b/distinfo
@@ -1,2 +1,2 @@
-SHA256 (libsignal-protocol-c-2.3.2.tar.gz) =
84JvMEU1LhQCdhHJVEm/z+Ob/T0JPVeMcPcO7gyFAA0=
-SIZE (libsignal-protocol-c-2.3.2.tar.gz) = 271930
+SHA256 (libsignal-protocol-c-2.3.2pl1-71954c53.tar.gz) =
QqYSFWpxb1TUQTVFHZr1+8z6iTpmgbznWjIXBrPxiJY=
+SIZE (libsignal-protocol-c-2.3.2pl1-71954c53.tar.gz) = 272446
diff --git a/patches/patch-tests_test_common_h
b/patches/patch-tests_test_common_h
deleted file mode 100644
index 104983ecdde..00000000000
--- a/patches/patch-tests_test_common_h
+++ /dev/null
@@ -1,16 +0,0 @@
-$OpenBSD: patch-tests_test_common_h,v 1.1.1.1 2019/05/05 06:54:33 bentley Exp $
-
-Index: tests/test_common.h
---- tests/test_common.h.orig
-+++ tests/test_common.h
-@@ -84,4 +84,10 @@ int test_sender_key_store_load_sender_key(signal_buffe
- void test_sender_key_store_destroy(void *user_data);
- void setup_test_sender_key_store(signal_protocol_store_context
*context, signal_context *global_context);
-
-+/* Portability */
-+#ifndef __OpenBSD__
-+/* OpenBSD extension */
-+void srand_deterministic(unsigned int seed);
-+#endif
-+
- #endif /* TEST_COMMON_H */
diff --git a/patches/patch-tests_test_common_openssl_c
b/patches/patch-tests_test_common_openssl_c
index cce604b358c..6c8d44d62ab 100644
--- a/patches/patch-tests_test_common_openssl_c
+++ b/patches/patch-tests_test_common_openssl_c
@@ -3,7 +3,7 @@ $OpenBSD: patch-tests_test_common_openssl_c,v 1.1.1.1
2019/05/05 06:54:33 bentle
 Index: tests/test_common_openssl.c
 --- tests/test_common_openssl.c.orig
 +++ tests/test_common_openssl.c
-@@ -5,6 +5,7 @@
+@@ -6,6 +6,7 @@
  #include <openssl/hmac.h>
  #include <openssl/rand.h>
  #include <openssl/sha.h>
diff --git a/patches/patch-tests_test_session_builder_c
b/patches/patch-tests_test_session_builder_c
deleted file mode 100644
index 490899f29f1..00000000000
--- a/patches/patch-tests_test_session_builder_c
+++ /dev/null
@@ -1,17 +0,0 @@
-$OpenBSD: patch-tests_test_session_builder_c,v 1.1.1.1 2019/05/05
06:54:33 bentley Exp $
-
-Index: tests/test_session_builder.c
---- tests/test_session_builder.c.orig
-+++ tests/test_session_builder.c
-@@ -1426,9 +1426,9 @@ void run_interaction(signal_protocol_store_context *al
-     }
-
-     time_t seed = time(0);
--    srand(seed);
-+    srand_deterministic(seed);
-     shuffle_buffers(alice_ooo_plaintext, 10);
--    srand(seed);
-+    srand_deterministic(seed);
-     shuffle_buffers(alice_ooo_ciphertext, 10);
-     fprintf(stderr, "Shuffled Alice->Bob messages created\n");
-
diff --git a/patches/patch-tests_test_session_cipher_c
b/patches/patch-tests_test_session_cipher_c
deleted file mode 100644
index 2615302d10b..00000000000
--- a/patches/patch-tests_test_session_cipher_c
+++ /dev/null
@@ -1,17 +0,0 @@
-$OpenBSD: patch-tests_test_session_cipher_c,v 1.1.1.1 2019/05/05
06:54:33 bentley Exp $
-
-Index: tests/test_session_cipher.c
---- tests/test_session_cipher.c.orig
-+++ tests/test_session_cipher.c
-@@ -206,9 +206,9 @@ void generate_test_message_collections(session_cipher
-
-     /* Randomize the two arrays using the same seed */
-     time_t seed = time(0);
--    srand(seed);
-+    srand_deterministic(seed);
-     shuffle_buffers(plaintext_messages, size);
--    srand(seed);
-+    srand_deterministic(seed);
-     shuffle_buffers(ciphertext_messages, size);
- }
-
-- 
2.24.1

Reply via email to