dev-vcs/gitlab-shell:
Purge obsolete versions Package-Manager: Portage-2.3.5, Repoman-2.3.1
This commit is contained in:
parent
631b5afd9c
commit
39cf41cf1d
4 changed files with 5 additions and 265 deletions
|
@ -1,3 +1,7 @@
|
|||
09 Jul 2017; Manuel Friedli <manuel@fritteli.ch> -gitlab-shell-4.1.1.ebuild,
|
||||
-gitlab-shell-5.0.3.ebuild:
|
||||
dev-vcs/gitlab-shell: Purge obsolete versions
|
||||
|
||||
08 Jul 2017; Manuel Friedli <manuel@fritteli.ch>
|
||||
+files/0001-gitlab-shell-4.1.1-config-paths.patch,
|
||||
+files/0002-gitlab-shell-5.1.1-Makefile.patch, gitlab-shell-5.1.1.ebuild:
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
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
|
||||
DIST gitlab-shell-4.1.1.tar.gz 78829 SHA256 61f684b4528b0b789aad80efbfd8f9870d113f6e2794e589e0db9e74e6737e1d SHA512 17b929da1c6148a9af2787ca4a18081e3108622a40c6fb3f02f36f4ba41f2a1d61cf83509ace849093334af8f4ad74d8a36393bf9fca7ab21163d2f48b499879 WHIRLPOOL cfd258e93abeae4a33c1578114d56186c81a7c5894a3ccb9b690dd9a78051746916f3bac2b7146b8378534d5e177ba4cacb4c2011b64011328b056d4d397967e
|
||||
DIST gitlab-shell-5.0.0.tar.gz 78585 SHA256 7611fdf0b64592365bdb6ba442a4263d129b05c280d5105ea641baec7a0b45ab SHA512 84c86c42e0ff6029ddcdd9a93410b261f4f5a1e8cdb0fd114db2eab56b1fc63f4f8ed6d0cc0c6016d0f02413d6d213aab7a995adadb186c0dfe49e49b762e904 WHIRLPOOL ddaf25f837dbbdbfd6578062b89a8102ffbe0dc88f51890a38f59add61653368b0ad0ea146a8a7eac52fa482f7316aae712f53075f750db02fa8e8ce370f76e6
|
||||
DIST gitlab-shell-5.0.2.tar.gz 79009 SHA256 bb5125f12f2f3fbbb93aa78f6810cd62f97bda564d01112a831bf41d4e42ef34 SHA512 c960e1e2c3c9f35927255442f4e20b82af8881d123c3edeffe7ebdc6523fe2456ae1e7149527255eb5e3d2d369b4f70b7c902314d881a20b893fea9fac968f73 WHIRLPOOL dc5be75f111074c8e9f018533ddcef64edcded4c5f3003a3f7297d9153469894f4c8a3e387419055a3e51732daa9db8a3b936984a24f3b4d1a9e0cbc968a7119
|
||||
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
|
||||
EBUILD gitlab-shell-5.1.1.ebuild 3888 SHA256 c62a4f22fb2b27377f8b1f8ab721c48c3fbb1ded13a618b01dff0ed881505ca1 SHA512 6768c7021dc1cf08d03d92abfe0f03b3b741cdee4d2b98b64591548beff1e1ffd2b9d347a0bce19a6ab41975de18487aa8ebb6655f2f7e6c4f878e1183672544 WHIRLPOOL 338ece7de253f88123be40ca35a4164a09380489177dcbe2e714d342ca60221d31c621b4f061f28f348bd96dfbb0ab4515e33a75ae17e857a6e3767672d1f88c
|
||||
MISC ChangeLog 3631 SHA256 dd999a5cc8d13913fa85264c06160c44a3498ff578a4d75dab0146f3250a35b4 SHA512 2b09b64c479039623f65af574b2994ff630b8e2ca1fe0623852b3506ba8e3189935a3c934bb68ee4d4c21d039833a466e2cd8532fe3eed961a1be5af7717e163 WHIRLPOOL 9cd95632767463940941e246bad52cb0f028d5de47bf01ad56a41a429828d85450292e7c7b80ed4938e21ec332bbbf944e1479d3d1d1d39b05fcf654603dad56
|
||||
MISC ChangeLog 3790 SHA256 71ab99f1e1167390c21a537556dca047f0c723611855da4c4736626769972d3f SHA512 ae07426e448715013fb0f73644751a9d34713ca4712b3bfbc76368b7666b4fdf51a56e1deabfe5d359bc01515b6ca2b58106fe773b2b0d6d7d5edf20e00159f3 WHIRLPOOL 517ccd582928da0d26fa75b3b116fec7675ebd520dec0b02e845d3d51ac0114aa054cced0dce3636f121cbfe2b17346994851cd2656bd80dc4abc450825f046f
|
||||
MISC metadata.xml 248 SHA256 7b43be15755627edf5c12cf1b50c607d781558640bf8375d685d51d7ade99a32 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2 WHIRLPOOL 993013c9878ead35469db13d3072f694a341ee654182e0c31d0678f5dd6de4bdc8d59a0b7bb6d685dc41ea6b55dac518cd8034131baea8002170c680e50304d1
|
||||
|
|
|
@ -1,130 +0,0 @@
|
|||
# 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}."
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
# Copyright 1999-2017 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="158b424f9aec0e4ce439f56cb193e369b36e0e46"
|
||||
|
||||
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}."
|
||||
}
|
Loading…
Reference in a new issue