user/gitlab-foss: upgrade to ruby 3.1

This commit is contained in:
Antoine Martin 2023-03-09 14:26:01 -05:00
parent c2f76ea621
commit 631d8dcb67
Signed by: forge
GPG key ID: D62A472A4AA7D541
4 changed files with 307 additions and 67 deletions

View file

@ -2,13 +2,12 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz> # Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=gitlab-foss pkgname=gitlab-foss
_pkgname=${pkgname%-foss} _pkgname=${pkgname%-foss}
pkgver=15.7.2 pkgver=15.9.2
_gittag=v$pkgver _gittag=v$pkgver
pkgrel=3 pkgrel=2
pkgdesc="A version control for your server" pkgdesc="A version control for your server"
url="https://gitlab.com/gitlab-org/gitlab-foss" url="https://gitlab.com/gitlab-org/gitlab-foss"
# Disable due to Openssl3 not being supported arch="x86_64"
#arch="x86_64"
license="MIT" license="MIT"
# ruby-irb is needed only for Rails console (gitlab-rails console) # ruby-irb is needed only for Rails console (gitlab-rails console)
depends=" depends="
@ -18,34 +17,35 @@ depends="
exiftool exiftool
git>=2.18.0 git>=2.18.0
gitaly~=15.3 gitaly~=15.3
gitlab-shell~=14.14 gitlab-shell~=14.17
graphicsmagick graphicsmagick
http-parser http-parser
procps procps
py-docutils py-docutils
python3 python3
redis>=2.8 redis>=2.8
ruby2.7 ruby
ruby2.7-bigdecimal ruby-bigdecimal
ruby2.7-bundler ruby-bundler
ruby2.7-fiddle ruby-fiddle
ruby2.7-io-console ruby-io-console
ruby2.7-irb ruby-irb
ruby2.7-json ruby-json
ruby2.7-rake ruby-rake
ruby2.7-webrick ruby-webrick
shared-mime-info shared-mime-info
tzdata tzdata
" "
makedepends=" makedepends="
cmd:chrpath cmd:chrpath
cmake
file-dev file-dev
go go
gpgme-dev gpgme-dev
icu-dev icu-dev
libffi-dev libffi-dev
libgcrypt-dev libgcrypt-dev
libgit2-dev~=1.4 libgit2-dev
libpq-dev libpq-dev
libxml2-dev libxml2-dev
libxslt-dev libxslt-dev
@ -54,17 +54,17 @@ makedepends="
openssl-dev openssl-dev
protobuf-dev protobuf-dev
re2-dev re2-dev
ruby2.7-dev ruby-dev
ruby2.7-grpc ruby-grpc
yarn>=1.2.0 yarn>=1.2.0
" "
pkgusers="git" pkgusers="git"
pkggroups="git www-data" pkggroups="git www-data"
install="$pkgname.pre-install $pkgname.post-install $pkgname.post-upgrade" install="$pkgname.pre-install $pkgname.post-install $pkgname.post-upgrade"
subpackages="$pkgname-assets::noarch" subpackages="$pkgname-assets::noarch $pkgname-openrc"
source="https://gitlab.com/gitlab-org/gitlab-foss/-/archive/$_gittag/gitlab-foss-$_gittag.tar.gz source="https://gitlab.com/gitlab-org/gitlab-foss/-/archive/$_gittag/gitlab-foss-$_gittag.tar.gz
libgit-1.4-compat.patch
database-config.patch database-config.patch
openssl3-compat.patch
$_pkgname.initd $_pkgname.initd
$_pkgname.mailroom.initd $_pkgname.mailroom.initd
$_pkgname.rails.initd $_pkgname.rails.initd
@ -88,8 +88,6 @@ prepare() {
default_prepare default_prepare
cd "$builddir"
# The default log level is very chatty. # The default log level is very chatty.
sed -i 's/^\(\s*config.log_level\s*=\).*$/\1 :warn/' \ sed -i 's/^\(\s*config.log_level\s*=\).*$/\1 :warn/' \
config/environments/production.rb config/environments/production.rb
@ -128,20 +126,14 @@ build() {
--with-xml2-include=/usr/include/libxml2 \ --with-xml2-include=/usr/include/libxml2 \
--with-xslt-include=/usr/include/libxslt --with-xslt-include=/usr/include/libxslt
bundle config --local build.ruby-magic --enable-system-libraries bundle config --local build.ruby-magic --enable-system-libraries
bundle config --local build.rugged --use-system-libraries # compatibility with libgit 1.5.1 has issues
# bundle config --local build.rugged --use-system-libraries
# https://github.com/protocolbuffers/protobuf/issues/2335#issuecomment-579913357 # https://github.com/protocolbuffers/protobuf/issues/2335#issuecomment-579913357
bundle config --local build.google-protobuf --with-cflags=-D__va_copy=va_copy bundle config --local build.google-protobuf --with-cflags=-D__va_copy=va_copy
bundle config --local path "vendor/bundle" bundle config --local path "vendor/bundle"
bundle install --no-cache bundle install --no-cache
# Fix https://github.com/funny-falcon/murmurhash3-ruby/pull/9
(
cd vendor/bundle/ruby/*/extensions/*/*/murmurhash3-*
mkdir -p murmurhash3
mv native.so murmurhash3/
)
# Replace bundled CA bundle with symlink. # Replace bundled CA bundle with symlink.
( (
cd vendor/bundle/ruby/*/gems/aws-sdk-core-*/ cd vendor/bundle/ruby/*/gems/aws-sdk-core-*/
@ -215,8 +207,6 @@ package() {
local datadir="$pkgdir/var/lib/gitlab" local datadir="$pkgdir/var/lib/gitlab"
local file dest local file dest
cd "$builddir"
install -d -m755 "$destdir" "$destdir"/bin install -d -m755 "$destdir" "$destdir"/bin
install -d -m755 -o git -g git \ install -d -m755 -o git -g git \
@ -250,7 +240,7 @@ package() {
# Install application files. # Install application files.
# Note: *VERSION files and doc directory are required (Help in GitLab # Note: *VERSION files and doc directory are required (Help in GitLab
# menu refers to the doc directory). # menu refers to the doc directory).
cp -rl .bundle config.ru Gemfile* INSTALLATION_TYPE Rakefile *VERSION \ cp -rl .bundle config.ru Gemfile* INSTALLATION_TYPE Rakefile ./*VERSION \
app data db doc fixtures config lib locale metrics_server public sidekiq_cluster vendor \ app data db doc fixtures config lib locale metrics_server public sidekiq_cluster vendor \
"$destdir"/ "$destdir"/
@ -271,7 +261,7 @@ package() {
rm -r app/assets rm -r app/assets
rm -r vendor/assets rm -r vendor/assets
find public/assets -name '*.vue' -delete find public/assets -name '*.vue' -delete
find public/assets -type d | xargs rmdir --ignore-fail-on-non-empty find public/assets -type d -exec rmdir --ignore-fail-on-non-empty '{}' \;
# These load gems in the assets group. # These load gems in the assets group.
rm config/initializers/gettext_rails_i18n_patch.rb rm config/initializers/gettext_rails_i18n_patch.rb
rm config/initializers/sprockets.rb rm config/initializers/sprockets.rb
@ -380,9 +370,9 @@ assets() {
} }
sha512sums=" sha512sums="
d976dda4677f143598a9b87f7dea929c83ba4adedace4252fc2f15cf5c7fbebff473074e6659b017ced78e9397590900d309f6c6411e9dbd58306196a91b01e1 gitlab-foss-v15.7.2.tar.gz 8b99a892515fdeedbded148c31455b373af6d8ba1802d920decfcb4afd4316f8d12ea74134a3ab6a9863e8fbe99b9d58016aa22689324ecc04d380f84ea5c4f7 gitlab-foss-v15.9.2.tar.gz
80e27697772c4529720f2ec65d314641cd5f437070d0fefd3c521852ff6dad8c9127534e379a5c0bcee4bbae8d5a373d131bf91a58606d02c89104e34a88baac libgit-1.4-compat.patch f8b6855445e4086b4a4059a6359fafe7ca78ccf9ed6953a5b2a606d02add9519bb98ccf5f4a3bb750b94cfc44e660e70186813f7c7296fac343377e922e8a54a database-config.patch
dd984ae890c10119df6c510be1bd22e3d18652115ccaec6cb3e0a7c49d00cc72ec1c7c2414c29e6a13171c0a139626c8227e0ba3020f0ec3fe2c318b47101248 database-config.patch 931e738f53c95933b87161f4095d7b9d93653feec5395e474aa7be3b6db791c3542222a8db8709954e44fd25f5484966d4ffe3b754cda03305f1d79e604909bd openssl3-compat.patch
55b0667d3969113ffd6860652ee8bdb9a534c25f413f33b2739e922c886988e7cea72c1c00c7eecf29fcff3682b1324156365605ffc6aae45d1e0ccddf96288b gitlab.initd 55b0667d3969113ffd6860652ee8bdb9a534c25f413f33b2739e922c886988e7cea72c1c00c7eecf29fcff3682b1324156365605ffc6aae45d1e0ccddf96288b gitlab.initd
1f451b67a5d5e58650b0fe862a2b65cfb8bff5502b37d94ae90619c1ff9affbecf24428303a2849bebce5f94bef37078f0e5710e344bbab616134e910938384a gitlab.mailroom.initd 1f451b67a5d5e58650b0fe862a2b65cfb8bff5502b37d94ae90619c1ff9affbecf24428303a2849bebce5f94bef37078f0e5710e344bbab616134e910938384a gitlab.mailroom.initd
b6a6d9ba20557e61efa24f2d5a489873fefbb981f7d4465794a857b2971263c08ec29cc001c372522cdc0d48245e59751307c9f44f6ef4d87bf2e3ec5c23fb1c gitlab.rails.initd b6a6d9ba20557e61efa24f2d5a489873fefbb981f7d4465794a857b2971263c08ec29cc001c372522cdc0d48245e59751307c9f44f6ef4d87bf2e3ec5c23fb1c gitlab.rails.initd

View file

@ -1,11 +1,11 @@
diff --git a/config/database.yml.postgresql b/config/database.yml.postgresql diff --git a/config/database.yml.postgresql.orig b/config/database.yml.postgresql
index 5329a8e..a4daab1 100644 index c1b1247..dbe5b77 100644
--- a/config/database.yml.postgresql --- a/config/database.yml.postgresql.orig
+++ b/config/database.yml.postgresql +++ b/config/database.yml.postgresql
@@ -18,13 +18,6 @@ production: @@ -26,14 +26,7 @@ production:
# port: 8600 # username: git
# record: secondary.postgresql.service.consul # password: "secure password"
# interval: 300 # host: localhost
- geo: - geo:
- adapter: postgresql - adapter: postgresql
- encoding: unicode - encoding: unicode
@ -13,13 +13,15 @@ index 5329a8e..a4daab1 100644
- username: git - username: git
- password: "secure password" - password: "secure password"
- host: localhost - host: localhost
-
+
# #
# Development specific # Development specific
@@ -39,13 +32,6 @@ development: #
host: localhost @@ -57,13 +50,6 @@ development:
variables: # host: localhost
statement_timeout: 15s # variables:
# statement_timeout: 15s
- geo: - geo:
- adapter: postgresql - adapter: postgresql
- encoding: unicode - encoding: unicode
@ -30,10 +32,10 @@ index 5329a8e..a4daab1 100644
# #
# Staging specific # Staging specific
@@ -58,13 +44,6 @@ staging: @@ -84,13 +70,6 @@ staging:
username: git # username: git
password: "secure password" # password: "secure password"
host: localhost # host: localhost
- geo: - geo:
- adapter: postgresql - adapter: postgresql
- encoding: unicode - encoding: unicode
@ -44,10 +46,10 @@ index 5329a8e..a4daab1 100644
# Warning: The database defined as "test" will be erased and # Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake". # re-generated from your development database when you run "rake".
@@ -80,10 +59,3 @@ test: &test @@ -117,10 +96,3 @@ test: &test
prepared_statements: false # prepared_statements: false
variables: # variables:
statement_timeout: 15s # statement_timeout: 15s
- geo: - geo:
- adapter: postgresql - adapter: postgresql
- encoding: unicode - encoding: unicode

View file

@ -1,11 +0,0 @@
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1215 +1215 @@
- rugged (1.2.0)
+ rugged (1.4.4)
@@ -1411 +1411 @@
- undercover (0.4.4)
+ undercover (0.4.5)
@@ -1414 +1414 @@
- rugged (>= 0.27, < 1.3)
+ rugged (>= 0.27, < 1.6)

View file

@ -0,0 +1,259 @@
diff --git a/Gemfile.orig b/Gemfile
index 9e4fd6c..c54e0d0 100644
--- a/Gemfile.orig
+++ b/Gemfile
@@ -19,7 +19,7 @@ gem 'bootsnap', '~> 1.16.0', require: false
# Pin openssl to match the version bundled with our supported Rubies.
# See https://stdgems.org/openssl/#gem-version.
-gem 'openssl', '2.2.2'
+gem 'openssl', '~> 3.0'
# 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.
@@ -72,9 +72,7 @@ gem 'omniauth-saml', '~> 2.0.0'
gem 'omniauth-twitter', '~> 1.4'
gem 'omniauth_crowd', '~> 2.4.0', path: 'vendor/gems/omniauth_crowd' # See vendor/gems/omniauth_crowd/README.md
gem 'omniauth_openid_connect', '~> 0.6.1'
-# Locked until Ruby 3.0 upgrade since upgrading will pull in an updated net-smtp gem.
-# See https://docs.gitlab.com/ee/development/emails.html#rationale.
-gem 'openid_connect', '= 1.3.0'
+gem 'openid_connect', '~> 1.3.1'
gem 'omniauth-salesforce', '~> 1.0.5', path: 'vendor/gems/omniauth-salesforce' # See gem README.md
gem 'omniauth-atlassian-oauth2', '~> 0.2.0'
gem 'rack-oauth2', '~> 1.21.3'
@@ -544,10 +542,7 @@ gem 'retriable', '~> 3.1.2'
# LRU cache
gem 'lru_redux'
-# Locked as long as quoted-printable encoding issues are not resolved
-# Monkey-patched in `config/initializers/mail_encoding_patch.rb`
-# See https://gitlab.com/gitlab-org/gitlab/issues/197386
-gem 'mail', '= 2.7.1'
+gem 'mail', '~> 2.8'
gem 'mail-smtp_pool', '~> 0.1.0', path: 'vendor/gems/mail-smtp_pool', require: false
gem 'microsoft_graph_mailer', '~> 0.1.0', path: 'vendor/gems/microsoft_graph_mailer'
@@ -593,3 +588,6 @@ gem 'app_store_connect'
# For phone verification
gem 'telesignenterprise', '~> 2.2'
+
+# Temp fix for ruby3.1
+gem 'psych', '< 4'
diff --git a/Gemfile.lock.orig b/Gemfile.lock
index 2e548c4..c009e81 100644
--- a/Gemfile.lock.orig
+++ b/Gemfile.lock
@@ -198,7 +198,7 @@ GEM
autoprefixer-rails (10.2.5.1)
execjs (> 0)
awesome_print (1.9.2)
- awrence (1.1.1)
+ awrence (1.2.1)
aws-eventstream (1.2.0)
aws-partitions (1.703.0)
aws-sdk-cloudformation (1.41.0)
@@ -242,7 +242,7 @@ GEM
coderay (>= 1.0.0)
erubi (>= 1.0.0)
rack (>= 0.9.0)
- bindata (2.4.11)
+ bindata (2.4.15)
binding_ninja (0.2.3)
bootsnap (1.16.0)
msgpack (~> 1.2)
@@ -294,13 +294,13 @@ GEM
coderay (1.1.3)
colored2 (3.1.2)
commonmarker (0.23.6)
- concurrent-ruby (1.2.0)
+ concurrent-ruby (1.2.2)
connection_pool (2.3.0)
cork (0.3.0)
colored2 (~> 3.1)
- cose (1.0.0)
+ cose (1.3.0)
cbor (~> 0.5.9)
- openssl-signature_algorithm (~> 0.4.0)
+ openssl-signature_algorithm (~> 1.0)
countries (4.0.1)
i18n_data (~> 0.13.0)
sixarm_ruby_unaccent (~> 1.1)
@@ -330,6 +330,7 @@ GEM
danger
gitlab (~> 4.2, >= 4.2.0)
database_cleaner (1.7.0)
+ date (3.3.3)
dead_end (3.1.1)
deckar01-task_list (2.3.2)
html-pipeline
@@ -898,8 +899,11 @@ GEM
zeitwerk (~> 2.5)
lru_redux (1.1.0)
lumberjack (1.2.7)
- mail (2.7.1)
+ mail (2.8.1)
mini_mime (>= 0.1.1)
+ net-imap
+ net-pop
+ net-smtp
marcel (1.0.2)
marginalia (1.11.1)
actionpack (>= 5.2)
@@ -943,10 +947,19 @@ GEM
nenv (0.3.0)
net-http-persistent (4.0.1)
connection_pool (~> 2.2)
+ net-imap (0.3.4)
+ date
+ net-protocol
net-ldap (0.17.1)
net-ntp (2.1.3)
+ net-pop (0.1.2)
+ net-protocol
+ net-protocol (0.2.1)
+ timeout
net-scp (3.0.0)
net-ssh (>= 2.6.5, < 7.0.0)
+ net-smtp (0.3.3)
+ net-protocol
net-ssh (6.0.0)
netrc (0.11.0)
nio4r (2.5.8)
@@ -1029,19 +1042,20 @@ GEM
omniauth (>= 1.9, < 3)
openid_connect (~> 1.1)
open4 (1.3.4)
- openid_connect (1.3.0)
+ openid_connect (1.3.1)
activemodel
attr_required (>= 1.0.0)
json-jwt (>= 1.5.0)
+ net-smtp
rack-oauth2 (>= 1.6.1)
swd (>= 1.0.0)
tzinfo
validate_email
validate_url
webfinger (>= 1.0.1)
- openssl (2.2.2)
- ipaddr
- openssl-signature_algorithm (0.4.0)
+ openssl (3.0.2)
+ openssl-signature_algorithm (1.3.0)
+ openssl (> 2.0)
opentracing (0.5.0)
optimist (3.0.1)
org-ruby (0.9.12)
@@ -1110,7 +1124,8 @@ GEM
pry (>= 0.13.0)
tty-markdown
tty-prompt
- public_suffix (5.0.0)
+ psych (3.3.4)
+ public_suffix (5.0.1)
puma (5.6.5)
nio4r (~> 2.0)
puma_worker_killer (0.3.1)
@@ -1119,7 +1134,7 @@ GEM
pyu-ruby-sasl (0.0.3.3)
raabro (1.4.0)
racc (1.6.2)
- rack (2.2.6.2)
+ rack (2.2.6.3)
rack-accept (0.4.5)
rack (>= 0.4)
rack-attack (6.6.1)
@@ -1335,7 +1350,6 @@ GEM
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
sd_notify (0.1.1)
- securecompare (1.0.0)
seed-fu (2.3.7)
activerecord (>= 3.1)
activesupport (>= 3.1)
@@ -1466,15 +1480,17 @@ GEM
thrift (0.16.0)
tilt (2.0.11)
timeliness (0.3.10)
+ timeout (0.3.2)
timfel-krb5-auth (0.8.3)
tins (1.31.1)
sync
toml-rb (2.2.0)
citrus (~> 3.0, > 3.0)
tomlrb (1.3.0)
- tpm-key_attestation (0.9.0)
+ tpm-key_attestation (0.11.0)
bindata (~> 2.4)
- openssl-signature_algorithm (~> 0.4.0)
+ openssl (> 2.0, < 3.1)
+ openssl-signature_algorithm (~> 1.0)
trailblazer-option (0.1.2)
train-core (3.4.9)
addressable (~> 2.5)
@@ -1547,19 +1563,19 @@ GEM
warden (1.2.9)
rack (>= 2.0.9)
warning (1.3.0)
- webauthn (2.3.0)
+ webauthn (2.5.2)
android_key_attestation (~> 0.3.0)
awrence (~> 1.1)
bindata (~> 2.4)
cbor (~> 0.5.9)
- cose (~> 1.0)
- openssl (~> 2.0)
+ cose (~> 1.1)
+ openssl (>= 2.2, < 3.1)
safety_net_attestation (~> 0.4.0)
- securecompare (~> 1.0)
- tpm-key_attestation (~> 0.9.0)
- webfinger (1.2.0)
+ tpm-key_attestation (~> 0.11.0)
+ webfinger (2.0.0)
activesupport
- httpclient (>= 2.4)
+ faraday (~> 1.7)
+ faraday_middleware (~> 1.1)
webmock (3.9.1)
addressable (>= 2.3.6)
crack (>= 0.3.2)
@@ -1581,7 +1597,7 @@ GEM
nokogiri (~> 1.8)
yajl-ruby (1.4.3)
yard (0.9.26)
- zeitwerk (2.6.6)
+ zeitwerk (2.6.7)
PLATFORMS
ruby
@@ -1748,7 +1764,7 @@ DEPENDENCIES
loofah (~> 2.19.1)
lookbook (~> 1.5, >= 1.5.3)
lru_redux
- mail (= 2.7.1)
+ mail (~> 2.8)
mail-smtp_pool (~> 0.1.0)!
marginalia (~> 1.11.1)
memory_profiler (~> 1.0)
@@ -1782,8 +1798,8 @@ DEPENDENCIES
omniauth-twitter (~> 1.4)
omniauth_crowd (~> 2.4.0)!
omniauth_openid_connect (~> 0.6.1)
- openid_connect (= 1.3.0)
- openssl (= 2.2.2)
+ openid_connect (~> 1.3.1)
+ openssl (~> 3.0)
org-ruby (~> 0.9.12)
pact (~> 1.63)
parallel (~> 1.19)
@@ -1797,6 +1813,7 @@ DEPENDENCIES
pry-byebug
pry-rails (~> 0.3.9)
pry-shell (~> 0.6.1)
+ psych (< 4)
puma (~> 5.6.5)
puma_worker_killer (~> 0.3.1)
rack (~> 2.2.6, >= 2.2.6.2)