Merge pull request #276 from jweyer8/dev/jweyer/CLT_fix
CLT: Fix permissions error
This commit is contained in:
Коммит
1eec202ee9
|
@ -1,5 +1,10 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [5.0.6] - 2023-06-23
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Fixed permissions issue with the `macos::command_line_tools` resource.
|
||||||
|
|
||||||
## [5.0.5] - 2023-06-20
|
## [5.0.5] - 2023-06-20
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -43,7 +43,7 @@ platforms:
|
||||||
- name: monterey-chef17
|
- name: monterey-chef17
|
||||||
driver:
|
driver:
|
||||||
box: microsoft/macos-monterey
|
box: microsoft/macos-monterey
|
||||||
box_version: 12.3.1
|
box_version: 12.6.3
|
||||||
provisioner:
|
provisioner:
|
||||||
product_version: 17
|
product_version: 17
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ maintainer_email 'chef@microsoft.com'
|
||||||
license 'MIT'
|
license 'MIT'
|
||||||
description 'Resources for configuring and provisioning macOS'
|
description 'Resources for configuring and provisioning macOS'
|
||||||
chef_version '>= 14.0'
|
chef_version '>= 14.0'
|
||||||
version '5.0.5'
|
version '5.0.6'
|
||||||
|
|
||||||
source_url 'https://github.com/Microsoft/macos-cookbook'
|
source_url 'https://github.com/Microsoft/macos-cookbook'
|
||||||
issues_url 'https://github.com/Microsoft/macos-cookbook/issues'
|
issues_url 'https://github.com/Microsoft/macos-cookbook/issues'
|
||||||
|
|
|
@ -9,7 +9,10 @@ property :compile_time, [true, false],
|
||||||
action :install do
|
action :install do
|
||||||
command_line_tools = CommandLineTools.new
|
command_line_tools = CommandLineTools.new
|
||||||
|
|
||||||
command_line_tools.enable_install_on_demand
|
file 'create sentinel file' do
|
||||||
|
path '/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress'
|
||||||
|
group 'wheel'
|
||||||
|
end
|
||||||
|
|
||||||
execute "install #{command_line_tools.version}" do
|
execute "install #{command_line_tools.version}" do
|
||||||
command ['softwareupdate', '--install', command_line_tools.version]
|
command ['softwareupdate', '--install', command_line_tools.version]
|
||||||
|
@ -17,7 +20,7 @@ action :install do
|
||||||
live_stream true
|
live_stream true
|
||||||
end
|
end
|
||||||
|
|
||||||
file 'sentinel to request on-demand install' do
|
file 'delete sentinel file' do
|
||||||
path '/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress'
|
path '/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress'
|
||||||
action :delete
|
action :delete
|
||||||
end
|
end
|
||||||
|
@ -26,7 +29,10 @@ end
|
||||||
action :upgrade do
|
action :upgrade do
|
||||||
command_line_tools = CommandLineTools.new
|
command_line_tools = CommandLineTools.new
|
||||||
|
|
||||||
command_line_tools.enable_install_on_demand
|
file 'create sentinel file' do
|
||||||
|
path '/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress'
|
||||||
|
group 'wheel'
|
||||||
|
end
|
||||||
|
|
||||||
execute "upgrade #{command_line_tools.version}" do
|
execute "upgrade #{command_line_tools.version}" do
|
||||||
command ['softwareupdate', '--install', command_line_tools.latest_from_catalog]
|
command ['softwareupdate', '--install', command_line_tools.latest_from_catalog]
|
||||||
|
@ -34,7 +40,7 @@ action :upgrade do
|
||||||
live_stream true
|
live_stream true
|
||||||
end
|
end
|
||||||
|
|
||||||
file 'sentinel to request on-demand install' do
|
file 'delete sentinel file' do
|
||||||
path '/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress'
|
path '/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress'
|
||||||
action :delete
|
action :delete
|
||||||
end
|
end
|
||||||
|
|
|
@ -21,7 +21,9 @@ describe 'command_line_tools' do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it { is_expected.to create_file('create sentinel file') }
|
||||||
it { is_expected.to run_execute('install Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.0') }
|
it { is_expected.to run_execute('install Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.0') }
|
||||||
|
it { is_expected.to delete_file('delete sentinel file') }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with libxcrun present' do
|
context 'with libxcrun present' do
|
||||||
|
@ -35,7 +37,9 @@ describe 'command_line_tools' do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it { is_expected.to create_file('create sentinel file') }
|
||||||
it { is_expected.to_not run_execute('install Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.0') }
|
it { is_expected.to_not run_execute('install Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.0') }
|
||||||
|
it { is_expected.to delete_file('delete sentinel file') }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -61,9 +65,11 @@ describe 'command_line_tools' do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it { is_expected.to create_file('create sentinel file') }
|
||||||
it {
|
it {
|
||||||
is_expected.to run_execute('upgrade Command Line Tools for Xcode-11.0')
|
is_expected.to run_execute('upgrade Command Line Tools for Xcode-11.0')
|
||||||
.with(command: ['softwareupdate', '--install', 'Command Line Tools for Xcode-22.0'])
|
.with(command: ['softwareupdate', '--install', 'Command Line Tools for Xcode-22.0'])
|
||||||
}
|
}
|
||||||
|
it { is_expected.to delete_file('delete sentinel file') }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Загрузка…
Ссылка в новой задаче