mod_php_install.sh: apply security patches for PHP 8.1.34.
Apply php-8.1.34-cve-2026-109618-109619.patch, php-8.1.34-sury-9.patch and php-8.1.34-cve-2026-129291.patch (in this order - otherwise a hunk of main/rfc1867.c fails) when installing PHP 8.1.34. Abort if a patch is missing, is an HTML page or does not apply. Replace the three patch files, which were saved GitHub HTML pages, by the raw patches from omega8cc/boa (aegir/patches/php-sec). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ed7e9a202c
commit
985d073613
4 files changed
+10056
-1836
No files matched your search
@@ -6399,6 +6399,49 @@ else
|
||||
echo_skipped
|
||||
fi
|
||||
|
||||
# - Security patches for PHP 8.1.34 (source: omega8cc/boa, aegir/patches/php-sec)
|
||||
# -
|
||||
# - php-8.1.34-cve-2026-109618-109619.patch
|
||||
# - php-8.1.34-sury-9.patch (backports from 8.2.x, Debian/sury)
|
||||
# - php-8.1.34-cve-2026-129291.patch (php-fpm)
|
||||
# -
|
||||
# - Order matters: the CVE-2026-109618/109619 patch MUST be applied before
|
||||
# - 'php-8.1.34-sury-9.patch', otherwise hunk #4 of main/rfc1867.c fails.
|
||||
# - In the order below all three apply cleanly (no fuzz) to php-8.1.34.
|
||||
# -
|
||||
# - The patches are applied to the unpacked tree '${_srcdir}/php-${VERSION}'
|
||||
# - (not $_builddir), because with apache mod_php the tree is moved to
|
||||
# - $_builddir only further below.
|
||||
# -
|
||||
# - Security fixes: if one fails, abort - never build PHP 8.1.34 without them.
|
||||
# -
|
||||
if [[ "$VERSION" = "8.1.34" ]]; then
|
||||
for _patch_file in \
|
||||
php-8.1.34-cve-2026-109618-109619.patch \
|
||||
php-8.1.34-sury-9.patch \
|
||||
php-8.1.34-cve-2026-129291.patch ; do
|
||||
echononl "\tApply ${_patch_file}"
|
||||
if [[ ! -f "${_srcdir}/${_patch_file}" ]] ; then
|
||||
echo_failed
|
||||
fatal "Can't find patchfile '${_srcdir}/${_patch_file}'"
|
||||
fi
|
||||
if grep -qi '<html' "${_srcdir}/${_patch_file}" ; then
|
||||
echo_failed
|
||||
fatal "'${_srcdir}/${_patch_file}' is an HTML page, not a patch!\n\t (Download the 'raw' file, not the GitHub page)"
|
||||
fi
|
||||
patch -d ${_srcdir}/php-${VERSION} -p1 < ${_srcdir}/${_patch_file} > $tmp_err_msg 2>&1
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
fatal "$(cat $tmp_err_msg)"
|
||||
fi
|
||||
done
|
||||
else
|
||||
echononl "\tApply PHP 8.1.34 security patches"
|
||||
echo_skipped
|
||||
fi
|
||||
|
||||
|
||||
echononl "\tChange ownership of unpacked dirextory \"php-$VERSION\""
|
||||
chown -R root.root php-$VERSION > $tmp_err_msg 2>&1
|
||||
|
||||
Reference in new issue
Block a user