dev-vcs/gitlab-shell:
Add ebuild for version 6.0.3, dependency of gitlab-ce-10.5.4 Package-Manager: Portage-2.3.19, Repoman-2.3.6
This commit is contained in:
parent
a18bf2e102
commit
b7addf9ce9
4 changed files with 145 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
*gitlab-shell-6.0.3 (09 Mar 2018)
|
||||
|
||||
09 Mar 2018; Manuel Friedli <manuel@fritteli.ch>
|
||||
+files/gitlab-shell-6.0.3-Makefile, +gitlab-shell-6.0.3.ebuild:
|
||||
dev-vcs/gitlab-shell: Add ebuild for version 6.0.3, dependency of gitlab-
|
||||
ce-10.5.4
|
||||
|
||||
08 Mar 2018; Manuel Friedli <manuel@fritteli.ch> -gitlab-shell-5.0.0.ebuild,
|
||||
-gitlab-shell-5.0.2.ebuild, -gitlab-shell-5.0.4.ebuild,
|
||||
-gitlab-shell-5.1.1.ebuild, -gitlab-shell-5.3.1.ebuild:
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
AUX 0001-gitlab-shell-4.1.1-config-paths.patch 2152 SHA256 e789f0c8a8b7ec8a840ce26dd63d6e5386a149f619d7ad5a6788577d897c4826 SHA512 6ae5af0c364061af4c9675804e2f6d6b662ed4891ed4c80bc1be39e9da6343db372e58bf04a0d3c8a4fc218daeb8cda45636e0da0c67ec801168e84004d05b86 WHIRLPOOL b8136b81ef943c15feeca303d1d7f0d55c85ff7f7ec82bfceea026ce334ca24fce0dfb599946562bd0aceb89a2216bcfaa894235c43f41e3031a305f85e756b4
|
||||
AUX 0002-gitlab-shell-5.1.1-Makefile.patch 252 SHA256 cb45d73d9a2b5a30d2c457d6ddef9953b4a907e4929575709997a3edcb416cc2 SHA512 ce185a66e746e7791ca7ace15757d24a6fe426a986837a3b41c18771c0e3395baa05488735273171d41f764a9cee2517dc64e629f4d9b2aedc0bd57650350d9f WHIRLPOOL d6c6562a9d6efb904580732c43538b86b7ea8fb9dab538ede162018f86974a2e330403b385f636734b67be894063671e17814865de0ae36b8e8eb9ef1199aa3d
|
||||
AUX gitlab-shell-4.1.1-config-paths.patch 2152 SHA256 e789f0c8a8b7ec8a840ce26dd63d6e5386a149f619d7ad5a6788577d897c4826 SHA512 6ae5af0c364061af4c9675804e2f6d6b662ed4891ed4c80bc1be39e9da6343db372e58bf04a0d3c8a4fc218daeb8cda45636e0da0c67ec801168e84004d05b86 WHIRLPOOL b8136b81ef943c15feeca303d1d7f0d55c85ff7f7ec82bfceea026ce334ca24fce0dfb599946562bd0aceb89a2216bcfaa894235c43f41e3031a305f85e756b4
|
||||
AUX gitlab-shell-6.0.3-Makefile 41 SHA256 cf9369c20800c5663ecd205a49fcfe1d6d4d12290d1c219823e35c348912ed49 SHA512 de23339a4515975ff272feaaea3bf3028c0b807a87db08e098b290508a01116fd3335345c12bd2e78ba03df0ede3b9633b104dbcf4a3817af02b431eab364c6f WHIRLPOOL 61233d3c2d00c3eea066c40d93bd37bb9741f3927b502bb122ba4c9cc425810a6a966af33fe840da81d36d82328cfdce903f6643b8122872e294b9cf2133a4ee
|
||||
DIST gitlab-shell-5.10.0.tar.gz 712749 SHA256 703d96c71dd507995780c6bd1de88d618df95e92593f099a3505136bd2547337 SHA512 d25e84f97c52aa626c9b8d7c739017dbe9cc13710e23a7257d08ecaa20dafb3af8e78aca8e768d77e9abc741a4078e322194870fb6151356ce5a5004f6f0032f WHIRLPOOL 10727efc8f043b45bb8f8a141684312932e64f28f599e735a2a705d504f4ce75330acbe707e007a9a44ed94d00a546ab041e256434958700b4ae532f00e482c6
|
||||
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
|
||||
|
@ -11,5 +12,6 @@ EBUILD gitlab-shell-5.11.0.ebuild 3717 SHA256 f0733e56a42e32de7976321a41cb553e68
|
|||
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 6005 SHA256 3cd5b207f4c40f4f90476b9ddd25c9fa5be708aa20251167fc3f8b32e90123eb SHA512 482c0b3f49d65b55f9e84ad07facb900f3cf32c8bb71e560597e7206bd908255944d9c99d7935cd53d070134fdececef084a4bbea5ee329f2a2b50bb6023ced3 WHIRLPOOL aff16fd4a35b648c156e883b0dfe85cf387f4f6ee10f0e551aaa3f6fe7adc8ee73e14b5080c148f7ec7e62f56921f08b5d3a29a8146a7fe718d0208489c548e7
|
||||
EBUILD gitlab-shell-6.0.3.ebuild 3729 SHA256 2a3157091fef0c41760572d75f3ebe8c6e567a5a6484f4e20cc18b0bc9f98885 SHA512 f8d6f08109c9c3ee396d2dd6071c7e2912ea9ac6a079fd1a8b12df44751ade9d0c45f4b0a24e18fe663d53fc0ec9798602bf8eb8cbe50f8ce2cb9b9b3a2cbbac WHIRLPOOL 01ec61d59a4bcd59a4bfb0db612adc97c5cdbfee7a5f7712c2e6faee962ad16b7dda5f29956fe643dc3d0073bd3ca4bac73264a4306ea469ae5817d854fcc2d1
|
||||
MISC ChangeLog 6247 SHA256 6edb7aed808db07c2b44b64d50953abe8759b456725a4b077c54f07c285bba2c SHA512 a82e59f99cdfce2324f38b56453ce1f0b5345d01890aa8a14a7012c1671b3f82eeee6804d2af8e17f116d1725f89f2a3842d71b844f831f7b3cb3a47ae077803 WHIRLPOOL 2df0c7e7ec6af196a4f751ae33660f18d593a08bbd74e7dd281d215f2da4c6a800eeb87b46d84464272cbb5935a52ff2d9c1cc8417829b6eb1e33aecd7b5a879
|
||||
MISC metadata.xml 248 SHA256 7b43be15755627edf5c12cf1b50c607d781558640bf8375d685d51d7ade99a32 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2 WHIRLPOOL 993013c9878ead35469db13d3072f694a341ee654182e0c31d0678f5dd6de4bdc8d59a0b7bb6d685dc41ea6b55dac518cd8034131baea8002170c680e50304d1
|
||||
|
|
3
dev-vcs/gitlab-shell/files/gitlab-shell-6.0.3-Makefile
Normal file
3
dev-vcs/gitlab-shell/files/gitlab-shell-6.0.3-Makefile
Normal file
|
@ -0,0 +1,3 @@
|
|||
all:
|
||||
bin/compile
|
||||
strip -s bin/gitaly-*
|
132
dev-vcs/gitlab-shell/gitlab-shell-6.0.3.ebuild
Normal file
132
dev-vcs/gitlab-shell/gitlab-shell-6.0.3.ebuild
Normal file
|
@ -0,0 +1,132 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
USE_RUBY="ruby23"
|
||||
|
||||
EGIT_REPO_URI="https://gitlab.com/gitlab-org/gitlab-shell.git"
|
||||
EGIT_COMMIT="v${PV}"
|
||||
|
||||
inherit eutils git-r3 user
|
||||
|
||||
DESCRIPTION="SSH access and repository management for GitLab"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-shell"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~arm ~arm64"
|
||||
IUSE=""
|
||||
|
||||
CDEPEND="
|
||||
>=dev-lang/go-1.8.3
|
||||
virtual/ruby-ssl"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="
|
||||
>=dev-vcs/git-2.7.4
|
||||
dev-db/redis
|
||||
virtual/ssh"
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/0001-${PN}-4.1.1-config-paths.patch"
|
||||
# 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"
|
||||
cp "${FILESDIR}/${PN}-6.0.3-Makefile" "${WORKDIR}/${P}/Makefile"
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_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}."
|
||||
}
|
Loading…
Reference in a new issue