head 1.2; access; symbols pkgsrc-2026Q3:1.1.0.6 pkgsrc-2026Q3-base:1.1 pkgsrc-2026Q2:1.1.0.4 pkgsrc-2026Q2-base:1.1 pkgsrc-2026Q1:1.1.0.2 pkgsrc-2026Q1-base:1.1; locks; strict; comment @ * @; 1.2 date 2026.11.17.21.42.57; author ktnb; state dead; branches; next 1.1; commitid HtdoND6wXaeusR3H; 1.1 date 2026.01.31.23.07.00; author wiz; state Exp; branches; next ; commitid dyvsvUdTenedfBsG; desc @@ 1.2 log @profanity: update to 0.19.0 Packaging updates: - gtk2 option replaces with gtk3 as the project does not support gtk2 anymore - Switched to meson as the project does not use configure anymore Upstream updates: Features: - Add `/mam verify` autocompleter - Add `/mucping` command - Add end of archive visual indicator - Add state management for activity aware selfpings - Add support for encrypted file sharing via HTTP upload - Deduplicate user mood notifications - Display correct timestamps on historical mentions and triggers - Distinguish between MAM and regular MUC message - Enable MAM by default - Generalize mam and rsm functions to work on more window types - Implement XEP-0410 timer loop - Implement ondemand history loading - Implement pong handler and autorejoin recovery - Implement room-targeted MAM stanza creation - Make AES-256-GCM file encryption optional for OX sendfile - Print MAM and Silence setting in /prefs chat - Print message when voice is requested in MUC - Print mucping setting in /prefs conn - Strip all unicode bidi control characters in messages - Strip terminal control characters in incoming messages - Support XMPP URI 'join' query type in `/join` - Suppress duplicate history replay on room join - Track MAM support for MUCs - Trigger MAM queries on joined MUC rooms - Trigger automatic MAM catchup sync on reconnection - Update `/mam` command description - Update room activity on incoming messages and presence - Validate MUC selfping interval and timeout range Bug Fixes: - Accept MAM results without 'by' attribute for active MUCs - Add space between titlebar name and SCROLLED indicator - Align autoaway state on reconnect - Correct RSM pagination to use last and after - Correctly display our own sent OMEMO messages in MUCs and 1:1 chats - Correctly roll the groupchat log - Delay bookmark autojoin to prevent muc history - Do not discard self sent messages received via MAM if sent offline - Enable message carbons conditionally - Enforce mandatory TLS during in-band registration - Ensure cleanup and prevent command execution on GCM verification failure - Ensure end of archive is visible and redrawn correctly - Filter keys listed by `/ox keys` to those matching `xmpp:` prefix - Filter out non-groupchat messages from MUC archives - Fix client name not getting loaded from config - Fix compiler warnings and add missing casts - Fix rendering corruption when wrapping long words - Fix repeated message corrections in MUCs - Implement join queue for autojoined bookmarks - Make connection metadata lifecycle safer - Mitigate sensitive memory exposure and add padding bounds check - Only autocomplete open windows for /win - Optimize MAM history fetching - Prevent double free on incoming messages during cleanup - Prevent duplicate messages if MAM is enabled - Prevent duplicated and out-of-order history messages - Prevent plaintext fallback on encryption failure - Prevent redundant MAM requests after archive ends - Prevent sending message when contact goes offline - Print message when /invite is used incorrectly - Query bare JID for PEP features during discovery - Resolve endless loading and database log pollution - Resolve outgoing display name in history - Revert "Optimize MAM history fetching" - Support scrollback pagination for MUC windows in win_page_down - Use RSM for catch-up to prevent duplicate message fetch - Use case insensitive window lookup for JIDs - Use raw UTF-8 bytes for C1 control characters - Zeroize account passwords and GPG passphrases on destruction Documentation: - Explain OMEMO titlebar status in manpage - Explain OTR titlebar meanings in /help otr - Explain OTR titlebar status in manpage - Fix grammar in /help silence Refactorings: - Actually make it possible to disable MUC self-pings - Add JID validation to /sub and /blocked - Check the JID in bookmark command in a better way - Consolidate SQLite history parsing functions - Consolidate database limit and count functions - DRY up delay timestamp parsing in stanza.c - Deduplicate string cleaner functions - Don't duplicate JID in iq_mam_verify_request - Format openpgp timestamp thread safely - Guard /roster add against invalid JIDs - Make MAM timestamp conversion robust - Modernise string concatenation with g_strconcat - Modernise timestamp and ISO8601 conversions - Permit editing of latest correction in LMC - Remove not used parameter - Remove unused function get_nick_from_full_ji - Replace obsolete gettimeofday with g_get_real_time - Resolve NULL pointer warnings and memory management in chatlog - Use FREE_SET_NULL and GFREE_SET_NULL macros - Use a const for "End of archive reached" Cleanup: - Move NULL check from _muc_occupant_new to muc_roster_add Tests: - Add unit tests for `/mucping` Chores: - Add --issue option to changelog-helper.py - Add XEP-0410 to DOAP - Describe a way to report bugs for non GH users - Fix bogus hint for omemo.trustmode - Heavily extend the profrc.example file - Improve OMEMO help formatting A zillion updates since 0.14.x @ text @$NetBSD: patch-src_pgp_gpg.c,v 1.1 2026/01/31 23:07:00 wiz Exp $ Fix GPGME >= 2.0.0 compatibility https://github.com/profanity-im/profanity/commit/606eaac31dfb97df16b0d2ba9466a3a67bec122a --- src/pgp/gpg.c.orig 2023-07-14 05:39:30.000000000 +0000 +++ src/pgp/gpg.c @@@@ -76,6 +76,7 @@@@ static ProfPGPKey* _gpgme_key_to_ProfPGPKey(gpgme_key_ static char* _gpgme_data_to_char(gpgme_data_t data); static void _save_pubkeys(void); static ProfPGPKey* _gpgme_key_to_ProfPGPKey(gpgme_key_t key); +static const char* _gpgme_key_get_email(gpgme_key_t key); void _p_gpg_free_pubkeyid(ProfPGPPubKeyId* pubkeyid) @@@@ -683,7 +684,7 @@@@ p_gpg_decrypt(const char* const cipher) error = gpgme_get_key(ctx, recipient->keyid, &key, 1); if (!error && key) { - const char* addr = gpgme_key_get_string_attr(key, GPGME_ATTR_EMAIL, NULL, 0); + const char* addr = _gpgme_key_get_email(key); if (addr) { g_string_append(recipients_str, addr); } @@@@ -912,6 +913,40 @@@@ _gpgme_key_to_ProfPGPKey(gpgme_key_t key) sub = sub->next; } return p_pgpkey; +} + +/** + * Extract the first email address from a gpgme_key_t object. + * This function provides backwards compatibility for both old and new GPGME versions. + * - GPGME < 2.0.0: Uses gpgme_key_get_string_attr (if available) + * - GPGME >= 2.0.0: Uses modern key->uids->email API + * + * @@param key The gpgme_key_t object to extract email from. + * @@return The first email address found in the key's user IDs, or NULL if none found. + * The returned string should not be freed as it points to internal gpgme memory. + */ +static const char* +_gpgme_key_get_email(gpgme_key_t key) +{ + if (!key) { + return NULL; + } + +#ifdef GPGME_ATTR_EMAIL + /* Use deprecated function if available (GPGME < 2.0.0) */ + return gpgme_key_get_string_attr(key, GPGME_ATTR_EMAIL, NULL, 0); +#else + /* Use modern API for GPGME >= 2.0.0 */ + gpgme_user_id_t uid = key->uids; + while (uid) { + if (uid->email && strlen(uid->email) > 0) { + return uid->email; + } + uid = uid->next; + } + + return NULL; +#endif } /** @ 1.1 log @profanity: fix build with gpgme 2 using upstream patch Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD$ @