debian/0000775000000000000000000000000012203166065007171 5ustar debian/changelog0000664000000000000000000000160412203164575011050 0ustar i7z (0.27.2-2ubuntu1) saucy; urgency=low * Merge from debian unstable. Remaining changes: - debian/control: Future-proof by adding x32 to the architecture list -- Jackson Doak Thu, 15 Aug 2013 07:44:30 +1000 i7z (0.27.2-2) unstable; urgency=low * Use canonical Vcs-* URLs. * hyphen-used-as-minus-sign.patch: New. Fix manpage. * fix-insecure-tempfile.patch: New. Fix insecure usage of /tmp/cpufreq.txt. Use popen() instead of a temporary file. (Closes: #718418) -- Andreas Beckmann Thu, 01 Aug 2013 03:16:07 +0200 i7z (0.27.2-1ubuntu1) saucy; urgency=low * Future-proof by adding x32 to the architecture list. -- Adam Conrad Mon, 29 Apr 2013 09:37:19 -0600 i7z (0.27.2-1) unstable; urgency=low * Initial release (Closes: #703060) -- Andreas Beckmann Sat, 16 Mar 2013 21:16:14 +0100 debian/gbp.conf0000664000000000000000000000013212203164575010610 0ustar [git-buildpackage] export-dir = ../build-area/ debian-branch = debian pristine-tar = True debian/patches/0000775000000000000000000000000012203164575010624 5ustar debian/patches/install-i7z_rw_registers.patch0000664000000000000000000000217712203164575016630 0ustar Author: Andreas Beckmann Description: install the i7z_rw_registers script and fix the hashbang Index: i7z/i7z_rw_registers.rb =================================================================== --- i7z.orig/i7z_rw_registers.rb 2013-08-15 07:42:49.797715195 +1000 +++ i7z/i7z_rw_registers.rb 2013-08-15 07:42:49.793715175 +1000 @@ -1,3 +1,5 @@ +#!/usr/bin/ruby + #* ----------------------------------------------------------------------- * # * # * Under GPL v3 @@ -7,7 +9,6 @@ # * # * ----------------------------------------------------------------------- */ -#!/usr/bin/ruby def print_command_list() print "Do you need help? \n" Index: i7z/Makefile =================================================================== --- i7z.orig/Makefile 2013-08-15 07:42:49.797715195 +1000 +++ i7z/Makefile 2013-08-15 07:42:49.793715175 +1000 @@ -61,3 +61,4 @@ install -D -m 755 $(BIN) $(DESTDIR)$(sbindir)$(BIN) install -d $(DESTDIR)$(docdir) install -m 0644 README.txt put_cores_offline.sh put_cores_online.sh MAKEDEV-cpuid-msr $(DESTDIR)$(docdir) + install -m 0755 i7z_rw_registers.rb $(DESTDIR)$(sbindir)/i7z_rw_registers debian/patches/fix-insecure-tempfile.patch0000664000000000000000000000740112203164575016053 0ustar Author: Andreas Beckmann Description: fix insecure temfile usage: /tmp/cpufreq.txt switch from system() + fopen() to popen() disable other insecure tempfiles that may be generated but not used Bug-Debian: http://bugs.debian.org/718418 Index: i7z/GUI/i7z_GUI.cpp =================================================================== --- i7z.orig/GUI/i7z_GUI.cpp 2013-08-15 07:42:57.277752286 +1000 +++ i7z/GUI/i7z_GUI.cpp 2013-08-15 07:42:57.273752266 +1000 @@ -171,18 +171,17 @@ //CPUINFO is wrong for i7 but correct for the number of physical and logical cores present //If Hyperthreading is enabled then, multiple logical processors will share a common CORE ID //http://www.redhat.com/magazine/022aug06/departments/tips_tricks/ - system ("cat /proc/cpuinfo |grep MHz|sed 's/cpu\\sMHz\\s*:\\s//'|tail -n 1 > /tmp/cpufreq.txt"); - system ("grep \"core id\" /proc/cpuinfo |sort -|uniq -|wc -l > /tmp/numPhysical.txt"); - system ("grep \"processor\" /proc/cpuinfo |sort -|uniq -|wc -l > /tmp/numLogical.txt"); + //system ("grep \"core id\" /proc/cpuinfo |sort -|uniq -|wc -l > /tmp/numPhysical.txt"); + //system ("grep \"processor\" /proc/cpuinfo |sort -|uniq -|wc -l > /tmp/numLogical.txt"); - //Open the parsed cpufreq file and obtain the cpufreq from /proc/cpuinfo + // obtain the cpufreq from /proc/cpuinfo FILE *tmp_file; - tmp_file = fopen ("/tmp/cpufreq.txt", "r"); + tmp_file = popen ("sed -n '/MHz/ { s/cpu\\sMHz\\s*:\\s//p; q }' /proc/cpuinfo", "r"); char tmp_str[30]; fgets (tmp_str, 30, tmp_file); + pclose (tmp_file); double cpu_freq_cpuinfo = atof (tmp_str); - fclose (tmp_file); unsigned int numPhysicalCores, numLogicalCores; numPhysicalCores = socket_0.num_physical_cores + socket_1.num_physical_cores; Index: i7z/helper_functions.c =================================================================== --- i7z.orig/helper_functions.c 2013-08-15 07:42:57.277752286 +1000 +++ i7z/helper_functions.c 2013-08-15 07:42:57.273752266 +1000 @@ -531,16 +531,13 @@ //CPUINFO is wrong for i7 but correct for the number of physical and logical cores present //If Hyperthreading is enabled then, multiple logical processors will share a common CORE ID //http://www.redhat.com/magazine/022aug06/departments/tips_tricks/ - system - ("cat /proc/cpuinfo |grep MHz|sed 's/cpu\\sMHz\\s*:\\s//'|tail -n 1 > /tmp/cpufreq.txt"); - - //Open the parsed cpufreq file and obtain the cpufreq from /proc/cpuinfo + // obtain the cpufreq from /proc/cpuinfo FILE *tmp_file; - tmp_file = fopen ("/tmp/cpufreq.txt", "r"); + tmp_file = popen ("sed -n '/MHz/ { s/cpu\\sMHz\\s*:\\s//p; q }' /proc/cpuinfo", "r"); char tmp_str[30]; fgets (tmp_str, 30, tmp_file); - fclose (tmp_file); + pclose (tmp_file); return atof(tmp_str); } Index: i7z/i7z_Single_Socket.c =================================================================== --- i7z.orig/i7z_Single_Socket.c 2013-08-15 07:42:57.277752286 +1000 +++ i7z/i7z_Single_Socket.c 2013-08-15 07:42:57.273752266 +1000 @@ -823,10 +823,13 @@ //CPUINFO is wrong for i7 but correct for the number of physical and logical cores present //If Hyperthreading is enabled then, multiple logical processors will share a common CORE ID //http://www.redhat.com/magazine/022aug06/departments/tips_tricks/ +ERROR INSECURE TMPFILE system ("cat /proc/cpuinfo |grep MHz|sed 's/cpu\\sMHz\\s*:\\s//'|tail -n 1 > /tmp/cpufreq.txt"); +ERROR INSECURE TMPFILE system ("grep \"core id\" /proc/cpuinfo |sort -|uniq -|wc -l > /tmp/numPhysical.txt"); +ERROR INSECURE TMPFILE system ("grep \"processor\" /proc/cpuinfo |sort -|uniq -|wc -l > /tmp/numLogical.txt"); //At this step, /tmp/numPhysical contains number of physical cores in machine and debian/patches/hyphen-used-as-minus-sign.patch0000664000000000000000000000512212203164575016566 0ustar Author: Andreas Beckmann Description: fix hyphen abuse Index: i7z/doc/i7z.man =================================================================== --- i7z.orig/doc/i7z.man 2013-08-15 07:42:55.025741119 +1000 +++ i7z/doc/i7z.man 2013-08-15 07:42:55.025741119 +1000 @@ -7,15 +7,15 @@ i7z runs the i7z, ncurses based, program without any options. i7z will print out the C-states and temperature for i3, i5 and i7 based Core processors from Intel (including Nehalems, Sandy Bridge and Ivy Bridge). .SH OPTIONS .TP -\fB-h, --help \fPshow the list of options available with the i7z tool. +\fB\-h, \-\-help \fPshow the list of options available with the i7z tool. .TP -\fB-w [a|l], --write [a,l] \fPLogging of the frequencies can be turned on with this options. Option "-w a" or "--write a" will append to the log file. Option "-w l" or "--write l" will replace the log file. +\fB\-w [a|l], \-\-write [a,l] \fPLogging of the frequencies can be turned on with this options. Option "\-w a" or "\-\-write a" will append to the log file. Option "\-w l" or "\-\-write l" will replace the log file. .TP -\fB-l, --logfile [FILENAME] \fPChange the log file name to the specified FILENAME. Default logging file is cpu_freq_log.txt (single socket) or cpu_freq_log_dual%d.txt (dual socket, %d is either 0, 1). +\fB\-l, \-\-logfile [FILENAME] \fPChange the log file name to the specified FILENAME. Default logging file is cpu_freq_log.txt (single socket) or cpu_freq_log_dual%d.txt (dual socket, %d is either 0, 1). .TP -\fB--socket0 [SOCKETNUM], --socket1 [SOCKETNUM] \fPThe tool can print information for about 2 sockets at once at the most. The top view will be, by default, of the first socket (controlled by --socket0) and the bottom view will be of the second socket (controlled by --socket1). Supply the appropriate value of 0 or 1 or more for SOCKETNUM (if there are more sockets on the machine) to show in the top and bottom view. +\fB\-\-socket0 [SOCKETNUM], \-\-socket1 [SOCKETNUM] \fPThe tool can print information for about 2 sockets at once at the most. The top view will be, by default, of the first socket (controlled by \-\-socket0) and the bottom view will be of the second socket (controlled by \-\-socket1). Supply the appropriate value of 0 or 1 or more for SOCKETNUM (if there are more sockets on the machine) to show in the top and bottom view. .TP -\fB--nogui \fPDisable the GUI. Useful when the only need is logging. +\fB\-\-nogui \fPDisable the GUI. Useful when the only need is logging. .SH Example To print for two sockets and also change the log file (log to /tmp/logfilei7z) debian/patches/series0000664000000000000000000000013312203164575012036 0ustar install-i7z_rw_registers.patch hyphen-used-as-minus-sign.patch fix-insecure-tempfile.patch debian/copyright0000664000000000000000000000546112203164575011136 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: i7z Source: http://code.google.com/p/i7z/downloads/list Files: * Copyright: 2009-2012 Abhishek Jaiantilal License: GPL-2.0 Files: helper_functions.c Copyright: Copyright 2000 Transmeta Corporation - All Rights Reserved 2009-2012 Abhishek Jaiantilal License: GPL-2.0+ Files: i7z_rw_registers.rb Copyright: 2011-2012 Abhishek Jaiantilal License: GPL-3.0 Files: debian/* Copyright: © 2013 Andreas Beckmann License: GPL-2.0+ License: GPL-2.0 This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. . This package 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 along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". License: GPL-2.0+ This package 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 of the License, or (at your option) any later version. . This package 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 along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". License: GPL-3.0 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. . This package 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 along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". debian/source/0000775000000000000000000000000012203164575010475 5ustar debian/source/format0000664000000000000000000000001412203164575011703 0ustar 3.0 (quilt) debian/control0000664000000000000000000000301012203164575010572 0ustar Source: i7z Section: admin Priority: extra Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Andreas Beckmann Build-Depends: debhelper (>= 9), libncurses5-dev, libqt4-dev, gdb, Standards-Version: 3.9.4 Homepage: http://code.google.com/p/i7z/ Vcs-Git: git://anonscm.debian.org/collab-maint/i7z.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/i7z.git;a=summary Package: i7z Architecture: amd64 i386 x32 Depends: msr-tools, ruby | ruby-interpreter, ${shlibs:Depends}, ${misc:Depends} Description: reporting tool for i7, i5, i3 CPUs i7z reports Intel Core i7, i5, i3 CPU information about Turbo Boost, frequencies, multipliers, ... and comes top-like display showing per core the current frequency, temperature and times spent in the C0/C1/C3/C6/C7 states. . There is also an i7z_rw_registers script that allows toggling Turbo mode or set multipliers. Package: i7z-gui Architecture: amd64 i386 x32 Depends: ${shlibs:Depends}, ${misc:Depends} Description: GUI for i7z, a reporting tool for i7, i5, i3 CPUs i7z reports Intel Core i7, i5, i3 CPU information about Turbo Boost, frequencies, multipliers, ... and comes top-like display showing per core the current frequency, temperature and times spent in the C0/C1/C3/C6/C7 states. . This package contains the QT gui for i7z. . Note: For sandybridge and ivybridge, it incorrectly adds C7 state values to the C0 state, so it does report things incorrectly; use the console version as its up to date. debian/i7z.docs0000664000000000000000000000006412203164575010560 0ustar README.txt put_cores_offline.sh put_cores_online.sh debian/i7z.install0000664000000000000000000000010012203164575011265 0ustar usr/sbin/i7z usr/sbin/i7z_rw_registers usr/share/man/man1/i7z.1 debian/rules0000775000000000000000000000055012203164575010255 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS %: dh $@ override_dh_auto_build: dh_auto_build cd GUI && qmake $(MAKE) -C GUI override_dh_auto_clean: dh_auto_clean [ ! -f GUI/Makefile ] || $(MAKE) -C GUI clean mocclean $(RM) GUI/Makefile debian/i7z-gui.install0000664000000000000000000000002612203164575012056 0ustar GUI/i7z_GUI usr/sbin/ debian/compat0000664000000000000000000000000212203164575010373 0ustar 9 debian/watch0000664000000000000000000000017512203164575010231 0ustar version=3 http://code.google.com/p/i7z/downloads/list?can=1 .*/i7z-(\d[\d.]*)\.(?:zip|tgz|tbz2|txz|tar\.gz|tar\.bz2|tar\.xz)