Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:crameleon:branches:home:darix:apps
gitlab-ce
no-ohai.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File no-ohai.patch of Package gitlab-ce
Index: gitlab-ce/Gemfile =================================================================== --- gitlab-ce.orig/Gemfile +++ gitlab-ce/Gemfile @@ -120,7 +120,7 @@ gem 'acme-client', '~> 2.0' # rubocop:to gem 'browser', '~> 5.3.1' # rubocop:todo Gemfile/MissingFeatureCategory # OS detection for usage ping -gem 'ohai', '~> 18.1' # rubocop:todo Gemfile/MissingFeatureCategory +# gem 'ohai', '~> 18.1' # rubocop:todo Gemfile/MissingFeatureCategory # GPG gem 'gpgme', '~> 2.0.23' # rubocop:todo Gemfile/MissingFeatureCategory Index: gitlab-ce/lib/gitlab/usage/metrics/instrumentations/operating_system_metric.rb =================================================================== --- gitlab-ce.orig/lib/gitlab/usage/metrics/instrumentations/operating_system_metric.rb +++ gitlab-ce/lib/gitlab/usage/metrics/instrumentations/operating_system_metric.rb @@ -6,16 +6,32 @@ module Gitlab module Instrumentations class OperatingSystemMetric < GenericMetric value do - ohai_data = Ohai::System.new.tap do |oh| - oh.all_plugins(['platform']) - end.data + # ohai_data = Ohai::System.new.tap do |oh| + # oh.all_plugins(['platform']) + # end.data - platform = ohai_data['platform'] - if ohai_data['platform'] == 'debian' && ohai_data['kernel']['machine']&.include?('armv') - platform = 'raspbian' - end + # platform = ohai_data['platform'] + # if ohai_data['platform'] == 'debian' && ohai_data['kernel']['machine']&.include?('armv') + # platform = 'raspbian' + # end - "#{platform}-#{ohai_data['platform_version']}" + # "#{platform}-#{ohai_data['platform_version']}" + fc = File.read("/etc/os-release") + platform = nil + version = nil + fc.each_line do |line| + line.chomp! + next if line =~ /^#/ + if mo = /\A(?<key>[^=]+)="(?<value>[^"]+)"/.match(line) + case mo[:key] + when 'ID' + platform=mo[:value] + when 'VERSION_ID' + version=mo[:value] + end + end + end + "#{platform}-#{version}" end end end
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor