php: add v7.4.33, v8.3.12 (fix CVEs) (#46829)
* php: add v7.4.33, v8.3.12 * php: mv sbang.patch sbang-7.patch * php: add sbang-8.patch * [@spackbot] updating style on behalf of wdconinc * Replace --with-libiconv= (not recognized) with --with-iconv= --------- Co-authored-by: wdconinc <wdconinc@users.noreply.github.com> Co-authored-by: Bernhard Kaindl <contact@bernhard.kaindl.dev>
This commit is contained in:
parent
625d032e80
commit
ff98c15065
@ -19,15 +19,32 @@ class Php(AutotoolsPackage):
|
||||
|
||||
license("PHP-3.01")
|
||||
|
||||
version("8.3.12", sha256="d5d4e6ffc6d6b2f02a87c45741623e08045ec6509ade44a1033e0f8bbb374119")
|
||||
version("7.4.33", sha256="dfbb2111160589054768a37086bda650a0041c89878449d078684d70d6a0e411")
|
||||
with default_args(deprecated=True):
|
||||
version("7.4.1", sha256="4d9d7c5681bec3af38a935d033657dce09a9913498f8022d7ca163a7f2f493a7")
|
||||
version("7.4.0", sha256="91d34b48025ab9789216df89e247b6904912eeeaeff38c300ef314bdda8920b0")
|
||||
version("7.3.13", sha256="e68b8d9e659f2993eee912f05860e546fdc18e459f31cd2771f404df21285f0b")
|
||||
version("7.3.12", sha256="d0672ea84c0ab184f636acff3230d376d89a2067d59a87a2f1842361ee1f97d6")
|
||||
version("7.3.11", sha256="4d861b2f3bc640ded8b591ce87250161392a6244a3c84042da0c06fd8c500eb2")
|
||||
version("7.2.26", sha256="da132a836cec8021c00f22952e6044d91628ee3d2ef92a95d65cf91bad810600")
|
||||
version("7.2.25", sha256="049b2d291c45cb889d15fcd2bac6da7d15ca5d535d272d2f8879fb834bbf276e")
|
||||
version("7.2.24", sha256="334c9915733f6a29e1462f64038b1b4b1b21cb18f4f5f980add86792b5550ab3")
|
||||
version("7.1.33", sha256="f80a795a09328a9441bae4a8a60fa0d6d43ec5adc98f5aa5f51d06f4522c07fe")
|
||||
version(
|
||||
"7.3.13", sha256="e68b8d9e659f2993eee912f05860e546fdc18e459f31cd2771f404df21285f0b"
|
||||
)
|
||||
version(
|
||||
"7.3.12", sha256="d0672ea84c0ab184f636acff3230d376d89a2067d59a87a2f1842361ee1f97d6"
|
||||
)
|
||||
version(
|
||||
"7.3.11", sha256="4d861b2f3bc640ded8b591ce87250161392a6244a3c84042da0c06fd8c500eb2"
|
||||
)
|
||||
version(
|
||||
"7.2.26", sha256="da132a836cec8021c00f22952e6044d91628ee3d2ef92a95d65cf91bad810600"
|
||||
)
|
||||
version(
|
||||
"7.2.25", sha256="049b2d291c45cb889d15fcd2bac6da7d15ca5d535d272d2f8879fb834bbf276e"
|
||||
)
|
||||
version(
|
||||
"7.2.24", sha256="334c9915733f6a29e1462f64038b1b4b1b21cb18f4f5f980add86792b5550ab3"
|
||||
)
|
||||
version(
|
||||
"7.1.33", sha256="f80a795a09328a9441bae4a8a60fa0d6d43ec5adc98f5aa5f51d06f4522c07fe"
|
||||
)
|
||||
|
||||
depends_on("c", type="build") # generated
|
||||
depends_on("cxx", type="build") # generated
|
||||
@ -39,10 +56,13 @@ class Php(AutotoolsPackage):
|
||||
depends_on("pkgconfig", type="build")
|
||||
depends_on("bison", type="build")
|
||||
depends_on("re2c", type="build")
|
||||
depends_on("bash", type="build")
|
||||
depends_on("libiconv", when="@8:")
|
||||
depends_on("libxml2")
|
||||
depends_on("sqlite")
|
||||
|
||||
patch("sbang.patch")
|
||||
patch("sbang-7.patch", when="@7")
|
||||
patch("sbang-8.patch", when="@8")
|
||||
|
||||
def patch(self):
|
||||
"""
|
||||
@ -68,3 +88,8 @@ def patch(self):
|
||||
def autoreconf(self, spec, prefix):
|
||||
bash = which("bash")
|
||||
bash("./buildconf", "--force")
|
||||
|
||||
@when("@8:")
|
||||
def configure_args(self):
|
||||
args = [f"--with-iconv={self.spec['libiconv'].prefix}"]
|
||||
return args
|
||||
|
42
var/spack/repos/builtin/packages/php/sbang-8.patch
Normal file
42
var/spack/repos/builtin/packages/php/sbang-8.patch
Normal file
@ -0,0 +1,42 @@
|
||||
--- a/ext/phar/phar/pharcommand.inc.org
|
||||
+++ b/ext/phar/phar/pharcommand.inc
|
||||
@@ -68,6 +68,12 @@ class PharCommand extends CLICommand
|
||||
'inf' => '<bang> Hash-bang line to start the archive (e.g. #!/usr/bin/php). The hash '
|
||||
.' mark itself \'#!\' and the newline character are optional.'
|
||||
),
|
||||
+ 'z' => array(
|
||||
+ 'typ' => 'any',
|
||||
+ 'val' => NULL,
|
||||
+ 'inf' => '<bang> Hash-bang line to start the archive for spack. The hash '
|
||||
+ .' mark itself \'#!\' and the newline character are optional.'
|
||||
+ ),
|
||||
'c' => array(
|
||||
'typ' => 'compalg',
|
||||
'val' => NULL,
|
||||
@@ -467,7 +473,7 @@ class PharCommand extends CLICommand
|
||||
*/
|
||||
static function cli_cmd_arg_pack()
|
||||
{
|
||||
- $args = self::phar_args('abcFhilpsxy', 'pharnew');
|
||||
+ $args = self::phar_args('azbcFhilpsxy', 'pharnew');
|
||||
|
||||
$args[''] = array(
|
||||
'typ' => 'any',
|
||||
@@ -572,6 +578,7 @@ class PharCommand extends CLICommand
|
||||
}
|
||||
|
||||
$alias = $this->args['a']['val'];
|
||||
+ $spack_hb = $this->args['z']['val'];
|
||||
$hashbang = $this->args['b']['val'];
|
||||
$archive = $this->args['f']['val'];
|
||||
$hash = $this->args['h']['val'];
|
||||
@@ -583,6 +590,9 @@ class PharCommand extends CLICommand
|
||||
$invregex = $this->args['x']['val'];
|
||||
$input = $this->args['']['val'];
|
||||
|
||||
+ if (isset($spack_hb)) {
|
||||
+ $hashbang = "$spack_hb\n<?php #!$hashbang ?>";
|
||||
+ }
|
||||
$hash = self::phar_check_hash($hash, $privkey);
|
||||
|
||||
$phar = new Phar($archive, 0, $alias);
|
Loading…
Reference in New Issue
Block a user