-
Notifications
You must be signed in to change notification settings - Fork 18
Support Debian 11 and Debian 12 distributions in the generator #203
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
Support Debian 11 and Debian 12 distributions in the generator #203
Conversation
- The Debian 11 configuration does not work since there is no official Swift container for it. But, later a special case will be added.
- When downloading Debian packages, we don't get contrib packages since they are not needed.
…chain - Otherwise weird things happen from the EndToEndTests when running tests that then need to re-download a new toolchain on top.
@swift-ci test |
@swift-ci test |
I updated the README.md since I realized it didn't reflect the fact that the generator supports Debian 11 and 12 now. |
@swift-ci test |
- This is required since Debian 11 has a different layout than other Ubuntu/Debian versions.
I found that Debian 11 has a different layout for where libraries are with the /lib and /lib64 directories when building from the container image. I've added changes for this that should just apply to Debian 11- and also ran the EndToEndTests for containers to make sure other containers are not affected. |
@swift-ci test |
@swift-ci test linux |
Looks like it doesn't like the switch syntax I'm using on 5.8:
Should be a simple fix. |
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
I'd prefer to hold off merging this until @euanh has a moment to review it, unless this PR is blocking some subsequent urgent PRs that you plan to submit? |
This isn't urgent for me. I am using the stuff in this PR in my https://github.com/xtremekforever/swift-linux-cross-sdks repo, but I'm still working out being able to build Swift SDKs for bullseye for x86_64 and aarch64. In case you didn't know, in this repo I'm basically working on a workflow for building Swift SDKs for all supported versions of Swift for x86_64, aarch64, and armv7 using the swift-sdk-generator. So to have some "pre-built" Swift SDKs out in the wild. However, there's still some ways to go as I still want to be able to build test binaries with each Swift SDK and test them on real targets for all of the above architectures, which means hooking up some real Raspberry PIs in to run the binaries for me. Lofty goals, long path...but it also helps in discovering issues in the swift-sdk-generator as I use it to generate different Swift SDKs here. So yeah, @MaxDesiatov there aren't any more PRs for me here yet. I do plan to look at #197 after this PR is in, since I'll eventually need it, but I'm not there yet. |
@swift-ci test |
@euanh friendly ping |
@swift-ci test |
This completes #116 and can be used to generate Debian Swift SDKs either by downloading dependencies from mirrors directly or from containers.
bullseye
andbookworm
toLinuxDistribution
and moddedSwiftSDKGenerator+Download
to work downloading both Ubuntu and Debian packages from their respective mirrors.swift:*-bookworm
container for Debian 12, but for Debian 11 you must create the container yourself/manually put the Swift toolchain into it.VersionsConfiguration
so that if Debian 11 (bullseye) is selected, the Ubuntu 20.04 toolchain is downloaded. If Debian 12 (bookworm) is selected for Swift 5.9.* or Swift 5.10, the Ubuntu 22.04 toolchain is used instead. https://askubuntu.com/a/445496LinuxRecipeTests.testItemsToDownloadForDebianTargets()
to ensure the correct toolchain is selected.To use:
I also added EndToEndTests for all Debian supported combinations, resulting in another 30GB of generated Swift SDKs:
To make this work properly, I modded the
targetSwift
path inDownloadableArtifacts
to use the swiftPlatform name in the file name to avoid the issues I saw with the EndToEndTests, where the *.tar.gz files would get corrupted when trying to download a different version of the target Swift on top of the existing file. Now, they look like this:Have at it @MaxDesiatov @euanh