[DRE-commits] [gitlab-shell] 03/05: refresh patches

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Tue Aug 22 08:47:55 UTC 2017


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

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

commit fec7b182a1b818c8f4e2fd18d0f54be330816d41
Author: Pirate Praveen <praveen at debian.org>
Date:   Tue Aug 22 14:11:37 2017 +0530

    refresh patches
---
 debian/patches/git-env.patch         | 56 --------------------------
 debian/patches/series                |  1 -
 debian/patches/use-system-libs.patch | 76 ++++++++++++++----------------------
 3 files changed, 29 insertions(+), 104 deletions(-)

diff --git a/debian/patches/git-env.patch b/debian/patches/git-env.patch
deleted file mode 100644
index 9cb5616..0000000
--- a/debian/patches/git-env.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Description: Ensure compatibility with git 2.11 by setting env variables
-Author: Rémy Coutable <remy at rymai.me>
-Applied-Upstream: https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/120/
-Last-Update: 2017-02-07
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/CHANGELOG
-+++ b/CHANGELOG
-@@ -1,3 +1,6 @@
-+v3.6.7
-+  - Send (a selection of) git environment variables while making the API call to `/allowed`, !112
-+
- v3.6.6
-   - Re-use the default logger when logging metrics data
- 
---- a/VERSION
-+++ b/VERSION
-@@ -1 +1 @@
--3.6.6
-+3.6.7
---- a/lib/gitlab_access.rb
-+++ b/lib/gitlab_access.rb
-@@ -21,7 +21,12 @@
-   end
- 
-   def exec
--    status = api.check_access('git-receive-pack', @repo_name, @actor, @changes, @protocol)
-+    env = {
-+      "GIT_ALTERNATE_OBJECT_DIRECTORIES" => ENV["GIT_ALTERNATE_OBJECT_DIRECTORIES"],
-+      "GIT_OBJECT_DIRECTORY" => ENV["GIT_OBJECT_DIRECTORY"]
-+    }
-+
-+    status = api.check_access('git-receive-pack', @repo_name, @actor, @changes, @protocol, env: env.to_json)
- 
-     raise AccessDeniedError, status.message unless status.allowed?
- 
---- a/lib/gitlab_net.rb
-+++ b/lib/gitlab_net.rb
-@@ -15,14 +15,15 @@
-   CHECK_TIMEOUT = 5
-   READ_TIMEOUT = 300
- 
--  def check_access(cmd, repo, actor, changes, protocol)
-+  def check_access(cmd, repo, actor, changes, protocol, env: {})
-     changes = changes.join("\n") unless changes.kind_of?(String)
- 
-     params = {
-       action: cmd,
-       changes: changes,
-       project: project_name(repo),
--      protocol: protocol
-+      protocol: protocol,
-+      env: env
-     }
- 
-     if actor =~ /\Akey\-\d+\Z/
diff --git a/debian/patches/series b/debian/patches/series
index 80c9cbd..982f34e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
 use-system-libs.patch
 set-root-path.patch
-git-env.patch
diff --git a/debian/patches/use-system-libs.patch b/debian/patches/use-system-libs.patch
index ae0cb22..12b5f28 100644
--- a/debian/patches/use-system-libs.patch
+++ b/debian/patches/use-system-libs.patch
@@ -1,8 +1,6 @@
 Forwarded: https://gitlab.com/gitlab-org/gitlab-shell/issues/30
-Index: gitlab-shell/bin/check
-===================================================================
---- gitlab-shell.orig/bin/check
-+++ gitlab-shell/bin/check
+--- a/bin/check
++++ b/bin/check
 @@ -1,7 +1,8 @@
  #!/usr/bin/env ruby
  
@@ -14,10 +12,8 @@ Index: gitlab-shell/bin/check
  
  #
  # GitLab shell check task
-Index: gitlab-shell/bin/create-hooks
-===================================================================
---- gitlab-shell.orig/bin/create-hooks
-+++ gitlab-shell/bin/create-hooks
+--- a/bin/create-hooks
++++ b/bin/create-hooks
 @@ -4,9 +4,10 @@
  #
  # This script is used when restoring a GitLab backup.
@@ -32,10 +28,8 @@ Index: gitlab-shell/bin/create-hooks
  
  repository_storage_paths = ARGV
  
-Index: gitlab-shell/bin/gitlab-keys
-===================================================================
---- gitlab-shell.orig/bin/gitlab-keys
-+++ gitlab-shell/bin/gitlab-keys
+--- a/bin/gitlab-keys
++++ b/bin/gitlab-keys
 @@ -1,6 +1,7 @@
  #!/usr/bin/env ruby
  
@@ -45,7 +39,7 @@ Index: gitlab-shell/bin/gitlab-keys
  
  #
  # GitLab Keys shell. Add/remove keys from ~/.ssh/authorized_keys
-@@ -17,7 +18,7 @@ require_relative '../lib/gitlab_init'
+@@ -17,7 +18,7 @@
  #   /bin/gitlab-keys clear
  #
  
@@ -54,10 +48,8 @@ Index: gitlab-shell/bin/gitlab-keys
  
  # Return non-zero if command execution was not successful
  if GitlabKeys.new.exec
-Index: gitlab-shell/bin/gitlab-projects
-===================================================================
---- gitlab-shell.orig/bin/gitlab-projects
-+++ gitlab-shell/bin/gitlab-projects
+--- a/bin/gitlab-projects
++++ b/bin/gitlab-projects
 @@ -1,7 +1,8 @@
  #!/usr/bin/env ruby
  
@@ -68,7 +60,7 @@ Index: gitlab-shell/bin/gitlab-projects
  
  #
  # GitLab Projects shell. Add/remove projects from /home/git/repositories
-@@ -19,7 +20,7 @@ require_relative '../lib/gitlab_init'
+@@ -19,7 +20,7 @@
  #
  #   /bin/gitlab-projects import-project randx/six.git https://github.com/randx/six.git
  #
@@ -77,10 +69,8 @@ Index: gitlab-shell/bin/gitlab-projects
  
  # Return non-zero if command execution was not successful
  if GitlabProjects.new.exec
-Index: gitlab-shell/bin/install
-===================================================================
---- gitlab-shell.orig/bin/install
-+++ gitlab-shell/bin/install
+--- a/bin/install
++++ b/bin/install
 @@ -1,6 +1,7 @@
  #!/usr/bin/env ruby
  
@@ -90,11 +80,9 @@ Index: gitlab-shell/bin/install
  
  #
  # GitLab shell, invoked from ~/.ssh/authorized_keys
-Index: gitlab-shell/bin/gitlab-shell
-===================================================================
---- gitlab-shell.orig/bin/gitlab-shell
-+++ gitlab-shell/bin/gitlab-shell
-@@ -8,14 +8,14 @@ end
+--- a/bin/gitlab-shell
++++ b/bin/gitlab-shell
+@@ -8,14 +8,14 @@
  key_id = /key-[0-9]+/.match(ARGV.join).to_s
  original_cmd = ENV.delete('SSH_ORIGINAL_COMMAND')
  
@@ -111,12 +99,10 @@ Index: gitlab-shell/bin/gitlab-shell
  
  if GitlabShell.new(key_id).exec(original_cmd)
    exit 0
-Index: gitlab-shell/hooks/post-receive
-===================================================================
---- gitlab-shell.orig/hooks/post-receive
-+++ gitlab-shell/hooks/post-receive
-@@ -7,8 +7,9 @@ refs = $stdin.read
- key_id  = ENV.delete('GL_ID')
+--- a/hooks/post-receive
++++ b/hooks/post-receive
+@@ -8,8 +8,9 @@
+ gl_repository = ENV.delete('GL_REPOSITORY')
  repo_path = Dir.pwd
  
 -require_relative '../lib/gitlab_custom_hook'
@@ -125,13 +111,11 @@ Index: gitlab-shell/hooks/post-receive
 +require 'gitlab_custom_hook'
 +require 'gitlab_post_receive'
  
- if GitlabPostReceive.new(repo_path, key_id, refs).exec &&
-     GitlabCustomHook.new(key_id).post_receive(refs, repo_path)
-Index: gitlab-shell/hooks/update
-===================================================================
---- gitlab-shell.orig/hooks/update
-+++ gitlab-shell/hooks/update
-@@ -9,7 +9,8 @@ new_value = ARGV[2]
+ if GitlabPostReceive.new(gl_repository, repo_path, key_id, refs).exec &&
+     GitlabCustomHook.new(repo_path, key_id).post_receive(refs)
+--- a/hooks/update
++++ b/hooks/update
+@@ -9,7 +9,8 @@
  repo_path = Dir.pwd
  key_id    = ENV.delete('GL_ID')
  
@@ -139,15 +123,13 @@ Index: gitlab-shell/hooks/update
 +$:.unshift File.expand_path('../lib', __FILE__)
 +require 'gitlab_custom_hook'
  
- if GitlabCustomHook.new(key_id).update(ref_name, old_value, new_value, repo_path)
+ if GitlabCustomHook.new(repo_path, key_id).update(ref_name, old_value, new_value)
    exit 0
-Index: gitlab-shell/hooks/pre-receive
-===================================================================
---- gitlab-shell.orig/hooks/pre-receive
-+++ gitlab-shell/hooks/pre-receive
-@@ -8,9 +8,10 @@ key_id = ENV.delete('GL_ID')
- protocol = ENV.delete('GL_PROTOCOL')
+--- a/hooks/pre-receive
++++ b/hooks/pre-receive
+@@ -9,9 +9,10 @@
  repo_path = Dir.pwd
+ gl_repository = ENV['GL_REPOSITORY']
  
 -require_relative '../lib/gitlab_custom_hook'
 -require_relative '../lib/gitlab_reference_counter'

-- 
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