rpms/latencytop/F-9 latencytop-0.4-updated-translations.patch, NONE, 1.1 latencytop-Makefile-fixes.patch, NONE, 1.1 latencytop-datadir.patch, NONE, 1.1 latencytop-standard-CFLAGS.patch, NONE, 1.1 latencytop.spec, 1.3, 1.4 sources, 1.2, 1.3 latencytop-standard-cflags.patch, 1.1, NONE

Michal Schmidt michich at fedoraproject.org
Tue Oct 7 15:34:08 UTC 2008


Author: michich

Update of /cvs/pkgs/rpms/latencytop/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16960

Modified Files:
	latencytop.spec sources 
Added Files:
	latencytop-0.4-updated-translations.patch 
	latencytop-Makefile-fixes.patch latencytop-datadir.patch 
	latencytop-standard-CFLAGS.patch 
Removed Files:
	latencytop-standard-cflags.patch 
Log Message:
* Tue Oct 07 2008 Michal Schmidt <mschmidt at redhat.com> - 0.4-2
- Add an upstream patch to update the translation table.

* Thu Apr 24 2008 Michal Schmidt <mschmidt at redhat.com> - 0.4-1
- Upstream release 0.4.


latencytop-0.4-updated-translations.patch:

--- NEW FILE latencytop-0.4-updated-translations.patch ---
Patch taken from upstream:

commit 01c28eed49f397f04baccb00c1747ff34414e4f0
Author: root <root at localhost.localdomain>
Date:   Thu Oct 2 21:28:42 2008 -0700

    updated translations

diff --git a/src/latencytop.trans b/src/latencytop.trans
index 962028b..6a69bae 100644
--- a/src/latencytop.trans
+++ b/src/latencytop.trans
@@ -123,6 +123,8 @@
 3	lock_kernel		Big Kernel Lock contention
 3	blk_execute_rq		Submitting block IO
 3	scsi_cmd_ioctl		SCSI ioctl command
+3	acpi_ec_transaction	ACPI hardware access
+3	journal_get_undo_access	Waiting for EXT3 journal undo operation
 #
 #
 5	do_page_fault		Page fault

latencytop-Makefile-fixes.patch:

--- NEW FILE latencytop-Makefile-fixes.patch ---
Makefile fixes

From: Michal Schmidt <mschmidt at redhat.com>

Fix the 'install' target:
 - Don't assume SBINDIR already exists under DESTDIR.
 - Install latencytop.block too.
 - Install the manpage.
---

 src/Makefile |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)


diff --git a/src/Makefile b/src/Makefile
index 7a01f4f..c75c98e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,5 +1,7 @@
 DESTDIR =
 SBINDIR = /usr/sbin
+DATADIR = /usr/share
+MANDIR  = /usr/share/man
 XCFLAGS = -W `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare 
 LDF = -Wl,--as-needed `pkg-config --libs glib-2.0`   -lncursesw 
 
@@ -24,6 +26,10 @@ clean:
 	rm -f *~ latencytop DEADJOE *.o
 
 install: latencytop
-	mkdir -p $(DESTDIR)/usr/share/latencytop
-	install -m 0644 latencytop.trans $(DESTDIR)/usr/share/latencytop/latencytop.trans
-	install -m 0755 latencytop $(DESTDIR)$(SBINDIR)/
\ No newline at end of file
+	mkdir -p $(DESTDIR)$(DATADIR)/latencytop
+	mkdir -p $(DESTDIR)$(MANDIR)/man8
+	mkdir -p $(DESTDIR)$(SBINDIR)
+	install -m 0644 latencytop.trans $(DESTDIR)$(DATADIR)/latencytop/latencytop.trans
+	install -m 0644 latencytop.block $(DESTDIR)$(DATADIR)/latencytop/latencytop.block
+	install -m 0644 latencytop.8 $(DESTDIR)$(MANDIR)/man8/
+	install -m 0755 latencytop $(DESTDIR)$(SBINDIR)/

latencytop-datadir.patch:

--- NEW FILE latencytop-datadir.patch ---
Use translation tables in /usr/share

From: Michal Schmidt <mschmidt at redhat.com>

The translation tables are in /usr/share/...
Don't look for them in the current directory.
---

 src/latencytop.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)


diff --git a/src/latencytop.c b/src/latencytop.c
index a5d5fb3..780aa98 100644
--- a/src/latencytop.c
+++ b/src/latencytop.c
@@ -35,6 +35,8 @@
 
 #include "latencytop.h"
 
+#define MYDATADIR "/usr/share/latencytop"
+
 GList *lines;
 
 GList *procs;
@@ -495,7 +497,7 @@ int main(int argc, char **argv)
 	int ret = 1;
 	enable_sysctl();
 	if (argc>1 && strcmp(argv[1],"-d")==0) {
-		init_translations("latencytop.trans");
+		init_translations(MYDATADIR "/latencytop.trans");
 		parse_global_list();
 		sort_list();
 		dump_global_to_console();
@@ -508,12 +510,12 @@ int main(int argc, char **argv)
 
 	if (argc>1 && strcmp(argv[1],"--block")==0) {
 		printf("Doing block tracing\n");
-		init_translations("latencytop.block");
+		init_translations(MYDATADIR "/latencytop.block");
 		noui = 1;
 		dump_unknown = 1;
 	}
 	else
-		init_translations("/usr/share/latencytop/latencytop.trans");
+		init_translations(MYDATADIR "/latencytop.trans");
 	
 	initialize_curses();
 	while (ret) {

latencytop-standard-CFLAGS.patch:

--- NEW FILE latencytop-standard-CFLAGS.patch ---
Use standard CFLAGS

From: Michal Schmidt <mschmidt at redhat.com>

_FORTIFY_SOURCE is already in Fedora's default CFLAGS.
---

 src/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/src/Makefile b/src/Makefile
index c75c98e..b183c4d 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2,7 +2,7 @@ DESTDIR =
 SBINDIR = /usr/sbin
 DATADIR = /usr/share
 MANDIR  = /usr/share/man
-XCFLAGS = -W `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare 
+XCFLAGS = -W `pkg-config --cflags glib-2.0` -Wno-sign-compare 
 LDF = -Wl,--as-needed `pkg-config --libs glib-2.0`   -lncursesw 
 
 #


Index: latencytop.spec
===================================================================
RCS file: /cvs/pkgs/rpms/latencytop/F-9/latencytop.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- latencytop.spec	21 Feb 2008 22:05:29 -0000	1.3
+++ latencytop.spec	7 Oct 2008 15:33:37 -0000	1.4
@@ -1,13 +1,16 @@
 Name:           latencytop
-Version:        0.3
-Release:        5%{?dist}
+Version:        0.4
+Release:        2%{?dist}
 Summary:        System latency monitor
 
 Group:          Applications/System
 License:        GPLv2
 URL:            http://www.latencytop.org/
 Source0:        http://www.latencytop.org/download/%{name}-%{version}.tar.gz
-Patch0:         %{name}-standard-cflags.patch
+Patch0:         latencytop-Makefile-fixes.patch
+Patch1:         latencytop-datadir.patch
+Patch2:         latencytop-standard-CFLAGS.patch
+Patch3:         latencytop-0.4-updated-translations.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  ncurses-devel glib2-devel
@@ -20,14 +23,11 @@
 
 %prep
 %setup -q
-%patch -p1
+%patch0 -p2
+%patch1 -p2
+%patch2 -p2
+%patch3 -p2
 
-# Don't look for the translation table in the current directory,
-# it will be installed under /usr/share/latencytop.
-# First make sure the string is there:
-grep 'init_translations("latencytop.trans");' latencytop.c > /dev/null
-# OK, replace it:
-sed -i -e 's#init_translations("latencytop.trans");#init_translations("%{_datadir}/%{name}/latencytop.trans");#' latencytop.c
 
 %build
 export CFLAGS="${CFLAGS:-%{optflags}}"
@@ -36,8 +36,7 @@
 
 %install
 rm -rf %{buildroot}
-install -D -p -m 755 latencytop %{buildroot}/%{_bindir}/latencytop
-install -D -p -m 644 latencytop.trans %{buildroot}/%{_datadir}/%{name}/latencytop.trans
+make install DESTDIR=%{buildroot}
 
 
 %clean
@@ -47,11 +46,18 @@
 %files
 %defattr(-,root,root,-)
 #%doc 
-%{_bindir}/latencytop
+%{_sbindir}/latencytop
 %{_datadir}/%{name}
+%{_mandir}/man8/*
 
 
 %changelog
+* Tue Oct 07 2008 Michal Schmidt <mschmidt at redhat.com> - 0.4-2
+- Add an upstream patch to update the translation table.
+
+* Thu Apr 24 2008 Michal Schmidt <mschmidt at redhat.com> - 0.4-1
+- Upstream release 0.4.
+
 * Wed Feb 20 2008 Michal Schmidt <mschmidt at redhat.com> - 0.3-5
 - Own the data directory.
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/latencytop/F-9/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources	4 Feb 2008 20:16:17 -0000	1.2
+++ sources	7 Oct 2008 15:33:37 -0000	1.3
@@ -1 +1 @@
-3ed2878fb7772e2a500ec71aa01abbb2  latencytop-0.3.tar.gz
+ad8d107699608b024d697c941371bb37  latencytop-0.4.tar.gz


--- latencytop-standard-cflags.patch DELETED ---




More information about the scm-commits mailing list