diff --git a/libgtop2.spec b/libgtop2.spec index fedf487..168fb43 100644 --- a/libgtop2.spec +++ b/libgtop2.spec @@ -7,7 +7,7 @@ Name: libgtop2 Summary: libgtop library (version 2) Version: 2.24.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: http://download.gnome.org/sources/libgtop/2.24 Group: System Environment/Libraries @@ -21,6 +21,9 @@ BuildRequires: autoconf BuildRequires: automake BuildRequires: gtk-doc +# http://bugzilla.gnome.org/show_bug.cgi?id=468495 +Patch0: read-cpuinfo-completely.patch + %description libgtop is a library for portably obtaining information about processes, such as their PID, memory usage, etc. @@ -39,6 +42,7 @@ files to allow you to develop with libgtop. %prep %setup -q -n libgtop-%{version} +%patch0 -p0 -b .read-cpuinfo-completely %build %configure --disable-gtk-doc --disable-static @@ -75,6 +79,9 @@ rm -rf $RPM_BUILD_ROOT %exclude %{_datadir}/info %changelog +* Sun Nov 9 2008 Matthias Clasen - 2.24.0-2 +- Read /proc/cpuinfo completely (#467455) + * Tue Sep 23 2008 Matthias Clasen - 2.24.0-1 - Update to 2.24.0 diff --git a/read-cpuinfo-completely.patch b/read-cpuinfo-completely.patch new file mode 100644 index 0000000..65bfb44 --- /dev/null +++ b/read-cpuinfo-completely.patch @@ -0,0 +1,20 @@ +Index: sysdeps/linux/sysinfo.c +=================================================================== +--- sysdeps/linux/sysinfo.c (revision 2781) ++++ sysdeps/linux/sysinfo.c (working copy) +@@ -36,12 +36,12 @@ + static void + init_sysinfo (glibtop *server) + { +- char buffer [16384]; ++ gchar *buffer; + gchar ** processors; + + if(G_LIKELY(sysinfo.flags)) return; + +- file_to_buffer(server, buffer, sizeof buffer, FILENAME); ++ if (!g_file_get_contents("/proc/cpuinfo", &buffer, NULL, NULL)) return; + + /* cpuinfo records are seperated by a blank line */ + processors = g_strsplit(buffer, "\n\n", 0); +