[ubuntu] call abt-get update before abt-get install#509
[ubuntu] call abt-get update before abt-get install#509vanvoorden wants to merge 3 commits intoswiftlang:mainfrom
Conversation
|
https://github.com/Swift-CowBox/Swift-CowBox/actions/runs/22471082429 It looks like |
|
Here is an issue tracking the ubuntu 22.04 failure. It looks unrelated to this diff. |
|
Thanks for raising this issue and looking into a fix. Swiftly doesn't manage the system, and is unaware of concerns like updating apt-get database. Some CI environments make use of its functionality to make post install file with the single package manager command to get the packages needed for the toolchain. But, it's up to the client system to manage the system to prepare for that command, and also handle the potential privilege escalation for these processes. The reason why this is just one command and not a full shell script is to make it easier for the client to set up an allow list of command variations to prevent the privilege escalation to be a vector for malicious system activity. The fix for this probably belongs on the CI scripts that are using swiftly so that it performs the update, and allow lists valid commands from swiftly before running the command from the post install file. These scripts know the kind of system that they run better than swiftly, and so they will know whether sudo is needed and available. |
cmcgee1024
left a comment
There was a problem hiding this comment.
This change would make the post install file into a full shell script, which is not the design of the feature, and makes it harder for clients to allow list valid commands as they would need to be prepared for full shell script semantics.
@cmcgee1024 SGTM. These are all fair points. Thanks! |
https://github.com/Swift-CowBox/Swift-CowBox/actions/runs/22457274995/job/65041728165
I started seeing consistent build failures from Ubuntu 24.04 on GitHub Actions:
I think what's happening is that
swiftlyis callingapt-get installwithout first callingapt-get update.1Footnotes
https://docs.github.com/en/actions/how-tos/manage-runners/github-hosted-runners/customize-runners#installing-software-on-ubuntu-runners ↩