vanagon 0.26.2 → 0.28.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
2
  SHA256:
3
- metadata.gz: 710560a9b3a7ca3a3161c658eb4b6422870bb226bbff4396f9749546488bccb0
4
- data.tar.gz: 5bcc31eccdad2d206662b7dc99624cb7b10ff79186730a947696deb3af2957ba
3
+ metadata.gz: 00034c4fe7b0e35639a03953d65d4ba132e471f2363d2f3e557a19f61c925054
4
+ data.tar.gz: 262931385449e18763989f2e39ebb91e6f1d718de3350273d64de0064755d7cf
5
5
  SHA512:
6
- metadata.gz: 7015b26ff75b4589b79bdcb88401366e8e6e58f9e8dfc7cef50a519b6f8f5f2e855936874509785db1923d7b227531bd767f958ad229dcd07e209564ba59a122
7
- data.tar.gz: 93bfbc527dc52f69f217902e53e71738928f196b08340ad422f5fc8d378be9965e61b7ee6b673d8ba1c66e54a0213f6572bff67003d56ab43405933b9b55a1aa
6
+ metadata.gz: 8a6d7230aff64e44af6d1bfdfe311494ae0fa5b346cbf38f537c62ce9472c0282ec78b19781eb40e441dc0e292eecf605d7c37bf3e64aaf45bae17aacfed7014
7
+ data.tar.gz: 80e72898b8fdc9d5fba797b22749f73ddf23346038615f82a82132503e8b24aabf0a58134a825fed0f9aa932710976b3d6c00b1b4bfa10116de84294bb18546e
@@ -97,14 +97,12 @@ class Vanagon
97
97
  %(gunzip "#{file}")
98
98
  when "rar"
99
99
  %(unrar x "#{file}")
100
- when "tar"
100
+ when "tar", "txz"
101
101
  %(#{tar} xf "#{file}")
102
102
  when "tbz2"
103
103
  %(bunzip2 -c "#{file}" | #{tar} xf -)
104
104
  when "tgz"
105
105
  %(gunzip -c "#{file}" | #{tar} xf -)
106
- when "txz"
107
- %(unxz -d "#{file}" | #{tar} xvf -)
108
106
  when "xz"
109
107
  %(unxz "#{file}")
110
108
  when "zip"
@@ -46,7 +46,7 @@ class Vanagon
46
46
  end
47
47
 
48
48
  # These could be templates, but their content is static, so that seems weird.
49
- File.open(File.join(deb_dir, "compat"), "w") { |f| f.puts("7") }
49
+ File.open(File.join(deb_dir, 'compat'), 'w') { |f| f.puts('10') }
50
50
  FileUtils.mkdir_p(File.join(deb_dir, "source"))
51
51
  File.open(File.join(deb_dir, "source", "format"), "w") { |f| f.puts("3.0 (quilt)") }
52
52
  end
@@ -0,0 +1,17 @@
1
+ platform 'fedora-36-x86_64' do |plat|
2
+ plat.servicedir '/usr/lib/systemd/system'
3
+ plat.defaultdir '/etc/sysconfig'
4
+ plat.servicetype 'systemd'
5
+ plat.dist 'fc36'
6
+
7
+ packages = %w[
8
+ autoconf automake bzip2-devel gcc gcc-c++ libselinux-devel
9
+ libsepol libsepol-devel make cmake pkgconfig readline-devel
10
+ rpmdevtools rsync swig zlib-devel systemtap-sdt-devel
11
+ perl-lib perl-FindBin
12
+ ]
13
+ plat.provision_with("/usr/bin/dnf install -y --best --allowerasing #{packages.join(' ')}")
14
+
15
+ plat.install_build_dependencies_with '/usr/bin/dnf install -y --best --allowerasing'
16
+ plat.vmpooler_template 'fedora-36-x86_64'
17
+ end
@@ -0,0 +1,11 @@
1
+ platform "ubuntu-22.04-aarch64" do |plat|
2
+ plat.servicedir "/lib/systemd/system"
3
+ plat.defaultdir "/etc/default"
4
+ plat.servicetype "systemd"
5
+ plat.codename "jammy"
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 "ubuntu-2204-arm64"
11
+ end
@@ -0,0 +1,11 @@
1
+ platform "ubuntu-22.04-amd64" do |plat|
2
+ plat.servicedir "/lib/systemd/system"
3
+ plat.defaultdir "/etc/default"
4
+ plat.servicetype "systemd"
5
+ plat.codename "jammy"
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 "ubuntu-2204-x86_64"
11
+ end
@@ -144,22 +144,34 @@ class Vanagon
144
144
 
145
145
  VERSION_REGEX = /^([=<>]+)\s*([^<>=]*)$/.freeze
146
146
 
147
- # Loads a given platform from the configdir
147
+ # Loads a platform from the config/platforms directory
148
148
  #
149
- # @param name [String] the name of the platform
150
- # @param configdir [String] the path to the platform config file
149
+ # @param platform_name [String] the name of the platform
150
+ # @param config_directory [String] the path to the platform config file
151
151
  # @return [Vanagon::Platform] the platform as specified in the platform config
152
152
  # @raise if the instance_eval on Platform fails, the exception is reraised
153
- def self.load_platform(name, configdir)
154
- platfile = File.join(configdir, "#{name}.rb")
155
- dsl = Vanagon::Platform::DSL.new(name)
156
- dsl.instance_eval(File.read(platfile), platfile, 1)
157
- dsl._platform
158
- rescue StandardError => e
159
- VanagonLogger.error "Error loading platform '#{name}' using '#{platfile}':"
160
- VanagonLogger.error(e)
161
- VanagonLogger.error e.backtrace.join("\n")
162
- raise e
153
+ def self.load_platform(platform_name, config_directory) # rubocop:disable Metrics/AbcSize
154
+ platform_name = File.basename(platform_name, '.rb')
155
+ platform_file_name = "#{platform_name}.rb"
156
+ platform_path = File.join(config_directory, platform_file_name)
157
+
158
+ begin
159
+ platform_definition = File.read(platform_path)
160
+ rescue Errno::ENOENT, Errno::EACCES => e
161
+ VanagonLogger.error "Error loading '#{platform_name}': #{e}"
162
+ exit 1
163
+ end
164
+
165
+ dsl = Vanagon::Platform::DSL.new(platform_name)
166
+ begin
167
+ dsl.instance_eval(platform_definition, platform_path, 1)
168
+ dsl._platform
169
+ rescue StandardError => e
170
+ VanagonLogger.error "Error loading platform '#{platform_name}' using '#{platform_path}':"
171
+ VanagonLogger.error(e)
172
+ VanagonLogger.error e.backtrace.join("\n")
173
+ raise e
174
+ end
163
175
  end
164
176
 
165
177
  # Generate the scripts required to add a group to the package generated.
@@ -27,5 +27,10 @@ override_dh_shlibdeps:
27
27
 
28
28
  override_dh_usrlocal:
29
29
 
30
+ override_dh_builddeb:
31
+ # Force builddeb to use gzip for its internal compression. reprepro can get
32
+ # confused if something newer is used.
33
+ dh_builddeb -- -Zgzip
34
+
30
35
  %:
31
36
  dh $@
@@ -5,7 +5,7 @@
5
5
  <license file="<%= @name -%>-License.rtf"/>
6
6
  <domains enable_anywhere="true" enable_currentUserHome="false" enable_localSystem="true" />
7
7
  <pkg-ref id="<%= @identifier-%>.<%= @name -%>"/>
8
- <options customize="never" hostArchitectures="i386" require-scripts="false"/>
8
+ <options customize="never" hostArchitectures="x86_64,arm64" require-scripts="false"/>
9
9
  <choices-outline>
10
10
  <line choice="default">
11
11
  <line choice="<%= @identifier-%>.<%= @name -%>"/>
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.26.2
4
+ version: 0.28.0
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-04-27 00:00:00.000000000 Z
11
+ date: 2022-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.8.0
33
+ version: 1.11.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.8.0
40
+ version: 1.11.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: fustigit
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -169,6 +169,7 @@ files:
169
169
  - lib/vanagon/platform/defaults/el-9-x86_64.rb
170
170
  - lib/vanagon/platform/defaults/fedora-32-x86_64.rb
171
171
  - lib/vanagon/platform/defaults/fedora-34-x86_64.rb
172
+ - lib/vanagon/platform/defaults/fedora-36-x86_64.rb
172
173
  - lib/vanagon/platform/defaults/osx-10.15-x86_64.rb
173
174
  - lib/vanagon/platform/defaults/osx-11-x86_64.rb
174
175
  - lib/vanagon/platform/defaults/osx-12-x86_64.rb
@@ -184,6 +185,8 @@ files:
184
185
  - lib/vanagon/platform/defaults/ubuntu-18.04-amd64.rb
185
186
  - lib/vanagon/platform/defaults/ubuntu-20.04-aarch64.rb
186
187
  - lib/vanagon/platform/defaults/ubuntu-20.04-amd64.rb
188
+ - lib/vanagon/platform/defaults/ubuntu-22.04-aarch64.rb
189
+ - lib/vanagon/platform/defaults/ubuntu-22.04-amd64.rb
187
190
  - lib/vanagon/platform/dsl.rb
188
191
  - lib/vanagon/platform/osx.rb
189
192
  - lib/vanagon/platform/rpm.rb
@@ -330,42 +333,42 @@ signing_key:
330
333
  specification_version: 3
331
334
  summary: All of your packages will fit into this van with this one simple trick.
332
335
  test_files:
333
- - spec/lib/makefile_spec.rb
334
- - spec/lib/vanagon/common/user_spec.rb
335
- - spec/lib/vanagon/common/pathname_spec.rb
336
+ - spec/lib/git/rev_list_spec.rb
337
+ - spec/lib/vanagon/environment_spec.rb
336
338
  - 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
340
- - spec/lib/vanagon/extensions/ostruct/json_spec.rb
341
339
  - spec/lib/vanagon/extensions/string_spec.rb
342
340
  - 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
341
+ - spec/lib/vanagon/extensions/ostruct/json_spec.rb
355
342
  - spec/lib/vanagon/utilities/shell_utilities_spec.rb
356
343
  - spec/lib/vanagon/utilities/extra_files_signer_spec.rb
357
- - spec/lib/vanagon/component/rules_spec.rb
358
344
  - spec/lib/vanagon/component/dsl_spec.rb
359
- - spec/lib/vanagon/component/source/rewrite_spec.rb
360
- - spec/lib/vanagon/component/source/git_spec.rb
361
345
  - spec/lib/vanagon/component/source/http_spec.rb
346
+ - spec/lib/vanagon/component/source/rewrite_spec.rb
362
347
  - spec/lib/vanagon/component/source/local_spec.rb
348
+ - spec/lib/vanagon/component/source/git_spec.rb
363
349
  - spec/lib/vanagon/component/source_spec.rb
364
- - spec/lib/vanagon/engine/hardware_spec.rb
350
+ - spec/lib/vanagon/component/rules_spec.rb
351
+ - spec/lib/vanagon/platform/deb_spec.rb
352
+ - spec/lib/vanagon/platform/rpm/aix_spec.rb
353
+ - spec/lib/vanagon/platform/osx_spec.rb
354
+ - spec/lib/vanagon/platform/solaris_11_spec.rb
355
+ - spec/lib/vanagon/platform/dsl_spec.rb
356
+ - spec/lib/vanagon/platform/rpm_spec.rb
357
+ - spec/lib/vanagon/platform/solaris_10_spec.rb
358
+ - spec/lib/vanagon/platform/windows_spec.rb
359
+ - spec/lib/vanagon/common/pathname_spec.rb
360
+ - spec/lib/vanagon/common/user_spec.rb
361
+ - spec/lib/vanagon/driver_spec.rb
362
+ - spec/lib/vanagon/platform_spec.rb
363
+ - spec/lib/vanagon/component_spec.rb
364
+ - spec/lib/vanagon/project_spec.rb
365
365
  - spec/lib/vanagon/engine/ec2_spec.rb
366
- - spec/lib/vanagon/engine/local_spec.rb
367
366
  - spec/lib/vanagon/engine/docker_spec.rb
368
367
  - spec/lib/vanagon/engine/pooler_spec.rb
368
+ - spec/lib/vanagon/engine/local_spec.rb
369
369
  - spec/lib/vanagon/engine/always_be_scheduling_spec.rb
370
370
  - spec/lib/vanagon/engine/base_spec.rb
371
- - spec/lib/git/rev_list_spec.rb
371
+ - spec/lib/vanagon/engine/hardware_spec.rb
372
+ - spec/lib/vanagon/cli_spec.rb
373
+ - spec/lib/vanagon/utilities_spec.rb
374
+ - spec/lib/makefile_spec.rb