Merge branch '52-gitlab-8-12-0' into 'master'

Resolve "GitLab 8.12.0"

Closes #52

See merge request !117
This commit is contained in:
Manuel Friedli 2016-09-23 14:31:33 +02:00
commit 7b64453fe3
18 changed files with 49 additions and 2029 deletions

View file

@ -1,3 +1,12 @@
23 Sep 2016; Manuel Friedli <manuel@fritteli.ch> -gitlab-shell-3.2.1.ebuild:
dev-vcs/gitlab-shell: removed obsolete version 3.2.1
*gitlab-shell-3.6.0 (23 Sep 2016)
23 Sep 2016; Manuel Friedli <manuel@fritteli.ch> +gitlab-shell-3.6.0.ebuild:
dev-vcs/gitlab-shell: added ebuild for version 3.6.0; dependency of gitlab-
ce-8.12.0
*gitlab-shell-3.5.0 (16 Sep 2016)
16 Sep 2016; Manuel Friedli <manuel@fritteli.ch> +gitlab-shell-3.5.0.ebuild:

View file

@ -1,9 +1,9 @@
AUX gitlab-shell-3.2.0-config-paths.patch 1826 SHA256 c83db7c37dcac577ce499eab4bb0168253f49d303ba1991fdec90d13cc3fe37a SHA512 7524b6b8cd7cd141a56c468efa303b1d21576ac9e03cb866cbf9dcac34e1b8d4f356333737050e2e5dfeb0f0ad904b3f548c40e1209c1f35054ed2027b1d8271 WHIRLPOOL fdbd2dfe43ff4a2af97227fbf8c4589ca3734ebf0320b7e9c5e8ea39882c49d45815a0ee3c765a141affacbe48f4063987b9664a918e0e216b49ca46a475cc5f
DIST gitlab-shell-3.2.1.tar.gz 68788 SHA256 ad21f8676901b9d90a1c8016b5fe2ad73f9a7966ab378ce244b12fc0373e9f46 SHA512 2280b5ea529d1efff365b1f72ded2af71c7cd19c88c1d7638f730044c5a804a0adb8670685b2016b26e894755a0b70f365d234c95e4ca3bf09913d7b6bebca76 WHIRLPOOL e21d77c00a02105babe4cf84c7ff9223131eef5e7e1db80d06b40bae87d225b579f4fbdca4ac2809be436f96b25753f73b354e6d03ad1b22ad57bfac7c720ae9
DIST gitlab-shell-3.4.0.tar.gz 71972 SHA256 0ac8f18b1615194943e935b670d630a1ba9870ad876f7486256972c7be1d45d4 SHA512 1138e02dbf5169547e39eea87ac88f05009424c76f26b4b0f2cb3882eaefc9d7aa11e167c6d9309947da728fc5381a234b93e25a0ded4f87eb8d8c88baaa2b9c WHIRLPOOL ef9ff2b349af97019da56c2e0b850fc4885ad036074e7bce39ba6f12bea611b771becc5ebf3e1889a71078243488bbf7c93ed90e545844b36aeb42b79265ab2c
DIST gitlab-shell-3.5.0.tar.gz 73374 SHA256 6591b768a4f51c535e97e5632518583f6559a4202f4219739ad01a27161687ef SHA512 b5935c6f9b19bab1716901c8015e107f7fbc545646d5e35a6a943e1692d3ddd61efeb862f4d59efe75eda9c1117adf9d90b50f572ab0a69199069d1fc52e8718 WHIRLPOOL 938c600d0810867fc9aef62a286b05dc34bf52352612530d459614483e3c37b3cef6ee5b2dc11f7b041218cbe569d11f4f5f0240b9c28e613bd762c06786772e
EBUILD gitlab-shell-3.2.1.ebuild 3653 SHA256 e8043271a1a42664862a4284a185ee11c7fc6c133a1b3c7dfb44b748d705cc3d SHA512 0232d94c21d675b1e8762a2de1d95a36bf41afc97435d84e54dd93bbf190cacbbfd426e6e6253c5f2f894c5d3ff7c878c261df7714d477c4332beeb433fea223 WHIRLPOOL 02fa858649c50c040fc16930c5f7f35dcb9d9df2d693898dd930cc945d0d5f264b52009cde063fafbaae78aecfab6dcf6d6f03fb9e4c2f9444300e8fd514175a
DIST gitlab-shell-3.6.0.tar.gz 74513 SHA256 4ad340fbd295b54ad92558fba9642d88b9759a46b9a5473c6a7d73faf9c4f9ce SHA512 beb2fa68f58adc58d5c6418e2a7dd0d15f007d730595dd8871298105dfec8140d9e14dd27350079f1878279a47b0b2096183c80dfd3c9744fd802332252b2005 WHIRLPOOL 32c6e57361ebdd1e031ea055a985a800a7e4c4f9312476c8b228484f02ba58618aa968ba598c5cc74966824029b12d1ec4c0a55e297d97a35c8b405f287aef66
EBUILD gitlab-shell-3.4.0.ebuild 3653 SHA256 7bf777fc3b5bda03f9a455874f62bb6260eeb73dd8727e4145ed0cda2e283465 SHA512 de5b78133d317155f5764d6888d421c4f2945ccb5972c032c05138344188eb0a0f85817431aa4348e2074667c901f44cf2b575f572aeb2620aab58a32ddba22b WHIRLPOOL e53de830c17bc9c784df06670c6fdc7465ba05ca40de42e4857e5a83421208f9bbb4381c2988fbabc85f86476d5c2b7301123392de132558bdd6f969726a9a57
EBUILD gitlab-shell-3.5.0.ebuild 3653 SHA256 3b73797e283ff4ec30c87d50a54a80cf6895c0c03dedc3ff34087b3037dd9fd5 SHA512 cc235d625f1eabac09822fbca06b706886601e550958338ea5ee7ccfdbbb85e2d96bb348b4ccce532c92d18389c63ddb78bcd77e407f789127fbb3d9ac32d0d9 WHIRLPOOL 4a8bb0ee8a1b547bb8517c300806457187a8fd1855b223cf079784733fdef55e2dd5fa9998da9523bcd3b021aa10d45cc74445bae5bd8f853e3355d6a1d6417a
MISC ChangeLog 1282 SHA256 0c3aaf7b0e9386180213edaf75d2be70cd75b4797c79a053be1e3bb109220012 SHA512 78232992b59d4d15947347fb3a7b8efcd399c8584886230a946ddeda8bb7ad06f42de730ceed9df296933c7d88a2441d8d8e8787f5610941f191076344c6bcd1 WHIRLPOOL 2db732b38f62051acadfbb434ffe1e3ac6861f9f213b688246cfa00404cbddb790d61c007b8a0c73ac43328622a2b54f46139da397ca4590af7235383823c31c
EBUILD gitlab-shell-3.6.0.ebuild 3653 SHA256 9a71f83a1bb91c904a43807572477ea143098bf2c7d77bf6777a4b783f524002 SHA512 370c559478716fe31376b6607c233c213df7f0abb3a9ecfc66506cfb29088e63600aecd3046cb272ec32dcb33f3b23a70dbaff5eed9cf308e274236d6dff9e67 WHIRLPOOL 0eee77706d9569d37d1b2cf77d0beacb0e72416d06b9bd937fad1115241908c66b12db6b466a3b579411721cf0d56e7f9137977a7b1fd9f983d7c52b0cb9d724
MISC ChangeLog 1624 SHA256 197f5e0ee973c3a48782b6ac5cbf4ec6a3730d4a1dd51f8b22b1ceaf6803487f SHA512 3eb75facea72c7b677507598d0afac5fbc993ea29ff8d82e7916e4c3e8a1b7120b1a28c105daebb315c529c5ba2fbeeec4d2fd64f39baa9afac2af6946cbcd3b WHIRLPOOL b726d6dcac750ac5f7f04823f016533d74affa068644e271909ff630a6db9e56a5f6a366ffd81fe58a67cfe5408a29d47da1f2e96b51b6f62c2f42d040007f80
MISC metadata.xml 234 SHA256 f35b97f99a26d73cc441e1d93bfe25aaa4e9f7f6d90c8d05a74f7b7bc5b68472 SHA512 59d8156b3ca3e99c40d5a2a32de7edf2eb53279b2424998862589d6bad77617d23fc852afec0a92f8ac5bb54a88ebc504cc0641029c1936412e90ab03dfdd447 WHIRLPOOL 935a1401910a42f888c991e443a49275ea8b87976c5aa977f670053d97d18754231749749bc92d37d4b5f45ecf65914480942a11b5827b6c08fb24313a428431

View file

@ -4,12 +4,12 @@
EAPI="5"
USE_RUBY="ruby20 ruby21"
USE_RUBY="ruby21 ruby23"
inherit eutils ruby-ng user
MY_PV="v${PV/_/-}"
MY_GIT_COMMIT="87b388232505b1715a1d7448dc393a383cd7a53f"
MY_GIT_COMMIT="894d8c16866b58e74791c933968a5a08c7aeb901"
DESCRIPTION="SSH access and repository management for GitLab"
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-shell"

View file

@ -1,3 +1,7 @@
23 Sep 2016; Manuel Friedli <manuel@fritteli.ch>
-files/fix-Makefile-0.7.8.patch, -gitlab-workhorse-0.7.8.ebuild:
dev-vcs/gitlab-workhorse: removed obsolete version 0.7.8
*gitlab-workhorse-0.8.2 (21 Sep 2016)
21 Sep 2016; Manuel Friedli <manuel@fritteli.ch>

View file

@ -1,13 +1,10 @@
AUX fix-Makefile-0.7.11.patch 380 SHA256 331a8fb441f2f26385ff72993afad04e03f23b81b69d2d2a7d84933f91096503 SHA512 c4c497d98346eac1d80a860957ffcce57b9da1df192a418030d1833711268919a5556b861922006f9af47971c7799e8f67466962479e5cd91b7089ca0668a3b9 WHIRLPOOL 4173604725a22413eec7620f947e986c02cce1a06a9db81a16d06115e7d2e367b34f87370acac6c48a2bb42c9444a92f4f98d830c484afbb9f3e43bc7a252b0a
AUX fix-Makefile-0.7.8.patch 397 SHA256 491e085466e5e653bb7adc13458fae4c2fa96e87d53ffcd16af1a012f7fddd05 SHA512 27ee0a6e40db1b02acd4c4b67e7d47045af93b063391ec2546340bd5b3b20e057e924b713549b35a2c0073eb62fea1f451073de4b311fa1fdb154421efdc4950 WHIRLPOOL 4475084cb5667ac3460c5c82fd68699125feec26dc54c68abbb20ba0e38e27c1ddd1bf39bb97e28dc7c9f6220e4db0db3f8d0d9571edbe3e591dae64881fd386
AUX fix-Makefile-0.8.2.patch 354 SHA256 5ad06525d351b433d32569040eac8756aa067860e20f68cea92e59807bbebfbb SHA512 e39e834c3346a75494de0b2daebaa2a2d519c35b5d4f42ffb5a92dcedfca9d2541f523791c744eb3effdcc62503134e3585a9f002425f787727e18614116c670 WHIRLPOOL 39bd515da32f8aa31be1532d5b32f073feaed3cbee2064075c67669c5c683094806e8438b4cf5bf3601de3009b0279787813f78827c25dd3fa7b6c455ab6823c
AUX gitlab-workhorse.conf 248 SHA256 6d11d63aa869cfd8c6f77c3a875984c226db633be899ad7ce97fafe94236eee7 SHA512 234213c8361702bdfeea40bd306b5899de19f34ce985e090a86e01aa601cf4ed23da4dfb75f74fe5986bbea5535a7a6a745406b4f67f79d352bd1c863777c7f1 WHIRLPOOL 8ac1134cde3aee942466d206e703ebd5330f83537d7e29641447f812d857bcc57b07fbf82eab086c0d622750694f64fabf8ffca2ba26a725f61b40fd1941e963
AUX gitlab-workhorse.init 654 SHA256 c7118997a4da198c477120a544969bdcb36404da8717aac79664ba3ca07e9c4a SHA512 7099a110efbd0fd02b3081ec7fba9f4221a7cc3d9e5292ff7c430546a7a5a05162d26939f6028da64490137835bdc03764fcce074d977976acb709409ab994d6 WHIRLPOOL 53943a20bfbce33ff569384a3b17475d718ec507d24f6fbff3da370fd9ef575f26ad00b4f0a59aa1a2073cb346e3ab6399c659d96bab79f872f5cb9c24e5a458
DIST gitlab-workhorse-0.7.11.tar.bz2 29401 SHA256 54515f030664e33ae3925d9a85c4fe166fb6316752d819f51cb592f553284b4c SHA512 3f8c8b46f60f13a8d747eb92d42db7d7dae133813df34b263ddc87aef04592888532c1f07c9eeed5eb708af8232a2a98a382e056ff184d61547be68ba55da4e9 WHIRLPOOL a4b17b2784e428ea092c76a3a3ba410565fb3c08c47ef542ddcc126785f3eda837b9462311944be1145076fcecc3da51029cef795c3db7b342e8d95606acfde9
DIST gitlab-workhorse-0.7.8.tar.bz2 28253 SHA256 0823495288304a4e2c6491fb011d509ccabea8af765bd35e47e6e5b1da52a599 SHA512 392d1a11da1f61fa5e319d8cf5fc2f158cbc90baaedbd98f33a992cc938f67efe5837e9731c8b4b8d1e8265620c5ae69ced3326eb376aa1cc691457eb6fbc002 WHIRLPOOL fa61930d4a8ecad35b3d27f46da731623f6e41898485d564403ee53badd793824afdf1376c0e0cf6e2e6e30cbf205091db3e416841f60bf6ff905504714ca1be
DIST gitlab-workhorse-0.8.2.tar.bz2 226124 SHA256 869feddeef18ab01183e2cd969445d5d091cbd09b7e9d98d1c1b505df7c84d62 SHA512 ad9d24e9eaed2644e5703600341aa1af37f69cc902d1dc49b0338dddbb56f987fa9608d447b29419c5e5d7548f4e8fa8f073b76dd9799994fb1464fb766e9da9 WHIRLPOOL 70f605ed70e1696e89ebd0964ded9e47f6401a0da942edf90a9fac4366a67d85e1b8e339cc8928bce5ba84af7ace950e17eaa3d2393ca19f3f39ee9a52cc27c3
EBUILD gitlab-workhorse-0.7.11.ebuild 904 SHA256 6623b233fac6d82c6f4b3026daa5c59743ce0243585d16f7d4ba81941c55b68e SHA512 2577c18ea0f0463f032d06a4e7390f78e527f412b9a5811c50d633d1cb818a49de0cc27cc29b9a7aacbf9e703547ca03a2650c2dffda78484e7190774346704c WHIRLPOOL 5652fa188f27dc2c0d03952832f66efef7c3f0b8118957bf1834460e67134ff7b94dc3528818e6a6b00893338bbe6fb13255e7b4b9a8c06f4c539106fd934800
EBUILD gitlab-workhorse-0.7.8.ebuild 904 SHA256 9b36bcbe79f70bc0b1010a34ff04b99726a773a9eba0cab260f92903d09b7a40 SHA512 9b1bd3afff478775539754f7b4b6db4be2881fc44ba9e09870b086e61bd5979973285c6780c4d6cba23e90d906868f60396ef1a2b91b8393ab0b7ee1ed362e5e WHIRLPOOL 3779eb573fc5a1104c38aace8782bea5ba259fb3c6d89b8772dd3d1c850165ec3f71b5cc0deb3176013b9ccb2365f1b8dddf657facaed161136a86b10062d6ec
EBUILD gitlab-workhorse-0.8.2.ebuild 938 SHA256 b8115b810a3187671f4e12c63a7558387aa177787fc1a3746417a4f63a1d681d SHA512 77c2aab70351392de04e6b44920b9d1be55a3bdab9592f6f10eff84d5bc3c000fedd6771f6ea4bb13421ffd77c186f43154520d667a694824030bc618fc6467b WHIRLPOOL 676fb6334d2ad7fbdda94a81c6a429278ffc2a0f33d28ff8df3763e63be3ef98b2d670562aaceced4ebc575976b463c0a3eb5d0893e3de9fde198e475ffb2431
MISC ChangeLog 3293 SHA256 8d506b55b5b1603c9f834275b5f3b6472f2266b834a743167a6ea15755851d75 SHA512 3fd404309264331c3ae3bdc6bb5e751989cf76d41e8f876bcb2390e3753fed1563949d95d5ef76e5865cf67162786b48bb1369b50491d19936a2e7e3e04d9a21 WHIRLPOOL 82288d57e59d1a771d47c64e255c6d60409d941f80d121d8cfcc7f591147a86616660c246066a4860948c6a678ebc0b5eb0e4cf2baf48cc1a35a9fdbb6da6975
MISC ChangeLog 3472 SHA256 2f6d659cf1a72b6234a5216bb182444fc648c7cbbf69531a97a4c106fe035ac9 SHA512 a30c96ddec9052b67c9d8180a5da10d8cf3d7023893149c484865adf386f0570d6b8a038f014e9ca49a0512ac4d02d95dad2febd677aa5a259254176ec909294 WHIRLPOOL 1a221be7bb6368dc31c0ab49ad3b8e5ab3e8d39372eb94c3000c113edc5b5f8e5e14a17b59ac802900d3b50636f3add79a4d9998b4d3f9625d7f301df7206389
MISC metadata.xml 234 SHA256 f35b97f99a26d73cc441e1d93bfe25aaa4e9f7f6d90c8d05a74f7b7bc5b68472 SHA512 59d8156b3ca3e99c40d5a2a32de7edf2eb53279b2424998862589d6bad77617d23fc852afec0a92f8ac5bb54a88ebc504cc0641029c1936412e90ab03dfdd447 WHIRLPOOL 935a1401910a42f888c991e443a49275ea8b87976c5aa977f670053d97d18754231749749bc92d37d4b5f45ecf65914480942a11b5827b6c08fb24313a428431

View file

@ -1,12 +0,0 @@
diff --git a/Makefile b/Makefile
index 9b3146d..b3c0630 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-PREFIX=/usr/local
-VERSION=$(shell git describe)-$(shell date -u +%Y%m%d.%H%M%S)
+PREFIX=${DESTDIR}/usr
+VERSION=v0.7.8-$(shell date -u +%Y%m%d.%H%M%S)
export GOPATH=$(shell pwd)/_build
GOBUILD=go build -ldflags "-X main.Version=${VERSION}"
PKG=gitlab.com/gitlab-org/gitlab-workhorse

View file

@ -1,37 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="6"
inherit eutils user
DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab >= 8.4"
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-workhorse"
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=v${PV} -> ${P}.tar.bz2"
S="${WORKDIR}/${PN}-v${PV}-f184885d77ba71ebac24cc51d5fba599306f2e00"
RESTRICT="mirror"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~arm ~arm64"
DEPEND=">=dev-lang/go-1.5.1"
PATCHES=( "${FILESDIR}/fix-Makefile-${PV}.patch" )
src_install() {
local dest=/usr/bin
diropts -m755
dodir ${dest}
exeinto ${dest}
for f in "${PN}" gitlab-zip-cat gitlab-zip-metadata ; do
doexe "${S}/${f}"
done
## RC script ##
newinitd "${FILESDIR}/${PN}.init" "${PN}"
newconfd "${FILESDIR}/${PN}.conf" "${PN}"
}

View file

@ -1,3 +1,24 @@
23 Sep 2016; Manuel Friedli <manuel@fritteli.ch> gitlab-ce-8.12.0.ebuild:
www-apps/gitlab-ce: added missing keywords for version 8.12.0
23 Sep 2016; Manuel Friedli <manuel@fritteli.ch> gitlab-ce-9999.ebuild:
www-apps/gitlab-ce: updated dependencies for gitlab-ce-9999
23 Sep 2016; Manuel Friedli <manuel@fritteli.ch>
-files/gitlab-ce-8.9.1-fix-redis-config-path.patch,
-files/gitlab-sidekiq.service:
www-apps/gitlab-ce: deleted obsolete auxiliary files
23 Sep 2016; Manuel Friedli <manuel@fritteli.ch> -gitlab-ce-8.10.6.ebuild,
-gitlab-ce-8.11.0.ebuild, -gitlab-ce-8.11.2.ebuild, -gitlab-ce-8.11.3.ebuild,
-gitlab-ce-8.11.4.ebuild, -gitlab-ce-8.11.5.ebuild:
www-apps/gitlab-ce: removed old versions
*gitlab-ce-8.12.0 (23 Sep 2016)
23 Sep 2016; Manuel Friedli <manuel@fritteli.ch> +gitlab-ce-8.12.0.ebuild:
www-apps/gitlab-ce: added ebuild for version 8.12.0
*gitlab-ce-8.12.0_rc6 (21 Sep 2016)
21 Sep 2016; Manuel Friedli <manuel@fritteli.ch> +gitlab-ce-8.12.0_rc6.ebuild,

View file

@ -1,30 +1,18 @@
AUX gitlab-8.10.6-sidekiq.service 1085 SHA256 de97287a5cb1d04dd4b6ac96e3569503cf797e605b325e13d4807d72cbcd7333 SHA512 9d5f3ee50f293ae0c9f353f7f9eeed00c57fd54e75a206bf7ec9b201453099222668e1d77dcfe6b35ee9a8722860551822897339c4741e0c612054a9423f132b WHIRLPOOL 5b5cb94db5c7a2c46b487821baba6fe31fa08ecc1cbae6f9b1655d32f95c57c7c8f1bede19d09a8c572512e40b0c8daf27d50ebfcbc8e4af449e21b01ad11441
AUX gitlab-ce-8.11.0-fix-redis-config-path.patch 423 SHA256 4878d37082c7e5c0aba239d4432ddec23c083230b816cf1ed6792bfd8f6c56fa SHA512 81a543af308bcd11a93a73368aedc89604078f60c0cacf4f614ff18dc5975b2c0d030ad6565fbb134188c8f6fceb74f2767f706d6f5701092252513f5e18de11 WHIRLPOOL 81f6258f03d234c6298b7bfe2982bdfd5f86dea3405ce03d4391b484a4802f7cbe33606ce4561ca67c16a5826dec131a185fa3189c2115b4a9ec8a3b87a2ee16
AUX gitlab-ce-8.7.5-fix-sendmail-config.patch 705 SHA256 cfc4ffd896e03cc763601aca5cdd5ac43f85152705cbf5a4e9144a6156d6f77e SHA512 a92659db8cab022185d87f321b037b1731612bf5f89b9df4552dd49b843bb49b6019f8ddda96a6fd6cb6544664a1c3d52ca5fee2c11be8b33698cc713219510f WHIRLPOOL 81a6504a8583bc46ea4005d9f8a2113802439161c40f11d3da46332b8980fc6b9520d81d9e32a6555bcdc893245448ba9151a271c511ae87f6468f588d4804b0
AUX gitlab-ce-8.9.1-fix-redis-config-path.patch 411 SHA256 d88b8c4d4dcc30d7533bc9cccd735d8ca7b2ae3878938904b1b5ba36e11a810c SHA512 4852edec468d5f62f6e903687a1791fd8cc840f361448a538fb3d42e8a885aa326a7663538145eed7f852f3b66a90b8a0ca9dc90f86534bdcc42e66855a801c9 WHIRLPOOL ffeec14be3859e5640e3348de98f67660eacda7a63ea13b463e6411f516a40d09a9e99d841939c9d4317544f2bb6d813156b461e61be27c08b68a67bc2ecbfd6
AUX gitlab-mailroom.service 773 SHA256 39cea460db7fc505b136a2106902d0515890180e74913bf364aa499368fc5f2e SHA512 f82c63a180add1103e2bd115e67826ad7362a844991ef16f1de7fc6c78bf1955155ecf278fc0d759e674ab85736f3ba2a6650d00e9b3ce683316875efd9efa3c WHIRLPOOL 683c67b12f9666d1c1df5ec61e0072acaecd3aff43d0ff475037e178bc58fd9036ae6d8cd45e922098c842abd057231afd4767ce229d4581356f153b48a06208
AUX gitlab-sidekiq.init 990 SHA256 cc996184ae4c1b64fc5ee9325bf3f4bc30753896f6608a2f04112d8552359c38 SHA512 9064b5a2fb1280c7fd674c613e19893b5b4f21cc48967cad1c3ff6caef2d4cdbf077359c453e5bb97226c26348475a97fb055df2bac991a7260811cb933361af WHIRLPOOL f2a298a91318ee067451e90f8b52b45c2dcf7e621bd7014917f8fadfd92949c967b45c59434eac3813fd1acd1dc96b8b481f9d9c324627580f29c0f438bf99db
AUX gitlab-sidekiq.service 1066 SHA256 b9a15ee7498cc5ebecfd51a037ab1e32e66723a1612d5ce9365eefd890b5670e SHA512 33ece22389637b7b4591f4dceedb488fb43a92ca47facb19432f87772bbbf1774d4fb737ace52a6d55533c9e291e343dc56971c6f70fed285a10429d6d97d318 WHIRLPOOL b5a81751b8317bb9244018f9ed82f9793734adbad9983c244429a33d710169eeeed25cdf868d724032866d83bb9676ccbbf616b53363491e15a80e474443f331
AUX gitlab-unicorn.init 3127 SHA256 de2f5861bec58eaac284e74baabe25288a520bc4f7da089a2c53a9494bbea884 SHA512 ae63cc6ef11eb1d3ed155c77dab413d8f7d281ac9c6362dfda12e0fafe23eb9a907a0275d14298c642ba7568119b483b1c520b322dc791f3a9ce64fbffb600f3 WHIRLPOOL de69ab338278e73637b6b1d346bb882d51c4468e71d89932718f394fb9f44725c79897eba8b0230069584ae7d8b92239bb2247c7ff8b46a99383739939a13088
AUX gitlab-unicorn.service 773 SHA256 010c9e223a30400d9155b39499eb0d7efad23b66baab9fcd9e365c689086b9bd SHA512 0bf9630aa91ed8f590a7bfa42d09b7ba33f6342b43b3d191c792c11157f8926c2a2ac2390eebd8179637e29b5bf68233d4699d62463497a0fd45b9bdbdd9167b WHIRLPOOL fbc709a5550dcc548a35c22c812dafe52ee507f5678b57c22c709ee89a399ae9109e2f56b7a13135d4140f1e024ebc4effe4aa4de13e0f36691da2a0737d9792
AUX gitlab-workhorse.service 930 SHA256 09348a52fec333b4b19828752e0484400c1efa9dfb644723fcf8e80537e294b6 SHA512 6332024fe0049287899cf482b6e4439e9dd90da14e489d08aa8e5e79cb7872efcc517d99b69fa23b011b382acb1e5926496a78f08af5d2d64daa515b869a0c6a WHIRLPOOL 3749c6719b2a35c7de29763cd616e1e9cc30a85aa1630ffc46440334459b5922503d52629556c125a6dd6574bdc5f23f1b2a7f2a85e2270a415b22246e0b6bae
AUX gitlab.conf 27 SHA256 cd9be088bbb67a5400407fc6f63c061eb224f16748b7d0812ff2c101f43ca263 SHA512 909c49fee6d050c1e94b2559ff2a9d54c5c346492be0e2920b50d56d69eaddbed67e3ac12e012d2a9601b5596640ebf33c8dc68fc588a03ca370d963294be37f WHIRLPOOL fa436e8d7d2643d450259d26b6e7b24dae69df47ed22e5ef2a567f37aa785fbf3b0eb1129ae7c8bf8986c29559fc3b744a34064375e5245dce2b10053cd715d9
DIST gitlab-ce-8.10.6.tar.gz 21039451 SHA256 8c7313ce49dfec816ba74187f920960229f3740d2a433582d48d8f03ac0ffd71 SHA512 aed0a8760eec42ebe059b271134ccad644092a2ce0a7f51a1f338428edbe045d636bf115450fd55ecce500445a94bccece6a7a4ec32f6cc0fbde8f5c3d879dcd WHIRLPOOL 69b3c694d27020edeeacd8da6f2826cbf7c704cd4b11387ac3baf07ec07b37b8374fc73256d39b132f51f49e8038dce16db8eb266dd807acd126a0de1584e244
DIST gitlab-ce-8.11.0.tar.gz 25292875 SHA256 581f228ea5caaa872d180b5864929070b18d16f565bf265a237f85f57fbe04c7 SHA512 41f9a192118ef7a044ed587e45ef6aa7fdd90bc002dd893a201cfcc2b367c6eb1137ea7f4969ac4caec284e68a92b1b1af46218764ea1f9b0ff18257b4dec925 WHIRLPOOL 4b79dab88def24af0c3f71222e14cfc7314132185c14993c8085b1d00ea61250496ca9e2c97b9e8d0d3303440184f500caf7ea16524ab2c1330c83d9766ecd40
DIST gitlab-ce-8.11.2.tar.gz 25627225 SHA256 a807f06cb80ac3becae2f89702988203e2843cdd929f5e21ba073babe6987731 SHA512 7bdbf045c36a65528b960e466ab8b8bcc930aacb1201ce332a0a9329808960d0fede27c6e155a26b0eb64a1ec0c2c75901cdca6051df7f0f31d421e970004f16 WHIRLPOOL 4cad8c23cfbdb3620a758b6e7478bf044a23d9aeb748aae3ff7145e25e2b4d7bfc016d8ad43b029b563e99e5aa24b35dcc8178775f7e3c8b0586c65c321de166
DIST gitlab-ce-8.11.3.tar.gz 25701850 SHA256 23dc756ae148074701acaefcc686a66ccf703da53dce721f0fc2673f143620eb SHA512 0808da71567799396389164b54954caf326a501199ded766c0cb39905d7aef44df7267e2066b3bd9a586833df7b19dbf4ae4b7f356aa49ad9d8eed065b162d90 WHIRLPOOL 87277ed4793e75814d82ed3bb8076ddb4fe5f47aa68115121c80d6899ab2fad56a39e1ec88e9ac157961a6ef2dc57d076f265816dc58a5b86ab36d15bffc5535
DIST gitlab-ce-8.11.4.tar.gz 25704666 SHA256 c8d94888b4f7aabaab2d548926935edf0fc284277006e284424e202122b072a3 SHA512 dc4f2dfaabe95ecea1202da8e1af6d850281146faa7ed2c522c34abd0167f9ff4b4807fca76a61fc2f607126efedca552652474edf552f2848d797f92b5b1ef2 WHIRLPOOL 30b2a46e3b3a4503fd1a1cc68eb2709b76067068550729fe45b9a4b3917cfac08932da689743744c03041a7b705432a4f601fb6a1e2d81a897cc035197e90b5f
DIST gitlab-ce-8.11.5.tar.gz 25704701 SHA256 5a0de2cdcb97396d8174ad49126e67829df47a2abf1831439186ae443e692662 SHA512 961dad680e4a7a158e316ac66e29ff42bb4f065796fcf360c6cba4c102eb67a240ea188a8ef1164608e05a3d6c5e04790ecc73ea2f2e5cc89766a2751b108532 WHIRLPOOL 35c1e8f7ba2f9fba159cd182c97f0d14f17b289e6e238027beccd9f805fa8622a353c507a56a9ec8d81bc64698fd35fc2cd0ad73c35a86a03cb894c62b458848
DIST gitlab-ce-8.11.6.tar.gz 25705796 SHA256 354da5db4087ce80d9f43cbae87830ccd06c2c559f8dfb764dffd7420588a66b SHA512 5abda185bfbbad61060ac9b5e83101d88f0f6c8cc12580c71467c7bfdc380d60acc9a8a855ac448759c8be9a5297ba721d0e641ec144741a7c57dd038e13b269 WHIRLPOOL 046ecd777cebc8768c9cdefab7f782c7943403e0c5c6b963ee2359f10f446b5cbe6974d07e14a3089c79830722de6d1e965fa2a58316e75a280ddf09825a1fe6
DIST gitlab-ce-8.12.0.tar.gz 27105188 SHA256 373109c33ded8f14f3f21e675afa9de8a2a8dd6519309b51844a50f79c5337f4 SHA512 81129858de4a574e2c56958c8c7de8177ce15028993dcff77aa7aea18eb4eb0bbab247d02eca88ffa6da1353f7ea2961332fd4843fe402a35f733e0e9f1484ce WHIRLPOOL 72a70bd3248648f947cc39d7d2633a28e5d9da29adb33675f3fc1f15f6ab5ec181063f13cfc44b90f286ccf0b1214941aaefb41d8ab84f92b4a5868155bbffca
DIST gitlab-ce-8.12.0_rc6.tar.gz 26786541 SHA256 41719da8de79093accae302c0cb7082e3e4248ed2413f6cda456051fead1f05c SHA512 e5c6ea64e3fc495c41dfe405325caf3fb34e58416d6cf284805f3e9666b085f4ef58b97e0de04ded4cf658421d8e4b716781f9ce58465410a7a715e72800feaf WHIRLPOOL b29ae1c37f71e4474077f18fe42f07bca213f7cf6faa2f942b615430aa68245a43a6223e430926c1b917debff548fd6d6b8c3f5c6e4e7ddd121878e2c390e9ba
EBUILD gitlab-ce-8.10.6.ebuild 11710 SHA256 1659a2e43491488fa6fbbee1699cc4138e8938f694e73310e5faf45fbd9f2578 SHA512 70304f8fe862988d4092dd37c5a66fdfec56c9cb2d62a78f2cdf365a0c629606c6fb9081dbdc7e68530d43894d1cb645d168db8f3f0c8a9999873afd9032ec52 WHIRLPOOL dbf26294a9d6eb4258a67c64844370f1423fa59210b306bc66ea53a902cbc564b1cd084b765759e93d7970df30417e6482dfbbf271dda8d387ef006837123ac3
EBUILD gitlab-ce-8.11.0.ebuild 11703 SHA256 f95aa4a60c85da0155df6b989e343296eba23a6c2f12055c5f94bee53f5d9bc0 SHA512 6d1c7c3e3139d456a7b22431b326401a9b56e435000a02a572bfdbb52c5495e098b0406ab9b8051a2a901878e3a3a2c4332af9a0bf50ff1a36051f9436c1ddbe WHIRLPOOL bd92de9d5fda4a4b1802e814a55ea1e1a9848a9e085b9ad88ba108771dc68953156c8cecde64ef2250eba8f2b9568f73969460aa61c4901957d9b7771558ed9c
EBUILD gitlab-ce-8.11.2.ebuild 11712 SHA256 02dd8184aa55060d9b36fefef46d2506f2516034fdff03837205ca152706f13f SHA512 cb14a84ba0e34f795a06f8947e222fb2fa1ee9a79d3d81bc527498e7ccbbb06ec5e26c56d39e0da30148e918397daaaca4337e732e8791994ed7aaf731cae185 WHIRLPOOL 63309d30e1e41db231f074fadef91fda5fc6d7dc0fa85339b64f4a6522d598c2b67b593f769e4ce70d2343607f6f42eee60614bf0556e2a4848a142c8d326fff
EBUILD gitlab-ce-8.11.3.ebuild 11712 SHA256 41be23427e3c7d550888eec40091d7e6f6c0cbe477712bb0597362db1490e342 SHA512 fca0648f60a292438746b9ba4ab532957a58889458e45c20ad3d18cf6b46130fe8c4087a813fe2b93ac15f6ab756e67188087c5bf51222b16230bd1fb9431872 WHIRLPOOL b1c09c4f9bc50c584f5e22e2db955d636631ec117054c40c77f68945ed64a048a598f014bc463ad9a5afce3f3317dcafd6bcf9321d2c38a1e36e2fe11506e500
EBUILD gitlab-ce-8.11.4.ebuild 11954 SHA256 1970a09040e9d4e924a187bf108dece607825fe62a2fed7a6202a8c24e878f15 SHA512 189157bd48f107fff5e7b476f4b103c40c81baf2620bd1bf5600547f66c3dfe4ad7aec4001422c4f69a49ba973fdff724d8868d0cbba9719bed4908f3bb60772 WHIRLPOOL 4f270f6251d4172c956492ac3f2d7a2041db4d5ec3b344f43af9f0d01fc8fd3274e225ecbd1d35128757ece050cd91db5db74629c377d553de2afcf015ce9c48
EBUILD gitlab-ce-8.11.5.ebuild 11954 SHA256 1d064416cf453ac5e66dcb39c332db6ef01636f647dafd80faeb357f61a8c365 SHA512 927327684f3914962f2f48c74dd620cc0e8c1fac0ba5eb00e0411f61189ab8bf77bcc3ee9aa3be533e354c0375935ba981d276487faa965e2159e509d00c5468 WHIRLPOOL f6114dfed971973a89a350637818c9546554aac04fc637b276b37411e3e6b425e254dd8c2bb05019893c07f24deefe35d08a6234b2be4c06c1a6f56d39f21d33
EBUILD gitlab-ce-8.11.6.ebuild 11954 SHA256 2752b8057eac0cd77e74bc7f323a6ab0037c9d70559a637f15e30f11ba244b65 SHA512 a649871bc5594aac19ac816a53a164edde1c7a70933c777489ee45c98515099c2748dd2a65fb433481ecd69ed9fd1f386e2f137b8cb9761453252ceab362e4cd WHIRLPOOL b623e4a6ed638c42672f0f8cde252681c89b92831d8bfb687a8ab7bb374335552586b77bd7066a898ed6612715732f538b29acbe874bd31e72c63f49e54deb00
EBUILD gitlab-ce-8.12.0.ebuild 11960 SHA256 c02ccd983fff15a89ec2e09724f1908f632e1128517ae3fd842c6c6f4751d1fe SHA512 6a262e1147476b0a5a7eacce17810fd5457787bf495217a4dadc5f51e262a10b88060e3aa164292a864ec5c7f7fa20f9c7735774e6478006eac54471abffa664 WHIRLPOOL 24fd204309bdb045abdde7708310bee18fb929c9828f51121f68e9439ce5ec9e18bf0265e68e825b7c0d028c84dbb8a7a2f112e7bf052209ea8bfd91c42bef21
EBUILD gitlab-ce-8.12.0_rc6.ebuild 11937 SHA256 bfa85ccd3fa55a8950eb7ebc031440fcd9d3729cc722a8d353a1dc349e68f4b7 SHA512 2d5c6c8c01fc6e062a82507699bd796d2aca0fbbbd6ac900ab31eef5c8fd627eee62f5b49ea8dacdfbbefaa5675cece97067c0c9752fb4f06545935478c6b8c8 WHIRLPOOL 2940994a2d5905a96952a9f7a1f57007b5207d03a1511082d6381a76270ac4512867e54fdd26bb9216fa32ffc3cfbd2a672f875c19f423f5a3ef480159bb3fa4
EBUILD gitlab-ce-9999.ebuild 11892 SHA256 3e4cda7670cb343d61d63debf9ec390cb120dc7ffec8365cbee111ab50a06390 SHA512 b3d441e4969266e20d9c9391ffd731df2d7d316d798bf9dc7905f29c18f62dcd2ec63291e640b138a3d4880a4f639bcc98003eadcb3c49c38fedd3ad94f32901 WHIRLPOOL 8ef66ad909c9496facd3c56523a2ddf419bf4dfadd41b81ebdfaef3560f7ad53d9f67f655b3014e997198dc43c362c59d0d7d24decc7da015c66d63acedff254
MISC ChangeLog 7132 SHA256 17ff36af26618680d517a40aa93205b909452d08eed211f1bba1320b00a33a1d SHA512 8a1b86bfccec235d03be373ba8a198cd824f12e2e335cf2b477ce887f8f7d454808574ec41a2f98483d4fb260933de40091a397d1ce9146f05d3b38c15af16bc WHIRLPOOL 756cafb79713b742756b10d0083e7c96e3e0fcf090ad998705681ce3929391d0b5719d49b3989f914a2e0c41d8a136d8dc41bd641a5dccf13a854b3977d89121
EBUILD gitlab-ce-9999.ebuild 11892 SHA256 b6620aa1ec2f68e6c9941604c084b3bcdce9b1186ba026833c2adb456f64f31e SHA512 098f275db05cb96f96e53e9dca1b50c3d16607d807482650269d92ac8428c5a96f51facbb9f9d85450ea06bba6e169da82c02b440a7fec0608ee684c9b892a16 WHIRLPOOL 99163d4084f3561219c90cce5123d7028e4e2b4211e0bc70c43ec4e622270d1aa67f5fe0c0e0af7bdcbf1491566ebf93b042b3061ddc626a23b22e68662c237c
MISC ChangeLog 8028 SHA256 37aefa1dd66abe6cbd23092847e2b1fdb622a0c5546aad12d73c67f4369af3ae SHA512 d436930343a16a91484adaf23cfb2f94f939c7804e844f1f3514bf414da8fa2c7f772fedcab858c56b4ef18f01d42f00793cac108c5bff36e6f6187af6fef1f9 WHIRLPOOL 49b752988384306ad831e7ce4f2a3ebc8cae3b068dbd2c199de23c3bc58e2df82ed555df36e3eca69f5cc54bf3ec31d0a861af4f559f97f7c666614ed98a8433
MISC metadata.xml 545 SHA256 1b7fc44d811e1ab7638fe4a40253f49d5f1071872d3020c22c4f67662750cb2f SHA512 86f47d297892bccfefa087d93936296f5647993a9ec8e3f47907a6859cbf385e5bc6f00502d7836c9e8d9efef2b6725bf145b0150924c2082b2bd164469ef6ea WHIRLPOOL 6bfb8a55684d68c8bfa6e025a0be965f7b815394ee0896dd2a13cfb524e3cf3f3149acc9072897e30a1842060389576aac07ea8beb4a8b0bfc3e8eab3723f2a1

View file

@ -1,13 +0,0 @@
diff --git a/config/mail_room.yml b/config/mail_room.yml
index 7cab24b..49690d8 100644
--- a/config/mail_room.yml
+++ b/config/mail_room.yml
@@ -2,7 +2,7 @@
<%
require "yaml"
require "json"
-require_relative "lib/gitlab/redis" unless defined?(Gitlab::Redis)
+require_relative "/opt/gitlab/lib/gitlab/redis" unless defined?(Gitlab::Redis)
rails_env = ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development"

View file

@ -1,27 +0,0 @@
#####################################################
#
# GitLab version : 5.x - 7.x
# Contributors : davispuh, mtorromeo, axilleas, boeserwolf91, Stefan Tatschner (rumpelsepp)
# Downloaded from : https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/init/systemd
#
####################################################
[Unit]
Description=GitLab Sidekiq Worker
Requires=redis.service
Wants=mysqld.service postgresql.service
After=redis.service mysqld.service postgresql.service
[Service]
Type=forking
User=git
WorkingDirectory=/opt/gitlab
Environment=RAILS_ENV=production
SyslogIdentifier=gitlab-sidekiq
PIDFile=/run/gitlab/sidekiq.pid
ExecStart=/usr/bin/bundle exec "sidekiq -d -q archive_repo -q post_receive -q mailer -q system_hook -q project_web_hook -q gitlab_shell -q common -q default -e production -P /run/gitlab/sidekiq.pid -d -L /var/log/gitlab/sidekiq.log >> /var/log/gitlab/sidekiq.log 2>&1"
ExecStop=/usr/bin/bundle exec "sidekiqctl stop /run/gitlab/sidekiq.pid >> /var/log/gitlab/sidekiq.log 2>&1"
[Install]
WantedBy=multi-user.target

View file

@ -1,381 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
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="ruby21"
inherit eutils ruby-ng user systemd
MY_PV="v${PV/_/-}"
MY_GIT_COMMIT="ea71c20d7f60641466c5928d6a22ddab6c739722"
DESCRIPTION="GitLab is a free project and repository management application"
HOMEPAGE="https://about.gitlab.com/"
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.gz?ref=${MY_PV} -> ${P}.tar.gz"
RUBY_S="${PN}-${MY_PV}-${MY_GIT_COMMIT}"
RESTRICT="mirror"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~arm ~arm64"
IUSE="kerberos mysql +postgres +unicorn systemd rugged_use_system_libraries"
## 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/ragel
net-libs/nodejs
postgres? ( >=dev-db/postgresql-9.1:* )
mysql? ( virtual/mysql )
kerberos? ( virtual/krb5 )"
CDEPEND="
dev-util/cmake
virtual/pkgconfig"
COMMON_DEPEND="
${GEMS_DEPEND}
~dev-vcs/gitlab-shell-3.2.1
>=dev-vcs/git-2.7.4
~dev-vcs/gitlab-workhorse-0.7.8
kerberos? ( !app-crypt/heimdal )
rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 )"
DEPEND="
${CDEPEND}
${COMMON_DEPEND}"
RDEPEND="
${COMMON_DEPEND}
>=dev-db/redis-2.8
virtual/mta
systemd? ( sys-apps/systemd:0= )"
ruby_add_bdepend "
virtual/rubygems
>=dev-ruby/bundler-1.0"
#
# fix-sendmail-config:
# Fix default settings to work with ssmtp that doesn't know '-t' argument.
# fix-redis-config-path:
# Point to the absolute location of redis_config.rb
#
RUBY_PATCHES=(
"${PN}-8.7.5-fix-sendmail-config.patch"
"${PN}-8.9.1-fix-redis-config-path.patch"
)
MY_NAME="gitlab"
MY_USER="git" # should be same as in gitlab-shell
DEST_DIR="/opt/${MY_NAME}"
CONF_DIR="/etc/${MY_NAME}"
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/${MY_PV}/bin/background_jobs
SIDEKIQ_QUEUES="post_receive,mailers,archive_repo,system_hook,project_web_hook,gitlab_shell,incoming_email,runner,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:).*|\1 /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}
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 kerberos; do
without+="$(use $flag || echo ' '$flag)"
done
local bundle_args="--deployment ${without:+--without ${without}}"
use "rugged_use_system_libraries" && export RUGGED_USE_SYSTEM_LIBRARIES="YES"
einfo "Running bundle install ${bundle_args} ..."
${RUBY} /usr/bin/bundle install ${bundle_args} || die "bundler failed"
einfo "Cleaning old gems ..."
${RUBY} /usr/bin/bundle clean
# clean gems cache
rm -Rf vendor/bundle/ruby/*/cache
rm -Rf vendor/bundle/ruby/*/bundler/gems/charlock_holmes-dde194609b35/.git
## RC script ##
if use systemd ; then
ewarn "Beware: systemd support has not been tested, use at your own risk!"
systemd_newunit "${FILESDIR}/gitlab-8.10.6-sidekiq.service" "gitlab-sidekiq.service"
systemd_dounit "${FILESDIR}/gitlab-unicorn.service"
systemd_dounit "${FILESDIR}/gitlab-workhorse.service"
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
else
local rcscript=gitlab-sidekiq.init
use unicorn && rcscript=gitlab-unicorn.init
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@USER@|${MY_USER}|" \
-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}"
fi
# fix permissions
fowners -R ${MY_USER}:${MY_USER} ${dest} ${temp} ${logs}
}
pkg_postinst() {
elog "If this is an update from a previous version, stop your GitLab"
elog "instance and issue the following command to perform all required"
elog "migrations:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog "PLEASE NOTE: It's HIGHLY recommended to backup your database"
elog "before running the config phase. Run these commands (as root):"
elog
elog " cd /opt/gitlab"
elog " sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production"
elog
elog "If this was a fresh install, follow these steps:"
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 initialize the environment:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog " Note: Do not forget to start Redis server first!"
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."
if use postgres; then
elog "Please note: As of GitLab 8.6, users of PostgreSQL need to enable the"
elog "`pg_trgm` extension by running the following command as a PostgreSQL"
elog "super user for *every* GitLab database:"
elog " CREATE EXTENSION IF NOT EXISTS pg_trgm;"
elog "For details, see the documentation at the GitLab website."
fi
}
pkg_config() {
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
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
elog
elog "If you want to make sure that the install/upgrade was successful, start"
elog "Gitlab now and then run these commands (as root):"
elog
elog " cd /opt/gitlab"
elog " sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production"
elog " sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production"
elog
}
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 $@"
}

View file

@ -1,381 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
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="ruby21"
inherit eutils ruby-ng user systemd
MY_PV="v${PV/_/-}"
MY_GIT_COMMIT="346e677ef9db2a27c3ee69d420563ecc564e5afe"
DESCRIPTION="GitLab is a free project and repository management application"
HOMEPAGE="https://about.gitlab.com/"
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.gz?ref=${MY_PV} -> ${P}.tar.gz"
RUBY_S="${PN}-${MY_PV}-${MY_GIT_COMMIT}"
RESTRICT="mirror"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~arm ~arm64"
IUSE="kerberos mysql +postgres +unicorn systemd rugged_use_system_libraries"
## 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/ragel
net-libs/nodejs
postgres? ( >=dev-db/postgresql-9.1:* )
mysql? ( virtual/mysql )
kerberos? ( virtual/krb5 )"
CDEPEND="
dev-util/cmake
virtual/pkgconfig"
COMMON_DEPEND="
${GEMS_DEPEND}
~dev-vcs/gitlab-shell-3.4.0
>=dev-vcs/git-2.7.4
~dev-vcs/gitlab-workhorse-0.7.8
kerberos? ( !app-crypt/heimdal )
rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 )"
DEPEND="
${CDEPEND}
${COMMON_DEPEND}"
RDEPEND="
${COMMON_DEPEND}
>=dev-db/redis-2.8
virtual/mta
systemd? ( sys-apps/systemd:0= )"
ruby_add_bdepend "
virtual/rubygems
>=dev-ruby/bundler-1.0"
#
# fix-sendmail-config:
# Fix default settings to work with ssmtp that doesn't know '-t' argument.
# fix-redis-config-path:
# Point to the absolute location of redis_config.rb
#
RUBY_PATCHES=(
"${PN}-8.7.5-fix-sendmail-config.patch"
"${P}-fix-redis-config-path.patch"
)
MY_NAME="gitlab"
MY_USER="git" # should be same as in gitlab-shell
DEST_DIR="/opt/${MY_NAME}"
CONF_DIR="/etc/${MY_NAME}"
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/${MY_PV}/bin/background_jobs
SIDEKIQ_QUEUES="post_receive,mailers,archive_repo,system_hook,project_web_hook,gitlab_shell,incoming_email,runner,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:).*|\1 /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}
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 kerberos; do
without+="$(use $flag || echo ' '$flag)"
done
local bundle_args="--deployment ${without:+--without ${without}}"
use "rugged_use_system_libraries" && export RUGGED_USE_SYSTEM_LIBRARIES="YES"
einfo "Running bundle install ${bundle_args} ..."
${RUBY} /usr/bin/bundle install ${bundle_args} || die "bundler failed"
einfo "Cleaning old gems ..."
${RUBY} /usr/bin/bundle clean
# clean gems cache
rm -Rf vendor/bundle/ruby/*/cache
rm -Rf vendor/bundle/ruby/*/bundler/gems/charlock_holmes-dde194609b35/.git
## RC script ##
if use systemd ; then
ewarn "Beware: systemd support has not been tested, use at your own risk!"
systemd_newunit "${FILESDIR}/gitlab-8.10.6-sidekiq.service" "gitlab-sidekiq.service"
systemd_dounit "${FILESDIR}/gitlab-unicorn.service"
systemd_dounit "${FILESDIR}/gitlab-workhorse.service"
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
else
local rcscript=gitlab-sidekiq.init
use unicorn && rcscript=gitlab-unicorn.init
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@USER@|${MY_USER}|" \
-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}"
fi
# fix permissions
fowners -R ${MY_USER}:${MY_USER} ${dest} ${temp} ${logs}
}
pkg_postinst() {
elog "If this is an update from a previous version, stop your GitLab"
elog "instance and issue the following command to perform all required"
elog "migrations:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog "PLEASE NOTE: It's HIGHLY recommended to backup your database"
elog "before running the config phase. Run these commands (as root):"
elog
elog " cd /opt/gitlab"
elog " sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production"
elog
elog "If this was a fresh install, follow these steps:"
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 initialize the environment:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog " Note: Do not forget to start Redis server first!"
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."
if use postgres; then
elog "Please note: As of GitLab 8.6, users of PostgreSQL need to enable the"
elog "`pg_trgm` extension by running the following command as a PostgreSQL"
elog "super user for *every* GitLab database:"
elog " CREATE EXTENSION IF NOT EXISTS pg_trgm;"
elog "For details, see the documentation at the GitLab website."
fi
}
pkg_config() {
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
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
elog
elog "If you want to make sure that the install/upgrade was successful, start"
elog "Gitlab now and then run these commands (as root):"
elog
elog " cd /opt/gitlab"
elog " sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production"
elog " sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production"
elog
}
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 $@"
}

View file

@ -1,381 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
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="ruby21"
inherit eutils ruby-ng user systemd
MY_PV="v${PV/_/-}"
MY_GIT_COMMIT="e618ce28a0862c4bda9d0db4ba843ca79c15d31b"
DESCRIPTION="GitLab is a free project and repository management application"
HOMEPAGE="https://about.gitlab.com/"
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.gz?ref=${MY_PV} -> ${P}.tar.gz"
RUBY_S="${PN}-${MY_PV}-${MY_GIT_COMMIT}"
RESTRICT="mirror"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~arm ~arm64"
IUSE="kerberos mysql +postgres +unicorn systemd rugged_use_system_libraries"
## 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/ragel
net-libs/nodejs
postgres? ( >=dev-db/postgresql-9.1:* )
mysql? ( virtual/mysql )
kerberos? ( virtual/krb5 )"
CDEPEND="
dev-util/cmake
virtual/pkgconfig"
COMMON_DEPEND="
${GEMS_DEPEND}
~dev-vcs/gitlab-shell-3.4.0
>=dev-vcs/git-2.7.4
~dev-vcs/gitlab-workhorse-0.7.11
kerberos? ( !app-crypt/heimdal )
rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 )"
DEPEND="
${CDEPEND}
${COMMON_DEPEND}"
RDEPEND="
${COMMON_DEPEND}
>=dev-db/redis-2.8
virtual/mta
systemd? ( sys-apps/systemd:0= )"
ruby_add_bdepend "
virtual/rubygems
>=dev-ruby/bundler-1.0"
#
# fix-sendmail-config:
# Fix default settings to work with ssmtp that doesn't know '-t' argument.
# fix-redis-config-path:
# Point to the absolute location of redis_config.rb
#
RUBY_PATCHES=(
"${PN}-8.7.5-fix-sendmail-config.patch"
"${PN}-8.11.0-fix-redis-config-path.patch"
)
MY_NAME="gitlab"
MY_USER="git" # should be same as in gitlab-shell
DEST_DIR="/opt/${MY_NAME}"
CONF_DIR="/etc/${MY_NAME}"
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/${MY_PV}/bin/background_jobs
SIDEKIQ_QUEUES="post_receive,mailers,archive_repo,system_hook,project_web_hook,gitlab_shell,incoming_email,runner,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:).*|\1 /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}
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 kerberos; do
without+="$(use $flag || echo ' '$flag)"
done
local bundle_args="--deployment ${without:+--without ${without}}"
use "rugged_use_system_libraries" && export RUGGED_USE_SYSTEM_LIBRARIES="YES"
einfo "Running bundle install ${bundle_args} ..."
${RUBY} /usr/bin/bundle install ${bundle_args} || die "bundler failed"
einfo "Cleaning old gems ..."
${RUBY} /usr/bin/bundle clean
# clean gems cache
rm -Rf vendor/bundle/ruby/*/cache
rm -Rf vendor/bundle/ruby/*/bundler/gems/charlock_holmes-dde194609b35/.git
## RC script ##
if use systemd ; then
ewarn "Beware: systemd support has not been tested, use at your own risk!"
systemd_newunit "${FILESDIR}/gitlab-8.10.6-sidekiq.service" "gitlab-sidekiq.service"
systemd_dounit "${FILESDIR}/gitlab-unicorn.service"
systemd_dounit "${FILESDIR}/gitlab-workhorse.service"
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
else
local rcscript=gitlab-sidekiq.init
use unicorn && rcscript=gitlab-unicorn.init
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@USER@|${MY_USER}|" \
-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}"
fi
# fix permissions
fowners -R ${MY_USER}:${MY_USER} ${dest} ${temp} ${logs}
}
pkg_postinst() {
elog "If this is an update from a previous version, stop your GitLab"
elog "instance and issue the following command to perform all required"
elog "migrations:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog "PLEASE NOTE: It's HIGHLY recommended to backup your database"
elog "before running the config phase. Run these commands (as root):"
elog
elog " cd /opt/gitlab"
elog " sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production"
elog
elog "If this was a fresh install, follow these steps:"
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 initialize the environment:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog " Note: Do not forget to start Redis server first!"
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."
if use postgres; then
elog "Please note: As of GitLab 8.6, users of PostgreSQL need to enable the"
elog "`pg_trgm` extension by running the following command as a PostgreSQL"
elog "super user for *every* GitLab database:"
elog " CREATE EXTENSION IF NOT EXISTS pg_trgm;"
elog "For details, see the documentation at the GitLab website."
fi
}
pkg_config() {
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
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
elog
elog "If you want to make sure that the install/upgrade was successful, start"
elog "Gitlab now and then run these commands (as root):"
elog
elog " cd /opt/gitlab"
elog " sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production"
elog " sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production"
elog
}
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 $@"
}

View file

@ -1,381 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
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="ruby21"
inherit eutils ruby-ng user systemd
MY_PV="v${PV/_/-}"
MY_GIT_COMMIT="6cd4edb7d869d793ee73f4eb880b900203995cec"
DESCRIPTION="GitLab is a free project and repository management application"
HOMEPAGE="https://about.gitlab.com/"
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.gz?ref=${MY_PV} -> ${P}.tar.gz"
RUBY_S="${PN}-${MY_PV}-${MY_GIT_COMMIT}"
RESTRICT="mirror"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~arm ~arm64"
IUSE="kerberos mysql +postgres +unicorn systemd rugged_use_system_libraries"
## 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/ragel
net-libs/nodejs
postgres? ( >=dev-db/postgresql-9.1:* )
mysql? ( virtual/mysql )
kerberos? ( virtual/krb5 )"
CDEPEND="
dev-util/cmake
virtual/pkgconfig"
COMMON_DEPEND="
${GEMS_DEPEND}
~dev-vcs/gitlab-shell-3.4.0
>=dev-vcs/git-2.7.4
~dev-vcs/gitlab-workhorse-0.7.11
kerberos? ( !app-crypt/heimdal )
rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 )"
DEPEND="
${CDEPEND}
${COMMON_DEPEND}"
RDEPEND="
${COMMON_DEPEND}
>=dev-db/redis-2.8
virtual/mta
systemd? ( sys-apps/systemd:0= )"
ruby_add_bdepend "
virtual/rubygems
>=dev-ruby/bundler-1.0"
#
# fix-sendmail-config:
# Fix default settings to work with ssmtp that doesn't know '-t' argument.
# fix-redis-config-path:
# Point to the absolute location of redis_config.rb
#
RUBY_PATCHES=(
"${PN}-8.7.5-fix-sendmail-config.patch"
"${PN}-8.11.0-fix-redis-config-path.patch"
)
MY_NAME="gitlab"
MY_USER="git" # should be same as in gitlab-shell
DEST_DIR="/opt/${MY_NAME}"
CONF_DIR="/etc/${MY_NAME}"
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/${MY_PV}/bin/background_jobs
SIDEKIQ_QUEUES="post_receive,mailers,archive_repo,system_hook,project_web_hook,gitlab_shell,incoming_email,runner,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:).*|\1 /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}
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 kerberos; do
without+="$(use $flag || echo ' '$flag)"
done
local bundle_args="--deployment ${without:+--without ${without}}"
use "rugged_use_system_libraries" && export RUGGED_USE_SYSTEM_LIBRARIES="YES"
einfo "Running bundle install ${bundle_args} ..."
${RUBY} /usr/bin/bundle install ${bundle_args} || die "bundler failed"
einfo "Cleaning old gems ..."
${RUBY} /usr/bin/bundle clean
# clean gems cache
rm -Rf vendor/bundle/ruby/*/cache
rm -Rf vendor/bundle/ruby/*/bundler/gems/charlock_holmes-dde194609b35/.git
## RC script ##
if use systemd ; then
ewarn "Beware: systemd support has not been tested, use at your own risk!"
systemd_newunit "${FILESDIR}/gitlab-8.10.6-sidekiq.service" "gitlab-sidekiq.service"
systemd_dounit "${FILESDIR}/gitlab-unicorn.service"
systemd_dounit "${FILESDIR}/gitlab-workhorse.service"
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
else
local rcscript=gitlab-sidekiq.init
use unicorn && rcscript=gitlab-unicorn.init
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@USER@|${MY_USER}|" \
-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}"
fi
# fix permissions
fowners -R ${MY_USER}:${MY_USER} ${dest} ${temp} ${logs}
}
pkg_postinst() {
elog "If this is an update from a previous version, stop your GitLab"
elog "instance and issue the following command to perform all required"
elog "migrations:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog "PLEASE NOTE: It's HIGHLY recommended to backup your database"
elog "before running the config phase. Run these commands (as root):"
elog
elog " cd /opt/gitlab"
elog " sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production"
elog
elog "If this was a fresh install, follow these steps:"
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 initialize the environment:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog " Note: Do not forget to start Redis server first!"
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."
if use postgres; then
elog "Please note: As of GitLab 8.6, users of PostgreSQL need to enable the"
elog "`pg_trgm` extension by running the following command as a PostgreSQL"
elog "super user for *every* GitLab database:"
elog " CREATE EXTENSION IF NOT EXISTS pg_trgm;"
elog "For details, see the documentation at the GitLab website."
fi
}
pkg_config() {
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
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
elog
elog "If you want to make sure that the install/upgrade was successful, start"
elog "Gitlab now and then run these commands (as root):"
elog
elog " cd /opt/gitlab"
elog " sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production"
elog " sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production"
elog
}
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 $@"
}

View file

@ -1,386 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
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="ruby21"
inherit eutils ruby-ng user systemd
MY_PV="v${PV/_/-}"
MY_GIT_COMMIT="f1ce997f4a21bba8105bfde3404f7f462df8dfa7"
DESCRIPTION="GitLab is a free project and repository management application"
HOMEPAGE="https://about.gitlab.com/"
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.gz?ref=${MY_PV} -> ${P}.tar.gz"
RUBY_S="${PN}-${MY_PV}-${MY_GIT_COMMIT}"
RESTRICT="mirror"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~arm ~arm64"
IUSE="kerberos mysql +postgres +unicorn systemd rugged_use_system_libraries"
## 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/ragel
net-libs/nodejs
postgres? ( >=dev-db/postgresql-9.1:* )
mysql? ( virtual/mysql )
kerberos? ( virtual/krb5 )"
CDEPEND="
dev-util/cmake
virtual/pkgconfig"
COMMON_DEPEND="
${GEMS_DEPEND}
~dev-vcs/gitlab-shell-3.4.0
>=dev-vcs/git-2.7.4
~dev-vcs/gitlab-workhorse-0.7.11
kerberos? ( !app-crypt/heimdal )
rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 )"
DEPEND="
${CDEPEND}
${COMMON_DEPEND}"
RDEPEND="
${COMMON_DEPEND}
>=dev-db/redis-2.8
virtual/mta
systemd? ( sys-apps/systemd:0= )"
ruby_add_bdepend "
virtual/rubygems
>=dev-ruby/bundler-1.0"
#
# fix-sendmail-config:
# Fix default settings to work with ssmtp that doesn't know '-t' argument.
# fix-redis-config-path:
# Point to the absolute location of redis_config.rb
#
RUBY_PATCHES=(
"${PN}-8.7.5-fix-sendmail-config.patch"
"${PN}-8.11.0-fix-redis-config-path.patch"
)
MY_NAME="gitlab"
MY_USER="git" # should be same as in gitlab-shell
DEST_DIR="/opt/${MY_NAME}"
CONF_DIR="/etc/${MY_NAME}"
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/${MY_PV}/bin/background_jobs
SIDEKIQ_QUEUES="post_receive,mailers,archive_repo,system_hook,project_web_hook,gitlab_shell,incoming_email,runner,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:).*|\1 /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}
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 kerberos; do
without+="$(use $flag || echo ' '$flag)"
done
local bundle_args="--deployment ${without:+--without ${without}}"
use "rugged_use_system_libraries" && export RUGGED_USE_SYSTEM_LIBRARIES="YES"
einfo "Running bundle install ${bundle_args} ..."
${RUBY} /usr/bin/bundle install ${bundle_args} || die "bundler failed"
einfo "Cleaning old gems ..."
${RUBY} /usr/bin/bundle clean
# clean gems cache
rm -Rf vendor/bundle/ruby/*/cache
rm -Rf vendor/bundle/ruby/*/bundler/gems/charlock_holmes-dde194609b35/.git
## RC script ##
if use systemd ; then
ewarn "Beware: systemd support has not been tested, use at your own risk!"
systemd_newunit "${FILESDIR}/gitlab-8.10.6-sidekiq.service" "gitlab-sidekiq.service"
systemd_dounit "${FILESDIR}/gitlab-unicorn.service"
systemd_dounit "${FILESDIR}/gitlab-workhorse.service"
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
else
local rcscript=gitlab-sidekiq.init
use unicorn && rcscript=gitlab-unicorn.init
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@USER@|${MY_USER}|" \
-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}"
fi
# fix permissions
fowners -R ${MY_USER}:${MY_USER} ${dest} ${temp} ${logs}
}
pkg_postinst() {
elog "If this is an update from a previous version, stop your GitLab"
elog "instance and issue the following command to perform all required"
elog "migrations:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog "PLEASE NOTE: It's HIGHLY recommended to backup your database"
elog "before running the config phase. Run these commands (as root):"
elog
elog " cd /opt/gitlab"
elog " sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production"
elog
elog "If this was a fresh install, follow these steps:"
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 initialize the environment:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog " Note: Do not forget to start Redis server first!"
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."
if use postgres; then
elog "Please note: As of GitLab 8.6, users of PostgreSQL need to enable the"
elog "`pg_trgm` extension by running the following command as a PostgreSQL"
elog "super user for *every* GitLab database:"
elog " CREATE EXTENSION IF NOT EXISTS pg_trgm;"
elog "For details, see the documentation at the GitLab website."
fi
}
pkg_config() {
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
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
# determine whether this is an update or a fresh install. we do this by
# checking whether the ${DEST_DIR}/.git directory exists or not
#
if [ -d "${DEST_DIR}/.git" ]; then
local update=true
else
local update=false
fi
## Initialize app ##
local RAILS_ENV="production"
local RUBY=${RUBY:-/usr/bin/ruby}
local BUNDLE="${RUBY} /usr/bin/bundle"
# FIXME: this line existed in older ebuilds, but the variable is
# never used. what was it for!?
# local dbname="$(ryaml ${CONF_DIR}/database.yml production database)"
if [ "${update}" = 'true' ]; then
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
# 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
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
elog
elog "If you want to make sure that the install/upgrade was successful, start"
elog "Gitlab now and then run these commands (as root):"
elog
elog " cd /opt/gitlab"
elog " sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production"
elog " sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production"
elog
}
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 $@"
}

View file

@ -11,12 +11,12 @@ EAPI="5"
# difficult to maintain them via ebuilds.
#
USE_RUBY="ruby21"
USE_RUBY="ruby21 ruby23"
inherit eutils ruby-ng user systemd
MY_PV="v${PV/_/-}"
MY_GIT_COMMIT="b871b762bd5b9c8c3648e06549775c26a56b730d"
MY_GIT_COMMIT="0864ff999fd77f3efedaab22a2bc549206251703"
DESCRIPTION="GitLab is a free project and repository management application"
HOMEPAGE="https://about.gitlab.com/"
@ -54,9 +54,9 @@ CDEPEND="
virtual/pkgconfig"
COMMON_DEPEND="
${GEMS_DEPEND}
~dev-vcs/gitlab-shell-3.4.0
~dev-vcs/gitlab-shell-3.6.0
>=dev-vcs/git-2.7.4
~dev-vcs/gitlab-workhorse-0.7.11
~dev-vcs/gitlab-workhorse-0.8.2
kerberos? ( !app-crypt/heimdal )
rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 )"
DEPEND="

View file

@ -52,7 +52,7 @@ CDEPEND="
virtual/pkgconfig"
COMMON_DEPEND="
${GEMS_DEPEND}
>=dev-vcs/gitlab-shell-3.5.0
>=dev-vcs/gitlab-shell-3.6.0
>=dev-vcs/git-2.7.4
>=dev-vcs/gitlab-workhorse-0.8.2
kerberos? ( !app-crypt/heimdal )