MunkiReport, Python 3 and PHP 8

MunkiReport 5.8 was released today and primarily includes compatibility with Python 3 and PHP 8.

Just like last year’s release of 5.7, this new version of MunkiReport requires admins to deploy a specific Python package to clients before updating.

It will also likely require a coordinated update on your web server to enable PHP 8.

Read on for the details…

Last year

This change is very similar to the one I covered last year in MunkiReport and Python 2. While work does still continue on MunkiReport 6, contributors decided it was time to get Python 3 and PHP 8 support out the door.

Python 3

Instead of shipping a dedicated version of Python it was decided to standardize on MacAdmins Python. This lowers the burden on maintainers and has the potential to reduce the number of Python installations on clients.

Python 3.10.9.80716 is the specific release that has been tested. The older 3.9 should work, but the newer 3.11 will not due to bugs in that Python release.

PHP 8

MunkiReport is tested against PHP 8.2 but should work with 8.0 or 8.1 as well.

PHP 7 is not supported. It has been end of life for many months now and should not be used in production.

Rolling it out

To upgrade your fleet from a previous version to 5.8 follow these steps:

  1. Download MacAdmins Python 3.10.9.80716 from GitHub and deploy it to your fleet. This step can be completed at any time before you upgrade the MunkiReport server or deploy 5.8 to the clients.
    • If you use Munki to deploy MunkiReport, the simplest way to achieve this step is to import python_recommended_signed-3.10.9.80716.pkg into your Munki repo and then configure your MunkiReport client installer package to REQUIRE MacAdminsPython. This will ensure that MacAdminsPython is immediately installed on all existing clients and that it will be installed before MunkiReport on any new clients going forward.
    • Alternatively, if you want to have MacAdmins Python available for other open source tools or general use, set it as a managed_install in your Munki manifest(s). This will install it on all Macs independently of MunkiReport.
  2. Update your web server to use PHP 8.2 for your MunkiReport host.
  3. Follow the General Upgrade Procedures to update your MunkiReport server as you always have in the past.
  4. Update any third-party modules that have been revised to utilize the new Python 3 shebang. (Not all modules use Python or require an update.)
  5. Update any of your own custom modules to Python 3 and the new shebang: #!/usr/local/munkireport/munkireport-python3
  6. Generate a new client installer package and deploy it to your fleet.
  7. Later, after all clients are updated to 5.8, add MunkiReportPython2 as a managed_uninstall  in your Munki manifest(s) to remove it from the fleet.

If you have any questions or need any help please join us in the #munkireport channel in the MacAdmins Slack.

Leave a Reply

Your email address will not be published. Required fields are marked *