Группа :: Система/Серверы
Пакет: spawn-fcgi
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: spawn-fcgi-1.6.4-alt.patch
Скачать
Скачать
.gear/rules | 2 +
.../tags/dd6762d86a18467bf0a7363f1d733a7340158fb7 | 13 +++
.gear/tags/list | 1 +
altlinux/spawn-fcgi.init | 119 +++++++++++++++++++++
altlinux/spawn-fcgi.sysconfig | 36 +++++++
spawn-fcgi.spec | 102 ++++++++++++++++++
6 files changed, 273 insertions(+)
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 0000000..03a74a7
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,2 @@
+tar: v@version@:.
+diff: v@version@:. . name=@name@-@version@-alt.patch
\ No newline at end of file
diff --git a/.gear/tags/dd6762d86a18467bf0a7363f1d733a7340158fb7 b/.gear/tags/dd6762d86a18467bf0a7363f1d733a7340158fb7
new file mode 100644
index 0000000..c4c69e8
--- /dev/null
+++ b/.gear/tags/dd6762d86a18467bf0a7363f1d733a7340158fb7
@@ -0,0 +1,13 @@
+object 05e8b83e65336a4bfe5ec6ce0fb766c031130879
+type commit
+tag v1.6.4
+tagger Anton Farygin <rider@altlinux.com> 1464617418 +0300
+
+1.6.4
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1
+
+iEYEABECAAYFAldMSc4ACgkQqohfd2vlwKuLzgCePYoigxYcepBcsxCkPyrnlh2b
+Xe4AniyPxoULiJvY0WpUySElh36ite+w
+=ywD9
+-----END PGP SIGNATURE-----
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 0000000..c5f8d14
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+dd6762d86a18467bf0a7363f1d733a7340158fb7 v1.6.4
diff --git a/altlinux/spawn-fcgi.init b/altlinux/spawn-fcgi.init
new file mode 100644
index 0000000..20fd3c3
--- /dev/null
+++ b/altlinux/spawn-fcgi.init
@@ -0,0 +1,119 @@
+#!/bin/sh
+#
+# Spawn a fcgi processes
+#
+# chkconfig: - 48 52
+# description: Spawn a fcgi processes
+# processname: /usr/bin/spawn-fcgi
+# config: /etc/sysconfig/spawn-fcgi
+# pidfile: /var/run/spawn-fcgi.pid
+
+WITHOUT_RC_COMPAT=1
+
+# Source function library.
+. /etc/init.d/functions
+
+PIDFILE=/var/run/spawn-fcgi/spw-cgi.pid
+SOCKET=/var/run/spawn-fcgi/spw-cgi.sock
+
+LOCKFILE=/var/lock/subsys/spawn-fcgi
+
+# Source config
+SourceIfNotEmpty /etc/sysconfig/spawn-fcgi
+
+################## no config below this line
+
+RETVAL=0
+PROG=`basename $FCGIPROGRAM`
+
+start ()
+{
+ if test x$PHP_FCGI_CHILDREN = x; then
+ PHP_FCGI_CHILDREN=5
+ fi
+
+ export PHP_FCGI_MAX_REQUESTS
+ export FCGI_WEB_SERVER_ADDRS
+
+ ALLOWED_ENV="$ALLOWED_ENV PHP_FCGI_MAX_REQUESTS FCGI_WEB_SERVER_ADDRS"
+
+ EX="$SPAWNFCGI -P $PIDFILE -C $PHP_FCGI_CHILDREN"
+
+ if [ -n "$FCGILISTEN" -a -n "$FCGIPORT" ]; then
+ EX="$EX -a $FCGILISTEN -p $FCGIPORT"
+ DMODE=1770
+ else
+ EX="$EX -s $SOCKET ${SOCKETMODE:+-M $SOCKETMODE}"
+ DMODE=1771
+ fi
+
+ if test x$UID = x0; then
+ EX="$EX -u $USERID -g $GROUPID"
+ if [ -z "$FCGILISTEN" -a -z "$FCGIPORT" ]; then
+ EX="$EX ${SOCKETUSER:+-U $SOCKETUSER} ${SOCKETGROUP:+-G $SOCKETGROUP}"
+ fi
+ fi
+
+ chown root:$GROUPID /var/run/spawn-fcgi
+ chmod $DMODE /var/run/spawn-fcgi
+ # copy the allowed environment variables
+ E=
+
+ for i in $ALLOWED_ENV; do
+ E="$E $i=${!i}"
+ done
+
+ # clean environment and set up a new one
+
+ start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user $USERID --name $PROG -- env - $E $EX -- $FCGIPROGRAM $FCGIOPTIONS
+ RETVAL=$?
+ return $RETVAL
+}
+
+stop ()
+{
+ stop_daemon --lockfile "$LOCKFILE" --expect-user $USERID -- $PROG
+ RETVAL=$?
+ return $RETVAL
+ # for sanity.- FIXME
+ sleep 30
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ condstop)
+ if [ -e "$LOCKFILE" ]; then
+ stop
+ fi
+ ;;
+ condrestart)
+ if [ -e "$LOCKFILE" ]; then
+ stop
+ start
+ fi
+ ;;
+ condreload)
+ if [ -e "$LOCKFILE" ]; then
+ stop
+ start
+ fi
+ ;;
+ status)
+ status --pidfile "$PIDFILE" --expect-user $USERID -- $PROG
+ RETVAL=$?
+ ;;
+ *)
+ msg_usage "${0##*/} {start|stop|restart|condrestart|status}"
+ RETVAL=1
+esac
+
+exit $RETVAL
diff --git a/altlinux/spawn-fcgi.sysconfig b/altlinux/spawn-fcgi.sysconfig
new file mode 100644
index 0000000..b49f594
--- /dev/null
+++ b/altlinux/spawn-fcgi.sysconfig
@@ -0,0 +1,36 @@
+
+## ABSOLUTE path to the spawn-fcgi binary
+SPAWNFCGI="/usr/bin/spawn-fcgi"
+
+## ABSOLUTE path to the spawn binary
+FCGIPROGRAM="/usr/sbin/fcgiwrap"
+FCGIOPTIONS="-c 44"
+
+## ip to listen
+## *must* be commented out for use with unix domain socket
+#FCGILISTEN="127.0.0.1"
+
+## bind to tcp-port on localhost
+## *must* be commented out for use with unix domain socket
+FCGIPORT="1027"
+
+## unix domain socket permissions
+#SOCKETUSER=
+SOCKETGROUP=_nginx
+SOCKETMODE=0770
+
+## number of PHP childs to spawn
+#PHP_FCGI_CHILDREN=100
+
+## number of request server by a single php-process until is will be restarted
+PHP_FCGI_MAX_REQUESTS=1000
+
+## IP adresses where PHP should access server connections from
+#FCGI_WEB_SERVER_ADDRS="127.0.0.1"
+
+# allowed environment variables sperated by spaces
+ALLOWED_ENV="PATH"
+
+## if this script is run as root switch to the following user
+USERID=_spawn_fcgi
+GROUPID=_webserver
diff --git a/spawn-fcgi.spec b/spawn-fcgi.spec
new file mode 100644
index 0000000..990667b
--- /dev/null
+++ b/spawn-fcgi.spec
@@ -0,0 +1,102 @@
+%define spawn_fcgi_user _spawn_fcgi
+%define spawn_fcgi_group _spawn_fcgi
+
+Name: spawn-fcgi
+Version: 1.6.4
+Release: alt4
+
+Summary: spawn FastCGI applications
+License: BSD
+Group: System/Servers
+
+# git remote add upstream git://git.lighttpd.net/spawn-fcgi
+Url: http://redmine.lighttpd.net/projects/spawn-fcgi/wiki
+
+Source0: %name-%version.tar
+Patch0: %name-%version-alt.patch
+
+%description
+ spawn-fcgi is used to spawn FastCGI applications
+
+ Features
+ --------
+ - binds to IPv4/IPv6 and Unix domain sockets
+ - supports privilege separation: chmod/chown socket, drop to uid/gid
+ - supports chroot
+ - supports daemontools supervise
+
+%prep
+%setup
+%patch0 -p1
+%autoreconf
+
+%build
+%configure
+%make_build
+
+%install
+%makeinstall
+
+mkdir -p %buildroot%_var/run/spawn-fcgi
+install -pDm755 altlinux/spawn-fcgi.init %buildroot%_initdir/spawn-fcgi
+install -pDm644 altlinux/spawn-fcgi.sysconfig %buildroot%_sysconfdir/sysconfig/spawn-fcgi
+
+%pre
+%_sbindir/groupadd -r -f %spawn_fcgi_group ||:
+%_sbindir/useradd -r -g %spawn_fcgi_group -d /dev/null -s /dev/null -n %spawn_fcgi_user \
+ 2> /dev/null > /dev/null ||:
+
+%post
+%post_service spawn-fcgi
+
+%preun
+%preun_service spawn-fcgi
+
+%files
+%_bindir/spawn-fcgi
+%_man1dir/spawn-fcgi*
+%config(noreplace) %_sysconfdir/sysconfig/spawn-fcgi
+%_initdir/spawn-fcgi
+%dir %attr(1770,root,%spawn_fcgi_group) %_var/run/spawn-fcgi
+
+%changelog
+* Sun Jun 23 2019 Igor Vlasenko <viy@altlinux.ru> 1.6.4-alt4
+- NMU: remove rpm-build-ubt from BR:
+
+* Sat Jun 15 2019 Igor Vlasenko <viy@altlinux.ru> 1.6.4-alt3
+- NMU: remove %ubt from release
+
+* Wed Dec 21 2016 Anton Farygin <rider@altlinux.ru> 1.6.4-alt2%ubt
+- fixes fcgiwrap location in default config
+
+* Mon May 30 2016 Anton Farygin <rider@altlinux.ru> 1.6.4-alt1
+- updated to 1.6.4
+
+* Fri Apr 18 2014 Anton Farygin <rider@altlinux.ru> 1.6.3-alt4
+- initfile: don't check pidfile in stop target
+
+* Fri Apr 18 2014 Anton Farygin <rider@altlinux.ru> 1.6.3-alt3
+- tune default config and initscript for run fcgiwrap instead of php5-cgi
+
+* Fri Oct 11 2013 Anton Farygin <rider@altlinux.ru> 1.6.3-alt2
+- fixed condrestart and condreload targets in initscript (closes: #29456)
+
+* Tue Sep 17 2013 Anton Farygin <rider@altlinux.ru> 1.6.3-alt1
+- new version
+
+* Mon Apr 15 2013 Dmitry V. Levin (QA) <qa_ldv@altlinux.org> 1.6.2-alt3.qa1
+- NMU: rebuilt for debuginfo.
+
+* Sun Sep 19 2010 Sergey Bolshakov <sbolshakov@altlinux.ru> 1.6.2-alt3
+- typo in initscript fixed
+
+* Tue Aug 10 2010 Sergey Bolshakov <sbolshakov@altlinux.ru> 1.6.2-alt2.1
+- allow use of unix domain socket
+
+* Thu Sep 24 2009 Vladimir V. Kamarzin <vvk@altlinux.org> 1.6.2-alt2
+- spawn-fcgi.sysconfig: add variable for interface binding and bind to
+ 127.0.0.1 by default (Closes: #21581)
+
+* Wed Sep 02 2009 Vladimir V. Kamarzin <vvk@altlinux.org> 1.6.2-alt1
+- Initial build for Sisyphus
+