forked from puppetlabs-toy-chest/puppet-runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathosx-11-arm64.rb
29 lines (24 loc) · 1.37 KB
/
osx-11-arm64.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
platform 'osx-11-arm64' do |plat|
plat.servicetype 'launchd'
plat.servicedir '/Library/LaunchDaemons'
plat.codename 'bigsur'
plat.provision_with 'export HOMEBREW_NO_EMOJI=true'
plat.provision_with 'export HOMEBREW_VERBOSE=true'
plat.provision_with 'sudo dscl . -create /Users/test'
plat.provision_with 'sudo dscl . -create /Users/test UserShell /bin/bash'
plat.provision_with 'sudo dscl . -create /Users/test UniqueID 1001'
plat.provision_with 'sudo dscl . -create /Users/test PrimaryGroupID 1000'
plat.provision_with 'sudo dscl . -create /Users/test NFSHomeDirectory /Users/test'
plat.provision_with 'sudo dscl . -passwd /Users/test password'
plat.provision_with 'sudo dscl . -merge /Groups/admin GroupMembership test'
plat.provision_with 'echo "test ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/username'
plat.provision_with 'mkdir -p /etc/homebrew'
plat.provision_with 'cd /etc/homebrew'
plat.provision_with 'su test -c \'echo | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"\''
plat.provision_with 'sudo chown -R test:admin /Users/test/Library/'
packages = %w[cmake pkg-config yaml-cpp]
plat.provision_with "su test -c '/usr/local/bin/brew install #{packages.join(' ')}'"
plat.vmpooler_template 'macos-112-x86_64'
plat.cross_compiled true
plat.output_dir File.join('apple', '11', 'PC1', 'arm64')
end