Compare commits

..

2 Commits

Author SHA1 Message Date
varga%netscape.com
1bedeb61a8 Converted SQL module to an addon.
git-svn-id: svn://10.0.0.236/branches/SQL_ADDON_20030707_BRANCH@144533 18797224-902f-48f8-a5cc-f745e15eee43
2003-07-07 21:22:30 +00:00
(no author)
e93cddc998 This commit was manufactured by cvs2svn to create branch
'SQL_ADDON_20030707_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/SQL_ADDON_20030707_BRANCH@144522 18797224-902f-48f8-a5cc-f745e15eee43
2003-07-07 18:25:48 +00:00
79 changed files with 5646 additions and 2519 deletions

View File

@@ -0,0 +1,19 @@
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = \
base \
pgsql \
build
ifdef ENABLE_TESTS
DIRS += \
sqltest \
tests
endif
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,11 @@
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
DIRS = \
public \
src \
resources
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,19 @@
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
MODULE = sql
XPIDLSRCS = \
mozISqlConnection.idl \
mozISqlRequest.idl \
mozISqlDataSource.idl \
mozISqlInputStream.idl \
mozISqlRequestObserver.idl \
mozISqlResult.idl \
mozISqlResultEnumerator.idl \
mozISqlService.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,124 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Jan Varga <varga@utcru.sk>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
interface mozISqlResult;
interface mozISqlRequest;
interface mozISqlRequestObserver;
/**
* @status UNDER_REVIEW
*/
[scriptable, uuid(f16397a4-1ecb-4e08-84f8-27750c04b779)]
interface mozISqlConnection : nsISupports
{
readonly attribute AString serverVersion;
/**
* The most recent error message.
*/
readonly attribute AString errorMessage;
/**
* The ID of the most recently added record.
*/
readonly attribute long lastID;
/**
* Set up the connection.
*
* @param aHost The host name.
* @param aPort The port at which the host is listening.
* @param aDatabase The real database name to connect to.
* @param aUsername The username to connect as.
* @param aPassword The password to use in authentification phase.
*/
void init(in AString aHost,
in long aPort,
in AString aDatabase,
in AString aUsername,
in AString aPassword);
/**
* Execute the query synchronously and return database result.
*
* @param aQuery The query to execute.
*/
mozISqlResult executeQuery(in AString aQuery);
/**
* Execute the update synchronously and return number of updated rows.
*
* @param aUpdate The update to execute.
*/
long executeUpdate(in AString aUpdate);
mozISqlRequest asyncExecuteQuery(in AString aQuery,
in nsISupports aContext,
in mozISqlRequestObserver aObserver);
mozISqlRequest asyncExecuteUpdate(in AString aQuery,
in nsISUpports aContext,
in mozISqlRequestObserver aObserver);
/**
* Begin transaction.
*/
void beginTransaction();
/**
* Commit transaction.
*/
void commitTransaction();
/**
* Rollback transaction.
*/
void rollbackTransaction();
/**
* Get primary keys.
*
* @param aSchema The schema.
* @param aTable The table name.
*/
mozISqlResult getPrimaryKeys(in AString aSchema, in AString aTable);
};

View File

@@ -0,0 +1,65 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Jan Varga <varga@utcru.sk>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
interface nsIRDFResource;
/**
* @status UNDER_REVIEW
*/
[scriptable, uuid(3c0a954f-b595-46a4-932c-3660f55e2e10)]
interface mozISqlDataSource : nsISupports
{
/**
* Retrieve the RDF resource associated with the specified row.
*
* @param aRowIndex The row index.
*/
nsIRDFResource getResourceAtIndex(in long aRowIndex);
/**
* Retrieve the index associated with specified RDF resource.
*
* @param aResource The resource.
*/
long getIndexOfResource(in nsIRDFResource aResource);
};

View File

@@ -0,0 +1,52 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Jan Varga <varga@utcru.sk>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
/**
* @status UNDER_DEVELOPMENT
*/
[scriptable, uuid(555f2485-ba82-4c5c-9dd2-d801104dc09e)]
interface mozISqlInputStream : nsISupports
{
AString getColumnHeader(in long aColumnIndex);
void setColumnHeader(in long aColumnIndex, in AString aLabel);
};

View File

@@ -0,0 +1,77 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Jan Varga <varga@utcru.sk>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
interface mozISqlConnection;
interface mozISqlRequestObserver;
interface mozISqlResult;
/**
* @status UNDER_REVIEW
*/
[scriptable, uuid(f67cb817-5e07-49ff-aacc-5c80585c5031)]
interface mozISqlRequest : nsISupports
{
readonly attribute AString errorMessage;
readonly attribute mozISqlResult result;
readonly attribute long affectedRows;
readonly attribute long lastID;
readonly attribute AString query;
readonly attribute nsISupports ctxt;
readonly attribute mozISqlRequestObserver observer;
const long STATUS_NONE = 0;
const long STATUS_EXECUTED = 1;
const long STATUS_COMPLETE = 2;
const long STATUS_ERROR = 3;
const long STATUS_CANCELLED = 4;
readonly attribute long status;
void cancel();
};

View File

@@ -0,0 +1,56 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Jan Varga <varga@utcru.sk>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
interface mozISqlRequest;
/**
* @status UNDER_REVIEW
*/
[scriptable, uuid(9e950bc0-e252-41ef-ac6f-3e3c4acd9dd8)]
interface mozISqlRequestObserver : nsISupports
{
void onStartRequest(in mozISqlRequest aRequest,
in nsISupports aContext);
void onStopRequest(in mozISqlRequest aRequest,
in nsISupports aContext);
};

View File

@@ -0,0 +1,87 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Jan Varga <varga@utcru.sk>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
interface mozISqlConnection;
interface mozISqlResultEnumerator;
interface mozISqlInputStream;
/**
* @status UNDER_DEVELOPMENT
*/
[scriptable, uuid(08c220b0-7140-456a-89e9-c94609a7392d)]
interface mozISqlResult : nsISupports
{
readonly attribute mozISqlConnection connection;
readonly attribute AString query;
readonly attribute AString tableName;
readonly attribute long rowCount;
readonly attribute long columnCount;
AString getColumnName(in long aColumnIndex);
long getColumnIndex(in AString aColumnName);
const long TYPE_STRING = 1;
const long TYPE_INT = 2;
const long TYPE_FLOAT = 3;
const long TYPE_DECIMAL = 4;
const long TYPE_DATE = 5;
const long TYPE_TIME = 6;
const long TYPE_DATETIME = 7;
const long TYPE_BOOL = 8;
long getColumnType(in long aColumnIndex);
AString getColumnTypeAsString(in long aColumnIndex);
long getColumnDisplaySize(in long aColumnIndex);
mozISqlResultEnumerator enumerate();
mozISqlInputStream open();
void reload();
};

View File

@@ -0,0 +1,126 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Jan Varga <varga@utcru.sk>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
interface nsIVariant;
/**
* @status UNDER_DEVELOPMENT
*/
[scriptable, uuid(dcc0d29e-2b44-460e-b39f-89121ff8b963)]
interface mozISqlResultEnumerator : nsISupports
{
readonly attribute AString errorMessage;
boolean next();
boolean previous();
void beforeFirst();
void first();
void last();
void relative(in long aRows);
void absolute(in long aRowIndex);
boolean isNull(in long aColumnIndex);
nsIVariant getVariant(in long aColumnIndex);
AString getString(in long aColumnIndex);
long getInt(in long aColumnIndex);
float getFloat(in long aColumnIndex);
float getDecimal(in long aColumnIndex);
long long getDate(in long aColumnIndex);
boolean getBool(in long aColumnIndex);
void setNull(in long aColumnIndex);
void setDefault(in long aColumnIndex);
void copy(in long aColumnIndex);
void setVariant(in long aColumnIndex, in nsIVariant aValue);
void setString(in long aColumnIndex, in AString aValue);
void setInt(in long aColumnIndex, in long aValue);
void setFloat(in long aColumnIndex, in float aValue);
void setDecimal(in long aColumnIndex, in float aValue);
void setDate(in long aColumnIndex, in long long aValue);
void setBool(in long aColumnIndex, in boolean aValue);
void setNullValues();
void setDefaultValues();
void copyValues();
boolean canInsert();
boolean canUpdate();
boolean canDelete();
long insertRow();
long updateRow();
long deleteRow();
readonly attribute AString currentCondition;
};

View File

@@ -0,0 +1,81 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Jan Varga <varga@utcru.sk>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
interface mozISqlConnection;
/**
* @status UNDER_DEVELOPMENT
*/
[scriptable, uuid(1ceb35b7-daa8-4ce4-ac67-125fb17cb019)]
interface mozISqlService : nsISupports
{
readonly attribute AString errorMessage;
void addAlias(in ACString aURI,
in AString aName,
in AString aType,
in AString aHostname,
in long aPort,
in AString aDatabase);
boolean hasAlias(in ACString aURI);
void getAlias(in ACString aURI,
out AString aName,
out AString aType,
out AString aHostname,
out long aPort,
out AString aDatabase);
void updateAlias(in ACString aURI,
in AString aName,
in AString aType,
in AString aHostname,
in long aPort,
in AString aDatabase);
void removeAlias(in ACString aURI);
mozISqlConnection getConnection(in ACString aURI);
mozISqlConnection getNewConnection(in ACString aURI);
};

View File

@@ -0,0 +1,6 @@
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,39 @@
var sqlService = null;
var name;
var type;
var hostname;
var port;
var database;
function init() {
sqlService = Components.classes["@mozilla.org/sql/service;1"]
.getService(Components.interfaces.mozISqlService);
name = document.getElementById("name");
type = document.getElementById("type");
hostname = document.getElementById("hostname");
port = document.getElementById("port");
database = document.getElementById("database");
if (window.arguments) {
// get original values
var uri = window.arguments[0];
sqlService.getAlias(uri, name, type, hostname, port, database);
}
}
function onAccept() {
if (window.arguments) {
// update an existing alias
var uri = window.arguments[0];
sqlService.updateAlias(uri, name.value, type.value, hostname.value,
port.value, database.value);
}
else {
// add a new database
var uri = "urn:aliases:" + name.value;
sqlService.addAlias(uri, name.value, type.value, hostname.value,
port.value, database.value);
}
}

View File

@@ -0,0 +1,46 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://sql/locale/aliasDialog.dtd">
<dialog id="aliasDialog"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&window.title;"
width="250" height="180"
buttons="accept,cancel" buttonpack="center"
ondialogaccept="return onAccept(event);"
onload="init()">
<script type="application/x-javascript" src="aliasDialog.js"/>
<grid flex="1">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row>
<label value="&name.label;"/>
<textbox id="name"/>
</row>
<row>
<label value="&type.label;"/>
<textbox id="type"/>
</row>
<row>
<label value="&hostname.label;"/>
<textbox id="hostname"/>
</row>
<row>
<label value="&port.label;"/>
<textbox id="port"/>
</row>
<row>
<label value="&database.label;"/>
<textbox id="database"/>
</row>
</rows>
</grid>
</dialog>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:sql"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:sql"
chrome:displayName="SQL support"
chrome:author="mozilla.org"
chrome:authorURL="http://www.mozilla.org/projects/sql/index.html"
chrome:name="sql"
chrome:extension="true"
chrome:settingsURL="chrome://sql/content/sqlSettings.xul"
chrome:description="Allow applications to directly connect to SQL databases.">
</RDF:Description>
</RDF:RDF>

View File

@@ -0,0 +1,36 @@
var sqlService = null;
function getSqlService() {
if (! sqlService)
sqlService = Components.classes["@mozilla.org/sql/service;1"]
.getService(Components.interfaces.mozISqlService);
return sqlService;
}
function getSelectedAlias() {
var tree = document.getElementById("aliasesTree");
return tree.builderView.getResourceAtIndex(tree.currentIndex).Value;
}
function updateButtons() {
var tree = document.getElementById("aliasesTree");
const buttons = ["updateButton", "removeButton"];
for (i = 0; i < buttons.length; i++)
document.getElementById(buttons[i]).disabled = tree.currentIndex < 0;
}
function addAlias() {
window.openDialog("aliasDialog.xul", "addAlias", "chrome,modal=yes,resizable=no,centerscreen");
}
function updateAlias() {
var alias = getSelectedAlias();
window.openDialog("aliasDialog.xul", "updateDatabase", "chrome,modal=yes,resizable=no,centerscreen", alias);
}
function removeAlias() {
var sqlService = getSqlService();
var alias = getSelectedAlias();
sqlService.removeAlias(alias);
updateButtons();
}

View File

@@ -0,0 +1,55 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://sql/locale/sqlSettings.dtd">
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&header.label;"
width="450" height="350">
<script type="application/x-javascript" src="sqlSettings.js"/>
<groupbox flex="1">
<caption label="&aliases.label;"/>
<hbox flex="1">
<tree id="aliasesTree" flex="1"
seltype="single"
datasources="rdf:sql" ref="SQL:AliasesRoot" flags="dont-build-content"
onselect="updateButtons()">
<treecols>
<treecol id="nameCol" flex="1" label="&nameCol.label;"
sort="rdf:http://www.mozilla.org/SQL-rdf#name"
sortActive="true" sortDirection="ascending"/>
<treecol id="typeCol" flex="1" label="&typeCol.label;"
sort="rdf:http://www.mozilla.org/SQL-rdf#type"/>
<treecol id="hostnameCol" flex="1" label="&hostnameCol.label;"
sort="rdf:http://www.mozilla.org/SQL-rdf#hostname"/>
<treecol id="portCol" flex="1" label="&portCol.label;"
sort="rdf:http://www.mozilla.org/SQL-rdf#port"/>
<treecol id="databaseCol" flex="1" label="&databaseCol.label;"
sort="rdf:http://www.mozilla.org/SQL-rdf#database"/>
</treecols>
<template>
<treechildren>
<treeitem uri="rdf:*">
<treerow>
<treecell label="rdf:http://www.mozilla.org/SQL-rdf#name"/>
<treecell label="rdf:http://www.mozilla.org/SQL-rdf#type"/>
<treecell label="rdf:http://www.mozilla.org/SQL-rdf#hostname"/>
<treecell label="rdf:http://www.mozilla.org/SQL-rdf#port"/>
<treecell label="rdf:http://www.mozilla.org/SQL-rdf#database"/>
</treerow>
</treeitem>
</treechildren>
</template>
</tree>
<vbox>
<button id="addButton" label="&add.label;" oncommand="addAlias()"/>
<button id="updateButton" label="&update.label;" disabled="true" oncommand="updateAlias()"/>
<button id="removeButton" label="&remove.label;" disabled="true" oncommand="removeAlias()"/>
</vbox>
</hbox>
</groupbox>
</dialog>

View File

@@ -0,0 +1,9 @@
sql.jar:
content/sql/contents.rdf (content/contents.rdf)
content/sql/sqlSettings.xul (content/sqlSettings.xul)
content/sql/sqlSettings.js (content/sqlSettings.js)
content/sql/aliasDialog.xul (content/aliasDialog.xul)
content/sql/aliasDialog.js (content/aliasDialog.js)
locale/en-US/sql/contents.rdf (locale/en-US/contents.rdf)
locale/en-US/sql/sqlSettings.dtd (locale/en-US/sqlSettings.dtd)
locale/en-US/sql/aliasDialog.dtd (locale/en-US/aliasDialog.dtd)

View File

@@ -0,0 +1,7 @@
<!ENTITY window.title "Alias">
<!ENTITY name.label "Name:">
<!ENTITY type.label "Type:">
<!ENTITY hostname.label "Hostname:">
<!ENTITY port.label "Port:">
<!ENTITY database.label "Database:">

View File

@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the locales being supplied by this package -->
<RDF:Seq about="urn:mozilla:locale:root">
<RDF:li resource="urn:mozilla:locale:en-US"/>
</RDF:Seq>
<!-- locale information -->
<RDF:Description about="urn:mozilla:locale:en-US"
chrome:displayName="English(US)"
chrome:author="mozilla.org"
chrome:name="en-US"
chrome:previewURL="http://www.mozilla.org/locales/en-US.gif">
<chrome:packages>
<RDF:Seq about="urn:mozilla:locale:en-US:packages">
<RDF:li resource="urn:mozilla:locale:en-US:sql"/>
</RDF:Seq>
</chrome:packages>
</RDF:Description>
</RDF:RDF>

View File

@@ -0,0 +1,12 @@
<!ENTITY header.label "SQL support">
<!ENTITY aliases.label "Aliases">
<!ENTITY nameCol.label "Name">
<!ENTITY typeCol.label "Type">
<!ENTITY hostnameCol.label "Hostname">
<!ENTITY portCol.label "Port">
<!ENTITY databaseCol.label "Database">
<!ENTITY add.label "Add alias">
<!ENTITY update.label "Update alias">
<!ENTITY remove.label "Remove alias">

View File

@@ -0,0 +1,33 @@
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = sql
LIBRARY_NAME = sqlbase_s
REQUIRES = xpcom \
string \
unicharutil \
locale \
necko \
rdf \
windowwatcher \
$(NULL)
CPPSRCS = \
mozSqlConnection.cpp \
mozSqlRequest.cpp \
mozSqlResult.cpp \
mozSqlService.cpp
EXPORTS = \
mozSqlConnection.h \
mozSqlRequest.h \
mozSqlResult.h \
mozSqlService.h
FORCE_STATIC_LIB=1
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,237 @@
#include "nsIProxyObjectManager.h"
#include "mozSqlRequest.h"
#include "mozSqlConnection.h"
mozSqlConnection::mozSqlConnection()
: mLock(nsnull),
mCondVar(nsnull),
mThread(nsnull),
mShutdown(PR_FALSE),
mWaiting(PR_FALSE)
{
NS_INIT_ISUPPORTS();
mExecLock = PR_NewLock();
}
mozSqlConnection::~mozSqlConnection()
{
mRequests.Clear();
if (mCondVar)
PR_DestroyCondVar(mCondVar);
PR_DestroyLock(mExecLock);
if (mLock)
PR_DestroyLock(mLock);
}
// We require a special implementation of Release, which knows about
// a circular strong reference
NS_IMPL_THREADSAFE_ADDREF(mozSqlConnection)
NS_IMPL_THREADSAFE_QUERY_INTERFACE3(mozSqlConnection,
mozISqlConnection,
nsIRunnable,
nsISupportsWeakReference)
NS_IMETHODIMP_(nsrefcnt)
mozSqlConnection::Release()
{
PR_AtomicDecrement((PRInt32*)&mRefCnt);
// Delete if the last reference is our strong circular reference.
if (mThread && mRefCnt == 1) {
PR_Lock(mLock);
mRequests.Clear();
mShutdown = PR_TRUE;
if (mWaiting)
PR_NotifyCondVar(mCondVar);
else
CancelExec();
PR_Unlock(mLock);
return 0;
}
else if (mRefCnt == 0) {
delete this;
return 0;
}
return mRefCnt;
}
NS_IMETHODIMP
mozSqlConnection::GetServerVersion(nsAString& aServerVersion)
{
aServerVersion = mServerVersion;
return NS_OK;
}
NS_IMETHODIMP
mozSqlConnection::GetErrorMessage(nsAString& aErrorMessage)
{
aErrorMessage = mErrorMessage;
return NS_OK;
}
NS_IMETHODIMP
mozSqlConnection::GetLastID(PRInt32* aLastID)
{
*aLastID = mLastID;
return NS_OK;
}
NS_IMETHODIMP
mozSqlConnection::Init(const nsAString & aHost, PRInt32 aPort,
const nsAString & aDatabase, const nsAString & aUsername,
const nsAString & aPassword)
{
// descendants have to implement this themselves
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
mozSqlConnection::ExecuteQuery(const nsAString& aQuery, mozISqlResult** _retval)
{
PR_Lock(mExecLock);
nsresult rv = RealExec(aQuery, _retval, nsnull);
PR_Unlock(mExecLock);
return rv;
}
NS_IMETHODIMP
mozSqlConnection::ExecuteUpdate(const nsAString& aUpdate, PRInt32* _retval)
{
PR_Lock(mExecLock);
nsresult rv = RealExec(aUpdate, nsnull, _retval);
PR_Unlock(mExecLock);
return rv;
}
NS_IMETHODIMP
mozSqlConnection::AsyncExecuteQuery(const nsAString& aQuery, nsISupports* aCtxt,
mozISqlRequestObserver* aObserver,
mozISqlRequest **_retval)
{
if (!mThread) {
mLock = PR_NewLock();
mCondVar = PR_NewCondVar(mLock);
NS_NewThread(getter_AddRefs(mThread), this, 0, PR_UNJOINABLE_THREAD);
}
mozSqlRequest* request = new mozSqlRequest(this);
if (! request)
return NS_ERROR_OUT_OF_MEMORY;
request->mIsQuery = PR_TRUE;
request->mQuery = aQuery;
request->mCtxt = aCtxt;
nsresult rv = NS_GetProxyForObject(NS_CURRENT_EVENTQ,
NS_GET_IID(mozISqlRequestObserver),
aObserver,
PROXY_SYNC | PROXY_ALWAYS,
getter_AddRefs(request->mObserver));
if (NS_FAILED(rv))
return rv;
PR_Lock(mLock);
mRequests.AppendObject(request);
if (mWaiting && mRequests.Count() == 1)
PR_NotifyCondVar(mCondVar);
PR_Unlock(mLock);
NS_ADDREF(*_retval = request);
return NS_OK;
}
NS_IMETHODIMP
mozSqlConnection::AsyncExecuteUpdate(const nsAString& aQuery, nsISupports* aCtxt,
mozISqlRequestObserver* aObserver,
mozISqlRequest **_retval)
{
return NS_OK;
}
NS_IMETHODIMP
mozSqlConnection::BeginTransaction()
{
PRInt32 affectedRows;
return ExecuteUpdate(NS_LITERAL_STRING("begin"), &affectedRows);
}
NS_IMETHODIMP
mozSqlConnection::CommitTransaction()
{
PRInt32 affectedRows;
return ExecuteUpdate(NS_LITERAL_STRING("commit"), &affectedRows);
}
NS_IMETHODIMP
mozSqlConnection::RollbackTransaction()
{
PRInt32 affectedRows;
return ExecuteUpdate(NS_LITERAL_STRING("rollback"), &affectedRows);
}
NS_IMETHODIMP
mozSqlConnection::GetPrimaryKeys(const nsAString& aSchema, const nsAString& aTable, mozISqlResult** _retval)
{
// descendants have to implement this themselves
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
mozSqlConnection::Run()
{
while(!mShutdown) {
PR_Lock(mLock);
while (mRequests.Count()) {
mCurrentRequest = mRequests[0];
mRequests.RemoveObjectAt(0);
mozSqlRequest* r = (mozSqlRequest*)mCurrentRequest.get();
r->mObserver->OnStartRequest(mCurrentRequest, r->mCtxt);
r->mStatus = mozISqlRequest::STATUS_EXECUTED;
PR_Unlock(mLock);
nsresult rv = ExecuteQuery(r->mQuery, getter_AddRefs(r->mResult));
PR_Lock(mLock);
if (NS_SUCCEEDED(rv))
r->mStatus = mozISqlRequest::STATUS_COMPLETE;
else {
r->mStatus = mozISqlRequest::STATUS_ERROR;
GetErrorMessage(r->mErrorMessage);
}
r->mObserver->OnStopRequest(mCurrentRequest, r->mCtxt);
mCurrentRequest = nsnull;
}
mWaiting = PR_TRUE;
PR_WaitCondVar(mCondVar, PR_INTERVAL_NO_TIMEOUT);
mWaiting = PR_FALSE;
PR_Unlock(mLock);
}
return NS_OK;
}
nsresult
mozSqlConnection::CancelRequest(mozISqlRequest* aRequest)
{
PR_Lock(mLock);
if (mCurrentRequest == aRequest)
CancelExec();
else {
if (mRequests.RemoveObject(aRequest))
((mozSqlRequest*)aRequest)->mStatus = mozISqlRequest::STATUS_CANCELLED;
}
PR_Unlock(mLock);
return NS_OK;
}

View File

@@ -0,0 +1,53 @@
#ifndef mozSqlConnection_h
#define mozSqlConnection_h
#include "prcvar.h"
#include "nsString.h"
#include "nsCOMArray.h"
#include "nsWeakReference.h"
#include "nsIThread.h"
#include "nsIRunnable.h"
#include "mozISqlConnection.h"
#include "mozISqlRequest.h"
#include "mozISqlResult.h"
class mozSqlConnection : public mozISqlConnection,
public nsIRunnable,
public nsSupportsWeakReference
{
public:
mozSqlConnection();
virtual ~mozSqlConnection();
NS_DECL_ISUPPORTS
NS_DECL_MOZISQLCONNECTION
NS_DECL_NSIRUNNABLE
friend class mozSqlRequest;
friend class mozSqlResult;
protected:
virtual nsresult RealExec(const nsAString& aQuery,
mozISqlResult** aResult, PRInt32* aAffectedRows) = 0;
virtual nsresult CancelExec() = 0;
virtual nsresult GetIDName(nsAString& aIDName) = 0;
nsresult CancelRequest(mozISqlRequest* aRequest);
nsString mServerVersion;
nsString mErrorMessage;
PRInt32 mLastID;
PRLock* mLock;
PRCondVar* mCondVar;
PRLock* mExecLock;
nsCOMPtr<nsIThread> mThread;
nsCOMArray<mozISqlRequest> mRequests;
nsCOMPtr<mozISqlRequest> mCurrentRequest;
PRBool mShutdown;
PRBool mWaiting;
};
#endif // mozSqlConnection_h

View File

@@ -0,0 +1,86 @@
#include "mozSqlConnection.h"
#include "mozSqlRequest.h"
mozSqlRequest::mozSqlRequest(mozISqlConnection* aConnection)
: mAffectedRows(-1),
mIsQuery(PR_TRUE),
mStatus(mozISqlRequest::STATUS_NONE)
{
NS_INIT_ISUPPORTS();
mConnection = do_GetWeakReference(aConnection);
}
mozSqlRequest::~mozSqlRequest()
{
}
NS_IMPL_THREADSAFE_ISUPPORTS1(mozSqlRequest,
mozISqlRequest);
NS_IMETHODIMP
mozSqlRequest::GetErrorMessage(nsAString & aErrorMessage)
{
aErrorMessage = mErrorMessage;
return NS_OK;
}
NS_IMETHODIMP
mozSqlRequest::GetResult(mozISqlResult * *aResult)
{
NS_IF_ADDREF(*aResult = mResult);
return NS_OK;
}
NS_IMETHODIMP
mozSqlRequest::GetAffectedRows(PRInt32 *aAffectedRows)
{
*aAffectedRows = mAffectedRows;
return NS_OK;
}
NS_IMETHODIMP
mozSqlRequest::GetLastID(PRInt32* aLastID)
{
*aLastID = mLastID;
return NS_OK;
}
NS_IMETHODIMP
mozSqlRequest::GetQuery(nsAString & aQuery)
{
aQuery = mQuery;
return NS_OK;
}
NS_IMETHODIMP
mozSqlRequest::GetCtxt(nsISupports * *aCtxt)
{
NS_IF_ADDREF(*aCtxt = mCtxt);
return NS_OK;
}
NS_IMETHODIMP
mozSqlRequest::GetObserver(mozISqlRequestObserver * *aObserver)
{
NS_IF_ADDREF(*aObserver = mObserver);
return NS_OK;
}
NS_IMETHODIMP
mozSqlRequest::GetStatus(PRInt32 *aStatus)
{
*aStatus = mStatus;
return NS_OK;
}
NS_IMETHODIMP
mozSqlRequest::Cancel()
{
nsCOMPtr<mozISqlConnection> connection = do_QueryReferent(mConnection);
if (!connection)
return NS_ERROR_FAILURE;
mozISqlConnection* connectionRaw = connection.get();
return ((mozSqlConnection*)connectionRaw)->CancelRequest(this);
}

View File

@@ -0,0 +1,41 @@
#ifndef mozSqlRequest_h
#define mozSqlRequest_h
#include "nsString.h"
#include "nsCOMPtr.h"
#include "nsIWeakReference.h"
#include "mozISqlConnection.h"
#include "mozISqlResult.h"
#include "mozISqlRequest.h"
#include "mozISqlRequestObserver.h"
class mozSqlRequest : public mozISqlRequest
{
public:
mozSqlRequest(mozISqlConnection* aConnection);
virtual ~mozSqlRequest();
NS_DECL_ISUPPORTS
NS_DECL_MOZISQLREQUEST
friend class mozSqlConnection;
protected:
nsCOMPtr<nsIWeakReference> mConnection;
nsString mErrorMessage;
nsCOMPtr<mozISqlResult> mResult;
PRInt32 mAffectedRows;
PRInt32 mLastID;
PRBool mIsQuery;
nsString mQuery;
nsCOMPtr<nsISupports> mCtxt;
nsCOMPtr<mozISqlRequestObserver> mObserver;
PRInt32 mStatus;
};
#endif // mozSqlRequest_h

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,367 @@
#ifndef mozSqlResult_h
#define mozSqlResult_h
#include "nsCRT.h"
#include "nsFixedSizeAllocator.h"
#include "nsVoidArray.h"
#include "nsCOMArray.h"
#include "nsHashtable.h"
#include "nsCOMPtr.h"
#include "nsWeakReference.h"
#include "nsISimpleEnumerator.h"
#include "nsIRDFService.h"
#include "nsIRDFDataSource.h"
#include "nsIRDFRemoteDataSource.h"
#include "nsIDateTimeFormat.h"
#include "nsIInputStream.h"
#include "mozISqlConnection.h"
#include "mozISqlDataSource.h"
#include "mozISqlResult.h"
#include "mozISqlResultEnumerator.h"
#include "mozISqlInputStream.h"
#define CELL_FLAG_NULL 0x80
#define CELL_FLAG_DEFAULT 0x40
#define CELL_FLAG_MASK ~(CELL_FLAG_NULL | CELL_FLAG_DEFAULT)
class ColumnInfo {
public:
static ColumnInfo*
Create(nsFixedSizeAllocator& aAllocator,
PRUnichar* aName,
PRInt32 aType,
PRInt32 aSize,
PRInt32 aMod,
nsIRDFResource* aProperty) {
void* place = aAllocator.Alloc(sizeof(ColumnInfo));
return place ? ::new(place) ColumnInfo(aName, aType, aSize, aMod, aProperty) : nsnull;
}
static void
Destroy(nsFixedSizeAllocator& aAllocator, ColumnInfo* aColumnInfo) {
aColumnInfo->~ColumnInfo();
aAllocator.Free(aColumnInfo, sizeof(ColumnInfo));
}
ColumnInfo(PRUnichar* aName, PRInt32 aType, PRInt32 aSize, PRInt32 aMod, nsIRDFResource* aProperty)
: mName(aName),
mType(aType),
mSize(aSize),
mMod(aMod),
mProperty(aProperty) {
NS_IF_ADDREF(mProperty);
}
~ColumnInfo() {
if (mName)
nsMemory::Free(mName);
NS_IF_RELEASE(mProperty);
}
PRUnichar* mName;
PRInt32 mType;
PRInt32 mSize;
PRInt32 mMod;
nsIRDFResource* mProperty;
private:
// Hide so that only Create() and Destroy() can be used to
// allocate and deallocate from the heap
static void* operator new(size_t) CPP_THROW_NEW { return 0; }
static void operator delete(void*, size_t) {}
};
class Cell {
public:
static Cell*
Create(nsFixedSizeAllocator& aAllocator,
PRInt32 aType) {
void* place = aAllocator.Alloc(sizeof(Cell));
return place ? ::new(place) Cell(aType) : nsnull;
}
static Cell*
Create(nsFixedSizeAllocator& aAllocator,
PRInt32 aType,
Cell* aSrcCell) {
void* place = aAllocator.Alloc(sizeof(Cell));
if (! place)
return nsnull;
Cell* newCell = ::new(place) Cell(aType);
Copy(aSrcCell, newCell);
return newCell;
}
static void
Copy(Cell* aSrcCell, Cell* aDestCell) {
if (aSrcCell->IsNull())
aDestCell->SetNull(PR_TRUE);
else {
aDestCell->SetNull(PR_FALSE);
PRInt32 type = aSrcCell->GetType();
if (type == mozISqlResult::TYPE_STRING)
aDestCell->SetString(nsCRT::strdup(aSrcCell->mString));
else if (type == mozISqlResult::TYPE_INT)
aDestCell->mInt = aSrcCell->mInt;
else if (type == mozISqlResult::TYPE_FLOAT ||
type == mozISqlResult::TYPE_DECIMAL)
aDestCell->mFloat = aSrcCell->mFloat;
else if (type == mozISqlResult::TYPE_DATE ||
type == mozISqlResult::TYPE_TIME ||
type == mozISqlResult::TYPE_DATETIME)
aDestCell->mDate = aSrcCell->mDate;
else if (type == mozISqlResult::TYPE_BOOL)
aDestCell->mBool = aSrcCell->mBool;
}
}
static void
Destroy(nsFixedSizeAllocator& aAllocator, Cell* aCell) {
aCell->~Cell();
aAllocator.Free(aCell, sizeof(Cell));
}
Cell(PRInt32 aType)
: mString(nsnull),
mType(aType | CELL_FLAG_NULL) {
}
~Cell() {
if ((GetType() == mozISqlResult::TYPE_STRING) && mString) {
nsMemory::Free(mString);
}
}
void SetString(PRUnichar* aString) {
if (mString)
nsMemory::Free(mString);
mString = aString;
}
PRInt32 GetType() {
return mType & CELL_FLAG_MASK;
}
void SetNull(PRBool aNull) {
mType &= CELL_FLAG_MASK;
if (aNull)
mType |= CELL_FLAG_NULL;
}
void SetDefault(PRBool aDefault) {
mType &= CELL_FLAG_MASK;
if (aDefault)
mType |= CELL_FLAG_DEFAULT;
}
PRBool IsNull() {
return mType & CELL_FLAG_NULL;
}
PRBool IsDefault() {
return mType & CELL_FLAG_DEFAULT;
}
union {
PRUnichar* mString;
PRInt32 mInt;
float mFloat;
PRInt64 mDate;
PRBool mBool;
};
private:
static void* operator new(size_t) CPP_THROW_NEW { return 0; }
static void operator delete(void*, size_t) {}
PRInt8 mType;
};
class Row {
public:
static Row*
Create(nsFixedSizeAllocator& aAllocator,
nsIRDFResource* aSource,
nsVoidArray& aColumnInfo) {
void* place = aAllocator.Alloc(sizeof(Row));
if (! place)
return nsnull;
Row* newRow = ::new(place) Row(aSource, aColumnInfo.Count());
for (PRInt32 i = 0; i < aColumnInfo.Count(); i++) {
Cell* newCell = Cell::Create(aAllocator, ((ColumnInfo*)aColumnInfo[i])->mType);
newRow->mCells[i] = newCell;
}
return newRow;
}
static Row*
Create(nsFixedSizeAllocator& aAllocator,
nsIRDFResource* aSource,
nsVoidArray& aColumnInfo,
Row* aSrcRow) {
void* place = aAllocator.Alloc(sizeof(Row));
if (! place)
return nsnull;
Row* newRow = ::new(place) Row(aSource, aColumnInfo.Count());
for (PRInt32 i = 0; i < aColumnInfo.Count(); i++) {
Cell* srcCell = aSrcRow->mCells[i];
Cell* newCell = Cell::Create(aAllocator, ((ColumnInfo*)aColumnInfo[i])->mType, srcCell);
newRow->mCells[i] = newCell;
}
return newRow;
}
static void
Copy(PRInt32 aColumnCount, Row* aSrcRow, Row* aDestRow) {
for (PRInt32 i = 0; i < aColumnCount; i++) {
Cell* srcCell = aSrcRow->mCells[i];
Cell* destCell = aDestRow->mCells[i];
Cell::Copy(srcCell, destCell);
}
}
static void
Destroy(nsFixedSizeAllocator& aAllocator, PRInt32 aColumnCount, Row* aRow) {
for (PRInt32 i = 0; i < aColumnCount; i++)
Cell::Destroy(aAllocator, aRow->mCells[i]);
aRow->~Row();
aAllocator.Free(aRow, sizeof(*aRow));
}
Row(nsIRDFResource* aSource, PRInt32 aColumnCount)
: mSource(aSource)
{
NS_IF_ADDREF(mSource);
mCells = new Cell*[aColumnCount];
}
~Row() {
delete[] mCells;
NS_IF_RELEASE(mSource);
}
nsIRDFResource* mSource;
Cell** mCells;
private:
static void* operator new(size_t) CPP_THROW_NEW { return 0; }
static void operator delete(void*, size_t) {}
};
class mozSqlResult : public mozISqlResult,
public mozISqlDataSource,
public nsIRDFDataSource,
public nsIRDFRemoteDataSource
{
public:
mozSqlResult(mozISqlConnection* aConnection,
const nsAString& aQuery);
nsresult Init();
nsresult Rebuild();
virtual ~mozSqlResult();
NS_DECL_ISUPPORTS
NS_DECL_MOZISQLRESULT
NS_DECL_MOZISQLDATASOURCE
NS_DECL_NSIRDFDATASOURCE
NS_DECL_NSIRDFREMOTEDATASOURCE
friend class mozSqlResultEnumerator;
friend class mozSqlResultStream;
protected:
virtual nsresult BuildColumnInfo() = 0 ;
virtual nsresult BuildRows() = 0;
virtual void ClearNativeResult() = 0;
void ClearColumnInfo();
void ClearRows();
nsresult EnsureTableName();
nsresult EnsurePrimaryKeys();
void AppendValue(Cell* aCell, nsAutoString& aValues);
nsresult AppendKeys(Row* aRow, nsAutoString& aKeys);
nsresult GetValues(Row* aRow, mozISqlResult** aResult, PRBool aUseID);
nsresult CopyValues(mozISqlResult* aResult, Row* aRow);
virtual nsresult CanInsert(PRBool* _retval) = 0;
virtual nsresult CanUpdate(PRBool* _retval) = 0;
virtual nsresult CanDelete(PRBool* _retval) = 0;
nsresult InsertRow(Row* aSrcRow, PRInt32* _retval);
nsresult UpdateRow(PRInt32 aRowIndex, Row* aSrcRow, PRInt32* _retval);
nsresult DeleteRow(PRInt32 aRowIndex, PRInt32* _retval);
nsresult GetCondition(Row* aRow, nsAString& aCurrentCondition);
static PRInt32 gRefCnt;
static nsIRDFService* gRDFService;
static nsIDateTimeFormat* gFormat;
static nsIRDFResource* kSQL_ResultRoot;
static nsIRDFResource* kNC_Child;
static nsIRDFLiteral* kNullLiteral;
static nsIRDFLiteral* kTrueLiteral;
static nsIRDFLiteral* kFalseLiteral;
nsCOMPtr<mozISqlConnection> mConnection;
nsString mErrorMessage;
nsString mQuery;
nsString mTableName;
nsFixedSizeAllocator mAllocator;
nsAutoVoidArray mColumnInfo;
nsVoidArray mRows;
nsObjectHashtable mSources;
nsCOMArray<nsIRDFObserver> mObservers;
nsCOMPtr<mozISqlResultEnumerator> mPrimaryKeys;
PRInt32 mCanInsert;
PRInt32 mCanUpdate;
PRInt32 mCanDelete;
};
class mozSqlResultEnumerator : public mozISqlResultEnumerator,
public nsISimpleEnumerator
{
public:
mozSqlResultEnumerator(mozSqlResult* aResult);
virtual ~mozSqlResultEnumerator();
NS_DECL_ISUPPORTS
NS_DECL_MOZISQLRESULTENUMERATOR
NS_DECL_NSISIMPLEENUMERATOR
private:
mozSqlResult* mResult;
PRInt32 mCurrentIndex;
Row* mCurrentRow;
Row* mBuffer;
};
class mozSqlResultStream : public mozISqlInputStream,
public nsIInputStream
{
public:
mozSqlResultStream(mozSqlResult* aResult);
virtual ~mozSqlResultStream();
NS_DECL_ISUPPORTS
NS_DECL_MOZISQLINPUTSTREAM
NS_DECL_NSIINPUTSTREAM
protected:
nsresult EnsureBuffer();
private:
mozSqlResult* mResult;
char* mBuffer;
PRUint32 mLength;
PRUint32 mPosition;
};
#endif // mozSqlResult_h

View File

@@ -0,0 +1,624 @@
#include "nsReadableUtils.h"
#include "nsXPIDLString.h"
#include "nsCRT.h"
#include "nsIAtom.h"
#include "nsISupportsUtils.h"
#include "nsIServiceManager.h"
#include "rdf.h"
#include "nsRDFCID.h"
#include "nsAppDirectoryServiceDefs.h"
#include "nsNetUtil.h"
#include "nsIRDFXMLSink.h"
#include "nsIWindowWatcher.h"
#include "nsIPrompt.h"
#include "mozSqlService.h"
#include "mozSqlConnection.h"
#define SQL_NAMESPACE_URI "http://www.mozilla.org/SQL-rdf#"
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID);
nsIRDFService* mozSqlService::gRDFService;
nsIRDFContainerUtils* mozSqlService::gRDFContainerUtils;
nsIRDFResource* mozSqlService::kSQL_AliasesRoot;
nsIRDFResource* mozSqlService::kSQL_Name;
nsIRDFResource* mozSqlService::kSQL_Type;
nsIRDFResource* mozSqlService::kSQL_Hostname;
nsIRDFResource* mozSqlService::kSQL_Port;
nsIRDFResource* mozSqlService::kSQL_Database;
mozSqlService::mozSqlService()
: mConnectionCache(nsnull)
{
NS_INIT_ISUPPORTS();
}
mozSqlService::~mozSqlService()
{
gRDFService->UnregisterDataSource(this);
delete mConnectionCache;
NS_IF_RELEASE(kSQL_AliasesRoot);
NS_IF_RELEASE(kSQL_Name);
NS_IF_RELEASE(kSQL_Type);
NS_IF_RELEASE(kSQL_Hostname);
NS_IF_RELEASE(kSQL_Port);
NS_IF_RELEASE(kSQL_Database);
nsServiceManager::ReleaseService(kRDFContainerUtilsCID, gRDFContainerUtils);
gRDFContainerUtils = nsnull;
nsServiceManager::ReleaseService(kRDFServiceCID, gRDFService);
gRDFService = nsnull;
}
NS_IMPL_ISUPPORTS3(mozSqlService,
mozISqlService,
nsIRDFDataSource,
nsIRDFRemoteDataSource);
NS_IMETHODIMP
mozSqlService::GetErrorMessage(nsAString& aErrorMessage)
{
aErrorMessage = mErrorMessage;
return NS_OK;
}
nsresult
mozSqlService::Init()
{
nsresult rv;
rv = nsServiceManager::GetService(kRDFServiceCID, NS_GET_IID(nsIRDFService),
(nsISupports**) &gRDFService);
if (NS_FAILED(rv)) return rv;
rv = nsServiceManager::GetService(kRDFContainerUtilsCID, NS_GET_IID(nsIRDFContainerUtils),
(nsISupports**) &gRDFContainerUtils);
if (NS_FAILED(rv)) return rv;
gRDFService->GetResource(NS_LITERAL_CSTRING("SQL:AliasesRoot"),
&kSQL_AliasesRoot);
gRDFService->GetResource(NS_LITERAL_CSTRING(SQL_NAMESPACE_URI "name"),
&kSQL_Name);
gRDFService->GetResource(NS_LITERAL_CSTRING(SQL_NAMESPACE_URI "type"),
&kSQL_Type);
gRDFService->GetResource(NS_LITERAL_CSTRING(SQL_NAMESPACE_URI "hostname"),
&kSQL_Hostname);
gRDFService->GetResource(NS_LITERAL_CSTRING(SQL_NAMESPACE_URI "port"),
&kSQL_Port);
gRDFService->GetResource(NS_LITERAL_CSTRING(SQL_NAMESPACE_URI "database"),
&kSQL_Database);
nsCOMPtr<nsIFile> file;
rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(file));
if (NS_FAILED(rv)) return rv;
rv = file->AppendNative(NS_LITERAL_CSTRING("sql.rdf"));
if (NS_FAILED(rv)) return rv;
nsCAutoString sql;
NS_GetURLSpecFromFile(file, sql);
rv = gRDFService->GetDataSourceBlocking(sql.get(), getter_AddRefs(mInner));
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIRDFXMLSink> sink = do_QueryInterface(mInner);
if (sink) {
nsCOMPtr<nsIAtom> prefix = getter_AddRefs(NS_NewAtom("SQL"));
sink->AddNameSpace(prefix, NS_ConvertASCIItoUCS2(SQL_NAMESPACE_URI));
}
return gRDFService->RegisterDataSource(this, PR_FALSE);
}
NS_IMETHODIMP
mozSqlService::AddAlias(const nsACString& aURI,
const nsAString& aName,
const nsAString& aType,
const nsAString& aHostname,
PRInt32 aPort,
const nsAString& aDatabase)
{
nsCOMPtr<nsIRDFResource> resource;
gRDFService->GetResource(aURI, getter_AddRefs(resource));
nsCOMPtr<nsIRDFLiteral> rdfLiteral;
nsCOMPtr<nsIRDFInt> rdfInt;
gRDFService->GetLiteral(PromiseFlatString(aName).get(), getter_AddRefs(rdfLiteral));
mInner->Assert(resource, kSQL_Name, rdfLiteral, PR_TRUE);
gRDFService->GetLiteral(PromiseFlatString(aType).get(), getter_AddRefs(rdfLiteral));
mInner->Assert(resource, kSQL_Type, rdfLiteral, PR_TRUE);
gRDFService->GetLiteral(PromiseFlatString(aHostname).get(), getter_AddRefs(rdfLiteral));
mInner->Assert(resource, kSQL_Hostname, rdfLiteral, PR_TRUE);
gRDFService->GetIntLiteral(aPort, getter_AddRefs(rdfInt));
mInner->Assert(resource, kSQL_Port, rdfInt, PR_TRUE);
gRDFService->GetLiteral(PromiseFlatString(aDatabase).get(), getter_AddRefs(rdfLiteral));
mInner->Assert(resource, kSQL_Database, rdfLiteral, PR_TRUE);
nsresult rv = EnsureAliasesContainer();
if (NS_FAILED(rv))
return rv;
mAliasesContainer->AppendElement(resource);
Flush();
return NS_OK;
}
NS_IMETHODIMP
mozSqlService::HasAlias(const nsACString& aURI, PRBool* _retval)
{
nsCOMPtr<nsIRDFResource> resource;
gRDFService->GetResource(aURI, getter_AddRefs(resource));
nsresult rv = EnsureAliasesContainer();
if (NS_FAILED(rv))
return rv;
PRInt32 aliasIndex;
mAliasesContainer->IndexOf(resource, &aliasIndex);
*_retval = aliasIndex != -1;
return NS_OK;
}
NS_IMETHODIMP
mozSqlService::GetAlias(const nsACString& aURI,
nsAString& aName,
nsAString& aType,
nsAString& aHostname,
PRInt32* aPort,
nsAString& aDatabase)
{
nsCOMPtr<nsIRDFResource> resource;
gRDFService->GetResource(aURI, getter_AddRefs(resource));
nsCOMPtr<nsIRDFNode> rdfNode;
nsCOMPtr<nsIRDFLiteral> rdfLiteral;
nsCOMPtr<nsIRDFInt> rdfInt;
const PRUnichar* value;
mInner->GetTarget(resource, kSQL_Name, PR_TRUE, getter_AddRefs(rdfNode));
if (rdfNode) {
rdfLiteral = do_QueryInterface(rdfNode);
rdfLiteral->GetValueConst(&value);
aName.Assign(value);
}
mInner->GetTarget(resource, kSQL_Type, PR_TRUE, getter_AddRefs(rdfNode));
if (rdfNode) {
rdfLiteral = do_QueryInterface(rdfNode);
rdfLiteral->GetValueConst(&value);
aType.Assign(value);
}
mInner->GetTarget(resource, kSQL_Hostname, PR_TRUE, getter_AddRefs(rdfNode));
if (rdfNode) {
rdfLiteral = do_QueryInterface(rdfNode);
rdfLiteral->GetValueConst(&value);
aHostname.Assign(value);
}
mInner->GetTarget(resource, kSQL_Port, PR_TRUE, getter_AddRefs(rdfNode));
if (rdfNode) {
rdfInt = do_QueryInterface(rdfNode);
rdfInt->GetValue(aPort);
}
mInner->GetTarget(resource, kSQL_Database, PR_TRUE, getter_AddRefs(rdfNode));
if (rdfNode) {
rdfLiteral = do_QueryInterface(rdfNode);
rdfLiteral->GetValueConst(&value);
aDatabase.Assign(value);
}
return NS_OK;
}
NS_IMETHODIMP
mozSqlService::UpdateAlias(const nsACString& aURI,
const nsAString& aName,
const nsAString& aType,
const nsAString& aHostname,
PRInt32 aPort,
const nsAString& aDatabase)
{
nsCOMPtr<nsIRDFResource> resource;
gRDFService->GetResource(aURI, getter_AddRefs(resource));
nsCOMPtr<nsIRDFNode> rdfNode;
nsCOMPtr<nsIRDFLiteral> rdfLiteral;
nsCOMPtr<nsIRDFInt> rdfInt;
mInner->GetTarget(resource, kSQL_Name, PR_TRUE, getter_AddRefs(rdfNode));
gRDFService->GetLiteral(PromiseFlatString(aName).get(), getter_AddRefs(rdfLiteral));
mInner->Change(resource, kSQL_Name, rdfNode, rdfLiteral);
mInner->GetTarget(resource, kSQL_Type, PR_TRUE, getter_AddRefs(rdfNode));
gRDFService->GetLiteral(PromiseFlatString(aType).get(), getter_AddRefs(rdfLiteral));
mInner->Change(resource, kSQL_Type, rdfNode, rdfLiteral);
mInner->GetTarget(resource, kSQL_Hostname, PR_TRUE, getter_AddRefs(rdfNode));
gRDFService->GetLiteral(PromiseFlatString(aHostname).get(), getter_AddRefs(rdfLiteral));
mInner->Change(resource, kSQL_Hostname, rdfNode, rdfLiteral);
mInner->GetTarget(resource, kSQL_Port, PR_TRUE, getter_AddRefs(rdfNode));
gRDFService->GetIntLiteral(aPort, getter_AddRefs(rdfInt));
mInner->Change(resource, kSQL_Port, rdfNode, rdfInt);
mInner->GetTarget(resource, kSQL_Database, PR_TRUE, getter_AddRefs(rdfNode));
gRDFService->GetLiteral(PromiseFlatString(aDatabase).get(), getter_AddRefs(rdfLiteral));
mInner->Change(resource, kSQL_Database, rdfNode, rdfLiteral);
Flush();
return NS_OK;
}
NS_IMETHODIMP
mozSqlService::RemoveAlias(const nsACString &aURI)
{
nsCOMPtr<nsIRDFResource> resource;
gRDFService->GetResource(aURI, getter_AddRefs(resource));
nsCOMPtr<nsIRDFNode> rdfNode;
mInner->GetTarget(resource, kSQL_Name, PR_TRUE, getter_AddRefs(rdfNode));
mInner->Unassert(resource, kSQL_Name, rdfNode);
mInner->GetTarget(resource, kSQL_Type, PR_TRUE, getter_AddRefs(rdfNode));
mInner->Unassert(resource, kSQL_Type, rdfNode);
mInner->GetTarget(resource, kSQL_Hostname, PR_TRUE, getter_AddRefs(rdfNode));
mInner->Unassert(resource, kSQL_Hostname, rdfNode);
mInner->GetTarget(resource, kSQL_Port, PR_TRUE, getter_AddRefs(rdfNode));
mInner->Unassert(resource, kSQL_Port, rdfNode);
mInner->GetTarget(resource, kSQL_Database, PR_TRUE, getter_AddRefs(rdfNode));
mInner->Unassert(resource, kSQL_Database, rdfNode);
nsresult rv = EnsureAliasesContainer();
if (NS_FAILED(rv))
return rv;
mAliasesContainer->RemoveElement(resource, PR_TRUE);
Flush();
return NS_OK;
}
NS_IMETHODIMP
mozSqlService::GetConnection(const nsACString &aURI, mozISqlConnection **_retval)
{
nsCStringKey key(aURI);
nsCOMPtr<nsIWeakReference> weakRef;
nsCOMPtr<mozISqlConnection> conn;
if (mConnectionCache) {
weakRef = getter_AddRefs(NS_STATIC_CAST(nsIWeakReference*, mConnectionCache->Get(&key)));
if (weakRef) {
conn = do_QueryReferent(weakRef);
if (conn)
NS_ADDREF(*_retval = conn);
}
}
if (! *_retval) {
nsresult rv = GetNewConnection(aURI, getter_AddRefs(conn));
if (NS_FAILED(rv))
return rv;
weakRef = do_GetWeakReference(conn);
if (! mConnectionCache)
mConnectionCache = new nsSupportsHashtable(16);
mConnectionCache->Put(&key, weakRef);
NS_ADDREF(*_retval = conn);
}
return NS_OK;
}
NS_IMETHODIMP
mozSqlService::GetNewConnection(const nsACString &aURI, mozISqlConnection **_retval)
{
PRBool hasAlias;
HasAlias(aURI, &hasAlias);
if (!hasAlias)
return NS_ERROR_FAILURE;
nsresult rv;
nsAutoString name;
nsAutoString type;
nsAutoString hostname;
PRInt32 port;
nsAutoString database;
GetAlias(aURI, name, type, hostname, &port, database);
nsCAutoString contractID(
NS_LITERAL_CSTRING("@mozilla.org/sql/connection;1?type=") +
NS_ConvertUCS2toUTF8(type));
nsCOMPtr<mozISqlConnection> conn = do_CreateInstance(contractID.get());
if (! conn)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIWindowWatcher> watcher(do_GetService(NS_WINDOWWATCHER_CONTRACTID));
nsCOMPtr<nsIPrompt> prompter;
watcher->GetNewPrompter(0, getter_AddRefs(prompter));
PRBool retval;
do {
nsXPIDLString username;
nsXPIDLString password;
prompter->PromptUsernameAndPassword(
nsnull, // in wstring dialogTitle
nsnull, // in wstring text
getter_Copies(username),
getter_Copies(password),
nsnull, // in wstring checkMsg
nsnull, // inout boolean checkValue
&retval
);
if (retval) {
rv = conn->Init(hostname, port, database, username, password);
if (NS_FAILED(rv)) {
conn->GetErrorMessage(mErrorMessage);
prompter->Alert(nsnull, mErrorMessage.get());
}
}
} while(retval && NS_FAILED(rv));
NS_IF_ADDREF(*_retval = conn);
return rv;
}
NS_IMETHODIMP
mozSqlService::GetURI(char** aURI)
{
if (!aURI)
return NS_ERROR_NULL_POINTER;
*aURI = nsCRT::strdup("rdf:sql");
if (!(*aURI))
return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
NS_IMETHODIMP
mozSqlService::GetSource(nsIRDFResource* aProperty,
nsIRDFNode* aTarget,
PRBool aTruthValue,
nsIRDFResource** aSource)
{
return mInner->GetSource(aProperty, aTarget, aTruthValue, aSource);
}
NS_IMETHODIMP
mozSqlService::GetSources(nsIRDFResource* aProperty,
nsIRDFNode* aTarget,
PRBool aTruthValue,
nsISimpleEnumerator** aSources) {
return mInner->GetSources(aProperty, aTarget, aTruthValue, aSources);
}
NS_IMETHODIMP
mozSqlService::GetTarget(nsIRDFResource* aSource,
nsIRDFResource* aProperty,
PRBool aTruthValue,
nsIRDFNode** aTarget) {
return mInner->GetTarget(aSource, aProperty, aTruthValue, aTarget);
}
NS_IMETHODIMP
mozSqlService::GetTargets(nsIRDFResource* aSource,
nsIRDFResource* aProperty,
PRBool aTruthValue,
nsISimpleEnumerator** aTargets) {
return mInner->GetTargets(aSource, aProperty, aTruthValue, aTargets);
}
NS_IMETHODIMP
mozSqlService::Assert(nsIRDFResource* aSource,
nsIRDFResource* aProperty,
nsIRDFNode* aTarget,
PRBool aTruthValue)
{
return mInner->Assert(aSource, aProperty, aTarget, aTruthValue);
}
NS_IMETHODIMP
mozSqlService::Unassert(nsIRDFResource* aSource,
nsIRDFResource* aProperty,
nsIRDFNode* aTarget)
{
return mInner->Unassert(aSource, aProperty, aTarget);
}
NS_IMETHODIMP
mozSqlService::Change(nsIRDFResource* aSource,
nsIRDFResource* aProperty,
nsIRDFNode* aOldTarget,
nsIRDFNode* aNewTarget)
{
return mInner->Change(aSource, aProperty, aOldTarget, aNewTarget);
}
NS_IMETHODIMP
mozSqlService::Move(nsIRDFResource* aOldSource,
nsIRDFResource* aNewSource,
nsIRDFResource* aProperty,
nsIRDFNode* aTarget)
{
return mInner->Move(aOldSource, aNewSource, aProperty, aTarget);
}
NS_IMETHODIMP
mozSqlService::HasAssertion(nsIRDFResource* aSource,
nsIRDFResource* aProperty,
nsIRDFNode* aTarget,
PRBool aTruthValue,
PRBool* hasAssertion)
{
return mInner->HasAssertion(aSource, aProperty, aTarget, aTruthValue, hasAssertion);
}
NS_IMETHODIMP
mozSqlService::AddObserver(nsIRDFObserver* aObserver)
{
return mInner->AddObserver(aObserver);
}
NS_IMETHODIMP
mozSqlService::RemoveObserver(nsIRDFObserver* aObserver)
{
return mInner->RemoveObserver(aObserver);
}
NS_IMETHODIMP
mozSqlService::HasArcIn(nsIRDFNode* aNode,
nsIRDFResource* aArc,
PRBool* _retval)
{
return mInner->HasArcIn(aNode, aArc, _retval);
}
NS_IMETHODIMP
mozSqlService::HasArcOut(nsIRDFResource* aSource,
nsIRDFResource* aArc,
PRBool* _retval)
{
return mInner->HasArcOut(aSource, aArc, _retval);
}
NS_IMETHODIMP
mozSqlService::ArcLabelsIn(nsIRDFNode* aNode,
nsISimpleEnumerator** aLabels)
{
return mInner->ArcLabelsIn(aNode, aLabels);
}
NS_IMETHODIMP
mozSqlService::ArcLabelsOut(nsIRDFResource* aSource,
nsISimpleEnumerator** aLabels)
{
return mInner->ArcLabelsIn(aSource, aLabels);
}
NS_IMETHODIMP
mozSqlService::GetAllResources(nsISimpleEnumerator** aResult)
{
return mInner->GetAllResources(aResult);
}
NS_IMETHODIMP
mozSqlService::GetAllCmds(nsIRDFResource* aSource,
nsISimpleEnumerator** aCommands)
{
return mInner->GetAllCmds(aSource, aCommands);
}
NS_IMETHODIMP
mozSqlService::IsCommandEnabled(nsISupportsArray* aSources,
nsIRDFResource* aCommand,
nsISupportsArray* aArguments,
PRBool* aResult)
{
return mInner->IsCommandEnabled(aSources, aCommand, aArguments, aResult);
}
NS_IMETHODIMP
mozSqlService::DoCommand(nsISupportsArray* aSources,
nsIRDFResource* aCommand,
nsISupportsArray* aArguments)
{
return mInner->DoCommand(aSources, aCommand, aArguments);
}
NS_IMETHODIMP
mozSqlService::BeginUpdateBatch()
{
return mInner->BeginUpdateBatch();
}
NS_IMETHODIMP
mozSqlService::EndUpdateBatch()
{
return mInner->EndUpdateBatch();
}
// nsIRDFRemoteDataSource
NS_IMETHODIMP
mozSqlService::GetLoaded(PRBool* aResult)
{
nsCOMPtr<nsIRDFRemoteDataSource> remote(do_QueryInterface(mInner));
return remote->GetLoaded(aResult);
}
NS_IMETHODIMP
mozSqlService::Init(const char* aURI)
{
return NS_OK;
}
NS_IMETHODIMP
mozSqlService::Refresh(PRBool aBlocking)
{
nsCOMPtr<nsIRDFRemoteDataSource> remote(do_QueryInterface(mInner));
return remote->Refresh(aBlocking);
}
NS_IMETHODIMP
mozSqlService::Flush()
{
nsCOMPtr<nsIRDFRemoteDataSource> remote(do_QueryInterface(mInner));
return remote->Flush();
}
NS_IMETHODIMP
mozSqlService::FlushTo(const char *aURI)
{
nsCOMPtr<nsIRDFRemoteDataSource> remote(do_QueryInterface(mInner));
return remote->FlushTo(aURI);
}
nsresult
mozSqlService::EnsureAliasesContainer()
{
if (! mAliasesContainer) {
PRBool isContainer;
nsresult rv = gRDFContainerUtils->IsContainer(mInner, kSQL_AliasesRoot, &isContainer);
if (NS_FAILED(rv)) return rv;
if (!isContainer) {
rv = gRDFContainerUtils->MakeSeq(mInner, kSQL_AliasesRoot, getter_AddRefs(mAliasesContainer));
if (NS_FAILED(rv)) return rv;
}
else {
mAliasesContainer = do_CreateInstance(NS_RDF_CONTRACTID "/container;1", &rv);
if (NS_FAILED(rv)) return rv;
rv = mAliasesContainer->Init(mInner, kSQL_AliasesRoot);
if (NS_FAILED(rv)) return rv;
}
}
return NS_OK;
}

View File

@@ -0,0 +1,52 @@
#ifndef mozSqlService_h
#define mozSqlService_h
#include "nsHashtable.h"
#include "nsIRDFDataSource.h"
#include "nsIRDFRemoteDataSource.h"
#include "nsIRDFService.h"
#include "nsIRDFContainerUtils.h"
#include "mozISqlService.h"
#define MOZ_SQLSERVICE_CLASSNAME "SQL service"
#define MOZ_SQLSERVICE_CID \
{0x1ceb35b7, 0xdaa8, 0x4ce4, {0xac, 0x67, 0x12, 0x5f, 0xb1, 0x7c, 0xb0, 0x19}}
#define MOZ_SQLSERVICE_CONTRACTID "@mozilla.org/sql/service;1"
#define MOZ_SQLDATASOURCE_CONTRACTID "@mozilla.org/rdf/datasource;1?name=sql"
class mozSqlService : public mozISqlService,
public nsIRDFDataSource,
public nsIRDFRemoteDataSource
{
public:
mozSqlService();
virtual ~mozSqlService();
nsresult Init();
NS_DECL_ISUPPORTS
NS_DECL_MOZISQLSERVICE
NS_DECL_NSIRDFDATASOURCE
NS_DECL_NSIRDFREMOTEDATASOURCE
protected:
nsresult EnsureAliasesContainer();
private:
static nsIRDFService* gRDFService;
static nsIRDFContainerUtils* gRDFContainerUtils;
static nsIRDFResource* kSQL_AliasesRoot;
static nsIRDFResource* kSQL_Name;
static nsIRDFResource* kSQL_Type;
static nsIRDFResource* kSQL_Hostname;
static nsIRDFResource* kSQL_Port;
static nsIRDFResource* kSQL_Database;
nsString mErrorMessage;
nsCOMPtr<nsIRDFDataSource> mInner;
nsCOMPtr<nsIRDFContainer> mAliasesContainer;
nsSupportsHashtable* mConnectionCache;
};
#endif /* mozSqlService_h */

View File

@@ -0,0 +1,21 @@
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = \
src
include $(topsrcdir)/config/rules.mk
XPI_FILE = sql-$(shell date +%Y%m%d)-$(OS_ARCH).xpi
xpi:
zip -j $(DIST)/$(XPI_FILE) $(srcdir)/install.js
cd $(DIST); zip -r $(XPI_FILE) \
bin/components/sql.xpt \
bin/components/sqlpgsql.xpt \
bin/components/$(LIB_PREFIX)sql$(DLL_SUFFIX) \
bin/chrome/sql.jar

View File

@@ -0,0 +1,58 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
var srDest = 200;
var err = initInstall("SQL Support", "SQL", "0.1");
logComment("initInstall: " + err);
var fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if (verifyDiskSpace(fProgram, srDest))
{
err = addDirectory("Program", "0.1", "bin", fProgram, "", true);
logComment("addDirectory() returned: " + err);
var chromeFolder = getFolder("Chrome", "sql.jar");
registerChrome(CONTENT | DELAYED_CHROME, chromeFolder, "content/sql/");
registerChrome(LOCALE | DELAYED_CHROME, chromeFolder, "locale/en-US/sql/");
err = getLastError();
if (err == ACCESS_DENIED) {
alert("Unable to write to program directory " + fProgram + ".\n You will need to restart the browser with administrator/root privileges to install this software. After installing as root (or administrator), you will need to restart the browser one more time to register the installed software.\n After the second restart, you can go back to running the browser without privileges!");
cancelInstall(err);
logComment("cancelInstall() due to error: " + err);
}
else if (err != SUCCESS) {
cancelInstall(err);
logComment("cancelInstall() due to error: " + err);
}
else {
performInstall();
logComment("performInstall() returned: " + err);
}
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);

View File

@@ -0,0 +1,40 @@
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = sql
MODULE_NAME = sqlModule
LIBRARY_NAME = sql
SHORT_LIBNAME = sql
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
REQUIRES = xpcom \
string \
rdf \
$(NULL)
CPPSRCS = \
mozSqlModule.cpp
SHARED_LIBRARY_LIBS = \
$(DIST)/lib/$(LIB_PREFIX)sqlbase_s.$(LIB_SUFFIX)
EXTRA_DSO_LDOPTS = \
$(MOZ_COMPONENT_LIBS) \
$(MOZ_UNICHARUTIL_LIBS) \
$(NULL)
ifdef MOZ_ENABLE_PGSQL
DEFINES += -DMOZ_ENABLE_PGSQL
SHARED_LIBRARY_LIBS += $(DIST)/lib/$(LIB_PREFIX)sqlpgsql_s.$(LIB_SUFFIX)
EXTRA_DSO_LDOPTS += -L$(MOZ_PGSQL_LIBS) -lpq
endif
include $(topsrcdir)/config/rules.mk
ifdef MOZ_ENABLE_PGSQL
INCLUDES += -I$(MOZ_PGSQL_INCLUDES)
endif

View File

@@ -0,0 +1,33 @@
#include "nsIGenericFactory.h"
#include "mozSqlService.h"
#ifdef MOZ_ENABLE_PGSQL
#include "mozSqlConnectionPgsql.h"
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozSqlService, Init)
#ifdef MOZ_ENABLE_PGSQL
NS_GENERIC_FACTORY_CONSTRUCTOR(mozSqlConnectionPgsql)
#endif
static nsModuleComponentInfo components[] =
{
{ MOZ_SQLSERVICE_CLASSNAME,
MOZ_SQLSERVICE_CID,
MOZ_SQLSERVICE_CONTRACTID,
mozSqlServiceConstructor
},
{ MOZ_SQLSERVICE_CLASSNAME,
MOZ_SQLSERVICE_CID,
MOZ_SQLDATASOURCE_CONTRACTID,
mozSqlServiceConstructor
},
#ifdef MOZ_ENABLE_PGSQL
{ MOZ_SQLCONNECTIONPGSQL_CLASSNAME,
MOZ_SQLCONNECTIONPGSQL_CID,
MOZ_SQLCONNECTIONPGSQL_CONTRACTID,
mozSqlConnectionPgsqlConstructor
}
#endif
};
NS_IMPL_NSGETMODULE("sql", components)

View File

@@ -0,0 +1,10 @@
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
DIRS = \
public \
src
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,14 @@
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
MODULE = sql
XPIDL_MODULE = sqlpgsql
XPIDLSRCS = \
mozISqlConnectionPgsql.idl \
mozISqlResultPgsql.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,8 @@
#include "nsISupports.idl"
[scriptable, uuid(0cf1eefe-611d-48fa-ae27-0a6f40d6a33e)]
interface mozISqlConnectionPgsql : nsISupports
{
};

View File

@@ -0,0 +1,8 @@
#include "nsISupports.idl"
[scriptable, uuid(f6573169-286d-4a20-8253-9abb07bdba29)]
interface mozISqlResultPgsql : nsISupports
{
};

View File

@@ -0,0 +1,28 @@
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = sql
LIBRARY_NAME = sqlpgsql_s
REQUIRES = xpcom \
string \
locale \
rdf \
$(NULL)
CPPSRCS = \
mozSqlConnectionPgsql.cpp \
mozSqlResultPgsql.cpp
EXPORTS = \
mozSqlConnectionPgsql.h \
mozSqlResultPgsql.h
FORCE_STATIC_LIB=1
include $(topsrcdir)/config/rules.mk
INCLUDES += -I$(MOZ_PGSQL_INCLUDES)

View File

@@ -0,0 +1,240 @@
#include "prprf.h"
#include "mozSqlConnectionPgsql.h"
#include "mozSqlResultPgsql.h"
mozSqlConnectionPgsql::mozSqlConnectionPgsql()
: mConnection(nsnull)
{
}
mozSqlConnectionPgsql::~mozSqlConnectionPgsql()
{
if (mConnection)
PQfinish(mConnection);
}
NS_IMPL_ADDREF_INHERITED(mozSqlConnectionPgsql, mozSqlConnection)
NS_IMPL_RELEASE_INHERITED(mozSqlConnectionPgsql, mozSqlConnection)
// QueryInterface
NS_INTERFACE_MAP_BEGIN(mozSqlConnectionPgsql)
NS_INTERFACE_MAP_ENTRY(mozISqlConnectionPgsql)
NS_INTERFACE_MAP_END_INHERITING(mozSqlConnection)
NS_IMETHODIMP
mozSqlConnectionPgsql::Init(const nsAString & aHost, PRInt32 aPort,
const nsAString & aDatabase, const nsAString & aUsername,
const nsAString & aPassword)
{
if (mConnection)
return NS_OK;
if (aPort == -1)
aPort = 5432;
char port[11];
char options[] = "";
char tty[] = "";
PR_snprintf(port, 11, "%d", aPort);
mConnection = PQsetdbLogin(NS_ConvertUCS2toUTF8(aHost).get(),
port, options, tty,
NS_ConvertUCS2toUTF8(aDatabase).get(),
NS_ConvertUCS2toUTF8(aUsername).get(),
NS_ConvertUCS2toUTF8(aPassword).get());
return Setup();
}
NS_IMETHODIMP
mozSqlConnectionPgsql::GetPrimaryKeys(const nsAString& aSchema, const nsAString& aTable, mozISqlResult** _retval)
{
nsAutoString select;
nsAutoString from;
nsAutoString where;
if (mVersion >= SERVER_VERSION(7,3,0)) {
select = NS_LITERAL_STRING("SELECT n.nspname AS TABLE_SCHEM, ");
from = NS_LITERAL_STRING(" FROM pg_catalog.pg_namespace n, pg_catalog.pg_class ct, pg_catalog.pg_class ci, pg_catalog.pg_attribute a, pg_catalog.pg_index i");
where = NS_LITERAL_STRING(" AND ct.relnamespace = n.oid ");
if (!aSchema.IsEmpty()) {
where.Append(NS_LITERAL_STRING(" AND n.nspname = '") + aSchema);
where.Append(PRUnichar('\''));
}
}
else {
select = NS_LITERAL_STRING("SELECT NULL AS TABLE_SCHEM, ");
from = NS_LITERAL_STRING(" FROM pg_class ct, pg_class ci, pg_attribute a, pg_index i ");
}
if (!aTable.IsEmpty()) {
where.Append(NS_LITERAL_STRING(" AND ct.relname = '") + aTable);
where.Append(PRUnichar('\''));
}
NS_NAMED_LITERAL_STRING(select2, " ct.relname AS TABLE_NAME, a.attname AS COLUMN_NAME, a.attnum AS KEY_SEQ, ci.relname AS PK_NAME ");
NS_NAMED_LITERAL_STRING(where2, " WHERE ct.oid=i.indrelid AND ci.oid=i.indexrelid AND a.attrelid=ci.oid AND i.indisprimary ");
NS_NAMED_LITERAL_STRING(order2, " ORDER BY table_name, pk_name, key_seq");
return RealExec(select + select2 + from + where2 + where + order2, _retval, nsnull);
}
nsresult
mozSqlConnectionPgsql::Setup()
{
if (PQstatus(mConnection) == CONNECTION_BAD) {
mErrorMessage.Assign(NS_ConvertUTF8toUCS2(PQerrorMessage(mConnection)));
mConnection = nsnull;
return NS_ERROR_FAILURE;
}
PQsetClientEncoding(mConnection, "UNICODE");
/*
PGresult* result = PQexec(mConnection, "SET DATESTYLE TO US");
PRInt32 stat = PQresultStatus(result);
if (stat != PGRES_COMMAND_OK) {
mErrorMessage.Assign(NS_ConvertUTF8toUCS2(PQresultErrorMessage(result)));
PQfinish(mConnection);
mConnection = nsnull;
return NS_ERROR_FAILURE;
}
*/
PGresult* result = PQexec(mConnection, "select version()");
PRInt32 stat = PQresultStatus(result);
if (stat != PGRES_TUPLES_OK) {
mErrorMessage.Assign(NS_ConvertUTF8toUCS2(PQresultErrorMessage(result)));
return NS_ERROR_FAILURE;
}
char* version = PQgetvalue(result, 0, 0);
NS_ConvertUTF8toUCS2 buffer(version);
nsAString::const_iterator start, end, iter;
buffer.BeginReading(iter);
buffer.EndReading(end);
while (iter != end && !nsCRT::IsAsciiSpace(*iter))
++iter;
while (iter != end && nsCRT::IsAsciiSpace(*iter))
++iter;
start = iter;
while (iter != end && !nsCRT::IsAsciiSpace(*iter))
++iter;
mServerVersion = Substring(start,iter);
PRInt32 numbers[3] = {0,0,0};
mServerVersion.BeginReading(iter);
mServerVersion.EndReading(end);
for (PRInt32 i = 0; i < 3; i++) {
start = iter;
while (iter != end && *iter != PRUnichar('.'))
++iter;
nsAutoString v(Substring(start,iter));
PRInt32 err;
numbers[i] = v.ToInteger(&err);
while (iter != end && *iter == PRUnichar('.'))
++iter;
}
mVersion = SERVER_VERSION(numbers[0], numbers[1], numbers[2]);
return NS_OK;
}
nsresult
mozSqlConnectionPgsql::RealExec(const nsAString& aQuery,
mozISqlResult** aResult, PRInt32* aAffectedRows)
{
if (! mConnection)
return NS_ERROR_NOT_INITIALIZED;
PGresult* r;
r = PQexec(mConnection, NS_ConvertUCS2toUTF8(aQuery).get());
PRInt32 stat = PQresultStatus(r);
if (PQstatus(mConnection) == CONNECTION_BAD) {
PQreset(mConnection);
nsresult rv = Setup();
if (NS_FAILED(rv))
return rv;
r = PQexec(mConnection, NS_ConvertUCS2toUTF8(aQuery).get());
stat = PQresultStatus(r);
}
if (stat == PGRES_TUPLES_OK) {
if (!aResult)
return NS_ERROR_NULL_POINTER;
static char select1[] = "select t.oid, case when t.typbasetype = 0 then t.typname else (select t2.typname from pg_type t2 where t2.oid=t.typbasetype) end as typname from pg_type t where t.oid in (";
static char select2[] = "select oid, typname from pg_type where oid in (";
char* select;
if (mVersion >= SERVER_VERSION(7,3,0))
select = select1;
else
select = select2;
PRInt32 columnCount = PQnfields(r);
char* query = (char*)malloc(strlen(select) + columnCount * 11 + 2);
strcpy(query, select);
for (PRInt32 i = 0; i < columnCount; i++) {
PRInt32 oid = PQftype(r, i);
char oidStr[11];
if (i)
sprintf(oidStr, ",%d", oid);
else
sprintf(oidStr, "%d", oid);
strcat(query, oidStr);
}
strcat(query, ")");
PGresult* types = PQexec(mConnection, query);
free(query);
stat = PQresultStatus(types);
if (stat != PGRES_TUPLES_OK) {
mErrorMessage.Assign(NS_ConvertUTF8toUCS2(PQresultErrorMessage(types)));
return NS_ERROR_FAILURE;
}
if (*aResult) {
((mozSqlResultPgsql*)*aResult)->SetResult(r, types);
nsresult rv = ((mozSqlResult*)*aResult)->Rebuild();
if (NS_FAILED(rv))
return rv;
NS_ADDREF(*aResult);
}
else {
mozSqlResult* result = new mozSqlResultPgsql(this, aQuery);
if (! result)
return NS_ERROR_OUT_OF_MEMORY;
((mozSqlResultPgsql*)result)->SetResult(r, types);
nsresult rv = result->Init();
if (NS_FAILED(rv))
return rv;
NS_ADDREF(*aResult = result);
}
}
else if (stat == PGRES_COMMAND_OK) {
if (!aAffectedRows)
return NS_ERROR_NULL_POINTER;
PR_sscanf(PQcmdTuples(r), "%d", aAffectedRows);
mLastID = PQoidValue(r);
}
else {
mErrorMessage.Assign(NS_ConvertUTF8toUCS2(PQresultErrorMessage(r)));
return NS_ERROR_FAILURE;
}
return NS_OK;
}
nsresult
mozSqlConnectionPgsql::CancelExec()
{
if (!PQrequestCancel(mConnection)) {
mErrorMessage.Assign(NS_ConvertUTF8toUCS2(PQerrorMessage(mConnection)));
return NS_ERROR_FAILURE;
}
return NS_OK;
}
nsresult
mozSqlConnectionPgsql::GetIDName(nsAString& aIDName)
{
aIDName = NS_LITERAL_STRING("OID");
return NS_OK;
}

View File

@@ -0,0 +1,47 @@
#ifndef mozSqlConnectionPgsql_h
#define mozSqlConnectionPgsql_h
#include "libpq-fe.h"
#include "mozSqlConnection.h"
#include "mozISqlConnectionPgsql.h"
#define MOZ_SQLCONNECTIONPGSQL_CLASSNAME "PosgreSQL SQL Connection"
#define MOZ_SQLCONNECTIONPGSQL_CID \
{0x0cf1eefe, 0x611d, 0x48fa, {0xae, 0x27, 0x0a, 0x6f, 0x40, 0xd6, 0xa3, 0x3e }}
#define MOZ_SQLCONNECTIONPGSQL_CONTRACTID "@mozilla.org/sql/connection;1?type=pgsql"
#define SERVER_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
class mozSqlConnectionPgsql : public mozSqlConnection,
public mozISqlConnectionPgsql
{
public:
mozSqlConnectionPgsql();
virtual ~mozSqlConnectionPgsql();
NS_DECL_ISUPPORTS
NS_IMETHOD Init(const nsAString& aHost, PRInt32 aPort,
const nsAString& aDatabase, const nsAString& aUsername,
const nsAString& aPassword);
NS_IMETHOD GetPrimaryKeys(const nsAString& aSchema, const nsAString& aTable, mozISqlResult** _retval);
NS_DECL_MOZISQLCONNECTIONPGSQL
protected:
nsresult Setup();
virtual nsresult RealExec(const nsAString& aQuery,
mozISqlResult** aResult, PRInt32* aAffectedRows);
virtual nsresult CancelExec();
virtual nsresult GetIDName(nsAString& aIDName);
private:
PGconn* mConnection;
PRInt32 mVersion;
};
#endif // mozSqlConnectionPgsql_h

View File

@@ -0,0 +1,235 @@
#include "prprf.h"
#include "nsReadableUtils.h"
#include "mozSqlResultPgsql.h"
mozSqlResultPgsql::mozSqlResultPgsql(mozISqlConnection* aConnection,
const nsAString& aQuery)
: mozSqlResult(aConnection, aQuery),
mResult(nsnull),
mTypes(nsnull)
{
}
void
mozSqlResultPgsql::SetResult(PGresult* aResult,
PGresult* aTypes)
{
mResult = aResult;
mTypes = aTypes;
}
mozSqlResultPgsql::~mozSqlResultPgsql()
{
ClearNativeResult();
}
NS_IMPL_ADDREF_INHERITED(mozSqlResultPgsql, mozSqlResult)
NS_IMPL_RELEASE_INHERITED(mozSqlResultPgsql, mozSqlResult)
// QueryInterface
NS_INTERFACE_MAP_BEGIN(mozSqlResultPgsql)
NS_INTERFACE_MAP_ENTRY(mozISqlResultPgsql)
NS_INTERFACE_MAP_END_INHERITING(mozSqlResult)
PRInt32
mozSqlResultPgsql::GetColType(PRInt32 aColumnIndex)
{
PRInt32 oid = PQftype(mResult, aColumnIndex);
for (PRInt32 i = 0; i < PQntuples(mTypes); i++) {
char* value = PQgetvalue(mTypes, i, 0);
PRInt32 o;
PR_sscanf(value, "%d", &o);
if (o == oid) {
char* type = PQgetvalue(mTypes, i, 1);
if (! strcmp(type, "int2"))
return mozISqlResult::TYPE_INT;
else if (! strcmp(type, "int4"))
return mozISqlResult::TYPE_INT;
else if (! strcmp(type, "float4"))
return mozISqlResult::TYPE_STRING;
else if (! strcmp(type, "numeric"))
return mozISqlResult::TYPE_STRING;
else if (! strcmp(type, "date"))
return mozISqlResult::TYPE_STRING;
else if (! strcmp(type, "time"))
return mozISqlResult::TYPE_STRING;
else if (! strcmp(type, "timestamp"))
return mozISqlResult::TYPE_STRING;
else if (! strcmp(type, "bool"))
return mozISqlResult::TYPE_BOOL;
else
return mozISqlResult::TYPE_STRING;
}
}
return mozISqlResult::TYPE_STRING;
}
nsresult
mozSqlResultPgsql::BuildColumnInfo()
{
for (PRInt32 i = 0; i < PQnfields(mResult); i++) {
char* n = PQfname(mResult, i);
PRUnichar* name = ToNewUnicode(NS_ConvertUTF8toUCS2(n));
PRInt32 type = GetColType(i);
PRInt32 size = PQfsize(mResult, i);
PRInt32 mod = PQfmod(mResult, i);
nsCAutoString uri(NS_LITERAL_CSTRING("http://www.mozilla.org/SQL-rdf#"));
uri.Append(n);
nsCOMPtr<nsIRDFResource> property;
gRDFService->GetResource(uri, getter_AddRefs(property));
ColumnInfo* columnInfo = ColumnInfo::Create(mAllocator, name, type, size, mod, property);
mColumnInfo.AppendElement(columnInfo);
}
return NS_OK;
}
nsresult
mozSqlResultPgsql::BuildRows()
{
for(PRInt32 i = 0; i < PQntuples(mResult); i++) {
nsCOMPtr<nsIRDFResource> resource;
nsresult rv = gRDFService->GetAnonymousResource(getter_AddRefs(resource));
if (NS_FAILED(rv)) return rv;
Row* row = Row::Create(mAllocator, resource, mColumnInfo);
for (PRInt32 j = 0; j < mColumnInfo.Count(); j++) {
if (! PQgetisnull(mResult, i, j)) {
char* value = PQgetvalue(mResult, i, j);
Cell* cell = row->mCells[j];
cell->SetNull(PR_FALSE);
PRInt32 type = cell->GetType();
if (type == mozISqlResult::TYPE_STRING)
cell->SetString(ToNewUnicode(NS_ConvertUTF8toUCS2(value)));
else if (type == mozISqlResult::TYPE_INT)
PR_sscanf(value, "%d", &cell->mInt);
else if (type == mozISqlResult::TYPE_FLOAT)
PR_sscanf(value, "%f", &cell->mFloat);
else if (type == mozISqlResult::TYPE_DECIMAL)
PR_sscanf(value, "%f", &cell->mFloat);
else if (type == mozISqlResult::TYPE_DATE ||
type == mozISqlResult::TYPE_TIME ||
type == mozISqlResult::TYPE_DATETIME)
PR_ParseTimeString(value, PR_FALSE, &cell->mDate);
else if (type == mozISqlResult::TYPE_BOOL)
cell->mBool = !strcmp(value, "t");
}
}
mRows.AppendElement(row);
nsVoidKey key(resource);
mSources.Put(&key, row);
}
return NS_OK;
}
void
mozSqlResultPgsql::ClearNativeResult()
{
if (mResult) {
PQclear(mResult);
mResult = nsnull;
}
if (mTypes) {
PQclear(mTypes);
mTypes = nsnull;
}
}
nsresult
mozSqlResultPgsql::EnsureTablePrivileges()
{
nsresult rv = EnsureTableName();
if (NS_FAILED(rv))
return rv;
NS_NAMED_LITERAL_STRING(select, "select ");
NS_NAMED_LITERAL_STRING(func, "has_table_privilege(SESSION_USER, '");
NS_NAMED_LITERAL_STRING(comma, ", ");
NS_NAMED_LITERAL_STRING(ins, "', 'INSERT')");
NS_NAMED_LITERAL_STRING(upd, "', 'UPDATE')");
NS_NAMED_LITERAL_STRING(del, "','DELETE')");
nsCOMPtr<mozISqlResult> result;
rv = mConnection->ExecuteQuery(
select + func + mTableName + ins +
comma + func + mTableName + upd +
comma + func + mTableName + del,
getter_AddRefs(result));
if (NS_FAILED(rv)) {
mConnection->GetErrorMessage(mErrorMessage);
return rv;
}
nsCOMPtr<mozISqlResultEnumerator> enumerator;
rv = result->Enumerate(getter_AddRefs(enumerator));
if (NS_FAILED(rv))
return rv;
rv = enumerator->First();
if (NS_FAILED(rv))
return rv;
rv = enumerator->GetBool(0, &mCanInsert);
if (NS_FAILED(rv))
return rv;
rv = enumerator->GetBool(1, &mCanUpdate);
if (NS_FAILED(rv))
return rv;
return enumerator->GetBool(2, &mCanDelete);
}
nsresult
mozSqlResultPgsql::CanInsert(PRBool* _retval)
{
if (mCanInsert >= 0) {
*_retval = mCanInsert;
return NS_OK;
}
nsresult rv = EnsureTablePrivileges();
if (NS_FAILED(rv))
return rv;
*_retval = mCanInsert;
return NS_OK;
}
nsresult
mozSqlResultPgsql::CanUpdate(PRBool* _retval)
{
if (mCanUpdate >= 0) {
*_retval = mCanUpdate;
return NS_OK;
}
nsresult rv = EnsureTablePrivileges();
if (NS_FAILED(rv))
return rv;
*_retval = mCanUpdate;
return NS_OK;
}
nsresult
mozSqlResultPgsql::CanDelete(PRBool* _retval)
{
if (mCanDelete >= 0) {
*_retval = mCanDelete;
return NS_OK;
}
nsresult rv = EnsureTablePrivileges();
if (NS_FAILED(rv))
return rv;
*_retval = mCanDelete;
return NS_OK;
}

View File

@@ -0,0 +1,39 @@
#ifndef mozSqlResultPgsql_h
#define mozSqlResultPgsql_h
#include "libpq-fe.h"
#include "mozSqlResult.h"
#include "mozISqlResultPgsql.h"
class mozSqlResultPgsql : public mozSqlResult,
public mozISqlResultPgsql
{
public:
mozSqlResultPgsql(mozISqlConnection* aConnection,
const nsAString& aQuery);
void SetResult(PGresult* aResult,
PGresult* aTypes);
virtual ~mozSqlResultPgsql();
NS_DECL_ISUPPORTS
NS_DECL_MOZISQLRESULTPGSQL
protected:
PRInt32 GetColType(PRInt32 aColumnIndex);
virtual nsresult BuildColumnInfo();
virtual nsresult BuildRows();
virtual void ClearNativeResult();
nsresult EnsureTablePrivileges();
virtual nsresult CanInsert(PRBool* _retval);
virtual nsresult CanUpdate(PRBool* _retval);
virtual nsresult CanDelete(PRBool* _retval);
private:
PGresult* mResult;
PGresult* mTypes;
};
#endif // mozSqlResultPgsql_h

View File

@@ -0,0 +1,15 @@
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
XPI_FILE = sqltest-$(shell date +%Y%m%d).xpi
xpi:
zip -j $(DIST)/$(XPI_FILE) $(srcdir)/install.js
cd $(DIST); zip -r $(XPI_FILE) \
bin/chrome/sqltest.jar

View File

@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:sqltest"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:sqltest"
chrome:displayName="SQL test"
chrome:author="mozilla.org"
chrome:name="sqltest">
</RDF:Description>
</RDF:RDF>

View File

@@ -0,0 +1,57 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
var srDest = 100;
var err = initInstall("SQL test", "SQLTEST", "0.1");
logComment("initInstall: " + err);
var fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if (verifyDiskSpace(fProgram, srDest))
{
err = addDirectory("Program", "0.1", "bin", fProgram, "", true);
logComment("addDirectory() returned: " + err);
var chromeFolder = getFolder("Chrome", "sqltest.jar");
registerChrome(CONTENT | DELAYED_CHROME, chromeFolder, "content/sqltest/");
err = getLastError();
if (err == ACCESS_DENIED) {
alert("Unable to write to program directory " + fProgram + ".\n You will need to restart the browser with administrator/root privileges to install this software. After installing as root (or administrator), you will need to restart the browser one more time to register the installed software.\n After the second restart, you can go back to running the browser without privileges!");
cancelInstall(err);
logComment("cancelInstall() due to error: " + err);
}
else if (err != SUCCESS) {
cancelInstall(err);
logComment("cancelInstall() due to error: " + err);
}
else {
performInstall();
logComment("performInstall() returned: " + err);
}
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);

View File

@@ -0,0 +1,7 @@
sqltest.jar:
content/sqltest/contents.rdf (contents.rdf)
content/sqltest/sqltest.xul (sqltest.xul)
content/sqltest/sqltest.js (sqltest.js)
content/sqltest/sqltest.css (sqltest.css)
content/sqltest/sqltestDialog.xul (sqltestDialog.xul)
content/sqltest/sqltestDialog.js (sqltestDialog.js)

View File

@@ -0,0 +1,8 @@
treechildren:-moz-tree-cell {
border-right: 1px solid ThreeDFace;
border-bottom: 1px solid ThreeDFace;
}
.spacer {
height: 10px;
}

View File

@@ -0,0 +1,126 @@
const alias = "urn:aliases:sqltest";
const complete = Components.interfaces.mozISqlRequest.STATUS_COMPLETE;
var connection;
var result;
var startupObserver = {
onStartRequest: function(request, ctxt) {
},
onStopRequest: function(request, ctxt) {
if (request.status == complete) {
result = request.result;
var ds = result.QueryInterface(Components.interfaces.nsIRDFDataSource);
var menulist = document.getElementById("statesMenulist");
menulist.database.AddDataSource(ds);
menulist.builder.rebuild();
menulist.selectedIndex = 0;
var tree = document.getElementById("statesTree");
tree.database.AddDataSource(ds);
tree.builder.rebuild();
}
else {
alert(request.errorMessage);
}
}
};
var observer = {
onStartRequest: function(request, ctxt) {
},
onStopRequest: function(request, ctxt) {
if (request.status == complete) {
var element = document.getElementById("asyncStateName");
if (request.result.rowCount) {
var enumerator = request.result.enumerate();
enumerator.first();
element.value = enumerator.getVariant(0);
}
else {
element.value = "Not found";
}
}
else {
alert(request.errorMessage);
}
}
};
function init() {
var service = Components.classes["@mozilla.org/sql/service;1"]
.getService(Components.interfaces.mozISqlService);
if (!service.hasAlias(alias)) {
alert("The alias for the sqltest was not defined.");
return;
}
try {
connection = service.getConnection(alias);
}
catch (ex) {
alert(service.errorMessage);
return;
}
var query = "select code, name from states";
var request = connection.asyncExecuteQuery(query, null, startupObserver);
}
function syncFindState() {
var code = document.getElementById("syncStateCode").value
var query = "select name from states where code = '" + code + "'";
try {
var result = connection.executeQuery(query);
var element = document.getElementById("syncStateName");
if (result.rowCount) {
var enumerator = result.enumerate();
enumerator.first();
element.value = enumerator.getVariant(0);
}
else {
element.value = "Not found";
}
}
catch (ex) {
alert(connection.errorMessage);
}
}
function asyncFindState() {
var code = document.getElementById("asyncStateCode").value;
var query = "select name from states where code = '" + code + "'";
var request = connection.asyncExecuteQuery(query, null, observer);
}
function getSelectedRowIndex() {
var tree = document.getElementById("statesTree");
var currentIndex = tree.currentIndex;
var resource = tree.builderView.getResourceAtIndex(currentIndex);
var datasource = result.QueryInterface(Components.interfaces.mozISqlDataSource);
return datasource.getIndexOfResource(resource);
}
function doInsert() {
window.openDialog("sqltestDialog.xul", "testDialog", "chrome,modal=yes,resizable=no", result);
}
function doUpdate() {
var rowIndex = this.getSelectedRowIndex();
window.openDialog("sqltestDialog.xul", "testDialog", "chrome,modal=yes,resizable=no", result, rowIndex);
}
function doDelete() {
var rowIndex = this.getSelectedRowIndex();
var enumerator = result.enumerate();
enumerator.absolute(rowIndex);
try {
enumerator.deleteRow();
}
catch(ex) {
alert(enumerator.errorMessage);
}
}

View File

@@ -0,0 +1,118 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="sqltest.css" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
orient="vertical"
width="640" height="480"
title="SQL test"
onload="init()">
<script type="application/x-javascript" src="sqltest.js"/>
<popupset>
<popup id="editContextMenu">
<menuitem label="Insert" oncommand="doInsert()"/>
<menuitem label="Update" oncommand="doUpdate()"/>
<menuitem label="Delete" oncommand="doDelete()"/>
</popup>
</popupset>
<tabbox flex="1">
<tabs>
<tab label="Sync test"/>
<tab label="Async test"/>
<tab label="Widgets"/>
</tabs>
<tabpanels flex="1">
<vbox>
<text class="label" value="Type a state code and then hit ENTER. You should get a state name."/>
<spacer class="spacer"/>
<grid>
<columns>
<column/>
</columns>
<rows>
<row>
<text class="label" value="State code:"/>
<hbox>
<textbox id="syncStateCode" size="2" maxlength="2" onkeyup="if (event.keyCode == 13) syncFindState()"/>
</hbox>
</row>
<row>
<text class="label" value="State name:"/>
<textbox id="syncStateName"/>
</row>
</rows>
</grid>
</vbox>
<vbox>
<text class="label" value="Type a state code and then hit ENTER. You should get a state name."/>
<spacer class="spacer"/>
<grid>
<columns>
<column/>
</columns>
<rows>
<row>
<text class="label" value="State code:"/>
<hbox>
<textbox id="asyncStateCode" size="2" maxlength="2" onkeyup="if (event.keyCode == 13) asyncFindState()"/>
</hbox>
</row>
<row>
<text class="label" value="State name:"/>
<textbox id="asyncStateName"/>
</row>
</rows>
</grid>
</vbox>
<vbox>
<text class="label" value="You should see a menulist filled with all the states."/>
<spacer class="spacer"/>
<hbox>
<menulist id="statesMenulist"
datasources="rdf:null" ref="SQL:ResultRoot">
<template>
<menupopup>
<menuitem uri="..."
value="rdf:http://www.mozilla.org/SQL-rdf#code"
label="rdf:http://www.mozilla.org/SQL-rdf#name"/>
</menupopup>
</template>
</menulist>
</hbox>
<spacer class="spacer"/>
<text value="You should see codes and names of all states in this tree. You can even edit them using the context menu."/>
<spacer class="spacer"/>
<tree id="statesTree" flex="1"
context="editContextMenu"
seltype="single" enableColumnDrag="true"
datasources="rdf:null" ref="SQL:ResultRoot" flags="dont-build-content">
<treecols>
<treecol id="codeCol"
label="State code"
sort="rdf:http://www.mozilla.org/SQL-rdf#code"
sortActive="true" sortDirection="ascending"/>
<splitter class="tree-splitter"/>
<treecol id="nameCol" flex="1"
label="State name"
sort="rdf:http://www.mozilla.org/SQL-rdf#name"/>
</treecols>
<template>
<treechildren>
<treeitem uri="rdf:*">
<treerow>
<treecell label="rdf:http://www.mozilla.org/SQL-rdf#code"/>
<treecell label="rdf:http://www.mozilla.org/SQL-rdf#name"/>
</treerow>
</treeitem>
</treechildren>
</template>
</tree>
</vbox>
</tabpanels>
</tabbox>
</window>

View File

@@ -0,0 +1,41 @@
var result;
var enumerator;
function init() {
result = window.arguments[0];
enumerator = result.enumerate();
if (window.arguments.length == 2) {
enumerator.absolute(window.arguments[1]);
var columnCount = result.columnCount;
for(var i = 0; i < columnCount; i++) {
if (!enumerator.isNull(i)) {
var element = document.getElementById(result.getColumnName(i));
element.value = enumerator.getVariant(i);
}
}
}
}
function onAccept() {
var columnCount = result.columnCount;
for (var i = 0; i < columnCount; i++) {
var element = document.getElementById(result.getColumnName(i));
if (element.value)
enumerator.setVariant(i, element.value);
else
enumerator.setNull(i);
}
try {
if (window.arguments.length == 2)
enumerator.updateRow();
else
enumerator.insertRow();
}
catch(ex) {
alert(enumerator.errorMessage);
return false;
}
return true;
}

View File

@@ -0,0 +1,33 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<dialog id="testDialog"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="Test dialog"
buttons="accept,cancel" buttonpack="center"
ondialogaccept="return onAccept();"
onload="init()">
<script type="application/x-javascript" src="sqltestDialog.js"/>
<grid flex="1">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row>
<label value="Code:"/>
<hbox>
<textbox id="code" size="2" maxlength="2" oninput="this.value = this.value.toUpperCase()"/>
</hbox>
</row>
<row>
<label value="Name:"/>
<textbox id="name" size="30" maxlength="30"/>
</row>
</rows>
</grid>
</dialog>

View File

@@ -0,0 +1,4 @@
create table states (
code varchar(2) primary key,
name varchar(30)
);

View File

@@ -0,0 +1,51 @@
AL Alabama
AK Alaska
AZ Arizona
AR Arkansas
CA California
CO Colorado
CT Connecticut
DE Delaware
FL Florida
GA Georgia
HI Hawaii
ID Idaho
IL Illinois
IN Indiana
IA Iowa
KS Kansas
KY Kentucky
LA Louisiana
ME Maine
MD Maryland
MA Massachusetts
MI Michigan
MN Minnesota
MS Mississippi
MO Missouri
MT Montana
NE Nebraska
NV Nevada
NH New Hampshire
NJ New Jersey
NM New Mexico
NY New York
NC North Carolina
ND North Dakota
OH Ohio
OK Oklahoma
OR Oregon
PA Pennsylvania
RI Rhode Island
SC South Carolina
SD South Dakota
TN Tennessee
TX Texas
UT Utah
VT Vermont
VA Virginia
WA Washington
DC Washington,D.C.
WV West Virginia
WI Wisconsin
WY Wyoming

View File

@@ -0,0 +1,6 @@
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(topsrcdir)/config/rules.mk

View File

@@ -1,26 +0,0 @@
#
## hostname: fx-linux-tbox
## uname: Linux fx-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 i686 i386 GNU/Linux
#
export CFLAGS="-gstabs+"
export CXXFLAGS="-gstabs+"
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options PROFILE_GEN_SCRIPT=@TOPSRCDIR@/build/profile_pageloader.pl
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
mk_add_options MOZ_MAKE_FLAGS="-j1"
ac_add_options --enable-application=browser
ac_add_options --enable-update-channel=release
ac_add_options --enable-update-packaging
# Don't add explicit optimize flags here, set them in configure.in, see bug 407794.
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --enable-official-branding
CC=/tools/gcc/bin/gcc
CXX=/tools/gcc/bin/g++

View File

@@ -1,268 +0,0 @@
#
## hostname: fx-linux-tbox
## uname: Linux fx-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 i686 i386 GNU/Linux
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
$ENV{CVS_RSH} = "ssh";
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
# To ensure Talkback client builds properly on some Linux boxen where LANG
# is set to "en_US.UTF-8" by default, override that setting here by setting
# it to "en_US.iso885915" (the setting on ocean). Proper fix is to update
# where xrestool is called in the build system so that 'LANG=C' in its
# environment, according to bryner.
$ENV{LANG} = "en_US.iso885915";
# $ENV{MOZ_PACKAGE_MSI}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Controls whether a MSI package is made.
# Requires: Windows and a local MakeMSI installation.
#$ENV{MOZ_PACKAGE_MSI} = 0;
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
#-----------------------------------------------------------------------------
# Default: scp
# Values: scp | rsync
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
# Requires: The selected type requires the command be available both locally
# and on the Talkback server.
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
$BuildAdministrator = 'build@mozilla.org';
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
#- You'll need to change these to suit your machine's needs
$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
#$TestOnly = 0; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
#$BuildLocales = 0; # Do l10n packaging?
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
$ProductName = "Firefox";
$VendorName = 'Mozilla';
$RunMozillaTests = 1; # Allow turning off of all tests if needed.
$RegxpcomTest = 1;
$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
#$BloatTest = 0; # warren memory bloat test
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
$LayoutPerformanceTest = 0; # Tp
$DHTMLPerformanceTest = 0; # Tdhtml
#$QATest = 0;
#$XULWindowOpenTest = 0; # Txul
$StartupPerformanceTest = 0; # Ts
$TestsPhoneHome = 0; # Should test report back to server?
$GraphNameOverride = 'fx-linux-tbox';
# $results_server
#----------------------------------------------------------------------------
# Server on which test results will be accessible. This was originally tegu,
# then became axolotl. Once we moved services from axolotl, it was time
# to give this service its own hostname to make future transitions easier.
# - cmp@mozilla.org
#$results_server = "build-graphs.mozilla.org";
#$pageload_server = "spider"; # localhost
$pageload_server = "pageload.build.mozilla.org";
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 120;
#$AliveTestTimeout = 45;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
#$BloatTestTimeout = 120; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 15; # seconds
#$XULWindowOpenTestTimeout = 150; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
#- Set these to what makes sense for your system
#$Make = 'gmake'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
#$blat = 'c:/nstools/bin/blat';
#$use_blat = 0;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
#$moz_cvsroot = $ENV{CVSROOT};
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
$ObjDir = 'obj-fx-trunk';
# Extra build name, if needed.
$BuildNameExtra = 'Release';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
# CONFIG: $BuildTree = '%buildTree%';
$BuildTree = 'MozillaRelease';
#$BuildName = '';
# CONFIG: $BuildTag = '%productTag%_RELEASE';
$BuildTag = 'FIREFOX_3_0_19_RELEASE';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'firefox-bin';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# Release build options
$ReleaseBuild = 1;
$shiptalkback = 0;
$ReleaseToLatest = 0; # Push the release to latest-<milestone>?
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
$build_hour = 4;
$package_creation_path = "/browser/installer";
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
$ssh_version = "2";
# CONFIG: $ssh_user = "%sshUser%";
$ssh_user = "cltbld";
# CONFIG: $ssh_server = "%sshServer%";
$ssh_server = "stage-old.mozilla.org";
$ftp_path = "/home/ftp/pub/firefox/nightly";
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly";
$tbox_ftp_path = "/home/ftp/pub/firefox/tinderbox-builds";
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds";
# CONFIG: $milestone = "firefox%version%";
$milestone = "firefox3.0.19";
$notify_list = 'build-announce@mozilla.org';
$stub_installer = 0;
$sea_installer = 0;
$archive = 1;
$push_raw_xpis = 0;
$update_pushinfo = 0;
$update_package = 1;
$update_product = "Firefox";
$update_version = "trunk";
$update_platform = "Linux_x86-gcc3";
$update_hash = "sha1";
$update_filehost = 'ftp.mozilla.org';
$update_ver_file = 'browser/config/version.txt';
$crashreporter_buildsymbols = 1;
$crashreporter_pushsymbols = 1;
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
$ENV{'SYMBOL_SERVER_HOST'} = 'dm-symbolpush01.mozilla.org';
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
$ENV{'SYMBOL_SERVER_USER'} = 'ffxbld';
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_ffx';
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/home/cltbld/.ssh/ffxbld_dsa';
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = '';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = '';
# Prevent Extension Manager from spawning child processes during tests
# - processes that tbox scripts cannot kill.
#$ENV{NO_EM_RESTART} = '1';
# Do not build XForms
$BuildXForms = 0;

View File

@@ -1,26 +0,0 @@
#
## hostname: bm-xserve08.build.mozilla.org
## uname: Darwin bm-xserve08.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
#
# symbols for breakpad
export CFLAGS="-g -gfull"
export CXXFLAGS="-g -gfull"
. $topsrcdir/build/macosx/universal/mozconfig
mk_add_options MOZ_MAKE_FLAGS="-j1"
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
mk_add_options MOZ_CO_PROJECT="browser"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build/universal
ac_add_options --enable-application=browser
ac_add_options --enable-update-channel=release
# Don't add explicit optimize flags here, set them in configure.in, see bug 407794.
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --enable-update-packaging
ac_add_options --enable-official-branding
ac_add_app_options ppc --enable-prebinding

View File

@@ -1,267 +0,0 @@
#
## hostname: bm-xserve08.build.mozilla.org
## uname: Darwin bm-xserve08.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
$ENV{NO_EM_RESTART} = "1";
$ENV{DYLD_NO_FIX_PREBINDING} = "1";
$ENV{LD_PREBIND_ALLOW_OVERLAP} = "1";
$ENV{CVS_RSH} = "ssh";
$MacUniversalBinary = 1;
# $ENV{MOZ_PACKAGE_MSI}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Controls whether a MSI package is made.
# Requires: Windows and a local MakeMSI installation.
#$ENV{MOZ_PACKAGE_MSI} = 0;
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
#-----------------------------------------------------------------------------
# Default: scp
# Values: scp | rsync
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
# Requires: The selected type requires the command be available both locally
# and on the Talkback server.
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
$BuildAdministrator = 'build@mozilla.org';
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
#- You'll need to change these to suit your machine's needs
#$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
#$TestOnly = 0; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
#$BuildLocales = 0; # Do l10n packaging?
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
$ProductName = 'Firefox';
$VendorName = "Mozilla";
$RunMozillaTests = 1; # Allow turning off of all tests if needed.
$RegxpcomTest = 1;
$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
#$BloatTest = 0; # warren memory bloat test
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
$LayoutPerformanceTest = 0; # Tp
$LayoutPerformanceLocalTest = 0; # Tp2
$DHTMLPerformanceTest = 0; # Tdhtml
#$QATest = 0;
$XULWindowOpenTest = 0; # Txul
$StartupPerformanceTest = 0; # Ts
$TestsPhoneHome = 0; # Should test report back to server?
$GraphNameOverride = 'xserve08.build.mozilla.org_Fx-Trunk';
# $results_server
#----------------------------------------------------------------------------
# Server on which test results will be accessible. This was originally tegu,
# then became axolotl. Once we moved services from axolotl, it was time
# to give this service its own hostname to make future transitions easier.
# - cmp@mozilla.org
#$results_server = "build-graphs.mozilla.org";
#$pageload_server = "spider"; # localhost
$pageload_server = "pageload.build.mozilla.org"; # localhost
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 120;
$AliveTestTimeout = 10;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
#$BloatTestTimeout = 120; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
$LayoutPerformanceTestTimeout = 300; # entire test, seconds
$LayoutPerformanceLocalTestTimeout = 180; # entire test, seconds
$DHTMLPerformanceTestTimeout = 180; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 15; # seconds
#$XULWindowOpenTestTimeout = 150; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
#- Set these to what makes sense for your system
#$Make = 'gmake'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
#$blat = 'c:/nstools/bin/blat';
#$use_blat = 0;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
$ObjDir = '../build/universal';
# Extra build name, if needed.
$BuildNameExtra = 'Release';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
# CONFIG: $BuildTree = '%buildTree%';
$BuildTree = 'MozillaRelease';
#$BuildName = '';
# CONFIG: $BuildTag = '%productTag%_RELEASE';
$BuildTag = 'FIREFOX_3_0_19_RELEASE';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'firefox-bin';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# Release build options
$ReleaseBuild = 1;
$shiptalkback = 0;
$ReleaseToLatest = 0; # Push the release to latest-<milestone>?
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
$build_hour = "4";
$package_creation_path = "/browser/installer";
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
$mac_bundle_path = "/browser/app";
$ssh_version = "2";
# CONFIG: $ssh_user = "%sshUser%";
$ssh_user = "cltbld";
# CONFIG: $ssh_server = "%sshServer%";
$ssh_server = "stage-old.mozilla.org";
$ftp_path = "/home/ftp/pub/firefox/nightly";
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly";
$tbox_ftp_path = "/home/ftp/pub/firefox/tinderbox-builds";
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds";
# CONFIG: $milestone = 'firefox%version%';
$milestone = 'firefox3.0.19';
$notify_list = "build-announce\@mozilla.org";
$stub_installer = 0;
$sea_installer = 0;
$archive = 1;
$push_raw_xpis = 0;
$update_package = 1;
$update_product = "Firefox";
$update_version = "trunk";
$update_platform = "Darwin_Universal-gcc3";
$update_hash = "sha1";
$update_filehost = "ftp.mozilla.org";
$update_ver_file = 'browser/config/version.txt';
$update_pushinfo = 0;
$crashreporter_buildsymbols = 1;
$crashreporter_pushsymbols = 1;
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
$ENV{'SYMBOL_SERVER_HOST'} = 'dm-symbolpush01.mozilla.org';
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
$ENV{'SYMBOL_SERVER_USER'} = 'ffxbld';
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_ffx';
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/Users/cltbld/.ssh/ffxbld_dsa';
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = '';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = '';
# Prevent Extension Manager from spawning child processes during tests
# - processes that tbox scripts cannot kill.
#$ENV{NO_EM_RESTART} = '1';
# Do not build XForms
$BuildXForms = 0;

View File

@@ -1,22 +0,0 @@
#
## hostname: fx-win32-tbox
## uname: MINGW32_NT-5.2 FX-WIN32-TBOX 1.0.11(0.46/3/2) 2007-01-12 12:05 i686 Msys
#
export CFLAGS="-GL -wd4624 -wd4952"
export CXXFLAGS="-GL -wd4624 -wd4952"
export LDFLAGS="-LTCG"
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_MAKE_FLAGS="-j1"
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py'
ac_add_options --enable-application=browser
ac_add_options --enable-update-channel=release
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --enable-update-packaging
ac_add_options --enable-official-branding
ac_add_options --enable-jemalloc
ac_add_options --with-crashreporter-enable-percent=10

View File

@@ -1,267 +0,0 @@
#
## hostname: fx-win32-tbox
## uname: MINGW32_NT-5.2 FX-WIN32-TBOX 1.0.11(0.46/3/2) 2007-01-12 12:05 i686 Msys
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
$ENV{NO_EM_RESTART} = '1';
$ENV{CVS_RSH} = "ssh";
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
# Both these two variables are for source server support
$ENV{PDBSTR_PATH} = 'C:\\Program Files\\Debugging Tools for Windows\\sdk\\srcsrv\\pdbstr.exe';
$ENV{SRCSRV_ROOT} = ':pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot';
# $ENV{MOZ_PACKAGE_MSI}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Controls whether a MSI package is made.
# Requires: Windows and a local MakeMSI installation.
#$ENV{MOZ_PACKAGE_MSI} = 0;
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
#-----------------------------------------------------------------------------
# Default: scp
# Values: scp | rsync
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
# Requires: The selected type requires the command be available both locally
# and on the Talkback server.
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
$BuildAdministrator = 'build@mozilla.org';
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
#- You'll need to change these to suit your machine's needs
#$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
#$TestOnly = 0; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
#$BuildLocales = 0; # Do l10n packaging?
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
$ProductName = "Firefox";
$VendorName = "Mozilla";
$RunMozillaTests = 1; # Allow turning off of all tests if needed.
$RegxpcomTest = 1;
$AliveTest = 1;
$JavaTest = 0;
$ViewerTest = 0;
$BloatTest = 0; # warren memory bloat test
$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
$DomToTextConversionTest = 0;
$XpcomGlueTest = 0;
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
$MailBloatTest = 0;
$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
$LayoutPerformanceTest = 0; # Tp
$DHTMLPerformanceTest = 0; # Tdhtml
$QATest = 0;
$XULWindowOpenTest = 0; # Txul
$StartupPerformanceTest = 0; # Ts
$NeckoUnitTest = 0;
$RenderPerformanceTest = 0; # Tgfx
$TestsPhoneHome = 0; # Should test report back to server?
$GraphNameOverride = 'fx-win32-tbox';
# $results_server
#----------------------------------------------------------------------------
# Server on which test results will be accessible. This was originally tegu,
# then became axolotl. Once we moved services from axolotl, it was time
# to give this service its own hostname to make future transitions easier.
# - cmp@mozilla.org
#$results_server = "build-graphs.mozilla.org";
$pageload_server = "pageload.build.mozilla.org"; # localhost
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 120;
#$AliveTestTimeout = 30;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
#$BloatTestTimeout = 120; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
$LayoutPerformanceTestTimeout = 800; # entire test, seconds
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 20; # seconds
#$XULWindowOpenTestTimeout = 90; # seconds
#$NeckoUnitTestTimeout = 30; # seconds
$RenderPerformanceTestTimeout = 1800; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
#- Set these to what makes sense for your system
$Make = 'make'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
$blat = '/d/mozilla-build/blat261/full/blat';
#$use_blat = 1;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
$ObjDir = 'obj-fx-trunk';
# Extra build name, if needed.
$BuildNameExtra = 'Release';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
#$BuildTree = 'MozillaTest';
# CONFIG: $BuildTree = '%buildTree%';
$BuildTree = 'MozillaRelease';
#$BuildName = '';
# CONFIG: $BuildTag = '%productTag%_RELEASE';
$BuildTag = 'FIREFOX_3_0_19_RELEASE';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'firefox.exe';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
$ProfiledBuild = 1;
# Release build options
$ReleaseBuild = 1;
$shiptalkback = 0;
$ReleaseToLatest = 0; # Push the release to latest-<milestone>?
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
$build_hour = "4";
$package_creation_path = "/browser/installer";
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
$ssh_version = "2";
# CONFIG: $ssh_user = "%sshUser%";
$ssh_user = "cltbld";
# CONFIG: $ssh_server = "%sshServer%";
$ssh_server = "stage-old.mozilla.org";
$ftp_path = "/home/ftp/pub/firefox/nightly";
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly";
$tbox_ftp_path = "/home/ftp/pub/firefox/tinderbox-builds";
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds";
# CONFIG: $milestone = 'firefox%version%';
$milestone = 'firefox3.0.19';
$notify_list = 'build-announce@mozilla.org';
$stub_installer = 0;
$sea_installer = 1;
$archive = 1;
$push_raw_xpis = 0;
$update_package = 1;
$update_product = "Firefox";
$update_version = "trunk";
$update_platform = "WINNT_x86-msvc";
$update_hash = "sha1";
$update_filehost = "ftp.mozilla.org";
$update_ver_file = 'browser/config/version.txt';
$update_pushinfo = 0;
$crashreporter_buildsymbols = 1;
$crashreporter_pushsymbols = 1;
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
$ENV{'SYMBOL_SERVER_HOST'} = 'dm-symbolpush01.mozilla.org';
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
$ENV{'SYMBOL_SERVER_USER'} = 'ffxbld';
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_ffx';
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/c/Documents and Settings/cltbld/.ssh/ffxbld_dsa';
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = '';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = '';
# Prevent Extension Manager from spawning child processes during tests
# - processes that tbox scripts cannot kill.
#$ENV{NO_EM_RESTART} = '1';
# Do not build XForms
$BuildXForms = 0;

View File

@@ -1 +0,0 @@
Clobbering to force nightly due to nightly bustage from bug 428672.

View File

@@ -1,25 +0,0 @@
#
## hostname: tb-linux-tbox
## uname: Linux tb-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 athlon i386 GNU/Linux
#
# symbols for breakpad
export CFLAGS="-gstabs+"
export CXXFLAGS="-gstabs+"
mk_add_options MOZ_CO_PROJECT=mail
mk_add_options MOZ_MAKE_FLAGS=-j1
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
ac_add_options --enable-application=mail
ac_add_options --enable-update-channel=beta
ac_add_options --disable-debug
ac_add_options --enable-update-packaging
# Add explicit optimize flags in configure.in, not here - see bug 407794
ac_add_options --enable-optimize
ac_add_options --disable-tests
ac_add_options --disable-shared
ac_add_options --enable-static
CC=/tools/gcc-4.1.1/bin/gcc
CXX=/tools/gcc-4.1.1/bin/g++

View File

@@ -1,225 +0,0 @@
#
## hostname: tb-linux-tbox
## uname: Linux tbnewref-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 athlon i386 GNU/Linux
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
$ENV{CVS_RSH} = "ssh";
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
#- You'll need to change these to suit your machine's needs
#$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
$BuildDepend = 0; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
#$TestOnly = 0; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
$ProductName = "Thunderbird";
#$VendorName = "";
$RunMozillaTests = 1; # Allow turning off of all tests if needed.
#$RegxpcomTest = 1;
#$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
#$BloatTest = 0; # warren memory bloat test
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
#$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
#$LayoutPerformanceTest = 0; # Tp
#$QATest = 0;
#$XULWindowOpenTest = 0; # Txul
#$StartupPerformanceTest = 0; # Ts
$TestsPhoneHome = 0; # Should test report back to server?
#$results_server = "axolotl.mozilla.org"; # was tegu
#$pageload_server = "spider"; # localhost
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 15;
#$AliveTestTimeout = 45;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
#$BloatTestTimeout = 120; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 60; # seconds
#$XULWindowOpenTestTimeout = 150; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
#- Set these to what makes sense for your system
#$Make = 'gmake'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
#$blat = 'c:/nstools/bin/blat';
#$use_blat = 0;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
$ObjDir = 'obj-tb-trunk';
# Extra build name, if needed.
$BuildNameExtra = 'Release';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
# CONFIG: $BuildTree = '%buildTree%';
$BuildTree = 'MozillaRelease';
#$BuildName = '';
# CONFIG: $BuildTag = '%productTag%_RELEASE';
$BuildTag = 'THUNDERBIRD_3_0a2_RELEASE';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'thunderbird-bin';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# allow override of timezone value (for win32 POSIX::strftime)
#$Timezone = '';
# Release build options
$ReleaseBuild = 1;
$ReleaseToLatest = 0; # Push the release to latest-<milestone>?
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
$shiptalkback = 0;
$build_hour = "3";
$package_creation_path = "/mail/installer";
$ssh_version = "2";
# CONFIG: $ssh_user = "%sshUser%";
$ssh_user = "cltbld";
# CONFIG: $ssh_server = "%sshServer%";
$ssh_server = "stage-old.mozilla.org";
#$ReleaseGroup = "thunderbird";
$ftp_path = "/home/ftp/pub/thunderbird/nightly";
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly";
$tbox_ftp_path = "/home/ftp/pub/thunderbird/tinderbox-builds";
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/thunderbird/tinderbox-builds";
# CONFIG: $milestone = 'thunderbird%version%';
$milestone = 'thunderbird3.0a2';
$notify_list = "build-announce\@mozilla.org";
$stub_installer = 0;
$sea_installer = 0;
$archive = 1;
$update_package = 1;
$update_product = "Thunderbird";
$update_version = "trunk";
$update_platform = "Linux_x86-gcc3";
$update_hash = "sha1";
$update_filehost = "ftp.mozilla.org";
$update_ver_file = "mail/config/version.txt";
$update_pushinfo = 0;
$crashreporter_buildsymbols = 1;
$crashreporter_pushsymbols = 1;
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
$ENV{'SYMBOL_SERVER_HOST'} = 'dm-symbolpush01.mozilla.org';
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
$ENV{'SYMBOL_SERVER_USER'} = 'tbirdbld';
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_tbrd';
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/home/cltbld/.ssh/tbirdbld_dsa';
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = 'bzip2';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = 'base64';

View File

@@ -1 +0,0 @@
Clobbering to force nightly due to nightly bustage from bug 428672.

View File

@@ -1,28 +0,0 @@
#
## hostname: bm-xserve07.build.mozilla.org
## uname: Darwin bm-xserve07.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
#
# symbols for breakpad
export CFLAGS="-g -gfull"
export CXXFLAGS="-g -gfull"
. $topsrcdir/build/macosx/universal/mozconfig
# Make flags
mk_add_options MOZ_CO_PROJECT=mail
mk_add_options MOZ_MAKE_FLAGS="-j1"
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build/universal
# Configure flags
ac_add_options --enable-application=mail
ac_add_options --enable-update-channel=beta
# Add explicit optimize flags in configure.in, not here - see bug 407794
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --enable-static
ac_add_options --disable-shared
ac_add_options --enable-update-packaging

View File

@@ -1,262 +0,0 @@
#
## hostname: bm-xserve07.build.mozilla.org
## uname: Darwin bm-xserve07.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
# $ENV{NO_EM_RESTART} = "1";
# $ENV{DYLD_NO_FIX_PREBINDING} = "1";
# $ENV{LD_PREBIND_ALLOW_OVERLAP} = "1";
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
$MacUniversalBinary = 1;
# $ENV{MOZ_PACKAGE_MSI}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Controls whether a MSI package is made.
# Requires: Windows and a local MakeMSI installation.
#$ENV{MOZ_PACKAGE_MSI} = 0;
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
#-----------------------------------------------------------------------------
# Default: scp
# Values: scp | rsync
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
# Requires: The selected type requires the command be available both locally
# and on the Talkback server.
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
$BuildAdministrator = 'build@mozilla.org';
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
#- You'll need to change these to suit your machine's needs
#$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
#$TestOnly = 0; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
#$BuildLocales = 0; # Do l10n packaging?
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
$ProductName = "Thunderbird";
#$VendorName = 'Mozilla';
$RunMozillaTests = 1; # Allow turning off of all tests if needed.
$RegxpcomTest = 1;
$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
#$BloatTest = 0; # warren memory bloat test
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
#$LayoutPerformanceTest = 0; # Tp
#$DHTMLPerformanceTest = 0; # Tdhtml
#$QATest = 0;
#$XULWindowOpenTest = 0; # Txul
#$StartupPerformanceTest = 0; # Ts
$TestsPhoneHome = 0; # Should test report back to server?
# $results_server
#----------------------------------------------------------------------------
# Server on which test results will be accessible. This was originally tegu,
# then became axolotl. Once we moved services from axolotl, it was time
# to give this service its own hostname to make future transitions easier.
# - cmp@mozilla.org
#$results_server = "build-graphs.mozilla.org";
#$pageload_server = "spider"; # localhost
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 120;
#$AliveTestTimeout = 45;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
#$BloatTestTimeout = 120; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 15; # seconds
#$XULWindowOpenTestTimeout = 150; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
#- Set these to what makes sense for your system
#$Make = 'gmake'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
#$blat = 'c:/nstools/bin/blat';
#$use_blat = 0;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
#$moz_cvsroot = $ENV{CVSROOT};
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
$ObjDir = '../build/universal';
# Extra build name, if needed.
$BuildNameExtra = 'Release';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
#$BuildTree = 'MozillaTest';
# CONFIG: $BuildTree = '%buildTree%';
$BuildTree = 'MozillaRelease';
#$BuildName = '';
# CONFIG: $BuildTag = '%productTag%_RELEASE';
$BuildTag = 'THUNDERBIRD_3_0a2_RELEASE';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'thunderbird-bin';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# Release build options
$ReleaseBuild = 1;
$shiptalkback = 0;
$ReleaseToLatest = 0; # Push the release to latest-<milestone>?
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
$build_hour = "3";
$package_creation_path = "/mail/installer";
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
$mac_bundle_path = "/mail/app";
$ssh_version = "2";
# CONFIG: $ssh_user = "%sshUser%";
$ssh_user = "cltbld";
# CONFIG: $ssh_server = "%sshServer%";
$ssh_server = "stage-old.mozilla.org";
#$ReleaseGroup = "thunderbird";
$ftp_path = "/home/ftp/pub/thunderbird/nightly";
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly";
$tbox_ftp_path = "/home/ftp/pub/thunderbird/tinderbox-builds";
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/thunderbird/tinderbox-builds";
# CONFIG: $milestone = 'thunderbird%version%';
$milestone = 'thunderbird3.0a2';
$notify_list = "build-announce\@mozilla.org";
$stub_installer = 0;
$sea_installer = 0;
$archive = 1;
$push_raw_xpis = 0;
$update_package = 1;
$update_product = "Thunderbird";
$update_version = "trunk";
$update_platform = "Darwin_Universal-gcc3";
$update_hash = "sha1";
$update_filehost = "ftp.mozilla.org";
$update_ver_file = "mail/config/version.txt";
$update_pushinfo = 0;
$crashreporter_buildsymbols = 1;
$crashreporter_pushsymbols = 1;
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
$ENV{'SYMBOL_SERVER_HOST'} = 'dm-symbolpush01.mozilla.org';
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
$ENV{'SYMBOL_SERVER_USER'} = 'tbirdbld';
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_tbrd';
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/Users/cltbld/.ssh/tbirdbld_dsa';
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = '';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = '';
# Prevent Extension Manager from spawning child processes during tests
# - processes that tbox scripts cannot kill.
#$ENV{NO_EM_RESTART} = '1';

View File

@@ -1 +0,0 @@
Clobbering to force nightly due to nightly bustage from bug 428672.

View File

@@ -1,22 +0,0 @@
#
## hostname: tbnewref-win32-tbox
## MINGW32_NT-5.2 TBNEWREF-WIN32- 1.0.11(0.46/3/2) 2007-01-12 12:05 i686 Msys
#
mk_add_options MOZ_CO_PROJECT=mail
mk_add_options MOZ_DEBUG_SYMBOLS=1
mk_add_options MOZ_MAKE_FLAGS=-j1
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
ac_add_options --enable-application=mail
ac_add_options --enable-update-channel=beta
ac_add_options --disable-debug
# Add explicit optimize flags in configure.in, not here - see bug 407794
ac_add_options --enable-optimize
ac_add_options --disable-tests
ac_add_options --disable-shared
ac_add_options --enable-static
ac_add_options --enable-update-packaging
export WIN32_REDIST_DIR="/d/msvs8/VC/redist/x86/Microsoft.VC80.CRT"

View File

@@ -1,235 +0,0 @@
#
## hostname: tbnewref-win32-tbox
## MINGW32_NT-5.2 TBNEWREF-WIN32- 1.0.11(0.46/3/2) 2007-01-12 12:05 i686 Msys
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
$ENV{CVSROOT}=":ext:tbirdbld\@cvs.mozilla.org:/cvsroot";
$ENV{MOZ_INSTALLER_USE_7ZIP}="1";
$ENV{MOZ_PACKAGE_MSI} = 0;
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
# Both these two variables are for source server support
$ENV{PDBSTR_PATH} = 'C:\\Program Files\\Debugging Tools for Windows\\sdk\\srcsrv\\pdbstr.exe';
$ENV{SRCSRV_ROOT} = ':pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot';
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
#- You'll need to change these to suit your machine's needs
#$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
$BuildDepend = 0; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
#$TestOnly = 0; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
#$BuildLocales = 0; # Do l10n packaging?
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
$ProductName = "Thunderbird";
#$VendorName = '';
$RunMozillaTests = 1; # Allow turning off of all tests if needed.
#$RegxpcomTest = 1;
#$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
#$BloatTest = 0; # warren memory bloat test
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
#$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
#$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
#$LayoutPerformanceTest = 0; # Tp
#$DHTMLPerformanceTest = 0; # Tdhtml
#$QATest = 0;
#$XULWindowOpenTest = 0; # Txul
#$StartupPerformanceTest = 0; # Ts
$TestsPhoneHome = 0; # Should test report back to server?
#$results_server = "axolotl.mozilla.org"; # was tegu
#$pageload_server = "spider"; # localhost
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 120;
#$AliveTestTimeout = 45;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
#$BloatTestTimeout = 120; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 15; # seconds
#$XULWindowOpenTestTimeout = 150; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
#- Set these to what makes sense for your system
$Make = 'make'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
$blat = '/d/mozilla-build/blat261/full/blat';
$use_blat = 0;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
$ObjDir = 'obj-tb-trunk';
# Extra build name, if needed.
$BuildNameExtra = 'Release';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
# CONFIG: $BuildTree = '%buildTree%';
$BuildTree = 'MozillaRelease';
#$BuildName = '';
# CONFIG: $BuildTag = '%productTag%_RELEASE';
$BuildTag = 'THUNDERBIRD_3_0a2_RELEASE';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'thunderbird.exe';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# Release build options
$ReleaseBuild = 1;
$shiptalkback = 0;
$ReleaseToLatest = 0;
$ReleaseToDated = 1;
$build_hour = "3";
$package_creation_path = "/mail/installer";
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
$ssh_version = "2";
# CONFIG: $ssh_user = "%sshUser%";
$ssh_user = "cltbld";
# CONFIG: $ssh_server = "%sshServer%";
$ssh_server = "stage-old.mozilla.org";
#$ReleaseGroup = "thunderbird";
$ftp_path = "/home/ftp/pub/thunderbird/nightly";
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly";
$tbox_ftp_path = "/home/ftp/pub/thunderbird/tinderbox-builds";
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/thunderbird/tinderbox-builds";
# CONFIG: $milestone = 'thunderbird%version%';
$milestone = 'thunderbird3.0a2';
$notify_list = "build-announce\@mozilla.org";
$stub_installer = 0;
$sea_installer = 1;
$archive = 1;
$push_raw_xpis = 1;
$update_package = 1;
$update_product = "Thunderbird";
$update_version = "trunk";
$update_ver_file = "mail/config/version.txt";
$update_platform = "WINNT_x86-msvc";
$update_hash = "sha1";
$update_filehost = "ftp.mozilla.org";
$update_pushinfo = 0;
$crashreporter_buildsymbols = 1;
$crashreporter_pushsymbols = 1;
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
$ENV{'SYMBOL_SERVER_HOST'} = 'dm-symbolpush01.mozilla.org';
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
$ENV{'SYMBOL_SERVER_USER'} = 'tbirdbld';
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_tbrd';
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/c/Documents and Settings/cltbld/.ssh/tbirdbld_dsa';
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = '';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = '';
# Prevent Extension Manager from spawning child processes during tests
# - processes that tbox scripts cannot kill.
#$ENV{NO_EM_RESTART} = '1';

View File

@@ -1 +0,0 @@
Clobbering to fix up checkout issues

View File

@@ -1,17 +0,0 @@
#
## hostname: xr-linux-tbox
## uname: Linux xr-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 i686 i386 GNU/Linux
#
export MOZILLA_OFFICIAL=1
export JAVA_HOME=/tools/jdk
mk_add_options MOZILLA_OFFICIAL=1
mk_add_options MOZ_CO_PROJECT=xulrunner
mk_add_options MOZ_MAKE_FLAGS="-j3"
ac_add_options --enable-application=xulrunner
ac_add_options --disable-tests
CC=/tools/gcc-4.1.1/bin/gcc
CXX=/tools/gcc-4.1.1/bin/g++

View File

@@ -1,262 +0,0 @@
#
## hostname: xr-linux-tbox
## uname: Linux xr-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 i686 i386 GNU/Linux
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
# $ENV{MOZ_PACKAGE_MSI}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Controls whether a MSI package is made.
# Requires: Windows and a local MakeMSI installation.
#$ENV{MOZ_PACKAGE_MSI} = 0;
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
#-----------------------------------------------------------------------------
# Default: scp
# Values: scp | rsync
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
# Requires: The selected type requires the command be available both locally
# and on the Talkback server.
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
$BuildAdministrator = "build\@mozilla.org";
#- You'll need to change these to suit your machine's needs
#$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
#$ConfigureOnly = 0; # Configure, but do not build.
#$TestOnly = 0; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
#$BuildLocales = 0; # Do l10n packaging?
$BuildSDK = 1; # Build the SDK
# Only used when $BuildLocales = 1
%WGetFiles = (); # Pull files from the web, URL => Location
#$WGetTimeout = 360; # Wget timeout, in seconds
#$BuildLocalesArgs = ""; # Extra attributes to add to the makefile command
# which builds the "installers-<locale>" target.
# Typically used to set ZIP_IN and WIN32_INSTALLER_IN
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
$ProductName = "XULRunner";
$VendorName = 'Mozilla';
$RunMozillaTests = 0; # Allow turning off of all tests if needed.
#$RegxpcomTest = 1;
#$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
#$BloatTest = 0; # warren memory bloat test
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
#$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
#$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
#$LayoutPerformanceTest = 0; # Tp
#$DHTMLPerformanceTest = 0; # Tdhtml
#$QATest = 0;
#$XULWindowOpenTest = 0; # Txul
#$StartupPerformanceTest = 0; # Ts
#@CompareLocaleDirs = (); # Run compare-locales test on these directories
# ("network","dom","toolkit","security/manager");
#$CompareLocalesAviary = 0; # Should the compare-locales commands use the
# aviary directory structure?
#$TestsPhoneHome = 0; # Should test report back to server?
# $results_server
#----------------------------------------------------------------------------
# Server on which test results will be accessible. This was originally tegu,
# then became axolotl. Once we moved services from axolotl, it was time
# to give this service its own hostname to make future transitions easier.
# - cmp@mozilla.org
#$results_server = "build-graphs.mozilla.org";
#$pageload_server = "spider"; # localhost
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 120;
#$AliveTestTimeout = 45;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
#$BloatTestTimeout = 120; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 15; # seconds
#$XULWindowOpenTestTimeout = 150; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
#- Set these to what makes sense for your system
#$Make = 'gmake'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
#$blat = 'c:/nstools/bin/blat';
#$use_blat = 0;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
#$moz_cvsroot = $ENV{CVSROOT};
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
$ObjDir = 'obj-xulrunner';
# Extra build name, if needed.
$BuildNameExtra = 'Release';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
# CONFIG: $BuildTree = '%buildTree%';
$BuildTree = 'MozillaRelease';
#$BuildName = '';
# CONFIG: $BuildTag = '%productTag%_RELEASE';
$BuildTag = 'FIREFOX_3_0_17_RELEASE';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'xulrunner-bin';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# Release build options
$ReleaseBuild = 1;
#$LocaleProduct = "browser";
$shiptalkback = 0;
$ReleaseToLatest = 0; # Push the release to latest-<milestone>?
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
#$build_hour = "8";
$package_creation_path = "/xulrunner/installer";
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
$ssh_version = "2";
# CONFIG: $ssh_user = "%sshUser%";
$ssh_user = "cltbld";
#$ssh_key = "$ENV{HOME}/.ssh/xrbld_dsa";
# CONFIG: $ssh_server = "%sshServer%";
$ssh_server = "stage-old.mozilla.org";
$ReleaseGroup = "xulrunner";
$ftp_path = "/home/ftp/pub/xulrunner/nightly";
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly";
$tbox_ftp_path = "/home/ftp/pub/xulrunner/tinderbox-builds";
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/tinderbox-builds";
# CONFIG: $milestone = "xulrunner%version%";
$milestone = "xulrunner1.9.0.17";
$notify_list = "build-announce\@mozilla.org";
$stub_installer = 0;
$sea_installer = 0;
$archive = 1;
$push_raw_xpis = 0;
$crashreporter_buildsymbols = 0;
$crashreporter_pushsymbols = 0;
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
$ENV{'SYMBOL_SERVER_HOST'} = 'stage-old.mozilla.org';
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
$ENV{'SYMBOL_SERVER_USER'} = 'xrbld';
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_xr';
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/home/cltbld/.ssh/xrbld_dsa';
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = '';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = '';
# Prevent Extension Manager from spawning child processes during tests
# - processes that tbox scripts cannot kill.
#$ENV{NO_EM_RESTART} = '1';

View File

@@ -1 +0,0 @@
CLOBBERing to disable zipwriter from bug 379633

View File

@@ -1,20 +0,0 @@
#
## hostname: bm-xserve09.build.mozilla.org
## uname: Darwin bm-xserve09.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
#
. $topsrcdir/build/macosx/universal/mozconfig
export MOZILLA_OFFICIAL=1
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
mk_add_options MOZILLA_OFFICIAL=1
mk_add_options MOZ_CO_PROJECT=xulrunner
mk_add_options MOZ_MAKE_FLAGS="-j8"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build/universal
ac_add_options --enable-application=xulrunner
ac_add_options --disable-tests
ac_add_options --enable-svg
ac_add_options --enable-canvas
ac_add_app_options ppc --enable-prebinding

View File

@@ -1,268 +0,0 @@
#
## hostname: bm-xserve09.build.mozilla.org
## uname: Darwin bm-xserve09.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
$MacUniversalBinary = 1;
$ENV{CHOWN_ROOT} = "/builds/tinderbox/bin/chown_root";
$ENV{REVERT_ROOT} = "/builds/tinderbox/bin/revert_root";
$ENV{CHOWN_REVERT} = $ENV{REVERT_ROOT};
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
# $ENV{MOZ_PACKAGE_MSI}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Controls whether a MSI package is made.
# Requires: Windows and a local MakeMSI installation.
#$ENV{MOZ_PACKAGE_MSI} = 0;
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
#-----------------------------------------------------------------------------
# Default: scp
# Values: scp | rsync
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
# Requires: The selected type requires the command be available both locally
# and on the Talkback server.
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
$BuildAdministrator = "build\@mozilla.org";
#- You'll need to change these to suit your machine's needs
#$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
#$ConfigureOnly = 0; # Configure, but do not build.
#$TestOnly = 0; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
#$BuildLocales = 0; # Do l10n packaging?
$BuildSDK = 1; # Build the SDK
# Only used when $BuildLocales = 1
%WGetFiles = (); # Pull files from the web, URL => Location
#$WGetTimeout = 360; # Wget timeout, in seconds
#$BuildLocalesArgs = ""; # Extra attributes to add to the makefile command
# which builds the "installers-<locale>" target.
# Typically used to set ZIP_IN and WIN32_INSTALLER_IN
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
$ProductName = "XULRunner";
$VendorName = 'Mozilla';
$RunMozillaTests = 0; # Allow turning off of all tests if needed.
#$RegxpcomTest = 1;
#$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
#$BloatTest = 0; # warren memory bloat test
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
#$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
#$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
#$LayoutPerformanceTest = 0; # Tp
#$DHTMLPerformanceTest = 0; # Tdhtml
#$QATest = 0;
#$XULWindowOpenTest = 0; # Txul
#$StartupPerformanceTest = 0; # Ts
#@CompareLocaleDirs = (); # Run compare-locales test on these directories
# ("network","dom","toolkit","security/manager");
#$CompareLocalesAviary = 0; # Should the compare-locales commands use the
# aviary directory structure?
#$TestsPhoneHome = 0; # Should test report back to server?
# $results_server
#----------------------------------------------------------------------------
# Server on which test results will be accessible. This was originally tegu,
# then became axolotl. Once we moved services from axolotl, it was time
# to give this service its own hostname to make future transitions easier.
# - cmp@mozilla.org
#$results_server = "build-graphs.mozilla.org";
#$pageload_server = "spider"; # localhost
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 120;
#$AliveTestTimeout = 45;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
#$BloatTestTimeout = 120; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 15; # seconds
#$XULWindowOpenTestTimeout = 150; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
#- Set these to what makes sense for your system
#$Make = 'gmake'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
#$blat = 'c:/nstools/bin/blat';
#$use_blat = 0;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
# sharing bm-xserve09 with T'bird build, do all CVS pulls with that key
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
$ObjDir = '../build/universal';
# Extra build name, if needed.
$BuildNameExtra = 'Release';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
# CONFIG: $BuildTree = '%buildTree%';
$BuildTree = 'MozillaRelease';
#$BuildName = '';
# CONFIG: $BuildTag = '%productTag%_RELEASE';
$BuildTag = 'FIREFOX_3_0_17_RELEASE';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'xulrunner-bin';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# Release build options
$ReleaseBuild = 1;
#$LocaleProduct = "browser";
$shiptalkback = 0;
$ReleaseToLatest = 0; # Push the release to latest-<milestone>?
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
#$build_hour = "8";
$package_creation_path = "/xulrunner/installer";
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
$mac_bundle_path = "/browser/app";
$ssh_version = "2";
# CONFIG: $ssh_user = "%sshUser%";
$ssh_user = "cltbld";
#$ssh_key = "$ENV{HOME}/.ssh/xrbld_dsa";
# CONFIG: $ssh_server = "%sshServer%";
$ssh_server = "stage-old.mozilla.org";
$ReleaseGroup = "xulrunner";
$ftp_path = "/home/ftp/pub/xulrunner/nightly";
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly";
$tbox_ftp_path = "/home/ftp/pub/xulrunner/tinderbox-builds";
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/tinderbox-builds";
# CONFIG: $milestone = 'xulrunner%version%';
$milestone = 'xulrunner1.9.0.17';
$notify_list = "build-announce\@mozilla.org";
$stub_installer = 0;
$sea_installer = 0;
$archive = 1;
$push_raw_xpis = 0;
$crashreporter_buildsymbols = 0;
$crashreporter_pushsymbols = 0;
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
$ENV{'SYMBOL_SERVER_HOST'} = 'stage-old.mozilla.org';
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
$ENV{'SYMBOL_SERVER_USER'} = 'xrbld';
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_xr';
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/Users/cltbld/.ssh/xrbld_dsa';
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = '';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = '';
# Prevent Extension Manager from spawning child processes during tests
# - processes that tbox scripts cannot kill.
#$ENV{NO_EM_RESTART} = '1';

View File

@@ -1 +0,0 @@
Preemptive clobber for /README.txt merge conflict.

View File

@@ -1,18 +0,0 @@
#
# hostname: fxexp-win32-tbox
# uname: CYGWIN_NT-5.2 fxexp-win32-tbox 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
#
export MOZILLA_OFFICIAL
export JAVA_HOME=/d/jdk1.5.0_10
mk_add_options MOZILLA_OFFICIAL=1
mk_add_options MOZ_CO_PROJECT=xulrunner
mk_add_options MOZ_MAKE_FLAGS="-j2"
ac_add_options --enable-application=xulrunner
ac_add_options --enable-jemalloc
ac_add_options --disable-tests
ac_add_options --enable-svg
ac_add_options --enable-canvas
ac_add_options --disable-installer

View File

@@ -1,255 +0,0 @@
#
# hostname: fxexp-win32-tbox
# uname: CYGWIN_NT-5.2 fxexp-win32-tbox 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
$ENV{NO_EM_RESTART} = "1";
$ENV{MOZ_INSTALLER_USE_7ZIP} = "1";
$ENV{CVS_RSH} = "ssh";
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
# Both these two variables are for source server support
$ENV{PDBSTR_PATH} = 'C:\\Program Files\\Debugging Tools for Windows\\sdk\\srcsrv\\pdbstr.exe';
$ENV{SRCSRV_ROOT} = ':pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot';
# $ENV{MOZ_PACKAGE_MSI}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Controls whether a MSI package is made.
# Requires: Windows and a local MakeMSI installation.
#$ENV{MOZ_PACKAGE_MSI} = 0;
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
#-----------------------------------------------------------------------------
# Default: scp
# Values: scp | rsync
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
# Requires: The selected type requires the command be available both locally
# and on the Talkback server.
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
$BuildAdministrator = 'build@mozilla.org';
#- You'll need to change these to suit your machine's needs
#$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
#$TestOnly = 0; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
#$BuildLocales = 0; # Do l10n packaging?
$BuildSDK = 1; # Build the SDK
# Tests
#$CleanProfile = 0;
#$ResetHomeDirForTests = 1;
$ProductName = "XULRunner";
$VendorName = 'Mozilla';
$RunMozillaTests = 0; # Allow turning off of all tests if needed.
#$RegxpcomTest = 1;
#$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
#$BloatTest = 0; # warren memory bloat test
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
#$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
#$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
#$LayoutPerformanceTest = 0; # Tp
#$DHTMLPerformanceTest = 0; # Tdhtml
#$QATest = 0;
#$XULWindowOpenTest = 0; # Txul
#$StartupPerformanceTest = 0; # Ts
#$TestsPhoneHome = 0; # Should test report back to server?
# $results_server
#----------------------------------------------------------------------------
# Server on which test results will be accessible. This was originally tegu,
# then became axolotl. Once we moved services from axolotl, it was time
# to give this service its own hostname to make future transitions easier.
# - cmp@mozilla.org
#$results_server = "build-graphs.mozilla.org";
#$pageload_server = "spider"; # localhost
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 120;
#$AliveTestTimeout = 45;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
#$BloatTestTimeout = 120; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 15; # seconds
#$XULWindowOpenTestTimeout = 150; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
#- Set these to what makes sense for your system
$Make = 'make'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
$blat = '/d/mozilla-build/blat261/full/blat';
$use_blat = 1;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
#$moz_cvsroot = $ENV{CVSROOT};
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
$ObjDir = 'obj-xulrunner';
# Extra build name, if needed.
$BuildNameExtra = 'Release';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
# CONFIG: $BuildTree = '%buildTree%';
$BuildTree = 'MozillaRelease';
#$BuildName = '';
# CONFIG: $BuildTag = '%productTag%_RELEASE';
$BuildTag = 'FIREFOX_3_0_17_RELEASE';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'xulrunner.exe';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# Release build options
$ReleaseBuild = 1;
$shiptalkback = 0;
$ReleaseToLatest = 0; # Push the release to latest-<milestone>?
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
#$build_hour = "8";
$package_creation_path = "/xulrunner/installer";
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
$ssh_version = "2";
# CONFIG: $ssh_user = "%sshUser%";
$ssh_user = "cltbld";
#$ssh_key = "'$ENV{HOME}/.ssh/xrbld_dsa'";
# CONFIG: $ssh_server = "%sshServer%";
$ssh_server = "stage-old.mozilla.org";
$ReleaseGroup = "xulrunner";
$ftp_path = "/home/ftp/pub/xulrunner/nightly";
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly";
$tbox_ftp_path = "/home/ftp/pub/xulrunner/tinderbox-builds";
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/tinderbox-builds";
# CONFIG: $milestone = 'xulrunner%version%';
$milestone = 'xulrunner1.9.0.17';
$notify_list = 'build-announce@mozilla.org';
$stub_installer = 0;
$sea_installer = 0;
$archive = 1;
$push_raw_xpis = 0;
$crashreporter_buildsymbols = 1;
$crashreporter_pushsymbols = 1;
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
$ENV{'SYMBOL_SERVER_HOST'} = 'stage-old.mozilla.org';
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
$ENV{'SYMBOL_SERVER_USER'} = 'xrbld';
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_xr';
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/c/Documents and Settings/cltbld/.ssh/xrbld_dsa';
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = '';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = '';
# Prevent Extension Manager from spawning child processes during tests
# - processes that tbox scripts cannot kill.
#$ENV{NO_EM_RESTART} = '1';