[DRE-commits] [gitlab-shell] 04/07: patch paths

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Tue Nov 10 17:42:59 UTC 2015


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository gitlab-shell.

commit 4a6ec03a6bf0799795efc9d33d1ea15865eb00fc
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Tue Nov 10 19:27:31 2015 +0530

    patch paths
---
 debian/patches/series                |  2 +
 debian/patches/set-root-path.patch   | 11 ++++++
 debian/patches/use-system-libs.patch | 71 ++++++++++++++++++++++++++++++++++++
 3 files changed, 84 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..982f34e
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+use-system-libs.patch
+set-root-path.patch
diff --git a/debian/patches/set-root-path.patch b/debian/patches/set-root-path.patch
new file mode 100644
index 0000000..c72431a
--- /dev/null
+++ b/debian/patches/set-root-path.patch
@@ -0,0 +1,11 @@
+Index: gitlab-shell/lib/gitlab_init.rb
+===================================================================
+--- gitlab-shell.orig/lib/gitlab_init.rb
++++ gitlab-shell/lib/gitlab_init.rb
+@@ -1,3 +1,5 @@
+-ROOT_PATH = File.expand_path(File.join(File.dirname(__FILE__), ".."))
++if ENV['SHELL_ROOT_PATH'] == ''
++	ROOT_PATH = File.expand_path(File.join(File.dirname(__FILE__), ".."))
++end
+ 
+ require_relative 'gitlab_config'
diff --git a/debian/patches/use-system-libs.patch b/debian/patches/use-system-libs.patch
new file mode 100644
index 0000000..84200b1
--- /dev/null
+++ b/debian/patches/use-system-libs.patch
@@ -0,0 +1,71 @@
+Index: gitlab-shell/bin/check
+===================================================================
+--- gitlab-shell.orig/bin/check
++++ gitlab-shell/bin/check
+@@ -1,7 +1,8 @@
+ #!/usr/bin/env ruby
+ 
+-require_relative '../lib/gitlab_init'
+-require_relative '../lib/gitlab_net'
++$:.unshift File.expand_path('../lib', __FILE__)
++require 'gitlab_init'
++require 'gitlab_net'
+ 
+ #
+ # GitLab shell check task
+Index: gitlab-shell/bin/create-hooks
+===================================================================
+--- gitlab-shell.orig/bin/create-hooks
++++ gitlab-shell/bin/create-hooks
+@@ -4,8 +4,9 @@
+ #
+ # This script is used when restoring a GitLab backup.
+ 
+-require_relative '../lib/gitlab_init'
+-require File.join(ROOT_PATH, 'lib', 'gitlab_projects')
++$:.unshift File.expand_path('../lib', __FILE__)
++require 'gitlab_init'
++require 'gitlab_projects'
+ 
+ Dir["#{GitlabConfig.new.repos_path}/*/*.git"].each do |repo|
+   begin
+Index: gitlab-shell/bin/gitlab-keys
+===================================================================
+--- gitlab-shell.orig/bin/gitlab-keys
++++ gitlab-shell/bin/gitlab-keys
+@@ -1,6 +1,7 @@
+ #!/usr/bin/env ruby
+ 
+-require_relative '../lib/gitlab_init'
++$:.unshift File.expand_path('../lib', __FILE__)
++require 'gitlab_init'
+ 
+ #
+ # GitLab Keys shell. Add/remove keys from ~/.ssh/authorized_keys
+Index: gitlab-shell/bin/gitlab-projects
+===================================================================
+--- gitlab-shell.orig/bin/gitlab-projects
++++ gitlab-shell/bin/gitlab-projects
+@@ -1,7 +1,8 @@
+ #!/usr/bin/env ruby
+ 
+ 
+-require_relative '../lib/gitlab_init'
++$:.unshift File.expand_path('../lib', __FILE__)
++require 'gitlab_init'
+ 
+ #
+ # GitLab Projects shell. Add/remove projects from /home/git/repositories
+Index: gitlab-shell/bin/install
+===================================================================
+--- gitlab-shell.orig/bin/install
++++ gitlab-shell/bin/install
+@@ -1,6 +1,7 @@
+ #!/usr/bin/env ruby
+ 
+-require_relative '../lib/gitlab_init'
++$:.unshift File.expand_path('../lib', __FILE__)
++require 'gitlab_init'
+ 
+ #
+ # GitLab shell, invoked from ~/.ssh/authorized_keys

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gitlab-shell.git



More information about the Pkg-ruby-extras-commits mailing list