Skip to content

Install binaries under $SWIFT_PREFIX/usr/bin instead of /usr/bin #455

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kkebo
Copy link

@kkebo kkebo commented Mar 30, 2025

Motivation

fixes #383

This prevents some binaries from being unintentionally overwritten by the system package manager.

Changes

I added the following changes to 6.0 Dockerfiles, 6.1 Dockerfiles, nightly-6.1 Dockerfiles, and nightly-main Dockerfiles.

  • Extract a tarball into $SWIFT_PREFIX instead of /
    • $SWIFT_PREFIX is /opt/swift/{version number} by default.
  • Set PATH="${SWIFT_PREFIX}/usr/bin:${PATH}" and LD_LIBRARY_PATH="${SWIFT_PREFIX}/usr/lib/swift/linux"
  • Create symbolic links of $SWIFT_PREFIX/usr/bin/* to /usr/bin/* for existing users who expect swift to be in /usr/bin.

@kkebo
Copy link
Author

kkebo commented Mar 31, 2025

I have to change the files added in #456 as well.

#456

@kkebo kkebo force-pushed the install-binaries-under-swift-prefix branch from 984462a to fd82e29 Compare April 1, 2025 13:43
@kkebo
Copy link
Author

kkebo commented Apr 1, 2025

I have to change the files added in #456 as well.

I pushed 0628abe.

@kkebo kkebo force-pushed the install-binaries-under-swift-prefix branch from 0628abe to 6902af9 Compare April 7, 2025 15:54
kkebo added 2 commits April 24, 2025 20:07
This prevents some binaries from being unintentionally overwritten by the system package manager. Symbolic links are also placed in the old directory (`/usr/bin`) for compatibility.
…/bin`

This prevents some binaries from being unintentionally overwritten by the system package manager. Symbolic links are also placed in the old directory (`/usr/bin`) for compatibility.
@kkebo kkebo force-pushed the install-binaries-under-swift-prefix branch from 6902af9 to 0225a99 Compare April 24, 2025 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider changing the installation location
1 participant