Compare commits

..

1 Commits

Author SHA1 Message Date
(no author)
b44b7fbe9a This commit was manufactured by cvs2svn to create branch
'DARIN_UnixAsyncDNS_20010109_BASE'.

git-svn-id: svn://10.0.0.236/branches/DARIN_UnixAsyncDNS_20010109_BASE@83089 18797224-902f-48f8-a5cc-f745e15eee43
2000-11-29 23:28:05 +00:00
20 changed files with 4393 additions and 571 deletions

View File

@@ -0,0 +1,32 @@
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# 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 Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,48 @@
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# 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 Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = necko
CPPSRCS = nsDnsAsyncLookup.cpp
SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=)
EXPORTS = \
unix_dns.h \
$(NULL)
LIBS = \
$(NSPR_LIBS) \
$(NULL)
include $(topsrcdir)/config/rules.mk
# DEFINES += -D"GETHOSTBYNAME_DELAY=5" -DNO_SOCKS_NS_KLUDGE
DEFINES += -DNO_SOCKS_NS_KLUDGE

View File

@@ -0,0 +1,626 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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 Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/*
* nsDnsAsyncLookup.cpp --- standalone lightweight process to handle
* asyncrhonous dns lookup on Unix.
*/
/* Compile-time options:
* -DGETHOSTBYNAME_DELAY=N
* to insert an artificial delay of N seconds before each
* call to gethostbyname (in order to simulate DNS lossage.)
*
* -DNO_SOCKS_NS_KLUDGE
* Set this to *disable* the $SOCKS_NS kludge. Otherwise,
* that environment variable will be consulted for use as an
* alternate DNS root. It's historical; don't ask me...
*/
#if defined(XP_UNIX) && defined(UNIX_ASYNC_DNS)
#include <sys/types.h>
#include <sys/wait.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <netdb.h>
#include <signal.h>
#include <assert.h>
#include <sys/un.h>
#include "nspr.h"
#include "nsCRT.h"
#include "unix_dns.h"
#if defined(AIX) || defined(__linux)
#include <sys/select.h> // for fd_set
#endif
#if !defined(NO_SOCKS_NS_KLUDGE)
#include <arpa/inet.h> // for in_addr (from nameser.h)
#include <arpa/nameser.h> // for MAXDNAME (from resolv.h)
#include <resolv.h> // for res_init() and _res
#endif
#if defined(__linux)
// Didn't find gettdtablehi() or gettdtablesize() on linux. Using FD_SETSIZE
#define getdtablehi() FD_SETSIZE
#elif !defined(__irix)
// looks like Irix is the only one that has getdtablehi()?
#define getdtablehi() getdtablesize()
// If you find a system doesn't have getdtablesize try #define getdtablesize
// to FD_SETSIZE. And if you encounter a system that doesn't even have
// FD_SETSIZE, just grab your ankles and use 255.
#endif
#define BACKLOG 20 // maximum # of pending connections
#define ASSERT(x) assert(x)
static int listen_fd = -1;
///////////////////////////////////////////////////////////////////////////
// Name: dnsSocksKludge
//
// Description: Gross historical kludge.
// If the environment variable $SOCKS_NS is defined, stomp
// on the host that the DNS code uses for host lookup to be
// a specific ip address.
//
static void
dnsSocksKludge(void)
{
#ifndef NO_SOCKS_NS_KLUDGE
char *ns = getenv("SOCKS_NS");
if (ns && *ns)
{
// Gross hack added to Gross historical kludge - need to
// initialize resolv.h structure first with low-cost call
// to gethostbyname() before hacking _res. Subsequent call
// to gethostbyname() will then pick up $SOCKS_NS address.
//
gethostbyname("localhost");
res_init();
// _res is defined in resolv.h
_res.nsaddr_list[0].sin_addr.s_addr = inet_addr(ns);
_res.nscount = 1;
}
#endif /* !NO_SOCKS_NS_KLUDGE */
}
///////////////////////////////////////////////////////////////////////////
// Name: mySignalHandler
//
// Description: Signal handler. Close down the socket and exit.
//
static void
mySignalHandler (int sig)
{
// close down the socket.
close (listen_fd);
unlink (DNS_SOCK_NAME); //just in case close doesn't remove this
exit (0);
}
//////////////////////////////////////////////////////////////////////////
// Name: displaySysErr
//
// Description: Display system error.
//
static void
displaySysErr(char *name) {
perror ((const char *)name);
exit (1);
}
/////////////////////////////////////////////////////////////////////////
//
// The following data structure is used to hold information about a
// pending lookup request.
typedef struct dns_lookup {
long id; // id to identify this entry
pid_t pid; // process id of the helper process
int fd; // file descriptor used to get result from
int accept_fd; // file descriptor used to send hostent back
char *name; // name to lookup
struct dns_lookup *next; // pointer to the next entry
} dns_lookup;
static dns_lookup *dns_lookup_queue = 0;
////////////////////////////////////////////////////////////////////////
// Name: getNextDnsEntry
//
// Description: Return the idx entry to the caller. Bump the index up
// by 1 before the return. Similiar to an iterator.
//
static dns_lookup*
getNextDnsEntry (int *idx)
{
dns_lookup *obj = dns_lookup_queue;
if (*idx < 0)
return 0;
for (int i = 1; i < *idx; i++)
{
obj = obj->next;
if (!obj)
return 0;
}
*idx += 1;
return obj;
}
////////////////////////////////////////////////////////////////////////
// Name: addToDnsQueue
//
// Description: Add a lookup entry to the queue.
//
static void
addToDnsQueue (dns_lookup* obj)
{
dns_lookup* entry;
obj->next = 0;
if (!dns_lookup_queue)
{
dns_lookup_queue = obj;
return;
}
entry = dns_lookup_queue;
while (entry->next)
entry = entry->next;
entry->next = obj;
}
//////////////////////////////////////////////////////////////////////////
// Name: removeFromDnsQueue
//
// Description: Remove the specified entry from the queue.
//
static void
removeFromDnsQueue (dns_lookup *obj)
{
dns_lookup* entry;
if (!obj || !dns_lookup_queue)
return;
if (obj == dns_lookup_queue)
{
dns_lookup_queue = obj->next;
}
else
{
entry = dns_lookup_queue;
while (obj != entry->next)
entry = entry->next;
if (!entry || !entry->next)
return;
entry->next = obj->next;
}
if (obj->name)
{
free(obj->name);
obj->name = 0;
}
free (obj);
}
///////////////////////////////////////////////////////////////////////////
// Name: newLookupObject
//
// Description: Create a new lookup object and return a pointer to the
// object to the caller. 0 is returned on error.
//
static dns_lookup*
newLookupObject (const char *name)
{
static int dnsId = 0;
ASSERT (name);
char *str = strdup (name);
if (!str) return 0; // MK_OUT_OF_MEMORY
dns_lookup* obj = (dns_lookup *) malloc (sizeof (struct dns_lookup));
if (!obj)
{
free (str);
return 0;
}
memset( obj, 0, sizeof( struct dns_lookup ) );
obj->id = ++dnsId;
obj->name = str;
obj->fd = -1;
obj->accept_fd = -1;
addToDnsQueue (obj);
return (obj);
}
///////////////////////////////////////////////////////////////////////////
// Name: hostentToBytes
//
// Description: Pack the structure `hostent' into a character buffer.
//
//
static void
hostentToBytes (hostent *h, char *buf, int *size)
{
*size = 0;
int len = strlen (h->h_name);
char *p = buf;
*(int *)p = len; // Encode the length of the name
p += sizeof (int);
if (len > 0)
{
strcpy (p, h->h_name);
p += strlen (h->h_name);
}
int n;
// find out the number of aliases are present. The last entry in
// list is 0.
for (n = 0; h->h_aliases[n]; n++);
*(int *)p = n; // Encode the size of aliases into buf
p += sizeof (int);
int i;
// copy aliases to the buffer.
for (i = 0; i < n; i++)
{
len = strlen (h->h_aliases[i]);
*(int *)p = (int) len;
p += sizeof(int);
memcpy (p, h->h_aliases[i], (size_t) len);
p += len;
}
*(int *)p = h->h_addrtype; // Encode the member h_addrtype
p += sizeof (int);
*(int *)p = h->h_length; // Encode the member h_length
p += sizeof (int);
// find out the number of addresses in h_addr_list list.
for (n = 0; h->h_addr_list[n]; n++);
*(int *)p = n; // Encode the size of aliases into buf
p += sizeof (int);
// copy the address list into the buffer.
for (i = 0; i < n; i++)
{
len = strlen (h->h_addr_list[i]);
*(int *)p = (int) len;
p += sizeof(int);
memcpy (p, h->h_addr_list[i], (size_t) len);
p += len;
}
*size = p - buf;
}
////////////////////////////////////////////////////////////////////////
// Name: cancelLookup
//
// Description: Cancel an existing lookup request. Locate the right
// child helper process and kill it.
//
static void
cancelLookup (int id)
{
dns_lookup *obj = dns_lookup_queue;
while (obj)
{
if (id == obj->id)
break;
obj = obj->next;
}
if (obj && obj->pid)
{
kill (obj->pid, SIGQUIT);
pid_t pid2 = waitpid (obj->pid, 0, 0);
ASSERT ((obj->pid == pid2));
removeFromDnsQueue (obj);
}
}
//////////////////////////////////////////////////////////////////////////
// Name: blockingGethostbyname
//
// Description: Calls the blocking gethostbyname to perform the lookup.
// When done, pack the hostent struct into a character
// buffer and sent it back to the parent process via pipe.
//
static void
blockingGethostbyname (const char *name, int out_fd)
{
int i;
static int firstTime = true;
if (firstTime)
{
firstTime = 0;
dnsSocksKludge();
}
#ifdef GETHOSTBYNAME_DELAY
i = GETHOSTBYNAME_DELAY;
sleep(i);
#endif // GETHOSTBYNAME_DELAY
int size = 0;
char buf[BUFSIZ];
struct hostent *h = gethostbyname(name);
if (h)
{
*(int *)&buf[0] = (int) DNS_STATUS_GETHOSTBYNAME_OK;
char *p = buf + sizeof (int);
#if defined(DNS_DEBUG)
printf("gethostbyname complete\n");
for (i=0; h->h_addr_list[i]; i++);
printf("%d addresses for %s\n",i,h->h_name);
printf("address: ");
for (i = 0; i <= h->h_length; i++){
printf("%2.2x", (unsigned char)h->h_addr_list[0][i]);
}
printf("\n");
#endif
hostentToBytes (h, p, &size);
size = size + sizeof (int);
}
else
{
*(int *)&buf[0] = (int) DNS_STATUS_GETHOSTBYNAME_FAILED;
size = sizeof (int);
}
// Send response back to parent.
write(out_fd, buf, size);
}
//////////////////////////////////////////////////////////////////////////
// Name: spawnHelperProcess
//
// Description: Spawns a child helper process to do the standard Unix
// blocking dns lookup.
//
dns_lookup*
spawnHelperProcess (const char *name)
{
pid_t forked;
int fds[2];
dns_lookup* obj = newLookupObject (name);
if (!obj) return 0;
if (pipe(fds))
{
fprintf (stderr, "Can't make pipe\n");
return 0;
}
obj->fd = fds[0];
switch (forked = fork())
{
case -1:
fprintf (stderr, "Can't fork\n");
removeFromDnsQueue (obj);
break;
case 0: /* This is the forked process. */
close (fds[0]);
blockingGethostbyname (name, fds[1]);
/* Close the file and exit the process. */
close (fds[1]);
exit (0);
break;
default:
close (fds[1]);
obj->pid = forked;
return obj;
break;
}
// shouldn't get here
ASSERT (0);
return 0;
}
////////////////////////////////////////////////////////////////////////////
int main (int argc, char **argv)
{
/*
PRFileDesc* sock = PR_GetInheritedFD(DNS_SOCK_NAME);
if (sock == nsnull)
return -1;
*/
signal (SIGINT, mySignalHandler); // trap SIGINT
// TODO: more signals need to be trapped. Will do...
// Create a socket of type PF_UNIX to listen for dns lookup requests
listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
if (listen_fd == -1)
displaySysErr (argv[0]);
struct saddr_un {
sa_family_t sun_family;
char sun_path[108];
} unix_addr;
unix_addr.sun_family = AF_UNIX;
strcpy (unix_addr.sun_path, DNS_SOCK_NAME);
if (bind (listen_fd, (struct sockaddr*)&unix_addr, sizeof(unix_addr)) == -1)
displaySysErr (argv[0]);
if (listen (listen_fd, BACKLOG) == -1)
displaySysErr (argv[0]);
int accept_fd = -1;
/////////////////////////////////////////////////////////////////////////
// Loop to process incoming DNS lookup/cancel reqeusts. When lookup is
// is completed by the helper child process, a "hostent" structure will
// be sent back to the client.
/////////////////////////////////////////////////////////////////////////
while (1) {
fd_set readfds;
FD_ZERO (&readfds);
FD_SET (listen_fd, &readfds);
if (accept_fd > 0)
FD_SET (accept_fd, &readfds);
int idx = 0;
dns_lookup* obj;
while ((obj = getNextDnsEntry (&idx)))
FD_SET(obj->fd, &readfds);
// Select will return if any one of the fd is ready for read.
// Meaning either a request has arrived from Mozilla client or
// a helper process has sent the lookup result back to us.
int n = select (getdtablehi(), &readfds, 0, 0, 0);
if (n == -1)
continue;
if (FD_ISSET (listen_fd, &readfds))
{
struct sockaddr_in from;
int fromlen = sizeof (from);
accept_fd = accept (listen_fd, (struct sockaddr *)&from,
(socklen_t *)&fromlen);
if (accept_fd == -1)
displaySysErr (argv[0]);
}
int r;
char buffer[BUFSIZ];
if (accept_fd > 0 && FD_ISSET (accept_fd, &readfds))
{
// Read the request from client.
r = recv (accept_fd, buffer, sizeof(buffer), 0);
if (r > 0 && r < (int) sizeof(buffer)) {
buffer[r] = 0;
if (!(strncmp (buffer, "shutdown:", 9)))
break;
char *name = strchr ((const char *)buffer, ' ');
if (name && *name)
name++;
if (!name)
continue;
if (!strncmp (buffer, "kill:", 5))
{
// On kill, the name is really an id number
int id = (int) (*(int *)name);
cancelLookup (id);
close (accept_fd);
accept_fd = -1;
}
else if (!strncmp (buffer, "lookup:", 7))
{
#if defined(DNS_DEBUG)
printf("received lookup request for: %s\n",name);
#endif
obj = spawnHelperProcess (name);
obj->accept_fd = accept_fd;
char hId[5];
*(int *)&hId[0] = (int) obj->id;
if (!obj)
fprintf (stderr, "spawn Error\n");
else
{
send (obj->accept_fd, hId, sizeof (int), 0);
}
}
}
accept_fd = -1;
}
idx = 0;
while ((obj = getNextDnsEntry (&idx)))
{
// Check to see if any of the helper process is done with
// the lookup operation.
if (FD_ISSET(obj->fd, &readfds))
{
r = read (obj->fd, buffer, BUFSIZ);
int status;
// Send the reponse "hostent" back to client.
send (obj->accept_fd, buffer, r, 0);
close (obj->accept_fd);
removeFromDnsQueue (obj);
wait(&status);
close (obj->fd);
}
}
}
close (listen_fd);
unlink (DNS_SOCK_NAME);
exit (0);
}
#endif // XP_UNIX && UNIX_ASYNC_DNS

View File

@@ -0,0 +1,44 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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 Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef __UNIX_DNS_H__
#define __UNIX_DNS_H__
#define DNS_SOCK_NAME "/tmp/netscape_dns_lookup" // Name of unix socket
/* The internal status codes that are used; these follow the basic
SMTP/NNTP model of three-digit codes.
*/
#define DNS_STATUS_GETHOSTBYNAME_OK 101
#define DNS_STATUS_LOOKUP_OK 102
#define DNS_STATUS_KILLED_OK 103
#define DNS_STATUS_LOOKUP_STARTED 201
#define DNS_STATUS_GETHOSTBYNAME_FAILED 501
#define DNS_STATUS_LOOKUP_FAILED 502
#define DNS_STATUS_LOOKUP_NOT_STARTED 503
#define DNS_STATUS_KILL_FAILED 504
#define DNS_STATUS_UNIMPLEMENTED 601
#define DNS_STATUS_INTERNAL_ERROR 602
#endif /* __UNIX_DNS_H__ */

View File

@@ -0,0 +1,31 @@
#!gmake
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# 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 Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH = ..\..
MODULE = necko
DIRS= \
public \
src \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,38 @@
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# 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 Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = necko
XPIDL_MODULE = necko_dns
XPIDLSRCS = \
nsIDNSListener.idl \
nsIDNSService.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,34 @@
#!gmake
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# 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 Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
MODULE = necko
DEPTH = ..\..\..
include <$(DEPTH)/config/config.mak>
XPIDL_MODULE = necko_dns
XPIDLSRCS = \
.\nsIDNSListener.idl \
.\nsIDNSService.idl \
$(NULL)
include <$(DEPTH)/config/rules.mak>

View File

@@ -0,0 +1,58 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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 Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsISupports.idl"
%{C++
#include "prnetdb.h"
typedef struct nsHostEnt
{
PRHostEnt hostEnt;
char buffer[PR_NETDB_BUF_SIZE];
PRIntn bufLen;
char * bufPtr;
} nsHostEnt;
%}
[ptr] native nsHostEntStar(nsHostEnt);
[scriptable, uuid(7686cef0-206e-11d3-9348-00104ba0fd40)]
interface nsIDNSListener : nsISupports
{
/**
* Notify the listener that we are about to lookup the requested hostname.
*/
void OnStartLookup(in nsISupports ctxt, in string hostname);
/**
* Notify the listener that we have found one or more addresses for the hostname.
*/
[noscript] void OnFound(in nsISupports ctxt, in string hostname,
in nsHostEntStar entry);
/**
* Notify the listener that the lookup has completed.
*/
void OnStopLookup(in nsISupports ctxt, in string hostname, in nsresult status);
};

View File

@@ -0,0 +1,68 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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 Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsISupports.idl"
%{C++
#define NS_DNSSERVICE_CID \
{ /* 718e7c81-f8b8-11d2-b951-c80918051d3c */ \
0x718e7c81, \
0xf8b8, \
0x11d2, \
{ 0xb9, 0x51, 0xc8, 0x09, 0x18, 0x05, 0x1d, 0x3c } \
}
%}
interface nsIRequest;
interface nsIDNSListener;
[scriptable, uuid(598f2f80-206f-11d3-9348-00104ba0fd40)]
interface nsIDNSService : nsISupports
{
nsIRequest lookup(in string hostname,
in nsIDNSListener listener,
in nsISupports ctxt);
/**
* Syncronously resolve the hostname to its IP address.
*/
string resolve(in string hostname);
/**
* Check if the specified address is in the network of the pattern
* using the specified mask. This function would probably go away
* once an implementation for it in JS exists for nsProxyAutoConfig.
* See http://www.mozilla.org/docs/netlib/pac.html for more info.
*/
boolean isInNet(in string ipaddr, in string pattern, in string mask);
void init();
void shutdown();
};
%{C++
#define NS_ERROR_UNKNOWN_HOST NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 30)
%}

View File

@@ -0,0 +1,40 @@
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# 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 Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = necko
LIBRARY_NAME = neckodns_s
REQUIRES = xpcom
CPPSRCS = nsDnsService.cpp
# we don't want the shared lib, but we want to force the creation of a
# static lib.
override NO_SHARED_LIB=1
override NO_STATIC_LIB=
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,42 @@
# The contents of this file are subject to the Netscape 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/NPL/
#
# 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 Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
MODULE = necko
DEPTH = ..\..\..
LCFLAGS = -DWIN32_LEAN_AND_MEAN -D_IMPL_NS_NET
LIBRARY_NAME=neckodns_s
CPP_OBJS = \
.\$(OBJDIR)\nsDnsService.obj \
$(NULL)
INCS = $(INCS) \
-I$(DEPTH)\dist\include \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: $(LIBRARY)
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,111 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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 Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef nsDNSService_h__
#define nsDNSService_h__
#include "nsIDNSService.h"
#include "nsIRunnable.h"
#include "nsIThread.h"
#include "nsISupportsArray.h"
#if defined(XP_MAC)
#include <OSUtils.h>
#include <OpenTransport.h>
#include <OpenTptInternet.h>
#elif defined (XP_WIN)
#include <windows.h>
#include <Winsock2.h>
#endif
#include "nsCOMPtr.h"
#include "nsHashtable.h"
#include "prmon.h"
#ifdef DEBUG
#define DNS_TIMING 1
#endif
class nsIDNSListener;
class nsDNSLookup;
class nsDNSService : public nsIDNSService,
public nsIRunnable
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIRUNNABLE
NS_DECL_NSIDNSSERVICE
// nsDNSService methods:
nsDNSService();
virtual ~nsDNSService();
// Define a Create method to be used with a factory:
static NS_METHOD
Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult);
friend class nsDNSLookup;
protected:
nsresult LateInit();
nsresult InitDNSThread();
nsresult GetLookupEntry(const char* hostName, nsDNSLookup* *result);
static nsDNSService * gService;
static PRBool gNeedLateInitialization;
nsCOMPtr<nsIThread> mThread;
nsresult mState;
PRMonitor* mMonitor;
nsSupportsHashtable mLookups; // of nsDNSLookups
#if defined(XP_MAC)
friend pascal void nsDnsServiceNotifierRoutine(void * contextPtr, OTEventCode code, OTResult result, void * cookie);
PRBool mThreadRunning;
InetSvcRef mServiceRef;
QHdr mCompletionQueue;
#if TARGET_CARBON
OTClientContextPtr mClientContext;
#endif /* TARGET_CARBON */
OTNotifyUPP nsDnsServiceNotifierRoutineUPP;
#endif /* XP_MAC */
#if defined(XP_WIN)
PRUint32 AllocMsgID(void);
void FreeMsgID(PRUint32 msgID);
friend static LRESULT CALLBACK nsDNSEventProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
LRESULT ProcessLookup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
HWND mDNSWindow;
PRUint32 mMsgIDBitVector[4];
#endif /* XP_WIN */
#ifdef DNS_TIMING
double mCount;
double mTimes;
double mSquaredTimes;
FILE* mOut;
friend class nsDNSRequest;
#endif
char* mMyIPAddress;
};
#endif /* nsDNSService_h__ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +0,0 @@
# List clobbering rationale in this file. Please include bug numbers whenever possible.
- 20070619: and now libxul is back on again
- 20070618: clobbering for bug 345517 (enable libxul), after it was backed out for Mac
- 20070612: clobbering for bug 345517 (enable libxul). Again, after fixing mozconfig
- 20070612: clobbering for bug 345517 (enable libxul)
- 20070529: CLOBBER to get symbols uploaded for the first time

View File

@@ -1,26 +0,0 @@
#
## hostname: bm-xservex11.build.mozilla.org
## uname: Darwin bm-xserve11.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
mk_add_options MOZ_MAKE_FLAGS="-j4"
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging mozilla/tools/codesighs"
mk_add_options MOZ_CO_PROJECT="browser"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build/universal
mk_add_options MOZ_MAKE_FLAGS="MOZ_ENABLE_NEW_TEXT_FRAME=1"
ac_add_options --enable-application=browser
ac_add_options --enable-update-channel=nightly
ac_add_options --enable-optimize="-O2 -g"
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
ac_add_options --enable-svg
ac_add_options --enable-canvas
ac_add_options --enable-codesighs

View File

@@ -1,257 +0,0 @@
#
## hostname: bm-xservex11.build.mozilla.org
## uname: Darwin bm-xserve11.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 = 1; # 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 = 'Minefield';
$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 = 1; # Tp
$LayoutPerformanceLocalTest = 0; # Tp2
$DHTMLPerformanceTest = 1; # Tdhtml
#$QATest = 0;
$XULWindowOpenTest = 1; # Txul
$StartupPerformanceTest = 1; # Ts
$TestsPhoneHome = 1; # Should test report back to server?
$GraphNameOverride = 'xserve11.build.mozilla.org_TextFrame';
# $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 = 1200; # entire test, seconds
#$LayoutPerformanceLocalTestTimeout = 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};
$moz_cvsroot = ":ext:cltbld\@cvs.mozilla.org:/cvsroot";
#$moz_cvsroot = "/builds/cvs.hourly/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 = 'TextFrame';
# 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 = 'MozillaExperimental';
#$BuildName = '';
#$BuildTag = '';
#$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 = 1; # 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";
#$ssh_user = "cltbld";
#$ssh_server = "stage.mozilla.org";
$ftp_path = "/home/ftp/pub/firefox/nightly/experimental/textframe";
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/experimental/textframe";
$tbox_ftp_path = "/home/ftp/pub/firefox/tinderbox-builds";
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds";
$milestone = "trunk";
$notify_list = "build-announce\@mozilla.org";
$stub_installer = 0;
$sea_installer = 0;
$archive = 1;
#$push_raw_xpis = 1;
$update_package = 1;
$update_product = "Firefox";
$update_version = "trunk";
$update_platform = "Darwin_Universal-gcc3";
$update_hash = "md5";
$update_filehost = "ftp.mozilla.org";
$update_ver_file = 'browser/config/version.txt';
$update_pushinfo = 0;
$crashreporter_buildsymbols = 0;
$crashreporter_pushsymbols = 0;
$ENV{SYMBOL_SERVER_HOST} = 'stage.mozilla.org';
$ENV{SYMBOL_SERVER_USER} = 'ffxbld';
$ENV{SYMBOL_SERVER_PATH} = '/mnt/netapp/breakpad/symbols_ffx/';
$ENV{SYMBOL_SERVER_SSH_KEY} = "$ENV{HOME}/.ssh/ffxbld_dsa";
$ENV{MOZ_SYMBOLS_EXTRA_BUILDID} = 'textframe';
# 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,5 +0,0 @@
# List clobbering rationale in this file. Please include bug numbers whenever possible.
- 2007/06/12: clobbering for bug 345517 (enable libxul). Again, after fixing mozconfig
- 2007/06/12: clobbering for bug 345517 (enable libxul)
- 2007/05/28: clobbering for bug 382141 to get symbols uploaded
- 2007/05/22: clobbering a win32 trunk build to test aus2 migration (see http://wiki.mozilla.org/WeeklyUpdates/2007-05-21#Build and http://weblogs.mozillazine.org/preed/2007/05/aus2s_a_movin_can_you_help_us.html)

View File

@@ -1,24 +0,0 @@
#
## hostname: fxexp-win32-tbox
## uname: CYGWIN_NT-5.2 fx-win32-tbox 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
#
# . $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_MAKE_FLAGS="-j5"
mk_add_options MOZ_MAKE_FLAGS="MOZ_ENABLE_NEW_TEXT_FRAME=1"
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
mk_add_options MOZ_PACKAGE_NSIS=1
ac_add_options --enable-application=browser
ac_add_options --enable-update-channel=nightly
ac_add_options --enable-optimize
ac_add_options --disable-debug
# ac_add_options --enable-codesighs
ac_add_options --disable-tests
# ac_add_options --enable-official-branding
ac_add_options --enable-svg
ac_add_options --enable-canvas
ac_add_options --enable-default-toolkit=cairo-windows
ac_add_options --enable-update-packaging

View File

@@ -1,253 +0,0 @@
#
## hostname: fx-win32-tbox
## uname: CYGWIN_NT-5.2 fx-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{MOZ_INSTALLER_USE_7ZIP} = '1';
$ENV{NO_EM_RESTART} = '1';
$ENV{MOZ_PACKAGE_NSIS} = '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 = 1; # 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:/moztools/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};
$moz_cvsroot = ':ext: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
#XXX: this breaks talkback currently
#$ObjDir = 'fx-trunk';
# Extra build name, if needed.
$BuildNameExtra = 'TextFrame';
# 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';
$BuildTree = 'MozillaExperimental';
#$BuildName = '';
#$BuildTag = '';
#$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 = '';
# Release build options
$ReleaseBuild = 1;
$shiptalkback = 0;
$ReleaseToLatest = 1; # Push the release to latest-<milestone>?
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
$build_hour = "7";
$package_creation_path = "/browser/installer";
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
$ssh_version = "2";
#$ssh_user = "cltbld";
#$ssh_server = "stage.mozilla.org";
$ftp_path = "/home/ftp/pub/firefox/nightly/experimental/textframe";
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/experimental/textframe";
$tbox_ftp_path = "/home/ftp/pub/firefox/tinderbox-builds";
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds";
$milestone = "trunk";
$notify_list = 'build-announce@mozilla.org';
$stub_installer = 0;
$sea_installer = 1;
$archive = 1;
$push_raw_xpis = 1;
$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 = 0;
$crashreporter_pushsymbols = 0;
$ENV{SYMBOL_SERVER_HOST} = 'stage.mozilla.org';
$ENV{SYMBOL_SERVER_USER} = 'ffxbld';
$ENV{SYMBOL_SERVER_PATH} = '/mnt/netapp/breakpad/symbols_ffx/';
$ENV{SYMBOL_SERVER_SSH_KEY} = "$ENV{HOME}/.ssh/ffxbld_dsa";
$ENV{MOZ_SYMBOLS_EXTRA_BUILDID} = 'textframe';
# 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';