From 87ab073c1cdb82c043eba4f144df5fa108031a5b Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 20 Sep 2018 15:58:57 -0700 Subject: [PATCH] Apply Alpine thread stack size patch This patch was OK'd by a Ruby maintainer (https://bugs.ruby-lang.org/issues/14387#note-16), but hasn't been merged because it isn't generic enough to support glibc properly, which doesn't matter here (since we're Alpine-only in this context). --- 2.3/alpine3.7/Dockerfile | 8 ++++++++ 2.3/alpine3.8/Dockerfile | 8 ++++++++ 2.4/alpine3.6/Dockerfile | 8 ++++++++ 2.4/alpine3.7/Dockerfile | 8 ++++++++ 2.5/alpine3.7/Dockerfile | 8 ++++++++ 2.6-rc/alpine3.7/Dockerfile | 8 ++++++++ 2.6-rc/alpine3.8/Dockerfile | 8 ++++++++ Dockerfile-alpine.template | 8 ++++++++ 8 files changed, 64 insertions(+) diff --git a/2.3/alpine3.7/Dockerfile b/2.3/alpine3.7/Dockerfile index 9b2db8ba0..dd2b23862 100644 --- a/2.3/alpine3.7/Dockerfile +++ b/2.3/alpine3.7/Dockerfile @@ -55,6 +55,14 @@ RUN set -ex \ \ && cd /usr/src/ruby \ \ +# https://github.com/docker-library/ruby/issues/196 +# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) +# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) + && wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch' \ + && echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum -c - \ + && patch -p1 -i thread-stack-fix.patch \ + && rm thread-stack-fix.patch \ + \ # hack in "ENABLE_PATH_CHECK" disabling to suppress: # warning: Insecure world writable dir && { \ diff --git a/2.3/alpine3.8/Dockerfile b/2.3/alpine3.8/Dockerfile index 256e54950..32f880c2f 100644 --- a/2.3/alpine3.8/Dockerfile +++ b/2.3/alpine3.8/Dockerfile @@ -55,6 +55,14 @@ RUN set -ex \ \ && cd /usr/src/ruby \ \ +# https://github.com/docker-library/ruby/issues/196 +# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) +# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) + && wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch' \ + && echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum -c - \ + && patch -p1 -i thread-stack-fix.patch \ + && rm thread-stack-fix.patch \ + \ # hack in "ENABLE_PATH_CHECK" disabling to suppress: # warning: Insecure world writable dir && { \ diff --git a/2.4/alpine3.6/Dockerfile b/2.4/alpine3.6/Dockerfile index 416e5fd3f..e0921c0de 100644 --- a/2.4/alpine3.6/Dockerfile +++ b/2.4/alpine3.6/Dockerfile @@ -55,6 +55,14 @@ RUN set -ex \ \ && cd /usr/src/ruby \ \ +# https://github.com/docker-library/ruby/issues/196 +# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) +# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) + && wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch' \ + && echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum -c - \ + && patch -p1 -i thread-stack-fix.patch \ + && rm thread-stack-fix.patch \ + \ # hack in "ENABLE_PATH_CHECK" disabling to suppress: # warning: Insecure world writable dir && { \ diff --git a/2.4/alpine3.7/Dockerfile b/2.4/alpine3.7/Dockerfile index 5f7dbeb76..81a24c5cd 100644 --- a/2.4/alpine3.7/Dockerfile +++ b/2.4/alpine3.7/Dockerfile @@ -55,6 +55,14 @@ RUN set -ex \ \ && cd /usr/src/ruby \ \ +# https://github.com/docker-library/ruby/issues/196 +# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) +# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) + && wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch' \ + && echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum -c - \ + && patch -p1 -i thread-stack-fix.patch \ + && rm thread-stack-fix.patch \ + \ # hack in "ENABLE_PATH_CHECK" disabling to suppress: # warning: Insecure world writable dir && { \ diff --git a/2.5/alpine3.7/Dockerfile b/2.5/alpine3.7/Dockerfile index dfe1e979c..f1227c95b 100644 --- a/2.5/alpine3.7/Dockerfile +++ b/2.5/alpine3.7/Dockerfile @@ -55,6 +55,14 @@ RUN set -ex \ \ && cd /usr/src/ruby \ \ +# https://github.com/docker-library/ruby/issues/196 +# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) +# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) + && wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch' \ + && echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum -c - \ + && patch -p1 -i thread-stack-fix.patch \ + && rm thread-stack-fix.patch \ + \ # hack in "ENABLE_PATH_CHECK" disabling to suppress: # warning: Insecure world writable dir && { \ diff --git a/2.6-rc/alpine3.7/Dockerfile b/2.6-rc/alpine3.7/Dockerfile index 46e4ff649..5e3ef775a 100644 --- a/2.6-rc/alpine3.7/Dockerfile +++ b/2.6-rc/alpine3.7/Dockerfile @@ -55,6 +55,14 @@ RUN set -ex \ \ && cd /usr/src/ruby \ \ +# https://github.com/docker-library/ruby/issues/196 +# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) +# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) + && wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch' \ + && echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum -c - \ + && patch -p1 -i thread-stack-fix.patch \ + && rm thread-stack-fix.patch \ + \ # hack in "ENABLE_PATH_CHECK" disabling to suppress: # warning: Insecure world writable dir && { \ diff --git a/2.6-rc/alpine3.8/Dockerfile b/2.6-rc/alpine3.8/Dockerfile index 46637fec5..7a90392dd 100644 --- a/2.6-rc/alpine3.8/Dockerfile +++ b/2.6-rc/alpine3.8/Dockerfile @@ -55,6 +55,14 @@ RUN set -ex \ \ && cd /usr/src/ruby \ \ +# https://github.com/docker-library/ruby/issues/196 +# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) +# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) + && wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch' \ + && echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum -c - \ + && patch -p1 -i thread-stack-fix.patch \ + && rm thread-stack-fix.patch \ + \ # hack in "ENABLE_PATH_CHECK" disabling to suppress: # warning: Insecure world writable dir && { \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 15375cdfb..44d86c18d 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -55,6 +55,14 @@ RUN set -ex \ \ && cd /usr/src/ruby \ \ +# https://github.com/docker-library/ruby/issues/196 +# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) +# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) + && wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch' \ + && echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum -c - \ + && patch -p1 -i thread-stack-fix.patch \ + && rm thread-stack-fix.patch \ + \ # hack in "ENABLE_PATH_CHECK" disabling to suppress: # warning: Insecure world writable dir && { \