In testing the FirefoxESRPolicies.pkg recipe I found that it would fail on the step where the policies.json file is copied to the path within the Firefox.app bundle.
Copier: Copied /private/tmp/dmg.YkeUbA/Firefox.app to /Users/haircut/Library/AutoPkg/Cache/local.pkg.FirefoxESRPoliciesLAC/Firefox/Applications/Firefox.app
{'Output': {}}
Copier
{'Input': {'destination_path': u'/Users/haircut/Library/AutoPkg/Cache/local.pkg.FirefoxESRPoliciesLAC/Firefox/Applications/Firefox.app/Contents/Resources/distribution/policies.json',
'source_path': u'/Users/haircut/Library/AutoPkg/RecipeOverrides/policies.json'}}
Can't copy /Users/haircut/Library/AutoPkg/RecipeOverrides/policies.json to /Users/haircut/Library/AutoPkg/Cache/local.pkg.FirefoxESRPoliciesLAC/Firefox/Applications/Firefox.app/Contents/Resources/distribution/policies.json: [Errno 2] No such file or directory: u'/Users/haircut/Library/AutoPkg/Cache/local.pkg.FirefoxESRPoliciesLAC/Firefox/Applications/Firefox.app/Contents/Resources/distribution/policies.json'
Failed.
Through some poking I found that the Firefox.app/Contents/Resources/distribution directory does not exist by default when Firefox ESR is downloaded. The Copier processor is not able to create non-existent directories, thus the failure; the destination path does not exist.
To test, I modified the parent recipe (instead of my override) to inject an additional Copier step before the attempt to copy policies.json. This step simply copies an empty distribution directory from the %RECIPE_DIR%.
This adds the additional requirement of having this "dummy" distribution directory in the %RECIPE_DIR% path.
Perhaps a better solution would be to require that instead of just creating the policies.json file in %RECIPE_DIR%, one must create the full path distribution/policies.json. Then, a single Copier step could correctly copy the distribution directory and its contents to the Firefox app bundle before packaging.
In testing the
FirefoxESRPolicies.pkg
recipe I found that it would fail on the step where thepolicies.json
file is copied to the path within the Firefox.app bundle.Through some poking I found that the
Firefox.app/Contents/Resources/distribution
directory does not exist by default when Firefox ESR is downloaded. TheCopier
processor is not able to create non-existent directories, thus the failure; the destination path does not exist.To test, I modified the parent recipe (instead of my override) to inject an additional Copier step before the attempt to copy
policies.json
. This step simply copies an emptydistribution
directory from the%RECIPE_DIR%
.This adds the additional requirement of having this "dummy"
distribution
directory in the%RECIPE_DIR%
path.Perhaps a better solution would be to require that instead of just creating the
policies.json
file in%RECIPE_DIR%
, one must create the full pathdistribution/policies.json
. Then, a singleCopier
step could correctly copy thedistribution
directory and its contents to the Firefox app bundle before packaging.