vanagon 0.37.0 → 0.38.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: 4b569137b6d209bf5bd4caa5d17063aa6779fb72b92dc33eb77acc35c47779de
4
- data.tar.gz: 6b305a0234d8e5b68ee1a0c9ef46c1396f6ee43af941a60e3bf192fc1ab4c7f4
3
+ metadata.gz: eb2d7d400aa4b316d10e77574eef5bbd53f778347adf33873ea9f6a7610dafda
4
+ data.tar.gz: 426c75017aafe20dccfc9c49f158a3b43709a1196ee113ac91b6e4263f4e0876
5
5
  SHA512:
6
- metadata.gz: 948f95345c029e5ff95212741a3d58e0c8b0bafe807996dcfb655ebf18374c7ed7b608edc88aac00b74ede53f20bb92d5a7c07214a1242c5c1d32e515144c79b
7
- data.tar.gz: c555fad2d59dbe124168443ca5ec327bb9558d61c29cf96c07865bdd598fcc6f03c05cd69c0ab4dff3a040cc2883c69c9dca3ccc518e37d716cefafe94735d7b
6
+ metadata.gz: 33e272d98f5e9bd3a0f442663cf8194b65ee8ef5c8cde64cb5e6952ba3768b62c36975037ca1026adfd459796a78c1bbd981872df03fe603b1cd00b3fcf132b3
7
+ data.tar.gz: cf1073299d0ed161c6e6ae9c7b6c89155fa6df288dc27df2aa0727e0ba2ab77442f2f7028e11de58349672f8b5f97edf852f7cf29f3f43629748e1f2d2ca064c
@@ -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
@@ -159,6 +159,13 @@ class Vanagon
159
159
  @platform.copy = copy_cmd
160
160
  end
161
161
 
162
+ # Set the path to Homebrew for the platform
163
+ #
164
+ # @param brew_cmd [String] Absolute path to Homebrew for the platform
165
+ def brew(brew_cmd)
166
+ @platform.brew = brew_cmd
167
+ end
168
+
162
169
  # Set the cross_compiled flag for the platform
163
170
  #
164
171
  # @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
@@ -317,7 +317,7 @@ class Vanagon
317
317
 
318
318
  if definition.scheme =~ /^(http|ftp|file)/
319
319
  if File.extname(definition.path) == '.ps1'
320
- commands << %(powershell.exe -NoProfile -ExecutionPolicy Bypass -Command 'iex ((new-object net.webclient).DownloadString("#{definition}"))')
320
+ commands << %(powershell.exe -NoProfile -ExecutionPolicy Bypass -Command '[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;iex ((new-object net.webclient).DownloadString("#{definition}"))')
321
321
  else
322
322
  commands << %(C:/ProgramData/chocolatey/bin/choco.exe source add -n #{definition.host}-#{definition.path.tr('/', '-')} -s "#{definition}" --debug || echo "Oops, it seems that you don't have chocolatey installed on this system. Please ensure it's there by adding something like 'plat.add_repository 'https://chocolatey.org/install.ps1'' to your platform definition.")
323
323
  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
@@ -290,7 +290,7 @@ class Vanagon
290
290
  # @return [String] the evaluated template
291
291
  def erb_string(erbfile, b = binding)
292
292
  template = File.read(erbfile)
293
- message = ERB.new(template, nil, "-")
293
+ message = ERB.new(template, trim_mode: "-")
294
294
  message.result(b)
295
295
  .gsub(/[\n]+{3,}/, "\n\n")
296
296
  .squeeze("\s")
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.0
4
+ version: 0.38.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-16 00:00:00.000000000 Z
11
+ date: 2023-07-05 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