Commit 035a3dedb5a6f9e394a294f7e1fea2166039329e

Authored by Jacob Vosmaer
1 parent f6ca8991

Remove backup uploads symlink patch

This was fixed upstream in gitlab-rails.
config/patches/gitlab-rails/backup_uploads_realpath.patch
@@ -1,24 +0,0 @@ @@ -1,24 +0,0 @@
1 -diff --git a/lib/backup/uploads.rb b/lib/backup/uploads.rb  
2 -index e79da7e..e50e1ff 100644  
3 ---- a/lib/backup/uploads.rb  
4 -+++ b/lib/backup/uploads.rb  
5 -@@ -3,7 +3,7 @@ module Backup  
6 - attr_reader :app_uploads_dir, :backup_uploads_dir, :backup_dir  
7 -  
8 - def initialize  
9 -- @app_uploads_dir = Rails.root.join('public', 'uploads')  
10 -+ @app_uploads_dir = File.realpath(Rails.root.join('public', 'uploads'))  
11 - @backup_dir = Gitlab.config.backup.path  
12 - @backup_uploads_dir = File.join(Gitlab.config.backup.path, 'uploads')  
13 - end  
14 -@@ -21,8 +21,9 @@ module Backup  
15 - end  
16 -  
17 - def backup_existing_uploads_dir  
18 -+ timestamped_uploads_path = File.join(app_uploads_dir, '..', "uploads.#{Time.now.to_i}")  
19 - if File.exists?(app_uploads_dir)  
20 -- FileUtils.mv(app_uploads_dir, Rails.root.join('public', "uploads.#{Time.now.to_i}"))  
21 -+ FileUtils.mv(app_uploads_dir, timestamped_uploads_path)  
22 - end  
23 - end  
24 - end  
config/software/gitlab-rails.rb
@@ -44,11 +44,6 @@ build do @@ -44,11 +44,6 @@ build do
44 # build. 44 # build.
45 command "sed -i \"s/.*REVISION.*/REVISION = '$(git log --pretty=format:'%h' -n 1)'/\" config/initializers/2_app.rb" 45 command "sed -i \"s/.*REVISION.*/REVISION = '$(git log --pretty=format:'%h' -n 1)'/\" config/initializers/2_app.rb"
46 46
47 - # The user uploads path is not (yet) configurable in gitlab-rails. As a  
48 - # workaround, omnibus-gitlab creates a symlink for public/uploads. This breaks  
49 - # the GitLab backup script.  
50 - patch :source => "backup_uploads_realpath.patch"  
51 -  
52 bundle "install --without mysql development test --path=#{install_dir}/embedded/service/gem", :env => env 47 bundle "install --without mysql development test --path=#{install_dir}/embedded/service/gem", :env => env
53 48
54 # In order to precompile the assets, we need to get to a state where rake can 49 # In order to precompile the assets, we need to get to a state where rake can