mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 10:02:56 +01:00
Verify mandatory Ruby patches exist
This commit is contained in:
parent
207a35971c
commit
b9bddb9b12
4 changed files with 17 additions and 3 deletions
1
patches/ruby/mandatory_patches
Normal file
1
patches/ruby/mandatory_patches
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
thread-memory-allocations
|
||||||
|
|
@ -46,10 +46,23 @@ function build_common() {
|
||||||
rm ruby.tar.gz
|
rm ruby.tar.gz
|
||||||
cd /usr/src/ruby
|
cd /usr/src/ruby
|
||||||
|
|
||||||
|
# Process patch files
|
||||||
|
local ruby_version=$(cut -d '.' -f 1,2 <<< $RUBY_VERSION)
|
||||||
|
local patchdir="/patches/ruby/${ruby_version}"
|
||||||
|
|
||||||
|
# Verify mandatory patches
|
||||||
|
while read -r patchname; do
|
||||||
|
local patchfile="${patchdir}/${patchname}.patch"
|
||||||
|
if [[ ! -f "${patchfile}" ]]; then
|
||||||
|
echo "!! Missing mandatory patch ${patchname}"
|
||||||
|
echo "!! Make sure ${patchfile} exists before proceeding."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done < "/patches/ruby/mandatory_patches"
|
||||||
|
|
||||||
# Apply patches
|
# Apply patches
|
||||||
ruby_version=`cut -d '.' -f 1,2 <<< $RUBY_VERSION`
|
if [[ -d "${patchdir}" ]]; then
|
||||||
if [[ -d "/patches/ruby/$ruby_version" ]]; then
|
for i in "${patchdir}"/*.patch; do
|
||||||
for i in "/patches/ruby/$ruby_version"/*.patch; do
|
|
||||||
echo "$i..."
|
echo "$i..."
|
||||||
patch -p1 -i "$i"
|
patch -p1 -i "$i"
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue