vanagon 0.37.1 → 0.39.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8800b5b2c66ce4ad1539a97f635cbb02d2b70bb7a5ab87a27bc4d01f0bc40d3f
4
- data.tar.gz: 2e2ee62e6afbd6046b799f0d4738fbcaebb5308f5057f56b826c02b964e22454
3
+ metadata.gz: 4ac97aec522601e6c06e6b246356b9fd2eef1a94d1548b501424224d4d51522c
4
+ data.tar.gz: 557d3080596d55cc84819bd59b5d30d566c66d3620cc3687ea8bb889c8f50118
5
5
  SHA512:
6
- metadata.gz: 710f4323b5df300ab73417c7946eadba090a2f5ba7c3b9ac422508ee9bc38ba14d7935b175b65aacd71593eecf94474c7723ee239966db706237760dde378d29
7
- data.tar.gz: 0017cd5415da427864b9288533a07248671a81b28ed0eece98f3583571227b621ccf0355677707b731c14bf6fadcbce96077a3b0d31d57544e789249afeaf894
6
+ metadata.gz: 007b36851f55746bd042d54f1b4aa6ab2557b18f81f0d759730554080153b7cdbda44d8a16476f36f63556f906631eaca1bfa8de066c9c7b0bf4cc8da543e4e4
7
+ data.tar.gz: fe4fa81aeb5246f3892cee17cea50b9545fce5f8dda33f491f7b92ad6f58c624e09540d3476353b2eeef58518fd730e310288140bdf03181b8d7c3137e8d6f3b
@@ -0,0 +1,24 @@
1
+ platform 'osx-13-arm64' do |plat|
2
+ plat.brew '/opt/homebrew/bin/brew'
3
+ plat.servicetype 'launchd'
4
+ plat.servicedir '/Library/LaunchDaemons'
5
+ plat.codename 'ventura'
6
+
7
+ plat.provision_with 'export HOMEBREW_NO_EMOJI=true'
8
+ plat.provision_with 'export HOMEBREW_VERBOSE=true'
9
+ plat.provision_with "export HOMEBREW_NO_ANALYTICS=1"
10
+
11
+ plat.provision_with 'sudo dscl . -create /Users/test'
12
+ plat.provision_with 'sudo dscl . -create /Users/test UserShell /bin/bash'
13
+ plat.provision_with 'sudo dscl . -create /Users/test UniqueID 1001'
14
+ plat.provision_with 'sudo dscl . -create /Users/test PrimaryGroupID 1000'
15
+ plat.provision_with 'sudo dscl . -create /Users/test NFSHomeDirectory /Users/test'
16
+ plat.provision_with 'sudo dscl . -passwd /Users/test password'
17
+ plat.provision_with 'sudo dscl . -merge /Groups/admin GroupMembership test'
18
+ plat.provision_with 'echo "test ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/username'
19
+ plat.provision_with 'mkdir -p /etc/homebrew'
20
+ plat.provision_with 'cd /etc/homebrew'
21
+ plat.provision_with 'createhomedir -c -u test'
22
+ plat.provision_with 'su test -c \'echo | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"\''
23
+ plat.vmpooler_template 'macos-13-arm64'
24
+ end
@@ -0,0 +1,23 @@
1
+ platform "osx-13-x86_64" do |plat|
2
+ plat.servicetype "launchd"
3
+ plat.servicedir "/Library/LaunchDaemons"
4
+ plat.codename "ventura"
5
+
6
+ plat.provision_with "export HOMEBREW_NO_EMOJI=true"
7
+ plat.provision_with "export HOMEBREW_VERBOSE=true"
8
+ plat.provision_with "export HOMEBREW_NO_ANALYTICS=1"
9
+
10
+ plat.provision_with "sudo dscl . -create /Users/test"
11
+ plat.provision_with "sudo dscl . -create /Users/test UserShell /bin/bash"
12
+ plat.provision_with "sudo dscl . -create /Users/test UniqueID 1001"
13
+ plat.provision_with "sudo dscl . -create /Users/test PrimaryGroupID 1000"
14
+ plat.provision_with "sudo dscl . -create /Users/test NFSHomeDirectory /Users/test"
15
+ plat.provision_with "sudo dscl . -passwd /Users/test password"
16
+ plat.provision_with "sudo dscl . -merge /Groups/admin GroupMembership test"
17
+ plat.provision_with "echo 'test ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/username"
18
+ plat.provision_with "mkdir -p /etc/homebrew"
19
+ plat.provision_with "cd /etc/homebrew"
20
+ plat.provision_with "createhomedir -c -u test"
21
+ plat.provision_with %Q(su test -c 'echo | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"')
22
+ plat.vmpooler_template "macos-13-x86_64"
23
+ end
@@ -18,7 +18,7 @@ class Vanagon
18
18
  class DSL
19
19
  # Constructor for the DSL object
20
20
  #
21
- # @param name [String] name of the platform
21
+ # @param platform_name [String] name of the platform
22
22
  # @return [Vanagon::Platform::DSL] A DSL object to describe the {Vanagon::Platform}
23
23
  def initialize(platform_name)
24
24
  @name = platform_name
@@ -26,9 +26,15 @@ class Vanagon
26
26
 
27
27
  # Primary way of interacting with the DSL. Also a simple factory to get the right platform object.
28
28
  #
29
- # @param name [String] name of the platform
29
+ # @param platform_name [String] name of the platform
30
+ # @param override_name [Boolean] whether the specified `platform_name` should override the basename
30
31
  # @param block [Proc] DSL definition of the platform to call
31
- def platform(platform_name, &block)
32
+ def platform(platform_name, override_name: false, &block)
33
+ # By default, the Vanagon::Platform's name/version/arch will be based on
34
+ # the filename of the platform definition. But if override_name is true,
35
+ # then use the `platform_name` passed into this method instead.
36
+ @name = platform_name if override_name
37
+
32
38
  @platform = case platform_name
33
39
  when /^aix-/
34
40
  Vanagon::Platform::RPM::AIX.new(@name)
@@ -159,6 +165,13 @@ class Vanagon
159
165
  @platform.copy = copy_cmd
160
166
  end
161
167
 
168
+ # Set the path to Homebrew for the platform
169
+ #
170
+ # @param brew_cmd [String] Absolute path to Homebrew for the platform
171
+ def brew(brew_cmd)
172
+ @platform.brew = brew_cmd
173
+ end
174
+
162
175
  # Set the cross_compiled flag for the platform
163
176
  #
164
177
  # @param xcc [Boolean] True if this is a cross-compiled platform
@@ -10,7 +10,7 @@ class Vanagon
10
10
  <<-HERE.undent
11
11
  mkdir -p /etc/homebrew
12
12
  cd /etc/homebrew
13
- su test -c '/usr/local/bin/brew install #{list_build_dependencies.join(' ')}'
13
+ su test -c '#{@brew} install #{list_build_dependencies.join(' ')}'
14
14
  HERE
15
15
  end
16
16
 
@@ -135,6 +135,7 @@ class Vanagon
135
135
  @patch = "/usr/bin/patch"
136
136
  @num_cores = "/usr/sbin/sysctl -n hw.physicalcpu"
137
137
  @mktemp = "mktemp -d -t 'tmp'"
138
+ @brew = '/usr/local/bin/brew'
138
139
  super(name)
139
140
  end
140
141
  end
@@ -54,6 +54,7 @@ class Vanagon
54
54
  attr_accessor :sort
55
55
  attr_accessor :tar
56
56
  attr_accessor :shasum
57
+ attr_accessor :brew # This is macOS specific
57
58
 
58
59
  # Hold a string containing the values that a given platform
59
60
  # should use when a Makefile is run - resolves to the CFLAGS
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.37.1
4
+ version: 0.39.0
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-06-21 00:00:00.000000000 Z
11
+ date: 2023-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt
@@ -173,6 +173,8 @@ files:
173
173
  - lib/vanagon/platform/defaults/osx-11-x86_64.rb
174
174
  - lib/vanagon/platform/defaults/osx-12-arm64.rb
175
175
  - lib/vanagon/platform/defaults/osx-12-x86_64.rb
176
+ - lib/vanagon/platform/defaults/osx-13-arm64.rb
177
+ - lib/vanagon/platform/defaults/osx-13-x86_64.rb
176
178
  - lib/vanagon/platform/defaults/redhatfips-7-x86_64.rb
177
179
  - lib/vanagon/platform/defaults/redhatfips-8-x86_64.rb
178
180
  - lib/vanagon/platform/defaults/sles-12-x86_64.rb