Skip to content

Support ruby compilation with piped patches#95

Open
gsamokovarov wants to merge 1 commit intoalup:masterfrom
gsamokovarov:install-patch
Open

Support ruby compilation with piped patches#95
gsamokovarov wants to merge 1 commit intoalup:masterfrom
gsamokovarov:install-patch

Conversation

@gsamokovarov
Copy link

I just had to install an old Ruby 1.9.3-p448 on CentOS 6.4, however there is a known issue with compiling 2.0.0-p247 and lower on RedHat derivatives. See https://bugs.ruby-lang.org/issues/8384 for the issue. To do that, I needed to patch the Ruby, which I couldn't have done as easily with the current version.

If you checkout the ruby-build wiki, you can see other documented workarounds using the recently added --patch functionality of ruby-build, so I think its worth trying to support it.

While I'm not sure that this is the best interface for it, it seems flexible enough to support my (most?) use cases. I'm currently using it like this:

rbenv::compile { '1.9.3-p448':
  # Its important to strip the changelog changes from the patch, as they
  # won't apply. It's the first file, that's why we're not taking it.
  patch => 'curl -fsSL https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/41808/diff?format=diff | filterdiff --files=2,3',
  user  => $user
}

@Envek
Copy link

Envek commented Jun 23, 2014

Support this strongly!

We need to patch Ruby with patches from https://bugs.ruby-lang.org/issues/9830 . There are 2 patch files. Is it possible with this PR?

@gsamokovarov
Copy link
Author

You can combine them with combinediff out of patchutils, so yeah.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants