Skip to content

Commit 98d7f09

Browse files
authored
Merge pull request #1580 from infosiftr/alpine3.22
Add Alpine 3.22 (remove Alpine 3.20)
2 parents 4c0c395 + 9c90483 commit 98d7f09

File tree

75 files changed

+103
-36
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+103
-36
lines changed

8.1/alpine3.20/cli/Dockerfile renamed to 8.1/alpine3.22/cli/Dockerfile

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8.1/alpine3.20/fpm/Dockerfile renamed to 8.1/alpine3.22/fpm/Dockerfile

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8.1/alpine3.20/zts/Dockerfile renamed to 8.1/alpine3.22/zts/Dockerfile

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8.2/alpine3.20/cli/Dockerfile renamed to 8.2/alpine3.22/cli/Dockerfile

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8.2/alpine3.20/fpm/Dockerfile renamed to 8.2/alpine3.22/fpm/Dockerfile

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8.2/alpine3.20/zts/Dockerfile renamed to 8.2/alpine3.22/zts/Dockerfile

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8.3/alpine3.20/cli/Dockerfile renamed to 8.3/alpine3.22/cli/Dockerfile

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8.3/alpine3.20/fpm/Dockerfile renamed to 8.3/alpine3.22/fpm/Dockerfile

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8.3/alpine3.20/zts/Dockerfile renamed to 8.3/alpine3.22/zts/Dockerfile

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8.4/alpine3.20/cli/Dockerfile renamed to 8.4/alpine3.22/cli/Dockerfile

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8.4/alpine3.20/fpm/Dockerfile renamed to 8.4/alpine3.22/fpm/Dockerfile

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8.4/alpine3.20/zts/Dockerfile renamed to 8.4/alpine3.22/zts/Dockerfile

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile-linux.template

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@
1212
;
1313
def is_alpine:
1414
env.from | startswith("alpine")
15+
;
16+
def rcVersion:
17+
env.version | rtrimstr("-rc")
18+
;
19+
def need_patch_11678:
20+
# https://github.com/docker-library/php/pull/1552
21+
# https://github.com/php/php-src/issues/11678 "Build fails on musl 1.2.4 - lfs64" stream_cookie_seeker
22+
# https://github.com/php/php-src/issues/14834 "Error installing PHP when --with-pear is used" xml errors
23+
is_alpine and rcVersion == "8.1"
24+
;
25+
def need_patch_18743:
26+
# https://github.com/docker-library/php/pull/1580
27+
# https://github.com/php/php-src/issues/18743 "Incompatibility in Inline TLS Assembly on Alpine 3.22 with zend_jit_ir.c"
28+
env.variant == "zts" # only needed for ZTS builds
29+
and is_alpine
30+
and (env.from != "alpine:3.21") # only needed for Alpine 3.22+
31+
and (
32+
IN(rcVersion; "8.1", "8.2")
33+
or IN(.version; "8.3.22", "8.4.8") # https://github.com/docker-library/php/pull/1580#issuecomment-2955259172
34+
)
1535
-}}
1636
FROM {{ env.from }}
1737

@@ -190,7 +210,7 @@ ENV GPG_KEYS {{
190210
"39B6 4134 3D8C 104B 2B14 6DC3 F9C3 9DC0 B969 8544", # ramsey
191211
"F1F6 9223 8FBC 1666 E5A5 CCD4 199F 9DFE F6FF BAFD" # patrickallaert
192212
],
193-
}[env.version | rtrimstr("-rc")] // error("missing GPG keys for " + env.version)
213+
}[rcVersion] // error("missing GPG keys for " + rcVersion)
194214
| map(gsub(" "; ""))
195215
| join(" ")
196216
}}
@@ -261,8 +281,8 @@ RUN set -eux; \
261281
"libsodium-dev",
262282
"libxml2-dev",
263283
"openssl-dev",
264-
# https://github.com/docker-library/php/pull/1552
265-
if env.version | rtrimstr("-rc") == "8.1" then "patch", "patchutils" else empty end,
284+
# https://github.com/docker-library/php/pull/1552 (11678) & https://github.com/docker-library/php/pull/1580 (14834)
285+
if need_patch_11678 or need_patch_18743 then "patch", "patchutils" else empty end,
266286
"readline-dev",
267287
"sqlite-dev",
268288
# https://github.com/docker-library/php/issues/888
@@ -306,7 +326,7 @@ RUN set -eux; \
306326
; \
307327
docker-php-source extract; \
308328
cd /usr/src/php; \
309-
{{ if is_alpine and (env.version | rtrimstr("-rc") == "8.1") then ( -}}
329+
{{ if need_patch_11678 then ( -}}
310330
# Apply patches; see https://github.com/docker-library/php/pull/1552
311331
# https://github.com/php/php-src/issues/11678
312332
curl -fL 'https://github.com/php/php-src/commit/577b8ae4226368e66fee7a9b5c58f9e2428372fc.patch?full_index=1' -o 11678.patch; \
@@ -318,6 +338,23 @@ RUN set -eux; \
318338
echo 'ed10a1b254091ad676ed204e55628ecbd6c8962004d6185a1821cedecd526c0f *14834.patch' | sha256sum -c -; \
319339
filterdiff -x '*/NEWS' 14834.patch | patch -p1; \
320340
rm 14834.patch; \
341+
{{ ) else "" end -}}
342+
{{
343+
if need_patch_18743 then
344+
# https://github.com/docker-library/php/pull/1580#issuecomment-2957191901
345+
{
346+
"8.1": { url: "https://github.com/php/php-src/commit/6b105d4bc57e20a2472c9a6ff11fba32768556d4.patch?full_index=1", sha256: "037e1610ae5d444e9a8c3ecd9d5f0cd215fd0aac90bdd7b9f0b259bffdf3566b" },
347+
"8.4": { url: "https://github.com/php/php-src/commit/4c7220322bc74b0fc8416e1958cadd7bc51fe1b7.diff?full_index=1", sha256: "a19e795b24c52d4d1aa3d45b67339e1b62a5365b37cf4418b83e2709fc98bcb5" },
348+
}[rcVersion]
349+
// { url: "https://github.com/php/php-src/commit/b3c8afe272a6919248986c703c2e1defc73ff707.patch?full_index=1", sha256: "b334f73434c9732a4b27a42eb5d417e10df842e854c02a3e753b2479f8978bf5" }
350+
| (
351+
-}}
352+
# https://github.com/php/php-src/issues/18743 "Incompatibility in Inline TLS Assembly on Alpine 3.22 with zend_jit_ir.c"
353+
# https://github.com/docker-library/php/pull/1580
354+
curl -fL {{ .url | @sh }} -o 18743.patch; \
355+
echo {{ "\(.sha256) *18743.patch" | @sh }} | sha256sum -c -; \
356+
filterdiff -x '*/NEWS' 18743.patch | patch -p1; \
357+
rm 18743.patch; \
321358
{{ ) else "" end -}}
322359
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
323360
{{ if is_alpine then "" else ( -}}
@@ -341,7 +378,7 @@ RUN set -eux; \
341378
# https://github.com/docker-library/php/issues/822
342379
--with-pic \
343380
\
344-
{{ if env.version | rtrimstr("-rc") == "8.1" then ( -}}
381+
{{ if rcVersion == "8.1" then ( -}}
345382
# --enable-ftp is included here for compatibility with existing versions. ftp_ssl_connect() needed ftp to be compiled statically before PHP 7.0 (see https://github.com/docker-library/php/issues/236).
346383
--enable-ftp \
347384
{{ ) else "" end -}}
@@ -375,7 +412,7 @@ RUN set -eux; \
375412
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
376413
--with-pear \
377414
\
378-
{{ if env.version | rtrimstr("-rc") | IN("8.1", "8.2") then ( -}}
415+
{{ if rcVersion | IN("8.1", "8.2") then ( -}}
379416
# bundled pcre does not support JIT on riscv64 until 10.41 (php 8.3+)
380417
# https://github.com/PCRE2Project/pcre2/commits/pcre2-10.41/src/sljit/sljitNativeRISCV_64.c
381418
# https://github.com/php/php-src/tree/php-8.3.0/ext/pcre/pcre2lib
@@ -412,7 +449,7 @@ RUN set -eux; \
412449
--enable-zts \
413450
# https://externals.io/message/118859
414451
--disable-zend-signals \
415-
{{ if env.version | rtrimstr("-rc") | IN("8.1", "8.2") then ( -}}
452+
{{ if rcVersion | IN("8.1", "8.2") then ( -}}
416453
--enable-zend-max-execution-timers \
417454
{{ ) else "" end -}}
418455
{{ ) else "" end -}}

versions.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
"bullseye/apache",
1414
"bullseye/fpm",
1515
"bullseye/zts",
16+
"alpine3.22/cli",
17+
"alpine3.22/fpm",
18+
"alpine3.22/zts",
1619
"alpine3.21/cli",
1720
"alpine3.21/fpm",
18-
"alpine3.21/zts",
19-
"alpine3.20/cli",
20-
"alpine3.20/fpm",
21-
"alpine3.20/zts"
21+
"alpine3.21/zts"
2222
]
2323
},
2424
"8.1-rc": null,
@@ -36,12 +36,12 @@
3636
"bullseye/apache",
3737
"bullseye/fpm",
3838
"bullseye/zts",
39+
"alpine3.22/cli",
40+
"alpine3.22/fpm",
41+
"alpine3.22/zts",
3942
"alpine3.21/cli",
4043
"alpine3.21/fpm",
41-
"alpine3.21/zts",
42-
"alpine3.20/cli",
43-
"alpine3.20/fpm",
44-
"alpine3.20/zts"
44+
"alpine3.21/zts"
4545
]
4646
},
4747
"8.2-rc": null,
@@ -59,12 +59,12 @@
5959
"bullseye/apache",
6060
"bullseye/fpm",
6161
"bullseye/zts",
62+
"alpine3.22/cli",
63+
"alpine3.22/fpm",
64+
"alpine3.22/zts",
6265
"alpine3.21/cli",
6366
"alpine3.21/fpm",
64-
"alpine3.21/zts",
65-
"alpine3.20/cli",
66-
"alpine3.20/fpm",
67-
"alpine3.20/zts"
67+
"alpine3.21/zts"
6868
]
6969
},
7070
"8.3-rc": null,
@@ -82,12 +82,12 @@
8282
"bullseye/apache",
8383
"bullseye/fpm",
8484
"bullseye/zts",
85+
"alpine3.22/cli",
86+
"alpine3.22/fpm",
87+
"alpine3.22/zts",
8588
"alpine3.21/cli",
8689
"alpine3.21/fpm",
87-
"alpine3.21/zts",
88-
"alpine3.20/cli",
89-
"alpine3.20/fpm",
90-
"alpine3.20/zts"
90+
"alpine3.21/zts"
9191
]
9292
},
9393
"8.4-rc": null

versions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ for version in "${versions[@]}"; do
8282
for suite in \
8383
bookworm \
8484
bullseye \
85+
alpine3.22 \
8586
alpine3.21 \
86-
alpine3.20 \
8787
; do
8888
for variant in cli apache fpm zts; do
8989
if [[ "$suite" = alpine* ]]; then

0 commit comments

Comments
 (0)