debian/0000755000000000000000000000000012236656073007200 5ustar debian/unicorn.postrm0000644000000000000000000000012612236656073012122 0ustar #!/bin/sh set -e [ "$1" = "purge" ] && rm -rf /var/log/unicorn #DEBHELPER# exit 0 debian/unicorn.prerm0000644000000000000000000000040612236656073011724 0ustar #!/bin/sh set -e case "$1" in remove|deconfigure) if [ -x /etc/init.d/unicorn ]; then if [ -x /usr/sbin/invoke-rc.d ]; then invoke-rc.d unicorn stop else /etc/init.d/unicorn stop fi fi ;; esac #DEBHELPER# exit 0 debian/gbp.conf0000644000000000000000000000003612236656073010616 0ustar [DEFAULT] pristine-tar = True debian/rules0000755000000000000000000000076712236656073010272 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 # # Uncomment to ignore all test failures (but the tests will run anyway) #export DH_RUBY_IGNORE_TESTS=all # # Uncomment to ignore some test failures (but the tests will run anyway). # Valid values: #export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems # # If you need to specify the .gemspec (eg there is more than one) #export DH_RUBY_GEMSPEC=gem.gemspec %: dh $@ --buildsystem=ruby --with ruby override_dh_installinit: dh_installinit --no-start debian/unicorn.manpages0000644000000000000000000000005412236656073012371 0ustar man/man1/unicorn.1 man/man1/unicorn_rails.1 debian/control0000644000000000000000000000223012236656073010600 0ustar Source: unicorn Section: ruby Priority: optional Maintainer: Debian Ruby Extras Maintainers Uploaders: Hleb Valoshka <375gnu@gmail.com> Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.5.0~), ruby-raindrops (>= 0.12.0-1~), ruby-kgio (>= 2.8.1-1~), ruby-rack, curl Standards-Version: 3.9.4 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/unicorn.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/unicorn.git;a=summary Homepage: http://unicorn.bogomips.org/ XS-Ruby-Versions: all Package: unicorn Architecture: linux-any kfreebsd-any XB-Ruby-Versions: ${ruby:Versions} Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, ruby-rack, ruby-kgio (>= 2.8.1-1~), ruby-raindrops (>= 0.12.0-1~) Description: Rack HTTP server for fast clients Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix and Unix-like kernels. Slow clients should only be served by placing a reverse proxy capable of fully buffering both request and response in between Unicorn and slow clients. debian/unicorn.examples0000644000000000000000000000001312236656073012407 0ustar examples/* debian/unicorn.init0000644000000000000000000000552212236656073011546 0ustar #!/bin/sh ### BEGIN INIT INFO # Provides: unicorn # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: unicorn initscript # Description: unicorn ### END INIT INFO set -e NAME=unicorn DESC="Unicorn web server" . /lib/lsb/init-functions if [ -f /etc/default/unicorn ]; then . /etc/default/unicorn fi DAEMON=/usr/bin/unicorn PID=${PID-/run/unicorn.pid} run_by_init() { ([ "${previous-}" ] && [ "${runlevel-}" ]) || [ "${runlevel-}" = S ] } exit_with_message() { if ! run_by_init; then log_action_msg "$1 Not starting." fi exit 0 } check_config() { if [ $CONFIGURED != "yes" ]; then exit_with_message "Unicorn is not configured (see /etc/default/unicorn)." fi } check_app_root() { if ! [ -d $APP_ROOT ]; then exit_with_message "Application directory $APP_ROOT is not exist." fi } set -u case "$1" in start) check_config check_app_root log_daemon_msg "Starting $DESC" $NAME || true if start-stop-daemon --start --quiet --oknodo --pidfile $PID --exec $DAEMON -- $UNICORN_OPTS; then log_end_msg 0 || true else log_end_msg 1 || true fi ;; stop) log_daemon_msg "Stopping $DESC" $NAME || true if start-stop-daemon --stop --signal QUIT --quiet --oknodo --pidfile $PID; then log_end_msg 0 || true else log_end_msg 1 || true fi ;; force-stop) log_daemon_msg "Forcing stop of $DESC" $NAME || true if start-stop-daemon --stop --quiet --oknodo --pidfile $PID; then log_end_msg 0 || true else log_end_msg 1 || true fi ;; restart|force-reload) log_daemon_msg "Restarting $DESC" $NAME || true start-stop-daemon --stop --quiet --oknodo --pidfile $PID sleep 1 if start-stop-daemon --start --quiet --oknodo --pidfile $PID --exec $DAEMON -- $UNICORN_OPTS; then log_end_msg 0 || true else log_end_msg 1 || true fi ;; reload) log_daemon_msg "Reloading $DESC" $NAME || true if start-stop-daemon --stop --signal HUP --quiet --oknodo --pidfile $PID; then log_end_msg 0 || true else log_end_msg 1 || true fi ;; reopen-logs) log_daemon_msg "Relopening log files of $DESC" $NAME || true if start-stop-daemon --stop --signal USR1 --quiet --oknodo --pidfile $PID; then log_end_msg 0 || true else log_end_msg 1 || true fi ;; status) status_of_proc -p $PID $DAEMON $NAME && exit 0 || exit $? ;; *) log_action_msg "Usage: $0 " || true exit 1 ;; esac debian/compat0000644000000000000000000000000212236656073010376 0ustar 7 debian/unicorn.docs0000644000000000000000000000020212236656073011521 0ustar Application_Timeouts CONTRIBUTORS DESIGN FAQ HACKING ISSUES KNOWN_ISSUES Links NEWS PHILOSOPHY README SIGNALS Sandbox TODO TUNING debian/copyright0000644000000000000000000000713212236656073011136 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: unicorn Source: http://unicorn.bogomips.org/ Files: * Copyright: 2009-2013 \Unicorn project License: Ruby or GPL-2+ License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. License: Ruby 1. You may make and give away verbatim copies of the source form of the software without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. . 2. You may modify your copy of the software in any way, provided that you do at least ONE of the following: . a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or by allowing the author to include your modifications in the software. . b) use the modified software only within your corporation or organization. . c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided. . d) make other distribution arrangements with the author. . 3. You may distribute the software in object code or executable form, provided that you do at least ONE of the following: . a) distribute the executables and library files of the software, together with instructions (in the manual page or equivalent) on where to get the original distribution. . b) accompany the distribution with the machine-readable source of the software. . c) give non-standard executables non-standard names, with instructions on where to get the original software distribution. . d) make other distribution arrangements with the author. . 4. You may modify and include the part of the software into any other software (possibly commercial). But some files in the distribution are not written by the author, so that they are not under this terms. . They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some files under the ./missing directory. See each file for the copying condition. . 5. The scripts and library files supplied as input to or produced as output from the software do not automatically fall under the copyright of the software, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this software. . 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Files: debian/* Copyright: These files ain't copyrighted License: public-domain These files are in Public Domain. debian/changelog0000644000000000000000000000630512236656073011056 0ustar unicorn (4.7.0-1) unstable; urgency=low * New upstream version. * Change debian/copyright to reflect upstream's license change. * Update patches: - Drop backported upstream commit 24b9f66d to improve handling of client-triggerable socket errors. - Backport upstream commit a1aa5c97 which fixes SO_REUSEPORT tests for old Linux and non-Linux. -- Hleb Valoshka <375gnu@gmail.com> Thu, 07 Nov 2013 12:23:57 +0300 unicorn (4.6.3-4) unstable; urgency=low * Team upload. * Also bump the dependencies on ruby-raindrops for ruby2.0 compatibility. -- Jérémy Bobbio Mon, 07 Oct 2013 14:13:25 +0200 unicorn (4.6.3-3) unstable; urgency=low * Team upload. * Bump version for ruby-kgio in Depends and Build-Depends to get ruby2.0 support. (Closes: #720235) -- Jérémy Bobbio Mon, 07 Oct 2013 11:59:21 +0200 unicorn (4.6.3-2) unstable; urgency=low * Fix usage of $? in debian/ruby-tests.rb. * Build only on linux and kfreebsd. * Build against gem2deb >= 0.5.0~ to add ruby2.0 and drop ruby1.8 support. -- Hleb Valoshka <375gnu@gmail.com> Mon, 09 Sep 2013 20:58:02 +0300 unicorn (4.6.3-1) unstable; urgency=low * New upstream version. * Update Vcs-* fields to use anonscm.debian.org. * Backport upstream commit 24b9f66d to improve handling of client-triggerable socket errors. -- Hleb Valoshka <375gnu@gmail.com> Sat, 17 Aug 2013 12:36:16 +0300 unicorn (4.6.2-2) unstable; urgency=low [ Hleb Valoshka ] * Change the way tests are run during package build. * Bump Standards-Version to 3.9.4. * Remove DM-Upload-Allowed. [ Jérémy Bobbio ] * Upload to unstable. -- Jérémy Bobbio Tue, 07 May 2013 11:02:06 +0200 unicorn (4.6.2-1) experimental; urgency=low * New upstream version: - Refresh and update 0001-explicitly-use-escaped-minus-in-man-pages.patch for the new `--no-default-middleware` option. -- Hleb Valoshka <375gnu@gmail.com> Sat, 16 Mar 2013 14:38:56 +0100 unicorn (4.3.1-4) unstable; urgency=low * Remove unicorn logs on package purge. * Add patch to explicitly use escaped minus in man pages. -- Hleb Valoshka <375gnu@gmail.com> Mon, 08 Oct 2012 00:15:04 +0300 unicorn (4.3.1-3) unstable; urgency=low * Team upload. * Bump build dependency on gem2deb to >= 0.3.0~. -- Paul van Tilburg Wed, 27 Jun 2012 21:06:17 +0200 unicorn (4.3.1-2) unstable; urgency=low * Add prerm hook which stops unicorn on remove and deconfigure * Suppress output of 'invoke-rc.d unicorn status' in postinstall hook -- Hleb Valoshka <375gnu@gmail.com> Sun, 24 Jun 2012 10:43:08 +0300 unicorn (4.3.1-1) unstable; urgency=low * New upstream version -- Hleb Valoshka <375gnu@gmail.com> Sun, 13 May 2012 10:53:19 +0300 unicorn (4.2.1-1) unstable; urgency=low * New upstream version -- Hleb Valoshka <375gnu@gmail.com> Thu, 05 Apr 2012 21:11:41 +0300 unicorn (4.2.0-2) unstable; urgency=low * Install SysV init script * Add postinstall hook -- Hleb Valoshka <375gnu@gmail.com> Sun, 04 Mar 2012 19:06:40 +0300 unicorn (4.2.0-1) unstable; urgency=low * Initial release (Closes: #652093) -- Hleb Valoshka <375gnu@gmail.com> Sat, 18 Feb 2012 16:00:14 +0300 debian/source/0000755000000000000000000000000012236656073010500 5ustar debian/source/format0000644000000000000000000000001412236656073011706 0ustar 3.0 (quilt) debian/unicorn.postinst0000644000000000000000000000211012236656073012454 0ustar #!/bin/sh set -e if [ $1 != "configure" ] ; then exit 0 fi if [ -f /etc/default/unicorn ]; then . /etc/default/unicorn fi TIMEOUT=${TIMEOUT-60} PID=${PID-/run/unicorn.pid} OLD_PID="${PID}.oldbin" invoke() { if [ -x /usr/sbin/invoke-rc.d ]; then invoke-rc.d $1 $2 else /etc/init.d/$1 $2 fi } running() { invoke $1 status >/dev/null 2>&1 } sig() { test -s $PID && kill -$1 `cat $PID` } oldsig() { test -s $OLD_PID && kill -$1 `cat $OLD_PID` } upgrade() { echo "Trying to upgrade running server" if sig USR2 && sleep 2 && sig 0 && oldsig QUIT ; then n=$TIMEOUT while test -s $OLD_PID && test $n -ge 0 ; do printf '.' && sleep 1 && n=`expr $n - 1` done if test $n -lt 0 && test -s $OLD_PID; then echo "$OLD_PID still exists after $TIMEOUT seconds. Killing and starting new." sig KILL || true oldsig KILL || true invoke unicorn start || exit $? fi fi } if [ -x /etc/init.d/unicorn ]; then if running unicorn; then upgrade else invoke unicorn start || exit $? fi fi #DEBHELPER# exit 0 debian/watch0000644000000000000000000000014312236656073010227 0ustar version=3 http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/unicorn .*/unicorn-(.*).tar.gz debian/ruby-tests.rb0000644000000000000000000000037512236656073011653 0ustar require 'rbconfig' unless defined?(RbConfig) ruby = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']) Dir['test/unit/test_*.rb'].each do |test| exit($?.exitstatus) unless system("#{ruby} -I. -e \"require '#{test}'\"") end debian/logrotate0000644000000000000000000000022112236656073011116 0ustar /var/log/unicorn/*.log { daily missingok rotate 7 compress delaycompress lastaction invoke-rc.d unicorn reopen-logs endscript } debian/patches/0000755000000000000000000000000012236656073010627 5ustar debian/patches/0001-explicitly-use-escaped-minus-in-man-pages.patch0000644000000000000000000002107412236656073022217 0ustar From: Hleb Valoshka <375GNU@Gmail.COM> Date: Thu, 27 Sep 2012 22:40:49 +0300 Subject: explicitly use escaped minus in man pages --- man/man1/unicorn.1 | 34 +++++++++++++++++----------------- man/man1/unicorn_rails.1 | 34 +++++++++++++++++----------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/man/man1/unicorn.1 b/man/man1/unicorn.1 index 2401be4..b4d22de 100644 --- a/man/man1/unicorn.1 +++ b/man/man1/unicorn.1 @@ -4,7 +4,7 @@ unicorn - a rackup-like command to launch the Unicorn HTTP server .SH SYNOPSIS .PP -unicorn [-c CONFIG_FILE] [-E RACK_ENV] [-D] [RACKUP_FILE] +unicorn [\-c CONFIG_FILE] [\-E RACK_ENV] [\-D] [RACKUP_FILE] .SH DESCRIPTION .PP A rackup(1)-like command to launch Rack applications using Unicorn. @@ -26,7 +26,7 @@ Embedded command-line options are mostly parsed for compatibility with rackup(1) but strongly discouraged. .SH UNICORN OPTIONS .TP -.B -c, --config-file CONFIG_FILE +.B \-c, \-\-config\-file CONFIG_FILE Path to the Unicorn-specific config file. The config file is implemented as a Ruby DSL, so Ruby code may executed. @@ -38,7 +38,7 @@ viewing ps(1) output. .RS .RE .TP -.B -D, --daemonize +.B \-D, \-\-daemonize Run daemonized in the background. The process is detached from the controlling terminal and stdin is redirected to \[lq]/dev/null\[rq]. @@ -50,13 +50,13 @@ redirected to \[lq]/dev/null\[rq]. .RS .RE .TP -.B -E, --env RACK_ENV +.B \-E, \-\-env RACK_ENV Run under the given RACK_ENV. See the RACK ENVIRONMENT section for more details. .RS .RE .TP -.B -l, --listen ADDRESS +.B \-l, \-\-listen ADDRESS Listens on a given ADDRESS. ADDRESS may be in the form of HOST:PORT or PATH, HOST:PORT is taken to mean a TCP socket and PATH is meant to be a path to a UNIX @@ -68,7 +68,7 @@ socket options. .RS .RE .TP -.B -N, --no-default-middleware +.B \-N, \-\-no\-default\-middleware Disables loading middleware implied by RACK_ENV. This bypasses the configuration documented in the RACK ENVIRONMENT section, but still allows RACK_ENV to be used for @@ -77,51 +77,51 @@ application/framework-specific purposes. .RE .SH RACKUP COMPATIBILITY OPTIONS .TP -.B -o, --host HOST +.B \-o, \-\-host HOST Listen on a TCP socket belonging to HOST, default is \[lq]0.0.0.0\[rq] (all addresses). If specified multiple times on the command-line, only the last-specified value takes effect. This option only exists for compatibility with the rackup(1) -command, use of \[lq]-l\[rq]/\[lq]--listen\[rq] switch is +command, use of \[lq]\-l\[rq]/\[lq]\-\-listen\[rq] switch is recommended instead. .RS .RE .TP -.B -p, --port PORT +.B \-p, \-\-port PORT Listen on the specified TCP PORT, default is 8080. If specified multiple times on the command-line, only the last-specified value takes effect. This option only exists for compatibility with the rackup(1) -command, use of \[lq]-l\[rq]/\[lq]--listen\[rq] switch is +command, use of \[lq]\-l\[rq]/\[lq]\-\-listen\[rq] switch is recommended instead. .RS .RE .TP -.B -s, --server SERVER +.B \-s, \-\-server SERVER No-op, this exists only for compatibility with rackup(1). .RS .RE .SH RUBY OPTIONS .TP -.B -e, --eval LINE +.B \-e, \-\-eval LINE Evaluate a LINE of Ruby code. This evaluation happens immediately as the command-line is being parsed. .RS .RE .TP -.B -d, --debug +.B \-d, \-\-debug Turn on debug mode, the $DEBUG variable is set to true. .RS .RE .TP -.B -w, --warn +.B \-w, \-\-warn Turn on verbose warnings, the $VERBOSE variable is set to true. .RS .RE .TP -.B -I, --include PATH +.B \-I, \-\-include PATH specify $LOAD_PATH. PATH will be prepended to $LOAD_PATH. The \[aq]:\[aq] character may be used to delimit multiple @@ -132,7 +132,7 @@ they were specified on the command-line. .RS .RE .TP -.B -r, --require LIBRARY +.B \-r, \-\-require LIBRARY require a specified LIBRARY before executing the application. The "require" statement will be executed immediately and in the order they were specified on the command-line. @@ -194,7 +194,7 @@ If needed, they must be individually specified in the RACKUP_FILE, some frameworks do not require them. .SH ENVIRONMENT VARIABLES .PP -The RACK_ENV variable is set by the aforementioned -E switch. +The RACK_ENV variable is set by the aforementioned \-E switch. All application or library-specific environment variables (e.g. TMPDIR) may always be set in the Unicorn CONFIG_FILE in addition to the spawning shell. diff --git a/man/man1/unicorn_rails.1 b/man/man1/unicorn_rails.1 index a593acb..c644d03 100644 --- a/man/man1/unicorn_rails.1 +++ b/man/man1/unicorn_rails.1 @@ -5,7 +5,7 @@ unicorn_rails - a script/server-like command to launch the Unicorn HTTP server .SH SYNOPSIS .PP -unicorn_rails [-c CONFIG_FILE] [-E RAILS_ENV] [-D] [RACKUP_FILE] +unicorn_rails [\-c CONFIG_FILE] [\-E RAILS_ENV] [\-D] [RACKUP_FILE] .SH DESCRIPTION .PP A rackup(1)-like command to launch Rails applications using @@ -31,7 +31,7 @@ stick to the few command-line options specified in the SYNOPSIS and use the CONFIG_FILE as much as possible. .SH UNICORN OPTIONS .TP -.B -c, --config-file CONFIG_FILE +.B \-c, \-\-config-file CONFIG_FILE Path to the Unicorn-specific config file. The config file is implemented as a Ruby DSL, so Ruby code may executed. @@ -43,7 +43,7 @@ viewing ps(1) output. .RS .RE .TP -.B -D, --daemonize +.B \-D, \-\-daemonize Run daemonized in the background. The process is detached from the controlling terminal and stdin is redirected to \[lq]/dev/null\[rq]. @@ -61,7 +61,7 @@ override this Unicorn config file. .RS .RE .TP -.B -E, --env RAILS_ENV +.B \-E, \-\-env RAILS_ENV Run under the given RAILS_ENV. This sets the RAILS_ENV environment variable. Acceptable values are exactly those you expect in your Rails @@ -70,7 +70,7 @@ application, typically \[lq]development\[rq] or .RS .RE .TP -.B -l, --listen ADDRESS +.B \-l, \-\-listen ADDRESS Listens on a given ADDRESS. ADDRESS may be in the form of HOST:PORT or PATH, HOST:PORT is taken to mean a TCP socket and PATH is meant to be a path to a UNIX @@ -84,28 +84,28 @@ socket options. .RE .SH RACKUP COMPATIBILITY OPTIONS .TP -.B -o, --host HOST +.B \-o, \-\-host HOST Listen on a TCP socket belonging to HOST, default is \[lq]0.0.0.0\[rq] (all addresses). If specified multiple times on the command-line, only the last-specified value takes effect. This option only exists for compatibility with the rackup(1) -command, use of \[lq]-l\[rq]/\[lq]--listen\[rq] switch is +command, use of \[lq]\-l\[rq]/\[lq]\-\-listen\[rq] switch is recommended instead. .RS .RE .TP -.B -p, --port PORT +.B \-p, \-\-port PORT Listen on the specified TCP PORT, default is 8080. If specified multiple times on the command-line, only the last-specified value takes effect. This option only exists for compatibility with the rackup(1) -command, use of \[lq]-l\[rq]/\[lq]--listen\[rq] switch is +command, use of \[lq]\-l\[rq]/\[lq]\-\-listen\[rq] switch is recommended instead. .RS .RE .TP -.B --path PATH +.B \-\-path PATH Mounts the Rails application at the given PATH (instead of \[lq]/\[rq]). This is equivalent to setting the RAILS_RELATIVE_URL_ROOT @@ -115,26 +115,26 @@ This is only supported under Rails 2.3 or later at the moment. .RE .SH RUBY OPTIONS .TP -.B -e, --eval LINE +.B \-e, \-\-eval LINE Evaluate a LINE of Ruby code. This evaluation happens immediately as the command-line is being parsed. .RS .RE .TP -.B -d, --debug +.B \-d, \-\-debug Turn on debug mode, the $DEBUG variable is set to true. For Rails >= 2.3.x, this loads the \f[I]Rails::Rack::Debugger\f[] middleware. .RS .RE .TP -.B -w, --warn +.B \-w, \-\-warn Turn on verbose warnings, the $VERBOSE variable is set to true. .RS .RE .TP -.B -I, --include PATH +.B \-I, \-\-include PATH specify $LOAD_PATH. PATH will be prepended to $LOAD_PATH. The \[aq]:\[aq] character may be used to delimit multiple @@ -145,7 +145,7 @@ they were specified on the command-line. .RS .RE .TP -.B -r, --require LIBRARY +.B \-r, \-\-require LIBRARY require a specified LIBRARY before executing the application. The "require" statement will be executed immediately and in the order they were specified on the command-line. @@ -164,8 +164,8 @@ Embedded command-line options are mostly parsed for compatibility with rackup(1) but strongly discouraged. .SH ENVIRONMENT VARIABLES .PP -The RAILS_ENV variable is set by the aforementioned -E switch. -The RAILS_RELATIVE_URL_ROOT is set by the aforementioned --path +The RAILS_ENV variable is set by the aforementioned \-E switch. +The RAILS_RELATIVE_URL_ROOT is set by the aforementioned \-\-path switch. Either of these variables may also be set in the shell or the Unicorn CONFIG_FILE. debian/patches/0002-tests-fix-SO_REUSEPORT-tests-for-old-Linux-and-non-L.patch0000644000000000000000000000151312236656073023462 0ustar From: Eric Wong Date: Mon, 4 Nov 2013 18:28:46 +0000 Subject: tests: fix SO_REUSEPORT tests for old Linux and non-Linux --- test/unit/test_socket_helper.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/unit/test_socket_helper.rb b/test/unit/test_socket_helper.rb index abc177b..8992757 100644 --- a/test/unit/test_socket_helper.rb +++ b/test/unit/test_socket_helper.rb @@ -190,6 +190,8 @@ class TestSocketHelper < Test::Unit::TestCase name = "#@test_addr:#{port}" sock = bind_listen(name, :reuseport => true) cur = sock.getsockopt(Socket::SOL_SOCKET, SO_REUSEPORT).unpack('i')[0] - assert_equal 1, cur - end if defined?(SO_REUSEPORT) + assert_operator cur, :>, 0 + rescue Errno::ENOPROTOOPT + # kernel does not support SO_REUSEPORT (older Linux) + end end debian/patches/series0000644000000000000000000000016512236656073012046 0ustar 0001-explicitly-use-escaped-minus-in-man-pages.patch 0002-tests-fix-SO_REUSEPORT-tests-for-old-Linux-and-non-L.patch debian/unicorn.default0000644000000000000000000000127412236656073012227 0ustar # Change paramentres below to appropriate values and set CONFIGURED to yes. CONFIGURED=no # Default timeout until child process is killed during server upgrade, # it has *no* relation to option "timeout" in server's config.rb. TIMEOUT=60 # Path to your web application, sh'ld be also set in server's config.rb, # option "working_directory". Rack's config.ru is located here. APP_ROOT=/path/to/your/web/application # Server's config.rb, it's not a rack's config.ru CONFIG_RB="$APP_ROOT/unicorn.conf.rb" # Where to store PID, sh'ld be also set in server's config.rb, option "pid". PID=/run/unicorn.pid # Additional arguments passed to unicorn, see man (1) unicorn. UNICORN_OPTS="-D -c $CONFIG_RB"