--- glcpu-1.0.1.orig/Makefile +++ glcpu-1.0.1/Makefile @@ -4,9 +4,10 @@ OBJSSTATD = statd.o cpu.o CCFLAGS = $(CFLAGS) CCFLAGS += -D_GNU_SOURCE -ansi -Wall -DOS_$(shell uname) -I/usr/X11R6/include +CCFLAGS += -I$(shell ccgnu2-config --includes) # CommonC++ headers fail -pedantic checking -LIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -DLIBS = -lccgnu -lGL -lGLU -lglut -lpthread +LIBS = +DLIBS = -lccgnu2 -lglut SLIBS = -ldl /usr/lib/libccgnu.a /usr/lib/libpthread.a /usr/lib/libglut.a /usr/lib/libGL.a /usr/lib/libGLU.a PREFIX = /usr/local @@ -33,10 +34,10 @@ install: install-glcpu install-statd install-glcpu: glcpu - install -d 755 -o root -g root ${PREFIX}/bin + install -d -o root -g root ${PREFIX}/bin install -m 755 -o root -g root glcpu ${PREFIX}/bin install-statd: statd - install -d 755 -o root -g root ${PREFIX}/sbin + install -d -o root -g root ${PREFIX}/sbin install -m 755 -o root -g root statd ${PREFIX}/sbin --- glcpu-1.0.1.orig/parser.cc +++ glcpu-1.0.1/parser.cc @@ -93,22 +93,22 @@ switch (state) { case 0: // leading space if (!isspace(*i)) { - tmp.append(*i, 1); + tmp.push_back(*i); state = 1; } break; case 1: // keyname if (*i == '=') { - tmp.append(*i, 1); + tmp.push_back(*i); state = 2; } else if (!isspace(*i)) - tmp.append(*i, 1); + tmp.push_back(*i); else state = 6; break; case 6: // after space after keyname if (*i == '=') { - tmp.append(*i, 1); + tmp.push_back(*i); state = 2; } else if (isspace(*i)) throw(string("illegal space in key name")); @@ -118,7 +118,7 @@ if (*i == '"') state = 4; else if (!isspace(*i)) { - tmp.append(*i, 1); + tmp.push_back(*i); state = 3; } break; @@ -128,14 +128,14 @@ else if (isspace(*i)) state = 5; else - tmp.append(*i, 1); + tmp.push_back(*i); break; case 4: // inside quoted value if (*i == '"') state = 5; else - tmp.append(*i, 1); + tmp.push_back(*i); break; case 5: // after value if (!isspace(*i)) @@ -145,6 +145,6 @@ } if (state != 5 && state != 3) throw(string("unexpected end of line")); - + return tmp; } --- glcpu-1.0.1.orig/main.cc +++ glcpu-1.0.1/main.cc @@ -20,7 +20,7 @@ **/ #include -#include +#include #include #include #include @@ -51,7 +51,7 @@ const int SIZE = 300; const int UPDATE_DELAY = 250; const double TRANS_FACTOR = 0.75; -const string REVISION = "DR6"; +const string REVISION = "1.0.1"; /** ** Global variables. @@ -557,7 +557,7 @@ int parse_int(string v) { - istrstream tmp1(v.c_str()); + istringstream tmp1(v.c_str()); int tmp2; tmp1 >> tmp2; return tmp2; @@ -569,7 +569,7 @@ double parse_double(string v) { - istrstream tmp1(v.c_str()); + istringstream tmp1(v.c_str()); double tmp2; tmp1 >> tmp2; return tmp2; --- glcpu-1.0.1.orig/parser.h +++ glcpu-1.0.1/parser.h @@ -26,9 +26,9 @@ class Parser { private: - static void parse_line(string /* line */, unsigned /* line number */, + static void parse_line(std::string /* line */, unsigned /* line number */, Config*); - static string subparse_line(string); + static std::string subparse_line(std::string); public: static Config* parse(string /* filename */); --- glcpu-1.0.1.orig/statd.1 +++ glcpu-1.0.1/statd.1 @@ -14,5 +14,5 @@ daemon runs in every machine to be monitored and has nothing to do with the RPC statd portmapper daemon present in many systems. .SH AUTHOR -This manual page was written by Jakob Borg and David Martínez Moreno +This manual page was written by Jakob Borg and David Martinez Moreno for the Debian GNU/Linux system (but may be used by others). --- glcpu-1.0.1.orig/debian/control +++ glcpu-1.0.1/debian/control @@ -0,0 +1,26 @@ +Source: glcpu +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: David Martínez Moreno +Priority: optional +Standards-Version: 3.6.2 +Section: x11 +Build-Depends: libcommoncpp2-dev, freeglut3-dev, debhelper + +Package: glcpu +Section: x11 +Architecture: any +Depends: ${shlibs:Depends}, netbase +Suggests: statd +Description: 3D-plotter for system activity + GLcpu can monitor any number of hosts over a network, using very little + bandwidth and plot their CPU activity in 3D. + +Package: statd +Section: net +Architecture: any +Depends: ${shlibs:Depends}, netbase, update-inetd, openbsd-inetd | inet-superserver +Description: data collection daemon for GLcpu + This is a small daemon run from inetd, to collect data + for glcpu(1). It needs to be installed on all hosts to be monitored. + . + This package has nothing to do with the rpc.statd daemon. --- glcpu-1.0.1.orig/debian/rules +++ glcpu-1.0.1/debian/rules @@ -0,0 +1,77 @@ +#!/usr/bin/make -f +# GNU Copyright 2002 by David Martínez Moreno . + +# Do you want verbosity...? Uncomment this. +#export DH_VERBOSE=1 + +# We set up the right flags. +CFLAGS = -Wall -g -pipe + +# We have to honor DEB_BUILD... +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +CFLAGS += -O0 +else +CFLAGS += -O2 +endif + +export CFLAGS + +configure: configure-stamp + +configure-stamp: + dh_testdir + + touch configure-stamp + +build: configure-stamp build-stamp +build-stamp: + dh_testdir + + $(MAKE) + + touch build + +install: build + dh_testdir + dh_testroot + dh_clean + dh_installdirs + + $(MAKE) install PREFIX=$(CURDIR)/debian/tmp/usr + + dh_movefiles + +binary: binary-arch binary-indep + +binary-indep: +# Nothing to do here + +binary-arch: build install +# glcpu + dh_testdir + dh_testroot + + dh_installdocs -a + dh_installman -a + dh_installchangelogs CHANGES -a + dh_strip -a + dh_link -a + dh_compress -a + dh_fixperms -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +clean: + dh_testdir + dh_testroot + + rm -f build-stamp configure-stamp + rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars + -$(MAKE) clean + + dh_clean + +.PHONY: build clean binary-indep binary-arch binary install configure --- glcpu-1.0.1.orig/debian/statd.files +++ glcpu-1.0.1/debian/statd.files @@ -0,0 +1 @@ +usr/sbin/* --- glcpu-1.0.1.orig/debian/statd.prerm +++ glcpu-1.0.1/debian/statd.prerm @@ -0,0 +1,13 @@ +#!/bin/sh +#DEBHELPER# + +update-inetd --disable 7687 + +if [ -x /etc/init.d/inetd ]; then + if [ -x /usr/sbin/invoke-rc.d ] ; then + invoke-rc.d inetd reload + else + /etc/init.d/inetd reload + fi +fi + --- glcpu-1.0.1.orig/debian/changelog +++ glcpu-1.0.1/debian/changelog @@ -0,0 +1,245 @@ +glcpu (1.0.1-6.2ubuntu2) feisty; urgency=low + + * Rebuild against newer libcommoncpp. + * Set Ubuntu maintainer. + + -- Martin Pitt Fri, 9 Mar 2007 13:45:39 +0100 + +glcpu (1.0.1-6.2ubuntu1) feisty; urgency=low + + * debian/control: Add update-inetd to statd's dependencies + (Closes Ubuntu: #76098). + * debian/control: Add openbsd-inetd | inet-superserver dependencies + as statd needs an inet server to work + + -- Lionel Porcheron Sun, 17 Dec 2006 10:50:32 +0100 + +glcpu (1.0.1-6.2) unstable; urgency=low + + * NMU + * Don't invoke directy init.d script, use invoke-rc.d (Closes: #361372) + + -- Julien Danjou Fri, 21 Apr 2006 14:12:18 +0200 + +glcpu (1.0.1-6.1) unstable; urgency=medium + + * Non-maintainer upload. + * Remove indirectly used libraries from the link line, as discussed in + . + Closes: #337246. + + -- Matej Vela Sat, 28 Jan 2006 18:24:36 +0100 + +glcpu (1.0.1-6) unstable; urgency=low + + * Rebuild with modern build environment (closes: #315360). + * debian/control: + - Replaces libglut3-dev by freeglut3-dev, the library that replaced the + former. + - Bump Standards-Version to 3.6.2. + - Added Depends on netbase for glcpu and statd, as they use update-inetd. + - Removed xlibs-dev from build-dependencies. It is going to be removed. + - Removed versioned dependency on debhelper, as the already minimum + version in oldstable is 4.0.2. + - Updated FSF's address. + * Fixed extended characters (in my surname) in the manpages. + + -- David Martínez Moreno Thu, 3 Nov 2005 04:04:22 +0100 + +glcpu (1.0.1-5) unstable; urgency=low + + * Acknowledge NMU (closes: #251515). + * debian/control: + - Bump Standards-Version to 3.6.1. + - Touch a little the short descriptions. + * debian/rules: Adjusted CFLAGS assignment due to DEB_BUILD_OPTIONS (-g is + valid in any case). + + -- David Martínez Moreno Thu, 12 Aug 2004 12:57:17 +0200 + +glcpu (1.0.1-4.1) unstable; urgency=low + + * Non-maintainer upload. + * debian/control: Added xlibs-dev to Build-Depends (Closes: #251515). + + -- Roland Stigge Sat, 19 Jun 2004 14:15:39 +0200 + +glcpu (1.0.1-4) unstable; urgency=low + + * Removed gxx-3.2 from Build-Depends (closes: #236436). + * Recodified all the files under debian/ to UTF-8. + * Bumped Standards-Version to 3.6.0. + + -- David Martínez Moreno Tue, 6 Apr 2004 14:55:01 +0200 + +glcpu (1.0.1-3) unstable; urgency=low + + * Applied patch for correctly building glcpu with gcc-3.2 (thanks to nice + guy Guillem Jover). Closes: #173408, #173474. + * debian/control: Changed g++ to g++-3.2 in Build-Depends. Renamed glutg3-dev + to libglut3-dev, and removed xlibs-dev due to libglut3-dev depending on + it. Thanks to Ricardo Javier Cárdenes for pointing to libcommoncpp2-dev in + the Build-Depends. + + -- David Martínez Moreno Sun, 23 Mar 2003 16:34:37 +0100 + +glcpu (1.0.1-2) unstable; urgency=low + + * Argh. Reverted changes from Jeronimo Pellegrini, because g++-3.x + refuses to build parser.cc with them. Thanks to hppa autobuilders. + * debian/control: Bumped dependencies to debhelper v4 (and this time please + uncomment DH_COMPAT, man!). Closes: #173474. Also Build-Depends on + g++-3.2. Rewrote description. + + -- David Martínez Moreno Wed, 18 Dec 2002 01:20:40 +0100 + +glcpu (1.0.1-1) unstable; urgency=low + + * New upstream release. I've splitted GLcpu in a .tar.gz and a .diff.gz, and + incorporated the debian manpages to the upstream tarball. + * Rewritten from scratch debian/rules. Debhelper-ized it (at last!). Now + every target from debian/rules made their work (closes: #118358). + * statd.{prerm,postinst}: Added #!/bin/sh and removed fixed creation of + /usr/doc symlink (closes: #168612). + * Added nice patch from Jeronimo Pellegrini for really parsing the + arguments. Jeronimo, this was not reported because glcpu was in really bad + shape before I took it. This change was introduced by LaMont's NMU. :-? + Closes: #168611. + * debian/control: Bumped Standards-Version to 3.5.8. + * debian/rules: Changed debug to noopt to comply with Policy 3.5.8. + + -- David Martínez Moreno Tue, 17 Dec 2002 02:18:38 +0100 + +glcpu (1.0-dr8-4) unstable; urgency=low + + * Argh. Forgot to replace Jakob's name in debian/control. Now is correct. + * Let's close all this ugly-looking 'fixed' bugs. Closes: #119903, #143034, + #143876, #158229, #163330. + * debian/control: Bumped Standards-Version to 3.5.6. Let's see before if + we're breaking the law... :-) Also added debhelper and g++ to + Build-Depends. + * debian/statd.1, debian/glcpu.1: Clarified the use and need of statd + (closes: #130622). + * Bernd Eckenfels reported #82761 but I cannot reproduce it. Also there's a + remark from the previous maintainer that an update could fix the bug. + Could you try? If I don't get an answer, I'll close this bug. + * The debian/rules is a complete mess. I will replace it with a + debhelperized one in sucessive uploads. :-) #118358 will have to wait. + + -- David Martínez Moreno Mon, 4 Nov 2002 20:40:04 +0100 + +glcpu (1.0-dr8-3) unstable; urgency=low + + * Taking over the package. New maintainer, with permission from Jakob Borg. + * Rebuilt with newer libcommonc++-dev (closes: #143034, #143876, #158229, #163330). + * Acknowledged NMU from LaMont (closes: #119903). + * Created TODO.Debian. + + -- David Martínez Moreno Wed, 30 Oct 2002 00:19:56 +0100 + +glcpu (1.0-dr8-2) unstable; urgency=low + + * Fixed spelling error in description. Closes: #125400. + + -- Jakob Borg Wed, 28 Jan 2002 17:36:00 +0100 + +glcpu (1.0-dr8-1.1) unstable; urgency=low + + * NMU + * Fix g++ 3.0 errors. + * Re-link. Closes: #119903. + + -- LaMont Jones Sun, 6 Jan 2002 22:02:38 -0700 + +glcpu (1.0-dr8-1) unstable; urgency=low + + * Added inclusion of math header to main.cc. Doh! Closes: #118357. + + -- Jakob Borg Wed, 7 Nov 2001 10:29:14 +0100 + +glcpu (1.0-dr7-1) unstable; urgency=low + + * A few changes to statd that hopefully fixes a bug. + * Descriptions fixed long ago but bug never closed. Closes: #85176. + * Recompile done but bug never closed there either. Bad maintainer! + Closes: #103252. + + -- Jakob Borg Sat, 3 Nov 2001 15:17:38 +0100 + +glcpu (1.0-dr6-7) unstable; urgency=low + + * Fixed build-depends. + * Fixed section. + + -- Jakob Borg Thu, 12 Jul 2001 10:12:47 +0200 + +glcpu (1.0-dr6-6) unstable; urgency=low + + * New release to be compatible with new libcommonc++, again. + + -- Jakob Borg Thu, 5 Jul 2001 23:31:39 +0200 + +glcpu (1.0-dr6-5) unstable; urgency=low + + * New release to be compatible with new libcommonc++, closes: #103092. + + -- Jakob Borg Mon, 2 Jul 2001 14:09:02 +0200 + +glcpu (1.0-dr6-4) unstable; urgency=low + + * Added more bould-deps, closes: #89423. + + -- Jakob Borg Tue, 13 Mar 2001 20:56:15 +0100 + +glcpu (1.0-dr6-3) unstable; urgency=low + + * Added build-deps, closes: #87054. + * Changed package descriptions, closes: #75498 #85176. + * Removed glcpurc.sample from statd, closes: #85068. + + -- Jakob Borg Tue, 13 Mar 2001 20:56:05 +0100 + +glcpu (1.0-dr6-2) unstable; urgency=low + + * Updated to work with XFree86 4. + * Changed architecture specs (closes: Bug#76391) + + -- Jakob Borg Sat, 28 Oct 2000 09:17:54 +0200 + +glcpu (1.0-dr6-1) unstable; urgency=low + + * Added dependency on netkit-inetd to statd package (closes: Bug#75803). + * Removed need for destination alpha. (closes: Bug#75837). + + -- Jakob Borg Sat, 28 Oct 2000 09:17:54 +0200 + +glcpu (1.0-dr5-2) unstable; urgency=low + + * Removed dependency on utah-glx (closes: Bug#75743). + + -- Jakob Borg Sat, 28 Oct 2000 09:17:54 +0200 + +glcpu (1.0-dr5-1) unstable; urgency=low + + * Minor bugfixes only. + + -- Jakob Borg Wed, 25 Oct 2000 23:20:50 +0200 + +glcpu (1.0-dr4-3) unstable; urgency=low + + * Added dependency on utah-glx. + + -- Jakob Borg Wed, 25 Oct 2000 19:25:14 +0200 + +glcpu (1.0-dr4-2) unstable; urgency=low + + * Fixed incorrect library dependency (libcommonc++1). + + -- Jakob Borg Sat, 21 Oct 2000 12:49:10 +0200 + +glcpu (1.0-dr4) unstable; urgency=low + + * First debian package + + -- Jakob Borg Mon, 16 Oct 2000 01:55:29 +0200 + --- glcpu-1.0.1.orig/debian/statd.postinst +++ glcpu-1.0.1/debian/statd.postinst @@ -0,0 +1,12 @@ +#!/bin/sh +#DEBHELPER# + +update-inetd --group INFO --add '7687\t\tstream\ttcp\tnowait\troot\t/usr/sbin/tcpd\t/usr/sbin/statd' + +if [ -x /etc/init.d/inetd ]; then + if [ -x /usr/sbin/invoke-rc.d ] ; then + invoke-rc.d inetd reload + else + /etc/init.d/inetd reload + fi +fi --- glcpu-1.0.1.orig/debian/statd.manpages +++ glcpu-1.0.1/debian/statd.manpages @@ -0,0 +1 @@ +statd.1 --- glcpu-1.0.1.orig/debian/glcpu.manpages +++ glcpu-1.0.1/debian/glcpu.manpages @@ -0,0 +1 @@ +glcpu.1 --- glcpu-1.0.1.orig/debian/compat +++ glcpu-1.0.1/debian/compat @@ -0,0 +1 @@ +4 --- glcpu-1.0.1.orig/debian/glcpu.files +++ glcpu-1.0.1/debian/glcpu.files @@ -0,0 +1 @@ +usr/bin/* --- glcpu-1.0.1.orig/debian/glcpu.dirs +++ glcpu-1.0.1/debian/glcpu.dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/man/man1 --- glcpu-1.0.1.orig/debian/glcpu.docs +++ glcpu-1.0.1/debian/glcpu.docs @@ -0,0 +1 @@ +glcpurc.sample --- glcpu-1.0.1.orig/debian/copyright +++ glcpu-1.0.1/debian/copyright @@ -0,0 +1,17 @@ +Program Copyright (C) 2000 Jakob Borg + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License with +your Debian GNU/Linux system, in /usr/share/common-licenses/GPL, or with +the Debian GNU/Linux hello source package as the file COPYING. If not, +write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +Boston, MA 02110-1301, USA. --- glcpu-1.0.1.orig/glcpu.1 +++ glcpu-1.0.1/glcpu.1 @@ -26,5 +26,5 @@ .B .glcpurc User configuration file. All configuration of glcpu is done here. See glcpurc.sample in the documentation directory for more info. .SH AUTHOR -This manual page was written by Jakob Borg and David Martínez Moreno , +This manual page was written by Jakob Borg and David Martinez Moreno , for the Debian GNU/Linux system (but may be used by others).