From d49c3999f978a0018c68384355fbea4ac6fa1f7d Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Fri, 18 Oct 2024 14:43:52 +0000 Subject: [PATCH 1/6] fix nokigiri with new version (try?) --- packages/ruby-mini-portile2/package.py | 1 + packages/ruby-nokogiri/package.py | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/ruby-mini-portile2/package.py b/packages/ruby-mini-portile2/package.py index 3c9463d..ec00095 100644 --- a/packages/ruby-mini-portile2/package.py +++ b/packages/ruby-mini-portile2/package.py @@ -12,6 +12,7 @@ class RubyMiniPortile2(RubyPackage): homepage = "https://github.com/flavorjones/mini_portile" url = "https://rubygems.org/downloads/mini_portile2-2.7.0.gem" + version('2.8.7', sha256='13eef5ab459bbfd33d61e539564ec25a9c2cf593b0a5ea6d4d7ef8c19b162ee0', expand=False) version('2.7.0', sha256='6416bf22d3e463fc318b34810920e73055418483b074330d95c773f4596dbdfc', expand=False) version('2.6.1', sha256='385fd7a2f3cda0ea5a0cb85551a936da941d7580fc9037a75dea820843aa7dd3', expand=False) diff --git a/packages/ruby-nokogiri/package.py b/packages/ruby-nokogiri/package.py index 3263891..3177614 100644 --- a/packages/ruby-nokogiri/package.py +++ b/packages/ruby-nokogiri/package.py @@ -14,8 +14,15 @@ class RubyNokogiri(RubyPackage): homepage = "https://nokogiri.org" url = "https://rubygems.org/downloads/nokogiri-1.12.5.gem" + version('1.16.7', sha256='f819cbfdfb0a7b19c9c52c6f2ca63df0e58a6125f4f139707b586b9511d7fe95', expand=False) version('1.12.5', sha256='2b20905942acc580697c8c496d0d1672ab617facb9d30d156b3c7676e67902ec', expand=False) - depends_on('ruby@2.5.0:', type=('build', 'run')) - depends_on('ruby-racc@1.8.1:', type=('build','run')) - depends_on('ruby-mini-portile2@2.6.1', type=('build', 'run')) + with when('@1.12.5'): + depends_on('ruby@2.5.0:3.0.0', type=('build', 'run')) + depends_on('ruby-racc@1.4.0:', type=('build','run')) + depends_on('ruby-mini-portile2@2.6.1:2.7.0', type=('build', 'run')) + + with when('@1.16.7'): + depends_on('ruby@3.0.0:', type=('build', 'run')) + depends_on('ruby-racc@1.4.0:', type=('build','run')) + depends_on('ruby-mini-portile2@2.8.2:2.9.0', type=('build', 'run')) From 678af21296839a9c1cbbd835c2d4b90c5d9f8a70 Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Fri, 18 Oct 2024 11:40:48 -0500 Subject: [PATCH 2/6] Update packages/ruby-nokogiri/package.py Co-authored-by: Brice Videau --- packages/ruby-nokogiri/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ruby-nokogiri/package.py b/packages/ruby-nokogiri/package.py index 3177614..67bdf3f 100644 --- a/packages/ruby-nokogiri/package.py +++ b/packages/ruby-nokogiri/package.py @@ -18,7 +18,7 @@ class RubyNokogiri(RubyPackage): version('1.12.5', sha256='2b20905942acc580697c8c496d0d1672ab617facb9d30d156b3c7676e67902ec', expand=False) with when('@1.12.5'): - depends_on('ruby@2.5.0:3.0.0', type=('build', 'run')) + depends_on('ruby@2.5.0:2.7.999', type=('build', 'run')) depends_on('ruby-racc@1.4.0:', type=('build','run')) depends_on('ruby-mini-portile2@2.6.1:2.7.0', type=('build', 'run')) From eefd4884107fc3dcb57eaef3ae3b5b2d153dc5a5 Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Fri, 18 Oct 2024 16:42:55 +0000 Subject: [PATCH 3/6] refactor --- packages/ruby-nokogiri/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ruby-nokogiri/package.py b/packages/ruby-nokogiri/package.py index 67bdf3f..2a9fb51 100644 --- a/packages/ruby-nokogiri/package.py +++ b/packages/ruby-nokogiri/package.py @@ -17,12 +17,12 @@ class RubyNokogiri(RubyPackage): version('1.16.7', sha256='f819cbfdfb0a7b19c9c52c6f2ca63df0e58a6125f4f139707b586b9511d7fe95', expand=False) version('1.12.5', sha256='2b20905942acc580697c8c496d0d1672ab617facb9d30d156b3c7676e67902ec', expand=False) + depends_on('ruby-racc@1.4.0:', type=('build','run')) + with when('@1.12.5'): depends_on('ruby@2.5.0:2.7.999', type=('build', 'run')) - depends_on('ruby-racc@1.4.0:', type=('build','run')) depends_on('ruby-mini-portile2@2.6.1:2.7.0', type=('build', 'run')) with when('@1.16.7'): depends_on('ruby@3.0.0:', type=('build', 'run')) - depends_on('ruby-racc@1.4.0:', type=('build','run')) depends_on('ruby-mini-portile2@2.8.2:2.9.0', type=('build', 'run')) From e96c0731e535378f6fc67417a4b179f301f76400 Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Fri, 18 Oct 2024 17:04:46 +0000 Subject: [PATCH 4/6] add ruby version restriction --- packages/thapi/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/thapi/package.py b/packages/thapi/package.py index 4ae0e1a..e67a7db 100644 --- a/packages/thapi/package.py +++ b/packages/thapi/package.py @@ -29,7 +29,12 @@ class Thapi(AutotoolsPackage): depends_on('lttng-tools', type=('build', 'link', 'run'), when='@0.0.8:') depends_on('lttng-ust@:2.12.999', type=('build', 'link', 'run'), when='@:0.0.7') depends_on('lttng-tools@:2.12.999', type=('build', 'link', 'run'), when='@:0.0.7') - depends_on('ruby@2.7.0:', type=('build', 'run')) + + if spack.spack_version in spack.version.ver(':0.22.999'): + depends_on('ruby@2.7.0:3.1', type=('build', 'run')) + else: + depends_on('ruby@2.7.0:', type=('build', 'run')) + depends_on('ruby-babeltrace2', type=('build', 'run')) depends_on('ruby-opencl', type=('build', 'run')) depends_on('ruby-nokogiri', type=('build')) From af4a23151b1d5f2823b0807f3ec8cde1eb38747a Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Fri, 18 Oct 2024 17:05:06 +0000 Subject: [PATCH 5/6] test latest ruby --- .github/workflows/presubmit.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index e161616..6299303 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -18,28 +18,28 @@ jobs: run: | . external/spack/share/spack/setup-env.sh spack repo add ./ - spack install thapi ^ruby@3.1.0 + spack install thapi ^ruby - name: Install thapi v0.0.7 run: | . external/spack/share/spack/setup-env.sh - spack install thapi@0.0.7 ^ruby@3.1.0 + spack install thapi@0.0.7 ^ruby - name: Install thapi v0.0.8 run: | . external/spack/share/spack/setup-env.sh - spack install thapi@0.0.8 ^ruby@3.1.0 + spack install thapi@0.0.8 ^ruby - name: Install thapi v0.0.9 run: | . external/spack/share/spack/setup-env.sh - spack install thapi@0.0.9 ^ruby@3.1.0 + spack install thapi@0.0.9 ^ruby - name: Install thapi v0.0.10 run: | . external/spack/share/spack/setup-env.sh - spack install thapi@0.0.10 ^ruby@3.1.0 + spack install thapi@0.0.10 ^ruby - name: Install thapi v0.0.11 run: | . external/spack/share/spack/setup-env.sh - spack install thapi@0.0.11 ^ruby@3.1.0 + spack install thapi@0.0.11 ^ruby - name: Install thapi master run: | . external/spack/share/spack/setup-env.sh - spack install thapi@master ^lttng-tools@master ^lttng-ust@master ^babeltrace2@master ^ruby@3.1.0 + spack install thapi@master ^lttng-tools@master ^lttng-ust@master ^babeltrace2@master ^ruby From 78e8b313154d22763e0342c13ca3edaaaf69fb74 Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Fri, 18 Oct 2024 17:18:14 +0000 Subject: [PATCH 6/6] version --- packages/thapi/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/thapi/package.py b/packages/thapi/package.py index e67a7db..543cf7b 100644 --- a/packages/thapi/package.py +++ b/packages/thapi/package.py @@ -30,7 +30,8 @@ class Thapi(AutotoolsPackage): depends_on('lttng-ust@:2.12.999', type=('build', 'link', 'run'), when='@:0.0.7') depends_on('lttng-tools@:2.12.999', type=('build', 'link', 'run'), when='@:0.0.7') - if spack.spack_version in spack.version.ver(':0.22.999'): + # Restricting to ruby <= 3.1 when spack is less than 0.23 + if spack.version.Version(spack.spack_version) < spack.version.Version("0.23"): depends_on('ruby@2.7.0:3.1', type=('build', 'run')) else: depends_on('ruby@2.7.0:', type=('build', 'run'))