pkgr 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +16 -2
- data/data/build_dependencies/centos.yml +13 -0
- data/{lib/pkgr/data/distributions/debian/build_dependencies.yml → data/build_dependencies/debian.yml} +2 -2
- data/data/build_dependencies/ubuntu.yml +15 -0
- data/data/buildpacks/centos-6 +2 -0
- data/data/buildpacks/debian-6 +2 -0
- data/{lib/pkgr/data/distributions/debian/buildpacks/debian_wheezy → data/buildpacks/debian-7} +1 -1
- data/data/buildpacks/ubuntu-10.04 +2 -0
- data/{lib/pkgr/data/distributions/debian/buildpacks/ubuntu_precise → data/buildpacks/ubuntu-12.04} +1 -1
- data/{lib/pkgr/data/distributions/debian/runner.erb → data/cli/cli.sh.erb} +105 -57
- data/data/dependencies/centos.yml +9 -0
- data/{lib/pkgr/data/distributions/debian/dependencies.yml → data/dependencies/debian.yml} +2 -2
- data/data/dependencies/ubuntu.yml +21 -0
- data/data/environment/default.erb +9 -0
- data/{lib/pkgr/data/distributions/debian → data}/hooks/postinstall.sh +7 -4
- data/data/hooks/preinstall.sh +13 -0
- data/{lib/pkgr/data/distributions/debian/sysv → data/init/sysv/lsb-3.1}/master.erb +0 -0
- data/{lib/pkgr/data/distributions/debian/sysv → data/init/sysv/lsb-3.1}/process.erb +84 -11
- data/{lib/pkgr/data/distributions/debian/sysv → data/init/sysv/lsb-3.1}/process_master.erb +0 -0
- data/{lib/pkgr/data/distributions/debian/upstart → data/init/upstart/1.5}/init.d.sh.erb +0 -0
- data/{lib/pkgr/data/distributions/debian/upstart → data/init/upstart/1.5}/master.conf.erb +0 -0
- data/{lib/pkgr/data/distributions/debian/upstart → data/init/upstart/1.5}/process.conf.erb +0 -0
- data/{lib/pkgr/data/distributions/debian/upstart → data/init/upstart/1.5}/process_master.conf.erb +0 -0
- data/{lib/pkgr/data/distributions/debian → data/logrotate}/logrotate.erb +0 -0
- data/lib/pkgr.rb +1 -1
- data/lib/pkgr/builder.rb +8 -2
- data/lib/pkgr/buildpack.rb +1 -0
- data/lib/pkgr/cli.rb +12 -6
- data/lib/pkgr/config.rb +20 -2
- data/lib/pkgr/distributions.rb +9 -7
- data/lib/pkgr/distributions/base.rb +159 -0
- data/lib/pkgr/distributions/centos.rb +12 -0
- data/lib/pkgr/distributions/debian.rb +39 -163
- data/lib/pkgr/distributions/redhat.rb +51 -0
- data/lib/pkgr/distributions/runner.rb +39 -0
- data/lib/pkgr/distributions/ubuntu.rb +17 -0
- data/lib/pkgr/version.rb +1 -1
- metadata +30 -29
- data/lib/pkgr/app.rb +0 -279
- data/lib/pkgr/data/bin/executable +0 -36
- data/lib/pkgr/data/config/pre_boot.rb +0 -15
- data/lib/pkgr/data/distributions/debian/buildpacks/debian_squeeze +0 -2
- data/lib/pkgr/data/distributions/debian/buildpacks/ubuntu_lucid +0 -2
- data/lib/pkgr/data/distributions/debian/cron.d +0 -4
- data/lib/pkgr/data/distributions/debian/default.erb +0 -12
- data/lib/pkgr/data/distributions/debian/hooks/preinstall.sh +0 -9
- data/lib/pkgr/data/pkgr.yml +0 -32
- data/lib/pkgr/distributions/debian_squeeze.rb +0 -11
- data/lib/pkgr/distributions/debian_wheezy.rb +0 -11
- data/lib/pkgr/distributions/ubuntu_lucid.rb +0 -15
- data/lib/pkgr/distributions/ubuntu_precise.rb +0 -15
@@ -1,36 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'yaml'
|
4
|
-
|
5
|
-
config = YAML.load_file(::File.expand_path("../../config/pkgr.yml", __FILE__))
|
6
|
-
|
7
|
-
require ::File.expand_path("../../config/boot", __FILE__)
|
8
|
-
|
9
|
-
supported_commands = ["server", "rake", "console"]
|
10
|
-
command = ARGV.shift
|
11
|
-
|
12
|
-
case command
|
13
|
-
when "rake"
|
14
|
-
ENV['RACK_ENV'] ||= "production"
|
15
|
-
ARGV << "-f" << ::File.expand_path("../../Rakefile", __FILE__)
|
16
|
-
require 'rake'
|
17
|
-
Rake.application.run
|
18
|
-
when "console"
|
19
|
-
APP_PATH = ::File.expand_path('../../config/application', __FILE__)
|
20
|
-
require ::File.expand_path('../../config/boot', __FILE__)
|
21
|
-
ARGV.push("production") if ARGV.empty?
|
22
|
-
ARGV.unshift("console")
|
23
|
-
require 'rails/commands'
|
24
|
-
when "server"
|
25
|
-
require 'thin'
|
26
|
-
rackup_file = ::File.expand_path('../../config.ru', __FILE__)
|
27
|
-
argv = ARGV
|
28
|
-
argv << ["-R", rackup_file] unless ARGV.include?("-R")
|
29
|
-
argv << ["-p", "8000"] unless ARGV.include?("-p")
|
30
|
-
argv << ["-e", "production"] unless ARGV.include?("-e")
|
31
|
-
argv << ["--tag", "#{config['name']}-#{config['version']}"] unless ARGV.include?("--tag")
|
32
|
-
Thin::Runner.new(argv.flatten).run!
|
33
|
-
else
|
34
|
-
STDERR.puts "You must choose one of the following commands: #{supported_commands.inspect}"
|
35
|
-
exit(1)
|
36
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# This part of code is added by Pkgr, before the original content of the
|
2
|
-
# `config/boot.rb` file.
|
3
|
-
require 'rubygems'
|
4
|
-
|
5
|
-
# Attempts to use a vendored Bundler, if any
|
6
|
-
vendored_gems = File.expand_path(
|
7
|
-
'../../vendor/bundle/ruby/1.9.1/gems', __FILE__
|
8
|
-
)
|
9
|
-
|
10
|
-
vendored_bundler = Dir["#{vendored_gems}/bundler-*/lib"].sort.last
|
11
|
-
|
12
|
-
if !vendored_bundler.nil? && !$LOAD_PATH.include?(vendored_bundler)
|
13
|
-
$LOAD_PATH.unshift(vendored_bundler)
|
14
|
-
end
|
15
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
export HOME="<%= home %>"
|
2
|
-
export APP_NAME="<%= name %>"
|
3
|
-
export APP_GROUP="<%= group %>"
|
4
|
-
export APP_USER="<%= user %>"
|
5
|
-
|
6
|
-
for file in /etc/${APP_NAME}/conf.d/*; do
|
7
|
-
if [ -f $file ]; then . $file; fi
|
8
|
-
done
|
9
|
-
|
10
|
-
for file in ${HOME}/.profile.d/*.sh; do
|
11
|
-
if [ -f $file ]; then . $file; fi
|
12
|
-
done
|
data/lib/pkgr/data/pkgr.yml
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
version: 0.0.0
|
2
|
-
name:
|
3
|
-
description:
|
4
|
-
# The git reference from which to build the package:
|
5
|
-
git_ref: HEAD
|
6
|
-
# The list of configuration files taht you want to see in /etc/{{name}}/
|
7
|
-
config_files:
|
8
|
-
- pkgr.yml
|
9
|
-
- database.yml
|
10
|
-
# The target architecture of the server on which your app will be built (must
|
11
|
-
# be the same as the one on which it is deployed):
|
12
|
-
architecture: amd64
|
13
|
-
# The list of dependencies required for your app to correctly run:
|
14
|
-
debian_runtime_dependencies:
|
15
|
-
- ${shlibs:Depends}
|
16
|
-
- ${misc:Depends}
|
17
|
-
- ruby1.9.1-full
|
18
|
-
- git-core
|
19
|
-
- libxml2
|
20
|
-
- libxslt1.1
|
21
|
-
# The list of dependencies required for your app to be packaged (i.e.
|
22
|
-
# dependencies of your app's gems + dependencies required to build the
|
23
|
-
# package):
|
24
|
-
debian_build_dependencies:
|
25
|
-
- debhelper (>= 7)
|
26
|
-
- dpkg-dev
|
27
|
-
- ruby1.9.1-full
|
28
|
-
- libmysqlclient15-dev
|
29
|
-
- libxml2-dev
|
30
|
-
- libxslt-dev
|
31
|
-
- libsqlite3-dev
|
32
|
-
|