From 650db83680f83ca5f6719ca0b02abc0feb525746 Mon Sep 17 00:00:00 2001
From: Kevin Krauss <earlkrauss@gmail.com>
Date: Tue, 1 Oct 2013 11:51:43 -0700
Subject: [PATCH 1/5] Update gitlab

---
 lib/support/nginx/gitlab | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/support/nginx/gitlab b/lib/support/nginx/gitlab
index 3e929c52990..54bf6fb9059 100644
--- a/lib/support/nginx/gitlab
+++ b/lib/support/nginx/gitlab
@@ -1,6 +1,6 @@
 # GITLAB
 # Maintainer: @randx
-# App Version: 5.0
+# App Version: 6.1
 
 upstream gitlab {
   server unix:/home/git/gitlab/tmp/sockets/gitlab.socket;
-- 
GitLab


From 976185db97d767db2dc88a1a39d1bc53606af311 Mon Sep 17 00:00:00 2001
From: Jacob Vosmaer <contact@jacobvosmaer.nl>
Date: Wed, 9 Oct 2013 15:44:25 +0200
Subject: [PATCH 2/5] Always shut down sidekiq before starting

---
 lib/tasks/sidekiq.rake | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/tasks/sidekiq.rake b/lib/tasks/sidekiq.rake
index d0e9dfe46a1..e71cf0380ed 100644
--- a/lib/tasks/sidekiq.rake
+++ b/lib/tasks/sidekiq.rake
@@ -5,7 +5,15 @@ namespace :sidekiq do
   end
 
   desc "GITLAB | Start sidekiq"
-  task :start do
+  task :start => :restart
+
+  desc 'GitLab | Restart sidekiq'
+  task :restart do
+    if File.exist?(pidfile)
+      puts 'Shutting down existing sidekiq process.'
+      Rake::Task['sidekiq:stop'].invoke
+      puts 'Starting new sidekiq process.'
+    end
     system "nohup bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e #{Rails.env} -P #{pidfile} >> #{Rails.root.join("log", "sidekiq.log")} 2>&1 &"
   end
 
-- 
GitLab


From a02a4dfa3793dad1a3ac5ede2c606824dbd58dee Mon Sep 17 00:00:00 2001
From: Jacob Vosmaer <contact@jacobvosmaer.nl>
Date: Wed, 9 Oct 2013 15:46:00 +0200
Subject: [PATCH 3/5] Remove duplicate log path generation

---
 lib/tasks/sidekiq.rake | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/tasks/sidekiq.rake b/lib/tasks/sidekiq.rake
index e71cf0380ed..46caffd0754 100644
--- a/lib/tasks/sidekiq.rake
+++ b/lib/tasks/sidekiq.rake
@@ -14,15 +14,19 @@ namespace :sidekiq do
       Rake::Task['sidekiq:stop'].invoke
       puts 'Starting new sidekiq process.'
     end
-    system "nohup bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e #{Rails.env} -P #{pidfile} >> #{Rails.root.join("log", "sidekiq.log")} 2>&1 &"
+    system "nohup bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e #{Rails.env} -P #{pidfile} >> #{log_file} 2>&1 &"
   end
 
   desc "GITLAB | Start sidekiq with launchd on Mac OS X"
   task :launchd do
-    system "bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e #{Rails.env} -P #{pidfile} >> #{Rails.root.join("log", "sidekiq.log")} 2>&1"
+    system "bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e #{Rails.env} -P #{pidfile} >> #{log_file} 2>&1"
   end
 
   def pidfile
     Rails.root.join("tmp", "pids", "sidekiq.pid")
   end
+
+  def log_file
+    Rails.root.join("log", "sidekiq.log")
+  end
 end
-- 
GitLab


From 70563a780f6db9a13b380ab6aed79915fe9d3f56 Mon Sep 17 00:00:00 2001
From: Jacob Vosmaer <contact@jacobvosmaer.nl>
Date: Wed, 9 Oct 2013 15:48:28 +0200
Subject: [PATCH 4/5] Use built-in sidekiq deamonization

---
 lib/tasks/sidekiq.rake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/tasks/sidekiq.rake b/lib/tasks/sidekiq.rake
index 46caffd0754..ba79b6e035d 100644
--- a/lib/tasks/sidekiq.rake
+++ b/lib/tasks/sidekiq.rake
@@ -14,7 +14,7 @@ namespace :sidekiq do
       Rake::Task['sidekiq:stop'].invoke
       puts 'Starting new sidekiq process.'
     end
-    system "nohup bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e #{Rails.env} -P #{pidfile} >> #{log_file} 2>&1 &"
+    system "bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e #{Rails.env} -P #{pidfile} -d -L #{log_file} >> #{log_file} 2>&1"
   end
 
   desc "GITLAB | Start sidekiq with launchd on Mac OS X"
-- 
GitLab


From d6932ce5816d157a169b37859b9309e96e527418 Mon Sep 17 00:00:00 2001
From: Achilleas Pipinellis <axilleas@archlinux.gr>
Date: Sat, 23 Nov 2013 12:33:24 +0200
Subject: [PATCH 5/5] Update ruby to patchlevel 353 (security update)

https://www.ruby-lang.org/en/news/2013/11/22/heap-overflow-in-floating-point-parsing-cve-2013-4164/
---
 doc/install/installation.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/install/installation.md b/doc/install/installation.md
index 660d7fa2bc1..ba5ad361b2d 100644
--- a/doc/install/installation.md
+++ b/doc/install/installation.md
@@ -91,9 +91,9 @@ Remove the old Ruby 1.8 if present
 Download Ruby and compile it:
 
     mkdir /tmp/ruby && cd /tmp/ruby
-    curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz | tar xz
-    cd ruby-2.0.0-p247
-    ./configure
+    curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p353.tar.gz | tar xz
+    cd ruby-2.0.0-p353
+    ./configure --disable-install-rdoc
     make
     sudo make install
 
-- 
GitLab