summaryrefslogtreecommitdiff
path: root/packages/boa
diff options
context:
space:
mode:
Diffstat (limited to 'packages/boa')
-rw-r--r--packages/boa/.mtn2git_empty0
-rw-r--r--packages/boa/boa-0.94.13/.mtn2git_empty0
-rw-r--r--packages/boa/boa-0.94.13/debian-patch.diff243
-rw-r--r--packages/boa/files/.mtn2git_empty0
-rw-r--r--packages/boa/files/boa.conf192
-rw-r--r--packages/boa/files/boa.init57
6 files changed, 492 insertions, 0 deletions
diff --git a/packages/boa/.mtn2git_empty b/packages/boa/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/boa/.mtn2git_empty
diff --git a/packages/boa/boa-0.94.13/.mtn2git_empty b/packages/boa/boa-0.94.13/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/boa/boa-0.94.13/.mtn2git_empty
diff --git a/packages/boa/boa-0.94.13/debian-patch.diff b/packages/boa/boa-0.94.13/debian-patch.diff
index e69de29bb2..6ce71c0046 100644
--- a/packages/boa/boa-0.94.13/debian-patch.diff
+++ b/packages/boa/boa-0.94.13/debian-patch.diff
@@ -0,0 +1,243 @@
+diff -urN boa-0.94.13.orig/src/boa.c boa-0.94.13/src/boa.c
+--- boa-0.94.13.orig/src/boa.c 2002-07-23 17:50:29.000000000 +0200
++++ boa-0.94.13/src/boa.c 2004-09-01 20:00:36.000000000 +0200
+@@ -208,10 +208,11 @@
+ struct passwd *passwdbuf;
+ passwdbuf = getpwuid(server_uid);
+ if (passwdbuf == NULL) {
+- DIE("getpwuid");
+- }
++ WARN("getpwuid - will not initgroups");
++ } else {
+ if (initgroups(passwdbuf->pw_name, passwdbuf->pw_gid) == -1) {
+- DIE("initgroups");
++ WARN("initgroups");
++ }
+ }
+ if (setgid(server_gid) == -1) {
+ DIE("setgid");
+diff -urN boa-0.94.13.orig/src/boa.h boa-0.94.13/src/boa.h
+--- boa-0.94.13.orig/src/boa.h 2002-07-26 05:03:44.000000000 +0200
++++ boa-0.94.13/src/boa.h 2004-09-01 20:00:36.000000000 +0200
+@@ -149,8 +149,9 @@
+ void clean_pathname(char *pathname);
+ char *get_commonlog_time(void);
+ void rfc822_time_buf(char *buf, time_t s);
+-char *simple_itoa(unsigned int i);
++char *simple_itoa(long long int i);
+ int boa_atoi(char *s);
++long long int boa_atoll(char *s);
+ char *escape_string(char *inp, char *buf);
+ int month2int(char *month);
+ int modified_since(time_t * mtime, char *if_modified_since);
+diff -urN boa-0.94.13.orig/src/boa_grammar.y boa-0.94.13/src/boa_grammar.y
+--- boa-0.94.13.orig/src/boa_grammar.y 1999-10-12 16:49:07.000000000 +0200
++++ boa-0.94.13/src/boa_grammar.y 2004-09-01 20:00:36.000000000 +0200
+@@ -20,7 +20,7 @@
+ *
+ */
+
+-/* $Id: boa_grammar.y,v 1.14 1999/10/12 14:49:07 jon Exp $*/
++/* $Id: boa_grammar.y,v 1.14 1999/10/12 14:49:07 jon Exp $ */
+
+ #include <string.h>
+ #include <stdio.h>
+diff -urN boa-0.94.13.orig/src/compat.h boa-0.94.13/src/compat.h
+--- boa-0.94.13.orig/src/compat.h 2002-06-06 07:02:28.000000000 +0200
++++ boa-0.94.13/src/compat.h 2004-09-01 20:00:36.000000000 +0200
+@@ -117,7 +117,7 @@
+ #endif
+
+ #ifdef HAVE_TM_GMTOFF
+-#define TIMEZONE_OFFSET(foo) foo##->tm_gmtoff
++#define TIMEZONE_OFFSET(foo) foo->tm_gmtoff
+ #else
+ #define TIMEZONE_OFFSET(foo) timezone
+ #endif
+diff -urN boa-0.94.13.orig/src/get.c boa-0.94.13/src/get.c
+--- boa-0.94.13.orig/src/get.c 2002-07-26 05:05:59.000000000 +0200
++++ boa-0.94.13/src/get.c 2004-09-01 20:00:36.000000000 +0200
+@@ -43,7 +43,7 @@
+ struct stat statbuf;
+ volatile int bytes;
+
+- data_fd = open(req->pathname, O_RDONLY);
++ data_fd = open(req->pathname, O_RDONLY | O_LARGEFILE);
+ saved_errno = errno; /* might not get used */
+
+ #ifdef GUNZIP
+@@ -58,7 +58,7 @@
+ memcpy(gzip_pathname, req->pathname, len);
+ memcpy(gzip_pathname + len, ".gz", 3);
+ gzip_pathname[len + 3] = '\0';
+- data_fd = open(gzip_pathname, O_RDONLY);
++ data_fd = open(gzip_pathname, O_RDONLY | O_LARGEFILE);
+ if (data_fd != -1) {
+ close(data_fd);
+
+@@ -313,7 +313,7 @@
+ sprintf(pathname_with_index, "%s%s", req->pathname, directory_index);
+ */
+
+- data_fd = open(pathname_with_index, O_RDONLY);
++ data_fd = open(pathname_with_index, O_RDONLY | O_LARGEFILE);
+
+ if (data_fd != -1) { /* user's index file */
+ strcpy(req->request_uri, directory_index); /* for mimetype */
+@@ -334,7 +334,7 @@
+ * try index.html.gz
+ */
+ strcat(pathname_with_index, ".gz");
+- data_fd = open(pathname_with_index, O_RDONLY);
++ data_fd = open(pathname_with_index, O_RDONLY | O_LARGEFILE);
+ if (data_fd != -1) { /* user's index file */
+ close(data_fd);
+
+@@ -399,9 +399,9 @@
+ time_t real_dir_mtime;
+
+ real_dir_mtime = statbuf->st_mtime;
+- sprintf(pathname_with_index, "%s/dir.%d.%ld",
++ sprintf(pathname_with_index, "%s/dir.%d.%lld",
+ cachedir, (int) statbuf->st_dev, statbuf->st_ino);
+- data_fd = open(pathname_with_index, O_RDONLY);
++ data_fd = open(pathname_with_index, O_RDONLY | O_LARGEFILE);
+
+ if (data_fd != -1) { /* index cache */
+
+@@ -417,7 +417,7 @@
+ if (index_directory(req, pathname_with_index) == -1)
+ return -1;
+
+- data_fd = open(pathname_with_index, O_RDONLY); /* Last chance */
++ data_fd = open(pathname_with_index, O_RDONLY | O_LARGEFILE); /* Last chance */
+ if (data_fd != -1) {
+ strcpy(req->request_uri, directory_index); /* for mimetype */
+ fstat(data_fd, statbuf);
+diff -urN boa-0.94.13.orig/src/globals.h boa-0.94.13/src/globals.h
+--- boa-0.94.13.orig/src/globals.h 2002-07-24 05:03:59.000000000 +0200
++++ boa-0.94.13/src/globals.h 2004-09-01 20:00:36.000000000 +0200
+@@ -54,8 +54,8 @@
+ int kacount; /* keepalive count */
+
+ int data_fd; /* fd of data */
+- unsigned long filesize; /* filesize */
+- unsigned long filepos; /* position in file */
++ unsigned long long filesize; /* filesize */
++ unsigned long long filepos; /* position in file */
+ char *data_mem; /* mmapped/malloced char array */
+ int method; /* M_GET, M_POST, etc. */
+
+diff -urN boa-0.94.13.orig/src/index_dir.c boa-0.94.13/src/index_dir.c
+--- boa-0.94.13.orig/src/index_dir.c 2002-01-30 04:41:45.000000000 +0100
++++ boa-0.94.13/src/index_dir.c 2004-09-01 20:00:36.000000000 +0200
+@@ -240,10 +240,10 @@
+ printf("<tr>"
+ "<td width=\"40%%\"><a href=\"%s/\">%s/</a></td>"
+ "<td align=right>%s</td>"
+- "<td align=right>%ld bytes</td>"
++ "<td align=right>%lld bytes</td>"
+ "</tr>\n",
+ http_filename, html_filename,
+- ctime(&statbuf.st_mtime), (long) statbuf.st_size);
++ ctime(&statbuf.st_mtime), (long long) statbuf.st_size);
+ }
+
+ printf
+@@ -281,19 +281,19 @@
+ "<td width=\"40%%\"><a href=\"%s\">%s</a> "
+ "<a href=\"%s.gz\">(.gz)</a></td>"
+ "<td align=right>%s</td>"
+- "<td align=right>%ld bytes</td>"
++ "<td align=right>%lld bytes</td>"
+ "</tr>\n",
+ http_filename, html_filename, http_filename,
+- ctime(&statbuf.st_mtime), (long) statbuf.st_size);
++ ctime(&statbuf.st_mtime), (long long) statbuf.st_size);
+ } else {
+ #endif
+ printf("<tr>"
+ "<td width=\"40%%\"><a href=\"%s\">%s</a></td>"
+ "<td align=right>%s</td>"
+- "<td align=right>%ld bytes</td>"
++ "<td align=right>%lld bytes</td>"
+ "</tr>\n",
+ http_filename, html_filename,
+- ctime(&statbuf.st_mtime), (long) statbuf.st_size);
++ ctime(&statbuf.st_mtime), (long long) statbuf.st_size);
+ #ifdef GUNZIP
+ }
+ #endif
+diff -urN boa-0.94.13.orig/src/log.c boa-0.94.13/src/log.c
+--- boa-0.94.13.orig/src/log.c 2002-07-26 05:04:48.000000000 +0200
++++ boa-0.94.13/src/log.c 2004-09-01 20:00:36.000000000 +0200
+@@ -142,7 +142,7 @@
+ if (access_log) {
+ if (virtualhost)
+ fprintf(access_log, "%s ", req->local_ip_addr);
+- fprintf(access_log, "%s - - %s\"%s\" %d %ld \"%s\" \"%s\"\n",
++ fprintf(access_log, "%s - - %s\"%s\" %d %lld \"%s\" \"%s\"\n",
+ req->remote_ip_addr,
+ get_commonlog_time(),
+ req->logline,
+diff -urN boa-0.94.13.orig/src/mmap_cache.c boa-0.94.13/src/mmap_cache.c
+--- boa-0.94.13.orig/src/mmap_cache.c 2002-03-24 23:35:34.000000000 +0100
++++ boa-0.94.13/src/mmap_cache.c 2004-09-01 20:00:36.000000000 +0200
+@@ -104,7 +104,7 @@
+ int data_fd;
+ struct stat statbuf;
+ struct mmap_entry *e;
+- data_fd = open(fname, O_RDONLY);
++ data_fd = open(fname, O_RDONLY | O_LARGEFILE);
+ if (data_fd == -1) {
+ perror(fname);
+ return NULL;
+diff -urN boa-0.94.13.orig/src/read.c boa-0.94.13/src/read.c
+--- boa-0.94.13.orig/src/read.c 2002-03-18 02:53:48.000000000 +0100
++++ boa-0.94.13/src/read.c 2004-09-01 20:00:36.000000000 +0200
+@@ -157,7 +157,7 @@
+ if (req->content_length) {
+ int content_length;
+
+- content_length = boa_atoi(req->content_length);
++ content_length = boa_atoll(req->content_length);
+ /* Is a content-length of 0 legal? */
+ if (content_length <= 0) {
+ log_error_time();
+diff -urN boa-0.94.13.orig/src/util.c boa-0.94.13/src/util.c
+--- boa-0.94.13.orig/src/util.c 2002-07-08 01:22:18.000000000 +0200
++++ boa-0.94.13/src/util.c 2004-09-01 20:00:36.000000000 +0200
+@@ -386,7 +386,7 @@
+ memcpy(p, day_tab + t->tm_wday * 4, 4);
+ }
+
+-char *simple_itoa(unsigned int i)
++char *simple_itoa(long long int i)
+ {
+ /* 21 digits plus null terminator, good for 64-bit or smaller ints
+ * for bigger ints, use a bigger buffer!
+@@ -427,6 +427,24 @@
+ return retval;
+ }
+
++/* I don't "do" negative conversions
++ * Therefore, -1 indicates error
++ */
++
++long long int boa_atoll(char *s)
++{
++ long long int retval;
++
++ if (!isdigit(*s))
++ return -1;
++
++ retval = atoll(s);
++ if (retval < 0)
++ return -1;
++
++ return retval;
++}
++
+ int create_temporary_file(short want_unlink, char *storage, int size)
+ {
+ static char boa_tempfile[MAX_PATH_LENGTH + 1];
diff --git a/packages/boa/files/.mtn2git_empty b/packages/boa/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/boa/files/.mtn2git_empty
diff --git a/packages/boa/files/boa.conf b/packages/boa/files/boa.conf
index e69de29bb2..349da47ee0 100644
--- a/packages/boa/files/boa.conf
+++ b/packages/boa/files/boa.conf
@@ -0,0 +1,192 @@
+# Boa v0.94 configuration file
+# Customized for Debian GNU/Linux by Jonathon Nelson <jnelson@boa.org>
+# File format has not changed from 0.93
+# File format has changed little from 0.92
+# version changes are noted in the comments
+#
+# The Boa configuration file is parsed with a lex/yacc or flex/bison
+# generated parser. If it reports an error, the line number will be
+# provided; it should be easy to spot. The syntax of each of these
+# rules is very simple, and they can occur in any order. Where possible
+# these directives mimic those of NCSA httpd 1.3; I saw no reason to
+# introduce gratuitous differences.
+
+# $Id: boa.conf,v 1.7 2001/09/25 03:28:30 jnelson Exp $
+
+# The "ServerRoot" is not in this configuration file. It can be compiled
+# into the server (see defines.h) or specified on the command line with
+# the -c option, for example:
+#
+# boa -c /usr/local/boa
+
+
+# Port: The port Boa runs on. The default port for http servers is 80.
+# If it is less than 1024, the server must be started as root.
+
+Port 80
+
+# PidFile: The file that boa should write it's PID to
+# NOT FUNCTIONAL YET -- just a stub for now
+#PidFile /var/run/boa.pid
+
+# Listen: the Internet address to bind(2) to. If you leave it out,
+# it takes the behavior before 0.93.17.2, which is to bind to all
+# addresses (INADDR_ANY). You only get one "Listen" directive,
+# if you want service on multiple IP addresses, you have three choices:
+# 1. Run boa without a "Listen" directive
+# a. All addresses are treated the same; makes sense if the addresses
+# are localhost, ppp, and eth0.
+# b. Use the VirtualHost directive below to point requests to different
+# files. Should be good for a very large number of addresses (web
+# hosting clients).
+# 2. Run one copy of boa per IP address, each has its own configuration
+# with a "Listen" directive. No big deal up to a few tens of addresses.
+# Nice separation between clients.
+# The name you provide gets run through inet_aton(3), so you have to use dotted
+# quad notation. This configuration is too important to trust some DNS.
+
+#Listen 192.68.0.5
+
+# User: The name or UID the server should run as.
+# Group: The group name or GID the server should run as.
+
+User www-data
+Group www-data
+
+# ServerAdmin: The email address where server problems should be sent.
+# Note: this is not currently used, except as an environment variable
+# for CGIs.
+
+#ServerAdmin root@localhost
+
+# ErrorLog: The location of the error log file. If this does not start
+# with /, it is considered relative to the server root.
+# Set to /dev/null if you don't want errors logged.
+# If unset, defaults to /dev/stderr
+
+ErrorLog /var/log/boa/error_log
+# Please NOTE: Sending the logs to a pipe ('|'), as shown below,
+# is somewhat experimental and might fail under heavy load.
+# "Usual libc implementations of printf will stall the whole
+# process if the receiving end of a pipe stops reading."
+#ErrorLog "|/usr/sbin/cronolog --symlink=/var/log/boa/error_log /var/log/boa/error-%Y%m%d.log"
+
+# AccessLog: The location of the access log file. If this does not
+# start with /, it is considered relative to the server root.
+# Comment out or set to /dev/null (less effective) to disable
+# Access logging.
+
+AccessLog /var/log/boa/access_log
+# Please NOTE: Sending the logs to a pipe ('|'), as shown below,
+# is somewhat experimental and might fail under heavy load.
+# "Usual libc implementations of printf will stall the whole
+# process if the receiving end of a pipe stops reading."
+#AccessLog "|/usr/sbin/cronolog --symlink=/var/log/boa/access_log /var/log/boa/access-%Y%m%d.log"
+
+# UseLocaltime: Logical switch. Uncomment to use localtime
+# instead of UTC time
+#UseLocaltime
+
+# VerboseCGILogs: this is just a logical switch.
+# It simply notes the start and stop times of cgis in the error log
+# Comment out to disable.
+
+#VerboseCGILogs
+
+# ServerName: the name of this server that should be sent back to
+# clients if different than that returned by gethostname + gethostbyname
+
+#ServerName www.your.org.here
+
+# VirtualHost: a logical switch.
+# Comment out to disable.
+# Given DocumentRoot /var/www, requests on interface 'A' or IP 'IP-A'
+# become /var/www/IP-A.
+# Example: http://localhost/ becomes /var/www/127.0.0.1
+#
+# Not used until version 0.93.17.2. This "feature" also breaks commonlog
+# output rules, it prepends the interface number to each access_log line.
+# You are expected to fix that problem with a postprocessing script.
+
+#VirtualHost
+
+# DocumentRoot: The root directory of the HTML documents.
+# Comment out to disable server non user files.
+
+DocumentRoot /var/www
+
+# UserDir: The name of the directory which is appended onto a user's home
+# directory if a ~user request is recieved.
+
+UserDir public_html
+
+# DirectoryIndex: Name of the file to use as a pre-written HTML
+# directory index. Please MAKE AND USE THESE FILES. On the
+# fly creation of directory indexes can be _slow_.
+# Comment out to always use DirectoryMaker
+
+DirectoryIndex index.html
+
+# DirectoryMaker: Name of program used to create a directory listing.
+# Comment out to disable directory listings. If both this and
+# DirectoryIndex are commented out, accessing a directory will give
+# an error (though accessing files in the directory are still ok).
+
+DirectoryMaker /usr/lib/boa/boa_indexer
+
+# DirectoryCache: If DirectoryIndex doesn't exist, and DirectoryMaker
+# has been commented out, the the on-the-fly indexing of Boa can be used
+# to generate indexes of directories. Be warned that the output is
+# extremely minimal and can cause delays when slow disks are used.
+# Note: The DirectoryCache must be writable by the same user/group that
+# Boa runs as.
+
+# DirectoryCache /var/spool/boa/dircache
+
+# KeepAliveMax: Number of KeepAlive requests to allow per connection
+# Comment out, or set to 0 to disable keepalive processing
+
+KeepAliveMax 1000
+
+# KeepAliveTimeout: seconds to wait before keepalive connection times out
+
+KeepAliveTimeout 10
+
+# MimeTypes: This is the file that is used to generate mime type pairs
+# and Content-Type fields for boa.
+# Set to /dev/null if you do not want to load a mime types file.
+# Do *not* comment out (better use AddType!)
+
+MimeTypes /etc/mime.types
+
+# DefaultType: MIME type used if the file extension is unknown, or there
+# is no file extension.
+
+DefaultType text/plain
+
+# AddType: adds types without editing mime.types
+# Example: AddType type extension [extension ...]
+
+# Uncomment the next line if you want .cgi files to execute from anywhere
+#AddType application/x-httpd-cgi cgi
+
+# Redirect, Alias, and ScriptAlias all have the same semantics -- they
+# match the beginning of a request and take appropriate action. Use
+# Redirect for other servers, Alias for the same server, and ScriptAlias
+# to enable directories for script execution.
+
+# Redirect allows you to tell clients about documents which used to exist in
+# your server's namespace, but do not anymore. This allows you to tell the
+# clients where to look for the relocated document.
+# Example: Redirect /bar http://elsewhere/feh/bar
+
+# Aliases: Aliases one path to another.
+# Example: Alias /path1/bar /path2/foo
+
+Alias /doc /usr/share/doc
+
+# ScriptAlias: Maps a virtual path to a directory for serving scripts
+# Example: ScriptAlias /htbin/ /www/htbin/
+
+ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
+ScriptAlias /cgi-lib/ /usr/lib/cgi-bin/
diff --git a/packages/boa/files/boa.init b/packages/boa/files/boa.init
index e69de29bb2..9c05c5ada3 100644
--- a/packages/boa/files/boa.init
+++ b/packages/boa/files/boa.init
@@ -0,0 +1,57 @@
+#! /bin/sh
+#
+# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+# Modified for Debian GNU/Linux
+# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+# Modified for boa by Bill Allombert <ballombe@debian.org>.
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/boa
+NAME=boa
+DESC="HTTP server"
+LOGDIR="/var/log/$NAME"
+
+test -x $DAEMON || exit 0
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: $NAME"
+ if [ ! -d $LOGDIR ]; then
+ mkdir -p $LOGDIR
+ fi
+ start-stop-daemon --start --quiet --exec $DAEMON
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: $NAME"
+ start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
+ echo "."
+ ;;
+ restart)
+ echo -n "Restarting $DESC: $NAME"
+ start-stop-daemon --stop --signal HUP --quiet --oknodo --exec $DAEMON
+ echo "done."
+ ;;
+ reload)
+ #
+ # If the daemon can reload its config files on the fly
+ # for example by sending it SIGHUP, do it here.
+ #
+ # If the daemon responds to changes in its config file
+ # directly anyway, make this a do-nothing entry.
+ #
+ echo -n "Reloading $DESC configuration..."
+ start-stop-daemon --stop --signal 1 --quiet --oknodo --exec $DAEMON
+ echo "done."
+ ;;
+ *)
+ N=/etc/init.d/$NAME
+ # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0