All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] ruby recipe updates
@ 2019-10-01  9:54 André Draszik
  2019-10-01  9:54 ` [PATCH v3 1/4] ruby: drop long-merged CVE patches André Draszik
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: André Draszik @ 2019-10-01  9:54 UTC (permalink / raw)
  To: openembedded-core

This series updates the ruby recipe to:
* remove duplicated patches
* make it work better on musl
* fix non-IPv6 support
* update to v2.6.4

They were all kept as individual patches, in particular
the version update, so as to make backporting the
three first recipe fixes easier onto OE maintenance
branches.

Cheers,
Andre'




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v3 1/4] ruby: drop long-merged CVE patches
  2019-10-01  9:54 [PATCH v3 0/4] ruby recipe updates André Draszik
@ 2019-10-01  9:54 ` André Draszik
  2019-10-01  9:54 ` [PATCH v3 2/4] ruby: configure mis-detects isnan/isinf on musl André Draszik
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: André Draszik @ 2019-10-01  9:54 UTC (permalink / raw)
  To: openembedded-core

From: André Draszik <andre.draszik@jci.com>

The CVE patches here address the original problem in
a different way to how upstream solved it, and are
superfluous.

Ruby updated to Onigmo v6.1.3+669ac999761 before its
v2.5.0 release, and both CVEs were fixed before Onigmo
v6.1.3:
    https://github.com/k-takata/Onigmo/releases/tag/Onigmo-6.1.3
    https://github.com/k-takata/Onigmo/commits/Onigmo-6.1.3
        https://github.com/k-takata/Onigmo/commit/40945546578004bf40e6f884834bcad4054c70f7
        https://github.com/k-takata/Onigmo/commit/783b7ef491e1422e4be7407ccc3e4305e5013507

Because the issues were fixed differently here and
in Ruby (Onigmo), patch never complained about
duplicatation during recipe updates.

Signed-off-by: André Draszik <andre.draszik@jci.com>
---
 .../ruby/ruby/ruby-CVE-2017-9226.patch        | 32 -----------------
 .../ruby/ruby/ruby-CVE-2017-9228.patch        | 34 -------------------
 meta/recipes-devtools/ruby/ruby_2.5.5.bb      |  2 --
 3 files changed, 68 deletions(-)
 delete mode 100644 meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9226.patch
 delete mode 100644 meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9228.patch

diff --git a/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9226.patch b/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9226.patch
deleted file mode 100644
index 89437bba74..0000000000
--- a/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9226.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From b4bf968ad52afe14e60a2dc8a95d3555c543353a Mon Sep 17 00:00:00 2001
-From: "K.Kosako" <kosako@sofnec.co.jp>
-Date: Thu, 18 May 2017 17:05:27 +0900
-Subject: [PATCH] fix #55 : check too big code point value for single byte
- value in next_state_val()
-
----
- regparse.c |    3 +++
- 1 file changed, 3 insertions(+)
-
---- end of original header
-
-CVE: CVE-2017-9226
-
-Add check for octal number bigger than 255.
-
-Upstream-Status: Pending
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
-
---- ruby-2.4.1.orig/regparse.c
-+++ ruby-2.4.1/regparse.c
-@@ -4450,6 +4450,9 @@ next_state_val(CClassNode* cc, CClassNod
-   switch (*state) {
-   case CCS_VALUE:
-     if (*type == CCV_SB) {
-+      if (*from > 0xff)
-+          return ONIGERR_INVALID_CODE_POINT_VALUE;
-+
-       BITSET_SET_BIT_CHKDUP(cc->bs, (int )(*from));
-       if (IS_NOT_NULL(asc_cc))
- 	BITSET_SET_BIT(asc_cc->bs, (int )(*from));
diff --git a/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9228.patch b/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9228.patch
deleted file mode 100644
index d8bfba486c..0000000000
--- a/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9228.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 3b63d12038c8d8fc278e81c942fa9bec7c704c8b Mon Sep 17 00:00:00 2001
-From: "K.Kosako" <kosako@sofnec.co.jp>
-Date: Wed, 24 May 2017 13:43:25 +0900
-Subject: [PATCH] fix #60 : invalid state(CCS_VALUE) in parse_char_class()
-
----
- regparse.c |    4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
---- end of original header
-
-CVE: CVE-2017-9228
-
-Upstream-Status: Inappropriate [not author]
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
-diff --git a/regparse.c b/regparse.c
-index 69875fa..1988747 100644
---- a/regparse.c
-+++ b/regparse.c
-@@ -4081,7 +4081,9 @@ next_state_class(CClassNode* cc, OnigCodePoint* vs, enum CCVALTYPE* type,
-     }
-   }
- 
--  *state = CCS_VALUE;
-+  if (*state != CCS_START)
-+    *state = CCS_VALUE;
-+
-   *type  = CCV_CLASS;
-   return 0;
- }
--- 
-1.7.9.5
-
diff --git a/meta/recipes-devtools/ruby/ruby_2.5.5.bb b/meta/recipes-devtools/ruby/ruby_2.5.5.bb
index 8ad59a7657..4082b02f14 100644
--- a/meta/recipes-devtools/ruby/ruby_2.5.5.bb
+++ b/meta/recipes-devtools/ruby/ruby_2.5.5.bb
@@ -1,8 +1,6 @@
 require ruby.inc
 
 SRC_URI += " \
-           file://ruby-CVE-2017-9226.patch \
-           file://ruby-CVE-2017-9228.patch \
            file://run-ptest \
            "
 
-- 
2.23.0.rc1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v3 2/4] ruby: configure mis-detects isnan/isinf on musl
  2019-10-01  9:54 [PATCH v3 0/4] ruby recipe updates André Draszik
  2019-10-01  9:54 ` [PATCH v3 1/4] ruby: drop long-merged CVE patches André Draszik
@ 2019-10-01  9:54 ` André Draszik
  2019-10-01  9:54 ` [PATCH v3 3/4] ruby: fix non-IPv6 support André Draszik
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: André Draszik @ 2019-10-01  9:54 UTC (permalink / raw)
  To: openembedded-core

From: André Draszik <andre.draszik@jci.com>

The configure script does not detect isnan/isinf as macros
as is the case in musl:
    checking for isinf... no
    checking for isnan... no

Backport an upstream patch from 2.7.0-preview1 to address this:
    checking whether isinf is declared... yes
    checking whether isnan is declared... yes

Signed-off-by: André Draszik <andre.draszik@jci.com>

---
v3:
* use upstream patch instead of setting CACHED_CONFIGUREVARS
* rebase on top of CVE duplication patches removal
---
 ...ck-finite-isinf-isnan-as-macros-firs.patch | 101 ++++++++++++++++++
 meta/recipes-devtools/ruby/ruby_2.5.5.bb      |   1 +
 2 files changed, 102 insertions(+)
 create mode 100644 meta/recipes-devtools/ruby/ruby/0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch

diff --git a/meta/recipes-devtools/ruby/ruby/0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch b/meta/recipes-devtools/ruby/ruby/0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch
new file mode 100644
index 0000000000..4cc1fa027f
--- /dev/null
+++ b/meta/recipes-devtools/ruby/ruby/0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch
@@ -0,0 +1,101 @@
+From 3a8189530312e81d6c005c396565f985a47f3383 Mon Sep 17 00:00:00 2001
+From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
+Date: Fri, 8 Feb 2019 07:22:55 +0000
+Subject: [PATCH] configure.ac: check finite,isinf,isnan as macros first
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+[ruby-core:91487] [Bug #15595]
+
+git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
+
+---
+Upstream-Status: Backport [https://github.com/ruby/ruby/commit/74f94b3e6ebf15b76f3b357e754095412b006e94]
+(modified so as to apply cleanly here)
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+---
+ aclocal.m4                    |  1 +
+ configure.ac                  | 13 ++++---------
+ tool/m4/ruby_replace_funcs.m4 | 13 +++++++++++++
+ 3 files changed, 18 insertions(+), 9 deletions(-)
+ create mode 100644 tool/m4/ruby_replace_funcs.m4
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 18ba297b05..2a907b3467 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -13,3 +13,4 @@
+ 
+ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+ m4_include([acinclude.m4])
++m4_include([tool/m4/ruby_replace_funcs.m4])
+diff --git a/configure.ac b/configure.ac
+index 8a7cee55b8..b97c5b3cc9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1189,9 +1189,6 @@ main()
+ 		ac_cv_func_fsync=yes
+ 		ac_cv_func_seekdir=yes
+ 		ac_cv_func_telldir=yes
+-		ac_cv_func_isinf=yes
+-		ac_cv_func_isnan=yes
+-		ac_cv_func_finite=yes
+ 		ac_cv_func_lchown=yes
+ 		ac_cv_func_link=yes
+ 		ac_cv_func_readlink=yes
+@@ -1239,9 +1236,6 @@ main()
+ [netbsd*], [	LIBS="-lm $LIBS"
+ 		],
+ [dragonfly*], [	LIBS="-lm $LIBS"
+-		# isinf() and isnan() are macros on DragonFly.
+-		ac_cv_func_isinf=yes
+-		ac_cv_func_isnan=yes
+ 		],
+ [aix*],[	LIBS="-lm $LIBS"
+ 		ac_cv_func_round=no
+@@ -2213,11 +2207,8 @@ AC_REPLACE_FUNCS(dup2)
+ AC_REPLACE_FUNCS(erf)
+ AC_REPLACE_FUNCS(explicit_bzero)
+ AC_REPLACE_FUNCS(ffs)
+-AC_REPLACE_FUNCS(finite)
+ AC_REPLACE_FUNCS(flock)
+ AC_REPLACE_FUNCS(hypot)
+-AC_REPLACE_FUNCS(isinf)
+-AC_REPLACE_FUNCS(isnan)
+ AC_REPLACE_FUNCS(lgamma_r)
+ AC_REPLACE_FUNCS(memmove)
+ AC_REPLACE_FUNCS(nextafter)
+@@ -2229,6 +2220,10 @@ AC_REPLACE_FUNCS(strlcpy)
+ AC_REPLACE_FUNCS(strstr)
+ AC_REPLACE_FUNCS(tgamma)
+ 
++RUBY_REPLACE_FUNC([finite], [@%:@include <math.h>])
++RUBY_REPLACE_FUNC([isinf], [@%:@include <math.h>])
++RUBY_REPLACE_FUNC([isnan], [@%:@include <math.h>])
++
+ # for missing/setproctitle.c
+ AS_CASE(["$target_os"],
+ [aix* | k*bsd*-gnu | kopensolaris*-gnu | linux* | darwin*], [AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)],
+diff --git a/tool/m4/ruby_replace_funcs.m4 b/tool/m4/ruby_replace_funcs.m4
+new file mode 100644
+index 0000000000..d0612e29a0
+--- /dev/null
++++ b/tool/m4/ruby_replace_funcs.m4
+@@ -0,0 +1,13 @@
++# -*- Autoconf -*-
++dnl RUBY_REPLACE_FUNC [func] [included]
++AC_DEFUN([RUBY_REPLACE_FUNC], [dnl
++    AC_CHECK_DECL([$1],dnl
++        [AC_DEFINE(AS_TR_CPP(HAVE_[$1]))],dnl
++        [AC_REPLACE_FUNCS($1)],dnl
++        [$2])dnl
++])
++
++dnl RUBY_REPLACE_FUNCS [funcs] [included]
++AC_DEFUN([RUBY_REPLACE_FUNCS] [dnl
++    m4_map_args_w([$1], [RUBY_REPLACE_FUNC(], [), [$2]])dnl
++])
+-- 
+2.23.0.rc1
+
diff --git a/meta/recipes-devtools/ruby/ruby_2.5.5.bb b/meta/recipes-devtools/ruby/ruby_2.5.5.bb
index 4082b02f14..341329a6a1 100644
--- a/meta/recipes-devtools/ruby/ruby_2.5.5.bb
+++ b/meta/recipes-devtools/ruby/ruby_2.5.5.bb
@@ -1,6 +1,7 @@
 require ruby.inc
 
 SRC_URI += " \
+           file://0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch \
            file://run-ptest \
            "
 
-- 
2.23.0.rc1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v3 3/4] ruby: fix non-IPv6 support
  2019-10-01  9:54 [PATCH v3 0/4] ruby recipe updates André Draszik
  2019-10-01  9:54 ` [PATCH v3 1/4] ruby: drop long-merged CVE patches André Draszik
  2019-10-01  9:54 ` [PATCH v3 2/4] ruby: configure mis-detects isnan/isinf on musl André Draszik
@ 2019-10-01  9:54 ` André Draszik
  2019-10-01  9:54 ` [PATCH v3 4/4] ruby: update to v2.6.4 André Draszik
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: André Draszik @ 2019-10-01  9:54 UTC (permalink / raw)
  To: openembedded-core

From: André Draszik <andre.draszik@jci.com>

When IPv6 support is disabled, this recipe mis-configures
ruby so that it end up non-working:
--enable-wide-getaddrinfo instructs ruby to re-implement
the standard getaddinfo(), but IPv6 support is still
automatically detected via ext/socket/extconf.rb
independently of that flag.

To re-implement getaddrinfo(), ruby uses the obsolete
getipnodebyaddr() and getipnodebyname() functions - i.e.
according to the man-page, glibc provided those only in
glibc 2.1.91-95; and of course compilation fails. [1]

Switch to ruby's standard --enable-ipv6= configure
options to make the build work without warnings, and
ruby work at runtime as well.

[1] Compilation and linking actually succeed, albeit with
a warning regarding implicit declaration / unresolved
symbols. The error is only obvious at runtime due to the
unresolved symbols...

Signed-off-by: André Draszik <andre.draszik@jci.com>

---
v3:
* rebased

v2:
* switch to --enable-ipv6/--disable-ipv6 instead of
  --enable-ipv6=yes/no, as the latter is not actually
  recognised
---
 meta/recipes-devtools/ruby/ruby_2.5.5.bb | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/meta/recipes-devtools/ruby/ruby_2.5.5.bb b/meta/recipes-devtools/ruby/ruby_2.5.5.bb
index 341329a6a1..223b0371eb 100644
--- a/meta/recipes-devtools/ruby/ruby_2.5.5.bb
+++ b/meta/recipes-devtools/ruby/ruby_2.5.5.bb
@@ -8,17 +8,12 @@ SRC_URI += " \
 SRC_URI[md5sum] = "7e156fb526b8f4bb1b30a3dd8a7ce400"
 SRC_URI[sha256sum] = "28a945fdf340e6ba04fc890b98648342e3cccfd6d223a48f3810572f11b2514c"
 
-# 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
-# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch
-UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo"
-
 PACKAGECONFIG ??= ""
 PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
 
 PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
 PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp"
-PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo,"
+PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6,"
 
 EXTRA_AUTORECONF += "--exclude=aclocal"
 
-- 
2.23.0.rc1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v3 4/4] ruby: update to v2.6.4
  2019-10-01  9:54 [PATCH v3 0/4] ruby recipe updates André Draszik
                   ` (2 preceding siblings ...)
  2019-10-01  9:54 ` [PATCH v3 3/4] ruby: fix non-IPv6 support André Draszik
@ 2019-10-01  9:54 ` André Draszik
  2019-10-01 14:29   ` [PATCH] ruby: some ptest fixes André Draszik
  2019-10-01 11:55 ` [PATCH v3 0/4] ruby recipe updates Ross Burton
  2019-10-01 15:02 ` ✗ patchtest: failure for ruby recipe updates (rev2) Patchwork
  5 siblings, 1 reply; 9+ messages in thread
From: André Draszik @ 2019-10-01  9:54 UTC (permalink / raw)
  To: openembedded-core

From: André Draszik <andre.draszik@jci.com>

Most patches had to be refreshed

Note that we can now drop
    EXTRA_AUTORECONF += "--exclude=aclocal"
from the recipe, as ruby upstream now fully supports
runnning aclocal:
    https://github.com/ruby/ruby/pull/1793/commits/df9bf70cd2275a3ddc3108f392214fcc4a9b0859
    https://github.com/ruby/ruby/commit/ec43478f34de262ebdd2922c488e265344b489c3

Also note that 'created.rid' is not being installed
anymore since v2.6.0

While additional LICENSEs were added to the recipe,
they should always have been mentioned in this recipe,
i.e. the license checksum was updated only because:
    * URLs were updated
    * new imported components were mentioned (with no new licenses)
    * formatting was changed
    * dates were updated

Signed-off-by: André Draszik <andre.draszik@jci.com>
---
 meta/recipes-devtools/ruby/ruby.inc           |  6 ++--
 ...x-cross-compilation-of-external-gems.patch | 34 +++++++++++++++++++
 ...Obey-LDFLAGS-for-the-link-of-libruby.patch | 22 ++++++------
 ...k-finite-isinf-isnan-as-macros-firs.patch} | 30 ++++++++--------
 meta/recipes-devtools/ruby/ruby/extmk.patch   | 16 ---------
 .../ruby/{ruby_2.5.5.bb => ruby_2.6.4.bb}     | 14 ++------
 6 files changed, 68 insertions(+), 54 deletions(-)
 create mode 100644 meta/recipes-devtools/ruby/ruby/0001-extmk-fix-cross-compilation-of-external-gems.patch
 rename meta/recipes-devtools/ruby/ruby/{0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch => 0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch} (78%)
 delete mode 100644 meta/recipes-devtools/ruby/ruby/extmk.patch
 rename meta/recipes-devtools/ruby/{ruby_2.5.5.bb => ruby_2.6.4.bb} (81%)

diff --git a/meta/recipes-devtools/ruby/ruby.inc b/meta/recipes-devtools/ruby/ruby.inc
index a98249afbd..c0ceb1c10b 100644
--- a/meta/recipes-devtools/ruby/ruby.inc
+++ b/meta/recipes-devtools/ruby/ruby.inc
@@ -6,12 +6,12 @@ It is simple, straight-forward, and extensible. \
 "
 HOMEPAGE = "http://www.ruby-lang.org/"
 SECTION = "devel/ruby"
-LICENSE = "Ruby | BSD | GPLv2"
+LICENSE = "Ruby | BSD-2-Clause | BSD-3-Clause | GPLv2 | ISC | MIT"
 LIC_FILES_CHKSUM = "\
     file://COPYING;md5=340948e1882e579731841bf49cdc22c1 \
     file://BSDL;md5=19aaf65c88a40b508d17ae4be539c4b5\
     file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263\
-    file://LEGAL;md5=23a79bb4c1a40f6cc9bcb6f4e7c39799 \
+    file://LEGAL;md5=4ac0b84d1f7f420bca282e1adefc7f99 \
 "
 
 DEPENDS = "ruby-native zlib openssl tcl libyaml gdbm readline libffi"
@@ -19,7 +19,7 @@ DEPENDS_class-native = "openssl-native libyaml-native readline-native zlib-nativ
 
 SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
 SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \
-           file://extmk.patch \
+           file://0001-extmk-fix-cross-compilation-of-external-gems.patch \
            file://0002-Obey-LDFLAGS-for-the-link-of-libruby.patch \
            "
 UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/"
diff --git a/meta/recipes-devtools/ruby/ruby/0001-extmk-fix-cross-compilation-of-external-gems.patch b/meta/recipes-devtools/ruby/ruby/0001-extmk-fix-cross-compilation-of-external-gems.patch
new file mode 100644
index 0000000000..2e3156880e
--- /dev/null
+++ b/meta/recipes-devtools/ruby/ruby/0001-extmk-fix-cross-compilation-of-external-gems.patch
@@ -0,0 +1,34 @@
+From a6e12b25a54d112c899b70c89c0bec9c5e5ebf3c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
+Date: Mon, 30 Sep 2019 16:57:01 +0100
+Subject: [PATCH 1/3] extmk: fix cross-compilation of external gems
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Note that I (André) didn't actually write this patch, I
+only updated it so that git-am works.
+
+Upstream-Status: Pending
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+---
+ ext/extmk.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ext/extmk.rb b/ext/extmk.rb
+index 1389dc4117..e4d923d7a7 100755
+--- a/ext/extmk.rb
++++ b/ext/extmk.rb
+@@ -413,8 +413,8 @@ def $mflags.defined?(var)
+ end
+ $ruby = [$ruby]
+ $ruby << "-I'$(topdir)'"
++$ruby << "-I'$(top_srcdir)/lib'"
+ unless CROSS_COMPILING
+-  $ruby << "-I'$(top_srcdir)/lib'"
+   $ruby << "-I'$(extout)/$(arch)'" << "-I'$(extout)/common'" if $extout
+   ENV["RUBYLIB"] = "-"
+ end
+-- 
+2.23.0.rc1
+
diff --git a/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch b/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
index 4cf579f427..5979d8bd73 100644
--- a/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
+++ b/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
@@ -1,25 +1,27 @@
-Upstream-Status: Pending
-
-From 306e95a9818d39d3349075aac9609e062b0f19ce Mon Sep 17 00:00:00 2001
+From 6d608326970b1613633d7715ebb7d628dfcd16ee Mon Sep 17 00:00:00 2001
 From: Christopher Larson <chris_larson@mentor.com>
 Date: Thu, 5 May 2016 10:59:07 -0700
-Subject: [PATCH 2/2] Obey LDFLAGS for the link of libruby
+Subject: [PATCH 2/3] Obey LDFLAGS for the link of libruby
 
 Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Upstream-Status: Pending
 ---
  Makefile.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-Index: ruby-2.5.0/Makefile.in
-===================================================================
---- ruby-2.5.0.orig/Makefile.in
-+++ ruby-2.5.0/Makefile.in
-@@ -77,7 +77,7 @@ LIBS = @LIBS@ $(EXTLIBS)
- MISSING = @LIBOBJS@ @ALLOCA@
+diff --git a/Makefile.in b/Makefile.in
+index fa1e19ef37..bbd07fa34b 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -109,7 +109,7 @@ MISSING = @LIBOBJS@ @ALLOCA@
  ENABLE_SHARED = @ENABLE_SHARED@
  LDSHARED = @LIBRUBY_LDSHARED@
+ DLDSHARED = @DLDSHARED@
 -DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
 +DLDFLAGS = @LIBRUBY_DLDFLAGS@ @LDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
  SOLIBS = @SOLIBS@
  ENABLE_DEBUG_ENV = @ENABLE_DEBUG_ENV@
  MAINLIBS = @MAINLIBS@
+-- 
+2.23.0.rc1
+
diff --git a/meta/recipes-devtools/ruby/ruby/0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch b/meta/recipes-devtools/ruby/ruby/0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch
similarity index 78%
rename from meta/recipes-devtools/ruby/ruby/0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch
rename to meta/recipes-devtools/ruby/ruby/0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch
index 4cc1fa027f..1a8cff3e8c 100644
--- a/meta/recipes-devtools/ruby/ruby/0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch
+++ b/meta/recipes-devtools/ruby/ruby/0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch
@@ -1,7 +1,7 @@
-From 3a8189530312e81d6c005c396565f985a47f3383 Mon Sep 17 00:00:00 2001
+From bd71b698bf733e6e93282cd2b1b93f51e1a33c7c Mon Sep 17 00:00:00 2001
 From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
 Date: Fri, 8 Feb 2019 07:22:55 +0000
-Subject: [PATCH] configure.ac: check finite,isinf,isnan as macros first
+Subject: [PATCH 3/3] configure.ac: check finite,isinf,isnan as macros first
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
@@ -12,7 +12,6 @@ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67036 b2dd03c8-39d4-4d8f-98ff-
 
 ---
 Upstream-Status: Backport [https://github.com/ruby/ruby/commit/74f94b3e6ebf15b76f3b357e754095412b006e94]
-(modified so as to apply cleanly here)
 Signed-off-by: André Draszik <andre.draszik@jci.com>
 ---
  aclocal.m4                    |  1 +
@@ -22,19 +21,22 @@ Signed-off-by: André Draszik <andre.draszik@jci.com>
  create mode 100644 tool/m4/ruby_replace_funcs.m4
 
 diff --git a/aclocal.m4 b/aclocal.m4
-index 18ba297b05..2a907b3467 100644
+index b0fe3eb959..ed7d14ef63 100644
 --- a/aclocal.m4
 +++ b/aclocal.m4
-@@ -13,3 +13,4 @@
- 
- m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
- m4_include([acinclude.m4])
+@@ -35,6 +35,7 @@ m4_include([tool/m4/ruby_func_attribute.m4])
+ m4_include([tool/m4/ruby_mingw32.m4])
+ m4_include([tool/m4/ruby_prepend_option.m4])
+ m4_include([tool/m4/ruby_prog_gnu_ld.m4])
 +m4_include([tool/m4/ruby_replace_funcs.m4])
+ m4_include([tool/m4/ruby_replace_type.m4])
+ m4_include([tool/m4/ruby_rm_recursive.m4])
+ m4_include([tool/m4/ruby_setjmp_type.m4])
 diff --git a/configure.ac b/configure.ac
-index 8a7cee55b8..b97c5b3cc9 100644
+index 2c4d2888d2..2691da6a3c 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1189,9 +1189,6 @@ main()
+@@ -946,9 +946,6 @@ main()
  		ac_cv_func_fsync=yes
  		ac_cv_func_seekdir=yes
  		ac_cv_func_telldir=yes
@@ -44,7 +46,7 @@ index 8a7cee55b8..b97c5b3cc9 100644
  		ac_cv_func_lchown=yes
  		ac_cv_func_link=yes
  		ac_cv_func_readlink=yes
-@@ -1239,9 +1236,6 @@ main()
+@@ -999,9 +996,6 @@ main()
  [netbsd*], [	LIBS="-lm $LIBS"
  		],
  [dragonfly*], [	LIBS="-lm $LIBS"
@@ -54,7 +56,7 @@ index 8a7cee55b8..b97c5b3cc9 100644
  		],
  [aix*],[	LIBS="-lm $LIBS"
  		ac_cv_func_round=no
-@@ -2213,11 +2207,8 @@ AC_REPLACE_FUNCS(dup2)
+@@ -1724,11 +1718,8 @@ AC_REPLACE_FUNCS(dup2)
  AC_REPLACE_FUNCS(erf)
  AC_REPLACE_FUNCS(explicit_bzero)
  AC_REPLACE_FUNCS(ffs)
@@ -65,8 +67,8 @@ index 8a7cee55b8..b97c5b3cc9 100644
 -AC_REPLACE_FUNCS(isnan)
  AC_REPLACE_FUNCS(lgamma_r)
  AC_REPLACE_FUNCS(memmove)
- AC_REPLACE_FUNCS(nextafter)
-@@ -2229,6 +2220,10 @@ AC_REPLACE_FUNCS(strlcpy)
+ AC_REPLACE_FUNCS(nan)
+@@ -1741,6 +1732,10 @@ AC_REPLACE_FUNCS(strlcpy)
  AC_REPLACE_FUNCS(strstr)
  AC_REPLACE_FUNCS(tgamma)
  
diff --git a/meta/recipes-devtools/ruby/ruby/extmk.patch b/meta/recipes-devtools/ruby/ruby/extmk.patch
deleted file mode 100644
index 404b9af7aa..0000000000
--- a/meta/recipes-devtools/ruby/ruby/extmk.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-diff -ru ruby-1.8.7-p248.orig/ext/extmk.rb ruby-1.8.7-p248/ext/extmk.rb
---- ruby-1.8.7-p248.orig/ext/extmk.rb	2009-12-24 03:01:58.000000000 -0600
-+++ ruby-1.8.7-p248/ext/extmk.rb	2010-02-12 15:55:27.370061558 -0600
-@@ -413,8 +413,8 @@ def $mflags.defined?(var)
- end
- $ruby = [$ruby]
- $ruby << "-I'$(topdir)'"
-+$ruby << "-I'$(top_srcdir)/lib'"
- unless CROSS_COMPILING
--  $ruby << "-I'$(top_srcdir)/lib'"
-   $ruby << "-I'$(extout)/$(arch)'" << "-I'$(extout)/common'" if $extout
-   ENV["RUBYLIB"] = "-"
- end
--- 
-
diff --git a/meta/recipes-devtools/ruby/ruby_2.5.5.bb b/meta/recipes-devtools/ruby/ruby_2.6.4.bb
similarity index 81%
rename from meta/recipes-devtools/ruby/ruby_2.5.5.bb
rename to meta/recipes-devtools/ruby/ruby_2.6.4.bb
index 223b0371eb..4554487c0a 100644
--- a/meta/recipes-devtools/ruby/ruby_2.5.5.bb
+++ b/meta/recipes-devtools/ruby/ruby_2.6.4.bb
@@ -1,12 +1,12 @@
 require ruby.inc
 
 SRC_URI += " \
-           file://0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch \
+           file://0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch \
            file://run-ptest \
            "
 
-SRC_URI[md5sum] = "7e156fb526b8f4bb1b30a3dd8a7ce400"
-SRC_URI[sha256sum] = "28a945fdf340e6ba04fc890b98648342e3cccfd6d223a48f3810572f11b2514c"
+SRC_URI[md5sum] = "49b628cdb21db967d8a3f6ca6e222583"
+SRC_URI[sha256sum] = "4fc1d8ba75505b3797020a6ffc85a8bcff6adc4dabae343b6572bf281ee17937"
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
@@ -15,8 +15,6 @@ PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
 PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp"
 PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6,"
 
-EXTRA_AUTORECONF += "--exclude=aclocal"
-
 EXTRA_OECONF = "\
     --disable-versioned-paths \
     --disable-rpath \
@@ -42,12 +40,6 @@ do_install_append_class-target () {
            -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
-
 }
 
 do_install_ptest () {
-- 
2.23.0.rc1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v3 0/4] ruby recipe updates
  2019-10-01  9:54 [PATCH v3 0/4] ruby recipe updates André Draszik
                   ` (3 preceding siblings ...)
  2019-10-01  9:54 ` [PATCH v3 4/4] ruby: update to v2.6.4 André Draszik
@ 2019-10-01 11:55 ` Ross Burton
  2019-10-01 15:02 ` ✗ patchtest: failure for ruby recipe updates (rev2) Patchwork
  5 siblings, 0 replies; 9+ messages in thread
From: Ross Burton @ 2019-10-01 11:55 UTC (permalink / raw)
  To: André Draszik, openembedded-core

On 01/10/2019 10:54, André Draszik wrote:
> This series updates the ruby recipe to:
> * remove duplicated patches
> * make it work better on musl
> * fix non-IPv6 support
> * update to v2.6.4

I spy a new ruby recipe maintainer. ;)

Thanks André!

Ross



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] ruby: some ptest fixes
  2019-10-01  9:54 ` [PATCH v3 4/4] ruby: update to v2.6.4 André Draszik
@ 2019-10-01 14:29   ` André Draszik
  0 siblings, 0 replies; 9+ messages in thread
From: André Draszik @ 2019-10-01 14:29 UTC (permalink / raw)
  To: openembedded-core

From: André Draszik <andre.draszik@jci.com>

* the (new?) ruby expects some additional compiled libraries
  to run, so we need to copy them as part of ptest.
  Fixes errors like:
  # ruby ./runner.rb ./-ext-/vm/test_at_exit.rb
  Run options:

  # Running tests:

  [1/1] TestVM#test_at_exit = 0.06 s
    1) Failure:
  TestVM#test_at_exit [/usr/lib/ruby/ptest/test/-ext-/vm/test_at_exit.rb:7]:

  1. [1/2] Assertion for "stdout"
     | <["begin", "end"]> expected but was
     | <[]>.

  2. [2/2] Assertion for "stderr"
     | <[]> expected but was
     | <["-:1:in `require': cannot load such file -- -test-/vm/at_exit (LoadError)",
     |  "\tfrom -:1:in `<main>'"]>.

* the 'erb' test can't find the erb binary, as we're not
  running this from within the build directory

Signed-off-by: André Draszik <andre.draszik@jci.com>
---
 meta/recipes-devtools/ruby/ruby_2.6.4.bb | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/ruby/ruby_2.6.4.bb b/meta/recipes-devtools/ruby/ruby_2.6.4.bb
index 4554487c0a..fb202b8f1f 100644
--- a/meta/recipes-devtools/ruby/ruby_2.6.4.bb
+++ b/meta/recipes-devtools/ruby/ruby_2.6.4.bb
@@ -44,6 +44,14 @@ do_install_append_class-target () {
 
 do_install_ptest () {
     cp -rf ${S}/test ${D}${PTEST_PATH}/
+    # install test-binaries
+    find $(find ./.ext -path '*/-test-') -name '*.so' -print0 \
+        | tar --no-recursion --null -T - --no-same-owner --preserve-permissions -cf - \
+        | tar -C ${D}${libdir}/ruby/${SHRT_VER}.0/ --no-same-owner --preserve-permissions --strip-components=2 -xf -
+    # adjust path to not assume build directory layout
+    sed -e 's|File.expand_path(.*\.\./bin/erb[^)]*|File.expand_path("${bindir}/erb"|g' \
+        -i ${D}${PTEST_PATH}/test/erb/test_erb_command.rb
+
     cp -r ${S}/include ${D}/${libdir}/ruby/
     test_case_rb=`grep rubygems/test_case.rb ${B}/.installed.list`
     sed -i -e 's:../../../test/:../../../ptest/test/:g' ${D}/$test_case_rb
@@ -61,6 +69,9 @@ FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc"
 
 FILES_${PN} += "${datadir}/rubygems"
 
-FILES_${PN}-ptest_append_class-target += "${libdir}/ruby/include"
+FILES_${PN}-ptest_append_class-target = "\
+    ${libdir}/ruby/include \
+    ${libdir}/ruby/${SHRT_VER}.0/*/-test- \
+"
 
 BBCLASSEXTEND = "native"
-- 
2.23.0.rc1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* ✗ patchtest: failure for ruby recipe updates (rev2)
  2019-10-01  9:54 [PATCH v3 0/4] ruby recipe updates André Draszik
                   ` (4 preceding siblings ...)
  2019-10-01 11:55 ` [PATCH v3 0/4] ruby recipe updates Ross Burton
@ 2019-10-01 15:02 ` Patchwork
  2019-10-01 15:24   ` André Draszik
  5 siblings, 1 reply; 9+ messages in thread
From: Patchwork @ 2019-10-01 15:02 UTC (permalink / raw)
  To: André Draszik; +Cc: openembedded-core

== Series Details ==

Series: ruby recipe updates (rev2)
Revision: 2
URL   : https://patchwork.openembedded.org/series/20256/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at 9973f89daf)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ✗ patchtest: failure for ruby recipe updates (rev2)
  2019-10-01 15:02 ` ✗ patchtest: failure for ruby recipe updates (rev2) Patchwork
@ 2019-10-01 15:24   ` André Draszik
  0 siblings, 0 replies; 9+ messages in thread
From: André Draszik @ 2019-10-01 15:24 UTC (permalink / raw)
  To: openembedded-core

Hi,

not sure why this failed. These patches are against current master
which is at revision
a73cbe649af5 ("bitbake: siggen: Remove full path from unitaskhashes keys")

Cheers,
Andre'

On Tue, 2019-10-01 at 15:02 +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: ruby recipe updates (rev2)
> Revision: 2
> URL   : https://patchwork.openembedded.org/series/20256/
> State : failure
> 
> == Summary ==
> 
> 
> Thank you for submitting this patch series to OpenEmbedded Core. This is
> an automated response. Several tests have been executed on the proposed
> series by patchtest resulting in the following failures:
> 
> 
> 
> * Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
>   Suggested fix    Rebase your series on top of targeted branch
>   Targeted branch  master (currently at 9973f89daf)
> 
> 
> 
> If you believe any of these test results are incorrect, please reply to the
> mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
> Otherwise we would appreciate you correcting the issues and submitting a new
> version of the patchset if applicable. Please ensure you add/increment the
> version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
> [PATCH v3] -> ...).
> 
> ---
> Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
> Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
> Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
> 



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-10-01 15:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-01  9:54 [PATCH v3 0/4] ruby recipe updates André Draszik
2019-10-01  9:54 ` [PATCH v3 1/4] ruby: drop long-merged CVE patches André Draszik
2019-10-01  9:54 ` [PATCH v3 2/4] ruby: configure mis-detects isnan/isinf on musl André Draszik
2019-10-01  9:54 ` [PATCH v3 3/4] ruby: fix non-IPv6 support André Draszik
2019-10-01  9:54 ` [PATCH v3 4/4] ruby: update to v2.6.4 André Draszik
2019-10-01 14:29   ` [PATCH] ruby: some ptest fixes André Draszik
2019-10-01 11:55 ` [PATCH v3 0/4] ruby recipe updates Ross Burton
2019-10-01 15:02 ` ✗ patchtest: failure for ruby recipe updates (rev2) Patchwork
2019-10-01 15:24   ` André Draszik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.