diff options
| author | Yogita Urade <yogita.urade@windriver.com> | 2024-10-07 11:27:42 +0000 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-10-18 06:04:40 -0700 |
| commit | 0402f54b66438ec6e9f06f02652e148dce6480b3 (patch) | |
| tree | b9f4f00fd3798f29b7b356934ef07a3b561b9884 /meta/recipes-devtools/ruby/ruby_3.3.5.bb | |
| parent | 711c93422918d1810e652e75405b9f9ad6f01167 (diff) | |
| download | poky-0402f54b66438ec6e9f06f02652e148dce6480b3.tar.gz | |
ruby: upgrade 3.2.2 -> 3.3.5
Includes fix for CVE-2024-41123 & CVE-2024-41946
Release notes:
https://github.com/ruby/ruby/releases/tag/v3_3_5
Rebase:
0005-Mark-Gemspec-reproducible-change-fixing-784225-too.patch
0006-Make-gemspecs-reproducible.patch
Drop:
0001-fiddle-Use-C11-_Alignof-to-define-ALIGN_OF-when-poss.patch
0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
CVE-2023-36617_1.patch
CVE-2023-36617_2.patch
CVE-2024-27281.patch
CVE-2024-27282.patch
(merged upstream)
0001-template-Makefile.in-do-not-write-host-cross-cc-item.patch
0002-template-Makefile.in-filter-out-f-prefix-map.patch
remove_has_include_macros.patch
(code rewritten upstream)
License-Update: Updated LEGAL section
(From OE-Core rev: 69ffe5bc09260918fb32bfcb29586dcaa1958a5c)
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-devtools/ruby/ruby_3.3.5.bb')
| -rw-r--r-- | meta/recipes-devtools/ruby/ruby_3.3.5.bb | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/meta/recipes-devtools/ruby/ruby_3.3.5.bb b/meta/recipes-devtools/ruby/ruby_3.3.5.bb new file mode 100644 index 0000000000..fb0d711765 --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby_3.3.5.bb | |||
| @@ -0,0 +1,140 @@ | |||
| 1 | SUMMARY = "An interpreter of object-oriented scripting language" | ||
| 2 | DESCRIPTION = "Ruby is an interpreted scripting language for quick \ | ||
| 3 | and easy object-oriented programming. It has many features to process \ | ||
| 4 | text files and to do system management tasks (as in Perl). \ | ||
| 5 | It is simple, straight-forward, and extensible. \ | ||
| 6 | " | ||
| 7 | HOMEPAGE = "http://www.ruby-lang.org/" | ||
| 8 | SECTION = "devel/ruby" | ||
| 9 | LICENSE = "Ruby | BSD-2-Clause | BSD-3-Clause | GPL-2.0-only | ISC | MIT" | ||
| 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=5b8c87559868796979806100db3f3805 \ | ||
| 11 | file://BSDL;md5=8b50bc6de8f586dc66790ba11d064d75 \ | ||
| 12 | file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
| 13 | file://LEGAL;md5=81e6a4d81533b9263da4c3485a0ad883 \ | ||
| 14 | " | ||
| 15 | |||
| 16 | DEPENDS = "zlib openssl libyaml gdbm readline libffi" | ||
| 17 | DEPENDS:append:class-target = " ruby-native" | ||
| 18 | DEPENDS:append:class-nativesdk = " ruby-native" | ||
| 19 | |||
| 20 | SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" | ||
| 21 | SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \ | ||
| 22 | file://0001-extmk-fix-cross-compilation-of-external-gems.patch \ | ||
| 23 | file://run-ptest \ | ||
| 24 | file://0003-rdoc-build-reproducible-documentation.patch \ | ||
| 25 | file://0004-lib-mkmf.rb-sort-list-of-object-files-in-generated-M.patch \ | ||
| 26 | file://0005-Mark-Gemspec-reproducible-change-fixing-784225-too.patch \ | ||
| 27 | file://0006-Make-gemspecs-reproducible.patch \ | ||
| 28 | file://0001-vm_dump.c-Define-REG_S1-and-REG_S2-for-musl-riscv.patch \ | ||
| 29 | " | ||
| 30 | UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/" | ||
| 31 | |||
| 32 | inherit autotools ptest pkgconfig | ||
| 33 | |||
| 34 | |||
| 35 | # This snippet lets compiled extensions which rely on external libraries, | ||
| 36 | # such as zlib, compile properly. If we don't do this, then when extmk.rb | ||
| 37 | # runs, it uses the native libraries instead of the target libraries, and so | ||
| 38 | # none of the linking operations succeed -- which makes extconf.rb think | ||
| 39 | # that the libraries aren't available and hence that the extension can't be | ||
| 40 | # built. | ||
| 41 | |||
| 42 | do_configure:prepend() { | ||
| 43 | sed -i "s#%%TARGET_CFLAGS%%#$CFLAGS#; s#%%TARGET_LDFLAGS%%#$LDFLAGS#" ${S}/common.mk | ||
| 44 | rm -rf ${S}/ruby/ | ||
| 45 | } | ||
| 46 | |||
| 47 | DEPENDS:append:libc-musl = " libucontext" | ||
| 48 | |||
| 49 | SRC_URI[sha256sum] = "3781a3504222c2f26cb4b9eb9c1a12dbf4944d366ce24a9ff8cf99ecbce75196" | ||
| 50 | |||
| 51 | PACKAGECONFIG ??= "" | ||
| 52 | PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" | ||
| 53 | |||
| 54 | PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind" | ||
| 55 | PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp" | ||
| 56 | PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6," | ||
| 57 | # rdoc is off by default due to non-reproducibility reported in | ||
| 58 | # https://bugs.ruby-lang.org/issues/18456 | ||
| 59 | PACKAGECONFIG[rdoc] = "--enable-install-rdoc,--disable-install-rdoc," | ||
| 60 | |||
| 61 | EXTRA_OECONF = "\ | ||
| 62 | --disable-versioned-paths \ | ||
| 63 | --disable-rpath \ | ||
| 64 | --disable-dtrace \ | ||
| 65 | --enable-shared \ | ||
| 66 | --enable-load-relative \ | ||
| 67 | --with-pkg-config=pkg-config \ | ||
| 68 | --with-static-linked-ext \ | ||
| 69 | --with-mantype=man \ | ||
| 70 | " | ||
| 71 | |||
| 72 | EXTRA_OECONF:append:libc-musl = "\ | ||
| 73 | ac_cv_func_isnan=yes \ | ||
| 74 | ac_cv_func_isinf=yes \ | ||
| 75 | " | ||
| 76 | |||
| 77 | PARALLEL_MAKEINST = "" | ||
| 78 | |||
| 79 | do_install:append:class-target () { | ||
| 80 | # Find out rbconfig.rb from .installed.list | ||
| 81 | rbconfig_rb=`grep rbconfig.rb ${B}/.installed.list` | ||
| 82 | # Remove build host directories | ||
| 83 | sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \ | ||
| 84 | -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \ | ||
| 85 | -e 's|${DEBUG_PREFIX_MAP}||g' \ | ||
| 86 | -e 's:${HOSTTOOLS_DIR}/::g' \ | ||
| 87 | -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ | ||
| 88 | -e 's:${RECIPE_SYSROOT}::g' \ | ||
| 89 | -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ | ||
| 90 | ${D}$rbconfig_rb | ||
| 91 | |||
| 92 | sed -i -e 's|${DEBUG_PREFIX_MAP}||g' \ | ||
| 93 | ${D}${libdir}/pkgconfig/*.pc | ||
| 94 | |||
| 95 | # logs that may contain host-specific paths | ||
| 96 | find ${D} -name gem_make.out -delete | ||
| 97 | } | ||
| 98 | |||
| 99 | do_install_ptest () { | ||
| 100 | cp -rf ${S}/test ${D}${PTEST_PATH}/ | ||
| 101 | |||
| 102 | install -D ${S}/tool/test/runner.rb ${D}${PTEST_PATH}/tool/test/runner.rb | ||
| 103 | cp -r ${S}/tool/lib ${D}${PTEST_PATH}/tool/ | ||
| 104 | mkdir -p ${D}${PTEST_PATH}/lib | ||
| 105 | cp -r ${S}/lib/did_you_mean ${S}/lib/rdoc ${D}${PTEST_PATH}/lib | ||
| 106 | |||
| 107 | # install test-binaries | ||
| 108 | # These .so files have sporadic reproducibility fails as seen here: | ||
| 109 | # https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20220107-rm1diuww/packages/diff-html/ | ||
| 110 | # As they are needed only in ruby-ptest, and that is currently altogether disabled, let's take them out. | ||
| 111 | # If someone wants to look at where the non-determinism comes from, one possible reason is use of | ||
| 112 | # -rdynamic -Wl,-export-dynamic | ||
| 113 | #find $(find ./.ext -path '*/-test-') -name '*.so' -print0 \ | ||
| 114 | # | tar --no-recursion --null -T - --no-same-owner --preserve-permissions -cf - \ | ||
| 115 | # | tar -C ${D}${libdir}/ruby/${SHRT_VER}.0/ --no-same-owner --preserve-permissions --strip-components=2 -xf - | ||
| 116 | # adjust path to not assume build directory layout | ||
| 117 | sed -e 's|File.expand_path(.*\.\./bin/erb[^)]*|File.expand_path("${bindir}/erb"|g' \ | ||
| 118 | -i ${D}${PTEST_PATH}/test/erb/test_erb_command.rb | ||
| 119 | |||
| 120 | cp -r ${S}/include ${D}/${libdir}/ruby/ | ||
| 121 | } | ||
| 122 | |||
| 123 | PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc" | ||
| 124 | |||
| 125 | SUMMARY:${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library" | ||
| 126 | RDEPENDS:${PN}-ri-docs = "${PN}" | ||
| 127 | FILES:${PN}-ri-docs += "${datadir}/ri" | ||
| 128 | |||
| 129 | SUMMARY:${PN}-rdoc = "RDoc documentation generator from Ruby source" | ||
| 130 | RDEPENDS:${PN}-rdoc = "${PN}" | ||
| 131 | FILES:${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc" | ||
| 132 | |||
| 133 | FILES:${PN} += "${datadir}/rubygems" | ||
| 134 | |||
| 135 | FILES:${PN}-ptest:append:class-target = "\ | ||
| 136 | ${libdir}/ruby/include \ | ||
| 137 | ${libdir}/ruby/${SHRT_VER}.0/*/-test- \ | ||
| 138 | " | ||
| 139 | |||
| 140 | BBCLASSEXTEND = "native nativesdk" | ||
