aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzi <zi@FreeBSD.org>2011-08-17 05:50:58 +0800
committerzi <zi@FreeBSD.org>2011-08-17 05:50:58 +0800
commit40e048d1f7a818cd9d331be89e0160197c428284 (patch)
tree942a74f9b1b1d554e567a5762d9de0e46d81138d
parentab7bdf21ef8d536630195eb5b7e8fbb4645d1ea7 (diff)
downloadfreebsd-ports-gnome-40e048d1f7a818cd9d331be89e0160197c428284.tar.gz
freebsd-ports-gnome-40e048d1f7a818cd9d331be89e0160197c428284.tar.zst
freebsd-ports-gnome-40e048d1f7a818cd9d331be89e0160197c428284.zip
Improve interoperability with mysql-server 5.5
PR: ports/159763 Submitted by: Paul Schmehl <pauls@utdallas.edu> (maintainer) Approved by: wxs (mentor)
-rw-r--r--security/sguil-server/Makefile2
-rw-r--r--security/sguil-server/files/patch-lib-SguildLoaderd.tcl22
-rw-r--r--security/sguil-server/files/patch-sql_scripts-create_sguildb.sql157
-rw-r--r--security/sguil-server/files/patch-sql_scripts-sancp_cleanup.tcl11
4 files changed, 189 insertions, 3 deletions
diff --git a/security/sguil-server/Makefile b/security/sguil-server/Makefile
index 70c35efe4fd4..f56475a53e4d 100644
--- a/security/sguil-server/Makefile
+++ b/security/sguil-server/Makefile
@@ -7,7 +7,7 @@
PORTNAME= sguil-server
PORTVERSION= 0.7.0
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= security
MASTER_SITES= SF/sguil/sguil/sguil-${PORTVERSION}
diff --git a/security/sguil-server/files/patch-lib-SguildLoaderd.tcl b/security/sguil-server/files/patch-lib-SguildLoaderd.tcl
index 90d4dd9002b1..700de04cf81f 100644
--- a/security/sguil-server/files/patch-lib-SguildLoaderd.tcl
+++ b/security/sguil-server/files/patch-lib-SguildLoaderd.tcl
@@ -1,5 +1,23 @@
---- lib/SguildLoaderd.tcl.bak 2009-07-06 14:53:16.000000000 -0500
-+++ lib/SguildLoaderd.tcl 2009-07-06 14:53:56.000000000 -0500
+--- lib/SguildLoaderd.tcl.orig 2007-09-25 14:17:13.000000000 +0000
++++ lib/SguildLoaderd.tcl 2011-08-11 20:22:18.000000000 +0000
+@@ -129,7 +129,7 @@
+ INDEX dst_port (dst_port), \
+ INDEX src_port (src_port), \
+ INDEX start_time (start_time) \
+- ) \
++ ) ENGINE=MyISAM \
+ "
+
+ # Create the table
+@@ -182,7 +182,7 @@
+ INDEX dst_port (dst_port), \
+ INDEX src_port (src_port), \
+ INDEX start_time (start_time) \
+- ) TYPE=MERGE UNION=([join $tmpTables ,]) \
++ ) ENGINE=MERGE UNION=([join $tmpTables ,]) \
+ "
+ # Create our MERGE sancp table
+ mysqlexec $dbSocketID $createQuery
@@ -225,7 +225,7 @@
} else {
# Make sure its a MERGE table and not the old monster
diff --git a/security/sguil-server/files/patch-sql_scripts-create_sguildb.sql b/security/sguil-server/files/patch-sql_scripts-create_sguildb.sql
new file mode 100644
index 000000000000..4fae6f1c00c3
--- /dev/null
+++ b/security/sguil-server/files/patch-sql_scripts-create_sguildb.sql
@@ -0,0 +1,157 @@
+--- sql_scripts/create_sguildb.sql.orig 2007-03-17 02:43:37.000000000 +0000
++++ sql_scripts/create_sguildb.sql 2011-08-09 22:21:09.000000000 +0000
+@@ -52,10 +52,10 @@
+ -- INDEX status (status),
+ -- INDEX abuse_queue (abuse_queue),
+ -- INDEX abuse_sent (abuse_sent)
+---);
++-- );
+
+---CREATE TABLE tcphdr
+---(
++-- CREATE TABLE tcphdr
++-- (
+ -- sid INT UNSIGNED NOT NULL,
+ -- cid INT UNSIGNED NOT NULL,
+ -- tcp_seq INT UNSIGNED,
+@@ -68,16 +68,16 @@
+ -- tcp_urp SMALLINT UNSIGNED,
+ -- PRIMARY KEY (sid,cid));
+ --
+---CREATE TABLE udphdr
+---(
++-- CREATE TABLE udphdr
++-- (
+ -- sid INT UNSIGNED NOT NULL,
+ -- cid INT UNSIGNED NOT NULL,
+ -- udp_len SMALLINT UNSIGNED,
+ -- udp_csum SMALLINT UNSIGNED,
+ -- PRIMARY KEY (sid,cid));
+ --
+---CREATE TABLE icmphdr
+---(
++-- CREATE TABLE icmphdr
++-- (
+ -- sid INT UNSIGNED NOT NULL,
+ -- cid INT UNSIGNED NOT NULL,
+ -- icmp_csum SMALLINT UNSIGNED,
+@@ -85,8 +85,8 @@
+ -- icmp_seq SMALLINT UNSIGNED,
+ -- PRIMARY KEY (sid,cid));
+ --
+---CREATE TABLE data
+---(
++-- CREATE TABLE data
++-- (
+ -- sid INT UNSIGNED NOT NULL,
+ -- cid INT UNSIGNED NOT NULL,
+ -- data_payload TEXT,
+@@ -101,13 +101,13 @@
+ interface VARCHAR(255),
+ description TEXT,
+ bpf_filter TEXT,
+- updated TIMESTAMP(14) NOT NULL,
++ updated TIMESTAMP NOT NULL,
+ active ENUM('Y','N') DEFAULT 'Y',
+ ip VARCHAR(15) DEFAULT NULL,
+ public_key VARCHAR(255) DEFAULT NULL,
+ PRIMARY KEY (sid),
+ INDEX hostname_idx (hostname)
+-);
++) ENGINE=MyISAM;
+
+ CREATE TABLE portscan
+ (
+@@ -119,7 +119,8 @@
+ dst_port INT UNSIGNED,
+ data TEXT,
+ INDEX ps_src_ip (src_ip),
+- INDEX ps_timestamp (timestamp));
++ INDEX ps_timestamp (timestamp)
++) ENGINE=MyISAM;
+
+ -- Depreciated
+ -- CREATE TABLE sessions (
+@@ -150,7 +151,7 @@
+ description VARCHAR(255) NOT NULL,
+ long_desc VARCHAR(255),
+ PRIMARY KEY (status_id)
+-);
++) ENGINE=MyISAM;
+
+ CREATE TABLE history
+ (
+@@ -161,7 +162,7 @@
+ status SMALLINT UNSIGNED NOT NULL,
+ comment VARCHAR(255),
+ INDEX log_time (timestamp)
+-);
++) ENGINE=MyISAM;
+
+ CREATE TABLE user_info
+ (
+@@ -169,7 +170,7 @@
+ username VARCHAR(16) NOT NULL,
+ last_login DATETIME NOT NULL,
+ PRIMARY KEY (uid)
+-);
++) ENGINE=MyISAM;
+
+ CREATE TABLE nessus_data
+ (
+@@ -178,7 +179,8 @@
+ nessus_id INT UNSIGNED,
+ level VARCHAR(20),
+ description TEXT,
+- INDEX rid (rid));
++ INDEX rid (rid)
++) ENGINE=MyISAM;
+
+ CREATE TABLE nessus
+ (
+@@ -188,7 +190,8 @@
+ timestart DATETIME,
+ timeend DATETIME,
+ PRIMARY KEY (rid),
+- INDEX ip (ip));
++ INDEX ip (ip)
++) ENGINE=MyISAM;
+
+ CREATE TABLE IF NOT EXISTS `pads`
+ (
+@@ -203,12 +206,12 @@
+ application VARCHAR(255) NOT NULL,
+ hex_payload VARCHAR(255),
+ PRIMARY KEY (sid,asset_id)
+-);
++) ENGINE=MyISAM;
+
+ --
+ -- Depreciated for MERGE tables
+---CREATE TABLE sancp
+---(
++-- CREATE TABLE sancp
++-- (
+ -- sid INT UNSIGNED NOT NULL,
+ -- sancpid BIGINT UNSIGNED NOT NULL,
+ -- start_time DATETIME NOT NULL,
+@@ -231,8 +234,8 @@
+ -- INDEX dst_port (dst_port),
+ -- INDEX src_port (src_port),
+ -- INDEX start_time (start_time)
+---);
+---
++-- );
++--
+
+ INSERT INTO status (status_id, description, long_desc) VALUES (0, "New", "Real Time Event");
+ INSERT INTO status (status_id, description, long_desc) VALUES (1, "No Further Action Required", "No Further Action Required");
+@@ -250,7 +253,7 @@
+ (
+ version VARCHAR(32),
+ installed DATETIME
+-);
++) ENGINE=MyISAM;
+
+ INSERT INTO version (version, installed) VALUES ("0.12", now());
+
diff --git a/security/sguil-server/files/patch-sql_scripts-sancp_cleanup.tcl b/security/sguil-server/files/patch-sql_scripts-sancp_cleanup.tcl
new file mode 100644
index 000000000000..ff82d972afc8
--- /dev/null
+++ b/security/sguil-server/files/patch-sql_scripts-sancp_cleanup.tcl
@@ -0,0 +1,11 @@
+--- sql_scripts/sancp_cleanup.tcl.orig 2011-08-11 20:31:07.000000000 +0000
++++ sql_scripts/sancp_cleanup.tcl 2011-08-11 20:31:26.000000000 +0000
+@@ -214,7 +214,7 @@
+ INDEX dst_port (dst_port), \
+ INDEX src_port (src_port), \
+ INDEX start_time (start_time) \
+- ) TYPE=MERGE UNION=([join $tmpTables ,]) \
++ ) ENGINE=MERGE UNION=([join $tmpTables ,]) \
+ "
+ # Create our MERGE sancp table
+ mysqlexec $dbSocketID $createQuery