diff --git a/.gitignore b/.gitignore index be881bd..1a8220e 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /deepin-terminal-3.2.2.1.tar.gz /deepin-terminal-3.2.6.tar.gz /deepin-terminal-5.0.0.tar.gz +/deepin-terminal-5.0.4.1.tar.gz diff --git a/8d0a761873c2ef898c9977acc0192bf9ef9e7ca4.patch b/8d0a761873c2ef898c9977acc0192bf9ef9e7ca4.patch new file mode 100644 index 0000000..014c447 --- /dev/null +++ b/8d0a761873c2ef898c9977acc0192bf9ef9e7ca4.patch @@ -0,0 +1,142 @@ +From 8d0a761873c2ef898c9977acc0192bf9ef9e7ca4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= + +Date: Sat, 4 Apr 2020 10:23:18 +0700 +Subject: [PATCH] vala: libify raw_data conversion for Terminal::feed_child + +In a later patch, we will add a conditional build for API change +from VTE 0.60. +--- + lib/utils.vala | 4 ++++ + widget/command_panel.vala | 2 +- + widget/terminal.vala | 20 ++++++++++---------- + widget/workspace.vala | 2 +- + 4 files changed, 16 insertions(+), 12 deletions(-) + +diff --git a/lib/utils.vala b/lib/utils.vala +index 07e3f399..9f3c36e8 100644 +--- a/lib/utils.vala ++++ b/lib/utils.vala +@@ -606,4 +606,8 @@ namespace Utils { + + return command; + } ++ ++ public char[] to_raw_data(string str) { ++ return str.to_utf8(); ++ } + } +diff --git a/widget/command_panel.vala b/widget/command_panel.vala +index 5bbcf5d6..f1380fad 100644 +--- a/widget/command_panel.vala ++++ b/widget/command_panel.vala +@@ -299,7 +299,7 @@ namespace Widgets { + public void execute_command(string command) { + Term focus_term = workspace_manager.focus_workspace.get_focus_term(workspace_manager.focus_workspace); + var command_string = "%s\n".printf(command); +- focus_term.term.feed_child(command_string.to_utf8()); ++ focus_term.term.feed_child(Utils.to_raw_data(command_string)); + + workspace.hide_command_panel(); + if (focus_widget != null) { +diff --git a/widget/terminal.vala b/widget/terminal.vala +index 0d7d6c9f..5a949a28 100644 +--- a/widget/terminal.vala ++++ b/widget/terminal.vala +@@ -611,7 +611,7 @@ namespace Widgets { + } + upload_command = upload_command + "\n"; + +- this.term.feed_child(upload_command.to_utf8()); ++ this.term.feed_child(Utils.to_raw_data(upload_command)); + + return false; + }); +@@ -639,7 +639,7 @@ namespace Widgets { + GLib.Timeout.add(100, () => { + // NOTE: Use quote around $file to avoid escape filepath. + string command = "read -e -a files -p \"%s: \"; sz \"${files[@]}\"\n".printf(_("Type path to download file")); +- this.term.feed_child(command.to_utf8()); ++ this.term.feed_child(Utils.to_raw_data(command)); + + enter_sz_command = true; + +@@ -684,17 +684,17 @@ namespace Widgets { + GLib.Timeout.add(100, () => { + // Switch directory in zssh. + string switch_command = "cd %s\n".printf(save_file_directory); +- this.term.feed_child(switch_command.to_utf8()); ++ this.term.feed_child(Utils.to_raw_data(switch_command)); + + // Do rz command to download file. + GLib.Timeout.add(100, () => { + string download_command = "rz\n"; +- this.term.feed_child(download_command.to_utf8()); ++ this.term.feed_child(Utils.to_raw_data(download_command)); + + // Press enter automatically. + GLib.Timeout.add(100, () => { + string enter_command = "\n"; +- this.term.feed_child(enter_command.to_utf8()); ++ this.term.feed_child(Utils.to_raw_data(enter_command)); + + return false; + }); +@@ -979,7 +979,7 @@ namespace Widgets { + foreach (unowned string option in command_config_file.get_groups ()) { + if (keyname == command_config_file.get_value(option, "Shortcut")) { + var command_string = "%s\n".printf(command_config_file.get_value(option, "Command")); +- term.feed_child(command_string.to_utf8()); ++ term.feed_child(Utils.to_raw_data(command_string)); + + return true; + } +@@ -1090,7 +1090,7 @@ namespace Widgets { + } + upload_command = upload_command + "\n"; + +- this.term.feed_child(upload_command.to_utf8()); ++ this.term.feed_child(Utils.to_raw_data(upload_command)); + + return false; + }); +@@ -1105,7 +1105,7 @@ namespace Widgets { + } + + string uris_s = string.joinv("", uris); +- this.term.feed_child(uris_s.to_utf8()); ++ this.term.feed_child(Utils.to_raw_data(uris_s)); + } + + break; +@@ -1114,7 +1114,7 @@ namespace Widgets { + var data = selection_data.get_text (); + + if (data != null) { +- this.term.feed_child(data.to_utf8()); ++ this.term.feed_child(Utils.to_raw_data(data)); + } + + break; +@@ -1588,7 +1588,7 @@ namespace Widgets { + if (term != null) { + string login_command = "expect -f " + tmpfile.get_path() + "\n"; + expect_file_path = tmpfile.get_path(); +- term.feed_child(login_command.to_utf8()); ++ term.feed_child(Utils.to_raw_data(login_command)); + } + } catch (Error e) { + stderr.printf("login_server: %s\n", e.message); +diff --git a/widget/workspace.vala b/widget/workspace.vala +index 6a8784bb..83b45e3f 100644 +--- a/widget/workspace.vala ++++ b/widget/workspace.vala +@@ -141,7 +141,7 @@ namespace Widgets { + if (term_dir.length > 0) { + Term new_focus_term = get_focus_term(this); + string switch_command = "cd %s\n".printf(term_dir); +- new_focus_term.term.feed_child(switch_command.to_utf8()); ++ new_focus_term.term.feed_child(Utils.to_raw_data(switch_command)); + } + + return false; diff --git a/d38f972c8cb958524b326986c6dc72b24fa35dad.patch b/d38f972c8cb958524b326986c6dc72b24fa35dad.patch new file mode 100644 index 0000000..0ec7a2a --- /dev/null +++ b/d38f972c8cb958524b326986c6dc72b24fa35dad.patch @@ -0,0 +1,46 @@ +From d38f972c8cb958524b326986c6dc72b24fa35dad Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= + +Date: Sat, 4 Apr 2020 10:53:14 +0700 +Subject: [PATCH] utils: adjust to change in vte3>0.59.0 + +vte3 has changed the parameter to Terminal::feed_child from char[] +to uint8[] +--- + CMakeLists.txt | 4 ++++ + lib/utils.vala | 6 ++++++ + 2 files changed, 10 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a3cea091..458ea4ab 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -30,6 +30,10 @@ option(USE_VENDOR_LIB "Backport support for debian stretch" ON) + + if (NOT USE_VENDOR_LIB) + pkg_check_modules(VTE REQUIRED vte-2.91) ++# There're 3 releases for 0.59.x, only 0.59.0 keeps old behaviour ++if("${VTE_VERSION}" VERSION_GREATER "0.59.0") ++ list(APPEND ARGS_DEFINITIONS "VTE_0_60") ++endif() + endif() + + if (NOT DEFINED VERSION) +diff --git a/lib/utils.vala b/lib/utils.vala +index 9f3c36e8..3241d5ce 100644 +--- a/lib/utils.vala ++++ b/lib/utils.vala +@@ -607,7 +607,13 @@ namespace Utils { + return command; + } + ++#if VTE_0_60 ++ public uint8[] to_raw_data(string str) { ++ return str.data; ++ } ++#else + public char[] to_raw_data(string str) { + return str.to_utf8(); + } ++#endif + } diff --git a/deepin-terminal.spec b/deepin-terminal.spec index cbf3c5d..fccaf41 100644 --- a/deepin-terminal.spec +++ b/deepin-terminal.spec @@ -1,12 +1,14 @@ %global _terminals gnome-terminal mate-terminal xfce4-terminal lxterminal qterminal qterminal-qt5 terminology yakuake fourterm roxterm lilyterm termit xterm mrxvt Name: deepin-terminal -Version: 5.0.0 -Release: 2%{?dist} +Version: 5.0.4.1 +Release: 1%{?dist} Summary: Default terminal emulation application for Deepin License: GPLv3 URL: https://github.com/linuxdeepin/deepin-terminal Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +Patch0: https://github.com/linuxdeepin/deepin-terminal/commit/8d0a761873c2ef898c9977acc0192bf9ef9e7ca4.patch +Patch1: https://github.com/linuxdeepin/deepin-terminal/commit/d38f972c8cb958524b326986c6dc72b24fa35dad.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -45,6 +47,8 @@ The %{name}-data package provides shared data for Deepin Terminal. %prep %setup -q +%patch0 -p1 +%patch1 -p1 sed -i '/ssh_login/s|lib|libexec|' lib/utils.vala CMakeLists.txt sed -i '/stdc++/d' CMakeLists.txt @@ -107,6 +111,9 @@ fi %{_datadir}/applications/%{name}.desktop %changelog +* Fri May 1 2020 Robin Lee - 5.0.4.1-1 +- Update to 5.0.4.1 (RHBZ#1828023, RHBZ#1699622) + * Tue Jan 28 2020 Fedora Release Engineering - 5.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index 419e84f..348358e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (deepin-terminal-5.0.0.tar.gz) = d37add7dbd02656c4d86432bd704e2da295215cf2e66fa374b2c6fc645d932b40ddece38e2274da225d4896bd1c6cd608cc5cd3fece6a3f4c13b9141116dfbd3 +SHA512 (deepin-terminal-5.0.4.1.tar.gz) = 9523d5411b017947b40568fa3d47654e3a9d560c016a7e75311a14c60c9da3368337c4652fdbaa3fb1278cebb01a93f6c0c804bd277c59a009ead3024bf14036