svn commit: r412280 - in head/www: . gitlab gitlab/files
Kurt Jaeger
pi at FreeBSD.org
Thu Mar 31 18:01:44 UTC 2016
Author: pi
Date: Thu Mar 31 18:01:42 2016
New Revision: 412280
URL: https://svnweb.freebsd.org/changeset/ports/412280
Log:
New port: www/gitlab
GitLab is version control for your server.
WWW: https://gitlab.com/
Submitted by: Torsten Zuehlsdorff <ports at toco-domains.de>
Reviewed by: Yonas Yanfa <yonas at fizk.net>, girgen, pgollucci, mmoll, miwi, xmj, swills, amdmi3, sunpoet
Added:
head/www/gitlab/
head/www/gitlab/Makefile (contents, props changed)
head/www/gitlab/distinfo (contents, props changed)
head/www/gitlab/files/
head/www/gitlab/files/gitlab.in (contents, props changed)
head/www/gitlab/files/patch-Gemfile (contents, props changed)
head/www/gitlab/files/patch-config_database.yml.postgresql (contents, props changed)
head/www/gitlab/files/patch-config_gitlab.yml.example (contents, props changed)
head/www/gitlab/files/patch-config_initializers_1__settings.rb (contents, props changed)
head/www/gitlab/files/patch-config_unicorn.rb.example (contents, props changed)
head/www/gitlab/files/patch-lib_support_nginx_gitlab (contents, props changed)
head/www/gitlab/files/patch-lib_support_nginx_gitlab-ssl (contents, props changed)
head/www/gitlab/pkg-descr (contents, props changed)
head/www/gitlab/pkg-message (contents, props changed)
head/www/gitlab/pkg-plist (contents, props changed)
Modified:
head/www/Makefile
Modified: head/www/Makefile
==============================================================================
--- head/www/Makefile Thu Mar 31 17:42:25 2016 (r412279)
+++ head/www/Makefile Thu Mar 31 18:01:42 2016 (r412280)
@@ -225,6 +225,7 @@
SUBDIR += get_flash_videos
SUBDIR += getleft
SUBDIR += gist
+ SUBDIR += gitlab
SUBDIR += gitlab-workhorse
SUBDIR += glassfish
SUBDIR += glpi
Added: head/www/gitlab/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/gitlab/Makefile Thu Mar 31 18:01:42 2016 (r412280)
@@ -0,0 +1,178 @@
+# Created by: Torsten Zuehlsdorff <ports at toco-domains.de>
+# $FreeBSD$
+
+PORTNAME= gitlab
+PORTVERSION= 8.5.5
+DISTVERSIONPREFIX= v
+CATEGORIES= www devel
+
+MAINTAINER= ports at toco-domains.de
+COMMENT= Web GUI for managing git repositories
+
+LICENSE= MIT
+
+BUILD_DEPENDS= ruby>=2.1.8:${PORTSDIR}/lang/ruby21 \
+ gem:${PORTSDIR}/devel/ruby-gems
+RUN_DEPENDS= git>=2.4.3:${PORTSDIR}/devel/git \
+ gitlab-shell>=2.6.10:${PORTSDIR}/devel/gitlab-shell\
+ gitlab-workhorse>=0.6.4:${PORTSDIR}/www/gitlab-workhorse \
+ redis>=2.8.23:${PORTSDIR}/databases/redis \
+ rubygem-rails4>=4.2.5.2:${PORTSDIR}/www/rubygem-rails4 \
+ rubygem-rails-deprecated_sanitizer>=1.0.3:${PORTSDIR}/devel/rubygem-rails-deprecated_sanitizer \
+ rubygem-responders>=2.0:${PORTSDIR}/www/rubygem-responders \
+ rubygem-sprockets>=2.12.3:${PORTSDIR}/devel/rubygem-sprockets \
+ rubygem-default_value_for>=3.0.1:${PORTSDIR}/devel/rubygem-default_value_for \
+ rubygem-pg>=0.18.2:${PORTSDIR}/databases/rubygem-pg \
+ rubygem-devise-rails4>=3.5.4:${PORTSDIR}/devel/rubygem-devise-rails4 \
+ rubygem-devise-async-rails4>=0.9.0:${PORTSDIR}/devel/rubygem-devise-async-rails4 \
+ rubygem-doorkeeper>=2.2.0:${PORTSDIR}/security/rubygem-doorkeeper \
+ rubygem-omniauth>=1.3.1:${PORTSDIR}/security/rubygem-omniauth \
+ rubygem-omniauth-azure-oauth2>=0.0.6:${PORTSDIR}/net/rubygem-omniauth-azure-oauth2 \
+ rubygem-omniauth-bitbucket>=0.0.2:${PORTSDIR}/security/rubygem-omniauth-bitbucket \
+ rubygem-omniauth-cas3>=1.1.2:${PORTSDIR}/security/rubygem-omniauth-cas3 \
+ rubygem-omniauth-facebook>=3.0.0:${PORTSDIR}/net/rubygem-omniauth-facebook \
+ rubygem-omniauth-github>=1.1.1:${PORTSDIR}/net/rubygem-omniauth-github \
+ rubygem-omniauth-gitlab>=1.0.0:${PORTSDIR}/security/rubygem-omniauth-gitlab \
+ rubygem-omniauth-google-oauth2>=0.2.0:${PORTSDIR}/net/rubygem-omniauth-google-oauth2 \
+ rubygem-omniauth-saml>=1.4.2:${PORTSDIR}/security/rubygem-omniauth-saml \
+ rubygem-omniauth-shibboleth>=1.2.0:${PORTSDIR}/security/rubygem-omniauth-shibboleth \
+ rubygem-omniauth-twitter>=1.2.0:${PORTSDIR}/net/rubygem-omniauth-twitter \
+ rubygem-omniauth_crowd>=2.2.0:${PORTSDIR}/devel/rubygem-omniauth_crowd \
+ rubygem-rack-oauth2>=1.2.1:${PORTSDIR}/security/rubygem-rack-oauth2 \
+ rubygem-recaptcha>=0:${PORTSDIR}/devel/rubygem-recaptcha \
+ rubygem-akismet>=2.0:${PORTSDIR}/devel/rubygem-akismet \
+ rubygem-devise-two-factor>=2.0.0:${PORTSDIR}/security/rubygem-devise-two-factor \
+ rubygem-rqrcode-rails3>=0.1.7:${PORTSDIR}/www/rubygem-rqrcode-rails3 \
+ rubygem-attr_encrypted>=1.3.4:${PORTSDIR}/security/rubygem-attr_encrypted \
+ rubygem-browser>=1.0.0:${PORTSDIR}/www/rubygem-browser \
+ rubygem-gitlab_git>=8.2:${PORTSDIR}/devel/rubygem-gitlab_git \
+ rubygem-gitlab_omniauth-ldap>=1.2.1:${PORTSDIR}/net/rubygem-gitlab_omniauth-ldap \
+ rubygem-gollum-lib>=4.1.0:${PORTSDIR}/www/rubygem-gollum-lib \
+ rubygem-github-linguist>=4.7.0:${PORTSDIR}/textproc/rubygem-github-linguist \
+ rubygem-grape>=0.13.0:${PORTSDIR}/devel/rubygem-grape \
+ rubygem-grape-entity>=0.4.2:${PORTSDIR}/devel/rubygem-grape-entity \
+ rubygem-rack-cors>=0.4.0:${PORTSDIR}/www/rubygem-rack-cors \
+ rubygem-kaminari-rails4>=0.16.3:${PORTSDIR}/www/rubygem-kaminari-rails4 \
+ rubygem-haml-rails-rails4>=0.9.0:${PORTSDIR}/www/rubygem-haml-rails-rails4 \
+ rubygem-carrierwave>=0.9.0:${PORTSDIR}/www/rubygem-carrierwave \
+ rubygem-dropzonejs-rails>=0.7.1:${PORTSDIR}/www/rubygem-dropzonejs-rails \
+ rubygem-fog>=1.36:${PORTSDIR}/devel/rubygem-fog \
+ rubygem-unf>=0.1.4:${PORTSDIR}/textproc/rubygem-unf \
+ rubygem-six>=0.2.0:${PORTSDIR}/security/rubygem-six \
+ rubygem-seed-fu>=2.3.5:${PORTSDIR}/databases/rubygem-seed-fu \
+ rubygem-html-pipeline1>=1.11.0:${PORTSDIR}/textproc/rubygem-html-pipeline1 \
+ rubygem-task_list>=1.0.2:${PORTSDIR}/www/rubygem-task_list \
+ rubygem-github-markup>=1.3.1:${PORTSDIR}/textproc/rubygem-github-markup \
+ rubygem-redcarpet>=3.3.3:${PORTSDIR}/textproc/rubygem-redcarpet \
+ rubygem-redcloth>=4.2.9:${PORTSDIR}/www/rubygem-redcloth \
+ rubygem-rdoc>=3.6:${PORTSDIR}/devel/rubygem-rdoc \
+ rubygem-org-ruby>=0.9.12:${PORTSDIR}/textproc/rubygem-org-ruby \
+ rubygem-creole>=0.5.0:${PORTSDIR}/textproc/rubygem-creole \
+ rubygem-wikicloth>=0.8.1:${PORTSDIR}/textproc/rubygem-wikicloth \
+ rubygem-asciidoctor>=1.5.2:${PORTSDIR}/textproc/rubygem-asciidoctor \
+ rubygem-rouge>=1.10.1:${PORTSDIR}/textproc/rubygem-rouge \
+ rubygem-nokogiri>=1.6.7.2:${PORTSDIR}/textproc/rubygem-nokogiri \
+ rubygem-diffy>=3.0.3:${PORTSDIR}/textproc/rubygem-diffy \
+ rubygem-unicorn>=4.8.2:${PORTSDIR}/www/rubygem-unicorn \
+ rubygem-unicorn-worker-killer>=0.4.2:${PORTSDIR}/www/rubygem-unicorn-worker-killer \
+ rubygem-state_machines-activerecord>=0.3.0:${PORTSDIR}/databases/rubygem-state_machines-activerecord \
+ rubygem-after_commit_queue>=0:${PORTSDIR}/databases/rubygem-after_commit_queue \
+ rubygem-acts-as-taggable-on3>=3.4.0:${PORTSDIR}/www/rubygem-acts-as-taggable-on3 \
+ rubygem-sinatra>=1.4.4:${PORTSDIR}/www/rubygem-sinatra \
+ rubygem-sidekiq>=4.0:${PORTSDIR}/devel/rubygem-sidekiq \
+ rubygem-sidekiq-cron>=0.4.0:${PORTSDIR}/devel/rubygem-sidekiq-cron \
+ rubygem-redis-namespace>=0:${PORTSDIR}/databases/rubygem-redis-namespace \
+ rubygem-httparty>=0.13.3:${PORTSDIR}/www/rubygem-httparty \
+ rubygem-colorize>=0.7.0:${PORTSDIR}/devel/rubygem-colorize \
+ rubygem-settingslogic>=2.0.9:${PORTSDIR}/devel/rubygem-settingslogic \
+ rubygem-version_sorter>=2.0.0:${PORTSDIR}/textproc/rubygem-version_sorter \
+ rubygem-redis-rails>=4.0.0:${PORTSDIR}/www/rubygem-redis-rails \
+ rubygem-tinder>=1.10.0:${PORTSDIR}/net-im/rubygem-tinder \
+ rubygem-hipchat>=1.5.0:${PORTSDIR}/net-im/rubygem-hipchat \
+ rubygem-gitlab-flowdock-git-hook>=1.0.1:${PORTSDIR}/www/rubygem-gitlab-flowdock-git-hook \
+ rubygem-gemnasium-gitlab-service>=0.2:${PORTSDIR}/devel/rubygem-gemnasium-gitlab-service \
+ rubygem-slack-notifier>=1.2.0:${PORTSDIR}/devel/rubygem-slack-notifier \
+ rubygem-asana>=0.4.0:${PORTSDIR}/www/rubygem-asana \
+ rubygem-ruby-fogbugz>=0.2.1:${PORTSDIR}/devel/rubygem-ruby-fogbugz \
+ rubygem-d3_rails-rails4>=3.5.0:${PORTSDIR}/www/rubygem-d3_rails-rails4 \
+ rubygem-cal-heatmap-rails-rails4>=3.5.0:${PORTSDIR}/www/rubygem-cal-heatmap-rails-rails4 \
+ rubygem-underscore-rails>=1.8.0:${PORTSDIR}/www/rubygem-underscore-rails \
+ rubygem-sanitize>=2.0:${PORTSDIR}/textproc/rubygem-sanitize \
+ rubygem-babosa>=1.0.2:${PORTSDIR}/textproc/rubygem-babosa \
+ rubygem-loofah>=2.0.3:${PORTSDIR}/textproc/rubygem-loofah \
+ rubygem-rack-attack>=4.3.1:${PORTSDIR}/www/rubygem-rack-attack \
+ rubygem-ace-rails-ap>=2.0.1:${PORTSDIR}/www/rubygem-ace-rails-ap \
+ rubygem-mousetrap-rails>=1.4.6:${PORTSDIR}/www/rubygem-mousetrap-rails \
+ rubygem-charlock_holmes>=0.7.3:${PORTSDIR}/textproc/rubygem-charlock_holmes \
+ rubygem-sass-rails5>=5.0.0:${PORTSDIR}/textproc/rubygem-sass-rails5 \
+ rubygem-coffee-rails4>=4.1.0:${PORTSDIR}/devel/rubygem-coffee-rails4 \
+ rubygem-uglifier>=2.7.2:${PORTSDIR}/www/rubygem-uglifier \
+ rubygem-turbolinks>=2.5.0:${PORTSDIR}/www/rubygem-turbolinks \
+ rubygem-jquery-turbolinks>=2.1.0:${PORTSDIR}/www/rubygem-jquery-turbolinks \
+ rubygem-addressable>=2.3.8:${PORTSDIR}/www/rubygem-addressable \
+ rubygem-bootstrap-sass>=3.3.0:${PORTSDIR}/www/rubygem-bootstrap-sass \
+ rubygem-font-awesome-rails-rails4>=4.2:${PORTSDIR}/devel/rubygem-font-awesome-rails-rails4 \
+ rubygem-gitlab_emoji>=0.3:${PORTSDIR}/graphics/rubygem-gitlab_emoji \
+ rubygem-gon>=6.0.1:${PORTSDIR}/www/rubygem-gon \
+ rubygem-jquery-atwho-rails-rails4>=1.3.2:${PORTSDIR}/www/rubygem-jquery-atwho-rails-rails4 \
+ rubygem-jquery-rails4>=4.0.0:${PORTSDIR}/www/rubygem-jquery-rails4 \
+ rubygem-jquery-scrollto-rails>=1.4.3:${PORTSDIR}/www/rubygem-jquery-scrollto-rails \
+ rubygem-jquery-ui-rails-rails4>=5.0.0:${PORTSDIR}/www/rubygem-jquery-ui-rails-rails4 \
+ rubygem-nprogress-rails>=0.1.6.7:${PORTSDIR}/devel/rubygem-nprogress-rails \
+ rubygem-raphael-rails>=2.1.2:${PORTSDIR}/www/rubygem-raphael-rails \
+ rubygem-request_store>=1.2.0:${PORTSDIR}/devel/rubygem-request_store \
+ rubygem-select2-rails>=3.5.9:${PORTSDIR}/www/rubygem-select2-rails \
+ rubygem-virtus>=1.0.1:${PORTSDIR}/devel/rubygem-virtus \
+ rubygem-net-ssh>=3.0.1:${PORTSDIR}/security/rubygem-net-ssh \
+ rubygem-sentry-raven>=0.15.4:${PORTSDIR}/devel/rubygem-sentry-raven \
+ rubygem-gitlab_meta>=7.0:${PORTSDIR}/devel/rubygem-gitlab_meta \
+ rubygem-newrelic_rpm>=3.9.4.245:${PORTSDIR}/devel/rubygem-newrelic_rpm \
+ rubygem-newrelic-grape>=0:${PORTSDIR}/devel/rubygem-newrelic-grape \
+ rubygem-newrelic_rpm>=3.14:${PORTSDIR}/devel/rubygem-newrelic_rpm \
+ rubygem-octokit>=3.8.0:${PORTSDIR}/net/rubygem-octokit \
+ rubygem-mail_room>=0.6.1:${PORTSDIR}/mail/rubygem-mail_room \
+ rubygem-email_reply_parser>=0.5.8:${PORTSDIR}/mail/rubygem-email_reply_parser \
+ rubygem-activerecord-deprecated_finders>=1.0.3:${PORTSDIR}/devel/rubygem-activerecord-deprecated_finders \
+ rubygem-activerecord-session_store>=0.1.0:${PORTSDIR}/databases/rubygem-activerecord-session_store \
+ rubygem-nested_form>=0.3.2:${PORTSDIR}/www/rubygem-nested_form \
+ rubygem-oauth2>=1.0.0:${PORTSDIR}/net/rubygem-oauth2 \
+ rubygem-paranoia>=2.0:${PORTSDIR}/databases/rubygem-paranoia \
+ rubygem-rinku>=1.7.3:${PORTSDIR}/www/rubygem-rinku
+
+USE= pgsql=yes
+WANT= pgsql=9.1+
+
+USE_RC_SUBR= gitlab
+USE_GITHUB= yes
+GH_ACCOUNT= gitlabhq
+GH_PROJECT= gitlabhq
+
+USERS= git
+GROUPS= git
+
+.include <bsd.port.options.mk>
+
+NO_ARCH= yes
+NO_BUILD= yes
+
+do-install:
+ ${FIND} ${WRKSRC} -name '*.orig' -delete
+ ${FIND} ${WRKSRC} -name '*.bak' -delete
+ ${FIND} ${WRKSRC} -name '*.gitkeep' -delete
+ ${FIND} ${WRKSRC} -name "Gemfile.lock" -delete
+ ${MV} ${WRKSRC}/config/gitlab.yml.example ${WRKSRC}/config/gitlab.yml.sample
+ ${MV} ${WRKSRC}/config/unicorn.rb.example ${WRKSRC}/config/unicorn.rb.sample
+ ${MV} ${WRKSRC}/config/resque.yml.example ${WRKSRC}/config/resque.yml.sample
+ ${MV} ${WRKSRC}/config/secrets.yml.example ${WRKSRC}/config/secrets.yml.sample
+ ${MV} ${WRKSRC}/config/initializers/rack_attack.rb.example ${WRKSRC}/config/initializers/rack_attack.rb.sample
+ ${CP} ${WRKSRC}/config/database.yml.postgresql ${WRKSRC}/config/database.yml.sample
+
+post-install:
+ ${MKDIR} ${STAGEDIR}/home/git/repositories
+ ${MKDIR} ${STAGEDIR}/home/git/gitlab-satellites
+ ${MKDIR} ${STAGEDIR}${PREFIX}/www/${PORTNAME}/public/assets
+ ${MKDIR} ${STAGEDIR}${PREFIX}/www/${PORTNAME}/tmp/cache
+ ${MKDIR} ${STAGEDIR}${PREFIX}/www/${PORTNAME}/tmp/sessions
+ (cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/www/${PORTNAME})
+
+.include <bsd.port.mk>
Added: head/www/gitlab/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/gitlab/distinfo Thu Mar 31 18:01:42 2016 (r412280)
@@ -0,0 +1,2 @@
+SHA256 (gitlabhq-gitlabhq-v8.5.5_GH0.tar.gz) = 859ec6142095d459b1587616df6c83063e87a8c7417ab8606100588525d03e2d
+SIZE (gitlabhq-gitlabhq-v8.5.5_GH0.tar.gz) = 15179973
Added: head/www/gitlab/files/gitlab.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/gitlab/files/gitlab.in Thu Mar 31 18:01:42 2016 (r412280)
@@ -0,0 +1,414 @@
+#! /bin/sh
+
+# $FreeBSD$
+
+### BEGIN INIT INFO
+# Provides: gitlab
+# Required-Start: $local_fs $remote_fs $network $syslog redis-server
+# Required-Stop: $local_fs $remote_fs $network $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: GitLab git repository management
+# Description: GitLab git repository management
+# chkconfig: - 85 14
+### END INIT INFO
+
+# Maintainer: Torsten Zuehlsdorff <ports at toco-domains.de>
+# Based on work of: @charlienewey, rovanion.luckey at gmail.com, @randx
+
+# PROVIDE: gitlab
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf to enable GitLab:
+#
+# gitlab_enable="YES"
+
+PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
+
+. /etc/rc.subr
+
+name=gitlab
+rcvar=gitlab_enable
+extra_commands=status
+
+status_cmd="print_status"
+start_cmd="start_gitlab"
+stop_cmd="stop_gitlab"
+restart_cmd="restart_gitlab"
+
+gitlab_enable=${gitlab_enable:-"NO"}
+
+load_rc_config $name
+
+### Environment variables
+RAILS_ENV="production"
+
+# Script variable names should be lower-case not to conflict with
+# internal /bin/sh variables such as PATH, EDITOR or SHELL.
+app_user="git"
+app_root="/usr/local/www/gitlab"
+pid_path="$app_root/tmp/pids"
+socket_path="$app_root/tmp/sockets"
+rails_socket="$socket_path/gitlab.socket"
+web_server_pid_path="$pid_path/unicorn.pid"
+sidekiq_pid_path="$pid_path/sidekiq.pid"
+mail_room_enabled=false
+mail_room_pid_path="$pid_path/mail_room.pid"
+gitlab_workhorse_dir=$(cd $app_root/../gitlab-workhorse && pwd)
+gitlab_workhorse_pid_path="$pid_path/gitlab-workhorse.pid"
+gitlab_workhorse_options="-listenUmask 0 -listenNetwork unix -listenAddr $socket_path/gitlab-workhorse.socket -authBackend http://127.0.0.1:8080 -authSocket $rails_socket -documentRoot $app_root/public"
+gitlab_workhorse_log="$app_root/log/gitlab-workhorse.log"
+shell_path="/bin/bash"
+
+# Read configuration variable file if it is present
+test -f /etc/default/gitlab && . /etc/default/gitlab
+
+# Switch to the app_user if it is not he/she who is running the script.
+if [ "$USER" != "$app_user" ]; then
+ eval su - "$app_user" -c $(echo \")$0 "$@"$(echo \"); exit;
+fi
+
+# Switch to the gitlab path, exit on failure.
+if ! cd "$app_root" ; then
+ echo "Failed to cd into $app_root, exiting!"; exit 1
+fi
+
+
+### Init Script functions
+
+## Gets the pids from the files
+check_pids(){
+ if ! mkdir -p "$pid_path"; then
+ echo "Could not create the path $pid_path needed to store the pids."
+ exit 1
+ fi
+ # If there exists a file which should hold the value of the Unicorn pid: read it.
+ if [ -f "$web_server_pid_path" ]; then
+ wpid=$(cat "$web_server_pid_path")
+ else
+ wpid=0
+ fi
+ if [ -f "$sidekiq_pid_path" ]; then
+ spid=$(cat "$sidekiq_pid_path")
+ else
+ spid=0
+ fi
+ if [ -f "$gitlab_workhorse_pid_path" ]; then
+ hpid=$(cat "$gitlab_workhorse_pid_path")
+ else
+ hpid=0
+ fi
+ if [ "$mail_room_enabled" = true ]; then
+ if [ -f "$mail_room_pid_path" ]; then
+ mpid=$(cat "$mail_room_pid_path")
+ else
+ mpid=0
+ fi
+ fi
+}
+
+## Called when we have started the two processes and are waiting for their pid files.
+wait_for_pids(){
+ # We are sleeping a bit here mostly because sidekiq is slow at writing its pid
+ i=0;
+ while [ ! -f $web_server_pid_path ] || [ ! -f $sidekiq_pid_path ] || [ ! -f $gitlab_workhorse_pid_path ] || { [ "$mail_room_enabled" = true ] && [ ! -f $mail_room_pid_path ]; }; do
+ sleep 0.1;
+ i=$((i+1))
+ if [ $((i%10)) = 0 ]; then
+ echo -n "."
+ elif [ $((i)) = 301 ]; then
+ echo "Waited 30s for the processes to write their pids, something probably went wrong."
+ exit 1;
+ fi
+ done
+ echo
+}
+
+# We use the pids in so many parts of the script it makes sense to always check them.
+# Only after start() is run should the pids change. Sidekiq sets its own pid.
+check_pids
+
+
+## Checks whether the different parts of the service are already running or not.
+check_status(){
+ check_pids
+ # If the web server is running kill -0 $wpid returns true, or rather 0.
+ # Checks of *_status should only check for == 0 or != 0, never anything else.
+ if [ $wpid -ne 0 ]; then
+ kill -0 "$wpid" 2>/dev/null
+ web_status="$?"
+ else
+ web_status="-1"
+ fi
+ if [ $spid -ne 0 ]; then
+ kill -0 "$spid" 2>/dev/null
+ sidekiq_status="$?"
+ else
+ sidekiq_status="-1"
+ fi
+ if [ $hpid -ne 0 ]; then
+ kill -0 "$hpid" 2>/dev/null
+ gitlab_workhorse_status="$?"
+ else
+ gitlab_workhorse_status="-1"
+ fi
+ if [ "$mail_room_enabled" = true ]; then
+ if [ $mpid -ne 0 ]; then
+ kill -0 "$mpid" 2>/dev/null
+ mail_room_status="$?"
+ else
+ mail_room_status="-1"
+ fi
+ fi
+ if [ $web_status = 0 ] && [ $sidekiq_status = 0 ] && [ $gitlab_workhorse_status = 0 ] && { [ "$mail_room_enabled" != true ] || [ $mail_room_status = 0 ]; }; then
+ gitlab_status=0
+ else
+ # http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
+ # code 3 means 'program is not running'
+ gitlab_status=3
+ fi
+}
+
+## Check for stale pids and remove them if necessary.
+check_stale_pids(){
+ check_status
+ # If there is a pid it is something else than 0, the service is running if
+ # *_status is == 0.
+ if [ "$wpid" != "0" ] && [ "$web_status" != "0" ]; then
+ echo "Removing stale Unicorn web server pid. This is most likely caused by the web server crashing the last time it ran."
+ if ! rm "$web_server_pid_path"; then
+ echo "Unable to remove stale pid, exiting."
+ exit 1
+ fi
+ fi
+ if [ "$spid" != "0" ] && [ "$sidekiq_status" != "0" ]; then
+ echo "Removing stale Sidekiq job dispatcher pid. This is most likely caused by Sidekiq crashing the last time it ran."
+ if ! rm "$sidekiq_pid_path"; then
+ echo "Unable to remove stale pid, exiting"
+ exit 1
+ fi
+ fi
+ if [ "$hpid" != "0" ] && [ "$gitlab_workhorse_status" != "0" ]; then
+ echo "Removing stale gitlab-workhorse pid. This is most likely caused by gitlab-workhorse crashing the last time it ran."
+ if ! rm "$gitlab_workhorse_pid_path"; then
+ echo "Unable to remove stale pid, exiting"
+ exit 1
+ fi
+ fi
+ if [ "$mail_room_enabled" = true ] && [ "$mpid" != "0" ] && [ "$mail_room_status" != "0" ]; then
+ echo "Removing stale MailRoom job dispatcher pid. This is most likely caused by MailRoom crashing the last time it ran."
+ if ! rm "$mail_room_pid_path"; then
+ echo "Unable to remove stale pid, exiting"
+ exit 1
+ fi
+ fi
+}
+
+## If no parts of the service is running, bail out.
+exit_if_not_running(){
+ check_stale_pids
+ if [ "$web_status" != "0" ] && [ "$sidekiq_status" != "0" ] && [ "$gitlab_workhorse_status" != "0" ] && { [ "$mail_room_enabled" != true ] || [ "$mail_room_status" != "0" ]; }; then
+ echo "GitLab is not running."
+ exit
+ fi
+}
+
+## Starts Unicorn and Sidekiq if they're not running.
+start_gitlab() {
+ check_stale_pids
+
+ if [ "$web_status" != "0" ]; then
+ echo "Starting GitLab Unicorn"
+ fi
+ if [ "$sidekiq_status" != "0" ]; then
+ echo "Starting GitLab Sidekiq"
+ fi
+ if [ "$gitlab_workhorse_status" != "0" ]; then
+ echo "Starting gitlab-workhorse"
+ fi
+ if [ "$mail_room_enabled" = true ] && [ "$mail_room_status" != "0" ]; then
+ echo "Starting GitLab MailRoom"
+ fi
+
+ # Then check if the service is running. If it is: don't start again.
+ if [ "$web_status" = "0" ]; then
+ echo "The Unicorn web server already running with pid $wpid, not restarting."
+ else
+ # Remove old socket if it exists
+ rm -f "$socket_path"/gitlab.socket 2>/dev/null
+ # Start the web server
+ RAILS_ENV=$RAILS_ENV bin/web start
+ fi
+
+ # If sidekiq is already running, don't start it again.
+ if [ "$sidekiq_status" = "0" ]; then
+ echo "The Sidekiq job dispatcher is already running with pid $spid, not restarting"
+ else
+ RAILS_ENV=$RAILS_ENV bin/background_jobs start &
+ fi
+
+ if [ "$gitlab_workhorse_status" = "0" ]; then
+ echo "The gitlab-workhorse is already running with pid $spid, not restarting"
+ else
+ # No need to remove a socket, gitlab-workhorse does this itself.
+ # Because gitlab-workhorse has multiple executables we need to fix
+ # the PATH.
+ $app_root/bin/daemon_with_pidfile $gitlab_workhorse_pid_path \
+ /usr/bin/env PATH=$gitlab_workhorse_dir:$PATH \
+ gitlab-workhorse $gitlab_workhorse_options \
+ >> $gitlab_workhorse_log 2>&1 &
+ fi
+
+ if [ "$mail_room_enabled" = true ]; then
+ # If MailRoom is already running, don't start it again.
+ if [ "$mail_room_status" = "0" ]; then
+ echo "The MailRoom email processor is already running with pid $mpid, not restarting"
+ else
+ RAILS_ENV=$RAILS_ENV bin/mail_room start &
+ fi
+ fi
+
+ # Wait for the pids to be planted
+ wait_for_pids
+ # Finally check the status to tell wether or not GitLab is running
+ print_status
+}
+
+## Asks Unicorn, Sidekiq and MailRoom if they would be so kind as to stop, if not kills them.
+stop_gitlab() {
+ exit_if_not_running
+
+ if [ "$web_status" = "0" ]; then
+ echo "Shutting down GitLab Unicorn"
+ RAILS_ENV=$RAILS_ENV bin/web stop
+ fi
+ if [ "$sidekiq_status" = "0" ]; then
+ echo "Shutting down GitLab Sidekiq"
+ RAILS_ENV=$RAILS_ENV bin/background_jobs stop
+ fi
+ if [ "$gitlab_workhorse_status" = "0" ]; then
+ echo "Shutting down gitlab-workhorse"
+ kill -- $(cat $gitlab_workhorse_pid_path)
+ fi
+ if [ "$mail_room_enabled" = true ] && [ "$mail_room_status" = "0" ]; then
+ echo "Shutting down GitLab MailRoom"
+ RAILS_ENV=$RAILS_ENV bin/mail_room stop
+ fi
+
+ # If something needs to be stopped, lets wait for it to stop. Never use SIGKILL in a script.
+ while [ "$web_status" = "0" ] || [ "$sidekiq_status" = "0" ] || [ "$gitlab_workhorse_status" = "0" ] || { [ "$mail_room_enabled" = true ] && [ "$mail_room_status" = "0" ]; }; do
+ sleep 1
+ check_status
+ printf "."
+ if [ "$web_status" != "0" ] && [ "$sidekiq_status" != "0" ] && [ "$gitlab_workhorse_status" != "0" ] && { [ "$mail_room_enabled" != true ] || [ "$mail_room_status" != "0" ]; }; then
+ printf "\n"
+ break
+ fi
+ done
+
+ sleep 1
+ # Cleaning up unused pids
+ rm "$web_server_pid_path" 2>/dev/null
+ # rm "$sidekiq_pid_path" 2>/dev/null # Sidekiq seems to be cleaning up its own pid.
+ rm -f "$gitlab_workhorse_pid_path"
+ if [ "$mail_room_enabled" = true ]; then
+ rm "$mail_room_pid_path" 2>/dev/null
+ fi
+
+ print_status
+}
+
+## Prints the status of GitLab and its components.
+print_status() {
+ check_status
+ if [ "$web_status" != "0" ] && [ "$sidekiq_status" != "0" ] && [ "$gitlab_workhorse_status" != "0" ] && { [ "$mail_room_enabled" != true ] || [ "$mail_room_status" != "0" ]; }; then
+ echo "GitLab is not running."
+ return
+ fi
+ if [ "$web_status" = "0" ]; then
+ echo "The GitLab Unicorn web server with pid $wpid is running."
+ else
+ printf "The GitLab Unicorn web server is \033[31mnot running\033[0m.\n"
+ fi
+ if [ "$sidekiq_status" = "0" ]; then
+ echo "The GitLab Sidekiq job dispatcher with pid $spid is running."
+ else
+ printf "The GitLab Sidekiq job dispatcher is \033[31mnot running\033[0m.\n"
+ fi
+ if [ "$gitlab_workhorse_status" = "0" ]; then
+ echo "The gitlab-workhorse with pid $hpid is running."
+ else
+ printf "The gitlab-workhorse is \033[31mnot running\033[0m.\n"
+ fi
+ if [ "$mail_room_enabled" = true ]; then
+ if [ "$mail_room_status" = "0" ]; then
+ echo "The GitLab MailRoom email processor with pid $mpid is running."
+ else
+ printf "The GitLab MailRoom email processor is \033[31mnot running\033[0m.\n"
+ fi
+ fi
+ if [ "$web_status" = "0" ] && [ "$sidekiq_status" = "0" ] && [ "$gitlab_workhorse_status" = "0" ] && { [ "$mail_room_enabled" != true ] || [ "$mail_room_status" = "0" ]; }; then
+ printf "GitLab and all its components are \033[32mup and running\033[0m.\n"
+ fi
+}
+
+## Tells unicorn to reload its config and Sidekiq to restart
+reload_gitlab(){
+ exit_if_not_running
+ if [ "$wpid" = "0" ];then
+ echo "The GitLab Unicorn Web server is not running thus its configuration can't be reloaded."
+ exit 1
+ fi
+ printf "Reloading GitLab Unicorn configuration... "
+ RAILS_ENV=$RAILS_ENV bin/web reload
+ echo "Done."
+
+ echo "Restarting GitLab Sidekiq since it isn't capable of reloading its config..."
+ RAILS_ENV=$RAILS_ENV bin/background_jobs restart
+
+ if [ "$mail_room_enabled" != true ]; then
+ echo "Restarting GitLab MailRoom since it isn't capable of reloading its config..."
+ RAILS_ENV=$RAILS_ENV bin/mail_room restart
+ fi
+
+ wait_for_pids
+ print_status
+}
+
+## Restarts Sidekiq and Unicorn.
+restart_gitlab(){
+ check_status
+ if [ "$web_status" = "0" ] || [ "$sidekiq_status" = "0" ] || [ "$gitlab_workhorse" = "0" ] || { [ "$mail_room_enabled" = true ] && [ "$mail_room_status" = "0" ]; }; then
+ stop_gitlab
+ fi
+ start_gitlab
+}
+
+
+### Finally the input handling.
+
+case "$1" in
+ start)
+ start_gitlab
+ ;;
+ stop)
+ stop_gitlab
+ ;;
+ restart)
+ restart_gitlab
+ ;;
+ reload|force-reload)
+ reload_gitlab
+ ;;
+ status)
+ print_status
+ exit $gitlab_status
+ ;;
+ *)
+ echo "Usage: service gitlab {start|stop|restart|reload|status}"
+ exit 1
+ ;;
+esac
+
+exit
Added: head/www/gitlab/files/patch-Gemfile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/gitlab/files/patch-Gemfile Thu Mar 31 18:01:42 2016 (r412280)
@@ -0,0 +1,303 @@
+--- Gemfile.orig 2016-03-10 19:32:49 UTC
++++ Gemfile
+@@ -1,6 +1,6 @@
+ source "https://rubygems.org"
+
+-gem 'rails', '4.2.5.2'
++gem 'rails', '>= 4.2.5.2'
+ gem 'rails-deprecated_sanitizer', '~> 1.0.3'
+
+ # Responders respond_to and respond_with
+@@ -8,19 +8,18 @@ gem 'responders', '~> 2.0'
+
+ # Specify a sprockets version due to security issue
+ # See https://groups.google.com/forum/#!topic/rubyonrails-security/doAVp0YaTqY
+-gem 'sprockets', '~> 2.12.3'
++gem 'sprockets', '>= 2.12.3'
+
+ # Default values for AR models
+-gem "default_value_for", "~> 3.0.0"
++gem "default_value_for", ">= 3.0.0"
+
+ # Supported DBs
+-gem "mysql2", '~> 0.3.16', group: :mysql
+ gem "pg", '~> 0.18.2', group: :postgres
+
+ # Authentication libraries
+ gem 'devise', '~> 3.5.4'
+-gem 'devise-async', '~> 0.9.0'
+-gem 'doorkeeper', '~> 2.2.0'
++gem 'devise-async', '>= 0.9.0'
++gem 'doorkeeper', '>= 2.2.0'
+ gem 'omniauth', '~> 1.3.1'
+ gem 'omniauth-azure-oauth2', '~> 0.0.6'
+ gem 'omniauth-bitbucket', '~> 0.0.2'
+@@ -28,29 +27,28 @@ gem 'omniauth-cas3', '~> 1.1.2'
+ gem 'omniauth-facebook', '~> 3.0.0'
+ gem 'omniauth-github', '~> 1.1.1'
+ gem 'omniauth-gitlab', '~> 1.0.0'
+-gem 'omniauth-google-oauth2', '~> 0.2.0'
+-gem 'omniauth-kerberos', '~> 0.3.0', group: :kerberos
+-gem 'omniauth-saml', '~> 1.4.2'
++gem 'omniauth-google-oauth2', '>= 0.2.0'
++gem 'omniauth-saml', '>= 1.4.2'
+ gem 'omniauth-shibboleth', '~> 1.2.0'
+ gem 'omniauth-twitter', '~> 1.2.0'
+ gem 'omniauth_crowd', '~> 2.2.0'
+-gem 'rack-oauth2', '~> 1.2.1'
++gem 'rack-oauth2', '>= 1.2.1'
+
+ # Spam and anti-bot protection
+ gem 'recaptcha', require: 'recaptcha/rails'
+ gem 'akismet', '~> 2.0'
+
+ # Two-factor authentication
+-gem 'devise-two-factor', '~> 2.0.0'
++gem 'devise-two-factor', '>= 2.0.0'
+ gem 'rqrcode-rails3', '~> 0.1.7'
+ gem 'attr_encrypted', '~> 1.3.4'
+
+ # Browser detection
+-gem "browser", '~> 1.0.0'
++gem "browser", '>= 1.0.0'
+
+ # Extracting information from a git repository
+ # Provide access to Gitlab::Git library
+-gem "gitlab_git", '~> 8.2'
++gem "gitlab_git", '~> 10.0'
+
+ # LDAP Auth
+ # GitLab fork with several improvements to original library. For full list of changes
+@@ -58,14 +56,14 @@ gem "gitlab_git", '~> 8.2'
+ gem 'gitlab_omniauth-ldap', '~> 1.2.1', require: "omniauth-ldap"
+
+ # Git Wiki
+-gem 'gollum-lib', '~> 4.1.0'
++gem 'gollum-lib', '>= 4.1.0'
+
+ # Language detection
+-gem "github-linguist", "~> 4.7.0", require: "linguist"
++gem "github-linguist", "~> 4.8.0", require: "linguist"
+
+ # API
+-gem 'grape', '~> 0.13.0'
+-gem 'grape-entity', '~> 0.4.2'
++gem 'grape', '>= 0.13.0'
++gem 'grape-entity', '>= 0.4.2'
+ gem 'rack-cors', '~> 0.4.0', require: 'rack/cors'
+
+ # Pagination
+@@ -75,13 +73,13 @@ gem "kaminari", "~> 0.16.3"
+ gem "haml-rails", '~> 0.9.0'
+
+ # Files attachments
+-gem "carrierwave", '~> 0.9.0'
++gem "carrierwave", '>= 0.9.0'
+
+ # Drag and Drop UI
+ gem 'dropzonejs-rails', '~> 0.7.1'
+
+ # for aws storage
+-gem "fog", "~> 1.36.0"
++gem "fog", ">= 1.36.0"
+ gem "unf", '~> 0.1.4'
+
+ # Authorization
+@@ -93,13 +91,13 @@ gem "seed-fu", '~> 2.3.5'
+ # Markdown and HTML processing
+ gem 'html-pipeline', '~> 1.11.0'
+ gem 'task_list', '~> 1.0.2', require: 'task_list/railtie'
+-gem 'github-markup', '~> 1.3.1'
++gem 'github-markup', '>= 1.3.1'
+ gem 'redcarpet', '~> 3.3.3'
+ gem 'RedCloth', '~> 4.2.9'
+-gem 'rdoc', '~>3.6'
++gem 'rdoc', '>= 3.6'
+ gem 'org-ruby', '~> 0.9.12'
+ gem 'creole', '~> 0.5.0'
+-gem 'wikicloth', '0.8.1'
++gem 'wikicloth', '>= 0.8.1'
+ gem 'asciidoctor', '~> 1.5.2'
+ gem 'rouge', '~> 1.10.1'
+
+@@ -108,11 +106,11 @@ gem 'rouge', '~> 1.10.1'
+ gem 'nokogiri', '~> 1.6.7', '>= 1.6.7.2'
+
+ # Diffs
+-gem 'diffy', '~> 3.0.3'
++gem 'diffy', '>= 3.0.3'
+
+ # Application server
+ group :unicorn do
+- gem "unicorn", '~> 4.8.2'
++ gem "unicorn", '>= 4.8.2'
+ gem 'unicorn-worker-killer', '~> 0.4.2'
+ end
+
+@@ -159,10 +157,10 @@ gem "gitlab-flowdock-git-hook", "~> 1.0.
+ gem "gemnasium-gitlab-service", "~> 0.2"
+
+ # Slack integration
+-gem "slack-notifier", "~> 1.2.0"
++gem "slack-notifier", ">= 1.2.0"
+
+ # Asana integration
+-gem 'asana', '~> 0.4.0'
++gem 'asana', '>= 0.4.0'
+
+ # FogBugz integration
+ gem 'ruby-fogbugz', '~> 0.2.1'
+@@ -177,17 +175,17 @@ gem 'cal-heatmap-rails', '~> 3.5.0'
+ gem "underscore-rails", "~> 1.8.0"
+
+ # Sanitize user input
+-gem "sanitize", '~> 2.0'
++gem "sanitize", '>= 2.0'
+ gem 'babosa', '~> 1.0.2'
+
+ # Sanitizes SVG input
+ gem "loofah", "~> 2.0.3"
+
+ # Protect against bruteforcing
+-gem "rack-attack", '~> 4.3.1'
++gem "rack-attack", '>= 4.3.1'
+
+ # Ace editor
+-gem 'ace-rails-ap', '~> 2.0.1'
++gem 'ace-rails-ap', '>= 2.0.1'
+
+ # Keyboard shortcuts
+ gem 'mousetrap-rails', '~> 1.4.6'
+@@ -197,115 +195,36 @@ gem 'charlock_holmes', '~> 0.7.3'
+
+ gem "sass-rails", '~> 5.0.0'
+ gem "coffee-rails", '~> 4.1.0'
+-gem "uglifier", '~> 2.7.2'
++gem "uglifier", '>= 2.7.2'
+ gem 'turbolinks', '~> 2.5.0'
+ gem 'jquery-turbolinks', '~> 2.1.0'
+
+-gem 'addressable', '~> 2.3.8'
++gem 'addressable', '>= 2.3.8'
+ gem 'bootstrap-sass', '~> 3.3.0'
+ gem 'font-awesome-rails', '~> 4.2'
+ gem 'gitlab_emoji', '~> 0.3.0'
+ gem 'gon', '~> 6.0.1'
+ gem 'jquery-atwho-rails', '~> 1.3.2'
+-gem 'jquery-rails', '~> 4.0.0'
++gem 'jquery-rails', '>= 4.0.0'
+ gem 'jquery-scrollto-rails', '~> 1.4.3'
+ gem 'jquery-ui-rails', '~> 5.0.0'
+ gem 'nprogress-rails', '~> 0.1.6.7'
+ gem 'raphael-rails', '~> 2.1.2'
+-gem 'request_store', '~> 1.2.0'
++gem 'request_store', '>= 1.2.0'
+ gem 'select2-rails', '~> 3.5.9'
+ gem 'virtus', '~> 1.0.1'
+-gem 'net-ssh', '~> 3.0.1'
++gem 'net-ssh', '~> 3.1.0'
+
+ # Sentry integration
+ gem 'sentry-raven', '~> 0.15'
+
+-# Metrics
+-group :metrics do
+- gem 'allocations', '~> 1.0', require: false, platform: :mri
+- gem 'method_source', '~> 0.8', require: false
+- gem 'influxdb', '~> 0.2', require: false
+- gem 'connection_pool', '~> 2.0', require: false
+-end
+-
+-group :development do
+- gem "foreman"
+- gem 'brakeman', '~> 3.1.0', require: false
+-
+- gem "annotate", "~> 2.6.0"
+- gem "letter_opener", '~> 1.1.2'
+- gem 'quiet_assets', '~> 1.0.2'
+- gem 'rerun', '~> 0.11.0'
+- gem 'bullet', require: false
+- gem 'rblineprof', platform: :mri, require: false
+- gem 'web-console', '~> 2.0'
+-
+- # Better errors handler
+- gem 'better_errors', '~> 1.0.1'
+- gem 'binding_of_caller', '~> 0.7.2'
+-
+- # Docs generator
+- gem "sdoc", '~> 0.3.20'
+-
+- # thin instead webrick
+- gem 'thin', '~> 1.6.1'
+-end
+-
+-group :development, :test do
+- gem 'byebug', platform: :mri
+- gem 'pry-rails'
+-
+- gem 'awesome_print', '~> 1.2.0', require: false
+- gem 'fuubar', '~> 2.0.0'
+-
+- gem 'database_cleaner', '~> 1.4.0'
+- gem 'factory_girl_rails', '~> 4.3.0'
+- gem 'rspec-rails', '~> 3.3.0'
+- gem 'spinach-rails', '~> 0.2.1'
+-
+- # Prevent occasions where minitest is not bundled in packaged versions of ruby (see #3826)
+- gem 'minitest', '~> 5.7.0'
+-
+- # Generate Fake data
+- gem 'ffaker', '~> 2.0.0'
+-
+- gem 'capybara', '~> 2.4.0'
+- gem 'capybara-screenshot', '~> 1.0.0'
+- gem 'poltergeist', '~> 1.8.1'
+-
+- gem 'teaspoon', '~> 1.0.0'
+- gem 'teaspoon-jasmine', '~> 2.2.0'
+-
+- gem 'spring', '~> 1.3.6'
+- gem 'spring-commands-rspec', '~> 1.0.4'
+- gem 'spring-commands-spinach', '~> 1.0.0'
+- gem 'spring-commands-teaspoon', '~> 0.0.2'
+-
+- gem 'rubocop', '~> 0.35.0', require: false
+- gem 'coveralls', '~> 0.8.2', require: false
+- gem 'simplecov', '~> 0.10.0', require: false
+- gem 'flog', require: false
+- gem 'flay', require: false
+- gem 'bundler-audit', require: false
+-
+- gem 'benchmark-ips', require: false
+-end
+-
+-group :test do
+- gem 'shoulda-matchers', '~> 2.8.0', require: false
+- gem 'email_spec', '~> 1.6.0'
+- gem 'webmock', '~> 1.21.0'
+- gem 'test_after_commit', '~> 0.4.2'
+- gem 'sham_rack'
+-end
+-
+ group :production do
+ gem "gitlab_meta", '7.0'
+ end
+
+ gem "newrelic_rpm", '~> 3.14'
+
+-gem 'octokit', '~> 3.8.0'
++gem 'octokit', '>= 3.8.0'
+
+ gem "mail_room", "~> 0.6.1"
+
+@@ -317,7 +236,9 @@ gem 'activerecord-session_store', '~> 0.
+ gem "nested_form", '~> 0.3.2'
+
+ # OAuth
+-gem 'oauth2', '~> 1.0.0'
++gem 'oauth2', '>= 1.0.0'
+
+ # Soft deletion
+ gem "paranoia", "~> 2.0"
++
++gem "rinku"
Added: head/www/gitlab/files/patch-config_database.yml.postgresql
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/gitlab/files/patch-config_database.yml.postgresql Thu Mar 31 18:01:42 2016 (r412280)
@@ -0,0 +1,11 @@
+--- config/database.yml.postgresql.orig 2016-03-10 19:32:49 UTC
++++ config/database.yml.postgresql
+@@ -6,7 +6,7 @@ production:
+ encoding: unicode
+ database: gitlabhq_production
+ pool: 10
+- # username: git
++ username: git
+ # password:
+ # host: localhost
+ # port: 5432
Added: head/www/gitlab/files/patch-config_gitlab.yml.example
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/gitlab/files/patch-config_gitlab.yml.example Thu Mar 31 18:01:42 2016 (r412280)
@@ -0,0 +1,25 @@
+--- config/gitlab.yml.example.orig 2016-03-10 19:32:49 UTC
++++ config/gitlab.yml.example
+@@ -402,11 +402,11 @@ production: &base
+
+ ## GitLab Shell settings
+ gitlab_shell:
+- path: /home/git/gitlab-shell/
++ path: /usr/local/share/gitlab-shell/
+
+ # REPOS_PATH MUST NOT BE A SYMLINK!!!
+ repos_path: /home/git/repositories/
+- hooks_path: /home/git/gitlab-shell/hooks/
++ hooks_path: /usr/local/share/gitlab-shell/hooks/
+
+ # File that contains the secret key for verifying access for gitlab-shell.
+ # Default is '.gitlab_shell_secret' relative to Rails.root (i.e. root of the GitLab app).
+@@ -423,7 +423,7 @@ production: &base
+ # CAUTION!
+ # Use the default values unless you really know what you are doing
+ git:
+- bin_path: /usr/bin/git
++ bin_path: /usr/local/bin/git
+ # The next value is the maximum memory size grit can use
+ # Given in number of bytes per git object (e.g. a commit)
+ # This value can be increased if you have very large commits
Added: head/www/gitlab/files/patch-config_initializers_1__settings.rb
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/gitlab/files/patch-config_initializers_1__settings.rb Thu Mar 31 18:01:42 2016 (r412280)
@@ -0,0 +1,15 @@
+--- config/initializers/1_settings.rb.orig 2016-03-10 19:32:49 UTC
++++ config/initializers/1_settings.rb
+@@ -165,11 +165,7 @@ Settings.gitlab['email_reply_to'] ||= EN
+ Settings.gitlab['base_url'] ||= Settings.send(:build_base_gitlab_url)
+ Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url)
+ Settings.gitlab['user'] ||= 'git'
+-Settings.gitlab['user_home'] ||= begin
+- Etc.getpwnam(Settings.gitlab['user']).dir
+-rescue ArgumentError # no user configured
+- '/home/' + Settings.gitlab['user']
+-end
++Settings.gitlab['user_home'] ||= '/home/' + Settings.gitlab['user']
+ Settings.gitlab['time_zone'] ||= nil
+ Settings.gitlab['signup_enabled'] ||= true if Settings.gitlab['signup_enabled'].nil?
+ Settings.gitlab['signin_enabled'] ||= true if Settings.gitlab['signin_enabled'].nil?
Added: head/www/gitlab/files/patch-config_unicorn.rb.example
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/gitlab/files/patch-config_unicorn.rb.example Thu Mar 31 18:01:42 2016 (r412280)
@@ -0,0 +1,34 @@
+--- config/unicorn.rb.example.orig 2016-03-10 19:32:49 UTC
++++ config/unicorn.rb.example
+@@ -33,12 +33,12 @@ worker_processes 3
+
+ # Help ensure your application will always spawn in the symlinked
+ # "current" directory that Capistrano sets up.
+-working_directory "/home/git/gitlab" # available in 0.94.0+
++working_directory "/usr/local/www/gitlab" # available in 0.94.0+
+
+ # Listen on both a Unix domain socket and a TCP port.
+ # If you are load-balancing multiple Unicorn masters, lower the backlog
+ # setting to e.g. 64 for faster failover.
+-listen "/home/git/gitlab/tmp/sockets/gitlab.socket", :backlog => 1024
++listen "/usr/local/www/gitlab/tmp/sockets/gitlab.socket", :backlog => 1024
+ listen "127.0.0.1:8080", :tcp_nopush => true
+
+ # nuke workers after 30 seconds instead of 60 seconds (the default)
+@@ -59,13 +59,13 @@ listen "127.0.0.1:8080", :tcp_nopush =>
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-ports-all
mailing list