make mysql optional
This commit is contained in:
parent
8440115c38
commit
c9c8640f27
5 changed files with 30 additions and 4 deletions
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -1,6 +1,7 @@
|
||||||
gitlab (8.4.0+dfsg~rc2-2) UNRELEASED; urgency=medium
|
gitlab (8.4.0+dfsg~rc2-2) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
* Add README.Debian to document debian specific changes
|
* Add README.Debian to document debian specific changes
|
||||||
|
* Make mysql optional (Closes: #812345)
|
||||||
|
|
||||||
-- Pirate Praveen <praveen@debian.org> Fri, 22 Jan 2016 20:48:24 +0530
|
-- Pirate Praveen <praveen@debian.org> Fri, 22 Jan 2016 20:48:24 +0530
|
||||||
|
|
||||||
|
|
2
debian/conf/gitlab-debian.conf
vendored
2
debian/conf/gitlab-debian.conf
vendored
|
@ -1,3 +1,5 @@
|
||||||
|
export RAILS_ENV=production
|
||||||
|
export DB=postgres
|
||||||
export gitlab_user=gitlab
|
export gitlab_user=gitlab
|
||||||
export gitlab_conf=/etc/gitlab.conf
|
export gitlab_conf=/etc/gitlab.conf
|
||||||
export gitlab_home=/usr/share/gitlab
|
export gitlab_home=/usr/share/gitlab
|
||||||
|
|
25
debian/patches/0108-make-mysql-optional.patch
vendored
Normal file
25
debian/patches/0108-make-mysql-optional.patch
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
From 85ec69dca3e07b27079efe1392574d7fb317186f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pirate Praveen <praveen@debian.org>
|
||||||
|
Date: Sat, 23 Jan 2016 10:14:15 -0500
|
||||||
|
Subject: [PATCH] allow specifying DB choice via ENV variable
|
||||||
|
|
||||||
|
---
|
||||||
|
Gemfile | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
Index: gitlab/Gemfile
|
||||||
|
===================================================================
|
||||||
|
--- gitlab.orig/Gemfile
|
||||||
|
+++ gitlab/Gemfile
|
||||||
|
@@ -14,8 +14,9 @@ gem 'sprockets', '~> 3.3.0'
|
||||||
|
gem "default_value_for", "~> 3.0.0"
|
||||||
|
|
||||||
|
# Supported DBs
|
||||||
|
-gem "mysql2", '~> 0.3.16', group: :mysql
|
||||||
|
-gem "pg", '~> 0.18.2', group: :postgres
|
||||||
|
+ENV["DB"] ||= "mysql"
|
||||||
|
+gem "mysql2", '~> 0.3.16' if ENV["DB"] == "all" || ENV["DB"] == "mysql"
|
||||||
|
+gem "pg", '~> 0.18.2' if ENV["DB"] == "all" || ENV["DB"] == "postgres"
|
||||||
|
|
||||||
|
# Authentication libraries
|
||||||
|
gem 'devise', '~> 3.5.2'
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
|
@ -11,5 +11,6 @@ loosen-rails-version.patch
|
||||||
0100-remove-development-test.patch
|
0100-remove-development-test.patch
|
||||||
0102-loosen-octokit.patch
|
0102-loosen-octokit.patch
|
||||||
0107-relax-omniauth-facebook.patch
|
0107-relax-omniauth-facebook.patch
|
||||||
|
0108-make-mysql-optional.patch
|
||||||
source-init-functions.patch
|
source-init-functions.patch
|
||||||
0300-no-hard-coded-workhorse-path.patch
|
0300-no-hard-coded-workhorse-path.patch
|
||||||
|
|
3
debian/postinst
vendored
3
debian/postinst
vendored
|
@ -54,9 +54,6 @@ case "$1" in
|
||||||
|
|
||||||
# Adjust database privileges
|
# Adjust database privileges
|
||||||
. /usr/lib/gitlab/scripts/grantpriv.sh
|
. /usr/lib/gitlab/scripts/grantpriv.sh
|
||||||
echo "Setting up environment varibales..."
|
|
||||||
export RAILS_ENV=production
|
|
||||||
export DB=postgres
|
|
||||||
|
|
||||||
echo "Verifying we have all required libraries..."
|
echo "Verifying we have all required libraries..."
|
||||||
su ${gitlab_user} -s /bin/sh -c 'bundle install --local'
|
su ${gitlab_user} -s /bin/sh -c 'bundle install --local'
|
||||||
|
|
Loading…
Reference in a new issue