dev-vcs/gitlab-shell:

Add ebuild for version 5.10.0

Package-Manager: Portage-2.3.19, Repoman-2.3.6
This commit is contained in:
Manuel Friedli 2018-02-16 11:02:48 +01:00
parent a6837196d0
commit 3d2d442a4b
3 changed files with 149 additions and 1 deletions

View file

@ -1,3 +1,8 @@
*gitlab-shell-5.10.0 (16 Feb 2018)
16 Feb 2018; Manuel Friedli <manuel@fritteli.ch> +gitlab-shell-5.10.0.ebuild:
dev-vcs/gitlab-shell: Add ebuild for version 5.10.0
*gitlab-shell-5.9.3 (06 Nov 2017)
06 Nov 2017; Manuel Friedli <manuel@fritteli.ch> +gitlab-shell-5.9.3.ebuild,

View file

@ -5,6 +5,7 @@ DIST gitlab-shell-5.0.0.tar.gz 78585 SHA256 7611fdf0b64592365bdb6ba442a4263d129b
DIST gitlab-shell-5.0.2.tar.gz 79009 SHA256 bb5125f12f2f3fbbb93aa78f6810cd62f97bda564d01112a831bf41d4e42ef34 SHA512 c960e1e2c3c9f35927255442f4e20b82af8881d123c3edeffe7ebdc6523fe2456ae1e7149527255eb5e3d2d369b4f70b7c902314d881a20b893fea9fac968f73 WHIRLPOOL dc5be75f111074c8e9f018533ddcef64edcded4c5f3003a3f7297d9153469894f4c8a3e387419055a3e51732daa9db8a3b936984a24f3b4d1a9e0cbc968a7119
DIST gitlab-shell-5.0.4.tar.gz 626142 SHA256 9947c9cf7e7f2e1c2af696cf4610c6e2ad256dcae42e95cc0c8dc387ad5d07e3 SHA512 2718e99a43ad934dfb6d8b3df47bab0b957fa362c84510434fdd07ed994bf53ab059569ff0da106c8bd5ebc49cc460694ad5fb2fec57f0fb0cbb297609a00d97 WHIRLPOOL 6666d2dcb06c156686080b6a0f489ef03d331bc8f20eeb996fe5ce51aeb25d2f334002c15e235c1ad21d808eee8617aa178a5ad974ea99ec8f89bd2478f7f9eb
DIST gitlab-shell-5.1.1.tar.gz 688960 SHA256 33a4b79b0b06ad935a4bcf1ad41ab88882eb31b349cca007f1e60f3eb5826a06 SHA512 a247e37bfd7b8fe28fe68f3b9d401ccfe534bd4221bce2cda092f6a72a6926f49944f4a008c71636426ca1f7ae6033f53035bc10a8d8121c8093e09abfc675f4 WHIRLPOOL 29aaa30c73997a28cdb68485087a36c6c8109b9f909e2776899f1094a17dcbc6189ed759f9acc81caa6cda516b44f89ad36567bd9f96ec6802e4553182607e20
DIST gitlab-shell-5.10.0.tar.gz 712749 SHA256 703d96c71dd507995780c6bd1de88d618df95e92593f099a3505136bd2547337 SHA512 d25e84f97c52aa626c9b8d7c739017dbe9cc13710e23a7257d08ecaa20dafb3af8e78aca8e768d77e9abc741a4078e322194870fb6151356ce5a5004f6f0032f WHIRLPOOL 10727efc8f043b45bb8f8a141684312932e64f28f599e735a2a705d504f4ce75330acbe707e007a9a44ed94d00a546ab041e256434958700b4ae532f00e482c6
DIST gitlab-shell-5.3.1.tar.gz 708811 SHA256 989e7976c56d09d455e5e67e587426be2aca71ef2e27541c8654e74aac82f68c SHA512 00c6dde3d7a59c956396988b2f5790291c44fe134812588ab5c03e7612d49c08de2f5fd08a8b4a55a2c95a46db1d0cdb0e07469958d5c0d6c778d0f9dd279afc WHIRLPOOL 266218edb547e2e7fab95982f78d5c2a7057e061a48a854697949214791dab512f4512a57197ce1ac901dd2b97f4e363a39b8cd2ac74f5cb002ffdc38b8fd06a
DIST gitlab-shell-5.8.0.tar.gz 718927 SHA256 7c6a02e12ec0efcca23b9200dc18be29a8ce2bf70f9802bb188fc22dbf1875d3 SHA512 f17e4ec95dce29608684de27d9a4f7a3fa69cd25fb68223576a4501ef83fc50bfb74668599672edc8c8d670585b47e22825004cba2227bb4ef6f0e3c27d06b59 WHIRLPOOL 941c5c9daf6e319e44c49af627474e87f33e964bbad0b59b84f90f7b7e8ca82b5f0635102964b9fd7b74f8101b6af6539aa966978468105ad9b004cb2fa76222
DIST gitlab-shell-5.9.0.tar.gz 710920 SHA256 5085b531abd1c3ebbc73c7b77c05e674fe42d975c4d9c64bdc54704c51a15907 SHA512 e89a0f2b97e502b003ee62eacfa520dc248b93cf68a0d2eabae5672ee968ca68fd01839c9195422fb680e341756ec399af0a7654fc4e6fbe7d12f3af3643d2c6 WHIRLPOOL 45bd1f044314de3d093fb6689b5c50ca9243aa097e54f75e15485eda6504ab91975a5e8c4df115a94dfe228d98923ebc5f68e85eb050a95fd71f5927d5a89354
@ -13,9 +14,10 @@ EBUILD gitlab-shell-5.0.0.ebuild 3654 SHA256 2a3a890e9c7d9dd8af476dd0cdfe480512d
EBUILD gitlab-shell-5.0.2.ebuild 3654 SHA256 9f06b267774f58339770844496a90a7b09af75a3354a28619af90d57e1aaf0d0 SHA512 a972f71789a11fa611d3b591bff438273e764dce6646a912d4f71c968d1f7e9d3350c9589d6b2dad00e300cf350daf1efe617751300ab866eec66a799f2f76a4 WHIRLPOOL 420f705da6d31de25ba4a19979cb2da5ea4275d020a8a6ac0c34792857b2c5f6d0fbe33c0ca7573c5084b062f12fef14b2f73b88db523521d8fffe8f492ffeee
EBUILD gitlab-shell-5.0.4.ebuild 3654 SHA256 6227964f26e195eb914163aba910af177e9d312bccce84783673914c1b6a7341 SHA512 b383072cedf66875317ca90c3daa422e968af6d293bbe2b6efb69e4da91af2ccfc77179ccfa6aa07263ae50f603dab3efc27c36d0c8ac8169b368c9f6474fb75 WHIRLPOOL 9de88e1e7a6d2bc729dbbde54ef40b0046ba698fa1b9874a0751222572eb0d0aa2c9683bc84db44878742d5d4d039d3f96ae893af6a649f73f7c395e932934e4
EBUILD gitlab-shell-5.1.1.ebuild 3889 SHA256 1ec35ad363ec198c9b53974f3410401b559c56814d747941888b475f19479918 SHA512 fdbc2465617043aa2dc813624e513996c7827831abed242fa9dfb2e943825cf710ba65c0d5882a312af64e154f667a82989a787b63e61d0ea8dd81fb4accf035 WHIRLPOOL 3b231de69ff373868a4acbb4df49a6120b443db20f9ab5ecda9902a6f74539b4534a400f86d8de8564fb1d86f71f02aa48e830c18486e08700bbdc2602d2083f
EBUILD gitlab-shell-5.10.0.ebuild 3927 SHA256 bfbbc8298d256f4f1051ab6c3fe59197ea933a798a521940bdae1f884b5954ff SHA512 6d2461f85b1d1232de89471f4e3fe35cbd6d59a5c644913c78c5b7cc868ab035ceec8c96b4973289fefaeb2e836edf7d7cf0bdf7c4364e6e947ba1b32b6c5b85 WHIRLPOOL e44a285e9264875cda07b3bae39fc5f17fd74f9d91927f2dc9d1cd4a34fc310ec2f73808c5096807265fe3dbd94269ce3e03e6b0d5a1ef176cd1236a1c0002ec
EBUILD gitlab-shell-5.3.1.ebuild 3889 SHA256 be4349d3faccc8bda7ec85ad68204de0d525feef55ab9159ba293810ab4c7162 SHA512 2922c2271cb66220432ea0c79b74b2b1015cb55eed3c98845bb8ac15ca6ca2846579802bd832e9b3fa188879b613aada0bdeeca47fce29a6c7bf8d51242e7d6e WHIRLPOOL 2f0aea6989a00f07452e4097436596517bee8fab5b557f2a373d185b76eeeef40c8753e32b32d40f08070cba28e7b59ba86278bf665fa9e19260e799f44d5eb0
EBUILD gitlab-shell-5.8.0.ebuild 3908 SHA256 6f144e30269af1f4b608258da78553f64a1c6fb4e4ad532de4adcc4d93c8962d SHA512 e9131c8d9361a7321837c996b098b515b15cbd93c15067c000a5811d313fb167432bc415a5327a110adc6a92009d52cad78f12311552042c1b214b5df3eae9ba WHIRLPOOL e16d0ea02eceea491c8bc079cd1d4932d83340f1db3a9e249960b57e550ed65903610f0541d89ef616561f83f4c7fc771b1aedd115e48b80c62e72f62d7dbc3a
EBUILD gitlab-shell-5.9.0.ebuild 3908 SHA256 91618dfa168fff385eb362572c8e65e1f72464ea4240b03e60cb554f7c872a8d SHA512 c16e5176dcfc866a696c4b1096b17bf15437ee77db92f28de79990688f146fa38ca2d345d1b3138072626086242f6c3e044a345435ea11ebd0455c3115c8bafe WHIRLPOOL 0b3d586d6c991a20c806ca5a53437aa8eb79eabfa64a26fb839d493052ae2d752dc65ec9626c3c7f62d6de9182d31870eb99c6018f6d490a30962f0b823eccd1
EBUILD gitlab-shell-5.9.3.ebuild 3908 SHA256 27290b4d2d5ceacaf991026c149ea2e1eaa270959490d9a8850596c8e7b4afed SHA512 daa5328dd238804860f8aa52cc4b09c484fc1477dfa6e60aa2fb424e27cc69121dea2c677e02832613ce0bc0023b9b23fe91c53dd455cbe689c6c09bb342138e WHIRLPOOL 8fa05924b1405f79656da46cfe7d22f1631a10ef19629f75fafdec11fe7b6d6fbc0db80ae2a31c81d3c11a9b412f39aa25234e7d5e318b6f4ebbd305af3f6781
MISC ChangeLog 5227 SHA256 f658e85652f0f88a212293543397cfe83523effe85b0c431ad92f75b54f72f26 SHA512 32e49113fa8ae098a3802672084815d1c39c65bb1281e76b4a57b9d92e3391b1df2eeb3303d2d7bd9fe6e371778234f997b464a12c2172d08c0d37e9d44a7f25 WHIRLPOOL 402f06333ebfc55611726f4ce5872723770e7244eb9f63070d07b1fe6b674c9b8e5268d9264738abd0f89803d63a29599580c309d5766f74e54f6261bb000ad2
MISC ChangeLog 5399 SHA256 412b2056ffc33b31080540adfc5f437cc0366d866dc2404d95796362e6ff6de8 SHA512 6cff16284e35648b629d24a3e6ba3d5b1bab4dc4bd32a2c546954b29f3cf58dc5bc74fd35048e0e0b85c43afbe5f458246e33266276243e2b9bb0b4f0faef6b5 WHIRLPOOL 6b13d2cbe64798d4e7c3a61b5638db16485835d20486b85e1232037c631e6255ba27d5654a62bdfdc170f0948aeb873ea54e627aed599da20f988c5a4dcac9b6
MISC metadata.xml 248 SHA256 7b43be15755627edf5c12cf1b50c607d781558640bf8375d685d51d7ade99a32 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2 WHIRLPOOL 993013c9878ead35469db13d3072f694a341ee654182e0c31d0678f5dd6de4bdc8d59a0b7bb6d685dc41ea6b55dac518cd8034131baea8002170c680e50304d1

View file

@ -0,0 +1,141 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
USE_RUBY="ruby23"
inherit eutils ruby-ng user
MY_PV="v${PV/_/-}"
MY_GIT_COMMIT="7e81de5ba8fa2aaa13c6035c0e333b4b0ff0df9b"
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=""
CDEPEND=">=dev-lang/go-1.8.3"
DEPEND=""
RDEPEND="
>=dev-vcs/git-2.7.4
dev-db/redis
virtual/ssh"
ruby_add_bdepend "
virtual/ruby-ssl"
MERGE_TYPE="binary"
PATCHES=(
"${FILESDIR}/0001-${PN}-4.1.1-config-paths.patch"
"${FILESDIR}/0002-${PN}-5.1.1-Makefile.patch"
)
RESTRICT="mirror"
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_compile() {
emake all
}
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}"
# Gitaly stupidly hardcodes the path to config.yml :(
MY_CONF_FILE="${DEST_DIR}/config.yml"
dosym "${CONF_FILE}" "${MY_CONF_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}."
}