added ebuild for gitlabhq-7.0.0; it builds.

This commit is contained in:
Manuel Friedli 2014-07-21 11:53:29 +02:00
parent 94fea7a7e5
commit 06aa9da3f7
5 changed files with 218 additions and 6 deletions

View file

@ -0,0 +1,39 @@
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index 84a0da0..9cb359e 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -16,7 +16,7 @@ class Notify < ActionMailer::Base
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
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index b2b8f56..173924c 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -35,6 +35,9 @@ production: &base
# Email address used in the "From" field in mails sent by GitLab
email_from: example@example.com
+ # Email address used in the "Reply-To" field in mails send by GitLab (default: no-reply@<host>)
+ email_reply_to: no-reply@example.com
+
# Email server smtp settings are in [a separate file](initializers/smtp_settings.rb.sample).
## User settings
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index f55e69c..997ff2e 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -79,6 +79,7 @@ Settings.gitlab['port'] ||= Settings.gitlab.https ? 443 : 80
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['url'] ||= Settings.send(:build_gitlab_url)
Settings.gitlab['user'] ||= 'git'
Settings.gitlab['user_home'] ||= begin

View file

@ -0,0 +1,88 @@
diff --git a/Gemfile b/Gemfile
index c642134..de4217b 100644
--- a/Gemfile
+++ b/Gemfile
@@ -150,6 +150,10 @@ gem "underscore-rails", "~> 1.4.4"
# 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"
@@ -162,7 +166,6 @@ gem 'semantic-ui-sass', '~> 0.16.1.0'
gem "sass-rails", '~> 4.0.2'
gem "coffee-rails"
gem "uglifier"
-gem "therubyracer"
gem 'turbolinks'
gem 'jquery-turbolinks'
diff --git a/Gemfile.lock b/Gemfile.lock
index 6c27b6e..68c8f41 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -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:
@@ -61,7 +68,6 @@ GEM
json (>= 1.7)
celluloid (0.15.2)
timers (~> 1.1.0)
- charlock_holmes (0.6.9.4)
cliver (0.3.2)
code_analyzer (0.4.3)
sexp_processor
@@ -270,7 +276,6 @@ GEM
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)
@@ -411,7 +416,6 @@ GEM
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)
@@ -508,9 +512,6 @@ GEM
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)
@@ -582,6 +583,7 @@ DEPENDENCIES
bootstrap-sass (~> 3.0)
capybara (~> 2.2.1)
carrierwave
+ charlock_holmes!
coffee-rails
colored
coveralls
@@ -674,7 +676,6 @@ DEPENDENCIES
stamp
state_machine
test_after_commit
- therubyracer
thin
tinder (~> 1.9.2)
turbolinks

View file

@ -0,0 +1,84 @@
diff --git a/Gemfile b/Gemfile
index de4217b..8723eda 100644
--- a/Gemfile
+++ b/Gemfile
@@ -39,7 +39,8 @@ gem "gitlab_git", '~> 6.0'
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'
diff --git a/Gemfile.lock b/Gemfile.lock
index 68c8f41..225089f 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -5,6 +5,17 @@ GIT
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:
@@ -188,11 +199,6 @@ GEM
gitlab-linguist (~> 3.0)
rugged (~> 0.19.0)
gitlab_meta (7.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)
@@ -609,7 +615,7 @@ DEPENDENCIES
gitlab_emoji (~> 0.0.1.1)
gitlab_git (~> 6.0)
gitlab_meta (= 7.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)
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 806984e..b2b8f56 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -132,6 +132,10 @@ production: &base
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.
#
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 50669ec..881081b 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -223,6 +223,7 @@ Devise.setup do |config|
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