Merge branch '72-gitlab-8-15-4' into 'master'

Resolve "GitLab 8.15.4"

Closes #72

See merge request !136
This commit is contained in:
Manuel Friedli 2017-01-10 23:17:42 +01:00
commit 2047da0238
11 changed files with 776 additions and 5 deletions

View file

@ -8,7 +8,11 @@ DIST gitlab-ci-multi-runner-1.7.0.tar.gz 3527772 SHA256 ffcc18bfc54d4e2846bbfb21
DIST gitlab-ci-multi-runner-1.8.0-prebuilt-arm.tar.xz 9502124 SHA256 78a4cee8b91e7a13568104da7c39d526f08f26d946b59cca7bb94b9dc9f87be7 SHA512 2fab0a4088b67ff3be67734f5abfe67301c3ced9d7cf952b4fb71322395f582604aeb28ad3d6338d4890d7b743f76a6d7a297f7435f83778843d4eda02b90e36 WHIRLPOOL c7025ba1d0181388d92c07c2ed67befec2982fbfa74c112b7dbfacd23a0052fe99e6555a926c1cc99d638c0a00c1385bff9d5637624ca26f62891f213e62d8fb
DIST gitlab-ci-multi-runner-1.8.0-prebuilt-x86_64.tar.xz 8560472 SHA256 9588eb55ade4e323bd5bfeffd3bfc119659d0c2075e18c5bb003a4d79b834839 SHA512 2406ea113cf9d08ccafebc7c79cd42adba5f35a5ccfb282856b7e6c187402d9ef41ceaac973133579afd52933ff7a59bea4e57820f1374f33c748f636701f77e WHIRLPOOL 93d20c9d5660d3c00cc45063cb49d14a2442328d6782e4abe0b1a1fca5d1e612d27e1c88eb834cd12bb745e7d94121e922199fb77dce287f68bcda6c1a8f44c0
DIST gitlab-ci-multi-runner-1.8.0.tar.gz 3541906 SHA256 0636134f34fd03b1e1407374725ff21f49cb2869f4c5b897bb52e40bdc5aa0ba SHA512 1fb20e359ada1612d6f6120061e62af31410f445d789104f958f3561c8a6479048dedda2338cf01a10197a42da708c31ce3174d1218f94f9f9c88c0dd7d0f29f WHIRLPOOL bb4b22ef4862e0251125e2354342ddeaa0b680662c4c8ec1ce8d223155976ae71a7c6b135774de74294493259a3f2758bb0a78f5f27818569ff7e98ccf8ca966
DIST gitlab-ci-multi-runner-1.9.2-prebuilt-arm.tar.xz 16002708 SHA256 c4f7297865fafa4e7841e513a26b334cf9f29ad6d7ec4b12381d6031fa6f9648 SHA512 e1d905048bbfb1415f93a443e457ae47cd7f969eeae82f6dc5bcbdce37e2aa4219a97b97080c8b7767523490017cd8ec0fbf681375e27348e87c4d230db844ae WHIRLPOOL 0b76317c29b81dd53c7ae4c2b9f6bcdc7bcb28e6d5101a45f8c4eccf11259e88f2eac7751e84e6f5b3e91298e32980cabd1a1fd07c0cc260dfdde9e479f9c116
DIST gitlab-ci-multi-runner-1.9.2-prebuilt-x86_64.tar.xz 8717016 SHA256 7d0759dd04f930a231c1a713d8e44a149666112ff1d841c5173847a373496278 SHA512 aaf1b859dd353bca3810ebb85dca0fadbf7f728b262ef00f6a793e9eaf100a05466f26a8bd55acc0270876e5725519941f6086bb375d9f9285fce7f5bf66351c WHIRLPOOL 7e5af9b63feb36ba4e09b12faaa05cb31b453f8f98ded396005429db1f392cb370c75f0c9ddfc07e169cf77f9dceb4abac5abd195a30e2a3ccb03819275f55a5
DIST gitlab-ci-multi-runner-1.9.2.tar.gz 3563622 SHA256 ed480b29f5dd305758e1158a7a2d60ad892bf3b39fc48903861b241c7391e920 SHA512 7721cc80cd9abaf5ab44f53836e7718eb2df360cea378f4898ef6e9d6b671a09df1e69b70ac99ed8c6c042af9da6415e614db52b5c1e9476bbfe72e146628f04 WHIRLPOOL accb7458dd7ce1334e66f76ed90d970c5e6974505a2376a3e0c9e42d7169986aa18ed9dc64f11dac1366b42b4efddd18e1baa072d4f56e57d3a6c6300ee1f3bb
EBUILD gitlab-ci-multi-runner-1.7.0.ebuild 3250 SHA256 fc9f976619ff9ddedaceee812dd2babcb1fb7d7236868368d23a5b67b60bd08b SHA512 276835a37b5be71c8663f92bb093c568ecdcae69d45a88a9ce3ccf896cefd3d59a7f8bfce43eed7de72744e4a60b110b8ca9ae8c2fed94f62c0da475e5c40a50 WHIRLPOOL cc4796822e8443f81f958c8fa39475fb1b168ca06b7e8c38f148b91b77da033c1113c88dd818aaf14265ea07ade5de367235168cdf6e2ccb276ffd45538e9812
EBUILD gitlab-ci-multi-runner-1.8.0.ebuild 3258 SHA256 d54d70f365868526144decb5671c834bf259d8b8659ec57a8ed9cd55cb6589da SHA512 7023a29d0615b986ef6d0fb0f2ca3ba9f0c0cca095b739cb7da63eb13cb4bee413978807032a674bd5876da9eda198a8fbb11be44c5fe43099e8e98148524b10 WHIRLPOOL c77aaa33c1d24a278cf53d63aa54052c5bddc5c671d2189457b209dcd8a8bf4c911f50be6478c613ba111a709f500f2fb4ba98399fc78a5ece897c852b79d4a4
EBUILD gitlab-ci-multi-runner-1.9.2.ebuild 3271 SHA256 15167499bd8c8662b5332be9425fe7865ed19ec2b74aa49aef0de79add6736ae SHA512 dc291f755446862dff99ffcfabdf249f88c931bf65c55e68ad605f4fdc4de0d6c154f2f9136b8316417b279bbf7569f5b70c00e641a7a6c95f1a42b389560e6b WHIRLPOOL 616e79f0682844fda4ddadf398cb207529327a5fcd95f24aa1d5084e667c0aaa1a5aa7b577077de595ff10683fdb0d502b008a8aa3b1592cd0930699bf9a0c2f
MISC ChangeLog 970 SHA256 6b782cc9d2618b14bde5cd1349d0fbb0c5f8cf8d26334940957eddc03bcdf023 SHA512 5e14b351e0027c93dfece9e7c3699041462a88bdf925bfe98c769c85db062788dee1db83fe7f6531bf649e18bf1d32d36bd56a2df6a08e9df2dc2befa57d327f WHIRLPOOL 8ce90d38d3de5e56eb0d00532bcc50fcee32853bda97b57e913a9afd00e1e81dc1f8c4e63ab30e1979da2ff340bbf4990d7c6dca432d2c6d94bb5ec18f33043a
MISC metadata.xml 329 SHA256 f0ae08a64aa32a07486e744ce11ac5448770b7320454015bcd065e312fcb5e9c SHA512 11e4eaf25633c5979e5243350bdf2ddc6d9dca06ab54ec38359591f1d002ea2a224e53b3e6c4ac53b5b2e795a87769fdbd97c547b008272e0a1491141f422e5d WHIRLPOOL ab2c1cb3d9aff1f757b49633f94d4b98da4b83dadab12ab8d869f9e1f6763b3125010147472e58e910e7fc42da262dbd69a1bf3939f3720a79ab4329184b4c35

View file

@ -0,0 +1,117 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
inherit eutils golang-build golang-vcs-snapshot user
EGO_PN="gitlab.com/gitlab-org/gitlab-ci-multi-runner/..."
MY_PV="v${PV/_/-}"
MY_BRANCH="1-9-stable"
MY_GIT_HASH="ade6572"
DESCRIPTION="Official GitLab CI Runner written in Go"
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-ci-multi-runner"
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.gz?ref=v${PV} -> ${P}.tar.gz
!docker-build? (
https://${PN}-downloads.s3.amazonaws.com/${MY_PV}/docker/prebuilt-x86_64.tar.xz -> ${P}-prebuilt-x86_64.tar.xz
https://${PN}-downloads.s3.amazonaws.com/${MY_PV}/docker/prebuilt-arm.tar.xz -> ${P}-prebuilt-arm.tar.xz
)"
KEYWORDS="~amd64"
LICENSE="MIT"
SLOT="0/${PVR}"
IUSE="docker-build"
DEPEND=">=dev-go/gox-0.3.1_alpha
>=dev-go/go-bindata-0_pre20151023
docker-build? ( >=app-emulation/docker-1.5 )
!dev-vcs/gitlab-ci-multi-runner-bin"
RESTRICT="test"
MY_USER="gitlab_ci_multi_runner"
MY_HOME_DIR="/opt/gitlab-ci-multi-runner"
pkg_setup() {
enewgroup ${MY_USER}
enewuser ${MY_USER} -1 /bin/bash ${MY_HOME_DIR} ${MY_USER}
}
src_prepare() {
if ! use docker-build; then
mkdir -p src/${EGO_PN%/*}/out/docker || die
cp "${DISTDIR}"/${P}-prebuilt-x86_64.tar.xz src/${EGO_PN%/*}/out/docker/prebuilt-x86_64.tar.xz || die
cp "${DISTDIR}"/${P}-prebuilt-arm.tar.xz src/${EGO_PN%/*}/out/docker/prebuilt-arm.tar.xz || die
else
einfo "You need to have docker running on your system during build time"
einfo "$(docker info)"
fi
epatch "${FILESDIR}/0001-fix-Makefile-1.8.0.patch"
local arch="$(usev amd64)$(usev x86)$(usev arm)$(usev arm64)"
sed -i -E \
-e "s/@@VERSION@@/v${PV/_/-}/" \
-e "s/@@REVISION@@/${MY_GIT_HASH}/" \
-e "s/@@BRANCH@@/${MY_BRANCH}/" \
-e "s|@@OSARCH@@|linux/${arch}|" \
src/gitlab.com/gitlab-org/${PN}/Makefile
eapply_user
}
src_compile() {
emake GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" RELEASE=true -C src/${EGO_PN%/*} build
}
src_install() {
golang-build_src_install
dobin bin/*
dodoc src/${EGO_PN%/*}/README.md src/${EGO_PN%/*}/CHANGELOG.md
# set up dirs
# here be the builds
diropts -m755
dodir ${MY_HOME_DIR}
# here be my home and my castle
local conf="/etc/gitlab-runner"
diropts -m750
dodir ${conf}
dosym ${conf} ${MY_HOME_DIR}/.gitlab-runner
# fix permissions
fowners -R ${MY_USER}:${MY_USER} ${MY_HOME_DIR} ${conf}
# rc script
local rcscript="${PN}.init"
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@USER@|${MY_USER}|" \
-e "s|@HOME@|${MY_HOME_DIR}|" \
"${T}/${rcscript}" \
|| die "failed to filter ${rcscript}"
newinitd "${T}/${rcscript}" "${PN}"
newconfd "${FILESDIR}/${PN}.conf" "${PN}"
}
pkg_postinst() {
elog
elog "If this is a fresh install of GitLab CI Multi Runner, please configure it"
elog "with the following command:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
}
pkg_config() {
einfo "You need to register the runner with your GitLab CI instance. Please"
einfo "Follow the instructions at"
einfo
einfo "https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-manually.md"
einfo
einfo "Perhaps I'll improve the ebuild later ... kthxbye."
}

View file

@ -1,9 +1,12 @@
AUX gitlab-shell-3.2.0-config-paths.patch 1826 SHA256 c83db7c37dcac577ce499eab4bb0168253f49d303ba1991fdec90d13cc3fe37a SHA512 7524b6b8cd7cd141a56c468efa303b1d21576ac9e03cb866cbf9dcac34e1b8d4f356333737050e2e5dfeb0f0ad904b3f548c40e1209c1f35054ed2027b1d8271 WHIRLPOOL fdbd2dfe43ff4a2af97227fbf8c4589ca3734ebf0320b7e9c5e8ea39882c49d45815a0ee3c765a141affacbe48f4063987b9664a918e0e216b49ca46a475cc5f
AUX gitlab-shell-4.1.1-config-paths.patch 2152 SHA256 e789f0c8a8b7ec8a840ce26dd63d6e5386a149f619d7ad5a6788577d897c4826 SHA512 6ae5af0c364061af4c9675804e2f6d6b662ed4891ed4c80bc1be39e9da6343db372e58bf04a0d3c8a4fc218daeb8cda45636e0da0c67ec801168e84004d05b86 WHIRLPOOL b8136b81ef943c15feeca303d1d7f0d55c85ff7f7ec82bfceea026ce334ca24fce0dfb599946562bd0aceb89a2216bcfaa894235c43f41e3031a305f85e756b4
DIST gitlab-shell-3.6.6.tar.gz 77199 SHA256 db3f54b561bb81059256c634967b181707e11cc25e30b0fa76eb034718d0eaf9 SHA512 d1d15687169f7b151caf3b371d6570099129a2a69d7732e6be7337f70aaef7e36c87e8aa5140e9697c7be36185743bb939d862790b440fc18d7a864d570fcb6b WHIRLPOOL 4161901369cc12a89fb89c41bd98cfc2cfdeb5aac6d317597ae11f10bcd401e4c18148ce9a20f5e967a6fb11559f33aa72c82dff1a52764c5a19bcd0f06250c1
DIST gitlab-shell-4.0.0.tar.gz 76582 SHA256 2d8d5e31eac5007a70720465d71c6cee74428a71c2fda7e21ca8393bc8c8966f SHA512 dd44528dc2914025e850b7172df1c5e0b39f8c1764adeea62a824643723c3264c462006ddf0cc6f4519d0caf0c39e6cee601f9f7988eb54138118176178045e4 WHIRLPOOL 462886da23a1723049914759f0b315d39c42488e55dfab4debae57c7b20878a421dac36a77d5e82603119e4eb142c83dbf18e28213670abd81396de1d0c683cf
DIST gitlab-shell-4.0.3.tar.gz 76721 SHA256 66f9a3572e6cd06632a267a5248c4878bf48ff62f5360b3108f42100b3ffd361 SHA512 b45027141557403a9e7818dec93b3e790a38887c22f3a2d0f298f1238e51ce4d96f603b2b225433275afd601e7544a611b98ec6711b0ed95228f321fe4b8d898 WHIRLPOOL 836e7476c874cfede14b66ee445cfac08db2cf22f2803fc0def8a20924e2578b441d605d85a923f2951bd5a6a9d11e79f1a15762bd401b8111e61fbe1d28b56e
DIST gitlab-shell-4.1.1.tar.gz 78829 SHA256 61f684b4528b0b789aad80efbfd8f9870d113f6e2794e589e0db9e74e6737e1d SHA512 17b929da1c6148a9af2787ca4a18081e3108622a40c6fb3f02f36f4ba41f2a1d61cf83509ace849093334af8f4ad74d8a36393bf9fca7ab21163d2f48b499879 WHIRLPOOL cfd258e93abeae4a33c1578114d56186c81a7c5894a3ccb9b690dd9a78051746916f3bac2b7146b8378534d5e177ba4cacb4c2011b64011328b056d4d397967e
EBUILD gitlab-shell-3.6.6.ebuild 3653 SHA256 49c383d1d5895069a6783e44d492935879801efd95f57548a81e10df48339038 SHA512 4e6dd5c34a56ed0e1fc45819c93239c61d900304cc8df20855f4e71e4fab234b5e81612f256155022f362f4f9a0959531a3999eb7ece9013914129e4343795cf WHIRLPOOL 92d40a6cb8dd19a42093a746e29ead878eeb9b0c741e23ca3e6213c0a14b820584633db8f2d5ac60cd28da15546232de417db72ccdf8608bc49ac333107f7193
EBUILD gitlab-shell-4.0.0.ebuild 3653 SHA256 1413668c9a75cc89b4043e497b9339639bcfce942486d8dada512968c53633b9 SHA512 0f825e5812084601b56f790d880da266986717cd2a35a4033cb75710b3cae624fe5015412a0674dab3c2099eaf29a956af19ffcc6d671bcddf72dfb8507f47e1 WHIRLPOOL dff4dc61e0f568767e25e865546a57018f82b2f28c5bc974df263021d19c0cf194a269b21b8422878e09cb3fd8c7cb34600e005c49dacde0c56df1701bb5e64c
EBUILD gitlab-shell-4.0.3.ebuild 3653 SHA256 4c47b55bc61c0d86499f2b7ab3a94ae1b5b6886faf9035f2a98094ebf7701aea SHA512 7de7b0c8b164d50de2cac220f66fe5a9a51809db8e565e74d27449ac2629c566b0d5d90b3d6f9dd0a2bf609526ec4cc62744d2c80d27b302d5719ec28f3485c3 WHIRLPOOL 79ea419a1107ea54aa0937cee7043e7691799ead6dabea69bb11ea57af0403102e5e7ab4de844f2358449578dd583d433eebfc567f88c1e2110e7fe1731ca47b
EBUILD gitlab-shell-4.1.1.ebuild 3653 SHA256 06702f4658b8ac1bada6b322b833f65270656730417d8c9bb000ab1fb23af8f0 SHA512 dc63160d98dabfcbaa9982fe841fd581a1b1b2a968e7c7bd1ee336e449214fa89da33477f0d4744941ee3ecb8688386883a5923e78025bdcfd1556e68ea7371c WHIRLPOOL cd59e133d1d02f082f10312b358c6c8718898aa008a967fc85934656500ceefc44a6affae286123c481aa902fa51cdb7e7f98788057fdd08304ed99f643ef27c
MISC ChangeLog 2576 SHA256 bdf6d8055e11a9d46fa77cd325fca046028cc50e6c5cfdb2350ad4aa5190370a SHA512 e88f5072f982524104ebef77c018946d1f37a1f0bb572c29e9bb529de4a774a6ceba1844a0b5d40a130f4c29b8dae177387f8bbf7b28c2736ee621a7fec8cdcc WHIRLPOOL f4852d792d410e59b97bcc65e14575f1ca77f562eba89dde926375efb8d5660c27e0ab4d2336f33bf898b2c468b6b6b82b9168e36bb96305107d17ebf2464efc
MISC metadata.xml 248 SHA256 7b43be15755627edf5c12cf1b50c607d781558640bf8375d685d51d7ade99a32 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2 WHIRLPOOL 993013c9878ead35469db13d3072f694a341ee654182e0c31d0678f5dd6de4bdc8d59a0b7bb6d685dc41ea6b55dac518cd8034131baea8002170c680e50304d1

View file

@ -0,0 +1,69 @@
diff --git a/config.yml.example b/config.yml.example
index cf6c91b..7e144fe 100644
--- a/config.yml.example
+++ b/config.yml.example
@@ -25,15 +25,15 @@ http_settings:
self_signed_cert: false
# File used as authorized_keys for gitlab user
-auth_file: "/home/git/.ssh/authorized_keys"
+auth_file: "/var/lib/git/.ssh/authorized_keys"
# File that contains the secret key for verifying access to GitLab.
-# Default is .gitlab_shell_secret in the gitlab-shell directory.
-# secret_file: "/home/git/gitlab-shell/.gitlab_shell_secret"
+# Default is /opt/gitlab/.gitlab_shell_secret.
+# secret_file: "/opt/gitlab/.gitlab_shell_secret"
# Parent directory for global custom hook directories (pre-receive.d, update.d, post-receive.d)
# Default is hooks in the gitlab-shell directory.
-# custom_hooks_dir: "/home/git/gitlab-shell/hooks"
+# custom_hooks_dir: "/usr/share/gitlab-shell/hooks"
# Redis settings used for pushing commit notices to gitlab
redis:
@@ -55,7 +55,7 @@ redis:
# Log file.
# Default is gitlab-shell.log in the root directory.
-# log_file: "/home/git/gitlab-shell/gitlab-shell.log"
+log_file: "/var/log/gitlab/gitlab-shell.log"
# Log level. INFO by default
log_level: INFO
diff --git a/lib/gitlab_config.rb b/lib/gitlab_config.rb
index a51a32c..7763802 100644
--- a/lib/gitlab_config.rb
+++ b/lib/gitlab_config.rb
@@ -4,11 +4,11 @@ class GitlabConfig
attr_reader :config
def initialize
- @config = YAML.load_file(File.join(ROOT_PATH, 'config.yml'))
+ @config = YAML.load_file('/etc/gitlab-shell.yml')
end
def home
- ENV['HOME']
+ "/var/lib/git"
end
def auth_file
@@ -16,7 +16,7 @@ class GitlabConfig
end
def secret_file
- @config['secret_file'] ||= File.join(ROOT_PATH, '.gitlab_shell_secret')
+ @config['secret_file'] ||= "/opt/gitlab/.gitlab_shell_secret"
end
# Pass a default value because this is called from a repo's context; in which
@@ -43,7 +43,7 @@ class GitlabConfig
end
def log_file
- @config['log_file'] ||= File.join(ROOT_PATH, 'gitlab-shell.log')
+ @config['log_file'] ||= "/var/log/gitlab/gitlab-shell.log"
end
def log_level

View file

@ -0,0 +1,130 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
USE_RUBY="ruby21 ruby23"
inherit eutils ruby-ng user
MY_PV="v${PV/_/-}"
MY_GIT_COMMIT="a3712cc18de8283b25c3a8a034ecc8c9b7feca48"
DESCRIPTION="SSH access and repository management for GitLab"
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-shell"
SRC_URI="https://gitlab.com/gitlab-org/gitlab-shell/repository/archive.tar.gz?ref=${MY_PV} -> ${P}.tar.gz"
RUBY_S="${PN}-${MY_PV}-${MY_GIT_COMMIT}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~arm ~arm64"
IUSE=""
DEPEND=""
RDEPEND="
>=dev-vcs/git-2.7.4
dev-db/redis
virtual/ssh"
ruby_add_bdepend "
virtual/ruby-ssl"
MERGE_TYPE="binary"
RUBY_PATCHES=(
"${PN}-4.1.1-config-paths.patch"
)
GIT_USER="git"
DEST_DIR="/usr/share/${PN}"
DATA_DIR="/var/lib/git"
LOGS_DIR="/var/log/gitlab"
CONF_FILE="/etc/gitlab-shell.yml"
pkg_setup() {
enewgroup ${GIT_USER}
enewuser ${GIT_USER} -1 /bin/bash ${DATA_DIR} "${GIT_USER}"
local git_shell=$(egetshell ${GIT_USER})
if [ ! ${git_shell} -ef '/bin/bash' ]; then
ewarn "User ${GIT_USER} already exists, but with the shell ${git_shell}."
ewarn "Changing shell to /bin/bash ..."
usermod -s /bin/bash ${GIT_USER} \
|| die "failed to change login shell for ${GIT_USER}"
fi
}
all_ruby_prepare() {
# fix paths
sed -i -E \
-e "s|/home/git|${DATA_DIR}|" \
-e "s|[\# ]*(log_file: ).*|\1\"${LOGS_DIR}/gitlab-shell.log\"|" \
config.yml.example || die "failed to filter config.yml.example"
sed -i \
-e "s|File\.join(ROOT_PATH, 'config.yml')|'${CONF_FILE}'|" \
lib/gitlab_config.rb || die "failed to filter gitlab_config.rb"
}
all_ruby_install() {
# install lib
insinto ${DEST_DIR}; doins -r lib LICENSE README.md VERSION
# install scripts
exeinto ${DEST_DIR}/bin; doexe bin/*
exeinto ${DEST_DIR}/hooks; doexe hooks/*
exeinto ${DEST_DIR}/support; doexe support/*
# create symlinks to bin
local name; for name in $(basename -a bin/gitlab-*); do
dosym "${DEST_DIR}/bin/${name}" "/usr/bin/${name}"
done
insinto $(dirname ${CONF_FILE})
newins config.yml.example $(basename ${CONF_FILE})
# create symlink for .gitlab_shell_secret
einfo "creating symlink for .gitlab_shell_secret"
TOKEN_FILE="${DEST_DIR}/.gitlab_shell_secret"
dosym /opt/gitlab/.gitlab_shell_secret "$TOKEN_FILE"
# prepare directories
diropts -m750; dodir ${DATA_DIR}
diropts -m770; keepdir ${DATA_DIR}/repositories
diropts -m755; dodir ${LOGS_DIR}
# GitLab stupidly expects that gitlab-shell is in home of git user...
dosym ${DEST_DIR} ${DATA_DIR}/gitlab-shell
# fix permissions
fowners -R ${GIT_USER}:${GIT_USER} ${DATA_DIR} ${LOGS_DIR}
}
pkg_postinst() {
# check git home directory
local git_home=$(egethome ${GIT_USER})
if [ ! "${git_home}" -ef ${DATA_DIR} ]; then
ewarn "An authorized_keys is configured to be inside ${DATA_DIR}/.ssh,"
ewarn "but HOME of ${GIT_USER} user is located in ${git_home}. You must"
ewarn "either change the authorized_keys location in ${CONF_FILE},"
ewarn "or change home directory of ${GIT_USER} user to ${DATA_DIR}"
ewarn "and move ${git_home}/.ssh here."
ewarn
fi
local auth_dir="${git_home}/.ssh"
elog "Initializing authorized_keys file in ${auth_dir}"
mkdir -p ${auth_dir}
touch ${auth_dir}/authorized_keys
chmod -R u=rwX,go=- ${auth_dir}
chown -R ${GIT_USER}:${GIT_USER} ${auth_dir}
elog
elog "GitLab Shell was initialized. Repositories are located in"
elog "${DATA_DIR}/repositories, scripts in ${DEST_DIR}/bin."
elog "All gitlab-* scripts was symlinked to /usr/bin to be on your path."
elog
elog "You should change your gitlab_url in: ${CONF_FILE}."
}

View file

@ -2,15 +2,18 @@ AUX fix-Makefile-0.8.5.patch 354 SHA256 1773a2e9f535c08f602903924b24918553acf563
AUX fix-Makefile-1.0.0.patch 354 SHA256 97432841e31d2904f6c3d23b4a5e885def82423c404d45e7b0a03be23bf683cc SHA512 44c0a7b8a3078b7308645fcb7c2ec801ac774dcd138356f3c01e6cdd6cd80bbf1fab155f2b604b0f000f6189f36b3c0a1bd8cf9dbb69ca2f8e6fe7e709ffe86b WHIRLPOOL ca42e23b701247f900615d2dbf1d6c983bfb5aa0519c9e100d94e6019a018f11c30794522aba05e0bee89dfa1a898dc2271326fc495cb3428603e972d3c548d0
AUX fix-Makefile-1.0.1.patch 354 SHA256 afd87271fc72b95ec823cc71621f641ba13759eb41302328b6a6406e12679b77 SHA512 0e7e3cf42bffcc513526f8610b93444f2d702d4cb71ca07aa413288c1fd977b667c718116d92e4a2dec5605b5c7950f5184ce49761b36f2917b89a16beed9a6e WHIRLPOOL 63daf56bb99fbb81aa2856db38484e5f7aea1b948b3a37e768e78bab1d588e80d8fa36016966599d680b81253d27b37d5b931827ee30577cc81e668298e8995c
AUX fix-Makefile-1.1.1.patch 354 SHA256 b86b7b8df53776684bdc6dc1f39d4416db618327397d6d37bbfa719d34b75f46 SHA512 4d998b7786fe280c1e903c924920e405db4ee2f6675831c7f63dfa801fe23a7584ea61860cb0cdf0972b3939e053fb5f27f995e105c67d04fa913610f08c4dcb WHIRLPOOL 267b0b07c79ac90239eed95c4b465f4c47321d05ebc419cff26416db1646831fe6088657b33086886c790a074347e3c9c44c85792465adf378e5aecc1b6d2299
AUX fix-Makefile-1.2.1.patch 354 SHA256 7cb067ad7465e0e72eb503edb4f56e2b080806cb66826b2890a492add86d41df SHA512 0616061973d6cd9a5871095fe7ec1a7a80054399e6926bea8ac36b1196c1a962459eefffcd18a9a080d9bfa1a195aa504ad50642a117e9bace28fe6cad638e24 WHIRLPOOL 428a0db0e0696ceb8931bd89bcfcf476039e8cd7eb04d7bedf39af41338ce72d495fa572ab050c8747026ff9d28c59b15baf8c6c3ac5b9ca198e20bbd702622e
AUX gitlab-workhorse-0.8.2.conf 297 SHA256 8bb99a78197ad22892e4c85496101a39f2c82f6c537f44da8185af54dbb44a38 SHA512 d143489c165ef5e68810bb10d5e97da7ad3be6d53618380231706ec16c3fd8bc3eedbc78a09949479a408646e32aae4cdceaca9b271ba3b816e3449b792c5406 WHIRLPOOL 649d34b60afab816dac559989c9a3b0cb9620c2ac2a7617cfcae8bcc2c421791fa612571f83e6611ec8ab8c26c9c79f9832f4e6a70396497dfc5a40d99bbbef9
AUX gitlab-workhorse-0.8.2.init 681 SHA256 bf3f94853781251629daae935d04294febf317061536624e2c01188dd6688ae7 SHA512 6275abe0910e7327f952dba36827a9083264f76753605767cc11ee7b162fdecef3170783800263bf8acbe891d41e6be9e27b5fcca2a4f035b990c9865aa02647 WHIRLPOOL bc983d0413c0743ef0843a3abb46ee2be78ac6e18b56f96de63b4ea8cb9242f8ef6a96f2d593dbcda33a0a60b7f941f27bd704b7f64a85db7379ef0b42233527
DIST gitlab-workhorse-0.8.5.tar.bz2 229807 SHA256 fec50a37d17c359726ac3e0d2bad4ad3431e6bec9aaa6dbf5dcb81bfce469369 SHA512 c149c4cecc1c64c472e38eaae8cf4522a4b19907ef3a9eda4490ddb6cda6083bdbbc1a827cfc2c4d7ac151e3edc4b5dbfb168e2590ea71f12c2836680b2d8033 WHIRLPOOL 21aa589997e934c664fcf3b6cfb19246910a87ec674fbf2fea5a04728bc00248c79b4ed555601af0adbd20a11ca2ba040c1ccb92323acda7bab3da8c37840340
DIST gitlab-workhorse-1.0.0.tar.bz2 233511 SHA256 c053224e050b9169441316bb1ab1a23449c7e8c125d4172badfc84ddc700e09a SHA512 f6369c777e3fd422f8136276c8f7ccd5a73d60e2559427074c484672d048dbbae9c7f8a0af7fd54e64de0ca3d1a679cb294f114397b8137a929437b7e10284db WHIRLPOOL b322ee8150c2ca6d0f85a211240fe87b15006ad364c333126d48d65d93ebd57d31f312f88d437bbd473acdaa1f74154b20f9f71a51e8ff0f381f793d89fba6e7
DIST gitlab-workhorse-1.0.1.tar.bz2 233519 SHA256 56228d2242be664d818c47b3c8c1a83e7b71f3bc4ef80d1dde267eb25f671736 SHA512 04b1a9f823fb39176fe1939dd3c62ab0bf74fa4e11c34f0345ef16b3d51d55791a56b4989ba7c99e46ef199d65d8bd1eb6545e458eec255f9d7f7b71853493d6 WHIRLPOOL a3322c8b4ea9909216d486c6571d1382081f6715a1da2224152392f83b4b1718b5d596cd52eafe257fbb2cd31ac65da6e88334e18eff138dee0644fe95113c7c
DIST gitlab-workhorse-1.1.1.tar.bz2 356238 SHA256 dbaa8559beff71f887a67606b8f0a8f197b3d79fc4b99eeaf07b2940755da623 SHA512 6a01c206139d56a7058c8a00ac2a9f930dfdf744b979cc1e1bde831bb362ede2be4542f66c3048920bb4b1ce91311580041d705ae4f00e4b8d78691aed62fb90 WHIRLPOOL fd150e15dbdf5dfc988ee953369279ee97452c8e5c9a5c4d6f20a129c30cd9a2b2119e30e62fd741472de45a29661663774247060616213b26c76afc37300cdc
DIST gitlab-workhorse-1.2.1.tar.bz2 381033 SHA256 b9e0bf7c2b3ad1378c59def86d59726e988ee31db94b96d3e907aeae402ce1bd SHA512 de50574b39f84ea980c64cf54e7e0aa5bc94ed933bcb550f5712d07a8d60e4843fcf97993e285bd67361f931dd9a63f5cbde98a96478444b8381f23491635493 WHIRLPOOL 7cea252ada82a4d7281bbdd002fffbc3bebbcffe20748b8e4b8e4e8aa6fcee852bc18076c9ea4761849e24b5291b4552ef3e8ea812f1156ab980f476ded59b7a
EBUILD gitlab-workhorse-0.8.5.ebuild 950 SHA256 259a4406de93bd2849916d537b67103bcbd4247c5e00871a0c4d9f0bfc84ae11 SHA512 b30e842434de5ba6277b7e1cb3bc38240eeba272dc3ace95a1dfc2dac7b63b1a7cc098e4c2e763ec57b4592c66b3b990a903e1d2382613ef1a7acd5346e9a9c5 WHIRLPOOL a8734afda28cd6c76c3ff381d780188a4d79c7abe3ca2f96087cb1e82c0f7e37acf0610ae80eed1123a66da16a53b6d4d5f080588a45d3016d73efcd5dc91b3a
EBUILD gitlab-workhorse-1.0.0.ebuild 950 SHA256 0177716249d616021e648a97e2ca38972a5587e09357f6bf96086b655dbdd7a5 SHA512 65976da76880b22341a0317a97baf4be786fb593e1fc33774d31e8c23ae7b91f67a1d890f3decd6cf83b5732da311c042ef60cd26f030b8f6ad2fd61a27e7f74 WHIRLPOOL 437c69ce0cc4025fa4d32346b9eef9de78ef1a215de2ff8bc6edfb72af43708e35dc6ee1b064f021c566acfcd0bb11156487042e7468680b5781904ce4fbda16
EBUILD gitlab-workhorse-1.0.1.ebuild 950 SHA256 971e0291cc860752de5cfb5d371aa9d36e3f8207f4e7ea8a6833a7f8f80bd3f4 SHA512 03620193b6d9f3f3676cacbf0a832c7c87993bafbe68f4a27e6aa58da1b515e8c45125125d830c4770ec6294aa457af4880170d15deb1fc9edcbce0b6ee1a4fa WHIRLPOOL 80f4fd161a0a86e7ae2fc3fca6678bfbedd0a9d87368cf3678e3bc4712900bd4997193af87ecba983f976448e78791c13200e9db10fe07a6ffb7b474443820b4
EBUILD gitlab-workhorse-1.1.1.ebuild 950 SHA256 3f6d9813ac7db6f8816ec02f95e1c6332d7e93c8880ce548c9680304c610b95c SHA512 d607edcbe4c73e736d886d0e342de4b738a16ddbbcc5266653194fba3613cda15fa8516a5a45131a6cc0bd42e7bfa77910837b55258c7cef47b337fba5aa1dde WHIRLPOOL dedd9011f5ec182a3317c34bed540cee000cd34cb59ee5164c902faf9fbf0be102f63cd548dc42c1133025378a2bce8a243d53289c4902172eb78389349179c7
EBUILD gitlab-workhorse-1.2.1.ebuild 950 SHA256 7a3dd2657fb3a3224d57170d4ac416f1d5b74512b9ca84ff0f1d73dc07929994 SHA512 3002655f560b8d15d5cb32e0cf0ba96ae404c160649d9c41deb76e094a21b9e302701a627b26651ef8368374510ddcf416df4079fb034a72c298a0c8ba59317a WHIRLPOOL d75356d647620369083b579d3246f23a97a37490759fc84ea10dfe93636330c77d1a4832151d56d677b05fe8a026dcb9e44686c9c042db66cacf9191c644af2b
MISC ChangeLog 5491 SHA256 c4ec478ebb95514ff906ae600e9dd56f0aebc9f1ee4e988eb0b9c855b73c6d00 SHA512 09cd0ab1cfd42a8683d5b98b5e6ce4fb037e99cb00804c8df01037c2cd261d3578db39456160b210b03de27e2de8723e63c3ea4633406610963a51920f03d189 WHIRLPOOL 68f88a121dff93ae4e348d11ca80cbe3102aea6f3377250bda6563239b7670c59e07b1425924b747650ac8082833587c77e4b0995827079fe74cae8cd0b4455f
MISC metadata.xml 248 SHA256 7b43be15755627edf5c12cf1b50c607d781558640bf8375d685d51d7ade99a32 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2 WHIRLPOOL 993013c9878ead35469db13d3072f694a341ee654182e0c31d0678f5dd6de4bdc8d59a0b7bb6d685dc41ea6b55dac518cd8034131baea8002170c680e50304d1

View file

@ -0,0 +1,12 @@
diff --git a/Makefile b/Makefile
index 3f6ac91..663ffbb 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=v1.2.1-$(shell date -u +%Y%m%d.%H%M%S)
BUILD_DIR = $(shell pwd)
export GOPATH=${BUILD_DIR}/_build
export GO15VENDOREXPERIMENT=1

View file

@ -0,0 +1,39 @@
# 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"
MY_GIT_COMMIT="0fe5a09e85de07cae1210627f1ecbaeb38e8372b"
S="${WORKDIR}/${PN}-v${PV}-${MY_GIT_COMMIT}"
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}-0.8.2.init" "${PN}"
newconfd "${FILESDIR}/${PN}-0.8.2.conf" "${PN}"
}

View file

@ -20,7 +20,8 @@ DIST gitlab-ce-8.14.2.tar.gz 29715506 SHA256 9d45a0a86c6b01e0c48e7fe2fc442fe774f
DIST gitlab-ce-8.14.3.tar.gz 29717697 SHA256 df0b57646af534a874128d6e1903cee215c093a3c6302315cc53a9bddf62582e SHA512 9c7c58d0c6c7df447b0f723c550cb95530e781cf75b915b49e098dc0742cc18dc47e665cfa228dc2867ac5cc4dc40d62b6544d0160738a596d2331628c80304c WHIRLPOOL d96e9cbcbee48ce5f6ceff88756ad7493c0b5a3111ff072996541e5b650f0feb727eceab5e0859873b68d6248d790c4dacb8bc9e2d1f288936fc102de1410052
DIST gitlab-ce-8.14.4.tar.gz 29719940 SHA256 32c8e66e3c5f820874548c0ceab0215a567ca7b58a9ea604adc63878f50f8307 SHA512 426faaa4a4f18e9462d2153f031db8394465581638d259e6e0282a2bfe6c72c8738ca0dc084969f414e61a362bc5792656a07b33592a7f880307613fc152f8ae WHIRLPOOL f3f3a012f26a5a3dcdc5214b039128280e75ddf885b71fdacec13119cc6229dd771db0186b8fb04c5f761e62cf5962867570c6c4bfd47eecca57f1665521b220
DIST gitlab-ce-8.14.5.tar.gz 29722006 SHA256 8e03214c1f741cf813453e7764a0da1d8f0ec957b5395d2e359b9f24bb5f3c8e SHA512 afdc8bcd3022f1b1e5f14c76a5ee696eda462ffeeba94411f3f82ba0b2e0647d017982f0357fe66a1272929569eb0f24e5d18bfda78b88599e91c9486438aaa9 WHIRLPOOL 1eba1abf2543bb8203349fe03e6debf5e837effcf7a23d1f4e7e49900db7d1bc77c62ca6f95c5b26b7c00c396499f3cc8c2ec2d0e5f209bc2d7da99d2f7a4668
DIST gitlab-ce-8.15.0_rc1.tar.gz 17803212 SHA256 6981763818f2dd1f46d5d8f0c708b7d8d0b780a2bb68852270fc9e6c649bd12c SHA512 24689f4976b7b423359ca36de5e84b82e50f6b1f6b1886437bda4bef2bfd2efd9348fdd5c90b726215cfe9243711f121f61d2bf485c67915a52fdb43524d531b WHIRLPOOL 349a6cafff690aa104cd12d2ad146b83ba2b146c79f8fa10ac48a4a4863b78db8218d0aa5e970f6a22f30c6eeaf25d076d25158c66302e7b76d048980994c278
DIST gitlab-ce-8.15.0_rc6.tar.gz 19877630 SHA256 dea41bc8eeca350b359a7a7fadab2798fdbd0767bf22eb32c16197aa44164e24 SHA512 573eec3d9476d9e0765c91e558b6604e003b6dff27debc55dfc3cb583a4dc8b67ad710ae15b90e32a862987f512275a37ab5fe30da1a34a4244921e32e5f962a WHIRLPOOL aea5e6add4eefeefbf4ed75db81a105faf03612ee4f24429569bd3d7a032202d47021b377d35e8815f00595265048a3c31cd77b40a4aacb2eb6589cb4f87a927
DIST gitlab-ce-8.15.4.tar.gz 20029958 SHA256 5d9df84b82e8b453f61f822fce44afb9603d03b3de23d73c855ce12f7629a33a SHA512 1e2315343ba2efb521bc5dc197b63f7b3af895327de76d1823345d6d39921d9a995b65f6211b572c07cf4a4583bcaf7e6f1ef159b38a7b7b1aa731e2f653c3ff WHIRLPOOL c85e4a389dec2d8807a158447eafb1062b2e1c70eb243f898c5155a26af92c99dba7bcf60217a51c26afbcb3e04ce996177b6e90cd4a0199f8fdc2c79c575ed8
EBUILD gitlab-ce-8.13.6.ebuild 11979 SHA256 761411082e2e68f432f913f5c5c969847832d335b1f7843575890ba125542539 SHA512 ab01af577da7a27cee3308c6766a042edbce7f1c472639b9a24b9bef3a7ce37389dd8e32b43cf62b9ce7c20399ccf17fd35f678ea63598b4b06890bfeabded50 WHIRLPOOL cc14b981521f0513108ab4320f2e3d4f210ec0da7373f0f99b35d975003b5e1ff5783c5db5c6b7f29739e795fc73d4744716f81056039eefaf445354bd7cb000
EBUILD gitlab-ce-8.14.0.ebuild 12058 SHA256 ef9893f42bf74b6864d5647c406afb69412cfa88ab89fa3bbc8a69d92f6eabe9 SHA512 182be258e2ede41a056d0ecc6c8691dc89af035474b711c74887b61105e1260fd0cc02556931e713cc256766a8879356ea07ce7bb9aa8f463eedf63925afe52e WHIRLPOOL 69c12e67507d5f27bf5491d06a1f0de7e0bc156b624008977f7150b623728e255ebdcecb100aa3133dc8063f7bdfb5586c0924fa3077c1141090719666d1cb76
EBUILD gitlab-ce-8.14.1.ebuild 12058 SHA256 95df987cfcc654adfff434916f3b3c093bd363f147ce732f2712923c38c6cea1 SHA512 7aac8dd78a3d25eb6a3664f7818188d89dea015cfb88f37c5d54597b9e0351f208d82a96488ec0109769d59b264d0a81f4656e3e95b63fe1ac99290879f28497 WHIRLPOOL 683ca7f8b32b89ebc3f503481ef6891dea756297f4a474efb62791f5b0bfd3e5287498bc0f78b73592b1c1cc8ce7ec67748a439399c601992f300dfcbe190560
@ -28,7 +29,8 @@ EBUILD gitlab-ce-8.14.2.ebuild 12058 SHA256 d3ceac76fde85644bae8524b94e29c484a12
EBUILD gitlab-ce-8.14.3.ebuild 12058 SHA256 c495099e43d677041f197e70c051ba2e5541b600d8e65a9bfc17de44bd46195a SHA512 bf50743972034453cb3d63563589e768ef2c394e6a119b34ca55b17ff03d34f98d85a09e3411090bee4a821f505a35ac9ea1c89c6fdd241c395b71c8daf671a4 WHIRLPOOL cedad6cb34a050bc052c3827a3f6e95cb5e68346fa3da2a77e7cceabe0b194abc545a5ffef6441e00f55be0d4a701dcab63a0b0907cb81529fd20d34403fb066
EBUILD gitlab-ce-8.14.4.ebuild 12058 SHA256 8f856b037e7f6b299e24725dcc972bd83a0758f7f4d79972eb446a931c240614 SHA512 30c304448c208e20da70dbb4300150aa494a2d4b00e2bf3db6897b1b3c13834ece0a186f29917e05765ac7833be79e13a2513a56705a51351ece6b50ca87d68d WHIRLPOOL e188d79b0322cd6433529ef6d8d157cd09a96c36d6f8161412b2c41c07aabec047acda0e5b7ee8741ea4aa526824dd17e9c823072aeaf584fd6a6dd49e4d8bfd
EBUILD gitlab-ce-8.14.5.ebuild 12058 SHA256 ef48879ad31e34e3b451ed39d1a196c1ae37b53296b39fb2f5d9c55f8cb04fc0 SHA512 24b314b35b24712471bf0f9e887a3c8cd434be2d5231f270ea0ef5f4d59377b2ba1049bf3ee7bf5feb54f77bd1d9d4121409640bd562a3a871c6bef1e7a80f45 WHIRLPOOL 7fef550d27617de2176b0f3fadb4575ad15f09e3bc204a82ea0b62c97497d36c1e0154fd18b483ac678ff7b5f8ecb464161a132ecf250bad839f28dd721e5100
EBUILD gitlab-ce-8.15.0_rc1.ebuild 12035 SHA256 5df513f9cd7d32f7d6435696c39fa0ac920bd0785c913702e7a323257adc5b71 SHA512 7822d3bee4218aa04ddd3e37d6828bb2430e344f91111137e954cad239d3b0133cae05461af048f902e2de516ba76e9b5b9dfbe91f6cd7500a92b9ff944a7304 WHIRLPOOL 794e7235b9ec5d493251f94df9e183421873a04e90d9f0ee76e2ea5820c830ee72084887d6c6f2b101c58df18f1b6ded97aad5711d6ac75278ed4d62c9701af5
EBUILD gitlab-ce-8.15.0_rc6.ebuild 12035 SHA256 f7fef2775eb434c2cf59ba92eb8fd16ea243fa3eb9a24da924df33aba396f06b SHA512 5f937d30851dc268ef76f15bef4d71aff5afe5b3b1a70a83cb07fc2589466577fdd947f9f381c92c84025261ae9e8bd04ecf625eff9657a5ac688ae0c9692181 WHIRLPOOL c17b8e3838d18cd4768413b2a63aed9071b66a16fe9c51e63de9631596f20b422d438608e64157d7182ce8133144b4f57b215c705ed283baeab70dc22fdb862e
EBUILD gitlab-ce-8.15.4.ebuild 12058 SHA256 6042a9e3d526643813d43133902947935347d25d6840c409f24b69a140c889e1 SHA512 21cf6b3bb9ed4293c51ba0cb7ae2e376031b7faa36e77558cea2a616d86d7e854ccf37c3154aac67e539e1e07163a74e5deea2ec8bfd87e41578c84006cc16d8 WHIRLPOOL 0e6f5de4791a2fce92c7fcc6364fac13e4c1dab27789067402a3b14626db72f61777fb809a8650ebb57ba48ac8fb49c9b8192b57ccb1c86681a6996aadd64daf
EBUILD gitlab-ce-9999.ebuild 11913 SHA256 f6e02b9e122033339874bce07dd4b1663a8b3dee9ad86e5793a9dbf7517e78b6 SHA512 43943fc250c810f131bdcfef518373b12bb997b84c12d5ee50b3006ddc9a7df4541a08faf2ea35dcd56ad70a7fd3d5dfc17c529b30df99c426d6418c3e5ee051 WHIRLPOOL ff7cf1a2a82545f16e2c7804ace0a8b2d00acab24233afe293668ab7573131065e1b301979d87563dd235a9fb4bebd3156aa9bddcb547cfb1b837103273686f5
MISC ChangeLog 12134 SHA256 d90c37dd130c4d65cf1fbcf7cc3202e4c0cdc277e8c93f6f504af75cf8569cc0 SHA512 ed221d43270e2f4c3069b796445bf871c7dd6e1def0227be148667410efa0ec3ae122d89a00437520982116ca56daf3ab6f494026ac2ebf8d511c50e97e69f03 WHIRLPOOL e11b0465d4755686d2e1e1136b0f4d3e542a801fb5b2667937cb63f3493e5dfb825603090988b580d55fd5d0448d408836bbc5e878c5b844a26a1f16ec252605
MISC metadata.xml 559 SHA256 6c3f48d3ef57c97bf27790f33ee04bd8de8b01597caa8a2a7a473d6d0a3c5759 SHA512 5aa340b5429795d84cd106ee673fd55a42fd4b0d3299d6b95c6a3e3d50812a9620820a4de5c57d5048af0c3ecec7f575d5856d2f7fadc210aadcbdd4dd040fe1 WHIRLPOOL f3d7b8c0522e09f5156e6bb446bb74e4c75f5da4495ca2ece1eb78afce59307abe01bf3c5dd5344278fcac9e334300d912031c806f51b981591c01bc3588c6f3

View file

@ -16,7 +16,7 @@ USE_RUBY="ruby21 ruby23"
inherit eutils ruby-ng user systemd
MY_PV="v${PV/_/-}"
MY_GIT_COMMIT="71683446a77934390038ddd450a90b80b53b990b"
MY_GIT_COMMIT="5f118980e82dd86661d72d2c96053b1da27e048e"
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-4.0.3
~dev-vcs/gitlab-shell-4.1.1
>=dev-vcs/git-2.7.4
~dev-vcs/gitlab-workhorse-1.1.1
~dev-vcs/gitlab-workhorse-1.2.1
kerberos? ( !app-crypt/heimdal )
rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 )"
DEPEND="

View file

@ -0,0 +1,392 @@
# 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 ruby23"
inherit eutils ruby-ng user systemd
MY_PV="v${PV/_/-}"
MY_GIT_COMMIT="a0b13790d398d1e3b16b049eb39ed901487130cd"
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-4.1.1
>=dev-vcs/git-2.8.4
~dev-vcs/gitlab-workhorse-1.2.1
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= )"
# dev-ruby/bundler should be >=1.13.6, but that doesn't exist yet in the tree.
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=(
"01-${PN}-8.7.5-fix-sendmail-config.patch"
"02-${PN}-8.11.0-fix-redis-config-path.patch"
"03-${PN}-8.14.0-database.yml.patch"
"04-${PN}-8.12.7-fix-check-task.patch"
"05-${PN}-8.12.7-replace-sys-filesystem.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}"
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.13.0-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-8.13.3-sidekiq.init
use unicorn && rcscript=gitlab-8.13.3-unicorn.init
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@USER@|${MY_USER}|" \
-e "s|@GITLAB_BASE@|${dest}|" \
-e "s|@LOGS_DIR@|${logs}|" \
"${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
su -l ${MY_USER} -c "git config --global repack.writeBitmaps true"
# 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
if ! use systemd ; then
elog "You may also run"
elog " /etc/init.d/gitlab check"
elog " for convenience."
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 $@"
}