swiftly icon indicating copy to clipboard operation
swiftly copied to clipboard

feat: add support for Gentoo Linux in HTTP client and package management

Open coleleavitt opened this issue 2 months ago • 3 comments

This pull request adds support for Gentoo Linux as a recognized platform in the codebase. It introduces Gentoo-specific configuration, package lists, and package manager handling, ensuring that Gentoo can be properly detected and managed alongside other Linux distributions.

Gentoo Linux support:

  • Added gentoo to the list of known Linux platforms in PlatformDefinition and updated platform detection logic to recognize Gentoo systems. [1] [2]
  • Included Gentoo in the list of platforms handled by the HTTP client, enabling API compatibility.

Package management and configuration:

  • Added Gentoo-specific package list and mapped the package manager to emerge in the Linux platform implementation. [1] [2] [3]
  • Implemented package installation checks using Portage's qlist for Gentoo.

coleleavitt avatar Oct 19 '25 21:10 coleleavitt

Gentoo isn't a supported platform for the Swift toolchain and swiftly doesn't yet have support for explicitly marking platforms as experimental. This change would need to make it clear that Gentoo is in this experimental category and that it should be used at one's own risk.

There should be some kind of verification of Gentoo as well, so there would need to be a workflow added for it. This shouldn't be too difficult to add based on an official docker hub label. However, this workflow should be non-voting in case it breaks at some point.

cmcgee1024 avatar Oct 28 '25 18:10 cmcgee1024

Gentoo isn't a supported platform for the Swift toolchain and swiftly doesn't yet have support for explicitly marking platforms as experimental. This change would need to make it clear that Gentoo is in this experimental category and that it should be used at one's own risk.

There should be some kind of verification of Gentoo as well, so there would need to be a workflow added for it. This shouldn't be too difficult to add based on an official docker hub label. However, this workflow should be non-voting in case it breaks at some point.

gentoo actually does have a package for swift through the guru repository and also I was able to override the installation of swiftly for gentoo using the tool by just spoofing the version to ubuntu.

https://github.com/gentoo/guru/tree/master/dev-lang/swift https://bugs.gentoo.org/567514

coleleavitt avatar Oct 28 '25 19:10 coleleavitt

gentoo actually does have a package for swift through the guru repository and also I was able to override the installation of swiftly for gentoo using the tool by just spoofing the version to ubuntu.

It's great to hear that more distributions picking up Swift.

The nature of swiftly is to work outside the distro packaging system so that a wide variety of toolchains can be installed and switched easily. It downloads the toolchains from swift.org, not from the distro's own repository. If those toolchains don't support the distro then things can break at random times with random toolchains whereas a distro version is supported and verified independently in their own system.

I think that's why if swiftly were to support Gentoo or other distros not supported by swift.org then they would need to be some kind of a "tier 3" (aka. community supported) level so that end-users are aware that things might not always work well and they shouldn't raise issues here unless they are willing to provide fixes for them. Alternatively, they can seek help on the swift forums.

cmcgee1024 avatar Oct 28 '25 21:10 cmcgee1024