Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package mcds for openSUSE:Factory checked in at 2026-08-04 21:37:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mcds (Old) and /work/SRC/openSUSE:Factory/.mcds.new.16738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mcds" Tue Aug 4 21:37:52 2026 rev:5 rq:1369428 version:1.10 Changes: -------- --- /work/SRC/openSUSE:Factory/mcds/mcds.changes 2024-11-17 16:41:40.584423069 +0100 +++ /work/SRC/openSUSE:Factory/.mcds.new.16738/mcds.changes 2026-08-04 21:39:53.483657624 +0200 @@ -1,0 +2,10 @@ +Tue Aug 4 08:20:18 UTC 2026 - Martin Hauke <[email protected]> + +- Update to version 1.10 + * Pass boolean options to libcurl as long type. + * secret.c: appease -Wmissing-field-initializers. + * Unfold vCard before parsing. + * gcc-16: eliminate line counter that is never read. + * Add autoconf notice when gpgme m4 macro is missing. + +------------------------------------------------------------------- Old: ---- mcds-1.9.tar.gz New: ---- mcds-1.10.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mcds.spec ++++++ --- /var/tmp/diff_new_pack.Dld17w/_old 2026-08-04 21:39:53.931673321 +0200 +++ /var/tmp/diff_new_pack.Dld17w/_new 2026-08-04 21:39:53.935673462 +0200 @@ -1,8 +1,8 @@ # # spec file for package mcds # -# Copyright (c) 2024 SUSE LLC -# Copyright (c) 2019-2024, Martin Hauke <[email protected]> +# Copyright (c) 2026 SUSE LLC and contributors +# Copyright (c) 2019-2026, Martin Hauke <[email protected]> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ Name: mcds -Version: 1.9 +Version: 1.10 Release: 0 Summary: Mutt Carddav search program License: GPL-3.0-or-later ++++++ mcds-1.9.tar.gz -> mcds-1.10.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcds-1.9/README.md new/mcds-1.10/README.md --- old/mcds-1.9/README.md 2024-11-11 17:38:33.000000000 +0100 +++ new/mcds-1.10/README.md 2026-08-04 00:05:02.000000000 +0200 @@ -11,9 +11,10 @@ ------------- + [C compiler](https://gcc.gnu.org/) -+ [Curl](https://curl.haxx.se/libcurl/) -+ [LibXML2](http://www.xmlsoft.org/) ++ [Curl](https://curl.se/libcurl/) ++ [LibXML2](https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home) + Optionally [GPGME](https://www.gnupg.org/software/gpgme/index.html) ++ Optionally [Libsecret](https://wiki.gnome.org/Projects/Libsecret) Building / Installation @@ -80,10 +81,10 @@ `https://example.org/caldav.php/username/addresses` + [Owncloud](https://owncloud.org/) - `http://example.org/remote.php/carddav/addressbooks/username/contacts` + `https://example.org/remote.php/carddav/addressbooks/username/contacts` + [Nextcloud](https://nextcloud.com/) - `http://example.org/remote.php/dav/addressbooks/users/username/contacts` + `https://example.org/remote.php/dav/addressbooks/users/username/contacts` + [Gmail](https://gmail.com/) `https://www.googleapis.com/carddav/v1/principals/[email protected]/lists/default` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcds-1.9/configure.ac new/mcds-1.10/configure.ac --- old/mcds-1.9/configure.ac 2024-11-11 17:38:33.000000000 +0100 +++ new/mcds-1.10/configure.ac 2026-08-04 00:05:02.000000000 +0200 @@ -3,7 +3,7 @@ # AC_PREREQ(2.61) -AC_INIT([mcds], [1.9], [[email protected]]) +AC_INIT([mcds], [1.10], [[email protected]]) AC_CONFIG_AUX_DIR([build-aux]) # Define our M4 macro directory @@ -104,7 +104,8 @@ [AC_DEFINE(HAVE_GPGME, 0, [Define to 1 if you have GPGME support]) AM_CONDITIONAL([WANT_GPGME], [test x = y])] )], - [AC_DEFINE(HAVE_GPGME, 0, [Define to 1 if you have GPGME support]) + [AC_MSG_NOTICE([GPGME not detectable]) + AC_DEFINE(HAVE_GPGME, 0, [Define to 1 if you have GPGME support]) AM_CONDITIONAL([WANT_GPGME], [test x = y]) enable_gpgme=no ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcds-1.9/src/curl.c new/mcds-1.10/src/curl.c --- old/mcds-1.9/src/curl.c 2024-11-11 17:38:33.000000000 +0100 +++ new/mcds-1.10/src/curl.c 2026-08-04 00:05:02.000000000 +0200 @@ -66,7 +66,7 @@ warnx(_("Unable to initialize curl handle.")); return(EXIT_FAILURE); } - if (curl_easy_setopt(*hdl, CURLOPT_VERBOSE, options.verbose)) { + if (curl_easy_setopt(*hdl, CURLOPT_VERBOSE, (long) options.verbose)) { warnx(_("Unable to set curls verbose option.")); return(EXIT_FAILURE); } @@ -74,7 +74,7 @@ warnx(_("Unable to set curls URL.")); return(EXIT_FAILURE); } - if (curl_easy_setopt(*hdl, CURLOPT_SSL_VERIFYPEER, options.verify)) { + if (curl_easy_setopt(*hdl, CURLOPT_SSL_VERIFYPEER, (long) options.verify)) { warnx(_("Unable to set curls SSL verification.")); return(EXIT_FAILURE); } @@ -88,7 +88,7 @@ return(EXIT_FAILURE); } } else { - if (curl_easy_setopt(*hdl, CURLOPT_NETRC, options.netrc)) { + if (curl_easy_setopt(*hdl, CURLOPT_NETRC, (long) options.netrc)) { warnx(_("Unable to set curls .netrc option.")); return(EXIT_FAILURE); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcds-1.9/src/rc.c new/mcds-1.10/src/rc.c --- old/mcds-1.9/src/rc.c 2024-11-11 17:38:33.000000000 +0100 +++ new/mcds-1.10/src/rc.c 2026-08-04 00:05:02.000000000 +0200 @@ -62,7 +62,6 @@ { int i = 0; /* Temporary loop indexer */ - int ln = 0; /* Line number */ int len = 0; /* String length */ char *home = NULL; /* Home directory */ char *pfile = NULL; /* Password file */ @@ -116,7 +115,6 @@ } while (fgets(line, LINE_MAX, ifd) != NULL) { - ++ln; lptr = line; i = 0; if (line[0] != '\n' && line[0] != '#') { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcds-1.9/src/secret.c new/mcds-1.10/src/secret.c --- old/mcds-1.9/src/secret.c 2024-11-11 17:38:33.000000000 +0100 +++ new/mcds-1.10/src/secret.c 2026-08-04 00:05:02.000000000 +0200 @@ -55,8 +55,9 @@ #define MCDS_SECRET_KEY_USER "user" static const SecretSchema mcds_secret_schema = { - MCDS_SECRET_SCHEMA_NAME, SECRET_SCHEMA_NONE, - { + .name = MCDS_SECRET_SCHEMA_NAME, + .flags = SECRET_SCHEMA_NONE, + .attributes = { { MCDS_SECRET_KEY_URL, SECRET_SCHEMA_ATTRIBUTE_STRING }, { MCDS_SECRET_KEY_USER, SECRET_SCHEMA_ATTRIBUTE_STRING }, { "NULL", 0 } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcds-1.9/src/vcard.c new/mcds-1.10/src/vcard.c --- old/mcds-1.9/src/vcard.c 2024-11-11 17:38:33.000000000 +0100 +++ new/mcds-1.10/src/vcard.c 2026-08-04 00:05:02.000000000 +0200 @@ -41,6 +41,105 @@ #include "vcard.h" /** + * Compile regex, checking and handling errors. + * + * \parm[out] preg The compiled regex. + * \parm[in] regex The pattern to match. + * \parm[in] cflags The compilation flags according to regex(3). + * + * \retval 0 If there were no errors. + * \retval 1 If an error was encounted. + **/ +static int +xregcomp(regex_t *preg, const char *regex, int cflags) { + int rerr = 0; /* Regex error code */ + size_t rlen = 0; /* Regex error string length */ + char *rstr = NULL; /* Regex error string */ + + rerr = regcomp(preg, regex, REG_EXTENDED | cflags); + if (rerr != 0) { + rlen = regerror(rerr, preg, NULL, 0); + rstr = xmalloc((rlen+1)*sizeof(char)); + regerror(rerr, preg, rstr, rlen); + warnx(_("Unable to compile regex '%s': %s\n"), regex, rstr); + if (rstr) { + free(rstr); + rstr = NULL; + } + return 1; + } + return 0; +} + +/** + * Unfold a vCard per RFC6350 section 3.2. + * + * It will remove the gaps between folded lines in-place. + * + * \parm[in,out] card The vcard. + * + * \retval 0 If there were no errors. + * \retval 1 If an error was encounted. + **/ +static int +unfold(char *vcard) +{ + static const char r[] = "\r?\n[ \t]"; /* Continuation fold */ + regmatch_t matches[1]; + regex_t re; + size_t length = strlen(vcard); + + /* We have two cursors. The read pointer is never behind the + * the write pointer because we only remove characters. */ + size_t in_ptr = 0; + size_t out_ptr = 0; + + if (xregcomp(&re, r, 0) != 0) { + return 1; + } + + /* Hunt for folds and move the chunks inbetween them back by + * the accumulated number of folding characters. + * Counter intuitively, we always move the section that is + * BEFORE the whitespace we just found, because then we know + * how much to move and don't blindly move all the rest of the + * buffer for each iteration. */ + while (regexec(&re, vcard + in_ptr, 1, matches, 0) == 0) { + /* We have matched some whitespace representing a 'fold'. + * Sanity-check the matches record */ + if (matches[0].rm_so == -1 || matches[0].rm_eo == -1) { + errx(EXIT_FAILURE, _("inconsistent regex result")); + } + + /* We have matched a fold (whitespace to be removed). + * move the text _between the last and current_ gaps to + * to the current write pointer. + * If this is the _first_ fold, then this memmove + * should be a NOP. If it is the _last_ fold, then the + * final segment will be moved after the loop. + * rm_so has the length of text to move because it is the + * offset of the whitespace which ends it. */ + memmove(vcard + out_ptr, + vcard + in_ptr, + matches[0].rm_so); + + /* Move the read pointer beyond the white space we found. */ + in_ptr = in_ptr + matches[0].rm_eo; + + /* Move the write pointer to beyond the text we just moved. */ + out_ptr = out_ptr + matches[0].rm_so; + } + if (options.verbose) { + fprintf(stderr, "Unfolding cut %zd bytes\n", in_ptr - out_ptr); + } + /* Move the final segment. Will be a NOP if we have had no folds. */ + memmove(vcard + out_ptr, vcard + in_ptr, length - in_ptr + 1); + + regfree(&re); + return 0; +} + +/** * Search a query's result. This will run regexs over the result * to filter the data. * The first regex will be to obtain the name (FN property). @@ -54,7 +153,7 @@ * \retval 1 If an error was encounted. **/ int -search(const char *card) +search(char *card) { /* Regex patterns */ static const char r[] = "%s(.*):(.*)"; /* Whole result */ @@ -63,8 +162,6 @@ int plen = 0; /* Length of snprintf()'s */ int rerr = 0; /* Regex error code */ - size_t rlen = 0; /* Regex error string length */ - char *rstr = NULL; /* Regex error string */ size_t qlen = 0; /* Length of the query string */ char *q = NULL; /* Regex pattern for query */ @@ -78,6 +175,11 @@ regmatch_t match[3] = {0}; /* Regex matches */ + if (unfold(card)) { + warnx(_("Error unfolding vCard.")); + return(EXIT_FAILURE); + } + /* Generate a quoted query term */ if (quote(options.term, &qt)) { warnx(_("Unable to build quoted term.")); @@ -96,15 +198,7 @@ return(EXIT_FAILURE); } - if ((rerr = regcomp(&rq, q, REG_EXTENDED|REG_NEWLINE|REG_ICASE)) != 0) { - rlen = regerror(rerr, &rq, NULL, 0); - rstr = xmalloc((rlen+1)*sizeof(char)); - regerror(rerr, &rq, rstr, rlen); - warnx(_("Unable to compile regex '%s': %s\n"), q, rstr); - if (rstr) { - free(rstr); - rstr = NULL; - } + if (xregcomp(&rq, q, REG_NEWLINE|REG_ICASE) != 0) { return(EXIT_FAILURE); } @@ -119,15 +213,7 @@ return(EXIT_FAILURE); } - if ((rerr = regcomp(&rs, s, REG_EXTENDED|REG_NEWLINE)) != 0) { - rlen = regerror(rerr, &rs, NULL, 0); - rstr = xmalloc((rlen+1)*sizeof(char)); - regerror(rerr, &rs, rstr, rlen); - warnx(_("Unable to compile regex '%s': %s\n"), s, rstr); - if (rstr) { - free(rstr); - rstr = NULL; - } + if (xregcomp(&rs, s, REG_NEWLINE) != 0) { return(EXIT_FAILURE); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcds-1.9/src/vcard.h new/mcds-1.10/src/vcard.h --- old/mcds-1.9/src/vcard.h 2024-11-11 17:38:33.000000000 +0100 +++ new/mcds-1.10/src/vcard.h 2026-08-04 00:05:02.000000000 +0200 @@ -32,8 +32,9 @@ { #endif -/** Search the vcard */ -int search(const char *); +/** Search the vcard. + * The supplied card string will be unfolded in place so must be modifiable. */ +int search(char *); /** Quote a string for regex's */ int quote(const char *, char **); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcds-1.9/src/xml.c new/mcds-1.10/src/xml.c --- old/mcds-1.9/src/xml.c 2024-11-11 17:38:33.000000000 +0100 +++ new/mcds-1.10/src/xml.c 2026-08-04 00:05:02.000000000 +0200 @@ -107,7 +107,7 @@ _("Data:\n%s\n"), data); } - search((const char *)data); + search((char *)data); xmlFree(data); } }
