New Swift Package Repository for Ubuntu/Debian Linux Distributions

Awesome! :clap:t2:

Swift Community Apt Repository Update

Hi everybody, hope you all had an awesome WWDC 2024 week.

There has been some big news for Swift in the last week with the announcement of official support for Debian 12 Bookworm and Ubuntu 24.04 Noble.

This means that all the Swift 5.10.1 packages in the Swift Community Apt Repository are now created from the official Swift.org releases.
When the .deb packages are created from the official swift toolchains none of the files, binaries or libraries are modified in any way.

Swift 5.10.1 Release is available for :-

  • Debian 12 bookworm
    and all Debian 12 based OS's such as RaspberryPi OS etc.

  • Ubuntu 20.04, 22.04, 24.04
    and all Ubuntu based OS's such as Linux Mint, Zorin, POP! OS etc.

Thankyou.

17 Likes

I'm not sure if this is a bug or is an expected gap between the official Swift.org releases and the ARM repo, but I noticed that the "swift sdk" command does not work as described in a Swift.org blog post about it.

In particular, this post on the static linux SDK says I can use the swift sdk list command and other swift sdk command to get configured to build static linked executables on linux.

I am running Debian 12, and I have swift version 5.10.1 installed via the Swift community Apt Repository. To be exact, I mean I am using the deb repo whose URL is https://packagecloud.io/swift-arm/release/debian/ bookworm main.

But when I run swift sdk list, I get an error error: unable to invoke subcommand swift-sdk (No such file or directory).

1 Like

swift sdk command is only available in 6.0, in 5.10 it still has a prefix and is available as swift experimental-sdk.

But that's irrelevant for your case if you have to stick to 5.10, since static Swift SDK for Linux is not available for 5.10.

4 Likes

Hi!

Is there any expectation for Swift 6 support on swiftlang.xyz?

KR Maarten

@maartene, Swift 6 has been available on the repository for over a month.
Are you not able to find it?

Hi Neil,

When I run sudo apt upgrade and sudo apt update on an x64 Linux machine, it remains at swift version 5.10.1.

Perhaps I need to 'nudge' it into upgrading to Swift 6? Or perhaps an x64 package is not yet available?

what OS version are you running?

This is on an Ubuntu 22.04.5 (running in WSL) where Swift was installed previously.

Is it supposed to auto-update from 5.10 to 6.0? Or do I need to do anything special?

Just tried it also in a clean GH Codespace (Ubuntu 20.04.6) and there it picked up version 6 without an issue. :+1:t2:

I don't have any experience with WSL and haven't used a Windows PC since Windows 95 so I won't be much help in this area.

I got it working!
There was also a Swiftly installed version of swift installed, causing confusion.

2 Likes

Just dropping in to say that I had to look in three places to know which distributions are supported:

1. Started at swiftlang.xyz

Ubuntu - arm64/amd64
- focal / 20.04
- jammy / 22.04
- lunar / 23.04

2. Then arrived at the first post

3. Then scrolled up from the end to the most recent update

Maybe it'd be simpler to sync the info in the first post with the latest update, and then only link to the thread from the site?

Hi Andreas,

Thanks for the feedback.
I will update swiftlang.xyz to reflect the latest OS and distribution support information.
As for syncing the information in the first post to the last, this is not possible as earlier posts can not be edited.
The best option here I think is to change the link on swiftlang.xyz to go straight to the last post instead of the first post.
I will make these changes today.

Neil.

2 Likes

Hello everyone. I noticed that the repository is now inactive. I sincerely appreciate all the dedication you had towards it while it was active. I don't want to go into the reasons, because I respect whatever they may be. Just in case you all have an alternative, I'll be happy to hear about it

2 Likes

@futurejones Is this offline for maintenance, or permanently?

1 Like

I feel like I've missed an announcement somewhere (well... here). Or is this only an assumption that since there has occurred a problem in the world of software, that software is now cancelled? :slightly_smiling_face:

Or has the described problem been ongoing for some time?

1 Like

Btw, I just noticed that @SteveM got Swift 5.8.1 into the upcoming Ubuntu 25.04 packages last week, the first Swift package that got into the official Ubuntu packages that I know of.

Congrats to Steve, :smile: thanks for all the work you put into this, as getting a toolchain into the Debian packages seems a very involved process.

4 Likes

FYI: swiftly is now my preferred installation method, but Neil's repository had more supported platforms.

2 Likes

I think we should seriously consider resurrecting a Debian/Ubuntu repo that can repackage Swift releases for x86_64 and aarch64, if Neil's repo is indeed offline and he has no plans of bringing it back.

@SteveM getting Swift into the 25.04 repos is BIG to be sure, but having a deb repo for all previous versions still out there is a great way to keep Swift as accessible as possible for users.

Bummer… Swift 6 introduces some heavy regressions for me on Linux. Does anyone have an archive or a mirror of the repository?

1 Like