dev-vcs/gitlab-shell:

added ebuild for versioin 3.5.0

Package-Manager: portage-2.2.28
This commit is contained in:
Manuel Friedli 2016-09-17 01:16:09 +02:00
parent ccfe71bf72
commit 2211fd5f85
3 changed files with 138 additions and 1 deletions

View file

@ -1,3 +1,8 @@
*gitlab-shell-3.5.0 (16 Sep 2016)
16 Sep 2016; Manuel Friedli <manuel@fritteli.ch> +gitlab-shell-3.5.0.ebuild:
dev-vcs/gitlab-shell: added ebuild for versioin 3.5.0
22 Aug 2016; Manuel Friedli <manuel@fritteli.ch>
-files/gitlab-shell-2.0.0-config-paths.patch, -gitlab-shell-3.0.0.ebuild,
-gitlab-shell-3.2.0.ebuild:

View file

@ -1,7 +1,9 @@
AUX gitlab-shell-3.2.0-config-paths.patch 1826 SHA256 c83db7c37dcac577ce499eab4bb0168253f49d303ba1991fdec90d13cc3fe37a SHA512 7524b6b8cd7cd141a56c468efa303b1d21576ac9e03cb866cbf9dcac34e1b8d4f356333737050e2e5dfeb0f0ad904b3f548c40e1209c1f35054ed2027b1d8271 WHIRLPOOL fdbd2dfe43ff4a2af97227fbf8c4589ca3734ebf0320b7e9c5e8ea39882c49d45815a0ee3c765a141affacbe48f4063987b9664a918e0e216b49ca46a475cc5f
DIST gitlab-shell-3.2.1.tar.gz 68788 SHA256 ad21f8676901b9d90a1c8016b5fe2ad73f9a7966ab378ce244b12fc0373e9f46 SHA512 2280b5ea529d1efff365b1f72ded2af71c7cd19c88c1d7638f730044c5a804a0adb8670685b2016b26e894755a0b70f365d234c95e4ca3bf09913d7b6bebca76 WHIRLPOOL e21d77c00a02105babe4cf84c7ff9223131eef5e7e1db80d06b40bae87d225b579f4fbdca4ac2809be436f96b25753f73b354e6d03ad1b22ad57bfac7c720ae9
DIST gitlab-shell-3.4.0.tar.gz 71972 SHA256 0ac8f18b1615194943e935b670d630a1ba9870ad876f7486256972c7be1d45d4 SHA512 1138e02dbf5169547e39eea87ac88f05009424c76f26b4b0f2cb3882eaefc9d7aa11e167c6d9309947da728fc5381a234b93e25a0ded4f87eb8d8c88baaa2b9c WHIRLPOOL ef9ff2b349af97019da56c2e0b850fc4885ad036074e7bce39ba6f12bea611b771becc5ebf3e1889a71078243488bbf7c93ed90e545844b36aeb42b79265ab2c
DIST gitlab-shell-3.5.0.tar.gz 73374 SHA256 6591b768a4f51c535e97e5632518583f6559a4202f4219739ad01a27161687ef SHA512 b5935c6f9b19bab1716901c8015e107f7fbc545646d5e35a6a943e1692d3ddd61efeb862f4d59efe75eda9c1117adf9d90b50f572ab0a69199069d1fc52e8718 WHIRLPOOL 938c600d0810867fc9aef62a286b05dc34bf52352612530d459614483e3c37b3cef6ee5b2dc11f7b041218cbe569d11f4f5f0240b9c28e613bd762c06786772e
EBUILD gitlab-shell-3.2.1.ebuild 3653 SHA256 e8043271a1a42664862a4284a185ee11c7fc6c133a1b3c7dfb44b748d705cc3d SHA512 0232d94c21d675b1e8762a2de1d95a36bf41afc97435d84e54dd93bbf190cacbbfd426e6e6253c5f2f894c5d3ff7c878c261df7714d477c4332beeb433fea223 WHIRLPOOL 02fa858649c50c040fc16930c5f7f35dcb9d9df2d693898dd930cc945d0d5f264b52009cde063fafbaae78aecfab6dcf6d6f03fb9e4c2f9444300e8fd514175a
EBUILD gitlab-shell-3.4.0.ebuild 3653 SHA256 7bf777fc3b5bda03f9a455874f62bb6260eeb73dd8727e4145ed0cda2e283465 SHA512 de5b78133d317155f5764d6888d421c4f2945ccb5972c032c05138344188eb0a0f85817431aa4348e2074667c901f44cf2b575f572aeb2620aab58a32ddba22b WHIRLPOOL e53de830c17bc9c784df06670c6fdc7465ba05ca40de42e4857e5a83421208f9bbb4381c2988fbabc85f86476d5c2b7301123392de132558bdd6f969726a9a57
MISC ChangeLog 1110 SHA256 c43ec8d94e3186c9bfd4c1ffa84a302d9889914969316d7157c2959985600326 SHA512 b709fedc11c89fbd7032a45c68ae7967285ce41f543cab491dce232a570a5024b5bec8a0e7facbd169637434d027280054f60819afd5e0569c33947e1dd2ea25 WHIRLPOOL ce0dd267c7c52bf8763f2875401654c9cf003b64fe8f7eeca846d5424c9aad44637bc6b64838069e75211107dc4e85c9dbe5467b044011fe4340bf6811dcac67
EBUILD gitlab-shell-3.5.0.ebuild 3653 SHA256 3b73797e283ff4ec30c87d50a54a80cf6895c0c03dedc3ff34087b3037dd9fd5 SHA512 cc235d625f1eabac09822fbca06b706886601e550958338ea5ee7ccfdbbb85e2d96bb348b4ccce532c92d18389c63ddb78bcd77e407f789127fbb3d9ac32d0d9 WHIRLPOOL 4a8bb0ee8a1b547bb8517c300806457187a8fd1855b223cf079784733fdef55e2dd5fa9998da9523bcd3b021aa10d45cc74445bae5bd8f853e3355d6a1d6417a
MISC ChangeLog 1282 SHA256 0c3aaf7b0e9386180213edaf75d2be70cd75b4797c79a053be1e3bb109220012 SHA512 78232992b59d4d15947347fb3a7b8efcd399c8584886230a946ddeda8bb7ad06f42de730ceed9df296933c7d88a2441d8d8e8787f5610941f191076344c6bcd1 WHIRLPOOL 2db732b38f62051acadfbb434ffe1e3ac6861f9f213b688246cfa00404cbddb790d61c007b8a0c73ac43328622a2b54f46139da397ca4590af7235383823c31c
MISC metadata.xml 234 SHA256 f35b97f99a26d73cc441e1d93bfe25aaa4e9f7f6d90c8d05a74f7b7bc5b68472 SHA512 59d8156b3ca3e99c40d5a2a32de7edf2eb53279b2424998862589d6bad77617d23fc852afec0a92f8ac5bb54a88ebc504cc0641029c1936412e90ab03dfdd447 WHIRLPOOL 935a1401910a42f888c991e443a49275ea8b87976c5aa977f670053d97d18754231749749bc92d37d4b5f45ecf65914480942a11b5827b6c08fb24313a428431

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="ruby20 ruby21"
inherit eutils ruby-ng user
MY_PV="v${PV/_/-}"
MY_GIT_COMMIT="c6d8af599dc797ec8ba7874380abad393b439c9e"
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}-3.2.0-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}."
}