[5.3] Fix build.php to create zstd packages on macOS#45535
[5.3] Fix build.php to create zstd packages on macOS#45535HLeithner merged 2 commits intojoomla:5.3-devfrom
Conversation
and stop on error.
|
@tecpromotion may you test with Mac? |
|
Maybe the testing instructions should be extended to test if everything works as well as before when using Linux or Windows with WSL, and by a test for some error message, e.g. when changing permissions of the "build/tmp/packages" folder just after it is created (i.e. when you see the message "Create list of changed files from git repository for version") so that there are no writing permissions, which should cause a visible error message. |
|
@muhme Please fix the PHPCS errors reported here: https://ci.joomla.org/joomla/joomla-cms/85015/1/7 |
|
@richard67 Thank you for first view 👍 PHPCS is now green and test instructions are extended, do you like to test on Windows? |
|
@muhme I don't build on Windows because I don't use WSL. I can only test on Ubuntu. |
|
I have tested this item ✅ successfully on 37327e3 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45535. |
|
I have tested this item ✅ successfully on 37327e3 Instead of using For the result without this PR, that was the 5.3-dev branch, for the result with this PR I had fetched this PR into a local branch and checked out that branch. Test results 1. and 2.: Skipped because not a Mac. 3.a and b: Success. Error message is shown, and build script stops. 4.: I've unpacked and verified ALL packages and compared with and without this PR. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45535. |
|
@tecpromotion I assume you have tested only with Mac, right? Or have you also tested with WSL? @muhme I think we should get another test with WSL, then we are safe. |
Yes, Mac only. |
|
@tecpromotion and @richard67 Thanks for testing 👍 From my point of view two tests are enough, I have also tested on Intel Mac, Apple Silicon Mac and Windows 11 WSL 2, which in the end is also simply Ubuntu. But if someone wants to retest with Windows 11 WSL 2, welcome ... |
|
thanks |
Before this commit, the zip commands displayed every added file. Before joomla#45535, the output of the zip command with all added file names was suppressed by redirecting stdout to /dev/null. The same behaviour is now restored with the -q option.

Summary of Changes
build.php does not create zstd packages on macOS with default BSD tar:
In addition, the script does not stop in any environment if an error occurs, e.g. if zstd or the zip application is missing:
tarandzstdcalls, working in all environments, including macOS BSD-tar.system()command should be check for error status and the script failif a system commands fail. I can implement this in a follow-up PR. For example currently there is an
to-be-ignored error:
Testing Instructions
1. If you have a Mac test the error before:
Actual result BEFORE applying this Pull Request
Expected result AFTER applying this Pull Request
2. After applying this PR full testing (including bz2) on macOS, Windows WSL 2 or Ubuntu native, 8 respective 4 archive files are created between 150 and 350 MB:
3. You can check that the script stops with hacking an error in
3.a Change
zstdwithzstdXXXin line 653:You have to get something like:
3.b Set packages directory file mode 0, inserting the
chmodline after line 392mkdir packages:You have to get something like:
4. Unpack one package file and compare with previous build. Same number of files? Same file permissions?
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed