[arch-commits] Commit in gitlab/trunk (PKGBUILD ruby27-pop-extra-arg.patch)
Date: Monday, January 13, 2020 @ 02:18:18 Author: anatolik Revision: 552277 Replace workaround for 'Rack' project to the correct fix in 'Grape' project https://gitlab.com/groups/gitlab-org/-/epics/2380 Modified: gitlab/trunk/PKGBUILD gitlab/trunk/ruby27-pop-extra-arg.patch + PKGBUILD |8 --- ruby27-pop-extra-arg.patch | 45 --- 2 files changed, 31 insertions(+), 22 deletions(-) Modified: PKGBUILD === --- PKGBUILD2020-01-13 02:18:15 UTC (rev 552276) +++ PKGBUILD2020-01-13 02:18:18 UTC (rev 552277) @@ -49,7 +49,7 @@ 'bf33b818e4ea671c16f58563997ba5fe0a09090e5c03577ff974d31324d4e9782b85a9bb4f1749b97257ce93400c692de935f003770d52b5994c9cab9aee57c6' 'abacbff0d7be918337a17b56481c84e6bf3eddd9551efe78ba9fb74337179e95c9b60f41c49f275e05074a4074a616be36fa208a48fc12d5b940f0554fbd89c3' '88e199d2f63e4f235930c35c6dfde80e6010e590907bd4de0af1fbfe6d5491ff56845aefcfe8edefa707712bd84fef96880655747b8bfb949ceeadc0456b0121' - 'ac1f033a6a4cde442e3280f06ee5e78a800420715fff6a35bad798e948997c173499fb970592f146483d583b4f0697c2844071d66348ac7da69f36f1a9c757a8') + '0cc5c1df3cd18978df9a01bb64680d3a375c1ff4de6a453045dd26355777b4f08e3a05f55f035c8012a9683100de0bc3d11c280debcb343eb7167fc25342d5c0') _datadir="/usr/share/webapps/${pkgname}" @@ -123,8 +123,10 @@ bundle config force_ruby_platform true # some native gems are not available for newer ruby bundle install --jobs=$(nproc) --no-cache --deployment --without development test aws kerberos - # workaround for a weird ruby27 issue https://gitlab.com/groups/gitlab-org/-/epics/2380 - pushd vendor/bundle/ruby/2.7.0/gems/rack-2.0.7/ + # workaround for a ruby2.7 issue + # https://gitlab.com/groups/gitlab-org/-/epics/2380 + # https://github.com/ruby-grape/grape/issues/1967 + pushd vendor/bundle/ruby/2.7.0/gems/grape-1.1.0/ patch -p1 < $srcdir/ruby27-pop-extra-arg.patch popd Modified: ruby27-pop-extra-arg.patch === --- ruby27-pop-extra-arg.patch 2020-01-13 02:18:15 UTC (rev 552276) +++ ruby27-pop-extra-arg.patch 2020-01-13 02:18:18 UTC (rev 552277) @@ -1,19 +1,26 @@ -diff --git a/lib/rack/builder.rb b/lib/rack/builder.rb -index 975cf1e1..c61e8421 100644 a/lib/rack/builder.rb -+++ b/lib/rack/builder.rb -@@ -79,6 +79,14 @@ module Rack - # The +call+ method in this example sets an additional environment key which then can be - # referenced in the application if required. - def use(middleware, *args, ) -+ # workaround for ruby 2.7 problem discussed https://gitlab.com/groups/gitlab-org/-/epics/2380 -+ if not args.empty? and args[-1] == block -+# for some reason ruby adds block defined in lib/api/api_guard.rb -+# both to args and to 'block' parameter -+# pop extra parameter from 'args' -+args.pop -+ end -+ - if @map - mapping, @map = @map, nil - @use << proc { |app| generate_map app, mapping } +From 9ff085264c5ce3db12290c68bc8373578234e425 Mon Sep 17 00:00:00 2001 +From: dm1try +Date: Sat, 11 Jan 2020 22:24:15 +0300 +Subject: [PATCH] fix args forwarding in Middleware::Stack#merge_with for ruby + 2.7.0 ref #1967 + +--- + CHANGELOG.md| 1 + + lib/grape/middleware/stack.rb | 3 ++- + spec/grape/middleware/stack_spec.rb | 9 + + 3 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/lib/grape/middleware/stack.rb b/lib/grape/middleware/stack.rb +index 8509a4653..488a51498 100644 +--- a/lib/grape/middleware/stack.rb b/lib/grape/middleware/stack.rb +@@ -78,7 +78,8 @@ def use(*args, ) + def merge_with(middleware_specs) + middleware_specs.each do |operation, *args| + if args.last.is_a?(Proc) +-public_send(operation, *args, ) ++last_proc = args.pop ++public_send(operation, *args, _proc) + else + public_send(operation, *args) + end
[arch-commits] Commit in gitlab/trunk (PKGBUILD ruby27-pop-extra-arg.patch)
Date: Friday, January 10, 2020 @ 20:39:36 Author: anatolik Revision: 551803 Add workaround for ruby2.7 ArgumentError problem For some reason running gitlab with ruby2.7 produces ArgumentError in the code related to rack. Ruby adds an extra parameter to 'args' list. Remove Proc from the list as it is already set to 'block' parameter. https://gitlab.com/groups/gitlab-org/-/epics/2380 Added: gitlab/trunk/ruby27-pop-extra-arg.patch Modified: gitlab/trunk/PKGBUILD + PKGBUILD | 13 ++--- ruby27-pop-extra-arg.patch | 19 +++ 2 files changed, 29 insertions(+), 3 deletions(-) Modified: PKGBUILD === --- PKGBUILD2020-01-10 20:11:07 UTC (rev 551802) +++ PKGBUILD2020-01-10 20:39:36 UTC (rev 551803) @@ -11,7 +11,7 @@ # need this again at some point in the future. pkgname=gitlab pkgver=12.6.2 -pkgrel=2 +pkgrel=3 pkgdesc="Project management and code hosting application" arch=('x86_64') url="https://gitlab.com/gitlab-org/gitlab-foss; @@ -36,7 +36,8 @@ gitlab-backup.timer gitlab.target gitlab.tmpfiles.d -gitlab.logrotate) +gitlab.logrotate +ruby27-pop-extra-arg.patch) install='gitlab.install' sha512sums=('510dac5476df16e4e0563a8de3c19f4e27e390715742bf7f0ef59c6ac93c095d6741720c151aa54478ede7728cf6fae01b0dfbb13c69c7c99e35e32d1c92' '8f841befa246c54687be9e0a77b9fa0241a92253167b86c251e8ab0d31fabe09f1e79e5f52a201bf0c22241409577d0a6000e8ed024d3d23107291e82a2c26c6' @@ -47,7 +48,8 @@ 'c11d2c59da8325551a465227096e8d39b0e4bcd5b1db21565cf3439e431838c04bc00aa6f07f4d493f3f47fd6b4e25aeb0fe0fc1a05756064706bf5708c960ec' 'bf33b818e4ea671c16f58563997ba5fe0a09090e5c03577ff974d31324d4e9782b85a9bb4f1749b97257ce93400c692de935f003770d52b5994c9cab9aee57c6' 'abacbff0d7be918337a17b56481c84e6bf3eddd9551efe78ba9fb74337179e95c9b60f41c49f275e05074a4074a616be36fa208a48fc12d5b940f0554fbd89c3' - '88e199d2f63e4f235930c35c6dfde80e6010e590907bd4de0af1fbfe6d5491ff56845aefcfe8edefa707712bd84fef96880655747b8bfb949ceeadc0456b0121') + '88e199d2f63e4f235930c35c6dfde80e6010e590907bd4de0af1fbfe6d5491ff56845aefcfe8edefa707712bd84fef96880655747b8bfb949ceeadc0456b0121' + 'ac1f033a6a4cde442e3280f06ee5e78a800420715fff6a35bad798e948997c173499fb970592f146483d583b4f0697c2844071d66348ac7da69f36f1a9c757a8') _datadir="/usr/share/webapps/${pkgname}" @@ -121,6 +123,11 @@ bundle config force_ruby_platform true # some native gems are not available for newer ruby bundle install --jobs=$(nproc) --no-cache --deployment --without development test aws kerberos + # workaround for a weird ruby27 issue https://gitlab.com/groups/gitlab-org/-/epics/2380 + pushd vendor/bundle/ruby/2.7.0/gems/rack-2.0.7/ + patch -p1 < $srcdir/ruby27-pop-extra-arg.patch + popd + # We'll temporarily stick this in here so we can build the assets cp config/database.yml.postgresql.orig config/database.yml cp config/resque.yml.example config/resque.yml Added: ruby27-pop-extra-arg.patch === --- ruby27-pop-extra-arg.patch (rev 0) +++ ruby27-pop-extra-arg.patch 2020-01-10 20:39:36 UTC (rev 551803) @@ -0,0 +1,19 @@ +diff --git a/lib/rack/builder.rb b/lib/rack/builder.rb +index 975cf1e1..c61e8421 100644 +--- a/lib/rack/builder.rb b/lib/rack/builder.rb +@@ -79,6 +79,14 @@ module Rack + # The +call+ method in this example sets an additional environment key which then can be + # referenced in the application if required. + def use(middleware, *args, ) ++ # workaround for ruby 2.7 problem discussed https://gitlab.com/groups/gitlab-org/-/epics/2380 ++ if not args.empty? and args[-1] == block ++# for some reason ruby adds block defined in lib/api/api_guard.rb ++# both to args and to 'block' parameter ++# pop extra parameter from 'args' ++args.pop ++ end ++ + if @map + mapping, @map = @map, nil + @use << proc { |app| generate_map app, mapping }