[19.3] Restore Ruby 3.3.12 regexp patches
What does this MR do?
Ruby 3.3.13 includes the regexp patches, so 244a47b4 removed them from gitlab-ruby/patches/3.3/. GitLab's end-to-end tests build CNG with GitLab's own RUBY_VERSION, which is 3.3.12 on 19-3-stable-ee. Those builds 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 files are identical to the ones that commit removed. The patch script applies <version>/ patches only for that exact Ruby version, so 3.3.13 and 3.3.14 builds do not change.
This matches the change already merged for 19-4-stable to 19-6-stable and master.
!3313 (merged) adds the same files as part of the Ruby 3.3.14 bump, and it should rebase cleanly on this MR.
Test plan
I ran shared/build-scripts/apply_ruby_patches.sh from this branch against clean Ruby source tarballs with GNU patch, as in CI:
| 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) |
| 3.3.14 | 0 | 4 (3.3/ only) |
No patch failed, and no .rej files were left.
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)19-3-stable: !3336 (merged)19-2-stable: !3335 (merged)19-1-stable: !3334 (merged)19-0-stable: !3333 (merged)18-11-stable: !3332 (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