massive cleanup on old ebuilds for gitlabhq
This commit is contained in:
parent
67056b6ae4
commit
9d0d9c30eb
23 changed files with 20 additions and 3364 deletions
|
@ -1,43 +0,0 @@
|
|||
#!/sbin/runscript
|
||||
|
||||
name="GitLab Sidekiq"
|
||||
description="Sidekiq for GitLab"
|
||||
|
||||
: ${gitlab_user:=@USER@}
|
||||
: ${gitlab_base:="@GITLAB_BASE@"}
|
||||
: ${rails_env:=production}
|
||||
|
||||
: ${sidekiq_pidfile:="/run/gitlab/sidekiq.pid"}
|
||||
: ${sidekiq_logfile:="@LOGS_DIR@/sidekiq.log"}
|
||||
: ${sidekiq_queues:="@QUEUES@"}
|
||||
|
||||
sidekiq_command="/usr/bin/bundle"
|
||||
sidekiq_command_args="exec sidekiq -q ${sidekiq_queues} -P ${sidekiq_pidfile} -L ${sidekiq_logfile}"
|
||||
|
||||
depend() {
|
||||
need redis
|
||||
use net
|
||||
}
|
||||
|
||||
start() {
|
||||
checkpath -d -o ${gitlab_user} -m755 "$(dirname "${sidekiq_pidfile}")"
|
||||
|
||||
ebegin "Starting ${name} - Sidekiq"
|
||||
|
||||
start-stop-daemon --start \
|
||||
--background --quiet \
|
||||
--chdir "${gitlab_base}" \
|
||||
--user=${gitlab_user} \
|
||||
--pidfile="${sidekiq_pidfile}" \
|
||||
--env RAILS_ENV=${rails_env} \
|
||||
--exec ${sidekiq_command} -- ${sidekiq_command_args}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ${name} - Sidekiq"
|
||||
start-stop-daemon --stop \
|
||||
--pidfile=${sidekiq_pidfile} \
|
||||
--exec ${sidekiq_command}
|
||||
eend $?
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
#!/sbin/runscript
|
||||
|
||||
name="GitLab Sidekiq"
|
||||
description="Sidekiq for GitLab @SLOT@"
|
||||
description="Sidekiq for GitLab"
|
||||
|
||||
: ${gitlab_user:=@USER@}
|
||||
: ${gitlab_base:="@GITLAB_BASE@"}
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
#!/sbin/runscript
|
||||
|
||||
name="GitLab-@SLOT@"
|
||||
description="GitLab @SLOT@ on Unicorns"
|
||||
|
||||
: ${gitlab_user:=@USER@}
|
||||
: ${gitlab_base:="@GITLAB_BASE@"}
|
||||
: ${rails_env:=production}
|
||||
|
||||
: ${server_pidfile:="/run/gitlab/unicorn.pid"}
|
||||
|
||||
: ${sidekiq_pidfile:="/run/gitlab/sidekiq.pid"}
|
||||
: ${sidekiq_logfile:="@LOGS_DIR@/sidekiq.log"}
|
||||
: ${sidekiq_queues:="@QUEUES@"}
|
||||
|
||||
server_command="/usr/bin/bundle"
|
||||
server_command_args="exec unicorn_rails -c ${gitlab_base}/config/unicorn.rb -E ${rails_env} -D"
|
||||
|
||||
sidekiq_command="/usr/bin/bundle"
|
||||
sidekiq_command_args="exec sidekiq -q ${sidekiq_queues//,/ -q } -P ${sidekiq_pidfile} -L ${sidekiq_logfile}"
|
||||
|
||||
depend() {
|
||||
provide gitlab
|
||||
need redis
|
||||
use net
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting ${name} - Unicorn servers"
|
||||
|
||||
checkpath -d -o ${gitlab_user} -m755 "$(dirname "${server_pidfile}")"
|
||||
checkpath -d -o ${gitlab_user} -m755 "$(dirname "${sidekiq_pidfile}")"
|
||||
|
||||
start-stop-daemon --start \
|
||||
--chdir "${gitlab_base}" \
|
||||
--user=${gitlab_user} \
|
||||
--pidfile="${server_pidfile}" \
|
||||
--env RAILS_ENV=${rails_env} \
|
||||
--exec ${server_command} -- ${server_command_args}
|
||||
eend $?
|
||||
|
||||
ebegin "Starting ${name} - Sidekiq"
|
||||
|
||||
start-stop-daemon --start \
|
||||
--background --quiet \
|
||||
--chdir "${gitlab_base}" \
|
||||
--user=${gitlab_user} \
|
||||
--pidfile="${sidekiq_pidfile}" \
|
||||
--env RAILS_ENV=${rails_env} \
|
||||
--exec ${sidekiq_command} -- ${sidekiq_command_args}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ${name} - Sidekiq"
|
||||
start-stop-daemon --stop \
|
||||
--pidfile=${sidekiq_pidfile} \
|
||||
--exec ${sidekiq_command}
|
||||
eend $?
|
||||
|
||||
ebegin "Stopping ${name} - Unicorn servers"
|
||||
start-stop-daemon --stop \
|
||||
--signal QUIT \
|
||||
--pidfile=${server_pidfile} \
|
||||
--exec ${server_command}
|
||||
eend $?
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb
|
||||
index 9aeed5e..7d909f6 100644
|
||||
--- a/lib/gitlab/regex.rb
|
||||
+++ b/lib/gitlab/regex.rb
|
||||
@@ -1,3 +1,5 @@
|
||||
+# encoding: utf-8
|
||||
+
|
||||
module Gitlab
|
||||
module Regex
|
||||
extend self
|
||||
@@ -24,12 +26,12 @@ module Gitlab
|
||||
|
||||
|
||||
def project_name_regex
|
||||
- @project_name_regex ||= /\A[a-zA-Z0-9_.][a-zA-Z0-9_\-\. ]*\z/.freeze
|
||||
+ @project_name_regex ||= /\A[\p{Word}_.][\p{Word}_\-\. ]*\z/.freeze
|
||||
end
|
||||
|
||||
def project_name_regex_message
|
||||
"can contain only letters, digits, '_', '-', '.' and space. " \
|
||||
- "It must start with letter, digit or '_'."
|
||||
+ "It must start with letter, digit, '.' or '_'."
|
||||
end
|
||||
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb
|
||||
index cf6e260..5657566 100644
|
||||
--- a/lib/gitlab/regex.rb
|
||||
+++ b/lib/gitlab/regex.rb
|
||||
@@ -1,3 +1,5 @@
|
||||
+# encoding: utf-8
|
||||
+
|
||||
module Gitlab
|
||||
module Regex
|
||||
extend self
|
||||
@@ -11,12 +13,12 @@ module Gitlab
|
||||
end
|
||||
|
||||
def project_name_regex
|
||||
- /\A[a-zA-Z0-9_.][a-zA-Z0-9_\-\. ]*\z/
|
||||
+ /\A[\p{Word}_.][\p{Word}_\-:\. ]*\z/
|
||||
end
|
||||
|
||||
def project_regex_message
|
||||
- "can contain only letters, digits, '_', '-' and '.' and space. " \
|
||||
- "It must start with letter, digit or '_'."
|
||||
+ "can contain only letters, digits, '_', '-', ':' and '.' and space. " \
|
||||
+ "It must start with letter, digit, '.' or '_'."
|
||||
end
|
||||
|
||||
def name_regex
|
|
@ -1,39 +0,0 @@
|
|||
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
|
||||
index 46ead62..d4ee6bb 100644
|
||||
--- a/app/mailers/notify.rb
|
||||
+++ b/app/mailers/notify.rb
|
||||
@@ -19,7 +19,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 044b1f6..5ff344e 100644
|
||||
--- a/config/gitlab.yml.example
|
||||
+++ b/config/gitlab.yml.example
|
||||
@@ -44,6 +44,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 config/initializers/smtp_settings.rb.sample
|
||||
|
||||
# default_can_create_group: false # default: true
|
||||
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
|
||||
index 6a8bbb8..de5c8f8 100644
|
||||
--- a/config/initializers/1_settings.rb
|
||||
+++ b/config/initializers/1_settings.rb
|
||||
@@ -102,6 +102,7 @@ Settings.gitlab['relative_url_root'] ||= ENV['RAILS_RELATIVE_URL_ROOT'] || ''
|
||||
Settings.gitlab['protocol'] ||= Settings.gitlab.https ? "https" : "http"
|
||||
Settings.gitlab['email_enabled'] ||= true if Settings.gitlab['email_enabled'].nil?
|
||||
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
|
|
@ -1,88 +0,0 @@
|
|||
diff --git a/Gemfile b/Gemfile
|
||||
index c3d8299..f1c9da6 100644
|
||||
--- a/Gemfile
|
||||
+++ b/Gemfile
|
||||
@@ -167,6 +167,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"
|
||||
|
||||
@@ -265,7 +269,6 @@ end
|
||||
|
||||
group :production do
|
||||
gem "gitlab_meta", '7.0'
|
||||
- gem "therubyracer"
|
||||
end
|
||||
|
||||
gem "newrelic_rpm"
|
||||
diff --git a/Gemfile.lock b/Gemfile.lock
|
||||
index 3283da4..ae2518f 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:
|
||||
@@ -74,7 +81,6 @@ GEM
|
||||
json (>= 1.7)
|
||||
celluloid (0.16.0)
|
||||
timers (~> 4.0.0)
|
||||
- charlock_holmes (0.6.9.4)
|
||||
cliver (0.3.2)
|
||||
coderay (1.1.0)
|
||||
coercible (1.0.0)
|
||||
@@ -297,7 +303,6 @@ GEM
|
||||
addressable (~> 2.3)
|
||||
letter_opener (1.1.2)
|
||||
launchy (~> 2.2)
|
||||
- libv8 (3.16.14.7)
|
||||
listen (2.3.1)
|
||||
celluloid (>= 0.15.2)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
@@ -453,7 +458,6 @@ GEM
|
||||
redis-store (~> 1.1.0)
|
||||
redis-store (1.1.4)
|
||||
redis (>= 2.2)
|
||||
- ref (1.0.5)
|
||||
request_store (1.0.5)
|
||||
rest-client (1.6.7)
|
||||
mime-types (>= 1.16)
|
||||
@@ -564,9 +568,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)
|
||||
@@ -649,6 +650,7 @@ DEPENDENCIES
|
||||
cal-heatmap-rails (~> 0.0.1)
|
||||
capybara (~> 2.2.1)
|
||||
carrierwave
|
||||
+ charlock_holmes!
|
||||
coffee-rails
|
||||
colored
|
||||
coveralls
|
||||
@@ -752,7 +754,6 @@ DEPENDENCIES
|
||||
stamp
|
||||
state_machine
|
||||
test_after_commit
|
||||
- therubyracer
|
||||
thin
|
||||
tinder (~> 1.9.2)
|
||||
turbolinks
|
|
@ -1,39 +0,0 @@
|
|||
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
|
||||
index ee27879..90364a0 100644
|
||||
--- a/app/mailers/notify.rb
|
||||
+++ b/app/mailers/notify.rb
|
||||
@@ -19,7 +19,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 a85db10..47605d2 100644
|
||||
--- a/config/gitlab.yml.example
|
||||
+++ b/config/gitlab.yml.example
|
||||
@@ -45,6 +45,9 @@ production: &base
|
||||
email_from: example@example.com
|
||||
email_display_name: GitLab
|
||||
|
||||
+ # 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 config/initializers/smtp_settings.rb.sample
|
||||
|
||||
# default_can_create_group: false # default: true
|
||||
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
|
||||
index 70af7a8..ee00e17 100644
|
||||
--- a/config/initializers/1_settings.rb
|
||||
+++ b/config/initializers/1_settings.rb
|
||||
@@ -103,6 +103,7 @@ Settings.gitlab['protocol'] ||= Settings.gitlab.https ? "https" : "http"
|
||||
Settings.gitlab['email_enabled'] ||= true if Settings.gitlab['email_enabled'].nil?
|
||||
Settings.gitlab['email_from'] ||= "gitlab@#{Settings.gitlab.host}"
|
||||
Settings.gitlab['email_display_name'] ||= "GitLab"
|
||||
+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
|
Loading…
Add table
Add a link
Reference in a new issue