Create a fix patch file - dcasota/photonos-scripts GitHub Wiki

Lately on issue case https://github.com/vmware/photon/issues/1583 there was a specific hotfix to be added. The technique to extract and inject a hotfix is not complicated.

  1. Create a patch file on the source machine
tdnf install -y git
git clone https://github.com/canonical/cloud-init.git
cd cloud-init/
git fetch origin pull/5722/head:pr-5722
git checkout pr-5722
git format-patch origin/main --stdout > fix.patch
  1. Transfer the patch file.

  2. Apply the patch on the target machine.

cd /path/to/your/repository
git apply /path/to/destination/fix.patch