New Swift Package Repository for Ubuntu/Debian Linux Distributions

@svanimpe It should be ok now, had some power supply issues to the server.

Thanks! I look forward to trying it out.

Swift on Linux really needs more official native packages and easier installation. Maybe RPM and Debs for Swift: Call for the Community - #36 by mishal_shah is a first step?

1 Like

Thanks for the link in Bugs @svanimpe.

Thanks for the repo. I think a link from the website to this thread would help those (like me) who found the website before the thread and wanted to confirm who the author is before sudo piping it to bash.

I'm going to try this out now, one week before breaking it with the 21.10 beta because I also really want horizontal workspaces.

@futurejones I'm looking into adopting this repository for GitHub - pwsacademy/swift-setup: Student-friendly setup instructions for platforms, editors, and IDEs that support Swift..

I'm just wondering what's the average delay between a release on Swift.org and this repository? And what about new Ubuntu releases (21.10 for example)?

Thanks!

New Swift version release time.

@svanimpe The time from official release to upload to the repository should only be a few days. This will vary depending on which version of Debian or Ubuntu you are using.
At the moment, up to and including swift 5.5, Swift.org only has releases for Ubuntu 18.04 and 20.04 and in x86_64(amd64) versions only.
All the other releases in the repository I have to build myself from the source code.
Arm64/Aarch64 versions are fairly straight forward as I already the hardware infrastructure and a Jenkins build CI setup.
For the Debian 10 /11 and Ubuntu 21.04 / 21.10 x86_64 versions I have to spin up some AWS servers for the builds.

New Ubuntu / Debian Releases

I will be adding the new Ubuntu / Debian releases to the repository as soon as possible after they are released.
Ubuntu Impish 21.10 has already been added.
The actual release time will depend whether swift is compatible with the new release.
For example adding Ubuntu Hirsute took a bit of time because a new Hirsute CI build system was required.
Adding Ubuntu Impish was quick and easy because the existing Hirsute builds run without modification on Impish.

Repository Restructuring.

I am in the process of restructuring the repository sections to provide better control of which Swift version is installed.
At the moment the repository has 3 sections -

  • stable
    This was set at 5.3.3
  • main
    This contains the latest official swift release version (was 5.4.3)
  • dev
    This contains developer snapshots.

The concept of a 'stable' version sort of worked until 5.5 was released. This means if we update 'main' to 5.5 then 5.4.3 is no longer available. This can be fixed by updating 'stable' to 5.4 but then 5.3 is not available. In short the idea of a 'stable' version just doesn't work.

Because of the incompatibly between different versions of swift the concept of just a 'main' section containing the latest version of swift does not work either.

The solution I have come up with is that the repository will have sections corresponding to the release versions of swift. The sections will be as follows -

  • v5_3
    This will contain the latest point release of 5.3
  • v5_4
    This will contain the latest point release of 5.4
  • v5_5
    This will contain the latest point release of 5.5
  • main
    This will contain the latest release of swift
  • dev
    This contains developer snapshots.

As new versions of swift are released 5.6, 6.0 etc, new sections will be added to the repository.
This means you be able to choose the latest version of swift or a specific version required for your project.

There will be a new quick install script to allow the easy selection of the different swift versions.

I hope to have all these changes completed in the next few days.

4 Likes

Repository Update.

There have been some major updates and restructuring of the repository.
Over the last couple of months I have been working on a number of different aspects of the repository to find the best and most suitable structure for ease of use and flexibility.
As mentioned in the above post the repository sections needed to be changed to allow install of different versions of Swift.
All changes needed have now been completed and I am happy that the repository is now stable and I will be committing to maintain and update the repository as needed for at least the next 12 months and hopefully much longer.
Repository updates and changes are as follows -

Repository Name

The new repository name will be the "Swift Community Apt Repository".

Repository URL

The main repository url is now "https://archive.swiftlang.xyz".

Repository Hosting

The repository was being hosted on one of my homelab servers. I have now moved the main repository to a cloud server for better network reliability and bandwidth.

Website URL

The url "https://swiftlang.xyz" is now an information website about the repository.
The website contains a quick start guide and a full user guide.
The user guide contains information about supported distributions, repository installation and usage.
There are also links to direct browsing of the repository files and getting help.

Repository Install Script.

The install script has been updated with a new menu to allow the choice which swift version is installed.

--------------- Choose Swift Release Version ---------------

 If you want the latest Swift release choose [1], if not, choose the version most suitable for your project. 

---------------------------------------------------------

  1) latest - This will update to the latest release of Swift available
  2) developer - Swift developer builds - this will update to the latest developer build available
  3) Swift version 5.3.* - this will update to the latest point release of Swift 5.3
  4) Swift version 5.4.* - this will update to the latest point release of Swift 5.4
  5) Swift version 5.5.* - this will update to the latest point release of Swift 5.5

---------------------------------------------------------

Enter number [1/2/3/...] : 

The quick install script is now located at the new url - "https://archive.swiftlang.xyz/install.sh".
The full code of the install script is available at - https://gist.github.com/futurejones/swift-apt-repo-install.sh

Next Steps

I am currently working on containerizing a repository mirror so regional mirrors can be setup quickly and easily using Docker.

6 Likes

Nice work. It worked flawlessly on 21.10 last I tried (once I remembered to update the install script).

This might sound stupid, but, since option 1 did not mention "stable" (or similar) I felt more comfortable selecting 5 manually, especially after being reminded of the "developer" versions :slightly_smiling_face:

Edit: I guess it says "release", but I didn't think of it that way...

@Andreas

Thanks for the feedback, I will update the menu with a better explanation about option 1 and what the current latest release version is.
Essentially at the moment option 1 and 5 are the same. They will remain the same up until version 5.6 is released. Then (1) latest/main will move to 5.6.

I have updated the install script menu to make the version choices a bit clearer.

--------------- Choose Swift Release Version ---------------

 If you always want to have the latest release/stable version of Swift available choose [1], if not, choose the version most suitable for your project. 
 The latest release/stable version of Swift is currently 5.5 

---------------------------------------------------------

  1) latest/main - This will update to the latest release/stable version of Swift available
  2) developer - Swift developer builds - this will update to the latest developer build available
  3) Swift version 5.3.* - this will update to the latest point/patch release of Swift 5.3
  4) Swift version 5.4.* - this will update to the latest point/patch release of Swift 5.4
  5) Swift version 5.5.* - this will update to the latest point/patch release of Swift 5.5

---------------------------------------------------------

Enter number [1/2/3/...] : 
1 Like

Developer Snapshots

The developer snapshots have all been updated to 2021-10-18-a

1 Like

Anyone know why VSCodium would say "Couldn't start client SourceKit Language Server" when pointing the Sourcekit-LSP extension to the /usr/bin/sourcekit-lsp installed by this repo?

@Andreas What happens if you don't point it at anything? I'm also using this repo, VS Code, and SourceKit-LSP, and the extension works just fine without any configuration required.

Thanks for confirming that it should work.

It's the same if I don't configure anything, which I expected to work initially based on the extension description and because which sourcekit-lsp gave me /usr/bin/sourcekit-lsp.

Edit: Well, it's pointed at sourcekit-lsp by default, which I guess technically isn't nothing, but when I removed even that, it continued to fail.

I'll try the snap of VSCode and compare it to VSCodium, but I'm not having high hopes, since VSCodium seems to run without complaints otherwise. But maybe.

Ok, so it turns out it works in the VSCode snap but not in VSCodium... I had no idea they were that different :confused: Anyway, thanks for letting me know it's supposed to just work :sweat_smile:

Swift 5.5.1 Release

The repository has been updated with the new swift-5.5.1-RELEASE

3 Likes

Update of the package was aborted (ubuntu 21.10) because it tried to overwrite "/usr/lib/python3/dist-packages/six.py" that's also present in package python3-six 1.16.0-2

Python3-six is installed because I have Caffeine installed, it seems.

$ aptitude why python3-six
i   caffeine     Beroende av python3-xlib           
i A python3-xlib Beroende av python3-six (>= 1.10.0)

@Andreas thanks for the info.
There is a bug in the swift 5.5 build system that includes an old six.py file for some unknown reason.
This is normally removed when building the debian packages but it got missed in this update.
I have just uploaded an updated package so it should all be fixed now.

:ok_hand: Works great

Swift 5.5.2 Release

The repository has been updated with the new swift-5.5.2-RELEASE

7 Likes

Your efforts are most appreciated and I don't want to sound harsh, but I would rather have a list of GPG keys and repo URLs than running a script off the internet with sudo.

1 Like
Terms of Service

Privacy Policy

Cookie Policy