Skip to content
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

Ubuntu install libyaml-dev #6725

Closed
3 of 12 tasks
MSP-Greg opened this issue Dec 8, 2022 · 5 comments
Closed
3 of 12 tasks

Ubuntu install libyaml-dev #6725

MSP-Greg opened this issue Dec 8, 2022 · 5 comments
Assignees
Labels
Area: Packages awaiting-deployment Code complete; awaiting deployment and/or deployment in progress feature request OS: Ubuntu

Comments

@MSP-Greg
Copy link
Contributor

MSP-Greg commented Dec 8, 2022

Tool name

libyaml-dev

Tool license

apt package

Add or update?

  • Add
  • Update

Desired version

na - use current Ubuntu pacakge

Approximate size

small

Brief description of tool

Ubuntu has libyaml installed (automatic), but not libyaml-dev. I believe macOS has it installed, as it does have libyaml header files, etc.

Ignoring Windows, as it depends on the build system in use.

Reason for the request is Ruby's yaml package (psych) previously vendored libyaml code. With the new release that was removed. It's a package that is a dependency for many popular Ruby gems, and now CI is failing on Ubuntu, but fine on macOS. It seems reasonable to ask for parity between the two...

URL for tool's homepage

No response

Provide a basic test case to validate the tool's functionality.

apt install libyaml-dev

Platforms where you need the tool

  • Azure DevOps
  • GitHub Actions

Runner images where you need the tool

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 10.15
  • macOS 11
  • macOS 12
  • Windows Server 2019
  • Windows Server 2022

Can this tool be installed during the build?

Yes.

Tool installation time in runtime

quick

Are you willing to submit a PR?

not sure if there is a generic 'install these apt packages' list

@erik-bershel
Copy link
Contributor

Hi @MSP-Greg!
We'll take a closer look and return with decision a bit later.

@MSP-Greg
Copy link
Contributor Author

MSP-Greg commented Dec 8, 2022

@erik-bershel

I've been involved in with setup-ruby since its inception. I've also been involved in the Windows code it uses, which does install a full set of build tools and/or packages (MSYS2 mingw, ucrt, or msft/vcpkg), so we do install/update build systems in its code. The code also caches all the packages in GitHub releases, so it's not hammering external package servers.

We've never needed to do so with Ubuntu or macOS, and most Ruby CI probably has more Ubuntu & macOS jobs than Windows.

Summing up, after looking at all the practical aspects of this issue, adding it to the images seems like the best solution.

@eregon
Copy link

eregon commented Dec 8, 2022

To give a bit more context, this is coming from ruby/setup-ruby#409
Here is a summary:
Ruby added a dependency on libyaml and the psych gem (part of Ruby) added a dependency libyaml-dev (the headers), due to no longer vendoring libyaml in psych.
This means a large number of Ruby-related workflows started to fail when installing the psych gem (which is a frequent transitive dependency) since psych 5 was released with that change.

So it would be nice and useful if runner images include libyaml-dev to avoid many many workflows to have to be updated to sudo apt install libyaml-dev on Ubuntu.
It's just a few headers, about ~250 KB installed (from https://packages.debian.org/stretch/libyaml-dev).

Tool installation time in runtime

Actually it's something like 15s so it's non-trivial overhead (it's ~3x slower than downloading and setting up Ruby to give an idea).

@mikhailkoliada
Copy link
Member

will be deployed next week

dentarg added a commit to dentarg/sinatra that referenced this issue Dec 12, 2022
Needed to be able to install psych >=5.
Need to do it before setup-ruby runs as that runs `bundle install`.

Related to:
- ruby/psych#541
- ruby/setup-ruby#409
- actions/runner-images#6725

Yes, libyaml-dev will be added to GitHub runner images (this week they
say) but opening this PR just in case anyone encounters failing builds.
I don't think it hurts having this in the repo even after libyaml-dev
have been added to the images.

Added some blank lines to make the workflow easier to read.
@mikhailkoliada
Copy link
Member

Deployed

jkowens pushed a commit to sinatra/sinatra that referenced this issue Dec 15, 2022
Needed to be able to install psych >=5.
Need to do it before setup-ruby runs as that runs `bundle install`.

Related to:
- ruby/psych#541
- ruby/setup-ruby#409
- actions/runner-images#6725

Yes, libyaml-dev will be added to GitHub runner images (this week they
say) but opening this PR just in case anyone encounters failing builds.
I don't think it hurts having this in the repo even after libyaml-dev
have been added to the images.

Added some blank lines to make the workflow easier to read.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Packages awaiting-deployment Code complete; awaiting deployment and/or deployment in progress feature request OS: Ubuntu
Projects
None yet
Development

No branches or pull requests

5 participants