diff options
Diffstat (limited to 'poky/meta/recipes-devtools/ruby')
-rw-r--r-- | poky/meta/recipes-devtools/ruby/ruby.inc | 2 | ||||
-rw-r--r-- | poky/meta/recipes-devtools/ruby/ruby/CVE-2018-1000073.patch | 34 | ||||
-rw-r--r-- | poky/meta/recipes-devtools/ruby/ruby_2.5.1.bb (renamed from poky/meta/recipes-devtools/ruby/ruby_2.5.0.bb) | 25 |
3 files changed, 58 insertions, 3 deletions
diff --git a/poky/meta/recipes-devtools/ruby/ruby.inc b/poky/meta/recipes-devtools/ruby/ruby.inc index fd3911ba7..5a5bef202 100644 --- a/poky/meta/recipes-devtools/ruby/ruby.inc +++ b/poky/meta/recipes-devtools/ruby/ruby.inc @@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "\ file://COPYING;md5=340948e1882e579731841bf49cdc22c1 \ file://BSDL;md5=19aaf65c88a40b508d17ae4be539c4b5\ file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263\ - file://LEGAL;md5=8f871f3f03732c018a5fa9b185958231 \ + file://LEGAL;md5=23a79bb4c1a40f6cc9bcb6f4e7c39799 \ " DEPENDS = "ruby-native zlib openssl tcl libyaml gdbm readline" diff --git a/poky/meta/recipes-devtools/ruby/ruby/CVE-2018-1000073.patch b/poky/meta/recipes-devtools/ruby/ruby/CVE-2018-1000073.patch new file mode 100644 index 000000000..22fa1b5f4 --- /dev/null +++ b/poky/meta/recipes-devtools/ruby/ruby/CVE-2018-1000073.patch @@ -0,0 +1,34 @@ +From 1b931fc03b819b9a0214be3eaca844ef534175e2 Mon Sep 17 00:00:00 2001 +From: Jonathan Claudius <jclaudius@mozilla.com> +Date: Wed, 7 Feb 2018 23:54:52 -0500 +Subject: [PATCH] Non-working patch for deducing symlinked base-dirs + +--- +CVE: CVE-2018-1000073 + +Fixed in ruby 2.7.6. + +Upstream-Status: Backport [github.com/rubygems/rubygems/commit/1b931fc...] + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + +--- + lib/rubygems/package.rb | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lib/rubygems/package.rb b/lib/rubygems/package.rb +index dede959..cb9c74a 100644 +--- a/lib/rubygems/package.rb ++++ b/lib/rubygems/package.rb +@@ -421,6 +421,8 @@ EOM + destination_dir = File.expand_path destination_dir + + destination = File.join destination_dir, filename ++ destination = File.realpath destination if ++ File.respond_to? :realpath + destination = File.expand_path destination + + raise Gem::Package::PathError.new(destination, destination_dir) unless +-- +1.7.9.5 + diff --git a/poky/meta/recipes-devtools/ruby/ruby_2.5.0.bb b/poky/meta/recipes-devtools/ruby/ruby_2.5.1.bb index 1ac7f2aa5..1197323e9 100644 --- a/poky/meta/recipes-devtools/ruby/ruby_2.5.0.bb +++ b/poky/meta/recipes-devtools/ruby/ruby_2.5.1.bb @@ -3,10 +3,11 @@ require ruby.inc SRC_URI += " \ file://ruby-CVE-2017-9226.patch \ file://ruby-CVE-2017-9228.patch \ + file://CVE-2018-1000073.patch \ " -SRC_URI[md5sum] = "f4711f856fe14de222b9da3d3b8efa89" -SRC_URI[sha256sum] = "46e6f3630f1888eb653b15fa811d77b5b1df6fd7a3af436b343cfe4f4503f2ab" +SRC_URI[md5sum] = "23867bc8c16c55e43b14dfe0614bcfa8" +SRC_URI[sha256sum] = "dac81822325b79c3ba9532b048c2123357d3310b2b40024202f360251d9829b1" # it's unknown to configure script, but then passed to extconf.rb # maybe it's not really needed as we're hardcoding the result with @@ -34,6 +35,26 @@ do_install() { oe_runmake 'DESTDIR=${D}' install } +do_install_append_class-target () { + # Find out rbconfig.rb from .installed.list + rbconfig_rb=`grep rbconfig.rb ${B}/.installed.list` + # Remove build host directories + sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \ + -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ + -e 's:${RECIPE_SYSROOT}::g' \ + -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ + ${D}$rbconfig_rb + + # Find out created.rid from .installed.list + created_rid=`grep created.rid ${B}/.installed.list` + # Remove build host directories + sed -i -e 's:${WORKDIR}::g' ${D}$created_rid + +} + PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc" SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library" |