# HG changeset patch # User Petr Sumbera # Date 1308777022 25200 # Node ID 5001b63ddc8a61a812d16dd3bf666e31a26fb449 # Parent 1251baad27f02ae9c3c9b5838caef80fdacca94f 7057442 Move Lighttpd to userland 6925012 [OSOL B132] bad ligttpd pid file mentioned in the man pages 6925729 SUNWlighttpd14 package delivers broken link 6898502 lighttpd service method uses hardcoded pidfile diff -r 1251baad27f0 -r 5001b63ddc8a components/lighttpd/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/lighttpd/Makefile Wed Jun 22 14:10:22 2011 -0700 @@ -0,0 +1,69 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. +# + +include ../../make-rules/shared-macros.mk + +COMPONENT_NAME= lighttpd +COMPONENT_VERSION= 1.4.23 +COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) +COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz +COMPONENT_ARCHIVE_HASH= sha1:37f8b4827d7a1f69812d8185fcecf72277020876 +COMPONENT_ARCHIVE_URL= http://www.lighttpd.net/download/$(COMPONENT_ARCHIVE) + +LIGHTTPD_INSTALLDIR=/usr/lighttpd/1.4 + +include ../../make-rules/prep.mk +include ../../make-rules/configure.mk +include ../../make-rules/ips.mk + +PATCH_LEVEL=0 + +# libtool linking will fail unless we re-create configure. +COMPONENT_PREP_ACTION = ( cd $(@D) ; $(CONFIG_SHELL) autogen.sh ) + +# lighttpd is logging using __FILE__ macro. Cloning will make this happen +# using just source file names (without full absolute paths). +COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D)) + +CONFIGURE_PREFIX= /usr/lighttpd/1.4 +CONFIGURE_MANDIR= $(CONFIGURE_PREFIX)/man + +CONFIGURE_OPTIONS += --with-pic +CONFIGURE_OPTIONS += --with-lua +CONFIGURE_OPTIONS += --with-openssl +CONFIGURE_OPTIONS += --with-pcre +CONFIGURE_OPTIONS += --with-mysql=/usr/mysql/bin/mysql_config +CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" + +# common targets +build: $(BUILD_32) + +install: $(INSTALL_32) + +test: $(TEST_32) + +BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) + +include ../../make-rules/depend.mk diff -r 1251baad27f0 -r 5001b63ddc8a components/lighttpd/Solaris/auth_attr --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/lighttpd/Solaris/auth_attr Wed Jun 22 14:10:22 2011 -0700 @@ -0,0 +1,2 @@ +solaris.smf.value.http/lighttpd14:::Change Lighttpd 14 value properties:: +solaris.smf.manage.http/lighttpd14:::Manage Lighttpd 14 service states:: diff -r 1251baad27f0 -r 5001b63ddc8a components/lighttpd/Solaris/fcgi-php.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/lighttpd/Solaris/fcgi-php.conf Wed Jun 22 14:10:22 2011 -0700 @@ -0,0 +1,50 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. +# + +## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini +## +## In order to use PHP with Lighttpd you need to make sure that the +## appropriate PHP packages are installed and that the paths to the +## php-cgi binary and the php.ini file are correct. To facilite this +## the variable "php_bin-path" has been provided. Set this variable +## to the correct values for your setup. +## +## To use this file, add an include directive to the lighttpd.conf file, i.e: +## include "conf.d/fcgi-php.conf" (without the '##')) + +var.php_bin-path = "/usr/php/bin/php-cgi" + +global { + server.modules += ("mod_fastcgi") +} + +fastcgi.server = ( ".php" => + ( "localhost" => + ( + "socket" => "/tmp/php-fastcgi.socket", + "bin-path" => php_bin-path + ) + ) + ) + diff -r 1251baad27f0 -r 5001b63ddc8a components/lighttpd/Solaris/http-lighttpd14 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/lighttpd/Solaris/http-lighttpd14 Wed Jun 22 14:10:22 2011 -0700 @@ -0,0 +1,61 @@ +#!/usr/bin/ksh93 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. +# + +# load builtins +builtin rm + +source /lib/svc/share/smf_include.sh + +# constants +typeset -r lighttpd_version="1.4" +typeset -r lighttpd_home="/usr/lighttpd/${lighttpd_version}" +typeset -r lighttpd_bin="${lighttpd_home}/sbin/lighttpd" +typeset -r conf_file="/etc/lighttpd/${lighttpd_version}/lighttpd.conf" +typeset -r pidfile=`sed -n -e 's/"//g' -e 's/server\.pid-file *= *//p' ${conf_file}` + + +[[ ! -f "${conf_file}" ]] && exit $SMF_EXIT_ERR_CONFIG + +case "$1" in + start) + rm -f "${pidfile}" + exec ${lighttpd_bin} -f ${conf_file} 2>&1 + ;; + refresh) + print "Going to refresh" + if [[ -f "${pidfile}" ]]; then + kill -HUP "$( < "${pidfile}" )" + fi + ;; + stop) + if [[ -f ${pidfile} ]] ; then + kill "$( < "${pidfile}" )" + fi + ;; + *) + printf "Usage: %s {start|stop|refresh}\n" "$0" + exit 1 + ;; +esac diff -r 1251baad27f0 -r 5001b63ddc8a components/lighttpd/Solaris/http-lighttpd14.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/lighttpd/Solaris/http-lighttpd14.xml Wed Jun 22 14:10:22 2011 -0700 @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 1251baad27f0 -r 5001b63ddc8a components/lighttpd/Solaris/lighttpd.1m.sunman --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/lighttpd/Solaris/lighttpd.1m.sunman Wed Jun 22 14:10:22 2011 -0700 @@ -0,0 +1,269 @@ +'\" t +.\" +.\" CDDL HEADER START +.\" +.\" The contents of this file are subject to the terms of the +.\" Common Development and Distribution License (the "License"). +.\" You may not use this file except in compliance with the License. +.\" +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +.\" or http://www.opensolaris.org/os/licensing. +.\" See the License for the specific language governing permissions +.\" and limitations under the License. +.\" +.\" When distributing Covered Code, include this CDDL HEADER in each +.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. +.\" If applicable, add the following below this CDDL HEADER, with the +.\" fields enclosed by brackets "[]" replaced with your own identifying +.\" information: Portions Copyright [yyyy] [name of copyright owner] +.\" +.\" CDDL HEADER END +.\" +.\" Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. +.\" +.TH lighttpd 1M "October 2009" "SunOS 5.11" "System Administration Commands" +.SH NAME +lighttpd \- a fast, secure and flexible webserver +.SH SYNOPSIS +.LP +.nf +\fBlighttpd\fR +.fi + +.SH DESCRIPTION +.sp +.LP +The Lighttpd Web Server consists of a server daemon, a watchdog process, loadable server modules, configuration files and documentation. +.sp +.LP +.SH FILES +.sp +.LP +The following paths specify the installation locations for Lighttpd: +.LP +Note : +.RS +4 +.TP +.ie t \(bu +.el o +The string \fB[version]\fR should be expanded +to \fB"MAJOR.MINOR"\fR. For example, \fB/usr/lighttpd/1.4/*\fR. +.RE +.RE +.sp +.ne 2 +.mk +.na +\fB\fB/etc/lighttpd/[version]\fR\fR +.ad +.sp .6 +.RS 4n +Contains lighttpd configuration files. A new install contains a single, default configuration file \fBlighttpd.conf\fR. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fB/etc/lighttpd/[version]/conf.d\fR\fR +.ad +.sp .6 +.RS 4n +Contains additional server configuration files. These files generally require some customisation and are therefore not automatically loaded by the main configuration file. +.sp +.RE + +.sp +.ne 2 +.mk +.na +\fB\fB/usr/lighttpd/[version]/sbin\fR\fR +.ad +.sp .6 +.RS 4n +Contains the lighttpd executable and the lighttpd-angel watchdog process. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fB/usr/lighttpd/[version]/man\fR\fR +.ad +.sp .6 +.RS 4n +Contains man pages for the server and utility programs. +.sp +Add this directory to your MANPATH to read the Lighttpd man pages. See +Notes. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fB/usr/lighttpd/[version]/lib\fR\fR +.ad +.sp .6 +.RS 4n +Contains the Lighttpd loadable modules. These can be loaded by using directives in the configuration file. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fB/var/lighttpd/[version]/docroot\fR\fR +.ad +.sp .6 +.RS 4n +The default location for content as specified by the server.document-root directive in the Lightpd configuration file. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fB/var/lighttpd/[version]/logs\fR\fR +.ad +.sp .6 +.RS 4n +This is the default location for the Lighttpd log files. +.sp +The formats, names, and locations of the files in this directory can +be altered by various configuration directives in the \fBlighttpd.conf\fR file. +.RE + +.SH SERVICE MANAGEMENT FACILITY +.sp +.LP +The \fBlighttpd14\fR package for Solaris (\fBweb/server/lighttpd-14\fR) includes all of the files necessary to register Lighttpd with the Service Management Facility described in \fISMF(5)\fR. The following procedure describes the steps to automate service management for lighttpd. + +Note : +.RS +4 +.TP +.ie t \(bu +.el o +The the full name of the lighttpd service is svc:/network/http:lighttpd14 +This can be abbreviated to lighttpd14 which is the \fBinstance name\fR of the service. +.RE + +.RS +4 +.TP +1. +To enable the lighttpd14 service. +.sp +.in +2 +.nf +example% svcadm enable lighttpd14 +.fi +.in -2 + +The state of the service instance changes to \fBonline\fR, +and the lighttpd14 service instance is now available: +.sp +.in +2 +.nf +example% svcs lighttpd14 +STATE STIME FMRI +online 11:22:17 svc:/network/http:lighttpd14 +.fi +.in -2 +.sp + +.RE +.RS +4 +.TP +2. +To disable the lighttpd14 service instance, +.sp +.in +2 +.nf +example% svcadm disable lighttpd14 +.fi +.in -2 + +The state of the service instance changes to \fBdisabled\fR, +and the lighttpd service instance is no longer available: +.sp +.in +2 +.nf +example% svcs lighttpd14 +STATE STIME FMRI +disabled 11:35:15 svc:/network/http:lighttpd14 +.fi +.in -2 +.sp +.RE + +.SH USER AUTHORIZATIONS +.sp +.LP +You can use \fBRBAC(5)\fR to authorize otherwise non-privileged users to manage +the \fBlighttpd14\fR service. +To allow a user to manage the \fBlighttpd14\fR service states, add a line to +\fB/etc/user_attr\fR of the form: +.sp +.in +2 +.nf +::::type=role;profiles=Lighttpd 14 Administration,All +.fi +.in -2 +.sp +.LP +Where is the name of the user being granted the authorisation. If the user already has an entry in \fB/etc/user_attr\fR, add the "Lighttpd 14 Administration" profile to his or her entry. +.sp +.RE + +.SH SPAWN-FCGI CHANGES +.LP +Version 1.4.23 of the Lighttpd web server sees the refactoring of the spawn-fcgi utility into a separate source distribution and as a result, spawn-fcgi has been spun out into a separate package named web/fastcgi/spawn-fcgi. The Lighttpd packages install web/fastcgi/spawn-fcgi as a dependency and provide symbolic links from the original locations of the spawn-fcgi executable and manpage to the locations delivered by the spawn-fcgi package, i.e.: +.sp +.in +2 +.nf +/usr/lighttpd/1.4/bin/spawn-fcgi -> /usr/bin/spawn-fcgi + +/usr/lighttpd/1.4/share/man/man1/spawn-fcgi.1 + -> /usr/share/man/man1/spawn-fcgi.1 +.fi +.in -2 +.sp +.LP +These symbolic links may be removed in a future update of the Lighttpd packages +.sp +.RE + +.SH CONFIGURATION OPTIONS +.sp +.LP +At this time, use of multiple Lighttpd worker processes is discouraged and is not supported by the Lighttpd community. From version 1.4.23 the supplied configuration file has the following line removed: +.sp +.in +2 +.nf +server.max-worker = 4 +.fi +.in -2 +.sp +.LP +The result of this change is that by default, Lighttpd will be run with a single worker process +.sp +.RE + +.SH SEE ALSO +.sp +.LP +\fBattributes(5)\fR, \fBlighttpd(8)\fR, \fBspawn-fcgi(8)\fR, \fBlighttpd-angel(8)\fR +.sp +.LP +http://www.lighttpd.net +.SH NOTES +.sp +.LP +In addition to the documentation and man pages included with Solaris, +more information is available at http://www.lighttpd.net\&. +.sp +.LP +The Lighttpd man pages are provided with the programming modules. To +view the manual pages for the Lighttpd modules with the man command, add \fB/usr/lighttpd/[version]/man\fR to the MANPATH environment variable. +See \fBman(1)\fR for more information. Running \fBcatman(1M)\fR on +the Lighttpd manual pages is not supported. diff -r 1251baad27f0 -r 5001b63ddc8a components/lighttpd/Solaris/prof_attr --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/lighttpd/Solaris/prof_attr Wed Jun 22 14:10:22 2011 -0700 @@ -0,0 +1,1 @@ +Lighttpd 14 Administration:RO:::auths=solaris.smf.manage.http/lighttpd14,solaris.smf.value.http/lighttpd14 diff -r 1251baad27f0 -r 5001b63ddc8a components/lighttpd/Solaris/ssl.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/lighttpd/Solaris/ssl.conf Wed Jun 22 14:10:22 2011 -0700 @@ -0,0 +1,29 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. +# + +## enable/disable SSL engine +ssl.engine = "enable" + +# specify path to SSL certificate file for this server +ssl.pemfile = "server.pem" diff -r 1251baad27f0 -r 5001b63ddc8a components/lighttpd/lighttpd.p5m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/lighttpd/lighttpd.p5m Wed Jun 22 14:10:22 2011 -0700 @@ -0,0 +1,132 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. +# + + default mangler.man.stability uncommitted> +set name=pkg.fmri \ + value=pkg:/web/server/lighttpd-14@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION) +set name=pkg.summary \ + value="The Lighttpd Web Server" +set name=info.classification \ + value="org.opensolaris.category.2008:Web Services/Application and Web Servers" +set name=info.upstream_url \ + value=http://www.lighttpd.net/ +set name=info.source_url \ + value=$(COMPONENT_ARCHIVE_URL) +set name=opensolaris.arc_url \ + value=http://arc.opensolaris.org/caselog/LSARC/2008/191 +set name=org.opensolaris.consolidation \ + value=$(CONSOLIDATION) + +license COPYING license='Lighttpd license' + +dir path=etc +dir path=etc/lighttpd +dir path=etc/lighttpd/1.4 +dir path=etc/lighttpd/1.4/conf.d +dir path=etc/security +dir path=etc/security/auth_attr.d +dir path=etc/security/prof_attr.d +dir path=lib +dir path=lib/svc +dir path=lib/svc/manifest +dir path=lib/svc/manifest/network +dir path=lib/svc/method +dir path=usr +dir path=usr/lighttpd +dir path=usr/lighttpd/1.4 +dir path=usr/lighttpd/1.4/bin +dir path=usr/lighttpd/1.4/lib +dir path=usr/lighttpd/1.4/man +dir path=usr/lighttpd/1.4/man/man1 +dir path=usr/lighttpd/1.4/man/man8 +dir path=usr/lighttpd/1.4/sbin +dir path=usr/share +dir path=usr/share/man +dir path=usr/share/man/man1m +dir path=var +dir path=var/lighttpd +dir path=var/lighttpd/1.4 +dir path=var/lighttpd/1.4/docroot +dir path=var/lighttpd/1.4/errors +dir path=var/lighttpd/1.4/logs group=webservd owner=webservd +dir path=var/lighttpd/1.4/vhosts +file Solaris/fcgi-php.conf path=etc/lighttpd/1.4/conf.d/fcgi-php.conf \ + mode=0644 preserve=renamenew \ + original_name=SUNWlighttpd14:etc/lighttpd/1.4/conf.d/fcgi-php.conf +file Solaris/ssl.conf path=etc/lighttpd/1.4/conf.d/ssl.conf \ + mode=0644 preserve=renamenew \ + original_name=SUNWlighttpd14:etc/lighttpd/1.4/conf.d/ssl.conf +file doc/lighttpd.conf path=etc/lighttpd/1.4/lighttpd.conf \ + mode=0644 preserve=renamenew \ + original_name=SUNWlighttpd14:etc/lighttpd/1.4/lighttpd.conf +file Solaris/auth_attr path=etc/security/auth_attr.d/lighttpd +file Solaris/prof_attr path=etc/security/prof_attr.d/lighttpd +file Solaris/http-lighttpd14.xml path=lib/svc/manifest/network/http-lighttpd14.xml +file Solaris/http-lighttpd14 path=lib/svc/method/http-lighttpd14 +file path=usr/lighttpd/1.4/lib/mod_access.so +file path=usr/lighttpd/1.4/lib/mod_accesslog.so +file path=usr/lighttpd/1.4/lib/mod_alias.so +file path=usr/lighttpd/1.4/lib/mod_auth.so +file path=usr/lighttpd/1.4/lib/mod_cgi.so +file path=usr/lighttpd/1.4/lib/mod_cml.so +file path=usr/lighttpd/1.4/lib/mod_compress.so +file path=usr/lighttpd/1.4/lib/mod_dirlisting.so +file path=usr/lighttpd/1.4/lib/mod_evasive.so +file path=usr/lighttpd/1.4/lib/mod_evhost.so +file path=usr/lighttpd/1.4/lib/mod_expire.so +file path=usr/lighttpd/1.4/lib/mod_extforward.so +file path=usr/lighttpd/1.4/lib/mod_fastcgi.so +file path=usr/lighttpd/1.4/lib/mod_flv_streaming.so +file path=usr/lighttpd/1.4/lib/mod_indexfile.so +file path=usr/lighttpd/1.4/lib/mod_magnet.so +file path=usr/lighttpd/1.4/lib/mod_mysql_vhost.so +file path=usr/lighttpd/1.4/lib/mod_proxy.so +file path=usr/lighttpd/1.4/lib/mod_redirect.so +file path=usr/lighttpd/1.4/lib/mod_rewrite.so +file path=usr/lighttpd/1.4/lib/mod_rrdtool.so +file path=usr/lighttpd/1.4/lib/mod_scgi.so +file path=usr/lighttpd/1.4/lib/mod_secdownload.so +file path=usr/lighttpd/1.4/lib/mod_setenv.so +file path=usr/lighttpd/1.4/lib/mod_simple_vhost.so +file path=usr/lighttpd/1.4/lib/mod_ssi.so +file path=usr/lighttpd/1.4/lib/mod_staticfile.so +file path=usr/lighttpd/1.4/lib/mod_status.so +file path=usr/lighttpd/1.4/lib/mod_trigger_b4_dl.so +file path=usr/lighttpd/1.4/lib/mod_userdir.so +file path=usr/lighttpd/1.4/lib/mod_usertrack.so +file path=usr/lighttpd/1.4/lib/mod_webdav.so +file path=usr/lighttpd/1.4/man/man8/lighttpd.8 +file path=usr/lighttpd/1.4/sbin/lighttpd +file path=usr/lighttpd/1.4/sbin/lighttpd-angel +file Solaris/lighttpd.1m.sunman path=usr/share/man/man1m/lighttpd.1m +link path=usr/lighttpd/1.4/man/man1/spawn-fcgi.1 target=../../../../share/man/man1/spawn-fcgi.1 +link path=usr/lighttpd/1.4/bin/spawn-fcgi target=../../../bin/spawn-fcgi +depend fmri=__TBD pkg.debug.depend.file=usr/bin/spawn-fcgi type=require +depend fmri=__TBD pkg.debug.depend.file=usr/share/man/man1/spawn-fcgi.1 type=require + +legacy pkg=SUNWlighttpd14u desc="The Lighttpd Web Server (1.4.23) (Usr)" \ + name="Lighttpd Web Server (Usr)" + +legacy pkg=SUNWlighttpd14r desc="The Lighttpd Web Server (1.4.23) (Root)" \ + name="Lighttpd Web Server (Root)" + diff -r 1251baad27f0 -r 5001b63ddc8a components/lighttpd/patches/lighttpd-conf_file.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/lighttpd/patches/lighttpd-conf_file.patch Wed Jun 22 14:10:22 2011 -0700 @@ -0,0 +1,114 @@ +--- doc/lighttpd.conf-orig Thu Apr 9 13:02:00 2009 ++++ doc/lighttpd.conf Wed Nov 4 03:16:09 2009 +@@ -36,10 +36,10 @@ + + ## A static document-root. For virtual hosting take a look at the + ## mod_simple_vhost module. +-server.document-root = "/srv/www/htdocs/" ++server.document-root = "/var/lighttpd/1.4/docroot" + + ## where to send error-messages to +-server.errorlog = "/var/log/lighttpd/error.log" ++server.errorlog = "/var/lighttpd/1.4/logs/error.log" + + # files to check for if .../ is requested + index-file.names = ( "index.php", "index.html", +@@ -46,8 +46,10 @@ + "index.htm", "default.htm" ) + + ## set the event-handler (read the performance section in the manual) +-# server.event-handler = "freebsd-kqueue" # needed on OS X ++server.event-handler = "solaris-devpoll" ++server.network-backend = "writev" + ++ + # mimetype mapping + mimetype.assign = ( + ".pdf" => "application/pdf", +@@ -115,7 +117,7 @@ + # server.tag = "lighttpd" + + #### accesslog module +-accesslog.filename = "/var/log/lighttpd/access.log" ++accesslog.filename = "/var/lighttpd/1.4/logs/access.log" + + ## deny access the file-extensions + # +@@ -147,7 +149,7 @@ + #server.error-handler-404 = "/error-handler.php" + + ## to help the rc.scripts +-#server.pid-file = "/var/run/lighttpd.pid" ++server.pid-file = "/var/run/lighttpd14.pid" + + + ###### virtual hosts +@@ -160,7 +162,7 @@ + ## or + ## virtual-server-root + http-host + virtual-server-docroot + ## +-#simple-vhost.server-root = "/srv/www/vhosts/" ++#simple-vhost.server-root = "/var/lighttpd/1.4/vhosts/" + #simple-vhost.default-host = "www.example.org" + #simple-vhost.document-root = "/htdocs/" + +@@ -168,8 +170,7 @@ + ## + ## Format: .html + ## -> ..../status-404.html for 'File not found' +-#server.errorfile-prefix = "/usr/share/lighttpd/errors/status-" +-#server.errorfile-prefix = "/srv/www/errors/status-" ++#server.errorfile-prefix = "/var/lighttpd/1.4/errors/status-" + + ## virtual directory listings + #dir-listing.activate = "enable" +@@ -188,10 +189,10 @@ + #server.chroot = "/" + + ## change uid to (default: don't care) +-#server.username = "wwwrun" ++server.username = "webservd" + + ## change uid to (default: don't care) +-#server.groupname = "wwwrun" ++server.groupname = "webservd" + + #### compress module + #compress.cache-dir = "/var/cache/lighttpd/compress/" +@@ -214,8 +215,8 @@ + #fastcgi.server = ( ".php" => + # ( "localhost" => + # ( +-# "socket" => "/var/run/lighttpd/php-fastcgi.socket", +-# "bin-path" => "/usr/local/bin/php-cgi" ++# "socket" => "/tmp/lighttpd/php-fastcgi.socket", ++# "bin-path" => "/usr/php/bin/php-cgi" + # ) + # ) + # ) +@@ -274,7 +275,7 @@ + # %3 => subdomain 1 name + # %4 => subdomain 2 name + # +-#evhost.path-pattern = "/srv/www/vhosts/%3/htdocs/" ++#evhost.path-pattern = "/var/lighttpd/1.4/vhosts/%3/htdocs/" + + #### expire module + #expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes") +@@ -312,8 +313,8 @@ + #index-file.names += (foo + ".php") + + #### include +-#include /etc/lighttpd/lighttpd-inc.conf +-## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf" ++#include /etc/lighttpd/1.4/lighttpd-inc.conf ++## same as above if you run: "lighttpd -f /etc/lighttpd/1.4/lighttpd.conf" + #include "lighttpd-inc.conf" + + #### include_shell +@@ -320,3 +321,5 @@ + #include_shell "echo var.a=1" + ## the above is same as: + #var.a=1 ++# Set the directory used for file uploads to /tmp ++server.upload-dirs = ( "/tmp" ) diff -r 1251baad27f0 -r 5001b63ddc8a components/lighttpd/patches/lighttpd-manpage.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/lighttpd/patches/lighttpd-manpage.patch Wed Jun 22 14:10:22 2011 -0700 @@ -0,0 +1,15 @@ +--- doc/lighttpd.8-orig Mon Mar 30 15:16:59 2009 ++++ doc/lighttpd.8 Mon Jun 20 08:03:16 2011 +@@ -47,10 +47,10 @@ + . + .SH FILES + .TP 8 +-/etc/lighttpd/lighttpd.conf ++/etc/lighttpd/1.4/lighttpd.conf + The standard location for the configuration file. + .TP 8 +-/var/run/lighttpd.pid ++/var/run/lighttpd14.pid + The standard location for the PID of the running \fBlighttpd\fP process. + . + .SH SEE ALSO diff -r 1251baad27f0 -r 5001b63ddc8a components/lighttpd/patches/lighttpd-nodelay.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/lighttpd/patches/lighttpd-nodelay.patch Wed Jun 22 14:10:22 2011 -0700 @@ -0,0 +1,13 @@ +--- src/network.c-orig Mon Sep 7 05:46:50 2009 ++++ src/network.c Mon Sep 7 05:59:17 2009 +@@ -175,6 +175,10 @@ + log_error_write(srv, __FILE__, __LINE__, "ss", "socketsockopt failed:", strerror(errno)); + return -1; + } ++ if (setsockopt(srv_socket->fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val)) < 0) { ++ log_error_write(srv, __FILE__, __LINE__, "ss", "socketsockopt failed:", strerror(errno)); ++ return -1; ++ } + + switch(srv_socket->addr.plain.sa_family) { + #ifdef HAVE_IPV6 diff -r 1251baad27f0 -r 5001b63ddc8a components/lighttpd/patches/lighttpd_fix_slow_request_dos.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/lighttpd/patches/lighttpd_fix_slow_request_dos.patch Wed Jun 22 14:10:22 2011 -0700 @@ -0,0 +1,209 @@ +diff -u -r lighttpd-1.4.23-orig/src/base.h lighttpd-1.4.23/src/base.h +--- src/base.h Thu Jun 11 02:44:17 2009 ++++ src/base.h Tue Aug 24 04:16:29 2010 +@@ -421,7 +421,6 @@ + + #ifdef USE_OPENSSL + SSL *ssl; +- buffer *ssl_error_want_reuse_buffer; + #endif + /* etag handling */ + etag_flags_t etag_flags; +Only in lighttpd-1.4.23/src: base.h.orig +diff -u -r lighttpd-1.4.23-orig/src/chunk.c lighttpd-1.4.23/src/chunk.c +--- src/chunk.c Mon Mar 30 15:16:59 2009 ++++ src/chunk.c Tue Aug 24 04:12:50 2010 +@@ -197,8 +197,6 @@ + int chunkqueue_append_buffer_weak(chunkqueue *cq, buffer *mem) { + chunk *c; + +- if (mem->used == 0) return 0; +- + c = chunkqueue_get_unused_chunk(cq); + c->type = MEM_CHUNK; + c->offset = 0; +diff -u -r lighttpd-1.4.23-orig/src/connections.c lighttpd-1.4.23/src/connections.c +--- src/connections.c Thu Jun 11 06:54:30 2009 ++++ src/connections.c Tue Aug 24 04:12:50 2010 +@@ -192,40 +192,42 @@ + + static int connection_handle_read_ssl(server *srv, connection *con) { + #ifdef USE_OPENSSL +- int r, ssl_err, len, count = 0; ++ int r, ssl_err, len, count = 0, read_offset, toread; + buffer *b = NULL; + + if (!con->conf.is_ssl) return -1; + +- /* don't resize the buffer if we were in SSL_ERROR_WANT_* */ +- + ERR_clear_error(); + do { +- if (!con->ssl_error_want_reuse_buffer) { +- b = buffer_init(); +- buffer_prepare_copy(b, SSL_pending(con->ssl) + (16 * 1024)); /* the pending bytes + 16kb */ ++ if (NULL != con->read_queue->last) { ++ b = con->read_queue->last->mem; ++ } + ++ if (NULL == b || b->size - b->used < 1024) { ++ b = chunkqueue_get_append_buffer(con->read_queue); ++ len = SSL_pending(con->ssl); ++ if (len < 4*1024) len = 4*1024; /* always alloc >= 4k buffer */ ++ buffer_prepare_copy(b, len + 1); ++ + /* overwrite everything with 0 */ + memset(b->ptr, 0, b->size); +- } else { +- b = con->ssl_error_want_reuse_buffer; + } + +- len = SSL_read(con->ssl, b->ptr, b->size - 1); +- con->ssl_error_want_reuse_buffer = NULL; /* reuse it only once */ ++ read_offset = (b->used > 0) ? b->used - 1 : 0; ++ toread = b->size - 1 - read_offset; + ++ len = SSL_read(con->ssl, b->ptr + read_offset, toread); ++ + if (len > 0) { +- b->used = len; ++ if (b->used > 0) b->used--; ++ b->used += len; + b->ptr[b->used++] = '\0'; + +- /* we move the buffer to the chunk-queue, no need to free it */ ++ con->bytes_read += len; + +- chunkqueue_append_buffer_weak(con->read_queue, b); + count += len; +- con->bytes_read += len; +- b = NULL; + } +- } while (len > 0 && count < MAX_READ_LIMIT); ++ } while (len == toread && count < MAX_READ_LIMIT); + + + if (len < 0) { +@@ -234,11 +236,11 @@ + case SSL_ERROR_WANT_READ: + case SSL_ERROR_WANT_WRITE: + con->is_readable = 0; +- con->ssl_error_want_reuse_buffer = b; + +- b = NULL; ++ /* the manual says we have to call SSL_read with the same arguments next time. ++ * we ignore this restriction; no one has complained about it in 1.5 yet, so it probably works anyway. ++ */ + +- /* we have to steal the buffer from the queue-queue */ + return 0; + case SSL_ERROR_SYSCALL: + /** +@@ -297,16 +299,11 @@ + + connection_set_state(srv, con, CON_STATE_ERROR); + +- buffer_free(b); +- + return -1; + } else if (len == 0) { + con->is_readable = 0; + /* the other end close the connection -> KEEP-ALIVE */ + +- /* pipelining */ +- buffer_free(b); +- + return -2; + } + +@@ -321,26 +318,41 @@ + static int connection_handle_read(server *srv, connection *con) { + int len; + buffer *b; +- int toread; ++ int toread, read_offset; + + if (con->conf.is_ssl) { + return connection_handle_read_ssl(srv, con); + } + ++ b = (NULL != con->read_queue->last) ? con->read_queue->last->mem : NULL; ++ ++ /* default size for chunks is 4kb; only use bigger chunks if FIONREAD tells ++ * us more than 4kb is available ++ * if FIONREAD doesn't signal a big chunk we fill the previous buffer ++ * if it has >= 1kb free ++ */ + #if defined(__WIN32) +- b = chunkqueue_get_append_buffer(con->read_queue); +- buffer_prepare_copy(b, 4 * 1024); +- len = recv(con->fd, b->ptr, b->size - 1, 0); +-#else +- if (ioctl(con->fd, FIONREAD, &toread) || toread == 0) { ++ if (NULL == b || b->size - b->used < 1024) { + b = chunkqueue_get_append_buffer(con->read_queue); + buffer_prepare_copy(b, 4 * 1024); ++ } ++ ++ read_offset = (b->used == 0) ? 0 : b->used - 1; ++ len = recv(con->fd, b->ptr + read_offset, b->size - 1 - read_offset, 0); ++#else ++ if (ioctl(con->fd, FIONREAD, &toread) || toread == 0 || toread <= 4*1024) { ++ if (NULL == b || b->size - b->used < 1024) { ++ b = chunkqueue_get_append_buffer(con->read_queue); ++ buffer_prepare_copy(b, 4 * 1024); ++ } + } else { + if (toread > MAX_READ_LIMIT) toread = MAX_READ_LIMIT; + b = chunkqueue_get_append_buffer(con->read_queue); + buffer_prepare_copy(b, toread + 1); + } +- len = read(con->fd, b->ptr, b->size - 1); ++ ++ read_offset = (b->used == 0) ? 0 : b->used - 1; ++ len = read(con->fd, b->ptr + read_offset, b->size - 1 - read_offset); + #endif + + if (len < 0) { +@@ -374,7 +386,8 @@ + con->is_readable = 0; + } + +- b->used = len; ++ if (b->used > 0) b->used--; ++ b->used += len; + b->ptr[b->used++] = '\0'; + + con->bytes_read += len; +@@ -841,13 +854,6 @@ + /* The cond_cache gets reset in response.c */ + /* config_cond_cache_reset(srv, con); */ + +-#ifdef USE_OPENSSL +- if (con->ssl_error_want_reuse_buffer) { +- buffer_free(con->ssl_error_want_reuse_buffer); +- con->ssl_error_want_reuse_buffer = NULL; +- } +-#endif +- + con->header_len = 0; + con->in_error_handler = 0; + +@@ -1131,8 +1137,15 @@ + } else { + buffer *b; + +- b = chunkqueue_get_append_buffer(dst_cq); +- buffer_copy_string_len(b, c->mem->ptr + c->offset, toRead); ++ if (dst_cq->last && ++ dst_cq->last->type == MEM_CHUNK) { ++ b = dst_cq->last->mem; ++ } else { ++ b = chunkqueue_get_append_buffer(dst_cq); ++ /* prepare buffer size for remaining POST data; is < 64kb */ ++ buffer_prepare_copy(b, con->request.content_length - dst_cq->bytes_in + 1); ++ } ++ buffer_append_string_len(b, c->mem->ptr + c->offset, toRead); + } + + c->offset += toRead; diff -r 1251baad27f0 -r 5001b63ddc8a components/meta-packages/history/SUNWlighttpd14.p5m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/meta-packages/history/SUNWlighttpd14.p5m Wed Jun 22 14:10:22 2011 -0700 @@ -0,0 +1,30 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. +# + +set name=pkg.fmri value=pkg:/SUNWlighttpd14@1.4.23,5.11-0.133 +set name=pkg.renamed value=true + +set name=org.opensolaris.consolidation value=$(CONSOLIDATION) + +depend fmri=web/server/lighttpd@1.4.23-0.133 type=require +