Browse code

Added upstream patch "Fix to interpret ASCII sequence correctly" to procps-ng package

Change-Id: Ia4ce4967e553d7faf1aeca8e570b7414849698f3
Reviewed-on: http://photon-jenkins.eng.vmware.com/1105
Tested-by: jenkins-photon <wangnan2015@hotmail.com>
Reviewed-by: suezzelur <anishs@vmware.com>
(cherry picked from commit 52a1ac0238c4d0339cf45e1db97475027b0da01d)
Reviewed-on: http://photon-jenkins.eng.vmware.com/1111
Tested-by: suezzelur <anishs@vmware.com>

dthaluru authored on 2016/06/22 05:12:13
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,17 @@
0
+--- a/watch.c	2015-08-08 22:54:54.310117082 -0700
1
+@@ -228,10 +228,12 @@
2
+ 	 * attributes to apply, but typically there are between 1 and 3.
3
+ 	 */
4
+ 
5
+-	if (*endptr == '\0') set_ansi_attribute(0); /* [m treated as [0m */
6
+ 
7
+-	for (endptr = numstart = buf; *endptr != '\0'; numstart = endptr + 1)
8
++	for (endptr = numstart = buf; *endptr != '\0'; numstart = endptr + 1) {
9
+ 		set_ansi_attribute(strtol(numstart, &endptr, 10));
10
++        if (numstart == endptr)
11
++            set_ansi_attribute(0); /* [m treated as [0m */
12
++    }
13
+ }
14
+ 
15
+ static void __attribute__ ((__noreturn__)) do_exit(int status)
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	Programs for monitoring processes
2 2
 Name:		procps-ng
3 3
 Version:	3.3.11
4
-Release:	2%{?dist}
4
+Release:	3%{?dist}
5 5
 License:	GPLv2
6 6
 URL:		http://procps.sourceforge.net/
7 7
 Group:		Applications/System
... ...
@@ -9,6 +9,7 @@ Vendor:		VMware, Inc.
9 9
 Distribution: Photon
10 10
 Source0:		http://sourceforge.net/projects/procps-ng/files/Production/%{name}-%{version}.tar.xz
11 11
 %define sha1 procps-ng=1bdca65547df9ed019bd83649b0f8b8eaa017e25
12
+Patch0:		Fixto-interpret-ascii-sequence.patch
12 13
 BuildRequires:	ncurses-devel
13 14
 Requires:	ncurses
14 15
 %description
... ...
@@ -20,6 +21,7 @@ Requires:	%{name} = %{version}
20 20
 It contains the libraries and header files to create applications 
21 21
 %prep
22 22
 %setup -q
23
+%patch0 -p1
23 24
 %build
24 25
 ./configure \
25 26
 	--prefix=%{_prefix} \
... ...
@@ -96,6 +98,8 @@ find %{buildroot} -name '*.la' -delete
96 96
 %{_libdir}/pkgconfig/libprocps.pc
97 97
 %{_libdir}/libprocps.so
98 98
 %changelog
99
+*	Tue Jun 21 2016 Divya Thaluru <dthaluru@vmware.com> 3.3.11-3
100
+-	Added patch to interpret ASCII sequence correctly
99 101
 *	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 3.3.11-2
100 102
 -	GA - Bump release of all rpms
101 103
 *	Thu Jan 21 2016 Anish Swaminathan <anishs@vmware.com> 3.3.11-1