Bug #9143
macauthorization provider fails on OS X 10.7 (Lion)
| Status: | Closed | Start date: | 08/22/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | OSX | |||
| Target version: | 2.7.4 | |||
| Affected Puppet version: | Branch: | https://github.com/nigelkersten/puppet/tree/tickets/2.7.x/9143-make-macauthorization-work-on-lion | ||
| Keywords: | lion | |||
| Votes: | 0 |
Description
$ puppet resource macauthorization --debug --evaltrace
debug: Puppet::Type::Macauthorization::ProviderMacauthorization: Executing '/usr/bin/sw_vers -productVersion'
debug: Puppet::Type::Macauthorization::ProviderMacauthorization: false value when expecting true
Could not run: Could not find a default provider for macauthorization
This is another instance where there an OS X version check. Line 23 of macauthorization.rb (http://projects.puppetlabs.com/projects/puppet/repository/revisions/master/entry/lib/puppet/provider/macauthorization/macauthorization.rb#L23):
confine :true => if /^10.5/.match(product_version) or /^10.6/.match(product_version
This is not future proof. Exact same issue as http://projects.puppetlabs.com/issues/8375
The provider will work on 10.7, if enabled. After manually tweaking macauthorization.rb:
$ puppet resource macauthorization system.preferences --debug --evaltrace
debug: Puppet::Type::Macauthorization::ProviderMacauthorization: Executing '/usr/bin/sw_vers -productVersion'
macauthorization { 'system.preferences':
ensure => 'present',
allow_root => 'true',
auth_class => 'user',
auth_type => 'right',
comment => 'Checked by the Admin framework when making changes to certain System Preferences.',
group => 'admin',
shared => 'true',
}
I’m using Mac OS X 10.7.1, Puppet 2.7.3.
History
Updated by James Turnbull 9 months ago
- Category set to OSX
- Status changed from Unreviewed to Accepted
- Assignee set to Gary Larizza
- Target version set to 2.7.x
Gary – fancy taking a look and patching?
Updated by Gary Larizza 9 months ago
Sure. It’s pretty trivial, but I think we need to look at a way to ‘future proof’ this. Unfortunately, with Apple’s track record of tweaks in every version, this may be the best way we have for now.
Updated by Clay Caviness 9 months ago
So “future proof” is maybe not exactly right, but I’d prefer to have puppet assume that future OSes would have the same functionality as current ones, rather than e.g. marking 10.6 as special and then failing when 10.7 comes out and works the same as 10.6.
Updated by Nigel Kersten 9 months ago
- Assignee changed from Gary Larizza to Nigel Kersten
- Keywords set to lion
Clay Caviness wrote:
So “future proof” is maybe not exactly right, but I’d prefer to have puppet assume that future OSes would have the same functionality as current ones, rather than e.g. marking 10.6 as special and then failing when 10.7 comes out and works the same as 10.6.
https://lkml.org/lkml/2011/6/14/293
I’m going to flip the change around so we fail on known-failing versions and follow that principle generally.
Updated by Nigel Kersten 9 months ago
- Status changed from Accepted to In Topic Branch Pending Review
- Branch set to https://github.com/nigelkersten/puppet/tree/tickets/2.7.x/9143-make-macauthorization-work-on-lion
Updated by Matthaus Litteken 8 months ago
- Status changed from In Topic Branch Pending Review to Code Insufficient
Was merged and reverted, as tests were failing.
Updated by Nigel Kersten 8 months ago
- Assignee changed from Nigel Kersten to Matthaus Litteken
Can we get some details about the failing tests?
We ran them by hand without problems, what was actually failing?
Updated by Matthaus Litteken 8 months ago
Sorry, you’re totally right. There were tests failing on OS X, and I reverted the two commits that were at the top, as they both involved OS X. I should have reverted them one by one and rerun the spec tests in between.
I’ll re-merge this into 2.7.x
Updated by Matthaus Litteken 8 months ago
- Status changed from Code Insufficient to Merged - Pending Release
Merged/cherry-picked in 41302e9003f52edb296f12e1dc888f3341526750
Updated by Matthaus Litteken 8 months ago
- Status changed from Merged - Pending Release to Closed
- Target version changed from 2.7.x to 2.7.4
Released in 2.7.4rc2