Hello community,

here is the log from the commit of package vte for openSUSE:Factory checked in 
at 2020-04-29 20:42:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/vte (Old)
 and      /work/SRC/openSUSE:Factory/.vte.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "vte"

Wed Apr 29 20:42:53 2020 rev:123 rq:798355 version:0.60.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/vte/vte.changes  2020-04-23 18:28:30.895867036 
+0200
+++ /work/SRC/openSUSE:Factory/.vte.new.2738/vte.changes        2020-04-29 
20:43:04.215750254 +0200
@@ -1,0 +2,17 @@
+Sun Apr 26 11:13:25 UTC 2020 - [email protected]
+
+- Update to version 0.60.2:
+  * icu: glue: Set error callback on the from-unicode conversion
+  * lib: Fix switching between legacy encodings
+  * widget: Set error from vte_terminal_set_encoding when built
+    without ICU
+  * all: Fix the build without ICU
+  * docs: Add index for API new in 0.60
+  * lib: Fix exception thrown from std::clamp
+  * pty: spawn: Reap the child process if the systemd call fails
+  * docs: Add regex flag requirements
+  * bindings: gir: Add missing file to extract source comments and
+    annotations from
+  * build: Post release version bump
+
+-------------------------------------------------------------------

Old:
----
  vte-0.60.1.tar.xz

New:
----
  vte-0.60.2.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ vte.spec ++++++
--- /var/tmp/diff_new_pack.Y3Qjgd/_old  2020-04-29 20:43:04.687751485 +0200
+++ /var/tmp/diff_new_pack.Y3Qjgd/_new  2020-04-29 20:43:04.691751496 +0200
@@ -23,7 +23,7 @@
 %define _name   vte
 
 Name:           vte
-Version:        0.60.1
+Version:        0.60.2
 Release:        0
 Summary:        Terminal Emulator Library
 License:        LGPL-2.0-only AND LGPL-3.0-only AND GPL-3.0-or-later

++++++ _service ++++++
--- /var/tmp/diff_new_pack.Y3Qjgd/_old  2020-04-29 20:43:04.719751569 +0200
+++ /var/tmp/diff_new_pack.Y3Qjgd/_new  2020-04-29 20:43:04.719751569 +0200
@@ -4,7 +4,7 @@
     <param name="scm">git</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="changesgenerate">enable</param>
-    <param name="revision">refs/tags/0.60.1</param>
+    <param name="revision">refs/tags/0.60.2</param>
     <param name="exclude">doc/vttest.*</param>
   </service>
   <service name="recompress" mode="disabled">

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.Y3Qjgd/_old  2020-04-29 20:43:04.735751611 +0200
+++ /var/tmp/diff_new_pack.Y3Qjgd/_new  2020-04-29 20:43:04.739751621 +0200
@@ -3,4 +3,4 @@
             <param name="url">git://git.gnome.org/vte</param>
           <param 
name="changesrevision">961927a8115c82f35deafe09c1d68689ff069905</param></service><service
 name="tar_scm">
                 <param 
name="url">https://gitlab.gnome.org/GNOME/vte.git</param>
-              <param 
name="changesrevision">606a55cbe2f1aba42023f19f3b2d2ccf4c90573b</param></service></servicedata>
\ No newline at end of file
+              <param 
name="changesrevision">c893450ae32b85870df3313021d9ce1fdfcbe49e</param></service></servicedata>
\ No newline at end of file

++++++ vte-0.60.1.tar.xz -> vte-0.60.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vte-0.60.1/doc/reference/vte-docs.xml 
new/vte-0.60.2/doc/reference/vte-docs.xml
--- old/vte-0.60.1/doc/reference/vte-docs.xml   2020-03-26 18:22:26.000000000 
+0100
+++ new/vte-0.60.2/doc/reference/vte-docs.xml   2020-04-25 12:28:54.000000000 
+0200
@@ -122,6 +122,10 @@
     <title>Index of new symbols in 0.58</title>
     <xi:include href="xml/api-index-0.58.xml"><xi:fallback /></xi:include>
   </index>
+  <index id="api-index-0-60" role="0.60">
+    <title>Index of new symbols in 0.60</title>
+    <xi:include href="xml/api-index-0.60.xml"><xi:fallback /></xi:include>
+  </index>
 
   <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vte-0.60.1/meson.build new/vte-0.60.2/meson.build
--- old/vte-0.60.1/meson.build  2020-03-26 18:22:26.000000000 +0100
+++ new/vte-0.60.2/meson.build  2020-04-25 12:28:54.000000000 +0200
@@ -17,7 +17,7 @@
 project(
   'vte',
   ['c', 'cpp'],
-  version: '0.60.1',
+  version: '0.60.2',
   license: ['LGPL-3.0-or-later', 'GPL-3.0-or-later'],
   default_options: [
     'buildtype=release',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vte-0.60.1/src/decoder-cat.cc 
new/vte-0.60.2/src/decoder-cat.cc
--- old/vte-0.60.1/src/decoder-cat.cc   2020-03-26 18:22:26.000000000 +0100
+++ new/vte-0.60.2/src/decoder-cat.cc   2020-04-25 12:28:54.000000000 +0200
@@ -33,9 +33,12 @@
 
 #include "debug.h"
 #include "glib-glue.hh"
+#include "utf8.hh"
+
+#ifdef WITH_ICU
 #include "icu-decoder.hh"
 #include "icu-glue.hh"
-#include "utf8.hh"
+#endif
 
 using namespace std::literals;
 
@@ -228,6 +231,8 @@
 
 }; // class Sink
 
+#ifdef WITH_ICU
+
 static std::unique_ptr<vte::base::ICUDecoder>
 make_decoder(Options const& options)
 {
@@ -261,6 +266,8 @@
         return std::make_unique<vte::base::ICUDecoder>(converter, 
u32_converter);
 }
 
+#endif /* WITH_ICU */
+
 class Processor {
 private:
         gsize m_input_bytes{0};
@@ -329,6 +336,7 @@
                 g_free(buf);
         }
 
+#ifdef WITH_ICU
         template<class Functor>
         void
         process_file_icu(int fd,
@@ -393,6 +401,7 @@
 
                 g_free(buf);
         }
+#endif /* WITH_ICU */
 
         template<class Functor>
         bool
@@ -400,6 +409,7 @@
                      Options const& options,
                      Functor& func)
         {
+#ifdef WITH_ICU
                 auto decoder = std::unique_ptr<vte::base::ICUDecoder>{};
                 if (options.charset()) {
                         decoder = make_decoder(options);
@@ -408,6 +418,7 @@
                 }
 
                 assert(decoder != nullptr || options.charset() == nullptr);
+#endif
 
                 for (auto i = 0; i < options.repeat(); ++i) {
                         if (i > 0 && lseek(fd, 0, SEEK_SET) != 0) {
@@ -415,9 +426,12 @@
                                 return false;
                         }
 
+#ifdef WITH_ICU
                         if (decoder) {
                                 process_file_icu(fd, decoder.get(), func);
-                        } else {
+                        } else
+#endif
+                        {
                                 process_file_utf8(fd, func);
                         }
                 }
@@ -526,12 +540,17 @@
         }
 
         if (options.list()) {
+#ifdef WITH_ICU
                 auto charsets = vte::base::get_icu_charsets(true);
                 for (auto i = 0; charsets[i]; ++i)
                         g_print("%s\n", charsets[i]);
                 g_strfreev(charsets);
 
                 return EXIT_SUCCESS;
+#else
+                g_printerr("ICU support not available.\n");
+                return EXIT_FAILURE;
+#endif
         }
 
         auto rv = bool{};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vte-0.60.1/src/icu-glue.cc 
new/vte-0.60.2/src/icu-glue.cc
--- old/vte-0.60.1/src/icu-glue.cc      2020-03-26 18:22:26.000000000 +0100
+++ new/vte-0.60.2/src/icu-glue.cc      2020-04-25 12:28:54.000000000 +0200
@@ -111,10 +111,35 @@
 {
         auto err = icu::ErrorCode{};
         auto converter = std::shared_ptr<UConverter>{ucnv_open(charset, err), 
&ucnv_close};
-        if (err.isFailure())
+        if (err.isFailure()) {
                 g_set_error(error, G_CONVERT_ERROR, 
G_CONVERT_ERROR_NO_CONVERSION,
                             "Failed to open converter for charset \"%s\": %s",
                             charset, err.errorName());
+                return {};
+        }
+
+        /* The unicode->target conversion is only used when converting
+         * user input (keyboard, clipboard) to be sent to the PTY, and
+         * we don't want the ucnv_fromUChars to substitute the SUB character
+         * for illegal input, since SUB is U+001A which is Ctrl-Z, which
+         * the default UCNV_FROM_U_CALLBACK_SUBSTITUTE callback does.
+         * Use UCNV_FROM_U_CALLBACK_STOP to stop conversion when encountering
+         * illegal input.
+         */
+        err.reset();
+        ucnv_setFromUCallBack(converter.get(),
+                              UCNV_FROM_U_CALLBACK_STOP,
+                              nullptr,
+                              nullptr,
+                              nullptr,
+                              err);
+        if (err.isFailure()) {
+                g_set_error(error, G_CONVERT_ERROR, 
G_CONVERT_ERROR_NO_CONVERSION,
+                            "Failed ucnv_setFromUCallBack for charset \"%s\": 
%s",
+                            charset, err.errorName());
+                return {};
+        }
+
         return converter;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vte-0.60.1/src/meson.build 
new/vte-0.60.2/src/meson.build
--- old/vte-0.60.1/src/meson.build      2020-03-26 18:22:26.000000000 +0100
+++ new/vte-0.60.2/src/meson.build      2020-04-25 12:28:54.000000000 +0200
@@ -153,8 +153,9 @@
 
 libvte_common_doc_sources = files(
   # These file contain gtk-doc comments to be extracted for docs and gir
-  'vtepty.cc',
   'vtegtk.cc',
+  'vtepty.cc',
+  'vteregex.cc',
 )
 
 # FIXMEchpe this should use files('...') (allowed as per docs, afaict), but 
that crashes meson
@@ -253,10 +254,14 @@
 
 # decoder cat
 
-decoder_cat_sources = glib_glue_sources + icu_sources + utf8_sources + 
debug_sources + files(
+decoder_cat_sources = glib_glue_sources + utf8_sources + debug_sources + files(
   'decoder-cat.cc',
 )
 
+if get_option('icu')
+  decoder_cat_sources += icu_sources
+endif
+
 decoder_cat = executable(
   'decoder-cat',
   decoder_cat_sources,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vte-0.60.1/src/pty.cc new/vte-0.60.2/src/pty.cc
--- old/vte-0.60.1/src/pty.cc   2020-03-26 18:22:26.000000000 +0100
+++ new/vte-0.60.2/src/pty.cc   2020-04-25 12:28:54.000000000 +0200
@@ -34,6 +34,7 @@
 #include "vteptyinternal.hh"
 #include "vtetypes.hh"
 #include "vtespawn.hh"
+#include "reaper.hh"
 
 #include <assert.h>
 #include <sys/types.h>
@@ -488,6 +489,8 @@
                                                      cancellable,
                                                      err)) {
                 if (spawn_flags & VTE_SPAWN_REQUIRE_SYSTEMD_SCOPE) {
+                       vte_reaper_add_child(pid);
+
                         auto pgrp = getpgid(pid);
                         if (pgrp != -1) {
                                 kill(-pgrp, SIGHUP);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vte-0.60.1/src/vte.cc new/vte-0.60.2/src/vte.cc
--- old/vte-0.60.1/src/vte.cc   2020-03-26 18:22:26.000000000 +0100
+++ new/vte-0.60.2/src/vte.cc   2020-04-25 12:28:54.000000000 +0200
@@ -1530,7 +1530,7 @@
         auto first_row = first_displayed_row();
         auto last_row = last_displayed_row();
 
-        return std::clamp(row, first_row, last_row);
+        return vte::clamp(row, first_row, last_row);
 }
 
 /*
@@ -2019,11 +2019,22 @@
                        GError** error)
 {
 #ifdef WITH_ICU
-        auto const using_utf8 = bool{charset == nullptr || 
g_ascii_strcasecmp(charset, "UTF-8") == 0};
-        auto const syntax = using_utf8 ? DataSyntax::eECMA48_UTF8 : 
DataSyntax::eECMA48_PCTERM;
+        auto const to_utf8 = bool{charset == nullptr || 
g_ascii_strcasecmp(charset, "UTF-8") == 0};
 
-        if (syntax == data_syntax())
-                return true;
+        if (to_utf8) {
+                if (data_syntax() == DataSyntax::eECMA48_UTF8)
+                        return true;
+
+                m_converter.reset();
+                m_data_syntax = DataSyntax::eECMA48_UTF8;
+        } else {
+                auto converter = vte::base::ICUConverter::make(charset, error);
+                if (!converter)
+                        return false;
+
+                m_converter = std::move(converter);
+                m_data_syntax = DataSyntax::eECMA48_PCTERM;
+        }
 
         /* Note: we DON'T convert any pending output from the previous charset 
to
          * the new charset, since that is in general not possible without 
loss, and
@@ -2032,22 +2043,12 @@
          * the outgooing and only change charsets once it's empty.)
          * Do not clear the incoming queue.
          */
-
         _vte_byte_array_clear(m_outgoing);
 
-        if (using_utf8) {
-                m_converter.reset();
-        } else {
-                m_converter = vte::base::ICUConverter::make(charset, error);
-                if (!m_converter)
-                        return false;
-        }
-
-        m_data_syntax = syntax;
         reset_decoder();
 
         if (pty())
-                pty()->set_utf8(using_utf8);
+                pty()->set_utf8(data_syntax() == DataSyntax::eECMA48_UTF8);
 
        _vte_debug_print(VTE_DEBUG_IO,
                          "Set terminal encoding to `%s'.\n",
@@ -2061,6 +2062,8 @@
 
         return true;
 #else
+        g_set_error_literal(error, G_CONVERT_ERROR, 
G_CONVERT_ERROR_NO_CONVERSION,
+                            "ICU support not available");
         return false;
 #endif
 }
@@ -4165,6 +4168,7 @@
                         _vte_byte_array_append(m_outgoing, data.data(), 
data.size());
                 break;
 
+#ifdef WITH_ICU
         case DataSyntax::eECMA48_PCTERM: {
                 auto converted = m_converter->convert(data);
 
@@ -4173,6 +4177,7 @@
                         _vte_byte_array_append(m_outgoing, converted.data(), 
converted.size());
                 break;
         }
+#endif
 
         default:
                 g_assert_not_reached();
@@ -9896,9 +9901,11 @@
                 m_utf8_decoder.reset();
                 break;
 
+#ifdef WITH_ICU
         case DataSyntax::eECMA48_PCTERM:
                 m_converter->decoder().reset();
                 break;
+#endif
 
         default:
                 g_assert_not_reached();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vte-0.60.1/src/vtegtk.cc new/vte-0.60.2/src/vtegtk.cc
--- old/vte-0.60.1/src/vtegtk.cc        2020-03-26 18:22:26.000000000 +0100
+++ new/vte-0.60.2/src/vtegtk.cc        2020-04-25 12:28:54.000000000 +0200
@@ -2156,6 +2156,8 @@
  * user moves the mouse cursor over a section of displayed text which matches
  * this expression, the text will be highlighted.
  *
+ * Note that @regex should have been created using the %PCRE2_MULTILINE flag.
+ *
  * Returns: an integer associated with this expression
  *
  * Since: 0.46
@@ -2275,6 +2277,8 @@
  * text is stored in @matches at the position of the regex in @regexes; 
otherwise
  * %NULL is stored there.
  *
+ * Note that the regexes in @regexes should have been created using the 
%PCRE2_MULTILINE flag.
+ *
  * Returns: %TRUE iff any of the regexes produced a match
  *
  * Since: 0.46
@@ -2465,6 +2469,8 @@
  *
  * Sets the regex to search for. Unsets the search regex when passed %NULL.
  *
+ * Note that @regex should have been created using the %PCRE2_MULTILINE flag.
+ *
  * Since: 0.46
  */
 void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vte-0.60.1/src/vteinternal.hh 
new/vte-0.60.2/src/vteinternal.hh
--- old/vte-0.60.1/src/vteinternal.hh   2020-03-26 18:22:26.000000000 +0100
+++ new/vte-0.60.2/src/vteinternal.hh   2020-04-25 12:28:54.000000000 +0200
@@ -78,6 +78,18 @@
 };
 
 namespace vte {
+
+// This is like std::clamp, except that it doesn't throw when
+// max_v<min_v, but instead returns min_v in that case.
+template<typename T>
+constexpr inline T const&
+clamp(T const& v,
+      T const& min_v,
+      T const& max_v)
+{
+        return std::max(std::min(v, max_v), min_v);
+}
+
 namespace platform {
 
 /*


Reply via email to