vanagon 0.39.1 → 0.39.3

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: 4fe169a867215743c1234c1dc7611f6747040505867c94f05379e2e789e1ef22
4
- data.tar.gz: d663402a3ff359291b83a970e59ea8e9ce3b3101ba1a5d443e38b2372018ffa4
3
+ metadata.gz: 1ed8da3751c29acb70fea9bff9eb49263409066fe80d8b2d44554988768f02d7
4
+ data.tar.gz: a5f496b8508eee638db7cb797ae824f1b4beb5b046c67bba9efbd8f30de5faf7
5
5
  SHA512:
6
- metadata.gz: 1c58c68372fb374b8ea3d3d016473e32bc41d76632f42dd76bcdef99a375b8758198fd1b193231932746d8c219cce8131817a43bc4c2597f8be2477c52f02d3f
7
- data.tar.gz: 18e74e97521b6db5596d746ff6628f932bdfd0b69670987588063a8f6b688a4ce3e0bfcd9d2f6159af68f5f9c3a47a2336267a928e10e0adf35d3e7b4cdd9f29
6
+ metadata.gz: f3ad3013534e4f40bcc5972efac9397477ab3e636e391e669215d44b06130a7d8a379b6cc67c95127081e1c3b58167744f4db6a943d35ea0160312a875dc43b5
7
+ data.tar.gz: faecaa5fe8ec3dc0e8174f766bb0849f94ca8b3b35f70cb19faea91985365bda45da16820b3aadb27dcf0a101bec39f8b46075e6b65547b18cb1c0ddd45224e8
@@ -3,8 +3,11 @@ require 'vanagon/logger'
3
3
  require 'vanagon/component/source/http'
4
4
  require 'vanagon/component/source/git'
5
5
  require 'vanagon/component/source/local'
6
+ require 'vanagon/errors'
6
7
 
7
8
  class Vanagon
9
+ class InvalidSource < Vanagon::Error
10
+ end
8
11
  class Component
9
12
  class Source
10
13
  SUPPORTED_PROTOCOLS = %w[file http https git].freeze
@@ -55,8 +58,8 @@ class Vanagon
55
58
  end
56
59
 
57
60
  # Unknown source type!
58
- raise Vanagon::Error,
59
- "Unknown file type: '#{uri}'; cannot continue"
61
+ raise Vanagon::InvalidSource,
62
+ "Source is invalid or of an unknown type: '#{uri}'; cannot continue"
60
63
  end
61
64
 
62
65
  def determine_source_type(uri)
@@ -260,14 +260,21 @@ class Vanagon
260
260
  VanagonLogger.info %(Attempting to fetch from mirror URL "#{mirror}")
261
261
  @source = Vanagon::Component::Source.source(mirror, **options)
262
262
  return true if source.fetch
263
+ rescue Vanagon::InvalidSource
264
+ # This means that the URL was not a git repo or a valid downloadable file,
265
+ # which means either the URL is incorrect, or we don't have access to that
266
+ # resource. Return false, so that the pkg.url value can be used instead.
267
+ VanagonLogger.error %(Invalid source "#{mirror}")
263
268
  rescue SocketError
264
269
  # SocketError means that there was no DNS/name resolution
265
270
  # for whatever remote protocol the mirror tried to use.
266
271
  VanagonLogger.error %(Unable to resolve mirror URL "#{mirror}")
267
- rescue RuntimeError
272
+ rescue StandardError
268
273
  # Source retrieval does not consistently return a meaningful
269
274
  # namespaced error message, which means we're brute-force rescuing
270
- # RuntimeError. Not a good look, and we should fix this.
275
+ # StandardError. Also, we want to handle other unexpected things when
276
+ # we try reaching out to the URL, so that we can gracefully return
277
+ # false and fall back to fetching the pkg.url value instead.
271
278
  VanagonLogger.error %(Unable to retrieve mirror URL "#{mirror}")
272
279
  end
273
280
  end
@@ -0,0 +1,11 @@
1
+ platform "debian-11-aarch64" do |plat|
2
+ plat.servicedir "/lib/systemd/system"
3
+ plat.defaultdir "/etc/default"
4
+ plat.servicetype "systemd"
5
+ plat.codename "bullseye"
6
+
7
+ packages = %w(build-essential devscripts make quilt pkg-config debhelper rsync fakeroot cmake)
8
+ plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends #{packages.join(' ')}"
9
+ plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
10
+ plat.vmpooler_template "debian-11-arm64"
11
+ end
@@ -850,7 +850,7 @@ class Vanagon
850
850
  source.file
851
851
  end
852
852
 
853
- @settings.merge!(yaml_safe_load_shim(yaml_path))
853
+ @settings.merge!(YAML.safe_load(File.read(yaml_path), permitted_classes: [Symbol]))
854
854
  end
855
855
  end
856
856
 
@@ -876,19 +876,6 @@ class Vanagon
876
876
  source_type
877
877
  end
878
878
 
879
- # YAML.safe_load introduced an incompatible change in Ruby 3.1.0
880
- # Shim that until no longer relevant.
881
- def yaml_safe_load_shim(yaml_path)
882
- new_safe_load_version = Gem::Version.new('3.1.0')
883
- this_version = Gem::Version.new(RUBY_VERSION)
884
-
885
- if this_version >= new_safe_load_version
886
- YAML.safe_load(File.read(yaml_path), permitted_classes: [Symbol])
887
- else
888
- YAML.safe_load(File.read(yaml_path), [Symbol])
889
- end
890
- end
891
-
892
879
  def load_upstream_metadata(metadata_uri)
893
880
  VanagonLogger.info "Loading metadata from #{metadata_uri}"
894
881
  case metadata_uri
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.39.1
4
+ version: 0.39.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet By Perforce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-25 00:00:00.000000000 Z
11
+ date: 2023-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: psych
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '4.0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '4.0'
83
97
  description: |2
84
98
  Vanagon takes a set of project, component, and platform configuration files, to perform
85
99
  multiplatform builds that are packaged into rpms, debs, dmgs, etc.
@@ -157,6 +171,7 @@ files:
157
171
  - lib/vanagon/platform.rb
158
172
  - lib/vanagon/platform/deb.rb
159
173
  - lib/vanagon/platform/defaults/debian-10-amd64.rb
174
+ - lib/vanagon/platform/defaults/debian-11-aarch64.rb
160
175
  - lib/vanagon/platform/defaults/debian-11-amd64.rb
161
176
  - lib/vanagon/platform/defaults/debian-8-amd64.rb
162
177
  - lib/vanagon/platform/defaults/debian-8-i386.rb