swiftly icon indicating copy to clipboard operation
swiftly copied to clipboard

`swiftly init` can't detect `ca-certificates` on openSUSE despite it being installed

Open zk-pre opened this issue 9 months ago • 2 comments

On OpenSUSE Tumbleweed following the new installation instructions, on the step ./swiftly init I get the following error:

Error: The ca-certificates package is not installed. Swiftly won't be able to trust the sites to
perform its downloads.

You can install the ca-certificates package on your system to fix this.

I've double-checked and seen that ca-certificates are already installed.

Is there a flag to temporarily disable this check for now?

zk-pre avatar Mar 29 '25 08:03 zk-pre

It appears that swiftly only looks in these directories: https://github.com/swiftlang/swiftly/blob/bd6884316817e400a0ec512599f046fa437e9760/Sources/LinuxPlatform/Linux.swift#L57 but openSUSE also stores them in /var/lib/ca-certificates/.

zk-pre avatar Mar 29 '25 08:03 zk-pre

Swiftly checks these directories on Linux to provide a cleaner error message, but the same problem will be found with openSUSE with the Swift NIO / Async HTTP Client code that looks for the trusted root CA's of the system. These paths came originally from that code, duplicated here to provide something better than a low-level error.

Even if this error didn't occur, I don't know that Swiftly will be particularly useful on the openSUSE platform since there are no Swift toolchains that are produced in swift.org for openSUSE. Until it's a fully supported Swift platform I suspect that there will be various problems up and down the toolchain. It's just that swiftly is the very first thing to be run.

cmcgee1024 avatar Mar 29 '25 17:03 cmcgee1024