user/gitlab-foss: upgrade to 16.6.0
This commit is contained in:
parent
6817cec4b8
commit
3f1ec8a6cc
3 changed files with 122 additions and 13 deletions
|
@ -3,13 +3,12 @@
|
|||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=gitlab-foss
|
||||
_pkgname=${pkgname%-foss}
|
||||
pkgver=16.2.4
|
||||
pkgver=16.6.0
|
||||
_gittag=v$pkgver
|
||||
pkgrel=0
|
||||
pkgdesc="A version control for your server"
|
||||
url="https://gitlab.com/gitlab-org/gitlab-foss"
|
||||
# grpc needs fixing, due to protodev upgrade
|
||||
#arch="x86_64"
|
||||
arch="x86_64 aarch64"
|
||||
license="MIT"
|
||||
# ruby-irb is needed only for Rails console (gitlab-rails console)
|
||||
depends="
|
||||
|
@ -17,9 +16,9 @@ depends="
|
|||
ca-certificates
|
||||
cmd:dpkg-deb
|
||||
exiftool
|
||||
git>=2.40.0
|
||||
gitaly~=16.2
|
||||
gitlab-shell~=14.24
|
||||
git>=2.42.0
|
||||
gitaly~=16.6
|
||||
gitlab-shell~=14.30
|
||||
graphicsmagick
|
||||
http-parser
|
||||
procps
|
||||
|
@ -34,6 +33,7 @@ depends="
|
|||
ruby3.0-irb
|
||||
ruby3.0-json
|
||||
ruby3.0-rake
|
||||
ruby3.0-rdoc
|
||||
ruby3.0-webrick
|
||||
shared-mime-info
|
||||
tzdata
|
||||
|
@ -56,7 +56,7 @@ makedepends="
|
|||
protobuf-dev
|
||||
re2-dev
|
||||
ruby3.0-dev
|
||||
ruby3.0-grpc~=1.55
|
||||
ruby3.0-grpc~=1.58
|
||||
ruby3.0-rugged
|
||||
yarn>=1.2.0
|
||||
"
|
||||
|
@ -74,6 +74,7 @@ source="https://gitlab.com/gitlab-org/gitlab-foss/-/archive/$_gittag/gitlab-foss
|
|||
$_pkgname.confd
|
||||
$_pkgname.logrotate
|
||||
bin-wrapper.in
|
||||
remove-sys-filesystem-depend.patch
|
||||
"
|
||||
builddir="$srcdir/gitlab-foss-$_gittag"
|
||||
|
||||
|
@ -128,11 +129,12 @@ build() {
|
|||
bundle config --local without "$bundle_without"
|
||||
bundle config --local build.ffi --enable-system-libffi
|
||||
bundle config --local build.gpgme --use-system-libraries
|
||||
bundle config --local build.re2 --enable-system-libraries
|
||||
bundle config --local build.nokogiri --use-system-libraries \
|
||||
--with-xml2-include=/usr/include/libxml2 \
|
||||
--with-xslt-include=/usr/include/libxslt
|
||||
bundle config --local build.ruby-magic --enable-system-libraries
|
||||
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 install --no-cache
|
||||
|
@ -375,8 +377,8 @@ assets() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
96d2146f81bcecae9e8a4a72ef1dd136a2203649af38dbcb560c8071ca9a409b54b7e220b7c233b66ce1ee9423700e8150e445902971f951282764bded2bc717 gitlab-foss-v16.2.4.tar.gz
|
||||
cdba615287c0a024c6589b5142543856393c8e5df3d21d2158908b34857d3d56581fe0bd66fa31cd3ff756c60f9f65f235c8ec7615a0970f7a87bbeb41be93ed database-config.patch
|
||||
ea83c490fdbfc7d32dc1b25fb17185f6552dfc72ab1766f7169e1298869589a12ea7b9285873be2c7b91303dd8eb486acaeb75e916177a9827139fb9b54ea232 gitlab-foss-v16.6.0.tar.gz
|
||||
daa496f3d9146f9dbddff62477bf49d5c7bd2f2a4cdbadc70ee51c8230f3ef01dc950ef157154b31c7e7bef0beecc5cbac50fbac65a79d6d9099b27bcba8b2ab database-config.patch
|
||||
55b0667d3969113ffd6860652ee8bdb9a534c25f413f33b2739e922c886988e7cea72c1c00c7eecf29fcff3682b1324156365605ffc6aae45d1e0ccddf96288b gitlab.initd
|
||||
1f451b67a5d5e58650b0fe862a2b65cfb8bff5502b37d94ae90619c1ff9affbecf24428303a2849bebce5f94bef37078f0e5710e344bbab616134e910938384a gitlab.mailroom.initd
|
||||
b6a6d9ba20557e61efa24f2d5a489873fefbb981f7d4465794a857b2971263c08ec29cc001c372522cdc0d48245e59751307c9f44f6ef4d87bf2e3ec5c23fb1c gitlab.rails.initd
|
||||
|
@ -385,4 +387,5 @@ cb4ec100f0ea7ffcbb37aead8423e636629e2f4848b2974a7b2468e96cb1081ca732ac336417b08d
|
|||
4dc00b16462f30591297fcb535fc364185d3ed76e9956597f0423a8dfd8a9a351f6ac29d9f0c73052c11324fba4768eb89a21c6bef4da99f15baaea8c9ab8407 gitlab.confd
|
||||
57f258246925fbef0780caebdf005983c72fe3db1ab3242a1e00137bd322f5ec6c0fd958db7178b8fc22103d071f550d6f71f08422bcd9e859d2a734b2ecef00 gitlab.logrotate
|
||||
a944c3886388ba1574bf8c96b6de4d9f24ef4a83f553c31a224e17a3b01f2a5c65b60c59b7ed7ca4b25670c60ea8dd41b96a8a623d909d2bb09bdf2520ed7f23 bin-wrapper.in
|
||||
97e19d601365da710341eea83324987e2d61061a4c816972d957cdb3300f8d65d07ca53bc46d4cbe9a476e5e72255e7081bdebc5217e7f3e95b8165f114c7b5f remove-sys-filesystem-depend.patch
|
||||
"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/config/database.yml.postgresql.orig b/config/database.yml.postgresql
|
||||
index b210b9c..9006120 100644
|
||||
index da9f458..2d6d44e 100644
|
||||
--- a/config/database.yml.postgresql.orig
|
||||
+++ b/config/database.yml.postgresql
|
||||
@@ -26,13 +26,6 @@ production:
|
||||
|
@ -44,8 +44,8 @@ index b210b9c..9006120 100644
|
|||
|
||||
# Warning: The database defined as "test" will be erased and
|
||||
# re-generated from your development database when you run "rake".
|
||||
@@ -117,17 +96,3 @@ test: &test
|
||||
prepared_statements: false
|
||||
@@ -119,19 +98,3 @@ test: &test
|
||||
reaping_frequency: nil
|
||||
variables:
|
||||
statement_timeout: 15s
|
||||
- geo:
|
||||
|
@ -55,6 +55,7 @@ index b210b9c..9006120 100644
|
|||
- username: postgres
|
||||
- password:
|
||||
- host: localhost
|
||||
- reaping_frequency: nil
|
||||
- embedding:
|
||||
- adapter: postgresql
|
||||
- encoding: unicode
|
||||
|
@ -62,3 +63,4 @@ index b210b9c..9006120 100644
|
|||
- username: postgres
|
||||
- password:
|
||||
- host: localhost
|
||||
- reaping_frequency: nil
|
||||
|
|
104
user/gitlab-foss/remove-sys-filesystem-depend.patch
Normal file
104
user/gitlab-foss/remove-sys-filesystem-depend.patch
Normal file
|
@ -0,0 +1,104 @@
|
|||
diff --git a/Gemfile.orig b/Gemfile
|
||||
index c1e9e34..a4448b7 100644
|
||||
--- a/Gemfile.orig
|
||||
+++ b/Gemfile
|
||||
@@ -525,7 +525,6 @@ gem 'health_check', '~> 3.0' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
|
||||
# System information
|
||||
gem 'vmstat', '~> 2.3.0' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
-gem 'sys-filesystem', '~> 1.4.3' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
|
||||
# NTP client
|
||||
gem 'net-ntp' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
diff --git a/Gemfile.lock.orig b/Gemfile.lock
|
||||
index e2ebb91..39b6df3 100644
|
||||
--- a/Gemfile.lock.orig
|
||||
+++ b/Gemfile.lock
|
||||
@@ -1605,8 +1605,6 @@ GEM
|
||||
attr_required (>= 0.0.5)
|
||||
httpclient (>= 2.4)
|
||||
sync (0.5.0)
|
||||
- sys-filesystem (1.4.3)
|
||||
- ffi (~> 1.1)
|
||||
sysexits (1.2.0)
|
||||
table_print (1.5.7)
|
||||
tanuki_emoji (0.9.0)
|
||||
@@ -2061,7 +2059,6 @@ DEPENDENCIES
|
||||
ssh_data (~> 1.3)
|
||||
stackprof (~> 0.2.25)
|
||||
state_machines-activerecord (~> 0.8.0)
|
||||
- sys-filesystem (~> 1.4.3)
|
||||
tanuki_emoji (~> 0.9)
|
||||
telesignenterprise (~> 2.2)
|
||||
terser (= 1.0.2)
|
||||
diff --git a/app/controllers/admin/system_info_controller.rb.orig b/app/controllers/admin/system_info_controller.rb
|
||||
index 96fb73c..7b8435e 100644
|
||||
--- a/app/controllers/admin/system_info_controller.rb.orig
|
||||
+++ b/app/controllers/admin/system_info_controller.rb
|
||||
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
+require 'open3'
|
||||
|
||||
class Admin::SystemInfoController < Admin::ApplicationController
|
||||
feature_category :not_owned # rubocop:todo Gitlab/AvoidFeatureCategoryNotOwned
|
||||
@@ -36,6 +37,11 @@ class Admin::SystemInfoController < Admin::ApplicationController
|
||||
'vfat'
|
||||
].freeze
|
||||
|
||||
+ MOUNT_REGEX = /(\S+) on (\S+) type (\S+) \(([^)]+)\)/
|
||||
+
|
||||
+ Mount = Struct.new('Mount', :name, :mount_point, :mount_type, :options)
|
||||
+ FsStat = Struct.new('FsStats', :path, :bytes_total, :bytes_used)
|
||||
+
|
||||
def show
|
||||
@cpus = begin
|
||||
Vmstat.cpu
|
||||
@@ -47,7 +53,6 @@ def show
|
||||
rescue StandardError
|
||||
nil
|
||||
end
|
||||
- mounts = Sys::Filesystem.mounts
|
||||
|
||||
@disks = []
|
||||
mounts.each do |mount|
|
||||
@@ -57,15 +62,38 @@ def show
|
||||
next if (EXCLUDED_MOUNT_TYPES & [mount.mount_type]).any?
|
||||
|
||||
begin
|
||||
- disk = Sys::Filesystem.stat(mount.mount_point)
|
||||
+ disk = fs_stat(mount.mount_point)
|
||||
@disks.push({
|
||||
bytes_total: disk.bytes_total,
|
||||
bytes_used: disk.bytes_used,
|
||||
disk_name: mount.name,
|
||||
mount_path: disk.path
|
||||
})
|
||||
- rescue Sys::Filesystem::Error
|
||||
+ rescue IOError
|
||||
end
|
||||
end
|
||||
end
|
||||
+
|
||||
+ def mounts
|
||||
+ stdout, stderr, status = Open3.capture3('mount')
|
||||
+ fail IOError, stderr unless status.success?
|
||||
+
|
||||
+ stdout.lines
|
||||
+ .map { |line| MOUNT_REGEX.match(line) }
|
||||
+ .compact
|
||||
+ .map { |match| Mount.new(*match.captures) }
|
||||
+ end
|
||||
+
|
||||
+ def fs_stat(mount_point)
|
||||
+ stdout, status = Open3.capture2('stat', '-c', '%s %b %a', '-f', mount_point)
|
||||
+ fail IOError unless status.success?
|
||||
+
|
||||
+ block_size, blocks_total, blocks_free = stdout.split(' ').map(&:to_i)
|
||||
+
|
||||
+ bytes_total = blocks_total * block_size
|
||||
+ bytes_free = blocks_free * block_size
|
||||
+ bytes_used = bytes_total - bytes_free
|
||||
+
|
||||
+ FsStat.new(mount_point, bytes_total, bytes_used)
|
||||
+ end
|
||||
end
|
Loading…
Reference in a new issue