[19.4] Restore Ruby 3.3.12 regexp patches
What does this MR do?
Ruby 3.3.13 includes the regexp patches, so !3264 (merged) removed them from gitlab-ruby/patches/3.3/. Builds that still use RUBY_VERSION=3.3.12 now build Ruby without these fixes.
This MR restores regexp-program-size, regexp-repeat-id-overflow and regexp-repeat-range-double-free in gitlab-ruby/patches/3.3.12/. The patch script applies <version>/ patches only for that exact Ruby version, so 3.3.13 builds do not change.
Diff against the removed files
These files are identical to the files that !3264 (merged) removed from gitlab-ruby/patches/3.3/:
gitlab-ruby/patches/3.3.12/regexp-program-size.patchgitlab-ruby/patches/3.3.12/regexp-repeat-id-overflow.patchgitlab-ruby/patches/3.3.12/regexp-repeat-range-double-free.patch
Test plan
I ran shared/build-scripts/apply_ruby_patches.sh from this branch against clean Ruby source tarballs:
| Ruby | Exit | Patches applied |
|---|---|---|
| 3.3.12 | 0 | 7 (4 from 3.3/, 3 from 3.3.12/) |
| 3.3.13 | 0 | 4 (3.3/ only, no change) |
The gitlab-ruby job https://gitlab.com/gitlab-org/build/CNG/-/jobs/18184068508 ran on the master branch of this change (!3323 (merged)) with RUBY_VERSION=3.3.12 and passed. It applied the 4 patches from 3.3/ and the 3 restored patches from 3.3.12/ without errors. This branch has the same 3.3/ and 3.3.12/ patches, so this shows that the fix works here too.
Related MRs
The same change for each branch:
master: !3323 (merged)19-6-stable: !3324 (merged)19-5-stable: !3325 (merged)19-4-stable: !3326 (merged)
Related issues
Related to !3264 (merged)
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion
Required
- Merge Request Title, and Description are up to date, accurate, and descriptive
- MR targeting the appropriate branch
- MR has a green pipeline on GitLab.com
- When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow
Expected (please provide an explanation if not completing)
- Test plan indicating conditions for success has been posted and passes
- Documentation created/updated
- Integration tests added to GitLab QA
- The impact any change in container size has should be evaluated
- New dependencies are managed with GitLab forked renovatebot