fpm-cookery 0.34.0 → 0.36.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3086c69abf17303cb1bd39d5745435e2166e28a7
4
- data.tar.gz: 4200c639a242f38313db74b31eb8231e749ea864
2
+ SHA256:
3
+ metadata.gz: 9d635234a7161b1b47ba35bf07f4a3c58209482d57ead1d2e7d42e59ead4090f
4
+ data.tar.gz: 15c95843c18e2b098236b68fa4249fad32387dfae68b92ae734087379179d337
5
5
  SHA512:
6
- metadata.gz: 0d85461efb89f476da92433f2394a6db4ecbfc09258018cdc7a4b4151118d663a2c52c19540ae006ad1b548bb6f2ca946fa90bc44f1e6d3e80fa50a31532e805
7
- data.tar.gz: f8550d9d07dfddaa4dd74d46f62294a66d35186c49fea36c95da77f7431870d25b8c3f8f93bee0da1cd87512b12ec7906b4abad7493bed1edd3297c9660f5cad
6
+ metadata.gz: b9c9ef894547aa17415134b1de01ba2cf4b594429f4d7a93fe24166bf0a1eed82961d1cdf155f16edb96907f4a9f36bc3517bae12e384c60fbd126daad953753
7
+ data.tar.gz: 79b01c1bb917e0ae2ab6e90c64a521d930d8e3d80512345b6df98ca82ce1ece074229eaff0044c39a8a451c79954b2b84966a9d440b827bbd978f771ae548c70
@@ -0,0 +1,24 @@
1
+ name: Ruby
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ ruby: ["2.4", "2.5", "2.6", "2.7", "3.0", "3.1"]
12
+
13
+ steps:
14
+ - uses: actions/checkout@v1
15
+ - name: Set up Ruby ${{ matrix.ruby }}
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: ${{ matrix.ruby }}
19
+ bundler-cache: true
20
+ - name: Build and test with Rake
21
+ run: |
22
+ gem install bundler
23
+ bundle install --jobs 4 --retry 3
24
+ bundle exec rake
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ # v0.36.0 (2022-07-13)
2
+ * Add Dockerfile for Ubuntu 18.04.
3
+ * Allow newer versions of Puppet (gmathes / #211)
4
+ * Fix compatibility issues with newer Ruby and newer dependencies. (#214)
5
+ * Add Ruby versions up to 3.1 to GitHub Action workflow.
6
+ * Switch default branch to `main`.
7
+
8
+ # v0.35.1 (2019-12-18)
9
+ * Fix default Docker image name
10
+
11
+ # v0.35.0 (2019-12-18)
12
+ * Add support for building packages inside Docker containers.
13
+
1
14
  # v0.34.0 (2019-06-01)
2
15
  * Use factor defaults for `platform` and `target` values. (FooBarQuaxx / #189)
3
16
  * Add `:username` and `:password` parameters to the SVN source handler. (tomeon / #191)
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # fpm-cookery - For building software
2
2
 
3
- [![Build Status](https://travis-ci.org/bernd/fpm-cookery.svg)](https://travis-ci.org/bernd/fpm-cookery)
3
+ ![Build Status](https://github.com/bernd/fpm-cookery/actions/workflows/ruby.yml/badge.svg)
4
4
 
5
5
  A tool for building software packages with
6
6
  [fpm](https://github.com/jordansissel/fpm).
@@ -0,0 +1,27 @@
1
+ FROM ubuntu:16.04
2
+
3
+ RUN apt-get update \
4
+ && apt-get install --no-install-recommends -y \
5
+ curl \
6
+ wget \
7
+ git \
8
+ ruby2.3-dev \
9
+ build-essential \
10
+ man-db \
11
+ unzip \
12
+ && gem install --no-ri --no-rdoc fpm-cookery \
13
+ && apt-get clean \
14
+ && rm -rf \
15
+ /tmp/* \
16
+ /root/.gem \
17
+ /var/cache/debconf/* \
18
+ /var/lib/gems/*/cache/* \
19
+ /var/lib/apt/lists/* \
20
+ /var/log/* \
21
+ /usr/share/X11 \
22
+ /usr/share/doc/*
23
+
24
+ COPY docker-entrypoint.sh /
25
+
26
+ ENTRYPOINT ["/docker-entrypoint.sh"]
27
+ CMD ["fpm-cook"]
@@ -0,0 +1,27 @@
1
+ FROM ubuntu:18.04
2
+
3
+ RUN apt-get update \
4
+ && apt-get install --no-install-recommends -y \
5
+ curl \
6
+ wget \
7
+ git \
8
+ ruby2.5-dev \
9
+ build-essential \
10
+ man-db \
11
+ unzip \
12
+ && gem install --no-ri --no-rdoc fpm-cookery \
13
+ && apt-get clean \
14
+ && rm -rf \
15
+ /tmp/* \
16
+ /root/.gem \
17
+ /var/cache/debconf/* \
18
+ /var/lib/gems/*/cache/* \
19
+ /var/lib/apt/lists/* \
20
+ /var/log/* \
21
+ /usr/share/X11 \
22
+ /usr/share/doc/*
23
+
24
+ COPY docker-entrypoint.sh /
25
+
26
+ ENTRYPOINT ["/docker-entrypoint.sh"]
27
+ CMD ["fpm-cook"]
@@ -0,0 +1,38 @@
1
+ #!/bin/bash
2
+
3
+ set -eo pipefail
4
+
5
+ if [ "$1" != "fpm-cook" ]; then
6
+ exec "$@"
7
+ fi
8
+
9
+ # Signal fpm-cook that we are already running inside a container to avoid
10
+ # trying to start another one.
11
+ export FPMC_INSIDE_DOCKER=true
12
+
13
+ if [ -x "/usr/bin/apt-get" ]; then
14
+ # Ubuntu/Debian containers use a custom apt config to remove archives
15
+ # after installing a package. We don't want that because it removes
16
+ # the possibility to cache the apt archive directory.
17
+ rm -f /etc/apt/apt.conf.d/docker-clean
18
+
19
+ # Make sure we have updated apt repositories. Container images usually
20
+ # have either no updated lists or they are outdated.
21
+ if [ -n "$FPMC_DEBUG" ]; then
22
+ apt-get update
23
+ else
24
+ apt-get update >/dev/null
25
+ fi
26
+ fi
27
+
28
+ # Remove existing temporary directories to ensure a full build
29
+ rm -rf tmp-build tmp-dest
30
+
31
+ shift
32
+ fpm-cook "$@"
33
+
34
+ if [ -n "$FPMC_UID" -a -n "$FPMC_GID" ]; then
35
+ # Change ownership to make sure the user that executed fpm-cook can
36
+ # modify created files.
37
+ chown -R ${FPMC_UID}:${FPMC_GID} cache pkg tmp-build tmp-dest
38
+ fi
data/docs/index.rst CHANGED
@@ -1,4 +1,4 @@
1
- .. fpm-cookery documentation master file, created by
1
+ .. fpm-cookery documentation main file, created by
2
2
  sphinx-quickstart on Sat Jul 25 11:02:45 2015.
3
3
  You can adapt this file completely to your liking, but it should at least
4
4
  contain the root `toctree` directive.
@@ -281,5 +281,5 @@ Examples
281
281
  --------
282
282
 
283
283
  See the `Redis recipe
284
- <https://github.com/bernd/fpm-cookery/tree/master/recipes/redis>`_ for an
284
+ <https://github.com/bernd/fpm-cookery/tree/main/recipes/redis>`_ for an
285
285
  example of fpm-cookery and Hiera in action.
data/fpm-cookery.gemspec CHANGED
@@ -24,10 +24,11 @@ Gem::Specification.new do |s|
24
24
  s.add_development_dependency "simplecov", "~> 0.11"
25
25
  s.add_runtime_dependency "fpm", "~> 1.1"
26
26
  s.add_runtime_dependency "facter"
27
- s.add_runtime_dependency "puppet", ">= 3.4", "< 6.0"
28
- s.add_runtime_dependency "addressable", "~> 2.3.8"
27
+ s.add_runtime_dependency "puppet", ">= 3.4", "< 8.0"
28
+ s.add_runtime_dependency "addressable", "~> 2.8"
29
29
  s.add_runtime_dependency "systemu"
30
- s.add_runtime_dependency "json", ">= 1.7.7", "< 2.0"
31
- s.add_runtime_dependency "json_pure", ">= 1.7.7", "< 2.0"
30
+ s.add_runtime_dependency "json", "~> 2.6"
31
+ s.add_runtime_dependency "json_pure", "~> 2.6"
32
32
  s.add_runtime_dependency "safe_yaml", "~> 1.0.4"
33
+ s.add_runtime_dependency "uri-ssh_git", "~> 2.0"
33
34
  end
@@ -2,6 +2,7 @@ require 'fpm/cookery/book_hook'
2
2
  require 'fpm/cookery/recipe'
3
3
  require 'fpm/cookery/facts'
4
4
  require 'fpm/cookery/packager'
5
+ require 'fpm/cookery/docker_packager'
5
6
  require 'fpm/cookery/chain_packager'
6
7
  require 'fpm/cookery/omnibus_packager'
7
8
  require 'fpm/cookery/log'
@@ -36,6 +37,20 @@ module FPM
36
37
  option '--vendor-delimiter', 'DELIMITER', 'vendor delimiter for version string',
37
38
  :attribute_name => 'vendor_delimiter'
38
39
 
40
+ # Docker related flags
41
+ option '--docker', :flag, 'Execute fpm-cookery inside a Docker container',
42
+ :attribute_name => 'docker'
43
+ option '--docker-bin', 'BINARY', 'Docker binary to use',
44
+ :attribute_name => 'docker_bin'
45
+ option '--docker-image', 'IMAGE-NAME', 'Docker image to use',
46
+ :attribute_name => 'docker_image'
47
+ option '--docker-keep-container', :flag, 'Keep Docker container after build (e.g. to debug issues)',
48
+ :attribute_name => 'docker_keep_container'
49
+ option '--docker-cache', 'PATHS', 'Container paths to cache (can be a comma separated list)',
50
+ :attribute_name => 'docker_cache'
51
+ option '--dockerfile', 'PATHS', 'The Dockerfile to use for a custom container',
52
+ :attribute_name => 'dockerfile'
53
+
39
54
  class Command < self
40
55
  def self.add_recipe_parameter!
41
56
  parameter '[RECIPE]', 'the recipe file', :default => 'recipe.rb'
@@ -116,7 +131,10 @@ module FPM
116
131
  add_recipe_parameter!
117
132
 
118
133
  def exec(config, recipe, packager)
119
- if recipe.omnibus_package == true
134
+ # Don't try to launch a new container if we are already running inside one
135
+ if (config.docker == true or recipe.docker == true) and ENV['FPMC_INSIDE_DOCKER'].nil?
136
+ FPM::Cookery::DockerPackager.new(recipe, config).run
137
+ elsif recipe.omnibus_package == true
120
138
  FPM::Cookery::OmnibusPackager.new(packager, config).run
121
139
  elsif recipe.chain_package == true
122
140
  FPM::Cookery::ChainPackager.new(packager, config).run
@@ -146,7 +164,9 @@ module FPM
146
164
  add_recipe_parameter!
147
165
 
148
166
  def exec(config, recipe, packager)
149
- if recipe.omnibus_package == true
167
+ if config.docker == true
168
+ # Nothing to do!
169
+ elsif recipe.omnibus_package == true
150
170
  FPM::Cookery::OmnibusPackager.new(packager, config).install_build_deps
151
171
  elsif recipe.chain_package == true
152
172
  FPM::Cookery::ChainPackager.new(packager, config).install_build_deps
@@ -8,7 +8,8 @@ module FPM
8
8
  :color, :debug, :target, :platform, :maintainer, :vendor,
9
9
  :skip_package, :keep_destdir, :dependency_check, :quiet,
10
10
  :tmp_root, :pkg_dir, :cache_dir, :data_dir, :hiera_config,
11
- :vendor_delimiter
11
+ :vendor_delimiter, :docker, :docker_image, :docker_keep_container,
12
+ :docker_cache, :docker_bin, :dockerfile
12
13
  ].freeze
13
14
 
14
15
  DEFAULTS = {
@@ -17,7 +18,13 @@ module FPM
17
18
  :dependency_check => true,
18
19
  :skip_package => false,
19
20
  :keep_destdir => false,
20
- :quiet => false
21
+ :quiet => false,
22
+ :docker => false,
23
+ :docker_image => nil,
24
+ :docker_keep_container => false,
25
+ :docker_cache => nil,
26
+ :docker_bin => 'docker',
27
+ :dockerfile => 'Dockerfile'
21
28
  }.freeze
22
29
 
23
30
  def self.load_file(paths)
@@ -0,0 +1,109 @@
1
+ require 'digest/sha1'
2
+ require 'fileutils'
3
+ require 'pathname'
4
+
5
+ require 'fpm/cookery/version'
6
+ require 'fpm/cookery/facts'
7
+ require 'fpm/cookery/packager'
8
+ require 'fpm/cookery/exceptions'
9
+
10
+ # Runs the package creation inside a Docker container.
11
+ module FPM
12
+ module Cookery
13
+ class DockerPackager
14
+ include FPM::Cookery::Utils
15
+
16
+ attr_reader :packager, :recipe, :config
17
+
18
+ def initialize(recipe, config)
19
+ @recipe = recipe
20
+ @config = config
21
+ end
22
+
23
+ def run
24
+ recipe_dir = File.dirname(recipe.filename)
25
+
26
+ # The cli settings should have precendence
27
+ image_name = config.docker_image || recipe.docker_image
28
+ cache_paths = get_cache_paths
29
+ docker_bin = config.docker_bin.nil? || config.docker_bin.empty? ? 'docker' : config.docker_bin
30
+ dockerfile = get_dockerfile(recipe_dir)
31
+
32
+ if File.exist?(dockerfile)
33
+ image_name = "local/fpm-cookery/#{File.basename(recipe_dir)}:latest"
34
+ Log.info "Building custom Docker image #{image_name} from #{dockerfile}"
35
+ build_cmd = [
36
+ config.docker_bin, 'build',
37
+ '-f', dockerfile,
38
+ '-t', image_name,
39
+ '--force-rm',
40
+ '.'
41
+ ].compact.flatten.join(' ')
42
+ sh build_cmd
43
+ else
44
+ Log.warn "File #{dockerfile} does not exist - not building a custom Docker image"
45
+ end
46
+
47
+ if image_name.nil? || image_name.empty?
48
+ image_name = "fpmcookery/#{FPM::Cookery::Facts.platform}-#{FPM::Cookery::Facts.osrelease}:#{FPM::Cookery::VERSION}"
49
+ end
50
+
51
+ Log.info "Building #{recipe.name}-#{recipe.version} inside a Docker container using image #{image_name}"
52
+ Log.info "Mounting #{recipe_dir} as /recipe"
53
+
54
+ cmd = [
55
+ config.docker_bin, "run", "-ti",
56
+ "--name", "fpm-cookery-build-#{File.basename(recipe_dir)}",
57
+ config.docker_keep_container ? nil : "--rm",
58
+ "-e", "FPMC_UID=#{Process.uid}",
59
+ "-e", "FPMC_GID=#{Process.gid}",
60
+ config.debug ? ["-e", "FPMC_DEBUG=true"] : nil,
61
+ build_cache_mounts(cache_paths),
62
+ "-v", "#{recipe_dir}:/recipe",
63
+ "-w", "/recipe",
64
+ image_name,
65
+ "fpm-cook", "package",
66
+ config.debug ? '-D' : nil,
67
+ File.basename(recipe.filename)
68
+ ].compact.flatten.join(' ')
69
+
70
+
71
+ Log.debug "Running: #{cmd}"
72
+ begin
73
+ sh cmd
74
+ rescue => e
75
+ Log.debug e
76
+ end
77
+ end
78
+
79
+ private
80
+
81
+ def get_dockerfile(recipe_dir)
82
+ path = if config.dockerfile.nil? || config.dockerfile.empty?
83
+ Pathname.new(recipe.dockerfile)
84
+ else
85
+ Pathname.new(config.dockerfile)
86
+ end
87
+
88
+ path.absolute? ? path.to_s : File.join(recipe_dir, path.to_s)
89
+ end
90
+
91
+ def get_cache_paths
92
+ if config.docker_cache.nil? || config.docker_cache.empty?
93
+ recipe.docker_cache
94
+ else
95
+ config.docker_cache.split(',').select do |path|
96
+ !path.empty?
97
+ end
98
+ end
99
+ end
100
+
101
+ def build_cache_mounts(cache_paths)
102
+ cache_paths.map do |path|
103
+ next if path.nil? || path.empty?
104
+ "-v #{recipe.cachedir}/docker/#{Digest::SHA256.hexdigest(path)}:#{path}"
105
+ end
106
+ end
107
+ end
108
+ end
109
+ end
@@ -24,11 +24,11 @@ module FPM
24
24
  end
25
25
  end
26
26
 
27
- def merge(other)
27
+ def merge(other = {})
28
28
  super(self.class[other])
29
29
  end
30
30
 
31
- def merge!(other)
31
+ def merge!(other = {})
32
32
  super(self.class[other])
33
33
  end
34
34
 
@@ -21,7 +21,7 @@ module FPM
21
21
  end
22
22
 
23
23
  def lsbcodename
24
- @lsbcodename ||= value(:lsbcodename)
24
+ @lsbcodename ||= value(:lsbcodename) || value(:lsbdistcodename)
25
25
  end
26
26
 
27
27
  def osmajorrelease
@@ -34,12 +34,12 @@ module FPM
34
34
  :revision, :section, :sha1, :sha256, :sha512, :spec, :vendor, :version,
35
35
  :pre_install, :post_install, :pre_uninstall, :post_uninstall,
36
36
  :license, :omnibus_package, :omnibus_dir, :chain_package,
37
- :default_prefix
37
+ :default_prefix, :docker, :docker_image, :dockerfile
38
38
 
39
39
  attr_rw_list :build_depends, :config_files, :conflicts, :depends,
40
40
  :exclude, :patches, :provides, :replaces, :omnibus_recipes,
41
41
  :omnibus_additional_paths, :chain_recipes,
42
- :directories
42
+ :directories, :docker_cache
43
43
 
44
44
  attr_rw_hash :fpm_attributes, :environment
45
45
 
@@ -237,14 +237,14 @@ module FPM
237
237
  }
238
238
  end
239
239
 
240
- def applicator(method)
240
+ def applicator(method, &block)
241
241
  if (result = lookup(method)).nil?
242
242
  Log.debug("No result for `#{method}'")
243
243
  return
244
244
  end
245
245
 
246
246
  Log.debug("Setting `#{method}' to `#{result}'")
247
- Proc.new.call(result)
247
+ block.call(result)
248
248
  end
249
249
  end
250
250
 
@@ -1,4 +1,5 @@
1
1
  require 'addressable/uri'
2
+ require 'uri/ssh_git'
2
3
 
3
4
  module FPM
4
5
  module Cookery
@@ -7,7 +8,11 @@ module FPM
7
8
 
8
9
  def initialize(url, options = nil)
9
10
  options ||= {}
10
- @url = Addressable::URI.parse(url.to_s)
11
+ begin
12
+ @url = Addressable::URI.parse(url.to_s)
13
+ rescue Addressable::URI::InvalidURIError
14
+ @url = URI::SshGit.parse(url.to_s)
15
+ end
11
16
  @provider = options[:with]
12
17
  @options = options
13
18
  end
@@ -22,7 +27,7 @@ module FPM
22
27
 
23
28
  # If the Addressable::URI is empty, there's nothing to fetch
24
29
  def fetchable?
25
- !@url.empty?
30
+ !@url.to_s.empty?
26
31
  end
27
32
 
28
33
  def url
@@ -1,5 +1,5 @@
1
1
  module FPM
2
2
  module Cookery
3
- VERSION = '0.34.0'
3
+ VERSION = '0.36.0'
4
4
  end
5
5
  end
data/spec/config_spec.rb CHANGED
@@ -165,7 +165,13 @@ describe 'Config' do
165
165
  :skip_package => false,
166
166
  :keep_destdir => false,
167
167
  :dependency_check => true,
168
- :quiet => false
168
+ :quiet => false,
169
+ :docker => false,
170
+ :docker_image => nil,
171
+ :docker_keep_container => false,
172
+ :docker_cache => nil,
173
+ :docker_bin => 'docker',
174
+ :dockerfile => 'Dockerfile'
169
175
  })
170
176
  end
171
177
  end
data/spec/facts_spec.rb CHANGED
@@ -31,11 +31,11 @@ describe "Facts" do
31
31
  end
32
32
  end
33
33
 
34
- context "where lsbcodename is not present" do
35
- include_context "mock facts", { :lsbcodename => nil }
34
+ context "where lsbcodename is not present but lsbdistcodename is" do
35
+ include_context "mock facts", { :lsbcodename => nil, :lsbdistcodename => 'trusty' }
36
36
 
37
37
  it "returns nil" do
38
- expect(FPM::Cookery::Facts.lsbcodename).to be_nil
38
+ expect(FPM::Cookery::Facts.lsbcodename).to eq :trusty
39
39
  end
40
40
  end
41
41
  end
@@ -3,7 +3,7 @@ description: >
3
3
  For testing purposes on %{scope("platform")} only - you've been warned ;)
4
4
  version: 1.0.2
5
5
  source:
6
- - http://www.dummy-url.com/archive/%{hiera("name")}-%{hiera("version")}.tar.gz
6
+ - http://www.example.com/archive/%{hiera("name")}-%{hiera("version")}.tar.gz
7
7
  - :with: :git
8
8
 
9
9
  environment:
@@ -15,12 +15,12 @@ shared_examples 'attribute registration' do |attr_method, registry_method|
15
15
  extend FPM::Cookery::InheritableAttr
16
16
 
17
17
  instance_eval %Q{
18
- #{attr_method} :dummy_attr
18
+ #{attr_method} :example_attr
19
19
  }
20
20
  end
21
21
 
22
22
  expect(klass).to respond_to(registry_method)
23
- expect(klass.send(registry_method)).to include(:dummy_attr)
23
+ expect(klass.send(registry_method)).to include(:example_attr)
24
24
  end
25
25
  end
26
26
  end
@@ -30,7 +30,7 @@ shared_context 'class inheritance' do
30
30
  let(:subklass) { Class.new(superklass) }
31
31
  end
32
32
 
33
- shared_examples 'attribute inheritance' do |attr_method, default_value, attr_name = :dummy_attr|
33
+ shared_examples 'attribute inheritance' do |attr_method, default_value, attr_name = :example_attr|
34
34
  # A default implementation. Useful for +.attr_rw+, but should probably be
35
35
  # overridden for the other DSL methods.
36
36
  let(:attr_setter) {
@@ -74,7 +74,7 @@ shared_examples 'attribute inheritance' do |attr_method, default_value, attr_nam
74
74
  end
75
75
  end
76
76
 
77
- shared_context 'inheritable attributes' do |attr_method, default_value, attr_name = :dummy_attr|
77
+ shared_context 'inheritable attributes' do |attr_method, default_value, attr_name = :example_attr|
78
78
  include_context 'class inheritance'
79
79
  include_examples 'attribute inheritance', attr_method, default_value
80
80
 
data/spec/recipe_spec.rb CHANGED
@@ -99,6 +99,24 @@ describe "Recipe" do
99
99
  end
100
100
  end
101
101
 
102
+ describe "#docker" do
103
+ it "can be set" do
104
+ check_attribute(:docker, true)
105
+ end
106
+ end
107
+
108
+ describe "#docker_image" do
109
+ it "can be set" do
110
+ check_attribute(:docker_image, "hello:world")
111
+ end
112
+ end
113
+
114
+ describe "#dockerfile" do
115
+ it "can be set" do
116
+ check_attribute(:dockerfile, "Dockefile")
117
+ end
118
+ end
119
+
102
120
  describe "#license" do
103
121
  it "can be set" do
104
122
  check_attribute(:license, 'MIT')
@@ -305,6 +323,7 @@ describe "Recipe" do
305
323
  spec_recipe_attribute_list(:omnibus_recipes, %w{one two})
306
324
  spec_recipe_attribute_list(:chain_recipes, %w{one two})
307
325
  spec_recipe_attribute_list(:directories, %w{one two})
326
+ spec_recipe_attribute_list(:docker_cache, %w{one two})
308
327
 
309
328
  describe ".source" do
310
329
  it "sets a source url" do
data/spec/source_spec.rb CHANGED
@@ -52,6 +52,8 @@ describe "Source" do
52
52
 
53
53
  expect(source.url).to eq('git@github.com:foo/bar.git')
54
54
  expect(source.path).to eq('foo/bar.git')
55
+ expect(source.local?).to eq(false)
56
+ expect(source.fetchable?).to eq(true)
55
57
  end
56
58
  end
57
59
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fpm-cookery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.0
4
+ version: 0.36.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernd Ahlers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-01 00:00:00.000000000 Z
11
+ date: 2022-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -103,7 +103,7 @@ dependencies:
103
103
  version: '3.4'
104
104
  - - "<"
105
105
  - !ruby/object:Gem::Version
106
- version: '6.0'
106
+ version: '8.0'
107
107
  type: :runtime
108
108
  prerelease: false
109
109
  version_requirements: !ruby/object:Gem::Requirement
@@ -113,21 +113,21 @@ dependencies:
113
113
  version: '3.4'
114
114
  - - "<"
115
115
  - !ruby/object:Gem::Version
116
- version: '6.0'
116
+ version: '8.0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: addressable
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: 2.3.8
123
+ version: '2.8'
124
124
  type: :runtime
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: 2.3.8
130
+ version: '2.8'
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: systemu
133
133
  requirement: !ruby/object:Gem::Requirement
@@ -146,42 +146,30 @@ dependencies:
146
146
  name: json
147
147
  requirement: !ruby/object:Gem::Requirement
148
148
  requirements:
149
- - - ">="
150
- - !ruby/object:Gem::Version
151
- version: 1.7.7
152
- - - "<"
149
+ - - "~>"
153
150
  - !ruby/object:Gem::Version
154
- version: '2.0'
151
+ version: '2.6'
155
152
  type: :runtime
156
153
  prerelease: false
157
154
  version_requirements: !ruby/object:Gem::Requirement
158
155
  requirements:
159
- - - ">="
160
- - !ruby/object:Gem::Version
161
- version: 1.7.7
162
- - - "<"
156
+ - - "~>"
163
157
  - !ruby/object:Gem::Version
164
- version: '2.0'
158
+ version: '2.6'
165
159
  - !ruby/object:Gem::Dependency
166
160
  name: json_pure
167
161
  requirement: !ruby/object:Gem::Requirement
168
162
  requirements:
169
- - - ">="
170
- - !ruby/object:Gem::Version
171
- version: 1.7.7
172
- - - "<"
163
+ - - "~>"
173
164
  - !ruby/object:Gem::Version
174
- version: '2.0'
165
+ version: '2.6'
175
166
  type: :runtime
176
167
  prerelease: false
177
168
  version_requirements: !ruby/object:Gem::Requirement
178
169
  requirements:
179
- - - ">="
180
- - !ruby/object:Gem::Version
181
- version: 1.7.7
182
- - - "<"
170
+ - - "~>"
183
171
  - !ruby/object:Gem::Version
184
- version: '2.0'
172
+ version: '2.6'
185
173
  - !ruby/object:Gem::Dependency
186
174
  name: safe_yaml
187
175
  requirement: !ruby/object:Gem::Requirement
@@ -196,6 +184,20 @@ dependencies:
196
184
  - - "~>"
197
185
  - !ruby/object:Gem::Version
198
186
  version: 1.0.4
187
+ - !ruby/object:Gem::Dependency
188
+ name: uri-ssh_git
189
+ requirement: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - "~>"
192
+ - !ruby/object:Gem::Version
193
+ version: '2.0'
194
+ type: :runtime
195
+ prerelease: false
196
+ version_requirements: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - - "~>"
199
+ - !ruby/object:Gem::Version
200
+ version: '2.0'
199
201
  description: A tool for building software packages with fpm.
200
202
  email:
201
203
  - bernd@tuneafish.de
@@ -204,14 +206,17 @@ executables:
204
206
  extensions: []
205
207
  extra_rdoc_files: []
206
208
  files:
209
+ - ".github/workflows/ruby.yml"
207
210
  - ".gitignore"
208
- - ".travis.yml"
209
211
  - CHANGELOG.md
210
212
  - Gemfile
211
213
  - LICENSE
212
214
  - README.md
213
215
  - Rakefile
214
216
  - bin/fpm-cook
217
+ - docker/Dockerfile.ubuntu-16.04
218
+ - docker/Dockerfile.ubuntu-18.04
219
+ - docker/docker-entrypoint.sh
215
220
  - docs/.gitignore
216
221
  - docs/Makefile
217
222
  - docs/conf.py
@@ -225,6 +230,7 @@ files:
225
230
  - lib/fpm/cookery/cli.rb
226
231
  - lib/fpm/cookery/config.rb
227
232
  - lib/fpm/cookery/dependency_inspector.rb
233
+ - lib/fpm/cookery/docker_packager.rb
228
234
  - lib/fpm/cookery/environment.rb
229
235
  - lib/fpm/cookery/exceptions.rb
230
236
  - lib/fpm/cookery/facts.rb
@@ -356,8 +362,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
356
362
  - !ruby/object:Gem::Version
357
363
  version: '0'
358
364
  requirements: []
359
- rubyforge_project: fpm-cookery
360
- rubygems_version: 2.5.2.1
365
+ rubygems_version: 3.3.5
361
366
  signing_key:
362
367
  specification_version: 4
363
368
  summary: A tool for building software packages with fpm.
data/.travis.yml DELETED
@@ -1,15 +0,0 @@
1
- sudo: false
2
- cache: bundler
3
- script: bundle exec rake spec
4
- rvm:
5
- - 1.9.3
6
- - 2.0.0
7
- - 2.1.10
8
- - 2.2.5
9
- - 2.3.1
10
- - 2.4.1
11
- - ruby-head
12
-
13
- matrix:
14
- allow_failures:
15
- - rvm: ruby-head