bug: update-ca-certificates no longer found since v6.4.0 #628

Closed
opened 2025-07-01 09:27:21 +00:00 by viceice · 8 comments
Owner

Can you reproduce the bug on the Forgejo test instance?

No

Description

The update-ca-certificates executable is no longer preinstalled on the image which i would consider a breaking change.

looks like it#s caused by alpine v1.21 or v1.22 update

Forgejo Version

unrelated

Runner Version

6.4.0

How are you running Forgejo?

unrelated

How are you running the Runner?

from docker image

Logs

No response

Workflow file

No response

### Can you reproduce the bug on the Forgejo test instance? No ### Description The `update-ca-certificates` executable is no longer preinstalled on the image which i would consider a breaking change. looks like it#s caused by alpine v1.21 or v1.22 update - https://code.forgejo.org/forgejo/runner/pulls/591 - https://code.forgejo.org/forgejo/runner/pulls/616 ### Forgejo Version unrelated ### Runner Version 6.4.0 ### How are you running Forgejo? unrelated ### How are you running the Runner? from docker image ### Logs _No response_ ### Workflow file _No response_
Contributor
earl-warren:~$ docker run --rm data.forgejo.org/oci/alpine:3.21 which update-ca-certificates || echo not found
not found
earl-warren:~$ docker run --rm data.forgejo.org/oci/alpine:3.22 which update-ca-certificates || echo not found
not found
```sh earl-warren:~$ docker run --rm data.forgejo.org/oci/alpine:3.21 which update-ca-certificates || echo not found not found earl-warren:~$ docker run --rm data.forgejo.org/oci/alpine:3.22 which update-ca-certificates || echo not found not found ```
Contributor
earl-warren:~$ docker run --rm data.forgejo.org/forgejo/runner:6.4.0 which update-ca-certificates || echo not found
not found
earl-warren:~$ docker run --rm data.forgejo.org/forgejo/runner:6.3.1 which update-ca-certificates || echo not found
/usr/sbin/update-ca-certificates
```sh earl-warren:~$ docker run --rm data.forgejo.org/forgejo/runner:6.4.0 which update-ca-certificates || echo not found not found earl-warren:~$ docker run --rm data.forgejo.org/forgejo/runner:6.3.1 which update-ca-certificates || echo not found /usr/sbin/update-ca-certificates ```
Contributor
earl-warren:~$ docker run -ti --rm data.forgejo.org/oci/alpine:3.20 sh
/ # apk add --no-cache git bash
fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz
(1/17) Installing ncurses-terminfo-base (6.4_p20240420-r2)
(2/17) Installing libncursesw (6.4_p20240420-r2)
(3/17) Installing readline (8.2.10-r0)
(4/17) Installing bash (5.2.26-r0)
Executing bash-5.2.26-r0.post-install
(5/17) Installing ca-certificates (20241121-r1)
(6/17) Installing brotli-libs (1.1.0-r2)
(7/17) Installing c-ares (1.33.1-r0)
(8/17) Installing libunistring (1.2-r0)
(9/17) Installing libidn2 (2.3.7-r0)
(10/17) Installing nghttp2-libs (1.62.1-r0)
(11/17) Installing libpsl (0.21.5-r1)
(12/17) Installing zstd-libs (1.5.6-r0)
(13/17) Installing libcurl (8.12.1-r0)
(14/17) Installing libexpat (2.7.0-r0)
(15/17) Installing pcre2 (10.43-r0)
(16/17) Installing git (2.45.3-r0)
(17/17) Installing git-init-template (2.45.3-r0)
Executing busybox-1.36.1-r29.trigger
Executing ca-certificates-20241121-r1.trigger
OK: 22 MiB in 31 packages
/ # which update-ca-certificates
/usr/sbin/update-ca-certificates
/ # 
```sh earl-warren:~$ docker run -ti --rm data.forgejo.org/oci/alpine:3.20 sh / # apk add --no-cache git bash fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz (1/17) Installing ncurses-terminfo-base (6.4_p20240420-r2) (2/17) Installing libncursesw (6.4_p20240420-r2) (3/17) Installing readline (8.2.10-r0) (4/17) Installing bash (5.2.26-r0) Executing bash-5.2.26-r0.post-install (5/17) Installing ca-certificates (20241121-r1) (6/17) Installing brotli-libs (1.1.0-r2) (7/17) Installing c-ares (1.33.1-r0) (8/17) Installing libunistring (1.2-r0) (9/17) Installing libidn2 (2.3.7-r0) (10/17) Installing nghttp2-libs (1.62.1-r0) (11/17) Installing libpsl (0.21.5-r1) (12/17) Installing zstd-libs (1.5.6-r0) (13/17) Installing libcurl (8.12.1-r0) (14/17) Installing libexpat (2.7.0-r0) (15/17) Installing pcre2 (10.43-r0) (16/17) Installing git (2.45.3-r0) (17/17) Installing git-init-template (2.45.3-r0) Executing busybox-1.36.1-r29.trigger Executing ca-certificates-20241121-r1.trigger OK: 22 MiB in 31 packages / # which update-ca-certificates /usr/sbin/update-ca-certificates / # ```
Contributor

So, indeed, v6.3.1 had ca-certificates indirectly installed by apk add git bash in alpine:3.20 but it no longer is true for alpine:3.22 which is what v6.4.0 uses.

While it would be possible to add ca-certificates to the image, I'm not sure I get why it is a breaking change. How is it not an internal detail?

So, indeed, v6.3.1 had `ca-certificates` indirectly installed by `apk add git bash` in alpine:3.20 but it no longer is true for alpine:3.22 which is what v6.4.0 uses. While it would be possible to add `ca-certificates` to the image, I'm not sure I get why it is a breaking change. How is it not an internal detail?
Author
Owner

i think the problem can be missing ca-certificates, so some remotes won't be trusted? 🤔

i think the problem can be missing `ca-certificates`, so some remotes won't be trusted? 🤔
Author
Owner

ok, in alpine v3.20 libcurl depends on the ca-certificates package, in v3.21 it only depends on ca-certificates-bundle, so only the bundled certificate is installed.

So it's a kind of detail and only breaking for users which try to add their own root certificates for internal use.

ok, in alpine v3.20 `libcurl` depends on the `ca-certificates` package, in v3.21 it only depends on `ca-certificates-bundle`, so only the bundled certificate is installed. So it's a kind of detail and only breaking for users which try to add their own root certificates for internal use. - https://pkgs.alpinelinux.org/package/v3.20/main/x86_64/libcurl - https://pkgs.alpinelinux.org/package/v3.21/main/x86_64/libcurl
Author
Owner

manual adding the required package now

https://github.com/visualon/docker-images/pull/3600/files

manual adding the required package now https://github.com/visualon/docker-images/pull/3600/files
Author
Owner
For reference: - https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/69012/diffs - https://gitlab.alpinelinux.org/alpine/aports/-/issues/16264 - https://gitlab.alpinelinux.org/alpine/aports/-/issues/16980
earl-warren referenced this issue from a commit 2025-07-28 17:10:27 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/runner#628
No description provided.