debian-mirror-gitlab/debian/patches/0750-fix-relative-paths.patch
2021-03-11 21:09:22 +05:30

38 lines
1.3 KiB
Diff

Debian specific patch to adapt to debian policy mandated paths
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -1,8 +1,8 @@
# frozen_string_literal: true
-require_relative '../settings'
-require_relative '../object_store_settings'
-require_relative '../smime_signature_settings'
+require '/usr/share/gitlab/config/settings'
+require '/usr/share/gitlab/config/object_store_settings'
+require '/usr/share/gitlab/config/smime_signature_settings'
# Default settings
Settings['shared'] ||= Settingslogic.new({})
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
# Load the Rails application.
-require_relative 'application'
+require '/usr/share/gitlab/config/application'
# Initialize the Rails application.
Rails.application.initialize!
--- a/config/settings.rb
+++ b/config/settings.rb
@@ -7,7 +7,7 @@
# full Rails environment being loaded. We can not use `require_relative` either,
# as Rails uses `load` for `require_dependency` (used when loading the Rails
# environment). This could then lead to this file being loaded twice.
-require_dependency File.expand_path('../lib/gitlab', __dir__)
+require ('/usr/share/gitlab/lib/gitlab')
class Settings < Settingslogic
source ENV.fetch('GITLAB_CONFIG') { Pathname.new(File.expand_path('gitlab.yml', __dir__)) }