From 4ca05c4c51e1e2cec24e0047155921670f4d184d Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Jun 22 2018 04:22:57 +0000 Subject: Add patch to fix crash with Ctrl-D (bug #1589460) --- diff --git a/octave-crash.patch b/octave-crash.patch new file mode 100644 index 0000000..e852240 --- /dev/null +++ b/octave-crash.patch @@ -0,0 +1,12 @@ +diff -up octave-4.2.2/libinterp/corefcn/input.cc.crash octave-4.2.2/libinterp/corefcn/input.cc +--- octave-4.2.2/libinterp/corefcn/input.cc.crash 2018-02-28 11:41:44.000000000 -0700 ++++ octave-4.2.2/libinterp/corefcn/input.cc 2018-06-21 21:29:18.352517844 -0600 +@@ -298,7 +298,7 @@ octave_base_reader::octave_gets (bool& e + + octave_diary << retval; + +- if (retval[retval.length () - 1] != '\n') ++ if (!retval.empty () && retval.back () != '\n') + octave_diary << "\n"; + + do_input_echo (retval); diff --git a/octave.spec b/octave.spec index 720322f..acb9dc5 100644 --- a/octave.spec +++ b/octave.spec @@ -21,7 +21,7 @@ Name: octave Epoch: 6 Version: 4.2.2 -Release: 3%{?rcver:.rc%{rcver}}%{?dist} +Release: 4%{?rcver:.rc%{rcver}}%{?dist} Summary: A high-level language for numerical computations License: GPLv3+ URL: http://www.octave.org @@ -34,6 +34,9 @@ Source0: ftp://alpha.gnu.org/gnu/octave/octave-%{version}%{rctag}.tar.lz # RPM macros for helping to build Octave packages Source1: macros.octave Source2: xorg.conf +# Fix crash with Ctrl-D +# https://bugzilla.redhat.com/show_bug.cgi?id=1589460 +Patch0: octave-crash.patch # Remove project_group from appdata.xml file # https://bugzilla.redhat.com/show_bug.cgi?id=1293561 Patch2: octave-appdata.patch @@ -205,6 +208,7 @@ This package contains documentation for Octave. %prep %setup -q -n %{name}-%{version}%{?rctag} +%patch0 -p1 -b .crash %patch2 -p1 -b .appdata %patch4 -p1 -b .gnulib %patch5 -p1 -b .qbuttongroup @@ -441,6 +445,9 @@ fi %{_pkgdocdir}/refcard*.pdf %changelog +* Thu Jun 21 2018 Orion Poplawski - 6:4.2.2-4 +- Add patch to fix crash with Ctrl-D (bug #1589460) + * Sun Jun 17 2018 Orion Poplawski - 6:4.2.2-3 - Add requires hicolor-icon-theme - Use make macros