bug PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar muhme
muhme
28 May 2025

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:

Building Joomla_5.3.1-Stable-Update_Package.zip... sh: 1: zip: not found

  • Used is now separate piped tar and zstd calls, working in all environments, including macOS BSD-tar.
  • Tested with (Intel-based):
    • macOS 15.5
    • Windows 11 WSL 2 Ubuntu 22.04
  • For better readability, the shell commands are written without concatenations as one string.
  • From my point of view every system() command should be check for error status and the script fail
    if a system commands fail. I can implement this in a follow-up PR. For example currently there is an
    to-be-ignored error:
    cp: build/fido.jwt: No such file or directory
    

Testing Instructions

1. If you have a Mac test the error before:

php build/build.php --remote=5.3.1

Actual result BEFORE applying this Pull Request

Building Joomla_5.3.1-Stable-Full_Package.tar.zst... tar: Couldn't open  zstd --ultra -22: No such file or directory

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:

php build/build.php --remote=5.3.1 --include-bzip2
ls -l build/tmp/packages
php build/build.php --remote=5.3.1 --include-bzip2 --debug-build
ls -l build/tmp/packages

3. You can check that the script stops with hacking an error in

3.a Change zstd with zstdXXX in line 653:

php build/build.php --remote=5.3.1

You have to get something like:

Building Joomla_5.3.1-Stable-Full_Package.tar.zst... tar: Write error
failed.
ERROR: Command failed (127): tar --create * | zstdXXX --ultra -22 -o ../packages/Joomla_5.3.1-Stable-Full_Package.tar.zst
Output:
sh: zstdXXX: command not found

3.b Set packages directory file mode 0, inserting the chmod line after line 392 mkdir packages:

system('chmod 0 packages');

You have to get something like:

Building Joomla_5.3.1-Stable-Full_Package.zip ... failed.
ERROR: Command failed (15): zip -r ../packages/Joomla_5.3.1-Stable-Full_Package.zip *
Output:
zip I/O error: Permission denied
zip error: Could not create output file (../packages/Joomla_5.3.1-Stable-Full_Package.zip)

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

avatar muhme muhme - open - 28 May 2025
avatar muhme muhme - change - 28 May 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 28 May 2025
Category Repository
avatar muhme
muhme - comment - 28 May 2025

@tecpromotion may you test with Mac?

avatar richard67
richard67 - comment - 28 May 2025

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.

avatar richard67
richard67 - comment - 28 May 2025

@muhme Please fix the PHPCS errors reported here: https://ci.joomla.org/joomla/joomla-cms/85015/1/7

avatar richard67 richard67 - change - 28 May 2025
Title
[53] Fix build.php to create zstd packages on macOS
[5.3] Fix build.php to create zstd packages on macOS
avatar richard67 richard67 - edited - 28 May 2025
avatar muhme muhme - change - 28 May 2025
Labels Added: bug PR-5.3-dev
avatar muhme muhme - change - 28 May 2025
The description was changed
avatar muhme muhme - edited - 28 May 2025
avatar muhme
muhme - comment - 28 May 2025

@richard67 Thank you for first view 👍 PHPCS is now green and test instructions are extended, do you like to test on Windows?

avatar richard67
richard67 - comment - 28 May 2025

@muhme I don't build on Windows because I don't use WSL. I can only test on Ubuntu.

avatar tecpromotion tecpromotion - test_item - 28 May 2025 - Tested successfully
avatar tecpromotion
tecpromotion - comment - 28 May 2025

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.

Bildschirmfoto 2025-05-28 um 18 30 04

avatar richard67 richard67 - test_item - 29 May 2025 - Tested successfully
avatar richard67
richard67 - comment - 29 May 2025

I have tested this item ✅ successfully on 37327e3

I've tested on Ubuntu.

Instead of using php build/build.php --remote=5.3.1 to build with the 5.3.1 tag, I've used php ./build/build.php --remote=HEAD to build with the current local branch.

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.
The packages show only the usual differences which you also get when running 2 builds on the same branch, e.g. 5.3-dev.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45535.
avatar richard67
richard67 - comment - 29 May 2025

@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.

avatar tecpromotion
tecpromotion - comment - 29 May 2025

@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.

avatar muhme
muhme - comment - 29 May 2025

@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 ...

avatar HLeithner HLeithner - close - 29 May 2025
avatar HLeithner HLeithner - merge - 29 May 2025
avatar HLeithner HLeithner - change - 29 May 2025
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-05-29 14:25:47
Closed_By HLeithner
avatar HLeithner
HLeithner - comment - 29 May 2025

thanks

Add a Comment

Login with GitHub to post a comment