Added gitlabhq ebuilds
git-svn-id: svn+ssh://svnintern.kmrc.de/projects/gentoo/iwm-overlay@31818 cbe59ace-07ea-0310-918e-868702b5370d
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
Host localhost
|
||||
StrictHostKeyChecking no
|
||||
UserKnownHostsFile=/dev/null
|
||||
BatchMode yes
|
||||
CheckHostIP no
|
||||
AddressFamily inet
|
||||
PreferredAuthentications publickey
|
||||
ControlMaster auto
|
||||
ControlPath ~/.ssh/ssh-%r-%h:%p.sock
|
||||
ControlPersist 24h
|
||||
@@ -0,0 +1,44 @@
|
||||
#!/sbin/runscript
|
||||
|
||||
name="GitLab support"
|
||||
description="Support for GitLab @SLOT@"
|
||||
|
||||
: ${gitlab_user:=@GIT_USER@}
|
||||
: ${gitlab_group:=@GIT_GROUP@}
|
||||
: ${gitlab_home:="@DEST_DIR@"}
|
||||
|
||||
: ${sidekiq_pidfile:="@DEST_DIR@/tmp/pids/sidekiq.pid"}
|
||||
: ${sidekiq_log:="@LOG_DIR@/sidekiq.log"}
|
||||
|
||||
: ${rails_env:=production}
|
||||
|
||||
bundle="/usr/bin/bundle"
|
||||
sidekiq_command="/usr/bin/bundle"
|
||||
sidekiq_start_command_args="exec rake sidekiq:start RAILS_ENV=${rails_env}"
|
||||
sidekiq_stop_command_args="exec rake sidekiq:stop RAILS_ENV=${rails_env}"
|
||||
|
||||
if [ ${rails_env} = development ]; then
|
||||
sidekiq_args+=" VVERBOSE=1"
|
||||
fi
|
||||
|
||||
depend() {
|
||||
provide gitlab
|
||||
need redis
|
||||
use net
|
||||
}
|
||||
|
||||
start() {
|
||||
|
||||
ebegin "Starting GitLab @SLOT@ Sidekiq"
|
||||
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${sidekiq_pidfile}")"
|
||||
cd "${gitlab_home}"
|
||||
sudo -u git -H ${sidekiq_command} ${sidekiq_start_command_args}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping GitLab @SLOT@ Sidekiq"
|
||||
cd "${gitlab_home}"
|
||||
sudo -u git -H ${sidekiq_command} ${sidekiq_stop_command_args}
|
||||
eend $?
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
#!/sbin/runscript
|
||||
|
||||
name="GitLab"
|
||||
description="GitLab @SLOT@ on Unicorns"
|
||||
|
||||
: ${gitlab_user:=@GIT_USER@}
|
||||
: ${gitlab_group:=@GIT_GROUP@}
|
||||
: ${gitlab_home:="@DEST_DIR@"}
|
||||
|
||||
: ${server_pidfile:="@DEST_DIR@/tmp/pids/unicorn.pid"}
|
||||
: ${sidekiq_pidfile:="@DEST_DIR@/tmp/pids/sidekiq.pid"}
|
||||
|
||||
: ${sidekiq_log:="@LOG_DIR@/sidekiq.log"}
|
||||
|
||||
: ${rails_env:=production}
|
||||
|
||||
server_command="/usr/bin/bundle"
|
||||
server_command_args="exec unicorn_rails -c ${gitlab_home}/config/unicorn.rb -E ${rails_env} -D"
|
||||
sidekiq_command="/usr/bin/bundle"
|
||||
sidekiq_start_command_args="exec rake sidekiq:start RAILS_ENV=${rails_env}"
|
||||
sidekiq_stop_command_args="exec rake sidekiq:stop RAILS_ENV=${rails_env}"
|
||||
|
||||
if [ ${rails_env} = development ]; then
|
||||
sidekiq_command_args+=" VVERBOSE=1"
|
||||
fi
|
||||
|
||||
depend() {
|
||||
provide gitlab
|
||||
need redis
|
||||
use net
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting GitLab @SLOT@ Unicorn servers"
|
||||
|
||||
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${server_pidfile}")"
|
||||
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${sidekiq_pidfile}")"
|
||||
|
||||
start-stop-daemon --start \
|
||||
--chdir "${gitlab_home}" \
|
||||
--user="${gitlab_user}:${gitlab_group}" \
|
||||
--pidfile="${server_pidfile}" \
|
||||
--exec ${server_command} -- ${server_command_args}
|
||||
eend $?
|
||||
|
||||
ebegin "Starting GitLab @SLOT@ Sidekiq"
|
||||
cd "${gitlab_home}"
|
||||
sudo -u git -H ${sidekiq_command} ${sidekiq_start_command_args}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping GitLab @SLOT@ Sidekiq"
|
||||
cd "${gitlab_home}"
|
||||
sudo -u git -H ${sidekiq_command} ${sidekiq_stop_command_args}
|
||||
eend $?
|
||||
|
||||
ebegin "Stopping GitLab @SLOT@ Unicorn servers"
|
||||
start-stop-daemon --stop \
|
||||
--chdir "${gitlab_home}" \
|
||||
--user="${gitlab_user}:${gitlab_group}" \
|
||||
--pidfile="${server_pidfile}"
|
||||
eend $?
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
@LOG_DIR@/*.log {
|
||||
missingok
|
||||
delaycompress
|
||||
compress
|
||||
copytruncate
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- lib/tasks/gitlab/check.rake.orig 2013-11-16 21:51:59.570000000 +0100
|
||||
+++ lib/tasks/gitlab/check.rake 2013-11-16 21:52:40.900000000 +0100
|
||||
@@ -20,8 +20,6 @@
|
||||
check_gitlab_config_not_outdated
|
||||
check_log_writable
|
||||
check_tmp_writable
|
||||
- check_init_script_exists
|
||||
- check_init_script_up_to_date
|
||||
check_projects_have_namespace
|
||||
check_satellites_exist
|
||||
check_redis_version
|
||||
@@ -0,0 +1,64 @@
|
||||
#!/sbin/runscript
|
||||
|
||||
name="GitLab"
|
||||
description="GitLab 6.9 on Unicorns"
|
||||
|
||||
: ${gitlab_user:=git}
|
||||
: ${gitlab_group:=git}
|
||||
: ${gitlab_home:="/opt/gitlabhq-6.9"}
|
||||
|
||||
: ${server_pidfile:="/opt/gitlabhq-6.9/tmp/pids/unicorn.pid"}
|
||||
: ${sidekiq_pidfile:="/opt/gitlabhq-6.9/tmp/pids/sidekiq.pid"}
|
||||
|
||||
: ${sidekiq_log:="/var/log/gitlabhq-6.9/sidekiq.log"}
|
||||
|
||||
: ${rails_env:=production}
|
||||
|
||||
server_command="/usr/bin/bundle"
|
||||
server_command_args="exec unicorn_rails -c ${gitlab_home}/config/unicorn.rb -E ${rails_env} -D"
|
||||
sidekiq_command="/usr/bin/bundle"
|
||||
sidekiq_start_command_args="exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e ${rails_env} -P ${sidekiq_pidfile} -d -L ${sidekiq_log} >> ${sidekiq_log}"
|
||||
sidekiq_stop_command_args="exec sidekiqctl stop ${sidekiq_pidfile} >> ${sidekiq_log}"
|
||||
|
||||
if [ ${rails_env} = development ]; then
|
||||
sidekiq_command_args+=" VVERBOSE=1"
|
||||
fi
|
||||
|
||||
depend() {
|
||||
provide gitlab
|
||||
need redis
|
||||
use net
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting GitLab 6.9 Unicorn servers"
|
||||
|
||||
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${server_pidfile}")"
|
||||
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${sidekiq_pidfile}")"
|
||||
|
||||
start-stop-daemon --start \
|
||||
--chdir "${gitlab_home}" \
|
||||
--user="${gitlab_user}:${gitlab_group}" \
|
||||
--pidfile="${server_pidfile}" \
|
||||
--exec ${server_command} -- ${server_command_args}
|
||||
eend $?
|
||||
|
||||
ebegin "Starting GitLab 6.9 Sidekiq"
|
||||
cd "${gitlab_home}"
|
||||
sudo -u git -H ${sidekiq_command} ${sidekiq_start_command_args}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping GitLab 6.9 Sidekiq"
|
||||
cd "${gitlab_home}"
|
||||
sudo -u git -H ${sidekiq_command} ${sidekiq_stop_command_args}
|
||||
eend $?
|
||||
|
||||
ebegin "Stopping GitLab 6.9 Unicorn servers"
|
||||
start-stop-daemon --stop \
|
||||
--chdir "${gitlab_home}" \
|
||||
--user="${gitlab_user}:${gitlab_group}" \
|
||||
--pidfile="${server_pidfile}"
|
||||
eend $?
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- lib/tasks/gitlab/check.rake.orig 2013-11-16 21:51:59.570000000 +0100
|
||||
+++ lib/tasks/gitlab/check.rake 2013-11-16 21:52:40.900000000 +0100
|
||||
@@ -20,8 +20,6 @@
|
||||
check_gitlab_config_not_outdated
|
||||
check_log_writable
|
||||
check_tmp_writable
|
||||
- check_init_script_exists
|
||||
- check_init_script_up_to_date
|
||||
check_projects_have_namespace
|
||||
check_satellites_exist
|
||||
check_redis_version
|
||||
@@ -0,0 +1,64 @@
|
||||
#!/sbin/runscript
|
||||
|
||||
name="GitLab"
|
||||
description="GitLab 7.0 on Unicorns"
|
||||
|
||||
: ${gitlab_user:=git}
|
||||
: ${gitlab_group:=git}
|
||||
: ${gitlab_home:="/opt/gitlabhq-7.0"}
|
||||
|
||||
: ${server_pidfile:="/opt/gitlabhq-7.0/tmp/pids/unicorn.pid"}
|
||||
: ${sidekiq_pidfile:="/opt/gitlabhq-7.0/tmp/pids/sidekiq.pid"}
|
||||
|
||||
: ${sidekiq_log:="/var/log/gitlabhq-7.0/sidekiq.log"}
|
||||
|
||||
: ${rails_env:=production}
|
||||
|
||||
server_command="/usr/bin/bundle"
|
||||
server_command_args="exec unicorn_rails -c ${gitlab_home}/config/unicorn.rb -E ${rails_env} -D"
|
||||
sidekiq_command="/usr/bin/bundle"
|
||||
sidekiq_start_command_args="exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e ${rails_env} -P ${sidekiq_pidfile} -d -L ${sidekiq_log} >> ${sidekiq_log}"
|
||||
sidekiq_stop_command_args="exec sidekiqctl stop ${sidekiq_pidfile} >> ${sidekiq_log}"
|
||||
|
||||
if [ ${rails_env} = development ]; then
|
||||
sidekiq_command_args+=" VVERBOSE=1"
|
||||
fi
|
||||
|
||||
depend() {
|
||||
provide gitlab
|
||||
need redis
|
||||
use net
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting GitLab 7.0 Unicorn servers"
|
||||
|
||||
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${server_pidfile}")"
|
||||
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${sidekiq_pidfile}")"
|
||||
|
||||
start-stop-daemon --start \
|
||||
--chdir "${gitlab_home}" \
|
||||
--user="${gitlab_user}:${gitlab_group}" \
|
||||
--pidfile="${server_pidfile}" \
|
||||
--exec ${server_command} -- ${server_command_args}
|
||||
eend $?
|
||||
|
||||
ebegin "Starting GitLab 7.0 Sidekiq"
|
||||
cd "${gitlab_home}"
|
||||
sudo -u git -H ${sidekiq_command} ${sidekiq_start_command_args}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping GitLab 7.0 Sidekiq"
|
||||
cd "${gitlab_home}"
|
||||
sudo -u git -H ${sidekiq_command} ${sidekiq_stop_command_args}
|
||||
eend $?
|
||||
|
||||
ebegin "Stopping GitLab 7.0 Unicorn servers"
|
||||
start-stop-daemon --stop \
|
||||
--chdir "${gitlab_home}" \
|
||||
--user="${gitlab_user}:${gitlab_group}" \
|
||||
--pidfile="${server_pidfile}"
|
||||
eend $?
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- lib/tasks/gitlab/check.rake.orig 2013-11-16 21:51:59.570000000 +0100
|
||||
+++ lib/tasks/gitlab/check.rake 2013-11-16 21:52:40.900000000 +0100
|
||||
@@ -20,8 +20,6 @@
|
||||
check_gitlab_config_not_outdated
|
||||
check_log_writable
|
||||
check_tmp_writable
|
||||
- check_init_script_exists
|
||||
- check_init_script_up_to_date
|
||||
check_projects_have_namespace
|
||||
check_satellites_exist
|
||||
check_redis_version
|
||||
@@ -0,0 +1,64 @@
|
||||
#!/sbin/runscript
|
||||
|
||||
name="GitLab"
|
||||
description="GitLab 7.4 on Unicorns"
|
||||
|
||||
: ${gitlab_user:=git}
|
||||
: ${gitlab_group:=git}
|
||||
: ${gitlab_home:="/opt/gitlabhq-7.4"}
|
||||
|
||||
: ${server_pidfile:="/opt/gitlabhq-7.4/tmp/pids/unicorn.pid"}
|
||||
: ${sidekiq_pidfile:="/opt/gitlabhq-7.4/tmp/pids/sidekiq.pid"}
|
||||
|
||||
: ${sidekiq_log:="/var/log/gitlabhq-7.4/sidekiq.log"}
|
||||
|
||||
: ${rails_env:=production}
|
||||
|
||||
server_command="/usr/bin/bundle"
|
||||
server_command_args="exec unicorn_rails -c ${gitlab_home}/config/unicorn.rb -E ${rails_env} -D"
|
||||
sidekiq_command="/usr/bin/bundle"
|
||||
sidekiq_start_command_args="exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e ${rails_env} -P ${sidekiq_pidfile} -d -L ${sidekiq_log} >> ${sidekiq_log}"
|
||||
sidekiq_stop_command_args="exec sidekiqctl stop ${sidekiq_pidfile} >> ${sidekiq_log}"
|
||||
|
||||
if [ ${rails_env} = development ]; then
|
||||
sidekiq_command_args+=" VVERBOSE=1"
|
||||
fi
|
||||
|
||||
depend() {
|
||||
provide gitlab
|
||||
need redis
|
||||
use net
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting GitLab 7.4 Unicorn servers"
|
||||
|
||||
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${server_pidfile}")"
|
||||
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${sidekiq_pidfile}")"
|
||||
|
||||
start-stop-daemon --start \
|
||||
--chdir "${gitlab_home}" \
|
||||
--user="${gitlab_user}:${gitlab_group}" \
|
||||
--pidfile="${server_pidfile}" \
|
||||
--exec ${server_command} -- ${server_command_args}
|
||||
eend $?
|
||||
|
||||
ebegin "Starting GitLab 7.4 Sidekiq"
|
||||
cd "${gitlab_home}"
|
||||
sudo -u git -H ${sidekiq_command} ${sidekiq_start_command_args}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping GitLab 7.4 Sidekiq"
|
||||
cd "${gitlab_home}"
|
||||
sudo -u git -H ${sidekiq_command} ${sidekiq_stop_command_args}
|
||||
eend $?
|
||||
|
||||
ebegin "Stopping GitLab 7.4 Unicorn servers"
|
||||
start-stop-daemon --stop \
|
||||
--chdir "${gitlab_home}" \
|
||||
--user="${gitlab_user}:${gitlab_group}" \
|
||||
--pidfile="${server_pidfile}"
|
||||
eend $?
|
||||
}
|
||||
Reference in New Issue
Block a user