added ebuilds and patches for gitlabhq 6.7.5 and 6.8.2 and cleaned up patch files for 6.6.5.
This commit is contained in:
parent
38af1e988e
commit
717334d1bf
9 changed files with 937 additions and 33 deletions
|
@ -1,20 +0,0 @@
|
|||
diff --git a/lib/gitlab/ldap/user.rb b/lib/gitlab/ldap/user.rb
|
||||
index 59f0fa6..8afd64f 100644
|
||||
--- a/lib/gitlab/ldap/user.rb
|
||||
+++ b/lib/gitlab/ldap/user.rb
|
||||
@@ -83,8 +83,14 @@ module Gitlab
|
||||
|
||||
private
|
||||
|
||||
+ # Override superclass method to use our case-insensitive find_by_uid
|
||||
+ def find_by_uid_and_provider
|
||||
+ find_by_uid(uid)
|
||||
+ end
|
||||
+
|
||||
def find_by_uid(uid)
|
||||
- model.where(provider: provider, extern_uid: uid).last
|
||||
+ # LDAP distinguished name is case-insensitive
|
||||
+ model.where("provider = ? and lower(extern_uid) = ?", provider, uid.downcase).last
|
||||
end
|
||||
|
||||
def provider
|
|
@ -0,0 +1,33 @@
|
|||
--- app/mailers/notify.rb.orig 2014-05-19 12:22:50.840000000 +0200
|
||||
+++ app/mailers/notify.rb 2014-05-19 12:23:35.660000000 +0200
|
||||
@@ -16,7 +16,7 @@
|
||||
default_url_options[:script_name] = Gitlab.config.gitlab.relative_url_root
|
||||
|
||||
default from: Proc.new { default_sender_address.format }
|
||||
- default reply_to: "noreply@#{Gitlab.config.gitlab.host}"
|
||||
+ default reply_to: Gitlab.config.gitlab.email_reply_to
|
||||
|
||||
# Just send email with 2 seconds delay
|
||||
def self.delay
|
||||
--- config/gitlab.yml.example.orig 2014-05-19 12:23:45.640000000 +0200
|
||||
+++ config/gitlab.yml.example 2014-05-19 12:24:07.340000000 +0200
|
||||
@@ -37,6 +37,9 @@
|
||||
# Email address used in the "From" field in mails sent by GitLab
|
||||
email_from: gitlab@localhost
|
||||
|
||||
+ # Email address used in the "Reply-To" field in mails send by GitLab (default: no-reply@<host>)
|
||||
+ email_reply_to: no-reply@localhost
|
||||
+
|
||||
# Email address of your support contact (default: same as email_from)
|
||||
support_email: support@localhost
|
||||
|
||||
--- config/initializers/1_settings.rb.orig 2014-05-19 12:24:14.520000000 +0200
|
||||
+++ config/initializers/1_settings.rb 2014-05-19 12:24:44.010000000 +0200
|
||||
@@ -78,6 +78,7 @@
|
||||
Settings.gitlab['relative_url_root'] ||= ENV['RAILS_RELATIVE_URL_ROOT'] || ''
|
||||
Settings.gitlab['protocol'] ||= Settings.gitlab.https ? "https" : "http"
|
||||
Settings.gitlab['email_from'] ||= "gitlab@#{Settings.gitlab.host}"
|
||||
+Settings.gitlab['email_reply_to'] ||= "no-reply@#{Settings.gitlab.host}"
|
||||
Settings.gitlab['support_email'] ||= Settings.gitlab.email_from
|
||||
Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url)
|
||||
Settings.gitlab['user'] ||= 'git'
|
|
@ -1,5 +1,5 @@
|
|||
--- a/lib/gitlab/regex.rb
|
||||
+++ b/lib/gitlab/regex.rb
|
||||
--- lib/gitlab/regex.rb.orig 2014-05-19 12:17:42.210000000 +0200
|
||||
+++ lib/gitlab/regex.rb 2014-05-19 12:18:56.920000000 +0200
|
||||
@@ -1,3 +1,5 @@
|
||||
+# encoding: utf-8
|
||||
+
|
||||
|
@ -10,14 +10,14 @@
|
|||
end
|
||||
|
||||
def project_name_regex
|
||||
- /\A[a-zA-Z0-9][a-zA-Z0-9_\-\. ]*\z/
|
||||
+ /\A\p{Word}[\p{Word}\-:\. ]*\z/
|
||||
- /\A[a-zA-Z0-9_][a-zA-Z0-9_\-\. ]*\z/
|
||||
+ /\A[\p{Word}_][\p{Word}_\-:\. ]*\z/
|
||||
end
|
||||
|
||||
def name_regex
|
||||
--- a/app/models/project.rb
|
||||
+++ b/app/models/project.rb
|
||||
@@ -85,7 +85,7 @@
|
||||
--- app/models/project.rb.orig 2014-05-19 12:19:44.700000000 +0200
|
||||
+++ app/models/project.rb 2014-05-19 12:20:16.050000000 +0200
|
||||
@@ -84,7 +84,7 @@
|
||||
validates :description, length: { maximum: 2000 }, allow_blank: true
|
||||
validates :name, presence: true, length: { within: 0..255 },
|
||||
format: { with: Gitlab::Regex.project_name_regex,
|
84
www-apps/gitlabhq/files/gitlabhq-6.8.2-fix-gemfile.patch
Normal file
84
www-apps/gitlabhq/files/gitlabhq-6.8.2-fix-gemfile.patch
Normal file
|
@ -0,0 +1,84 @@
|
|||
--- Gemfile.orig 2014-05-19 13:04:44.700000000 +0200
|
||||
+++ Gemfile 2014-05-19 13:05:44.400000000 +0200
|
||||
@@ -142,6 +142,10 @@
|
||||
# Sanitize user input
|
||||
gem "sanitize", '~> 2.0'
|
||||
|
||||
+# The newer revision of charlock_holmes that is finally fixed to
|
||||
+# be compatible with Gentoo
|
||||
+gem "charlock_holmes", git: "https://github.com/brianmario/charlock_holmes.git", ref: "dde194609b3513b0d2369ce8f916ae52566154b4"
|
||||
+
|
||||
# Protect against bruteforcing
|
||||
gem "rack-attack"
|
||||
|
||||
@@ -151,7 +155,6 @@
|
||||
gem "sass-rails", '~> 4.0.2'
|
||||
gem "coffee-rails"
|
||||
gem "uglifier"
|
||||
-gem "therubyracer"
|
||||
gem 'turbolinks'
|
||||
gem 'jquery-turbolinks'
|
||||
|
||||
--- Gemfile.lock.orig 2014-05-19 13:06:11.660000000 +0200
|
||||
+++ Gemfile.lock 2014-05-19 13:08:38.440000000 +0200
|
||||
@@ -1,3 +1,10 @@
|
||||
+GIT
|
||||
+ remote: https://github.com/brianmario/charlock_holmes.git
|
||||
+ revision: dde194609b3513b0d2369ce8f916ae52566154b4
|
||||
+ ref: dde194609b3513b0d2369ce8f916ae52566154b4
|
||||
+ specs:
|
||||
+ charlock_holmes (0.6.9.4)
|
||||
+
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
@@ -60,7 +67,6 @@
|
||||
json (>= 1.7)
|
||||
celluloid (0.15.2)
|
||||
timers (~> 1.1.0)
|
||||
- charlock_holmes (0.6.9.4)
|
||||
cliver (0.2.2)
|
||||
code_analyzer (0.4.3)
|
||||
sexp_processor
|
||||
@@ -267,7 +273,6 @@
|
||||
addressable (~> 2.3)
|
||||
letter_opener (1.1.2)
|
||||
launchy (~> 2.2)
|
||||
- libv8 (3.16.14.3)
|
||||
listen (2.3.1)
|
||||
celluloid (>= 0.15.2)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
@@ -402,7 +407,6 @@
|
||||
redis-store (~> 1.1.0)
|
||||
redis-store (1.1.4)
|
||||
redis (>= 2.2)
|
||||
- ref (1.0.5)
|
||||
require_all (1.3.2)
|
||||
rest-client (1.6.7)
|
||||
mime-types (>= 1.16)
|
||||
@@ -496,9 +500,6 @@
|
||||
term-ansicolor (1.2.2)
|
||||
tins (~> 0.8)
|
||||
test_after_commit (0.2.2)
|
||||
- therubyracer (0.12.0)
|
||||
- libv8 (~> 3.16.14.0)
|
||||
- ref
|
||||
thin (1.6.1)
|
||||
daemons (>= 1.0.9)
|
||||
eventmachine (>= 1.0.0)
|
||||
@@ -567,6 +568,7 @@
|
||||
bootstrap-sass (~> 3.0)
|
||||
capybara
|
||||
carrierwave
|
||||
+ charlock_holmes!
|
||||
coffee-rails
|
||||
colored
|
||||
coveralls
|
||||
@@ -654,7 +656,6 @@
|
||||
stamp
|
||||
state_machine
|
||||
test_after_commit
|
||||
- therubyracer
|
||||
thin
|
||||
tinder (~> 1.9.2)
|
||||
turbolinks
|
|
@ -0,0 +1,76 @@
|
|||
--- Gemfile.orig 2014-05-19 13:15:25.830000000 +0200
|
||||
+++ Gemfile 2014-05-19 13:16:01.020000000 +0200
|
||||
@@ -36,7 +36,8 @@
|
||||
gem 'gitlab-grack', '~> 2.0.0.pre', require: 'grack'
|
||||
|
||||
# LDAP Auth
|
||||
-gem 'gitlab_omniauth-ldap', '1.0.4', require: "omniauth-ldap"
|
||||
+# Patched for attributes mapping customization
|
||||
+gem 'gitlab_omniauth-ldap', '1.0.4', require: 'omniauth-ldap', git: 'https://github.com/jirutka/omniauth-ldap.git', ref: 'b55852bfc9b46ecf790a2c5526386702350eab89'
|
||||
|
||||
# Git Wiki
|
||||
gem 'gollum-lib', '~> 3.0.0'
|
||||
--- Gemfile.lock.orig 2014-05-19 13:16:34.160000000 +0200
|
||||
+++ Gemfile.lock 2014-05-19 13:17:44.500000000 +0200
|
||||
@@ -5,6 +5,17 @@
|
||||
specs:
|
||||
charlock_holmes (0.6.9.4)
|
||||
|
||||
+ GIT
|
||||
+ remote: https://github.com/jirutka/omniauth-ldap.git
|
||||
+ revision: b55852bfc9b46ecf790a2c5526386702350eab89
|
||||
+ ref: b55852bfc9b46ecf790a2c5526386702350eab89
|
||||
+ specs:
|
||||
+ gitlab_omniauth-ldap (1.0.4)
|
||||
+ net-ldap (~> 0.3.1)
|
||||
+ omniauth (~> 1.0)
|
||||
+ pyu-ruby-sasl (~> 0.0.3.1)
|
||||
+ rubyntlm (~> 0.1.1)
|
||||
+
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
@@ -186,11 +197,6 @@
|
||||
gitlab-linguist (~> 3.0)
|
||||
rugged (~> 0.19.0)
|
||||
gitlab_meta (6.0)
|
||||
- gitlab_omniauth-ldap (1.0.4)
|
||||
- net-ldap (~> 0.3.1)
|
||||
- omniauth (~> 1.0)
|
||||
- pyu-ruby-sasl (~> 0.0.3.1)
|
||||
- rubyntlm (~> 0.1.1)
|
||||
gollum-lib (3.0.0)
|
||||
github-markup (~> 1.1.0)
|
||||
gitlab-grit (~> 2.6.5)
|
||||
@@ -593,7 +599,7 @@
|
||||
gitlab_emoji (~> 0.0.1.1)
|
||||
gitlab_git (~> 5.8)
|
||||
gitlab_meta (= 6.0)
|
||||
- gitlab_omniauth-ldap (= 1.0.4)
|
||||
+ gitlab_omniauth-ldap (= 1.0.4)!
|
||||
gollum-lib (~> 3.0.0)
|
||||
gon (~> 5.0.0)
|
||||
grape (~> 0.6.1)
|
||||
--- config/gitlab.yml.example.orig 2014-05-19 13:18:03.400000000 +0200
|
||||
+++ config/gitlab.yml.example 2014-05-19 13:18:45.740000000 +0200
|
||||
@@ -135,6 +135,10 @@
|
||||
method: 'ssl' # "tls" or "ssl" or "plain"
|
||||
bind_dn: '_the_full_dn_of_the_user_you_will_bind_with'
|
||||
password: '_the_password_of_the_bind_user'
|
||||
+ mapping:
|
||||
+ username: 'uid'
|
||||
+ name: 'cn'
|
||||
+ email: 'mail'
|
||||
# If allow_username_or_email_login is enabled, GitLab will ignore everything
|
||||
# after the first '@' in the LDAP username submitted by the user on login.
|
||||
#
|
||||
--- config/initializers/devise.rb.orig 2014-05-19 13:19:23.120000000 +0200
|
||||
+++ config/initializers/devise.rb 2014-05-19 13:19:43.170000000 +0200
|
||||
@@ -223,6 +223,7 @@
|
||||
method: Gitlab.config.ldap['method'],
|
||||
bind_dn: Gitlab.config.ldap['bind_dn'],
|
||||
password: Gitlab.config.ldap['password'],
|
||||
+ mapping: Gitlab.config.ldap['mapping'],
|
||||
name_proc: email_stripping_proc
|
||||
end
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue