Skip to content

P4 Code Review: Pin Ubuntu AMI to 24.04 LTS due to helix-swarm-optional incompatibility with ImageMagick 7 #875

@gabebatista

Description

@gabebatista

Summary

The helix-swarm-optional package from Perforce's apt repository fails to install on Ubuntu 25.x due to an ImageMagick version incompatibility. We needed to pin the P4 Code Review AMI to Ubuntu 24.04 LTS.

Problem

The helix-swarm-optional package's post-installation script attempts to modify /etc/ImageMagick-6/policy.xml, but Ubuntu 25.x ships with ImageMagick 7, which uses /etc/ImageMagick-7/policy.xml.

Error Message

Setting up helix-swarm-optional (2025.5-2869592~noble) ...
sed: can't read /etc/ImageMagick-6/policy.xml: No such file or directory
dpkg: error processing package helix-swarm-optional (--configure):
 installed helix-swarm-optional package post-installation script subprocess returned error exit status 2

Workaround

Pinned the P4 Code Review AMI to Ubuntu 24.04 LTS (Noble) in assets/packer/perforce/p4-code-review/p4_code_review_x86.pkr.hcl:

data "amazon-ami" "ubuntu" {
  filters = {
    # Pin to Ubuntu 24.04 LTS (Noble) - required for helix-swarm-optional package
    # which expects ImageMagick 6 (Ubuntu 25.x ships ImageMagick 7)
    name                = "ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-*"
    ...
  }
}

Root Cause

This is a bug in the Perforce helix-swarm-optional package - the post-install script hardcodes the ImageMagick 6 path instead of detecting the installed ImageMagick version.

Recommendation

  • File a bug report with Perforce to update the helix-swarm-optional package to support ImageMagick 7
  • Ubuntu 24.04 LTS is supported until 2029, so this pin is acceptable for now
  • When Perforce fixes their package, we can remove the version pin

Affected Files

  • assets/packer/perforce/p4-code-review/p4_code_review_x86.pkr.hcl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions