vanagon 0.25.0 → 0.26.2

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
2
  SHA256:
3
- metadata.gz: 5c5942e2eb5cb60b0d61c7bb691fd41796d06a34f6ab4ad6558d12e2b368f04c
4
- data.tar.gz: 2c169e9c4fa08538310e90e18dc4336ecd98596f6b6b47a8c86efe20c0bc5a16
3
+ metadata.gz: 710560a9b3a7ca3a3161c658eb4b6422870bb226bbff4396f9749546488bccb0
4
+ data.tar.gz: 5bcc31eccdad2d206662b7dc99624cb7b10ff79186730a947696deb3af2957ba
5
5
  SHA512:
6
- metadata.gz: ca9a2db8658afe0d71ac7300e07edb6f6b874c0e8ff753f03536da144b8070ac41f7389eaacf1067e1f0ab0937a253fc88f1e3011b2383dbba7acb3056233020
7
- data.tar.gz: 67f11f91d870a2fce2890a5115947729b4f590c581932a71317ac936de74826ecc3f7a213540b34e34f71e51e075bb127421e2e8a1aa778bb6748046a702521a
6
+ metadata.gz: 7015b26ff75b4589b79bdcb88401366e8e6e58f9e8dfc7cef50a519b6f8f5f2e855936874509785db1923d7b227531bd767f958ad229dcd07e209564ba59a122
7
+ data.tar.gz: 93bfbc527dc52f69f217902e53e71738928f196b08340ad422f5fc8d378be9965e61b7ee6b673d8ba1c66e54a0213f6572bff67003d56ab43405933b9b55a1aa
@@ -36,7 +36,7 @@ module BasicSubmodules
36
36
  # @option options [Boolean] :recursive recurse into nested submodules
37
37
  # @return options [String] any output produced by `git` when submodules are initialized
38
38
  def update_submodules(**options)
39
- self.lib.update_submodules(options)
39
+ self.lib.update_submodules(**options)
40
40
  end
41
41
  end
42
42
 
@@ -50,7 +50,7 @@ class Vanagon
50
50
 
51
51
  def valid_remote?(url, timeout = 0)
52
52
  Timeout.timeout(timeout) do
53
- Vanagon::Utilities.local_command("git ls-remote #{url} > /dev/null 2>&1")
53
+ Vanagon::Utilities.local_command("git ls-remote --heads #{url} > /dev/null 2>&1")
54
54
  return false unless $?.exitstatus.zero?
55
55
  return true
56
56
  end
@@ -258,7 +258,7 @@ class Vanagon
258
258
  mirrors.to_a.shuffle.each do |mirror|
259
259
  begin
260
260
  VanagonLogger.info %(Attempting to fetch from mirror URL "#{mirror}")
261
- @source = Vanagon::Component::Source.source(mirror, options)
261
+ @source = Vanagon::Component::Source.source(mirror, **options)
262
262
  return true if source.fetch
263
263
  rescue SocketError
264
264
  # SocketError means that there was no DNS/name resolution
@@ -281,7 +281,7 @@ class Vanagon
281
281
  # or False otherwise
282
282
  def fetch_url(options)
283
283
  VanagonLogger.info %(Attempting to fetch from canonical URL "#{url}")
284
- @source = Vanagon::Component::Source.source(url, options)
284
+ @source = Vanagon::Component::Source.source(url, **options)
285
285
  # Explicitly coerce the return value of #source.fetch,
286
286
  # because each subclass of Vanagon::Component::Source returns
287
287
  # an inconsistent value if #fetch is successful.
@@ -0,0 +1,20 @@
1
+ platform "osx-12-x86_64" do |plat|
2
+ plat.servicetype "launchd"
3
+ plat.servicedir "/Library/LaunchDaemons"
4
+ plat.codename "monterey"
5
+ plat.provision_with "export HOMEBREW_NO_EMOJI=true"
6
+ plat.provision_with "export HOMEBREW_VERBOSE=true"
7
+ plat.provision_with "sudo dscl . -create /Users/test"
8
+ plat.provision_with "sudo dscl . -create /Users/test UserShell /bin/bash"
9
+ plat.provision_with "sudo dscl . -create /Users/test UniqueID 1001"
10
+ plat.provision_with "sudo dscl . -create /Users/test PrimaryGroupID 1000"
11
+ plat.provision_with "sudo dscl . -create /Users/test NFSHomeDirectory /Users/test"
12
+ plat.provision_with "sudo dscl . -passwd /Users/test password"
13
+ plat.provision_with "sudo dscl . -merge /Groups/admin GroupMembership test"
14
+ plat.provision_with "echo 'test ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/username"
15
+ plat.provision_with "mkdir -p /etc/homebrew"
16
+ plat.provision_with "cd /etc/homebrew"
17
+ plat.provision_with %Q(su test -c 'echo | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"')
18
+ plat.provision_with "sudo chown -R test:admin /Users/test/"
19
+ plat.vmpooler_template "macos-12-x86_64"
20
+ end
@@ -4,8 +4,14 @@ platform "ubuntu-20.04-amd64" do |plat|
4
4
  plat.servicetype "systemd"
5
5
  plat.codename "focal"
6
6
 
7
+ # Temporary fix to add focal-updates.list repo file because it is missing from the vmpooler image
8
+ plat.provision_with "echo 'deb https://artifactory.delivery.puppetlabs.net/artifactory/ubuntu__remote focal-updates main restricted universe multiverse' > /etc/apt/sources.list.d/focal-updates.list;
9
+ echo 'deb-src https://artifactory.delivery.puppetlabs.net/artifactory/ubuntu__remote focal-updates main restricted universe multiverse' >> /etc/apt/sources.list.d/focal-updates.list"
10
+
7
11
  packages = %w(build-essential devscripts make quilt pkg-config debhelper rsync fakeroot cmake)
12
+
8
13
  plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends #{packages.join(' ')}"
14
+ plat.provision_with "curl https://apt.puppet.com/DEB-GPG-KEY-puppet-20250406 | apt-key add -"
9
15
  plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
10
16
  plat.vmpooler_template "ubuntu-2004-x86_64"
11
17
  end
@@ -5,7 +5,7 @@ describe "Vanagon::Component::Source::Git" do
5
5
  before :all do
6
6
  @klass = Vanagon::Component::Source::Git
7
7
  # This repo will not be cloned over the network
8
- @url = 'git://github.com/puppetlabs/facter.git'
8
+ @url = 'https://github.com/puppetlabs/facter.git'
9
9
  # This path will not be created on disk
10
10
  @local_url = "file://#{Dir.tmpdir}/puppet-agent"
11
11
  @ref_tag = 'refs/tags/2.2.0'
@@ -8,7 +8,6 @@ describe "Vanagon::Component::Source" do
8
8
  let(:unrecognized_scheme) { "abcd" }
9
9
  let(:invalid_scheme) { "abcd|things" }
10
10
 
11
- let(:public_git) { "git://github.com/abcd/things" }
12
11
  let(:private_git) { "git@github.com:abcd/things" }
13
12
  let(:http_git) { "http://github.com/abcd/things" }
14
13
  let(:https_git) { "https://github.com/abcd/things" }
@@ -53,12 +52,6 @@ describe "Vanagon::Component::Source" do
53
52
  .to eq Vanagon::Component::Source::Git
54
53
  end
55
54
 
56
- it "returns a Git object for git:// repositories" do
57
- component_source = klass.source(public_git, ref: ref, workdir: workdir)
58
- expect(component_source.url.to_s).to eq public_git
59
- expect(component_source.class).to eq Vanagon::Component::Source::Git
60
- end
61
-
62
55
  it "returns a Git object for http:// repositories" do
63
56
  expect(klass.source(http_git, ref: ref, workdir: workdir).class)
64
57
  .to eq Vanagon::Component::Source::Git
@@ -74,7 +67,6 @@ describe "Vanagon::Component::Source" do
74
67
  expect(component_source.url.to_s).to eq 'http://github.com/abcd/things'
75
68
  expect(component_source.class).to eq Vanagon::Component::Source::Git
76
69
  end
77
-
78
70
  end
79
71
 
80
72
  context "takes a HTTP/HTTPS file" do
@@ -258,12 +258,13 @@ describe "Vanagon::Component" do
258
258
  describe '#force_version' do
259
259
  let(:source) {
260
260
  allow(File).to receive(:realpath).and_return('/this/is/a/test')
261
- Vanagon::Component::Source::Git.new('git://github.com/puppetlabs/facter', workdir: '/this/is/a/test')
261
+ WebMock.allow_net_connect!
262
+ Vanagon::Component::Source::Git.new('https://github.com/puppetlabs/facter', workdir: '/this/is/a/test')
262
263
  }
263
264
 
264
265
  let(:component) {
265
266
  Vanagon::Component.new('force-version-test', {}, {}).tap do |comp|
266
- comp.url = 'git://github.com/puppetlabs/facter'
267
+ comp.url = 'https://github.com/puppetlabs/facter'
267
268
  comp.source = source
268
269
  end
269
270
  }
@@ -1,5 +1,4 @@
1
- begin
2
- require 'aws-sdk'
1
+ begin require 'aws-sdk'
3
2
  rescue LoadError
4
3
  $stderr.puts "Unable to load AWS SDK; skipping optional EC2 engine spec tests"
5
4
  end
@@ -28,7 +27,10 @@ if defined? ::Aws
28
27
 
29
28
  it 'returns "ec2" name' do
30
29
  stub_request(:get, "http://169.254.169.254/latest/meta-data/iam/security-credentials/").
30
+ to_return(status: 200, body: "", headers: {})
31
+ stub_request(:put, "http://169.254.169.254/latest/api/token").
31
32
  to_return(status: 200, body: "", headers: {})
33
+
32
34
  expect(Vanagon::Engine::Ec2.new(platform_ec2).name).to eq('ec2')
33
35
  end
34
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanagon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0
4
+ version: 0.26.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-24 00:00:00.000000000 Z
11
+ date: 2022-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt
@@ -171,6 +171,7 @@ files:
171
171
  - lib/vanagon/platform/defaults/fedora-34-x86_64.rb
172
172
  - lib/vanagon/platform/defaults/osx-10.15-x86_64.rb
173
173
  - lib/vanagon/platform/defaults/osx-11-x86_64.rb
174
+ - lib/vanagon/platform/defaults/osx-12-x86_64.rb
174
175
  - lib/vanagon/platform/defaults/redhatfips-7-x86_64.rb
175
176
  - lib/vanagon/platform/defaults/redhatfips-8-x86_64.rb
176
177
  - lib/vanagon/platform/defaults/sles-12-x86_64.rb
@@ -312,9 +313,12 @@ require_paths:
312
313
  - lib
313
314
  required_ruby_version: !ruby/object:Gem::Requirement
314
315
  requirements:
315
- - - "~>"
316
+ - - ">="
316
317
  - !ruby/object:Gem::Version
317
318
  version: '2.3'
319
+ - - "<"
320
+ - !ruby/object:Gem::Version
321
+ version: '4'
318
322
  required_rubygems_version: !ruby/object:Gem::Requirement
319
323
  requirements:
320
324
  - - ">="
@@ -327,41 +331,41 @@ specification_version: 3
327
331
  summary: All of your packages will fit into this van with this one simple trick.
328
332
  test_files:
329
333
  - spec/lib/makefile_spec.rb
330
- - spec/lib/vanagon/utilities/shell_utilities_spec.rb
331
- - spec/lib/vanagon/utilities/extra_files_signer_spec.rb
332
- - spec/lib/vanagon/project_spec.rb
333
- - spec/lib/vanagon/component_spec.rb
334
- - spec/lib/vanagon/extensions/set/json_spec.rb
334
+ - spec/lib/vanagon/common/user_spec.rb
335
+ - spec/lib/vanagon/common/pathname_spec.rb
336
+ - spec/lib/vanagon/project/dsl_spec.rb
337
+ - spec/lib/vanagon/platform_spec.rb
338
+ - spec/lib/vanagon/driver_spec.rb
339
+ - spec/lib/vanagon/cli_spec.rb
335
340
  - spec/lib/vanagon/extensions/ostruct/json_spec.rb
336
341
  - spec/lib/vanagon/extensions/string_spec.rb
337
- - spec/lib/vanagon/component/source/local_spec.rb
342
+ - spec/lib/vanagon/extensions/set/json_spec.rb
343
+ - spec/lib/vanagon/component_spec.rb
344
+ - spec/lib/vanagon/utilities_spec.rb
345
+ - spec/lib/vanagon/platform/windows_spec.rb
346
+ - spec/lib/vanagon/platform/solaris_11_spec.rb
347
+ - spec/lib/vanagon/platform/dsl_spec.rb
348
+ - spec/lib/vanagon/platform/deb_spec.rb
349
+ - spec/lib/vanagon/platform/osx_spec.rb
350
+ - spec/lib/vanagon/platform/rpm/aix_spec.rb
351
+ - spec/lib/vanagon/platform/solaris_10_spec.rb
352
+ - spec/lib/vanagon/platform/rpm_spec.rb
353
+ - spec/lib/vanagon/project_spec.rb
354
+ - spec/lib/vanagon/environment_spec.rb
355
+ - spec/lib/vanagon/utilities/shell_utilities_spec.rb
356
+ - spec/lib/vanagon/utilities/extra_files_signer_spec.rb
357
+ - spec/lib/vanagon/component/rules_spec.rb
358
+ - spec/lib/vanagon/component/dsl_spec.rb
338
359
  - spec/lib/vanagon/component/source/rewrite_spec.rb
339
- - spec/lib/vanagon/component/source/http_spec.rb
340
360
  - spec/lib/vanagon/component/source/git_spec.rb
361
+ - spec/lib/vanagon/component/source/http_spec.rb
362
+ - spec/lib/vanagon/component/source/local_spec.rb
341
363
  - spec/lib/vanagon/component/source_spec.rb
342
- - spec/lib/vanagon/component/dsl_spec.rb
343
- - spec/lib/vanagon/component/rules_spec.rb
344
- - spec/lib/vanagon/driver_spec.rb
345
- - spec/lib/vanagon/utilities_spec.rb
346
- - spec/lib/vanagon/cli_spec.rb
347
- - spec/lib/vanagon/common/pathname_spec.rb
348
- - spec/lib/vanagon/common/user_spec.rb
364
+ - spec/lib/vanagon/engine/hardware_spec.rb
365
+ - spec/lib/vanagon/engine/ec2_spec.rb
349
366
  - spec/lib/vanagon/engine/local_spec.rb
350
- - spec/lib/vanagon/engine/base_spec.rb
351
367
  - spec/lib/vanagon/engine/docker_spec.rb
352
- - spec/lib/vanagon/engine/always_be_scheduling_spec.rb
353
- - spec/lib/vanagon/engine/hardware_spec.rb
354
368
  - spec/lib/vanagon/engine/pooler_spec.rb
355
- - spec/lib/vanagon/engine/ec2_spec.rb
356
- - spec/lib/vanagon/platform_spec.rb
357
- - spec/lib/vanagon/environment_spec.rb
358
- - spec/lib/vanagon/platform/solaris_10_spec.rb
359
- - spec/lib/vanagon/platform/windows_spec.rb
360
- - spec/lib/vanagon/platform/rpm_spec.rb
361
- - spec/lib/vanagon/platform/rpm/aix_spec.rb
362
- - spec/lib/vanagon/platform/solaris_11_spec.rb
363
- - spec/lib/vanagon/platform/deb_spec.rb
364
- - spec/lib/vanagon/platform/dsl_spec.rb
365
- - spec/lib/vanagon/platform/osx_spec.rb
366
- - spec/lib/vanagon/project/dsl_spec.rb
369
+ - spec/lib/vanagon/engine/always_be_scheduling_spec.rb
370
+ - spec/lib/vanagon/engine/base_spec.rb
367
371
  - spec/lib/git/rev_list_spec.rb