Adding two exit early safeguards in the *nix configuration build script:
1) Given the initial cd into the build tree fails (the project root),
the `buildconf` script exits with non-zero status (failure).
2) Given the grep command does not exist or `configure.ac` AC_INIT [1]
expectations are unmet, the buildconf script exits non-zero.
Additionally quoting the pathname to cd into and the empty CD_PATH
parameter for portability, also for systems that are using a
non-portable pathname [2] for the build tree.
The initial CD safeguard has been applied to the `buildconf` and
four more scripts:
- build/genif.sh
- scripts/dev/credits
- scripts/dev/genfiles
- scripts/dev/makedist
Rationale:
Cd-ing into the project root should always prematurely exit w/ FAILURE
as a required precondition for its invocation has not been met. This
should never go unnoticed as it always requires user intervention.
Similar and more specifically to the PHP build on *nix systems, the
grep command is required early to obtain the `php_extra_version` from
configure.ac. Previously, if the grep command is missing (or failing
due to not matching the line with the AC_INIT macro [1]), the internal
dev parameter would always be zero (0) which can easily result in the
situation that the configure script is not being rebuilt. This is
cumbersome as the rebuild of a configure script is more likely required
with checked-out dev versions under change rather than an already
properly set-up build environment on a dedicated build or release
system. Missing the fact that either the grep utility is missing or
the expectation of having the AC_INIT macro in configure.ac is unmet
should never go unnoticed as it always requires user intervention.
[1]: https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Initializing-configure.html
[2]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_271
Closes GH-16717.
This syncs few minor left-overs in "Autotools" related files:
- redundant middle newlines removed (in man pages the duplicate newlines
are also ignored and are not visible in the man page anyway)
- Minor mixed indentation synced
[skip ci]
* Handle BSD checksum utilities
The BSDs have different checksum utilities than GNU systems do. If we
don't see the GNU checksum utilities installed, use the BSD ones, as
their output is compatible enough.
Addresses part of GH-14688.
* Prefer GNU touch
BSD touch at least in macOS does not handle local timezone in the
timestamp (like 2024-06-27T10:26:23-03:00). As such, try GNU touch (as
ports systems almost always prefix with g if coreutils is installed) and
prefer that if available. It's not the end of the world though if GNU
touch isn't available, as BSD touch on some systems may support it, and
if it doesn't, then it's just timestamps, nothing too serious.
The --no-generation-date flag is a common re2c flag used in all re2c
invocations. This adds the 2nd optional argument to PHP_PROG_RE2C M4
macro in BC manner to set the default re2c command-line options and sets
the default RE2C_FLAGS similarly on Windows.
* Include the source location in Closure names
This change makes stack traces involving Closures, especially multiple
different Closures, much more useful, because it's more easily visible *which*
closure was called for a given stack frame.
The implementation is similar to that of anonymous classes which already
include the file name and line number within their generated classname.
* Update scripts/dev/bless_tests.php for closure naming
* Adjust existing tests for closure naming
* Adjust tests for closure naming that were not caught locally
* Drop the namespace from closure names
This is redundant with the included filename.
* Include filename and line number as separate keys in Closure debug info
* Fix test
* Fix test
* Include the surrounding class and function name in closure names
* Fix test
* Relax test expecations
* Fix tests after merge
* NEWS / UPGRADING
- ext/bcmath/libbcmath removed, because it is forked and maintained in
php-srx. There doesn't seem to be any maintained upstream libbcmath.
- Added bundled ext/dom/lexbor.
- Updated JIT bundled files for ext/opcache/jit/ir.
- Adds -Wall YFLAGS when using the scripts/dev/genfiles to have similar
output there in case things need to be fixed.
- Syncs @ suppression operators across the bison calls.
This reduces the amount of system-dependent data within the tarball and makes
it more reproducible. Instead of the information of the release manager that
generates the tarball, the tarball will include the fixed 0:0 value as
owner:group.
When the check_parameters.php script meets an error it prints it
out but the exit value is not affected, it's still 0. This does
not fly with projects that want to run this script as a part of
their test suite.
Therefore, make the script return 0 on success and 2 if any error
was reported.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Closes GH-8790.
This format matches against null bytes, and prevents the test
expectation from being interpreted as binary data.
bless_tests.php will automatically replace \0 with %0 as well.
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
The output normalization of bless_tests.php only detected absolute Unix
filenames; we extend this for absolute Windows filenames, regardless of
the platform we're running on (tests may have been run on Windows, but
bless_tests.php may be run from WSL or a Linux VM, for instance).
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Using this requires care! The zpp implementation for this union
must be consistent with the arginfo implementation!
Apart from array|object, this is probably only the case for
int|float right now.