rpms/libgtop2/F-8 libgtop-2.20-fsusage.patch, NONE, 1.1 .cvsignore, 1.39, 1.40 libgtop2.spec, 1.58, 1.59 sources, 1.39, 1.40

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Wed Jul 9 18:49:37 UTC 2008


Author: mschwendt

Update of /cvs/pkgs/rpms/libgtop2/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26276

Modified Files:
	.cvsignore libgtop2.spec sources 
Added Files:
	libgtop-2.20-fsusage.patch 
Log Message:
* Thu Jun 26 2008 Michael Schwendt <mschwendt at fedoraproject.org> - 2.20.2-1
- Apply fsusage.c patch for Linux >= 2.6.25 (#452273).
- Update to 2.20.2 (fixed smaps parsing on >= 2.6.24.x)


libgtop-2.20-fsusage.patch:

--- NEW FILE libgtop-2.20-fsusage.patch ---
diff -Nur libgtop-2.20.1-orig/sysdeps/linux/fsusage.c libgtop-2.20.1/sysdeps/linux/fsusage.c
--- libgtop-2.20.1-orig/sysdeps/linux/fsusage.c	2007-09-27 22:34:52.000000000 +0200
+++ libgtop-2.20.1/sysdeps/linux/fsusage.c	2008-06-26 20:20:04.000000000 +0200
@@ -62,9 +62,35 @@
 }
 
 
+/*
+  Bug #539360.
+  /sys/.../stat format is partially defined in
+  linux/Documentation/block/stat.txt (looks outdated).  Before linux
+  2.5.25, /sys/block/%s/stat and /sys/block/%s/%s/stat were not the
+  same, but the following commit changed the latter to have the same
+  format and broke compatibility.
+
+  Commit 34e8beac92c27d292938065f8375842d2840767c
+  Author: Jerome Marchand <jmarchan at redhat.com>
+  Date:   Fri Feb 8 11:04:55 2008 +0100
+
+    Enhanced partition statistics: sysfs
+
+    Reports enhanced partition statistics in sysfs.
+
+    Signed-off-by: Jerome Marchand <jmarchan at redhat.com>
+
+    fs/partitions/check.c |   22 +++++++++++++++++++---
+    1 files changed, 19 insertions(+), 3 deletions(-)
+
+ */
+
 static void
-get_sys_path(const char *device, char **stat_path, const char **parse_format)
+get_sys_path(glibtop* server, const char *device, char **stat_path, const char **parse_format)
 {
+	const char* linux_2_6_25_format = "%*llu %*llu %llu %*llu"
+					  "%*llu %*llu %llu %*llu";
+
 	if(g_str_has_prefix(device, "hd") || g_str_has_prefix(device, "sd"))
 	{
 		char *prefix;
@@ -82,12 +108,18 @@
 		g_free(prefix);
 
 		*stat_path = path;
-		*parse_format = "%*llu %llu %*llu %llu";
+		if (server->os_version_code < LINUX_VERSION_CODE(2, 6, 25))
+			*parse_format = "%*llu %llu %*llu %llu";
+		else
+			*parse_format = linux_2_6_25_format;
 	}
 	else
 	{
 		*stat_path = g_strdup_printf("/sys/block/%s/stat", device);
-		*parse_format = "%*llu %*llu %llu %*llu %*llu %*llu %llu";
+		if (server->os_version_code < LINUX_VERSION_CODE(2, 6, 25))
+			*parse_format = "%*llu %*llu %llu %*llu %*llu %*llu %llu";
+		else
+			*parse_format = linux_2_6_25_format;
 	}
 }
 
@@ -104,7 +136,7 @@
 	device = get_partition(path);
 	if(!device) return;
 
-	get_sys_path(device, &filename, &format);
+	get_sys_path(server, device, &filename, &format);
 	g_free(device);
 
 	ret = try_file_to_buffer(buffer, sizeof buffer, filename);


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/libgtop2/F-8/.cvsignore,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- .cvsignore	8 Jan 2008 14:43:26 -0000	1.39
+++ .cvsignore	9 Jul 2008 18:48:37 -0000	1.40
@@ -1 +1 @@
-libgtop-2.20.1.tar.bz2
+libgtop-2.20.2.tar.bz2


Index: libgtop2.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libgtop2/F-8/libgtop2.spec,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- libgtop2.spec	8 Jan 2008 14:43:26 -0000	1.58
+++ libgtop2.spec	9 Jul 2008 18:48:37 -0000	1.59
@@ -6,12 +6,13 @@
 
 Name:		libgtop2
 Summary:        libgtop library (version 2)
-Version: 	2.20.1
+Version: 	2.20.2
 Release: 	1%{?dist}
 License: 	GPLv2+
 URL:            http://download.gnome.org/sources/libgtop/2.20
 Group:          System Environment/Libraries
 Source: 	http://download.gnome.org/sources/libgtop/2.20/libgtop-%{version}.tar.bz2
+Patch1: libgtop-2.20-fsusage.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)	
 Requires:	glib2 >= %{glib2_version}
 BuildRequires:	glib2-devel >= %{glib2_version}
@@ -39,6 +40,7 @@
 
 %prep
 %setup -q -n libgtop-%{version}
+%patch1 -p1 -b .fsusage
 
 %build
 %configure --disable-gtk-doc --disable-static
@@ -75,6 +77,10 @@
 %exclude %{_datadir}/info
 
 %changelog
+* Thu Jun 26 2008 Michael Schwendt <mschwendt at fedoraproject.org> - 2.20.2-1
+- Apply fsusage.c patch for Linux >= 2.6.25 (#452273).
+- Update to 2.20.2 (fixed smaps parsing on >= 2.6.24.x)
+
 * Tue Jan 08 2008 - Bastien Nocera <bnocera at redhat.com> - 2.20.1-1
 - Update to 2.20.1
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/libgtop2/F-8/sources,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- sources	8 Jan 2008 14:43:26 -0000	1.39
+++ sources	9 Jul 2008 18:48:37 -0000	1.40
@@ -1 +1 @@
-b6fa671e8325bd8dbce684527791225a  libgtop-2.20.1.tar.bz2
+c3bbd8d03a3f2995f1f4974933c0e8ba  libgtop-2.20.2.tar.bz2




More information about the fedora-extras-commits mailing list