I had previously written AutoPkg download and Munki recipes to handle both the Intel and ARM versions of FileZilla, these both previously worked.
The FileZilla website has recently made a change that means the previous standardised download URL no longer works.
The previous download URL that worked would look like this -
This form no longer works and instead the following URL format has to be used -
The two main differences are -
1. A different download server is defined in the URL and this is dynamic meaning it changes to enable I presume load sharing
2. A unique token is added to the end of the URL, without this the download now fails and you are redirected back to the main download page
I have successfully created a new working download recipe for the Intel version by adding additional URLTextSearcher processor entries so I now search for and find the Version, the Server number and the Token. As mentioned this works for the Intel version of my recipe, I use all three as variables to generate the actual download URL.
One would think it would then be a simple matter of substituting arm64 instead of x86 in the relevant lines of the recipe. Using
regex101.com to test suggests this should indeed be true.
However if I do this then the otherwise identical URLTextSearcher processor code fails to match for arm64 and therefore the download recipe fails.
'Cheating' and using x86 purely for the URLTextSearcher in my Arm recipe gets past those errors but the URLDownloader processor fails even though it has the apparent correct URL as per the receipt plist.
I wondered if it might be down to the URLAgent string I was using which told the FileZilla website I was a Mac and originally both recipes had Intel in the agent string but it turns out that web servers seem to ignore the processor part of the agent string and still treat all Macs regardless as Intel. (Tested by using Safari in developer mode and adjusting the agent string and the default page defaults to Intel regardless.) It is possible to download manually in a browser both ARM and Intel versions so the agent field is not blocking that.
I now use a download page which lists all available downloads including Windows and using the URLTextSearcher find and construct the correct Mac URLs.
My recipes are available via the following URLs, suggestions as to what I am presumable doing wrong are much appreciated as this helps me learn for next time.