deleted ebuild for gitlabhq-7.6.1, added ebuild for gitlabhq-7.6.2; changed patch for Gemfile/Gemfile.lock to incorporate fix mentioned here:
https://github.com/gitlabhq/gitlabhq/issues/8478#issuecomment-71328552
This commit is contained in:
parent
7ece356533
commit
21c81ec2eb
4 changed files with 16 additions and 404 deletions
|
@ -40,7 +40,7 @@ AUX gitlabhq-7.0.0-fix-gemfile.patch 2185 SHA256 48070f5cd7e16ce27abad8e2cf80493
|
|||
AUX gitlabhq-7.0.0-ldap-custom-mapping.patch 2708 SHA256 8592744ba8b373b2e89c76d7ceb6c755bd46e2c2de6143b3f1d9967e4b6e5fb3 SHA512 a172444da26ddc9dfebe0c0ead4a2eb73a77ac44dfd9b3dbcf2b3faa679d963db080d2979d707e337b99f8e6384ccfd323f5d6e70921d193e99db75a4ba45b38 WHIRLPOOL d25e1f78342c781d26b84c09bd7eba08b46375c2f353b358f838602253dc2fe57807a437fc0c2891a6bc2893eba0bb278bd605ab8b6c837101a783c84536095b
|
||||
AUX gitlabhq-7.1.1-fix-gemfile.patch 2184 SHA256 9ba304baa5a17f1b0637fe243f551ddcc22cf32c3e82b7dc5b1a5cc0c5fc5876 SHA512 db8757874f136fc6a1d138feadbad6f8dfc773446f969b76a4715901dac02c04c978133ef3e9218b9c4a3d0173f53c0d14608ae123ee300a803529cbf232a1d1 WHIRLPOOL 27adf9392f3f1cbc6288afc1aabc174850a689f47f015c9d638b62769607e6e4f5ebe8bcb3811ee189ceeddef7c5bca384b322d15c0008b8867887f26d6188e2
|
||||
AUX gitlabhq-7.1.1-fix-project-name-regex.patch 638 SHA256 9f3dfcdc4365422037ecc8854b10e2cf96f4fb9508a6d5214b16c3545ca1353b SHA512 4606eade95b75e31eb791d793e3571c4e998c2d451e1f92ce70fba06e3a29c74a17f2fedba24ded4dbdc6db3da87960890552869fd8790caed26ff6fbb201717 WHIRLPOOL 6470de727d060556cc1413ac23f3c3198035f3cd7b05a291f7dedfcd9071a5afecca57c15f7387a84d9c1830118e47fae4fc72ba2f2e67c346bf18c4dae09865
|
||||
AUX gitlabhq-7.6.1-fix-gemfile.patch 3032 SHA256 a97fca0e1f51ed97be469bfd020b014f70c80d5863777c7d299d41f7d4298f9e SHA512 bbbd25b19d4916e75984a44083303b2984052e66b932e604b8aab5dea9c9a2c5f26358b060ac1f1c5b9a0c8f7e834d7a58116be33fbc8cd9cbe8cc3ed937ea32 WHIRLPOOL 483565da0c586bd37afb35538f9a8a6967ebda7b249f28d0bbadd7c48e006957e0535cded04f2505bd4ca6c350cc40d81f3cd22bcacd933ddd67c9cad95ef1b9
|
||||
AUX gitlabhq-7.6.2-fix-gemfile.patch 2402 SHA256 864fd1df330de8a47349590a5b893ade4064f08798889f845a0d13ba129cc5eb SHA512 05525456ff1ca3eec4da4763352047d7e4510fd5c03871d75d5f7674e80cb1e5ea960fec9a669c1a31e67f909026d02816117ba6cb6c604425b3ce9ee46ce7c9 WHIRLPOOL 8ae0747b93b023444f5af476059f30c070a9d3c417a0ff787efb18b93d3775e0be715e0dba208a76903fa1c505bb2e4d67f9d3c0ee721f1e0129c2ee2c41ef13
|
||||
DIST gitlabhq-6.7.5.tar.gz 10229484 SHA256 547ed2807cccf08c11450a9df035dad8db66ab9f9d693db29e3aa1ee65edbae0 SHA512 a90c0cd3954bf20ece9e98626216a42afcb0cc07e0cb23874ab2065757805ac38a8dcf4e93d804a33caeecaf2c6e94d8566f5700cd4161ef9a0aaac089b9ded8 WHIRLPOOL 4d8f5ff3a1245c5e13fc3ff8f819160017dd4dba9f6a48c0f851272da5c97f45162d3e53f327002f1ecde7f31dd5f392bed8503b1b306d913bf63827777cdbcd
|
||||
DIST gitlabhq-6.8.2.tar.gz 10558471 SHA256 db9400d5ffadd3564bbee6e388c90d7f4c8f88450e67213aad11df2d137534ec SHA512 0f57c6bb3b9e89a5bbf7ae4c774e54480518f185f2e50270a7dd921eb2a2322f3e6866ca70741582fad4f99b372ba025fbab15108c291d53ebf04cfaec2f9b75 WHIRLPOOL 73ebd0fb0faef7afd48398ec4e73c8f4175f3dc2a9450ae391b4d3a66b54e0d77f901f518738eb98cc267691559094d4ebecd4c0a7c18fa671c3a1aee4dfe4d2
|
||||
DIST gitlabhq-6.9.2.tar.gz 10566288 SHA256 2c01b223c3e889c7a45d3815f352c0546a337286d395e4d49df5ecedc1a57dc0 SHA512 b51b4e261666c14f782ce7edbbda24b6d32bb080c5444249f5c38e5233398b30f50a17cc8cbee18d75e57ba11ec3deeab4ffd1a6d6257c1858f8fe63e5138e54 WHIRLPOOL a3b9a8149fab69443b769aa145eb2c9a99bfc9f4a080edf0a6bd46c4771247b6f1c729bf5185e63bf63a02d654145362b7c8e9fefef6f0cdf1f4f30a32cf9dcb
|
||||
|
@ -55,7 +55,6 @@ DIST gitlabhq-7.4.2.tar.gz 4189724 SHA256 b116c49b032e5cd3529698aed3174b6f02748c
|
|||
DIST gitlabhq-7.4.3.tar.gz 4189957 SHA256 e03092298526bafb65336a14944570083f96e960f9bdabf8e4e52a403e42a5f8 SHA512 24228e31c7422215309838b1c8c9f24d8b2c77691b480365548ade36be53368bd9cc04e8065386e83b501f8f3f97f365634297a1af2c93c285cddad2f8150af8 WHIRLPOOL 785b6ba8c2c94456c005b7fbca265a762990e24c5164d742d8cb34a0f370c604aec23490ceb034007444ffe65223e163a58364aa01c1d617404a3278ac77f0d7
|
||||
DIST gitlabhq-7.5.1.tar.gz 4221894 SHA256 cbaef29b55c35b1428fb4678be76500e7f0c292aa72314fa457d94c61fb5e00d SHA512 fc99100aab666819c06df96fc7979cb108a42249d811482c64473a51ec38e89d325346a4e069666a9130cff9eab21a470e68724cbe53d135bf4dc3b52a6b8930 WHIRLPOOL d86887f196cdc8d2690ff0a788c70994b7192d39b89d47c63a8b0baad8102c22efac3b3dc6556eefba7bb5cb12aaad347e5adb7d9a5a591fd8ca1d7de3a5b493
|
||||
DIST gitlabhq-7.5.3.tar.gz 4222058 SHA256 533afcf5b9a0683d2f920a436e552af8d8e953c78d03f150cfb8dcfa0da3112d SHA512 18e9d5ee9d39c8e11101d370228b8edd38ccbfc1b7d768977f3cdd575604d7f72f897484749f9d74988b91f8195c0b9452a47a6f83acb6a7890d4aac9dd9f1a7 WHIRLPOOL 0bf347b12c2d2b5d4bf4bbcd0ff790bccfa100d0ff818a77e0843e3ff1ce87a627cd541bd7e5d8160f0954477809c8539ac1c309c3bcbc0e0b517ad3f30193de
|
||||
DIST gitlabhq-7.6.1.tar.gz 4239328 SHA256 96746351fdf05fc39f473930dcef4b25a02d9056c211004fbc14ad796b938cb0 SHA512 fbf807e6d9f5b9c0a6f86c086b6d69f0fd9ff268400432b023093053adf8d8b2e93e32675e0703df5cd00449af308f1fa6f649214d25bb00cd73c62437b60559 WHIRLPOOL 5f252240bf5e6722d7c064c52ce1e79548b2ab908487427aa4fee0dcf74652cd822325f1abb85aff14b83f19417626087fda489180bbbf6c10bdf8035d3ebc01
|
||||
DIST gitlabhq-7.6.2.tar.gz 4238734 SHA256 bc8f92dacca6be48c7a34b60a727e0755a44742500164c131dde7b88bedb71f0 SHA512 ecff2159536c72c82e34aadaaa02e2ee29ec494e7caf132665139622dcb6ba94af15295a0a8bbdeb550a9c2777284cd67cf57b7940b49da98e288a48577ba1b0 WHIRLPOOL 8b4fa295e82c9d61cc0c9a0e5e84b65ac2528f4afacada065e37214234b98d6aee90abe9d1599b8827e459f5ad503fccbab00f1d7528b89735f1617f4d55507c
|
||||
EBUILD gitlabhq-6.7.5.ebuild 10973 SHA256 d74d454bd9972f15d21a3454e39a78ab042ccb3444cbbedb25da01d40335361b SHA512 b5494ee857055022da0803277d6a8b84d1fa1d9af66a853eedafdd3fa4993dfe4a66962581234333b16f41b6d605cfe6a207a4d2706c90d921fbc54474deb296 WHIRLPOOL 03026c7b7029c8bc7d5e5ad05c38e4b507be6c4f36b488753120d7d0849522a9e557c5b04adcac4c22eced0fbc1432fd16e7447198092b6691ccc529147d9dcf
|
||||
EBUILD gitlabhq-6.8.2.ebuild 10595 SHA256 24317d99bb9d0e220c11a37709b1b701b9cd7bf7b9fe3adead666c531569dcf0 SHA512 2f3f5e38b33edfdff35f3888e694984e97d897d7c64c0aa6cc35149d253e7211560dbd918b12e891c0d1d009241e53e255a2a3be91beb5a3954d148c4554315e WHIRLPOOL 4dca44d6e271ec14252e3a4690e6736d64133d3d115ec19b77d37cb5a2a3d3a46e9820dae48df5d7fa79dd0ca9c6b178b9dca85811bc0e78b7964580b0696b59
|
||||
|
@ -73,5 +72,4 @@ EBUILD gitlabhq-7.4.3.ebuild 10576 SHA256 7fdcfdfa51e7b2ed8b523879009c0cd19c2734
|
|||
EBUILD gitlabhq-7.5.1.ebuild 10904 SHA256 821abc6ca9c2b87f18aa3279068ead6c25ed5d652a0ac725dc5c53a6eb9baf08 SHA512 f0ff1487b022ed7884a4883b4e0fe36229918a3c93ea24ed315da7eda8cbc664974444e4efb7275e26008c5ef75e872d0fe1f76eda43d7aaa2223649faf5d554 WHIRLPOOL a20c720e9ad3a440b89d09df0a02dfef4f63cfab2102a69da20e5f38925daf97f8a8d339e4c9d997e0f0a05b9f71ad3932d6cdc20e6561696d2286bb7d510589
|
||||
EBUILD gitlabhq-7.5.3-r1.ebuild 10907 SHA256 3c8b8cabc75968beda5a351b746ab53c7e644d16c437bc54af51fd62283a1917 SHA512 e42b3605ab405a798467713f723ddff553ecef81b2f16baad9bd93653da15fb23e47aa7f28d5cc93eaabf3e8eeb70201dc6f8ae6192b42da82be0a754e54704d WHIRLPOOL eae1bb4dc43c178f61fd8fe5784c1e02f385969dc7237ce9c140774266f4a583f911617014602c1e72c0f8f525edc7b6e620c748045419640f0f0bdc8dc6f0d3
|
||||
EBUILD gitlabhq-7.5.3.ebuild 10904 SHA256 821abc6ca9c2b87f18aa3279068ead6c25ed5d652a0ac725dc5c53a6eb9baf08 SHA512 f0ff1487b022ed7884a4883b4e0fe36229918a3c93ea24ed315da7eda8cbc664974444e4efb7275e26008c5ef75e872d0fe1f76eda43d7aaa2223649faf5d554 WHIRLPOOL a20c720e9ad3a440b89d09df0a02dfef4f63cfab2102a69da20e5f38925daf97f8a8d339e4c9d997e0f0a05b9f71ad3932d6cdc20e6561696d2286bb7d510589
|
||||
EBUILD gitlabhq-7.6.1.ebuild 10911 SHA256 f0fe0342c47c7e0d6ae10e080f56198c752454bddbe8910092124c290c40e716 SHA512 34ae28951cb92b6c01e21c421a156ffd35c45b75f3e4d4701e46da71f13a921fc291c146ee3436e39d68898ae4ee107aa558d63429aa4f96344502654e8c6ee9 WHIRLPOOL 3a43aa3d336ba926a4d9703b96472eddcadf55bc966e65fcf3eca8ee0070effcc0920a18c4f376f1292c64dcbceccd6733c6010ab03db3dfc98f25d0da5b7c6c
|
||||
EBUILD gitlabhq-7.6.2.ebuild 10918 SHA256 92a792986997bd161d565ee4cea10bea77a54be30a321de23bc9f592dd458530 SHA512 abfa04d4f2a1853666f982cec5b9f40728cde93583a7d3c07bb9b317d7907877d7ecc34e1a618137fe576c907ee6368e992dfa039a04f14ec40ba4bbee48238e WHIRLPOOL e63aa4db10d70a1b20c9478ed173301ce0fc23f0a82e4c470c401784a67a3be386edf6fd383c30ae18bc41fccb49fe894241762f8bb7b2df020cbbacae4fe9ab
|
||||
EBUILD gitlabhq-7.6.2.ebuild 10911 SHA256 f0fe0342c47c7e0d6ae10e080f56198c752454bddbe8910092124c290c40e716 SHA512 34ae28951cb92b6c01e21c421a156ffd35c45b75f3e4d4701e46da71f13a921fc291c146ee3436e39d68898ae4ee107aa558d63429aa4f96344502654e8c6ee9 WHIRLPOOL 3a43aa3d336ba926a4d9703b96472eddcadf55bc966e65fcf3eca8ee0070effcc0920a18c4f376f1292c64dcbceccd6733c6010ab03db3dfc98f25d0da5b7c6c
|
||||
|
|
|
@ -1,18 +1,8 @@
|
|||
diff --git a/Gemfile b/Gemfile
|
||||
index ce9b833..49ddf1a 100644
|
||||
index ce9b833..c4bd377 100644
|
||||
--- a/Gemfile
|
||||
+++ b/Gemfile
|
||||
@@ -28,6 +28,9 @@ gem 'omniauth-google-oauth2'
|
||||
gem 'omniauth-twitter'
|
||||
gem 'omniauth-github'
|
||||
gem 'omniauth-shibboleth'
|
||||
+# Version 0.8 does not compile, so let's try tag 0.8.1 from github
|
||||
+# This is a dependency of omniauth-kerberos
|
||||
+gem "timfel-krb5-auth", '0.8.1.1', :require => 'krb5_auth', :git => "https://github.com/fritteli/krb5-auth.git", :tag => "v0.8.1.1"
|
||||
gem 'omniauth-kerberos'
|
||||
|
||||
# Extracting information from a git repository
|
||||
@@ -155,6 +158,10 @@ gem "underscore-rails", "~> 1.4.4"
|
||||
@@ -155,6 +155,10 @@ gem "underscore-rails", "~> 1.4.4"
|
||||
# Sanitize user input
|
||||
gem "sanitize", '~> 2.0'
|
||||
|
||||
|
@ -23,7 +13,7 @@ index ce9b833..49ddf1a 100644
|
|||
# Protect against bruteforcing
|
||||
gem "rack-attack"
|
||||
|
||||
@@ -170,7 +177,6 @@ gem 'semantic-ui-sass', '~> 0.16.1.0'
|
||||
@@ -170,7 +174,6 @@ gem 'semantic-ui-sass', '~> 0.16.1.0'
|
||||
gem "sass-rails", '~> 4.0.2'
|
||||
gem "coffee-rails"
|
||||
gem "uglifier"
|
||||
|
@ -32,28 +22,21 @@ index ce9b833..49ddf1a 100644
|
|||
gem 'jquery-turbolinks'
|
||||
|
||||
diff --git a/Gemfile.lock b/Gemfile.lock
|
||||
index a93935f..66e2c22 100644
|
||||
index a93935f..98721dc 100644
|
||||
--- a/Gemfile.lock
|
||||
+++ b/Gemfile.lock
|
||||
@@ -1,3 +1,17 @@
|
||||
@@ -1,3 +1,10 @@
|
||||
+GIT
|
||||
+ remote: https://github.com/brianmario/charlock_holmes.git
|
||||
+ revision: dde194609b3513b0d2369ce8f916ae52566154b4
|
||||
+ ref: dde194609b3513b0d2369ce8f916ae52566154b4
|
||||
+ specs:
|
||||
+ charlock_holmes (0.6.9.4)
|
||||
+
|
||||
+GIT
|
||||
+ remote: https://github.com/fritteli/krb5-auth.git
|
||||
+ revision: 14e09f7fdd79962b146e0a6513fdb1b8e64c221b
|
||||
+ tag: v0.8.1.1
|
||||
+ specs:
|
||||
+ timfel-krb5-auth (0.8.1.1)
|
||||
+
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
@@ -62,7 +76,6 @@ GEM
|
||||
@@ -62,7 +69,6 @@ GEM
|
||||
json (>= 1.7)
|
||||
celluloid (0.15.2)
|
||||
timers (~> 1.1.0)
|
||||
|
@ -61,7 +44,7 @@ index a93935f..66e2c22 100644
|
|||
cliver (0.3.2)
|
||||
code_analyzer (0.4.3)
|
||||
sexp_processor
|
||||
@@ -280,7 +293,6 @@ GEM
|
||||
@@ -280,7 +286,6 @@ GEM
|
||||
addressable (~> 2.3)
|
||||
letter_opener (1.1.2)
|
||||
launchy (~> 2.2)
|
||||
|
@ -69,7 +52,7 @@ index a93935f..66e2c22 100644
|
|||
listen (2.3.1)
|
||||
celluloid (>= 0.15.2)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
@@ -426,7 +438,6 @@ GEM
|
||||
@@ -426,7 +431,6 @@ GEM
|
||||
redis-store (~> 1.1.0)
|
||||
redis-store (1.1.4)
|
||||
redis (>= 2.2)
|
||||
|
@ -77,7 +60,7 @@ index a93935f..66e2c22 100644
|
|||
request_store (1.0.5)
|
||||
require_all (1.3.2)
|
||||
rest-client (1.6.7)
|
||||
@@ -525,9 +536,6 @@ GEM
|
||||
@@ -525,9 +529,6 @@ GEM
|
||||
term-ansicolor (1.2.2)
|
||||
tins (~> 0.8)
|
||||
test_after_commit (0.2.2)
|
||||
|
@ -87,15 +70,16 @@ index a93935f..66e2c22 100644
|
|||
thin (1.6.1)
|
||||
daemons (>= 1.0.9)
|
||||
eventmachine (>= 1.0.0)
|
||||
@@ -536,7 +544,6 @@ GEM
|
||||
@@ -536,7 +537,7 @@ GEM
|
||||
thread_safe (0.3.4)
|
||||
tilt (1.4.1)
|
||||
timers (1.1.0)
|
||||
- timfel-krb5-auth (0.8)
|
||||
+ timfel-krb5-auth (0.8.2)
|
||||
tinder (1.9.3)
|
||||
eventmachine (~> 1.0)
|
||||
faraday (~> 0.8)
|
||||
@@ -606,6 +613,7 @@ DEPENDENCIES
|
||||
@@ -606,6 +607,7 @@ DEPENDENCIES
|
||||
bootstrap-sass (~> 3.0)
|
||||
capybara (~> 2.2.1)
|
||||
carrierwave
|
||||
|
@ -103,13 +87,11 @@ index a93935f..66e2c22 100644
|
|||
coffee-rails
|
||||
colored
|
||||
coveralls
|
||||
@@ -704,8 +712,8 @@ DEPENDENCIES
|
||||
@@ -704,7 +706,6 @@ DEPENDENCIES
|
||||
stamp
|
||||
state_machine
|
||||
test_after_commit
|
||||
- therubyracer
|
||||
thin
|
||||
+ timfel-krb5-auth (= 0.8.1.1)!
|
||||
tinder (~> 1.9.2)
|
||||
turbolinks
|
||||
uglifier
|
|
@ -1,368 +0,0 @@
|
|||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
# Maintainer notes:
|
||||
# - This ebuild uses Bundler to download and install all gems in deployment mode
|
||||
# (i.e. into isolated directory inside application). That's not Gentoo way how
|
||||
# it should be done, but GitLab has too many dependencies that it will be too
|
||||
# difficult to maintain them via ebuilds.
|
||||
#
|
||||
|
||||
USE_RUBY="ruby20 ruby21"
|
||||
PYTHON_DEPEND="2:2.7"
|
||||
|
||||
inherit eutils python ruby-ng user systemd
|
||||
|
||||
DESCRIPTION="GitLab is a free project and repository management application"
|
||||
HOMEPAGE="https://github.com/gitlabhq/gitlabhq"
|
||||
SRC_URI="https://github.com/gitlabhq/gitlabhq/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
#RUBY_S="${PN}-7.4.0"
|
||||
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="6"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="mysql +postgres +unicorn systemd"
|
||||
|
||||
## Gems dependencies:
|
||||
# charlock_holmes dev-libs/icu
|
||||
# grape, capybara dev-libs/libxml2, dev-libs/libxslt
|
||||
# rugged dev-util/cmake, virtual/pkgconfig
|
||||
# json dev-util/ragel
|
||||
# pygments.rb python 2.7+
|
||||
# execjs net-libs/nodejs, or any other JS runtime
|
||||
# pg dev-db/postgresql
|
||||
# mysql virtual/mysql
|
||||
#
|
||||
GEMS_DEPEND="
|
||||
dev-libs/icu
|
||||
dev-libs/libxml2
|
||||
dev-libs/libxslt
|
||||
dev-util/cmake
|
||||
dev-util/ragel
|
||||
net-libs/nodejs
|
||||
postgres? ( dev-db/postgresql )
|
||||
mysql? ( virtual/mysql )
|
||||
virtual/krb5
|
||||
virtual/pkgconfig"
|
||||
DEPEND="${GEMS_DEPEND}
|
||||
>=dev-vcs/gitlab-shell-2.4.0
|
||||
dev-vcs/git"
|
||||
RDEPEND="${DEPEND}
|
||||
dev-db/redis
|
||||
virtual/mta
|
||||
systemd? ( sys-apps/systemd:0= )"
|
||||
ruby_add_bdepend "
|
||||
virtual/rubygems
|
||||
>=dev-ruby/bundler-1.0"
|
||||
|
||||
#
|
||||
# fix-gemfile:
|
||||
# Remove therubyracer that doesn't compile well on Gentoo (we're using
|
||||
# nodejs instead that is faster and better). Also replace broken
|
||||
# charlock_holmes version with fixed one.
|
||||
#
|
||||
# fix-project-name-regex:
|
||||
# Allow project name to contain non-ASCII characters.
|
||||
#
|
||||
# fix-sendmail-config:
|
||||
# Fix default settings to work with ssmtp that doesn't know '-t' argument.
|
||||
#
|
||||
RUBY_PATCHES=(
|
||||
"${P}-fix-gemfile.patch"
|
||||
"${PN}-7.1.1-fix-project-name-regex.patch"
|
||||
"${PN}-6.0.2-fix-sendmail-config.patch"
|
||||
"${PN}-7.0.0-email-custom-reply_to.patch"
|
||||
)
|
||||
|
||||
MY_NAME="gitlab"
|
||||
MY_USER="git" # should be same as in gitlab-shell
|
||||
|
||||
DEST_DIR="/opt/${MY_NAME}-${SLOT}"
|
||||
CONF_DIR="/etc/${MY_NAME}-${SLOT}"
|
||||
LOGS_DIR="/var/log/${MY_NAME}"
|
||||
TEMP_DIR="/var/tmp/${MY_NAME}"
|
||||
|
||||
# When updating ebuild to newer version, check list of the queues in
|
||||
# https://gitlab.com/gitlab-org/gitlab-ce/blob/v${PV}/bin/background_jobs
|
||||
SIDEKIQ_QUEUES="post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default"
|
||||
|
||||
all_ruby_prepare() {
|
||||
|
||||
# fix paths
|
||||
local satellites_path="${TEMP_DIR}/repo_satellites"
|
||||
local repos_path=/var/lib/git/repositories
|
||||
local shell_path=/usr/share/gitlab-shell
|
||||
sed -i -E \
|
||||
-e "/satellites:$/,/\w:$/ s|(\s*path:\s).*|\1${satellites_path}/|" \
|
||||
-e "/gitlab_shell:$/,/\w:$/ s|(\s*path:\s).*|\1${shell_path}/|" \
|
||||
-e "/gitlab_shell:$/,/\w:$/ s|(\s*repos_path:\s).*|\1${repos_path}/|" \
|
||||
-e "/gitlab_shell:$/,/\w:$/ s|(\s*hooks_path:\s).*|\1${shell_path}/hooks/|" \
|
||||
config/gitlab.yml.example || die "failed to filter gitlab.yml.example"
|
||||
|
||||
local run_path=/run/${MY_NAME}
|
||||
sed -i -E \
|
||||
-e "s|/home/git/gitlab/tmp/(pids\|sockets)|${run_path}|" \
|
||||
-e "s|/home/git/gitlab/log|${LOGS_DIR}|" \
|
||||
-e "s|/home/git/gitlab|${DEST_DIR}|" \
|
||||
config/unicorn.rb.example || die "failed to filter unicorn.rb.example"
|
||||
|
||||
sed -i \
|
||||
-e "s|/home/git/gitlab/tmp/sockets|${run_path}|" \
|
||||
lib/support/nginx/gitlab || die "failed to filter nginx/gitlab"
|
||||
|
||||
# modify default database settings for PostgreSQL
|
||||
sed -i -E \
|
||||
-e 's|(username:).*|\1 gitlab|' \
|
||||
-e 's|(password:).*|\1 gitlab|' \
|
||||
-e 's|(socket:).*|/run/postgresql/.s.PGSQL.5432|' \
|
||||
config/database.yml.postgresql \
|
||||
|| die "failed to filter database.yml.postgresql"
|
||||
|
||||
# rename config files
|
||||
mv config/gitlab.yml.example config/gitlab.yml
|
||||
mv config/unicorn.rb.example config/unicorn.rb
|
||||
|
||||
local dbconf=config/database.yml
|
||||
if use postgres && ! use mysql; then
|
||||
mv ${dbconf}.postgresql ${dbconf}
|
||||
rm ${dbconf}.mysql
|
||||
elif use mysql && ! use postgres; then
|
||||
mv ${dbconf}.mysql ${dbconf}
|
||||
rm ${dbconf}.postgresql
|
||||
fi
|
||||
|
||||
# remove useless files
|
||||
rm -r lib/support/{deploy,init.d}
|
||||
use unicorn || rm config/unicorn.rb
|
||||
}
|
||||
|
||||
all_ruby_install() {
|
||||
local dest=${DEST_DIR}
|
||||
local conf=${CONF_DIR}
|
||||
local logs=${LOGS_DIR}
|
||||
local temp=${TEMP_DIR}
|
||||
|
||||
# prepare directories
|
||||
diropts -m750
|
||||
dodir ${logs} ${temp} ${temp}/repo_satellites
|
||||
|
||||
diropts -m755
|
||||
dodir ${conf} ${dest}/public/uploads
|
||||
|
||||
dosym ${temp} ${dest}/tmp
|
||||
dosym ${logs} ${dest}/log
|
||||
|
||||
# install configs
|
||||
insinto ${conf}
|
||||
doins -r config/*
|
||||
dosym ${conf} ${dest}/config
|
||||
|
||||
echo 'export RAILS_ENV=production' > "${D}/${dest}/.profile"
|
||||
|
||||
# remove needless dirs
|
||||
rm -Rf config tmp log
|
||||
|
||||
# install the rest files
|
||||
# using cp 'cause doins is slow
|
||||
cp -Rl * "${D}/${dest}"/
|
||||
|
||||
# install logrotate config
|
||||
dodir /etc/logrotate.d
|
||||
cat > "${D}/etc/logrotate.d/${MY_NAME}" <<-EOF
|
||||
${logs}/*.log {
|
||||
missingok
|
||||
delaycompress
|
||||
compress
|
||||
copytruncate
|
||||
}
|
||||
EOF
|
||||
|
||||
## Install gems via bundler ##
|
||||
|
||||
cd "${D}/${dest}"
|
||||
|
||||
local without="development test aws"
|
||||
local flag; for flag in mysql postgres unicorn; do
|
||||
without+="$(use $flag || echo ' '$flag)"
|
||||
done
|
||||
local bundle_args="--deployment ${without:+--without ${without}}"
|
||||
|
||||
einfo "Running bundle install ${bundle_args} ..."
|
||||
${RUBY} /usr/bin/bundle install ${bundle_args} || die "bundler failed"
|
||||
|
||||
# clean gems cache
|
||||
rm -Rf vendor/bundle/ruby/*/cache
|
||||
|
||||
# fix permissions
|
||||
fowners -R ${MY_USER}:${MY_USER} ${dest} ${temp} ${logs}
|
||||
|
||||
## RC script ##
|
||||
|
||||
if use systemd ; then
|
||||
ewarn "Beware: systemd support has not been tested, use at your own risk!"
|
||||
systemd_dounit "${FILESDIR}/gitlab-sidekiq.service"
|
||||
systemd_dounit "${FILESDIR}/gitlab-unicorn.service"
|
||||
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
|
||||
else
|
||||
local rcscript=gitlab-sidekiq.init
|
||||
use unicorn && rcscript=gitlab-unicorn-6.init
|
||||
|
||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
||||
sed -i \
|
||||
-e "s|@USER@|${MY_USER}|" \
|
||||
-e "s|@SLOT@|${SLOT}|" \
|
||||
-e "s|@GITLAB_BASE@|${dest}|" \
|
||||
-e "s|@LOGS_DIR@|${logs}|" \
|
||||
-e "s|@QUEUES@|${SIDEKIQ_QUEUES}|" \
|
||||
"${T}/${rcscript}" \
|
||||
|| die "failed to filter ${rcscript}"
|
||||
|
||||
newinitd "${T}/${rcscript}" "${MY_NAME}-${SLOT}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "1. Configure your GitLab's settings in ${CONF_DIR}/gitlab.yml."
|
||||
elog
|
||||
elog "2. Configure your database settings in ${CONF_DIR}/database.yml"
|
||||
elog " for \"production\" environment."
|
||||
elog
|
||||
elog "3. Then you should create a database for your GitLab instance, if you"
|
||||
elog "haven't done so already."
|
||||
elog
|
||||
if use postgres; then
|
||||
elog "If you have local PostgreSQL running, just copy&run:"
|
||||
elog " su postgres"
|
||||
elog " psql -c \"CREATE ROLE gitlab PASSWORD 'gitlab' \\"
|
||||
elog " NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\""
|
||||
elog " createdb -E UTF-8 -O gitlab gitlabhq_production"
|
||||
elog " Note: You should change your password to something more random..."
|
||||
elog
|
||||
fi
|
||||
elog "4. Finally execute the following command to initlize environment:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
elog " Note: Do not forget to start Redis server first!"
|
||||
elog
|
||||
elog "If this is an update from previous version, it's HIGHLY recommended"
|
||||
elog "to backup your database before running the config phase!"
|
||||
elog
|
||||
elog "If you're running GitLab behind an SSL proxy such as nginx or Apache and"
|
||||
elog "you can't login after the upgrade, be sure to read the section about the"
|
||||
elog "verification of the CSRF token in GitLab's trouble-shooting guide at"
|
||||
elog "http://goo.gl/5XGRGv."
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local shell_conf='/etc/gitlab-shell.yml'
|
||||
|
||||
einfo "Checking configuration files"
|
||||
|
||||
if [ ! -r "${CONF_DIR}/database.yml" ]; then
|
||||
eerror "Copy ${CONF_DIR}/database.yml.* to"
|
||||
eerror "${CONF_DIR}/database.yml and edit this file in order to configure your"
|
||||
eerror "database settings for \"production\" environment."; die
|
||||
fi
|
||||
|
||||
# check gitlab-shell configuration
|
||||
if [ -r ${shell_conf} ]; then
|
||||
local shell_repos_path="$(ryaml ${shell_conf} repos_path)"
|
||||
local gitlab_repos_path="$(ryaml ${CONF_DIR}/gitlab.yml \
|
||||
production gitlab_shell repos_path)"
|
||||
|
||||
if [ ! "${shell_repos_path}" -ef "${gitlab_repos_path}" ]; then
|
||||
eerror "repos_path in ${CONF_DIR}/gitlab.yml and ${shell_conf}"
|
||||
eerror "must points to the same location! Fix the repos_path location and"
|
||||
eerror "run this again."; die
|
||||
fi
|
||||
else
|
||||
ewarn "GitLab Shell checks skipped, could not find config file at"
|
||||
ewarn "${shell_conf}. Make sure that you have gitlab-shell properly"
|
||||
ewarn "installed and that repos_path is the same as in GitLab."
|
||||
fi
|
||||
|
||||
local email_from="$(ryaml ${CONF_DIR}/gitlab.yml production gitlab email_from)"
|
||||
local git_home="$(egethome ${MY_USER})"
|
||||
|
||||
# configure Git global settings
|
||||
if [ ! -e "${git_home}/.gitconfig" ]; then
|
||||
einfo "Setting git user"
|
||||
su -l ${MY_USER} -c "
|
||||
git config --global user.email '${email_from}';
|
||||
git config --global user.name 'GitLab'" \
|
||||
|| die "failed to setup git name and email"
|
||||
fi
|
||||
|
||||
if [ ! -d "${DEST_DIR}/.git" ]; then
|
||||
# create dummy git repo as workaround for
|
||||
# https://github.com/bundler/bundler/issues/2039
|
||||
einfo "Initializing dummy git repository to avoid false errors from bundler"
|
||||
su -l ${MY_USER} -c "
|
||||
cd ${DEST_DIR}
|
||||
git init
|
||||
git add README.md
|
||||
git commit -m 'Dummy repository'" >/dev/null
|
||||
fi
|
||||
|
||||
## Initialize app ##
|
||||
|
||||
local RAILS_ENV="production"
|
||||
local RUBY=${RUBY:-/usr/bin/ruby}
|
||||
local BUNDLE="${RUBY} /usr/bin/bundle"
|
||||
|
||||
local dbname="$(ryaml ${CONF_DIR}/database.yml production database)"
|
||||
|
||||
if [ -f "${DEST_DIR}/.secret" ]; then
|
||||
local update=true
|
||||
|
||||
einfo "Migrating database ..."
|
||||
exec_rake db:migrate
|
||||
|
||||
# https://github.com/gitlabhq/gitlabhq/issues/5311#issuecomment-31656496
|
||||
einfo "Migrating iids ..."
|
||||
exec_rake migrate_iids
|
||||
|
||||
einfo "Cleaning old precompiled assets ..."
|
||||
exec_rake assets:clean
|
||||
|
||||
einfo "Cleaning cache ..."
|
||||
exec_rake cache:clear
|
||||
else
|
||||
local update=false
|
||||
|
||||
einfo "Initializing database ..."
|
||||
exec_rake gitlab:setup
|
||||
fi
|
||||
|
||||
einfo "Precompiling assests ..."
|
||||
exec_rake assets:precompile
|
||||
|
||||
if [ "${update}" = 'true' ]; then
|
||||
ewarn
|
||||
ewarn "This configuration script runs only common migration tasks."
|
||||
ewarn "Please read guides on"
|
||||
ewarn " https://github.com/gitlabhq/gitlabhq/blob/master/doc/update/"
|
||||
ewarn "for any additional migration tasks specific to your previous GitLab"
|
||||
ewarn "version."
|
||||
fi
|
||||
}
|
||||
|
||||
ryaml() {
|
||||
ruby -ryaml -e 'puts ARGV[1..-1].inject(YAML.load(File.read(ARGV[0]))) {|acc, key| acc[key] }' "$@"
|
||||
}
|
||||
|
||||
exec_rake() {
|
||||
local command="${BUNDLE} exec rake $@ RAILS_ENV=${RAILS_ENV}"
|
||||
|
||||
echo " ${command}"
|
||||
su -l ${MY_USER} -c "
|
||||
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
|
||||
cd ${DEST_DIR}
|
||||
${command}" \
|
||||
|| die "failed to run rake $@"
|
||||
}
|
|
@ -73,7 +73,7 @@ ruby_add_bdepend "
|
|||
# Fix default settings to work with ssmtp that doesn't know '-t' argument.
|
||||
#
|
||||
RUBY_PATCHES=(
|
||||
"${PN}-7.6.1-fix-gemfile.patch"
|
||||
"${P}-fix-gemfile.patch"
|
||||
"${PN}-7.1.1-fix-project-name-regex.patch"
|
||||
"${PN}-6.0.2-fix-sendmail-config.patch"
|
||||
"${PN}-7.0.0-email-custom-reply_to.patch"
|
||||
|
|
Loading…
Reference in a new issue