boa: added php via cgi support, initscripts fixes for busybox - close #262
authorDan Williams <dan.j.williams@gmail.com>
Sun, 3 Dec 2006 20:27:29 +0000 (20:27 +0000)
committerMarcin Juszkiewicz <hrw@openembedded.org>
Sun, 3 Dec 2006 20:27:29 +0000 (20:27 +0000)
packages/boa/boa-0.94.13/cgi.patch [new file with mode: 0644]
packages/boa/boa_0.94.13.bb
packages/boa/files/boa.conf
packages/boa/files/boa.init

diff --git a/packages/boa/boa-0.94.13/cgi.patch b/packages/boa/boa-0.94.13/cgi.patch
new file mode 100644 (file)
index 0000000..4f6a0ee
--- /dev/null
@@ -0,0 +1,10 @@
+--- boa-0.94.13/src/cgi.c      2002-07-23 08:49:54.000000000 -0700
++++ boa-0.94.13/src/cgi.c~     2005-06-22 23:13:54.000000000 -0700
+@@ -214,6 +214,7 @@
+     my_add_cgi_env(req, "SERVER_ADDR", req->local_ip_addr);
+     my_add_cgi_env(req, "SERVER_PROTOCOL", req->http_version);
+     my_add_cgi_env(req, "REQUEST_URI", req->request_uri);
++    my_add_cgi_env(req, "SCRIPT_FILENAME", req->request_uri);
+     if (req->path_info)
+         my_add_cgi_env(req, "PATH_INFO", req->path_info);
index 7dc7832..342dce9 100644 (file)
@@ -1,16 +1,16 @@
 DESCRIPTION = "Lightweight and High Performance WebServer"
 SECTION = "console/network"
-RPROVIDES = "httpd"
 LICENSE = "GPL"
-PR = "r2"
-
-DEPENDS = "mime-support"
 RDEPENDS = "mime-support"
+RPROVIDES = "httpd"
+PR = "r3"
 
 SRC_URI = "http://www.boa.org/boa-${PV}.tar.gz \
+           file://cgi.patch;patch=1;pnum=2 \
            file://debian-patch.diff;patch=1;pnum=2 \
            file://boa.conf \
            file://boa.init"
+
 S = "${WORKDIR}/boa-${PV}/src"
 
 inherit autotools update-rc.d
@@ -31,4 +31,7 @@ do_install() {
        install -d ${D}${sysconfdir}/init.d
        install -m 0640 ${WORKDIR}/boa.conf     ${D}${sysconfdir}/${PN}
        install -m 0755 ${WORKDIR}/boa.init     ${D}${sysconfdir}/init.d/boa
+
+       install -d ${D}${mandir}/man8
+       install -m 0644 ${S}/../docs/boa.8 ${D}${mandir}/man8
 }
index 349da47..fbe15f4 100644 (file)
@@ -168,7 +168,8 @@ DefaultType text/plain
 # Example: AddType type extension [extension ...]
 
 # Uncomment the next line if you want .cgi files to execute from anywhere
-#AddType application/x-httpd-cgi cgi
+AddType application/x-httpd-cgi cgi
+AddType application/x-httpd-cgi php
 
 # Redirect, Alias, and ScriptAlias all have the same semantics -- they
 # match the beginning of a request and take appropriate action.  Use
index 9c05c5a..7ac99f2 100644 (file)
@@ -26,30 +26,19 @@ case "$1" in
        ;;
   stop)
        echo -n "Stopping $DESC: $NAME"
-       start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
+       start-stop-daemon --stop --quiet --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
+       start-stop-daemon --stop --exec $DAEMON
+       start-stop-daemon --start --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
+       echo "Usage: $N {start|stop|restart}" >&2
        exit 1
        ;;
 esac