From b9e9b179a1f504d9bc42bafc4ffff6b88f130e07 Mon Sep 17 00:00:00 2001 From: Gerben Jan Dijkman Date: Tue, 14 Mar 2023 12:38:21 +0100 Subject: [PATCH] Version bump --- net-im/chatty/Manifest | 2 +- ...hatty-0.7.1.ebuild => chatty-0.7.2.ebuild} | 0 .../chatty-0001-Port-to-libsoup-3.0.patch | 180 ------------------ 3 files changed, 1 insertion(+), 181 deletions(-) rename net-im/chatty/{chatty-0.7.1.ebuild => chatty-0.7.2.ebuild} (100%) delete mode 100644 net-im/chatty/files/chatty-0001-Port-to-libsoup-3.0.patch diff --git a/net-im/chatty/Manifest b/net-im/chatty/Manifest index 0c69f12..37d282b 100644 --- a/net-im/chatty/Manifest +++ b/net-im/chatty/Manifest @@ -1,3 +1,3 @@ -DIST chatty-v0.7.1.tar.gz 567852 BLAKE2B 61f0635df662d7542997a55c3b2ed88e91333d7c390459a6542839266d3a3301e273d40a103d71e88c2ab5f544bbf919ef10328199e508fa7bd8c2c54372eb7c SHA512 aae5b2eaf8094da35589968df00061c963ff22b4266602e94f8bee4722b6d886fa6cbb1069d47044c9da2c937d06789e3e19647360e3e2af7584673eea85aa77 +DIST chatty-v0.7.2.tar.gz 572922 BLAKE2B 5fcd8e330ad233351e41b8793f3f803bfe2c4cc08790038466c1f447f1872c0bf5e057f64a964b08b0c475a2a0f157ed2ce29e8a27e059daa55405c13aea6a19 SHA512 889ad5efd82deae4067be5d993674d021f04d6a52e5006ffc50135b41286c0431bdd5d56b151c9c6bf9af281124291f34380a0b8e7ba3df4d011d1ccd30be805 DIST libcmatrix-ec50358d3bf102e7f8f1843e537bcf1f150d2b7a.tar.gz 157114 BLAKE2B fe2c32fb032cdbfe02cc90e1743581e4fdad71c6c5c0cfc87f01aaf40aa5aba6b6c07f48bd59a6bcdfb2e5076213c862ada2acb30097d4e7d055a273af1e854b SHA512 2cca107d97e1e3dac9d3f3d8d404c45b1033c7f672f789fdb27b3b7dbd14c3d5b2a831d952335e45974382589b2d8d6f815272c94174eb51f64ecb84dc29a89d DIST libgd-c7c7ff4e05d3fe82854219091cf116cce6b19de0.tar.gz 58318 BLAKE2B f6e02c179340431655965e84f6fb8fac0543b220c2915c111eb7dc32c16d3d595d42c6cf5d303c20e02ebbbc5f01493b830eb99e3e4337a805f6f8b48fd27377 SHA512 681cc23b5a33df88a92e3aac33d0dba1c6ebb69a2bd6f15b6ae31f0b444c108f7bfd1391e604433be58d82c0032028b112652d3d0c473abe4db02d66c55cdef3 diff --git a/net-im/chatty/chatty-0.7.1.ebuild b/net-im/chatty/chatty-0.7.2.ebuild similarity index 100% rename from net-im/chatty/chatty-0.7.1.ebuild rename to net-im/chatty/chatty-0.7.2.ebuild diff --git a/net-im/chatty/files/chatty-0001-Port-to-libsoup-3.0.patch b/net-im/chatty/files/chatty-0001-Port-to-libsoup-3.0.patch deleted file mode 100644 index bca4dc0..0000000 --- a/net-im/chatty/files/chatty-0001-Port-to-libsoup-3.0.patch +++ /dev/null @@ -1,180 +0,0 @@ -From 74c5f76718a93bf13d12e53432eb7348d4b91e28 Mon Sep 17 00:00:00 2001 -From: marcin -Date: Tue, 9 Aug 2022 07:02:06 +0200 -Subject: [PATCH] Port to libsoup-3.0 - ---- - src/dialogs/chatty-settings-dialog.c | 8 ++-- - src/matrix/chatty-ma-account.c | 5 +-- - src/matrix/matrix-utils.c | 58 ++++++++-------------------- - src/matrix/matrix-utils.h | 3 -- - 4 files changed, 23 insertions(+), 51 deletions(-) - -diff --git a/src/dialogs/chatty-settings-dialog.c b/src/dialogs/chatty-settings-dialog.c -index a2dbd1c..1b677d1 100644 ---- a/src/dialogs/chatty-settings-dialog.c -+++ b/src/dialogs/chatty-settings-dialog.c -@@ -693,13 +693,13 @@ settings_homeserver_entry_changed (ChattySettingsDialog *self, - server = gtk_entry_get_text (entry); - - if (server && *server) { -- g_autoptr(SoupURI) uri = NULL; -+ g_autoptr(GUri) uri = NULL; - -- uri = soup_uri_new (gtk_entry_get_text (entry)); -+ uri = g_uri_parse (gtk_entry_get_text (entry), SOUP_HTTP_URI_FLAGS, NULL); - -- valid = SOUP_URI_VALID_FOR_HTTP (uri); -+ valid = !!uri; - /* We need an absolute path URI */ -- valid = valid && *uri->host && g_str_equal (soup_uri_get_path (uri), "/"); -+ valid = valid && *g_uri_get_host(uri) && g_str_equal (g_uri_get_path (uri), "/"); - } - - if (valid) -diff --git a/src/matrix/chatty-ma-account.c b/src/matrix/chatty-ma-account.c -index ba4838f..d9d8337 100644 ---- a/src/matrix/chatty-ma-account.c -+++ b/src/matrix/chatty-ma-account.c -@@ -340,9 +340,8 @@ cm_account_sync_cb (ChattyMaAccount *self, - error->code, error->message); - - if (error && -- ((error->domain == SOUP_HTTP_ERROR && -- error->code <= SOUP_STATUS_TLS_FAILED && -- error->code > SOUP_STATUS_CANCELLED) || -+ (error->domain == SOUP_TLD_ERROR || -+ error->domain == G_TLS_ERROR || - g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NETWORK_UNREACHABLE) || - g_error_matches (error, G_IO_ERROR, G_IO_ERROR_TIMED_OUT) || - error->domain == G_RESOLVER_ERROR || -diff --git a/src/matrix/matrix-utils.c b/src/matrix/matrix-utils.c -index 33c9c32..aec49f4 100644 ---- a/src/matrix/matrix-utils.c -+++ b/src/matrix/matrix-utils.c -@@ -362,37 +362,6 @@ matrix_utils_json_object_get_array (JsonObject *object, - return NULL; - } - --JsonObject * --matrix_utils_get_message_json_object (SoupMessage *message, -- const char *member) --{ -- g_autoptr(JsonParser) parser = NULL; -- g_autoptr(SoupBuffer) buffer = NULL; -- JsonObject *object = NULL; -- gboolean is_json; -- -- if (!message || !message->response_body) -- return NULL; -- -- buffer = soup_message_body_flatten (message->response_body); -- parser = json_parser_new (); -- is_json = json_parser_load_from_data (parser, buffer->data, buffer->length, NULL); -- -- if (is_json) { -- JsonNode *root; -- -- root = json_parser_get_root (parser); -- -- if (root && JSON_NODE_HOLDS_OBJECT (root)) -- object = json_node_get_object (root); -- -- if (member && object) -- object = json_object_get_object_member (object, member); -- } -- -- return object ? json_object_ref (object) : NULL; --} -- - static gboolean - cancel_read_uri (gpointer user_data) - { -@@ -446,16 +415,17 @@ matrix_utils_handle_ssl_error (SoupMessage *message) - GApplication *app; - GtkWidget *dialog; - GtkWindow *window = NULL; -- SoupURI *uri; -+ GUri *uri; - g_autofree char *msg = NULL; - const char *host; - GTlsCertificateFlags err_flags; - gboolean cancelled = FALSE; - - if (!SOUP_IS_MESSAGE (message) || -- !soup_message_get_https_status (message, &cert, &err_flags) || -- !err_flags) -+ !(err_flags = soup_message_get_tls_peer_certificate_errors (message))) - return cancelled; -+ -+ cert = soup_message_get_tls_peer_certificate(message); - - app = g_application_get_default (); - if (app) -@@ -465,7 +435,7 @@ matrix_utils_handle_ssl_error (SoupMessage *message) - return cancelled; - - uri = soup_message_get_uri (message); -- host = soup_uri_get_host (uri); -+ host = g_uri_get_host (uri); - - switch (err_flags) { - case G_TLS_CERTIFICATE_UNKNOWN_CA: -@@ -548,11 +518,8 @@ uri_file_read_cb (GObject *object, - return; - } - -- soup_message_get_https_status (message, NULL, &err_flags); -- - if (message && -- soup_message_get_https_status (message, NULL, &err_flags) && -- err_flags) { -+ (err_flags = soup_message_get_tls_peer_certificate_errors (message))) { - guint timeout_id, timeout; - - timeout = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (task), "timeout")); -@@ -594,6 +561,14 @@ message_network_event_cb (SoupMessage *msg, - g_object_set_data_full (user_data, "address", address, g_object_unref); - } - -+static gboolean -+accept_certificate_callback (SoupMessage *msg, GTlsCertificate *certificate, -+ GTlsCertificateFlags tls_errors, gpointer user_data) -+{ -+ // Returning TRUE trusts it anyway. -+ return TRUE; -+} -+ - void - matrix_utils_read_uri_async (const char *uri, - guint timeout, -@@ -640,9 +615,10 @@ matrix_utils_read_uri_async (const char *uri, - G_CALLBACK (message_network_event_cb), task, - G_CONNECT_AFTER); - session = soup_session_new (); -- g_object_set (G_OBJECT (session), SOUP_SESSION_SSL_STRICT, FALSE, NULL); -+ /* Accept invalid certificates */ -+ g_signal_connect (message, "accept-certificate", G_CALLBACK (accept_certificate_callback), NULL); - -- soup_session_send_async (session, message, cancel, -+ soup_session_send_async (session, message, 0, cancel, - uri_file_read_cb, - g_steal_pointer (&task)); - } -diff --git a/src/matrix/matrix-utils.h b/src/matrix/matrix-utils.h -index 7eff06a..2451581 100644 ---- a/src/matrix/matrix-utils.h -+++ b/src/matrix/matrix-utils.h -@@ -43,9 +43,6 @@ JsonObject *matrix_utils_json_object_get_object (JsonObject *object, - JsonArray *matrix_utils_json_object_get_array (JsonObject *object, - const char *member); - --JsonObject *matrix_utils_get_message_json_object (SoupMessage *message, -- const char *member); -- - void matrix_utils_read_uri_async (const char *uri, - guint timeout, - GCancellable *cancellable, --- -2.37.1 -