Source: php8.1 Version: 8.1.0-1 Severity: serious Tags: patch Justification: policy 4.6
When dtrace fails, the build system continues anyway. Such behaviour is in violation with policy section 4.6 and thus justifies a release-critical bug report. The actual issue resides in build/php.m4 line 2391 and following: | $ac_bdir[$]ac_hdrobj: $abs_srcdir/$ac_provsrc | CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) -e 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@ The dtrace call is separated from the sed invocation using &&. While the combination of "false && true" results in a non-zero exit, this does not terminate the shell even with -e set. See the following example: $ sh -c "set -e; false && true; echo huh" huh $ As such, a dtrace failures is swallowed and this causes the policy violation. To fix this, one can invoke the two commands separately: | $ac_bdir[$]ac_hdrobj: $abs_srcdir/$ac_provsrc | CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak | \$(SED) -e 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@ I'm attaching a patch for your convenience. Helmut
--- php8.1-8.1.0.orig/build/php.m4 +++ php8.1-8.1.0/build/php.m4 @@ -2389,7 +2389,8 @@ $abs_srcdir/$ac_provsrc:; $ac_bdir[$]ac_hdrobj: $abs_srcdir/$ac_provsrc - CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) -e 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@ + CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak + \$(SED) -e 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@ \$(PHP_DTRACE_OBJS): $ac_bdir[$]ac_hdrobj