git: 5c3f9ae04764 - main - www/gitlab-ce: fix dependency problem
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 26 Mar 2023 15:08:28 UTC
The branch main has been updated by mfechner: URL: https://cgit.FreeBSD.org/ports/commit/?id=5c3f9ae047646edf5b6b89093ffd56aeac94bf90 commit 5c3f9ae047646edf5b6b89093ffd56aeac94bf90 Author: Matthias Fechner <mfechner@FreeBSD.org> AuthorDate: 2023-03-26 15:04:18 +0000 Commit: Matthias Fechner <mfechner@FreeBSD.org> CommitDate: 2023-03-26 15:07:51 +0000 www/gitlab-ce: fix dependency problem Starting gitlab fails with error: rake aborted! NoMethodError: undefined method `active_record_options' for #<Doorkeeper::Config:0x000000081fb0f0c8 @orm=:active_record, @default_generator_method=:hex, @authenticate_resource_owner=#<Proc:0x000000081fb0ed80 /usr/local/www/gitlab-ce/config/initializers/doorkeeper.rb:13>, @resource_owner_from_credentials=#<Proc:0x000000081fb0ec68 /usr/local/www/gitlab-ce/config/initializers/doorkeeper.rb:25>, @refresh_token_enabled=true, @enforce_configured_scopes=true, @force_ssl_in_redirect_uri=false, @forbid_redirect_uri=#<Proc:0x000000081fb0ea10 /usr/local/www/gitlab-ce/config/initializers/doorkeeper.rb:67>, @enable_application_owner=true, @default_scopes=#<Doorkeeper::OAuth::Scopes:0x000000081fb17e30 @scopes=["api"]>, @optional_scopes=#<Doorkeeper::OAuth::Scopes:0x000000081fb177f0 @scopes=["read_api", "read_user", "read_repository", "write_repository", "sudo", "openid", "profile", "email"]>, @access_token_methods=[:from_access_token_param, :from_bearer_authorization, :from_bearer_param], @tok en_secret_strategy=Gitlab::DoorkeeperSecretStoring::Token::Pbkdf2Sha512, @token_secret_fallback_strategy=Doorkeeper::SecretStoring::Plain, @application_secret_strategy=Gitlab::DoorkeeperSecretStoring::Secret::Pbkdf2Sha512, @application_secret_fallback_strategy=Doorkeeper::SecretStoring::Plain, @grant_flows=["authorization_code", "password", "client_credentials"], @skip_authorization=#<Proc:0x000000081fb1ce58 /usr/local/www/gitlab-ce/config/initializers/doorkeeper.rb:109>, @base_controller="::Gitlab::BaseDoorkeeperController", @skip_client_authentication_for_password_grant=true, @application_model=Doorkeeper::Application(id: integer, name: string, uid: string, secret: string, redirect_uri: text, scopes: string, created_at: datetime, updated_at: datetime, owner_id: integer, owner_type: string, trusted: boolean, confidential: boolean, expire_access_tokens: boolean), @access_grant_model=Doorkeeper::AccessGrant(id: integer, resource_owner_id: integer, application_id: integer, token: stri ng, expires_in: integer, redirect_uri: text,! created_at: datetime, revoked_at: datetime, scopes: string, code_challenge: text, code_challenge_method: text), @access_token_model=Doorkeeper::AccessToken(id: integer, resource_owner_id: integer, application_id: integer, token: string, refresh_token: string, expires_in: integer, revoked_at: datetime, created_at: datetime, scopes: string)> if Doorkeeper.configuration.active_record_options[:establish_connection] ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/www/gitlab-ce/config/environment.rb:7:in `<top (required)>' This is caused by a breaking change in doorkeeper 5.6.3, so fix on version 5.6.2 for now. https://github.com/doorkeeper-gem/doorkeeper/blob/main/CHANGELOG.md An upgrade of doorkeeper-openid_connect to 1.8.5 is not possible, as this brings another breaking dependency shift from json-jwt to jwt, which causes again other dependecy breaks. Downgrading doorkeeper is for now the best solution. --- security/Makefile | 1 + security/rubygem-doorkeeper562/Makefile | 23 +++++++++++++++++++++++ security/rubygem-doorkeeper562/distinfo | 3 +++ security/rubygem-doorkeeper562/pkg-descr | 2 ++ www/gitlab-ce/Makefile | 4 ++-- www/gitlab-ce/files/patch-Gemfile | 8 +++++++- 6 files changed, 38 insertions(+), 3 deletions(-) diff --git a/security/Makefile b/security/Makefile index 5bee7054af3a..7a5c1905a97f 100644 --- a/security/Makefile +++ b/security/Makefile @@ -1066,6 +1066,7 @@ SUBDIR += rubygem-digest SUBDIR += rubygem-digest-crc SUBDIR += rubygem-doorkeeper + SUBDIR += rubygem-doorkeeper562 SUBDIR += rubygem-doorkeeper-openid_connect SUBDIR += rubygem-doorkeeper-rails5 SUBDIR += rubygem-doorkeeper-rails50 diff --git a/security/rubygem-doorkeeper562/Makefile b/security/rubygem-doorkeeper562/Makefile new file mode 100644 index 000000000000..6554dbd33e2b --- /dev/null +++ b/security/rubygem-doorkeeper562/Makefile @@ -0,0 +1,23 @@ +PORTNAME= doorkeeper +PORTVERSION= 5.6.2 +CATEGORIES= security rubygems +MASTER_SITES= RG +PKGNAMESUFFIX= 562 + +MAINTAINER= ruby@FreeBSD.org +COMMENT= OAuth2 provider for Rails and Grape +WWW= https://github.com/doorkeeper-gem/doorkeeper + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/MIT-LICENSE + +RUN_DEPENDS= rubygem-railties61>=5:www/rubygem-railties61 + +USES= cpe gem + +NO_ARCH= yes + +CPE_VENDOR= doorkeeper_project + +PORTSCOUT= limit:^5\.6\.2 +.include <bsd.port.mk> diff --git a/security/rubygem-doorkeeper562/distinfo b/security/rubygem-doorkeeper562/distinfo new file mode 100644 index 000000000000..b89168c43258 --- /dev/null +++ b/security/rubygem-doorkeeper562/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1679842220 +SHA256 (rubygem/doorkeeper-5.6.2.gem) = 0cbea1a04e2600d7166a003f873d1f949f73c47b3c50cef8b8e5b402b12bd6d3 +SIZE (rubygem/doorkeeper-5.6.2.gem) = 103936 diff --git a/security/rubygem-doorkeeper562/pkg-descr b/security/rubygem-doorkeeper562/pkg-descr new file mode 100644 index 000000000000..ed39cf3f3049 --- /dev/null +++ b/security/rubygem-doorkeeper562/pkg-descr @@ -0,0 +1,2 @@ +Doorkeeper is a Ruby gem that makes it easy to introduce OAuth 2 +provider functionality to a Rails or Grape application. diff --git a/www/gitlab-ce/Makefile b/www/gitlab-ce/Makefile index 67c397edf467..89305274bd95 100644 --- a/www/gitlab-ce/Makefile +++ b/www/gitlab-ce/Makefile @@ -1,6 +1,6 @@ PORTNAME= gitlab-ce PORTVERSION= 15.8.4 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= www devel MAINTAINER= mfechner@FreeBSD.org @@ -48,7 +48,7 @@ MY_DEPENDS= git>=2.39.2:devel/git \ rubygem-declarative_policy>=1.1.0<1.2:security/rubygem-declarative_policy \ rubygem-devise-rails61>=4.8.1<4.9:devel/rubygem-devise-rails61 \ rubygem-bcrypt>=3.1.14<3.2:security/rubygem-bcrypt \ - rubygem-doorkeeper>=5.5.4<6:security/rubygem-doorkeeper \ + rubygem-doorkeeper562>=5.5.4<5.6.3:security/rubygem-doorkeeper562 \ rubygem-doorkeeper-openid_connect>=1.8.3<2:security/rubygem-doorkeeper-openid_connect \ rubygem-rexml>=3.2.5<3.3:textproc/rubygem-rexml \ rubygem-ruby-saml>=1.13.0<1.14:security/rubygem-ruby-saml \ diff --git a/www/gitlab-ce/files/patch-Gemfile b/www/gitlab-ce/files/patch-Gemfile index 2b2fbc9bdc18..5c24857db75d 100644 --- a/www/gitlab-ce/files/patch-Gemfile +++ b/www/gitlab-ce/files/patch-Gemfile @@ -16,7 +16,13 @@ # This gem was originally bundled with Ruby 2.7, but is unbundled as of Ruby 3. # Since the latest version caused problems with GitLab, we pin this to an older # version for now. -@@ -57,18 +57,18 @@ gem 'doorkeeper-openid_connect', '~> 1.8' +@@ -52,23 +52,23 @@ gem 'declarative_policy', '~> 1.1.0' + gem 'devise', '~> 4.8.1' + gem 'devise-pbkdf2-encryptable', '~> 0.0.0', path: 'vendor/gems/devise-pbkdf2-encryptable' + gem 'bcrypt', '~> 3.1', '>= 3.1.14' +-gem 'doorkeeper', '~> 5.5' ++gem 'doorkeeper', '= 5.6.2' + gem 'doorkeeper-openid_connect', '~> 1.8' gem 'rexml', '~> 3.2.5' gem 'ruby-saml', '~> 1.13.0' gem 'omniauth', '~> 2.1.0'