[38259] branches/gsoc08-logging

dpemmons at macports.org dpemmons at macports.org
Sun Jul 13 22:13:47 PDT 2008


Revision: 38259
          http://trac.macosforge.org/projects/macports/changeset/38259
Author:   dpemmons at macports.org
Date:     2008-07-13 22:13:47 -0700 (Sun, 13 Jul 2008)
Log Message:
-----------
minor changes to the xml schema in MPLog.pm
added the first version of a database schema for storing logs on a central server

Modified Paths:
--------------
    branches/gsoc08-logging/mplog/MPLog.pm

Added Paths:
-----------
    branches/gsoc08-logging/mplog/readme.txt
    branches/gsoc08-logging/server/readme.txt
    branches/gsoc08-logging/server/schema.sql

Removed Paths:
-------------
    branches/gsoc08-logging/server/info.txt

Modified: branches/gsoc08-logging/mplog/MPLog.pm
===================================================================
--- branches/gsoc08-logging/mplog/MPLog.pm	2008-07-14 04:48:00 UTC (rev 38258)
+++ branches/gsoc08-logging/mplog/MPLog.pm	2008-07-14 05:13:47 UTC (rev 38259)
@@ -11,9 +11,10 @@
 sub new {
 	my $class = shift;
 	my $self = {
-		"logtype" => {
+		"meta" => {
 			name	=> 'macports log file',
 			version	=> '0.1',
+			created => '',		# date
 		},
 		"system" => {
 			"OSVersion"	=> {
@@ -40,15 +41,21 @@
 				path		=> '',
 				confWith	=> {},	# configuration settings when gcc was built
 				threadModel	=> '',
-				version		=> 0,
+				versionMajor	=> 0,
+				versionMinor	=> 0,
+				versionPoint	=> 0,
 				versionInfo	=> ''
 			},
 			"perl"		=> {
-				version		=> 0,
+				versionMajor	=> 0,
+				versionMinor	=> 0,
+				versionPoint	=> 0,
 				path		=> ''
 			},
 			"macports"	=> {
-				version		=> 0,
+				versionMajor	=> 0,
+				versionMinor	=> 0,
+				versionPoint	=> 0,
 			}
 		},
 		"command" => {
@@ -114,4 +121,4 @@
 	return;
 }
 
-1;
\ No newline at end of file
+1;

Added: branches/gsoc08-logging/mplog/readme.txt
===================================================================
--- branches/gsoc08-logging/mplog/readme.txt	                        (rev 0)
+++ branches/gsoc08-logging/mplog/readme.txt	2008-07-14 05:13:47 UTC (rev 38259)
@@ -0,0 +1,14 @@
+mplog is a command line program that will be able to:
+
+	run an arbitrary port(1) command,
+	collect its output
+	parse the ouput to find error codes, etc.
+	save that output locally to an XML-based log file, which includes information about the system the command was run on
+	(optionally) submit the XML log file to a central server
+
+or, with different commandline flags:
+	submit a locally saved XML log file to the central server
+
+
+mplog.pl is the main program,
+MPLog.pm is a class that builds the XML log file

Deleted: branches/gsoc08-logging/server/info.txt
===================================================================
--- branches/gsoc08-logging/server/info.txt	2008-07-14 04:48:00 UTC (rev 38258)
+++ branches/gsoc08-logging/server/info.txt	2008-07-14 05:13:47 UTC (rev 38259)
@@ -1,14 +0,0 @@
-This is a simple xml-rpc server for testing log submissions.  It's written in Perl and requires RPC::XML::Server and Digest::SHA.  It will run on localhost:8822.
-
-XML-RPC Client.app is a nice little XML-RPC testing app from:
-http://ditchnet.org/xmlrpc/
-
-The submission process on the client side works kinda like this:
-
-$salt = logging.login.getSalt($myUserName);
-$passwordHash = sha256_hex($myUserName.$myPassword.$salt);
-$sessionID = logging.login.getSessionID($myUserName,$passwordHash);
-
-## now the sessionID can be used for any other operations, like:
-
-logging.log.submit($sessionID, $portName, $log);
\ No newline at end of file

Copied: branches/gsoc08-logging/server/readme.txt (from rev 38257, branches/gsoc08-logging/server/info.txt)
===================================================================
--- branches/gsoc08-logging/server/readme.txt	                        (rev 0)
+++ branches/gsoc08-logging/server/readme.txt	2008-07-14 05:13:47 UTC (rev 38259)
@@ -0,0 +1,18 @@
+This is a simple xml-rpc server for testing log submissions.  It's written in Perl and requires RPC::XML::Server and Digest::SHA.  By default it will run on localhost:8822.
+
+XML-RPC Client.app is a nice little XML-RPC testing app from:
+http://ditchnet.org/xmlrpc/
+
+The submission process on the client side works kinda like this:
+
+$salt = logging.login.getSalt($myUserName);
+$passwordHash = sha256_hex($myUserName.$myPassword.$salt);
+$sessionID = logging.login.getSessionID($myUserName,$passwordHash);
+
+## now the sessionID can be used for any other operations, like:
+
+logging.log.submit($sessionID, $portName, $log);
+
+
+
+Soon this server will parse incoming xml logs and save the values to a mysql server for fast and easy analysis by another set of scripts.

Added: branches/gsoc08-logging/server/schema.sql
===================================================================
--- branches/gsoc08-logging/server/schema.sql	                        (rev 0)
+++ branches/gsoc08-logging/server/schema.sql	2008-07-14 05:13:47 UTC (rev 38259)
@@ -0,0 +1,58 @@
+
+CREATE TABLE IF NOT EXISTS `submissions` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `username` varchar(20) NOT NULL,
+  `received` timestamp NOT NULL default CURRENT_TIMESTAMP,
+  `meta_version` varchar(10) NOT NULL,
+  `meta_created` datetime NOT NULL,
+  `system_OSVersion_major` tinyint(3) unsigned NOT NULL,
+  `system_OSVersion_minor` tinyint(3) unsigned NOT NULL,
+  `system_OSVersion_point` tinyint(3) unsigned NOT NULL,
+  `system_OSVersion_build` int(10) unsigned NOT NULL,
+  `system_OSVersion_kernel_major` tinyint(3) unsigned NOT NULL,
+  `system_OSVersion_kernel_minor` tinyint(3) unsigned NOT NULL,
+  `system_OSVersion_kernel_point` tinyint(3) unsigned NOT NULL,
+  `system_hardware_CPU_type` varchar(30) NOT NULL,
+  `system_hardware_RAM_M` int(10) unsigned NOT NULL,
+  `system_hardware_HDsizeM` int(10) unsigned NOT NULL,
+  `system_hardware_HDfreeM` int(10) unsigned NOT NULL,
+  `system_tcl_version_major` tinyint(3) unsigned NOT NULL,
+  `system_tcl_version_minor` tinyint(3) unsigned NOT NULL,
+  `system_tcl_path` varchar(100) NOT NULL,
+  `system_gcc_target` varchar(100) NOT NULL,
+  `system_gcc_path` varchar(100) NOT NULL,
+  `system_gcc_confWith` text NOT NULL,
+  `system_gcc_threadModel` varchar(100) NOT NULL,
+  `system_gcc_version_major` tinyint(3) unsigned NOT NULL,
+  `system_gcc_version_minor` tinyint(3) unsigned NOT NULL,
+  `system_gcc_version_point` tinyint(3) unsigned NOT NULL,
+  `system_gcc_version_info` varchar(100) NOT NULL,
+  `system_perl_version_major` tinyint(3) unsigned NOT NULL,
+  `system_perl_version_minor` tinyint(3) unsigned NOT NULL,
+  `system_perl_version_point` tinyint(3) unsigned NOT NULL,
+  `system_perl_version_path` varchar(100) NOT NULL,
+  `system_macports_versionMajor` tinyint(3) unsigned NOT NULL,
+  `system_macports_versionMinor` tinyint(3) unsigned NOT NULL,
+  `system_macports_versionPoint` tinyint(3) unsigned NOT NULL,
+  `command_text` varchar(100) NOT NULL,
+  `command_type` varchar(16) NOT NULL,
+  `command_verbose` varchar(5) NOT NULL,
+  `target_name` varchar(40) NOT NULL COMMENT 'the port the user attempted to install',
+  `target_failureInfo_type` varchar(40) NOT NULL,
+  `target_failureInfo_description` text NOT NULL,
+  `target_putput` mediumtext NOT NULL,
+  `reserved` varchar(100) NOT NULL,
+  PRIMARY KEY  (`id`),
+  KEY `username` (`username`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+
+CREATE TABLE IF NOT EXISTS `users` (
+  `username` varchar(20) NOT NULL,
+  `password` char(40) NOT NULL COMMENT 'this is for a sha-160 hash of the actual password',
+  `name` varchar(80) NOT NULL,
+  `comments` text NOT NULL,
+  `submit` tinyint(1) NOT NULL default '1',
+  `admin` tinyint(1) NOT NULL default '0',
+  PRIMARY KEY  (`username`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080713/04bb75fc/attachment-0001.html 


More information about the macports-changes mailing list