dev-vcs/gitlab-shell:

Add ebuild for gitlab-shell-5.1.1; dependency of gitlab-ce-9.3.5

Package-Manager: Portage-2.3.6, Repoman-2.3.1
This commit is contained in:
Manuel Friedli 2017-07-08 17:23:38 +02:00
parent a181ae013b
commit bb773afb9d
3 changed files with 139 additions and 1 deletions

View file

@ -1,3 +1,9 @@
*gitlab-shell-5.1.1 (08 Jul 2017)
08 Jul 2017; Manuel Friedli <manuel@fritteli.ch> +gitlab-shell-5.1.1.ebuild:
dev-vcs/gitlab-shell: Add ebuild for gitlab-shell-5.1.1; dependency of
gitlab-ce-9.3.5
*gitlab-shell-5.0.5 (17 Jun 2017)
17 Jun 2017; Manuel Friedli <manuel@fritteli.ch> +gitlab-shell-5.0.5.ebuild:

View file

@ -5,11 +5,13 @@ DIST gitlab-shell-5.0.2.tar.gz 79009 SHA256 bb5125f12f2f3fbbb93aa78f6810cd62f97b
DIST gitlab-shell-5.0.3.tar.gz 625499 SHA256 41d78fa416170dbf052c59223ae7c6a3b882f789c36ca932d2e36b610e8b0161 SHA512 55354926c4504d196ccf0f269ec93484a18f4915bfbe292c9dcfa43c33ff8310cf5c1d126943d6c7e54f3f77317d9229666887fb825de404b7be0dea24f49a64 WHIRLPOOL 80fe5dcbc00fc2460731dbf3c604ca1646e9be61d1d53c88a53d48d16f97e6ee032fe210bc7a04c4bac1b726542f0eb645c15ec186a1de16256605ff320fdc0b
DIST gitlab-shell-5.0.4.tar.gz 626142 SHA256 9947c9cf7e7f2e1c2af696cf4610c6e2ad256dcae42e95cc0c8dc387ad5d07e3 SHA512 2718e99a43ad934dfb6d8b3df47bab0b957fa362c84510434fdd07ed994bf53ab059569ff0da106c8bd5ebc49cc460694ad5fb2fec57f0fb0cbb297609a00d97 WHIRLPOOL 6666d2dcb06c156686080b6a0f489ef03d331bc8f20eeb996fe5ce51aeb25d2f334002c15e235c1ad21d808eee8617aa178a5ad974ea99ec8f89bd2478f7f9eb
DIST gitlab-shell-5.0.5.tar.gz 682091 SHA256 c1583e931280e93d59f86a571a628e697d8d073dbfbfd58fa957617581c4edae SHA512 8e22a2bed622c81976b827fac81ca94de7023d710160cb6daa24d24269b068292ee2e36a5917bb5399340661a28f6480ac40c0a5253f71bd36b8bd78a56c7380 WHIRLPOOL 76503debe3baeded25067b6fcc1c9b5f103a7fb21035521bc3ab8b89547a566b557f38c073deb7d8a0867f1225edfe4d5587d14570ca2889812d3da73b4bf5c9
DIST gitlab-shell-5.1.1.tar.gz 688960 SHA256 33a4b79b0b06ad935a4bcf1ad41ab88882eb31b349cca007f1e60f3eb5826a06 SHA512 a247e37bfd7b8fe28fe68f3b9d401ccfe534bd4221bce2cda092f6a72a6926f49944f4a008c71636426ca1f7ae6033f53035bc10a8d8121c8093e09abfc675f4 WHIRLPOOL 29aaa30c73997a28cdb68485087a36c6c8109b9f909e2776899f1094a17dcbc6189ed759f9acc81caa6cda516b44f89ad36567bd9f96ec6802e4553182607e20
EBUILD gitlab-shell-4.1.1.ebuild 3653 SHA256 06702f4658b8ac1bada6b322b833f65270656730417d8c9bb000ab1fb23af8f0 SHA512 dc63160d98dabfcbaa9982fe841fd581a1b1b2a968e7c7bd1ee336e449214fa89da33477f0d4744941ee3ecb8688386883a5923e78025bdcfd1556e68ea7371c WHIRLPOOL cd59e133d1d02f082f10312b358c6c8718898aa008a967fc85934656500ceefc44a6affae286123c481aa902fa51cdb7e7f98788057fdd08304ed99f643ef27c
EBUILD gitlab-shell-5.0.0.ebuild 3653 SHA256 47e19d88939c146c5a7826ca538dba2caee3bc32944eab5b80d54ddbd4c196fc SHA512 1765624d95c14e2888f3e12be05ee727bae036265fc3c9bcfe17b509c0656de72728dcb580952d2a666b3fc99c3640f43862a9ea449599aeaa7cdb2509406347 WHIRLPOOL 2b935404098f288e729c3957007cc663afc3e76a4e04f536d5c7373cbae6857abb5a5cbd2d226355777e4af954a032e9b17211657d83a71bd2eef847028aea64
EBUILD gitlab-shell-5.0.2.ebuild 3653 SHA256 9ed7d4b6dc1ca2d6ee0c928cfd9f33da45a09a070f781d33f217a4dc80296c5a SHA512 571e8c8cd6782f7d955d8d7ff481424c8aa2bea6ab2d702036f991065f75d8e08f26b1004a91a88e2a6add8d64018cec3bb7de131635b264ad7990c392467e1c WHIRLPOOL 491af5dd4248e2728048e51d21a12768966201a93731df7743baa24ccde12228c15c9288be7cefb9b29f3ed83f27729a6f1146506365ef14d3d516b7acaf6862
EBUILD gitlab-shell-5.0.3.ebuild 3653 SHA256 e2c2cfb805378a6cd7e87d536a43c1d96ae489ce66b8168e6cbc42b703736c0e SHA512 65093fb42096002f2f715b18561f11cfb8afbc36188514a2d95023be53025946928e4e712d03d470d0bf52e6d0ecf8d0438b29cd5c55e162d85a15963e430b48 WHIRLPOOL 3278d0eea3f614f726d0df8d0e6a2f49c1e9d4341829f65fc29aa94544470b5b36ee7ce0d464af2b3b535f3f2f10c16c11d3c39dc87c34f9fbb693f61e9ffa3b
EBUILD gitlab-shell-5.0.4.ebuild 3653 SHA256 c3e2b2dbb4c6b29bf46442791caee2116be2c698a9cbec9d91ac58b1a5d98adb SHA512 035508013085da402a5926faa5da6b6ac6ac726169122766e381096b316b13e887e99f178a8980d831d0a788549e26b07bdae284bc3a90b3a21b534071239581 WHIRLPOOL 807caff4227ea9fdb853a0e5622dea4d4e8b66c3c8dd86d98aedc14f20f00eeabdc1620ffded43cdb4c6b4009e96528bf1dae784256e40f034cd78d6460348b5
EBUILD gitlab-shell-5.0.5.ebuild 3646 SHA256 aad0fca138202ef4f5e7885bf3edbe78fb0e524b263b7e770d4051b28e1cd5b1 SHA512 280fd3dc3da459882344eeebf8937fec8eedf50580b1a1fd1759d9e61e85b418407d6a7264acca8926201e1b29dc401f1226d7dd0496a26783c6ec09b7a97e68 WHIRLPOOL 1590459dfce361c2d049f431fee9b6cff435ac06ba1a126fb76688c4d4e7100b848e9e1875d18620ff0036b58afe78a743ac55793f79ca9c6bb1dca231ba7b03
MISC ChangeLog 3126 SHA256 ff668f4ed3220cad60a61dcb32c09e134688774cad1fbf04793ab2e81bf38569 SHA512 35111c684523665a3da284320b1bd5012a36129bc1bd0fc3ebdd1561a130664196c80fac4302b14278dd29d982cc3d58aaab2c405d645b93c4e92a563d129746 WHIRLPOOL b955900f481159356154667945a3fa8f9dc738a4360ea348fe5087aa6ddba308a8a70968adcad670cff5f2bdb9a8b46ec2c1f823f200eac720c0387ed1d4c501
EBUILD gitlab-shell-5.1.1.ebuild 3646 SHA256 137913363961638e2ef0178f5a4f024cec0e3f44b5c48fa1e1e9cc77bc1e93e0 SHA512 8995e8250f592bf11ff73e24bcef4beb74faf8932729f4702be237810f9ca320c56c9d1abead8c147099b894f0af22242bfcfaf6343367d7ed7baeb80abacba3 WHIRLPOOL f2974dd7604f6142caf75e23a625f77acba2e5928b8e4a96d6e1f10157d66ad013b85a45b1cdc58b1ab55765adc889545e4482d6a3d1163f112161f102171b4f
MISC ChangeLog 3333 SHA256 8b9d10449391567a3d4bc9cda46281ab816f158c5a42e13a1282186dce2aab8d SHA512 358944659e77ccbb768bf32573ab1c66b152fa096791f07bf192cddf575f255a1dcc8d196cffeb09d94129bdd1ade7bd4ba035d3ca443e464e6c37915eac7354 WHIRLPOOL a5b9bb8773cafbb8213c323e5a8e8c8b403130de77cefe5418c956e85c84334d51ce157fd93af32b8da41971a0752bfe259996fce933d60bbe74a3c740556d7f
MISC metadata.xml 248 SHA256 7b43be15755627edf5c12cf1b50c607d781558640bf8375d685d51d7ade99a32 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2 WHIRLPOOL 993013c9878ead35469db13d3072f694a341ee654182e0c31d0678f5dd6de4bdc8d59a0b7bb6d685dc41ea6b55dac518cd8034131baea8002170c680e50304d1

View file

@ -0,0 +1,130 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
USE_RUBY="ruby23"
inherit eutils ruby-ng user
MY_PV="v${PV/_/-}"
MY_GIT_COMMIT="0a64624152735766c428d1532e434dd0bf5a9748"
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}."
}