passenger 5.0.6 → 5.0.7
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- checksums.yaml +8 -8
- checksums.yaml.gz.asc +7 -7
- data.tar.gz.asc +7 -7
- data/CHANGELOG +26 -0
- data/Rakefile +0 -1
- data/bin/passenger-install-apache2-module +46 -12
- data/bin/passenger-status +6 -3
- data/build/packaging.rb +9 -1
- data/dev/ci/run_travis.sh +0 -36
- data/doc/ServerOptimizationGuide.html +12 -11
- data/doc/ServerOptimizationGuide.txt.md +12 -11
- data/doc/Users guide Apache.html +81 -75
- data/doc/Users guide Apache.idmap.txt +15 -13
- data/doc/Users guide Apache.txt +9 -1
- data/doc/Users guide Nginx.html +81 -76
- data/doc/Users guide Nginx.idmap.txt +15 -13
- data/doc/Users guide Nginx.txt +8 -0
- data/doc/Users guide Standalone.html +183 -24
- data/doc/Users guide Standalone.idmap.txt +19 -11
- data/doc/Users guide Standalone.txt +4 -0
- data/doc/users_guide_snippets/environment_variables.txt +2 -1
- data/doc/users_guide_snippets/installation.txt +15 -2
- data/doc/users_guide_snippets/tips.txt +19 -31
- data/doc/users_guide_snippets/under_the_hood/relationship_with_ruby.txt +7 -0
- data/ext/apache2/ConfigurationCommands.cpp +7 -0
- data/ext/apache2/ConfigurationFields.hpp +2 -0
- data/ext/apache2/ConfigurationSetters.cpp +8 -0
- data/ext/apache2/CreateDirConfig.cpp +1 -0
- data/ext/apache2/MergeDirConfig.cpp +7 -0
- data/ext/apache2/SetHeaders.cpp +5 -0
- data/ext/common/ApplicationPool2/Options.h +9 -0
- data/ext/common/Constants.h +3 -1
- data/ext/common/Logging.cpp +2 -2
- data/ext/common/ServerKit/HttpHeaderParser.h +13 -1
- data/ext/common/ServerKit/Implementation.cpp +7 -1
- data/ext/common/agents/Base.cpp +1 -1
- data/ext/common/agents/HelperAgent/OptionParser.h +15 -0
- data/ext/common/agents/HelperAgent/RequestHandler.h +3 -1
- data/ext/common/agents/HelperAgent/RequestHandler/BufferBody.cpp +3 -3
- data/ext/common/agents/HelperAgent/RequestHandler/InitRequest.cpp +12 -1
- data/ext/common/agents/HelperAgent/RequestHandler/Utils.cpp +7 -3
- data/ext/common/agents/HelperAgent/ResponseCache.h +7 -1
- data/ext/common/agents/LoggingAgent/Main.cpp +4 -1
- data/ext/nginx/CacheLocationConfig.c +20 -0
- data/ext/nginx/Configuration.c +7 -0
- data/ext/nginx/ConfigurationCommands.c +10 -0
- data/ext/nginx/ConfigurationFields.h +2 -0
- data/ext/nginx/ContentHandler.c +10 -0
- data/ext/nginx/CreateLocationConfig.c +5 -0
- data/ext/nginx/MergeLocationConfig.c +6 -0
- data/helper-scripts/meteor-loader.rb +15 -2
- data/helper-scripts/rack-loader.rb +2 -6
- data/helper-scripts/rack-preloader.rb +1 -5
- data/lib/phusion_passenger.rb +3 -3
- data/lib/phusion_passenger/apache2/config_options.rb +5 -0
- data/lib/phusion_passenger/config/command.rb +9 -0
- data/lib/phusion_passenger/config/install_standalone_runtime_command.rb +4 -0
- data/lib/phusion_passenger/config/validate_install_command.rb +478 -46
- data/lib/phusion_passenger/constants.rb +1 -0
- data/lib/phusion_passenger/loader_shared_helpers.rb +26 -3
- data/lib/phusion_passenger/nginx/config_options.rb +4 -0
- data/lib/phusion_passenger/packaging.rb +0 -8
- data/lib/phusion_passenger/platform_info/apache.rb +40 -28
- data/lib/phusion_passenger/platform_info/apache_detector.rb +29 -3
- data/lib/phusion_passenger/rack/thread_handler_extension.rb +12 -7
- data/lib/phusion_passenger/request_handler/thread_handler.rb +5 -0
- data/lib/phusion_passenger/standalone/start_command.rb +46 -5
- data/lib/phusion_passenger/standalone/start_command/builtin_engine.rb +5 -3
- data/resources/templates/apache2/config_snippets.txt.erb +1 -1
- data/resources/templates/apache2/run_installer_as_root_for_apache_analysis.txt.erb +9 -0
- data/resources/templates/standalone/config.erb +16 -1
- metadata +3 -3
- metadata.gz.asc +7 -7
- data/build/debian.rb +0 -213
@@ -88,9 +88,7 @@ module PhusionPassenger
|
|
88
88
|
command << " --no-user-switching"
|
89
89
|
command << " --no-delete-pid-file"
|
90
90
|
command << " --cleanup-pidfile #{Shellwords.escape @working_dir}/temp_dir_toucher.pid"
|
91
|
-
|
92
|
-
command << " --report-file #{Shellwords.escape @working_dir}/report.json"
|
93
|
-
end
|
91
|
+
command << " --report-file #{Shellwords.escape @working_dir}/report.json"
|
94
92
|
add_param(command, :user, "--user")
|
95
93
|
add_param(command, :log_file, "--log-file")
|
96
94
|
add_param(command, :pid_file, "--pid-file")
|
@@ -148,6 +146,10 @@ module PhusionPassenger
|
|
148
146
|
add_param(command, :union_station_gateway_address, "--union-station-gateway-address")
|
149
147
|
add_param(command, :union_station_gateway_port, "--union-station-gateway-port")
|
150
148
|
add_param(command, :union_station_key, "--union-station-key")
|
149
|
+
add_param(command, :ruby, "--ruby")
|
150
|
+
add_param(command, :python, "--python")
|
151
|
+
add_param(command, :nodejs, "--nodejs")
|
152
|
+
add_param(command, :meteor_app_settings, "--meteor-app-settings")
|
151
153
|
|
152
154
|
command << " #{Shellwords.escape(@apps[0][:root])}"
|
153
155
|
|
@@ -7,4 +7,4 @@ Please edit your Apache configuration file, and add these lines:
|
|
7
7
|
After you restart Apache, you are ready to deploy any number of web
|
8
8
|
applications on Apache, with a minimum amount of configuration!
|
9
9
|
|
10
|
-
<b>Press ENTER
|
10
|
+
<b>Press ENTER when you are done editing.</b>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<red>Permission problems</red>
|
2
|
+
This installer must be able to analyze your Apache installation. But it can't
|
3
|
+
do that, because you're running the installer as <b><%= `whoami`.strip %></b>.
|
4
|
+
Please give this installer root privileges, by re-running it with <yellow><%= @sudo %></yellow>:
|
5
|
+
|
6
|
+
<b>export ORIG_PATH="$PATH"
|
7
|
+
<%= @sudo_s_e %>
|
8
|
+
export PATH="$ORIG_PATH"
|
9
|
+
<%= @ruby %> <%= @installer %></b>
|
@@ -41,7 +41,19 @@ events {
|
|
41
41
|
http {
|
42
42
|
log_format debug '[$time_local] $msec "$request" $status conn=$connection sent=$bytes_sent body_sent=$body_bytes_sent';
|
43
43
|
include '<%= PhusionPassenger.resources_dir %>/mime.types';
|
44
|
-
|
44
|
+
|
45
|
+
<% if @options[:ruby] %>
|
46
|
+
passenger_ruby <%= @options[:ruby] %>;
|
47
|
+
<% else %>
|
48
|
+
passenger_ruby <%= PlatformInfo.ruby_command %>;
|
49
|
+
<% end %>
|
50
|
+
<% if @options[:nodejs] %>
|
51
|
+
passenger_nodejs <%= @options[:nodejs] %>;
|
52
|
+
<% end %>
|
53
|
+
<% if @options[:python] %>
|
54
|
+
passenger_python <%= @options[:python] %>;
|
55
|
+
<% end %>
|
56
|
+
|
45
57
|
passenger_root '<%= PhusionPassenger.install_spec %>';
|
46
58
|
passenger_abort_on_startup_error on;
|
47
59
|
passenger_ctl cleanup_pidfiles <%= serialize_strset("#{@working_dir}/temp_dir_toucher.pid") %>;
|
@@ -150,6 +162,9 @@ http {
|
|
150
162
|
ssl_certificate <%= app[:ssl_certificate] %>;
|
151
163
|
ssl_certificate_key <%= app[:ssl_certificate_key] %>;
|
152
164
|
<% end %>
|
165
|
+
<% if @options[:meteor_app_settings] %>
|
166
|
+
passenger_meteor_app_settings <%= @options[:meteor_app_settings] %>;
|
167
|
+
<% end %>
|
153
168
|
|
154
169
|
<% app[:envvars].each_pair do |name, value| %>
|
155
170
|
passenger_env_var '<%= name %>' '<%= value %>';
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: passenger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phusion - http://www.phusion.nl/
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -72,7 +72,6 @@ files:
|
|
72
72
|
- build/common_library.rb
|
73
73
|
- build/cplusplus_support.rb
|
74
74
|
- build/cxx_tests.rb
|
75
|
-
- build/debian.rb
|
76
75
|
- build/documentation.rb
|
77
76
|
- build/integration_tests.rb
|
78
77
|
- build/misc.rb
|
@@ -2849,6 +2848,7 @@ files:
|
|
2849
2848
|
- resources/templates/apache2/notify_apache_module_installed.txt.erb
|
2850
2849
|
- resources/templates/apache2/possible_solutions_for_compilation_and_installation_problems.txt.erb
|
2851
2850
|
- resources/templates/apache2/present_choice_for_no_update_config.txt.erb
|
2851
|
+
- resources/templates/apache2/run_installer_as_root_for_apache_analysis.txt.erb
|
2852
2852
|
- resources/templates/apache2/welcome.txt.erb
|
2853
2853
|
- resources/templates/config/agent_compiler/confirm_enable_optimizations.txt.erb
|
2854
2854
|
- resources/templates/config/installation_utils/cannot_create_user_support_binaries_dir.txt.erb
|
metadata.gz.asc
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=
|
5
|
+
iQEcBAABAgAGBQJVP5XYAAoJECrHRaUKISqMX2UIALXnyIQNfxL8pzYSq0RXsULD
|
6
|
+
ee9zcpGYagIQAsRw5fgUrdp3GJ2zVAPqKNkJjG0D5eRnTLLTyPlW+xLUVJ3CKmMU
|
7
|
+
ftF9N7cId4tGlrKBpoN4Nm3QRK27R8cUwN/P50sealilHU6M/DWGJxpNJszWwwl4
|
8
|
+
EMjfv42MerPL1cgG0w+UPgnrw5+UFCuQzzbfmIxpCMb7JUdfhZb/lgI5PQa+PCaF
|
9
|
+
/DAJh6UVK95DHdOlmocwmiytrB0dujMP2RBOyav/7sNLcLa2CHJ7jDsCI6/jiS5e
|
10
|
+
hz4hvQVIgmo1KqtJ34syOg45voK1Q6hsa0MPzI7GSjwoWUkoT2drP+a3f+dug64=
|
11
|
+
=l9PY
|
12
12
|
-----END PGP SIGNATURE-----
|
data/build/debian.rb
DELETED
@@ -1,213 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
# Copyright (c) 2013 Phusion
|
4
|
-
#
|
5
|
-
# "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
|
6
|
-
#
|
7
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
-
# of this software and associated documentation files (the "Software"), to deal
|
9
|
-
# in the Software without restriction, including without limitation the rights
|
10
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
-
# copies of the Software, and to permit persons to whom the Software is
|
12
|
-
# furnished to do so, subject to the following conditions:
|
13
|
-
#
|
14
|
-
# The above copyright notice and this permission notice shall be included in
|
15
|
-
# all copies or substantial portions of the Software.
|
16
|
-
#
|
17
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
-
# THE SOFTWARE.
|
24
|
-
|
25
|
-
PhusionPassenger.require_passenger_lib 'constants'
|
26
|
-
require 'build/preprocessor'
|
27
|
-
|
28
|
-
# If you change the default distribution list, don't forget to update the configuration
|
29
|
-
# file in passenger_apt_automation too: https://github.com/phusion/passenger_apt_automation
|
30
|
-
ALL_DISTRIBUTIONS = string_option("DEBIAN_DISTROS", "raring precise lucid").split(/[ ,]/)
|
31
|
-
DEBIAN_NAME = "passenger"
|
32
|
-
DEBIAN_EPOCH = 1
|
33
|
-
DEBIAN_ARCHS = string_option("DEBIAN_ARCHS", "i386 amd64").split(/[ ,]/)
|
34
|
-
DEBIAN_ORIG_TARBALL_FILES = lambda { PhusionPassenger::Packaging.debian_orig_tarball_files }
|
35
|
-
|
36
|
-
def create_debian_package_dir(distribution, output_dir = PKG_DIR)
|
37
|
-
require 'time'
|
38
|
-
|
39
|
-
variables = {
|
40
|
-
:distribution => distribution
|
41
|
-
}
|
42
|
-
|
43
|
-
root = "#{output_dir}/#{distribution}"
|
44
|
-
orig_tarball = File.expand_path("#{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz")
|
45
|
-
|
46
|
-
sh "rm -rf #{root}"
|
47
|
-
sh "mkdir -p #{root}"
|
48
|
-
sh "cd #{root} && tar xzf #{orig_tarball}"
|
49
|
-
sh "bash -c 'shopt -s dotglob && mv #{root}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}/* #{root}'"
|
50
|
-
sh "rmdir #{root}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}"
|
51
|
-
recursive_copy_files(Dir["debian.template/**/*"], root,
|
52
|
-
true, variables)
|
53
|
-
sh "mv #{root}/debian.template #{root}/debian"
|
54
|
-
changelog = File.read("#{root}/debian/changelog")
|
55
|
-
changelog =
|
56
|
-
"#{DEBIAN_NAME} (#{DEBIAN_EPOCH}:#{PACKAGE_VERSION}-1~#{distribution}1) #{distribution}; urgency=low\n" +
|
57
|
-
"\n" +
|
58
|
-
" * Package built.\n" +
|
59
|
-
"\n" +
|
60
|
-
" -- #{MAINTAINER_NAME} <#{MAINTAINER_EMAIL}> #{Time.now.rfc2822}\n\n" +
|
61
|
-
changelog
|
62
|
-
File.open("#{root}/debian/changelog", "w") do |f|
|
63
|
-
f.write(changelog)
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
task 'debian:orig_tarball' => Packaging::PREGENERATED_FILES do
|
68
|
-
if File.exist?("#{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz")
|
69
|
-
puts "WARNING: Debian orig tarball #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz already exists. " +
|
70
|
-
"It will not be regenerated. If you are sure that the orig tarball is outdated, please delete it " +
|
71
|
-
"and rerun this task."
|
72
|
-
else
|
73
|
-
sh "mkdir -p #{PKG_DIR}"
|
74
|
-
nginx_version = PhusionPassenger::PREFERRED_NGINX_VERSION
|
75
|
-
local_nginx_tarball = File.expand_path("#{PKG_DIR}/nginx-#{nginx_version}.tar.gz")
|
76
|
-
if File.exist?(local_nginx_tarball)
|
77
|
-
puts "#{local_nginx_tarball} already exists"
|
78
|
-
else
|
79
|
-
sh "curl -L --fail -o #{local_nginx_tarball} http://nginx.org/download/nginx-#{nginx_version}.tar.gz"
|
80
|
-
end
|
81
|
-
sh "rm -rf #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}"
|
82
|
-
sh "mkdir -p #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}"
|
83
|
-
recursive_copy_files(DEBIAN_ORIG_TARBALL_FILES.call, "#{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}")
|
84
|
-
sh "cd #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION} && tar xzf #{local_nginx_tarball}"
|
85
|
-
sh "cd #{PKG_DIR} && find #{DEBIAN_NAME}_#{PACKAGE_VERSION} -print0 | xargs -0 touch -d '2013-10-27 00:00:00 UTC'"
|
86
|
-
sh "cd #{PKG_DIR} && tar -c #{DEBIAN_NAME}_#{PACKAGE_VERSION} | gzip --no-name --best > #{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz"
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
desc "Build Debian source and binary package(s) for local testing"
|
91
|
-
task 'debian:dev' do
|
92
|
-
sh "rm -f #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz"
|
93
|
-
Rake::Task["debian:clean"].invoke
|
94
|
-
Rake::Task["debian:orig_tarball"].invoke
|
95
|
-
if string_option('DISTRO').nil?
|
96
|
-
distributions = [File.read("/etc/lsb-release").scan(/^DISTRIB_CODENAME=(.+)/).first.first]
|
97
|
-
else
|
98
|
-
distributions = ALL_DISTRIBUTIONS
|
99
|
-
end
|
100
|
-
distributions.each do |distribution|
|
101
|
-
create_debian_package_dir(distribution)
|
102
|
-
sh "cd #{PKG_DIR}/#{distribution} && dpkg-checkbuilddeps"
|
103
|
-
end
|
104
|
-
distributions.each do |distribution|
|
105
|
-
sh "cd #{PKG_DIR}/#{distribution} && debuild -e CCACHE_* -us -uc -F"
|
106
|
-
end
|
107
|
-
end
|
108
|
-
|
109
|
-
desc "(Re)install the Debian binary packages built for local testing"
|
110
|
-
task 'debian:dev:reinstall' do
|
111
|
-
package_names = ["passenger", "passenger-dev",
|
112
|
-
"passenger-doc", "libapache2-mod-passenger"]
|
113
|
-
package_names.each do |name|
|
114
|
-
if Dir["#{PKG_DIR}/#{name}_*.deb"].size > 1
|
115
|
-
abort "Please ensure that #{PKG_DIR} only has 1 version of the Phusion Passenger packages."
|
116
|
-
end
|
117
|
-
end
|
118
|
-
package_names.each do |name|
|
119
|
-
if !system "sudo apt-get remove -y #{name}"
|
120
|
-
if !$? || $?.exitstatus != 100
|
121
|
-
abort
|
122
|
-
end
|
123
|
-
end
|
124
|
-
end
|
125
|
-
package_names.each do |name|
|
126
|
-
filename = Dir["#{PKG_DIR}/#{name}_*.deb"].first
|
127
|
-
sh "sudo gdebi -n #{filename}"
|
128
|
-
end
|
129
|
-
end
|
130
|
-
|
131
|
-
desc "Build official Debian source packages"
|
132
|
-
task 'debian:source_packages' => 'debian:orig_tarball' do
|
133
|
-
if boolean_option('USE_CCACHE', false)
|
134
|
-
# The resulting Debian rules file must not set USE_CCACHE.
|
135
|
-
abort "USE_CCACHE must be returned off when running the debian:source_packages task."
|
136
|
-
end
|
137
|
-
|
138
|
-
pkg_dir = "#{PKG_DIR}/official"
|
139
|
-
if File.exist?(pkg_dir)
|
140
|
-
abort "#{pkg_dir} must not already exist when running the debian:source_packages task."
|
141
|
-
end
|
142
|
-
sh "mkdir #{pkg_dir}"
|
143
|
-
sh "cd #{pkg_dir} && ln -s ../#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz ."
|
144
|
-
|
145
|
-
ALL_DISTRIBUTIONS.each do |distribution|
|
146
|
-
create_debian_package_dir(distribution, pkg_dir)
|
147
|
-
end
|
148
|
-
ALL_DISTRIBUTIONS.each do |distribution|
|
149
|
-
sh "cd #{pkg_dir}/#{distribution} && debuild -us -uc -S"
|
150
|
-
end
|
151
|
-
end
|
152
|
-
|
153
|
-
def pbuilder_base_name(distribution, arch)
|
154
|
-
if arch == "amd64"
|
155
|
-
return distribution
|
156
|
-
else
|
157
|
-
return "#{distribution}-#{arch}"
|
158
|
-
end
|
159
|
-
end
|
160
|
-
|
161
|
-
def create_debian_binary_package_task(distribution, arch)
|
162
|
-
task "debian:binary_package:#{distribution}_#{arch}" => 'debian:binary_packages:check' do
|
163
|
-
require 'shellwords'
|
164
|
-
base_name = "#{DEBIAN_NAME}_#{PACKAGE_VERSION}-1~#{distribution}1"
|
165
|
-
logfile = "#{PKG_DIR}/official/passenger_#{distribution}_#{arch}.log"
|
166
|
-
command = "cd #{PKG_DIR}/official && " +
|
167
|
-
"pbuilder-dist #{distribution} #{arch} build #{base_name}.dsc " +
|
168
|
-
"2>&1 | awk '{ print strftime(\"%Y-%m-%d %H:%M:%S -- \"), $0; fflush(); }'" +
|
169
|
-
" | tee #{logfile}; test ${PIPESTATUS[0]} -eq 0"
|
170
|
-
sh "bash -c #{Shellwords.escape(command)}"
|
171
|
-
sh "echo Done >> #{logfile}"
|
172
|
-
end
|
173
|
-
end
|
174
|
-
|
175
|
-
DEBIAN_BINARY_PACKAGE_TASKS = []
|
176
|
-
ALL_DISTRIBUTIONS.each do |distribution|
|
177
|
-
DEBIAN_ARCHS.each do |arch|
|
178
|
-
task = create_debian_binary_package_task(distribution, arch)
|
179
|
-
DEBIAN_BINARY_PACKAGE_TASKS << task
|
180
|
-
end
|
181
|
-
end
|
182
|
-
|
183
|
-
task 'debian:binary_packages:check' do
|
184
|
-
pkg_dir = "#{PKG_DIR}/official"
|
185
|
-
if !File.exist?(pkg_dir)
|
186
|
-
abort "Please run rake debian:source_packages first."
|
187
|
-
end
|
188
|
-
|
189
|
-
pbuilder_dir = File.expand_path("~/pbuilder")
|
190
|
-
ALL_DISTRIBUTIONS.each do |distribution|
|
191
|
-
DEBIAN_ARCHS.each do |arch|
|
192
|
-
pbase_name = pbuilder_base_name(distribution, arch) + "-base.tgz"
|
193
|
-
if !File.exist?("#{pbuilder_dir}/#{pbase_name}")
|
194
|
-
abort "Missing pbuilder environment for #{distribution}-#{arch}. " +
|
195
|
-
"Please run this first: pbuilder-dist #{distribution} #{arch} create"
|
196
|
-
end
|
197
|
-
end
|
198
|
-
end
|
199
|
-
end
|
200
|
-
|
201
|
-
desc "Build official Debian binary packages"
|
202
|
-
task 'debian:binary_packages' => DEBIAN_BINARY_PACKAGE_TASKS
|
203
|
-
|
204
|
-
desc "Clean Debian packaging products, except for orig tarball"
|
205
|
-
task 'debian:clean' do
|
206
|
-
files = Dir["#{PKG_DIR}/*.{changes,build,deb,dsc,upload}"]
|
207
|
-
sh "rm -f #{files.join(' ')}"
|
208
|
-
sh "rm -rf #{PKG_DIR}/official"
|
209
|
-
ALL_DISTRIBUTIONS.each do |distribution|
|
210
|
-
sh "rm -rf #{PKG_DIR}/#{distribution}"
|
211
|
-
end
|
212
|
-
sh "rm -rf #{PKG_DIR}/*.debian.tar.gz"
|
213
|
-
end
|