Swift 5.2.1 for Fedora Linux - an update

Hey all-

As a followup to my earlier post, I wanted to let everyone know that Swift 5.2.1 has been pushed to the Fedora/EPEL 8 repositories[1] and will be landing in your favorite flavor of Fedora/RHEL/CentOS in a couple of weeks, presuming there's no issues found during the testing phase.

The solution was to, well, not fight it. Up to 5.2.1 I had been patching the Swift source to look for binaries in other locations to keep Swift happy while also allowing for Clang/LLVM/LLDB to be installed on the user's machine. As I documented here, I reorganized the package so that eveything goes under /usr/libexec/swift with symlinks for swift, swiftc, and sourcekit-lsp in /usr/bin. The end result is that everything "just works" and the packaging becomes much easier to maintain and providing a good experience for users (I was especially pleased that Sourcekit-LSP worked with NeoVim right away).

Thanks to everyone who gave me encouragement and assistance; it's always great when I'm reminded there's a whole community of folks who are able to jump in when I get stuck!

Ron

[1] Links to the builds if anyone wants to test them:
https://bodhi.fedoraproject.org/updates/FEDORA-2020-579503009b
https://bodhi.fedoraproject.org/updates/FEDORA-2020-97a74de7d6
https://bodhi.fedoraproject.org/updates/FEDORA-2020-aae36b1366
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-42b57fbd27

11 Likes

That's great news! I wish to finish this task successfully. My first version of the package was not accepted. need to patch the sources to compile with python3. also need somehow test the build result .

I also had to patch some sources to run in a pure Python 3 environment; you can use whatever works for you here. One of the biggest Python 3 patches is this one.

Thank you! That's really cool. I'll build a new package on next week.

Do you have commit access? Upstreaming python 3 fixes would be great :-)

I do not; I did have this pull request for the Python 3 fixes but I closed it because I figured it was a lot to work with, I wasn't sure of Python 2 compatibility, and I really wanted this other pull request so I could build from master on Fedora.

I am planning on opening a new pull request for my Python 3 patches; there have been other folks also working on Python 3 patches, and I wonder if maybe I should start a new thread to coordinate. :thinking:

But wait, there's more! For those folks who run Fedora-based Linux on IBM mainframes, you too can now run the latest version of Swift. That brings it up to three architectures; aarch64, x86_64, and now s390x.

Yes please. I'm happy to help you navigate getting the pull request tested and merged.