--- spawn-fcgi-1.6.2.orig/debian/control +++ spawn-fcgi-1.6.2/debian/control @@ -0,0 +1,23 @@ +Source: spawn-fcgi +Section: web +Priority: extra +Maintainer: Jérémy Lal +Build-Depends: debhelper (>= 7), libc6-dev (>= 2.7-18 ) +Standards-Version: 3.8.1 +Homepage: http://redmine.lighttpd.net/projects/spawn-fcgi + +Package: spawn-fcgi +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: A fastcgi process spawner + spawn-fcgi allows fcgi processes to be separated from web server process : + * Easy creation of chmoded socket. + * Privilege separation without needing a suid-binary, + or running a server as root. + * You can restart your web server and the FastCGI applications + without restarting the others. + * You can run them in different chroot()s. + * Running your FastCGI applications doesn’t depend on the web server + you are running, which allows for easier testing of/migration + to other web servers. + --- spawn-fcgi-1.6.2.orig/debian/rules +++ spawn-fcgi-1.6.2/debian/rules @@ -0,0 +1,110 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) +CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) +else +CROSS= --build $(DEB_BUILD_GNU_TYPE) +endif + + + +config.status: configure + dh_testdir + # Add here commands to configure the package. +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif + ./configure $(CROSS) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" + + +build: build-stamp + +build-stamp: config.status + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + #docbook-to-man debian/spawn-fcgi.sgml > spawn-fcgi.1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + [ ! -f Makefile ] || $(MAKE) distclean + rm -f config.sub config.guess + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + # Add here commands to install the package into debian/spawn-fcgi. + $(MAKE) DESTDIR=$(CURDIR)/debian/spawn-fcgi install + + # prepare for update-alternative + mv debian/spawn-fcgi/usr/share/man/man1/spawn-fcgi.1 \ + debian/spawn-fcgi/usr/share/man/man1/spawn-fcgi.standalone.1 + mv debian/spawn-fcgi/usr/bin/spawn-fcgi \ + debian/spawn-fcgi/usr/bin/spawn-fcgi.standalone + +# Build architecture-independent files here. +binary-indep: install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- spawn-fcgi-1.6.2.orig/debian/spawn-fcgi.1 +++ spawn-fcgi-1.6.2/debian/spawn-fcgi.1 @@ -0,0 +1,116 @@ +.TH spawn-fcgi 1 "26 March 2009" +. +.SH NAME +. +spawn-fcgi \- Spawns FastCGI processes +. +.SH SYNOPSIS +. +.B spawn-fcgi +[options] [ -- [fcgi app arguments]] +.P +.B spawn-fcgi +\-v +.P +.B spawn-fcgi +\-h +. +.SH DESCRIPTION +. +\fIspawn-fcgi\fP is used to spawn remote and local FastCGI processes. +.P +While it is obviously needed to spawn remote FastCGI backends (the web server +can only spawn local ones), it is recommended to spawn local backends +with spawn-fcgi, too. +.P +Reasons why you may want to use spawn-fcgi instead of something else: +.IP * 3 +Privilege separation without needing a suid-binary or running a server as root. +.IP * 3 +You can restart your web server and the FastCGI applications without restarting the others. +.IP * 3 +You can run them in different chroot()s. +.IP * 3 +Running your FastCGI applications doesn't depend on the web server you are running, +which allows for easier testing of other web servers. +. +.SH OPTIONS +. +\fIspawn-fcgi\fP accepts the following options: +.TP 8 +.B \-f +Filename of the FastCGI application to spawn. This option is deprecated and it +is recommend to always specify the application (absolute path) and its parameters after "--"; +the fcgiapp parameter is directly used for the exec() call, while for starting the binary given +with \-f /bin/sh is needed (which may not be available in a chroot). +.IP +This option is ignored if fcgiapp is given. +.TP 8 +.B \-d +Change the current directory before spawning the application. +.TP 8 +.B \-a
+IPv4/IPv6 address to bind to; only used if \-p is given too. Defaults to "0.0.0.0" (IPv4). +.TP 8 +.B \-p +TCP port to bind to; you cannot combine this with the \-s option. +.TP 8 +.B \-s +Path to the Unix domain socket to bind to; you cannot combine this with the \-p option. +.TP 8 +.B \-C +(PHP only) Number of children to spawn by setting the PHP_FCGI_CHILDREN +environment variable. Default is not to overwrite the environment variable; +php will spawn no children if the variable is not set (same as setting it to 0). +.TP 8 +.B \-F +Number of children to fork, defaults to 1. This option doesn't work with \-n, +have a look at +.BR multiwatch(1) +if you want to supervise multiple forks on the same socket. +.TP 8 +.B \-P +Name of the PID file for spawned processes (ignored in no-fork mode) +.TP 8 +.B \-n +No forking should take place (for daemontools) +.TP 8 +.B \-M +Change file mode of the Unix domain socket; only used if \-s is given too. +.TP 8 +.B \-?, \-h +General usage instructions +.TP 8 +.B \-v +Shows version information and exits +.P +. +The following options are only available if you invoke spawn-fcgi as root: +.TP 8 +.B \-c +Chroot to specified directory; the Unix domain socket is created inside the chroot unless \-S is given. +.TP 8 +.B \-S +Create Unix domain socket before chroot(). +.TP 8 +.B \-u +User ID to change to. +.TP 8 +.B \-g +Group ID to change to. Defaults to primary group of the user given for \-u. +.TP 8 +.B \-U +Change user of the Unix domain socket, defaults to the value of \-u. (only used if \-s is given) +.TP 8 +.B \-G +Change group of the Unix domain socket, defaults to the primary group of the user given for \-U; +if \-U wasn't given, defaults to the value of \-g. (only used if \-s is given) +. +.SH "SEE ALSO" +. +.BR svc(8), +.BR supervise(8), +see http://cr.yp.to/daemontools.html +.P +.BR multiwatch(1), +see http://cgit.stbuehler.de/gitosis/multiwatch/about/ --- spawn-fcgi-1.6.2.orig/debian/watch +++ spawn-fcgi-1.6.2/debian/watch @@ -0,0 +1,5 @@ +# Compulsory line, this is a version 3 file +version=3 + +http://redmine.lighttpd.net/projects/spawn-fcgi/news http://www.lighttpd.net/download/spawn-fcgi-([\d\.]*)\.tar\.gz + --- spawn-fcgi-1.6.2.orig/debian/changelog +++ spawn-fcgi-1.6.2/debian/changelog @@ -0,0 +1,11 @@ +spawn-fcgi (1.6.2-2) unstable; urgency=low + + * Show update-alternatives usage in README.Debian + + -- Jérémy Lal Mon, 20 Apr 2009 11:39:31 +0200 + +spawn-fcgi (1.6.2-1) unstable; urgency=low + + * Initial release (Closes: #523707) + + -- Jérémy Lal Mon, 20 Apr 2009 09:08:46 +0200 --- spawn-fcgi-1.6.2.orig/debian/compat +++ spawn-fcgi-1.6.2/debian/compat @@ -0,0 +1 @@ +7 --- spawn-fcgi-1.6.2.orig/debian/spawn-fcgi.postinst +++ spawn-fcgi-1.6.2/debian/spawn-fcgi.postinst @@ -0,0 +1,12 @@ +#! /bin/sh -e +# postinst script for spawn-fcgi + +update-alternatives \ + --install /usr/bin/spawn-fcgi \ + spawn-fcgi /usr/bin/spawn-fcgi.standalone 10 \ + --slave /usr/share/man/man1/spawn-fcgi.1.gz \ + spawn-fcgi.1.gz /usr/share/man/man1/spawn-fcgi.standalone.1.gz + +#DEBHELPER# + +exit 0 --- spawn-fcgi-1.6.2.orig/debian/spawn-fcgi.prerm +++ spawn-fcgi-1.6.2/debian/spawn-fcgi.prerm @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if test "$1" != "upgrade"; then + update-alternatives --remove spawn-fcgi /usr/bin/spawn-fcgi.standalone +fi + +#DEBHELPER# + +exit 0 --- spawn-fcgi-1.6.2.orig/debian/README.Debian +++ spawn-fcgi-1.6.2/debian/README.Debian @@ -0,0 +1,8 @@ +spawn-fcgi for Debian +--------------------- + +The spawn-fcgi program in this package installs as an alternative : + update-alternatives --config spawn-fcgi +and choose the standalone version. + + -- Jérémy Lal Mon, 20 Apr 2009 09:08:46 +0200 --- spawn-fcgi-1.6.2.orig/debian/copyright +++ spawn-fcgi-1.6.2/debian/copyright @@ -0,0 +1,40 @@ +This package was debianized by Jérémy Lal on +Mon, 20 Apr 2009 09:08:46 +0200. + +It was downloaded from http://redmine.lighttpd.net/projects/spawn-fcgi/ + +Upstream Authors: + jan kneschke + stefan bühler + +Copyright: + +Copyright (c) 2004, Jan Kneschke, incremental + All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +- Neither the name of the 'incremental' nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. +