-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider changing the installation location #383
Comments
This is a known issue with the Swift toolchain, which is why Fedora installs it in |
Thank you for the information. However, when it comes to swift-docker, I think this problem can be solved with small modifications like this: diff --git a/nightly-main/ubuntu/22.04/Dockerfile b/nightly-main/ubuntu/22.04/Dockerfile
index 31496b5..1088ee2 100644
--- a/nightly-main/ubuntu/22.04/Dockerfile
+++ b/nightly-main/ubuntu/22.04/Dockerfile
@@ -59,8 +59,8 @@ RUN set -e; \
&& curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
# - Unpack the toolchain, set libs permissions, and clean up.
- && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \
- && chmod -R o+r /usr/lib/swift \
+ && tar -xzf latest_toolchain.tar.gz --directory /usr/local --strip-components=2 \
+ && chmod -R o+r /usr/local/lib/swift \
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
&& apt-get purge --auto-remove -y curl |
Feel free to submit a pull, and someone may review it. |
I was wrong. My suggestion will be a breaking change if there's a user who expects |
That's why Fedora adds symlinks into |
I don't think so. Fedora's package manager always needs to install packages under |
Right, Fedora worked around this issue already by installing the Swift toolchain into |
It might be worth considering if we could do a one-time change of install locations for Swift 6 cc @shahmishal |
Like swift-ci images, if Swift executables are installed into However, we may not be able to use symbolic links for that purpose. Because symlinking Swift executables does not work in Swift 6.0 due to swiftlang/swift#70932 at least for now. It has been fixed on the main branch, but not on the release/6.0 branch. |
Currently, a swift toolchain is installed under
/usr/bin
.https://github.com/apple/swift-docker/blob/88941f87eaded894699adae832cd0a820ee544ae/nightly-6.0/ubuntu/22.04/Dockerfile#L62
This is a problem because apt packages overwrites them. For example,
apt-get install llvm
overwrites Swift's builtin LLVM tools by themselves so that LLVM tools is downgraded from 17 to 14.The text was updated successfully, but these errors were encountered: