Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PE-31118) add MacOS 11 support #560

Merged

Conversation

ciprianbadescu
Copy link
Contributor

@ciprianbadescu ciprianbadescu commented May 13, 2021

Most of the changes are caused by the change in major product version.
Until now, the major product version was 10.15, 10.14, etc.

Starting with MacOS 11, the major version was incremented and we
started to use only the first number (eg. 11) as major version

@ciprianbadescu ciprianbadescu requested a review from a team as a code owner May 13, 2021 14:18
@ciprianbadescu ciprianbadescu requested a review from a team May 13, 2021 14:18
@puppet-community-rangefinder
Copy link

puppet_agent::osfamily::darwin is a class

that may have no external impact to Forge modules.

This module is declared in 3 of 576 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@ciprianbadescu ciprianbadescu force-pushed the PE-31118/add-osx11-support branch 2 times, most recently from b38dbbd to 6c63c98 Compare May 13, 2021 14:21
@ciprianbadescu ciprianbadescu changed the title (PE-31118) add osx11 support (PE-31118) add MacOS 11 support May 13, 2021
Copy link
Contributor

@gimmyxd gimmyxd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Tested on a fresh node:

  • installed latest nightly agent with the bolt task
  • configured the module on PE and connected the agent
  • managed agent version from PE using the PA module.

The commit check is failing because it accepts only MODULES as a project and we used to have a MODULES ticket for this.

@gimmyxd gimmyxd requested a review from a team May 17, 2021 11:56
task_spec/spec/acceptance/init_spec.rb Outdated Show resolved Hide resolved
@ciprianbadescu ciprianbadescu force-pushed the PE-31118/add-osx11-support branch from 6c63c98 to 178172b Compare May 17, 2021 12:42
Most of the changes are caused by the change in major product version.
Until now, the major product version was 10.15, 10.14, etc.

Starting with MacOS 11, the major version was incremented and we
started to use only the first number (eg. 11) as major version
@ciprianbadescu ciprianbadescu force-pushed the PE-31118/add-osx11-support branch from 178172b to 77a7847 Compare May 17, 2021 13:01
@ciprianbadescu ciprianbadescu requested review from a team and gimmyxd May 17, 2021 13:02
@@ -1,19 +1,25 @@
class puppet_agent::osfamily::darwin{
assert_private()

if $::macosx_productversion_major =~ /^11\./ {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming Apple will bump the major version on every macOS release, can we reverse the logic?

Suggested change
if $::macosx_productversion_major =~ /^11\./ {
if $::macosx_productversion_major =~ /^10\./ {

Also, macosx_productversion_major will be just 11 because of puppetlabs/facter#2365. Since facter 3 doesn't have this change, maybe we can check based on macosx_productversion which should have the full version string everytime. Anyway if we reverse the logic it should be fine.

@@ -210,12 +210,17 @@ if [ -f "$PT__installdir/facts/tasks/bash.sh" ]; then
platform_version=`sw_vers | awk '/^ProductVersion:/ { print $2 }'`

major_version=`echo $platform_version | cut -d. -f1,2`

# Starting with MacOS 11, the major version is the first number only
if echo "${major_version}" | grep -q '^11\.'; then major_version=11; fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same concern as above

@ciprianbadescu ciprianbadescu requested a review from a team May 18, 2021 06:35
@GabrielNagy GabrielNagy merged commit 6624889 into puppetlabs:main May 18, 2021
@Pigueiras
Copy link

This is going to be a random question, but where do I find big sur packages for puppet? If I check https://downloads.puppet.com/mac/puppet7/ https://downloads.puppet.com/mac/puppet6/ which are the urls you're pointing in your module, I can find only 10.15 dmgs.

@GabrielNagy
Copy link
Contributor

Hi @Pigueiras, macOS 11 support is set to go out in the next puppet-agent releases. In the meantime you can find nightly builds here: http://nightlies.puppet.com/downloads/mac/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants