Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package maildir-utils for openSUSE:Factory checked in at 2023-08-07 15:29:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/maildir-utils (Old) and /work/SRC/openSUSE:Factory/.maildir-utils.new.22712 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "maildir-utils" Mon Aug 7 15:29:06 2023 rev:46 rq:1102597 version:1.10.6 Changes: -------- --- /work/SRC/openSUSE:Factory/maildir-utils/maildir-utils.changes 2023-07-10 16:40:17.094680252 +0200 +++ /work/SRC/openSUSE:Factory/.maildir-utils.new.22712/maildir-utils.changes 2023-08-07 15:29:16.068379157 +0200 @@ -1,0 +2,13 @@ +Sun Aug 6 19:06:08 UTC 2023 - Michael Vetter <mvet...@suse.com> + +- Update to 1.10.6: + * mu4e: clarify sortable fields in UI + * mu4e: fix mu4e-view-refresh + * guile: use the standard guile extension directory + * mu: expand file paths in command-line options (e.g., + --maildir=~/Maildir) for shell that don't do so themselves (such as + bash) + * mu: set default batch-size to 50000 so we won't use too much memory + (the old default broke systems with limited memory) + +------------------------------------------------------------------- Old: ---- mu-1.10.5.tar.xz New: ---- mu-1.10.6.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ maildir-utils.spec ++++++ --- /var/tmp/diff_new_pack.e0JegO/_old 2023-08-07 15:29:16.912384337 +0200 +++ /var/tmp/diff_new_pack.e0JegO/_new 2023-08-07 15:29:16.916384362 +0200 @@ -17,7 +17,7 @@ Name: maildir-utils -Version: 1.10.5 +Version: 1.10.6 Release: 0 Summary: Maildir indexer and searcher License: GPL-3.0-or-later ++++++ mu-1.10.5.tar.xz -> mu-1.10.6.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mu-1.10.5/guile/meson.build new/mu-1.10.6/guile/meson.build --- old/mu-1.10.5/guile/meson.build 2023-07-08 09:33:43.000000000 +0200 +++ new/mu-1.10.6/guile/meson.build 2023-08-06 15:26:01.000000000 +0200 @@ -73,7 +73,9 @@ [ 'mu-guile.cc', 'mu-guile-message.cc' ], dependencies: [guile_dep, glib_dep, lib_mu_dep, config_h_dep, thread_dep ], - install: true) + install: true, + install_dir: guile_dep.get_variable(pkgconfig: 'extensiondir') +) if makeinfo.found() custom_target('mu_guile_info', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mu-1.10.5/lib/mu-store.cc new/mu-1.10.6/lib/mu-store.cc --- old/mu-1.10.5/lib/mu-store.cc 2023-07-08 09:33:43.000000000 +0200 +++ new/mu-1.10.6/lib/mu-store.cc 2023-08-06 15:26:01.000000000 +0200 @@ -55,7 +55,7 @@ constexpr auto PersonalAddressesKey = "personal-addresses"; constexpr auto CreatedKey = "created"; constexpr auto BatchSizeKey = "batch-size"; -constexpr auto DefaultBatchSize = 250'000U; +constexpr auto DefaultBatchSize = 50'000U; constexpr auto MaxMessageSizeKey = "max-message-size"; constexpr auto DefaultMaxMessageSize = 100'000'000U; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mu-1.10.5/lib/utils/mu-utils-file.cc new/mu-1.10.6/lib/utils/mu-utils-file.cc --- old/mu-1.10.5/lib/utils/mu-utils-file.cc 2023-07-08 09:33:43.000000000 +0200 +++ new/mu-1.10.6/lib/utils/mu-utils-file.cc 2023-08-06 15:26:01.000000000 +0200 @@ -27,6 +27,10 @@ #include <glib.h> #include <gio/gio.h> +#ifdef HAVE_WORDEXP_H +#include <wordexp.h> +#endif /*HAVE_WORDEXP_H*/ + using namespace Mu; @@ -179,6 +183,30 @@ } +Result<std::string> +Mu::expand_path(const std::string& str) +{ +#ifndef HAVE_WORDEXP_H + return Ok(std::string{str}); +#else + int res; + wordexp_t result; + memset(&result, 0, sizeof(result)); + + res = wordexp(str.c_str(), &result, 0); + if (res != 0 || result.we_wordc == 0) + return Err(Error::Code::File, "cannot expand '%s'; err=%d", str.c_str(), res); + + std::string expanded{result.we_wordv[0]}; + wordfree(&result); + + return Ok(std::move(expanded)); + +#endif /*HAVE_WORDEXP_H*/ +} + + + #ifdef BUILD_TESTS /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mu-1.10.5/lib/utils/mu-utils-file.hh new/mu-1.10.6/lib/utils/mu-utils-file.hh --- old/mu-1.10.5/lib/utils/mu-utils-file.hh 2023-07-08 09:33:43.000000000 +0200 +++ new/mu-1.10.6/lib/utils/mu-utils-file.hh 2023-08-06 15:26:01.000000000 +0200 @@ -73,6 +73,16 @@ */ std::string canonicalize_filename(const std::string& path, const std::string& relative_to); +/** + * Expand the filesystem path (as per wordexp(3)) + * + * @param str a filesystem path string + * + * @return the expanded string or some error + */ +Result<std::string> expand_path(const std::string& str); + + /* * for OSs with out support for direntry->d_type, like Solaris */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mu-1.10.5/man/mu-mkdir.1.org new/mu-1.10.6/man/mu-mkdir.1.org --- old/mu-1.10.5/man/mu-mkdir.1.org 2023-07-08 09:33:43.000000000 +0200 +++ new/mu-1.10.6/man/mu-mkdir.1.org 2023-08-06 15:26:01.000000000 +0200 @@ -1,7 +1,6 @@ #+TITLE: MU MKDIR #+MAN_CLASS_OPTIONS: :section-id "@SECTION_ID@" :date "@MAN_DATE@" - * NAME *mu mkdir* - create a new Maildir @@ -12,15 +11,10 @@ * DESCRIPTION -*mu mkdir* is the *mu* command for creating Maildirs. It does not* use the mu -*database. With the *mkdir* command, you can create new Maildirs with -*permissions 0755. For example, +*mu mkdir* is the command for creating Maildirs as per *maildir(5)*. A maildir is a +a directory with subdirectories ~new~, ~cur~ and ~tmp~. -#+begin_example -$ mu mkdir tom dick harry -#+end_example - -creates three maildirs, =tom=, =dick= and =harry=. +The command require or use the mu database. If creation fails for any reason, *no* attempt is made to remove any parts that were created. This is for safety reasons. @@ -28,10 +22,19 @@ * MKDIR OPTIONS ** --mode=<mode> -set the file access mode for the new maildir(s) as in *chmod(1)*. +set the file access mode for the new maildir(s) as in *chmod(1)*. The default +is 0755. #+include: "common-options.inc" :minlevel 1 +* EXAMPLE + +#+begin_example +$ mu mkdir tom dick harry +#+end_example + +creates three maildirs, =tom=, =dick= and =harry=. + #+include: "prefooter.inc" :minlevel 1 * SEE ALSO diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mu-1.10.5/meson.build new/mu-1.10.6/meson.build --- old/mu-1.10.5/meson.build 2023-07-08 09:33:43.000000000 +0200 +++ new/mu-1.10.6/meson.build 2023-08-06 15:26:01.000000000 +0200 @@ -17,7 +17,7 @@ ################################################################################ # project setup project('mu', ['c', 'cpp'], - version: '1.10.5', + version: '1.10.6', meson_version: '>= 0.56.0', license: 'GPL-3.0-or-later', default_options : [ @@ -55,7 +55,8 @@ '-Wstack-protector', '-Wno-switch-enum', '-Wno-keyword-macro', - '-Wno-#warnings'] + '-Wno-#warnings', + '-Wno-volatile'] if get_option('buildtype') == 'debug' extra_flags += [ @@ -110,6 +111,8 @@ if cc.has_function('wordexp') config_h_data.set('HAVE_WORDEXP_H',1) +else + message('no wordexp, expansion in command line options') endif testmaildir=join_paths(meson.current_source_dir(), 'lib', 'tests') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mu-1.10.5/mu/mu-options.cc new/mu-1.10.6/mu/mu-options.cc --- old/mu-1.10.5/mu/mu-options.cc 2023-07-08 09:33:43.000000000 +0200 +++ new/mu-1.10.6/mu/mu-options.cc 2023-08-06 15:26:01.000000000 +0200 @@ -43,6 +43,7 @@ #include <unistd.h> #include <utils/mu-utils.hh> +#include <utils/mu-utils-file.hh> #include <utils/mu-error.hh> #include "utils/mu-test-utils.hh" #include "mu-options.hh" @@ -136,6 +137,19 @@ return map; } + + +// transformers + + +// Expand the path using wordexp +static const std::function ExpandPath = [](std::string filepath)->std::string { + if (auto&& res{expand_path(filepath)}; !res) + throw CLI::ValidationError{res.error().what()}; + else + return filepath = std::move(res.value()); +}; + /* * common */ @@ -222,7 +236,8 @@ sub.add_option("--target-dir", opts.extract.targetdir, "Target directory for saving") ->type_name("<dir>") - ->default_str("<current>")->default_val("."); + ->default_str("<current>")->default_val(".") + ->transform(ExpandPath, "expand path"); sub.add_option("message", opts.extract.message, "Path to message file")->required() ->type_name("<message-path>"); @@ -325,7 +340,8 @@ "Clear old links first"); sub.add_option("--linksdir", opts.find.linksdir, "Use bookmarked query") - ->type_name("<dir>"); + ->type_name("<dir>") + ->transform(ExpandPath, "expand path"); sub.add_option("--summary-len", opts.find.summary_len, "Use up to so many lines for the summary") @@ -370,7 +386,8 @@ { sub.add_option("--maildir,-m", opts.init.maildir, "Top of the maildir") - ->type_name("<maildir>"); + ->type_name("<maildir>") + ->transform(ExpandPath, "expand path"); sub.add_option("--my-address", opts.init.my_addresses, "Personal e-mail addresses") ->type_name("<address>"); @@ -686,7 +703,8 @@ sub->add_option("--muhome", opts.muhome, "Specify alternative mu directory") ->envname("MUHOME") - ->type_name("<dir>"); + ->type_name("<dir>") + ->transform(ExpandPath, "expand path"); } /* add scripts (if supported) as semi-subscommands as well */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mu-1.10.5/mu4e/mu4e-search.el new/mu-1.10.6/mu4e/mu4e-search.el --- old/mu-1.10.5/mu4e/mu4e-search.el 2023-07-08 09:33:43.000000000 +0200 +++ new/mu-1.10.6/mu4e/mu4e-search.el 2023-08-06 15:26:01.000000000 +0200 @@ -410,16 +410,22 @@ FIELD is the field to sort by; DIR is a symbol: either `ascending', `descending', t (meaning: if FIELD is the same as the current sortfield, change the sort-order) or nil (ask the -user)." +user). + +When threads are enabled (`mu4e-search-threads'), you can only sort +by the `:date' field." (interactive) - (let* ((choices '(("date" . :date) - ("from" . :from) - ("list" . :list) - ("maildir" . :maildir) - ("prio" . :prio) - ("zsize" . :size) - ("subject" . :subject) - ("to" . :to))) + (let* ((choices ;; with threads enabled, you can only sort by *date* + (if mu4e-search-threads + '(("date" . :date)) + '(("date" . :date) + ("from" . :from) + ("list" . :list) + ("maildir" . :maildir) + ("prio" . :prio) + ("zsize" . :size) + ("subject" . :subject) + ("to" . :to)))) (field (or field (mu4e-read-option "Sortfield: " choices))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mu-1.10.5/mu4e/mu4e-view.el new/mu-1.10.6/mu4e/mu4e-view.el --- old/mu-1.10.5/mu4e/mu4e-view.el 2023-07-08 09:33:43.000000000 +0200 +++ new/mu-1.10.6/mu4e/mu4e-view.el 2023-08-06 15:26:01.000000000 +0200 @@ -746,10 +746,12 @@ (defun mu4e-view-refresh () "Refresh the message view." + ;;; XXX: sometimes, side-effect: increase the header-buffers size (interactive) - (when (derived-mode-p 'mu4e-view-mode) - (kill-buffer) - (mu4e-view mu4e--view-message))) + (when-let ((msg (and (derived-mode-p 'mu4e-view-mode) + mu4e--view-message))) + (mu4e-view-quit) + (mu4e-view msg))) (defun mu4e-view-toggle-show-mime-parts() "Toggle whether to show all MIME-parts."