mark ebuild for gitlab-shell-2.4.0 as keyword -*, because there seems to be a bug in that version (upstream).
on the other hand, add gitlab-shell-2.3.1-r1 that symlinks the secret file instead of generating it.
This commit is contained in:
parent
90a15f8c3a
commit
c3def42833
3 changed files with 129 additions and 2 deletions
|
@ -15,5 +15,6 @@ EBUILD gitlab-shell-1.9.6.ebuild 3341 SHA256 6947af19aeb95a832fc2fc7a82b021afe5a
|
|||
EBUILD gitlab-shell-1.9.7.ebuild 3348 SHA256 e76c7155c1532a5d60545632b938af401a2199c52522068f3783898890b2d0cf SHA512 03785edd44e2728c2320d90028e4cccfe0b2156f62afb28a8ecc9d9211dcf1c606887a43708f8afc10b3c7265053871fae85fda84733ef8a68aff2d9a44cce14 WHIRLPOOL fdc5509d2c02a903e8cf4e45678f078904dba08e28bd5c4726e2c09df6b32e933ecef241826f1f2edc3929f8d373606589e5353e17cacbfb03d2aaf8584db708
|
||||
EBUILD gitlab-shell-2.0.0.ebuild 3297 SHA256 668c0430dc5783852cfff4588ac1fef2fa049a5e58b233566d12b923e8778b2f SHA512 a40aebc6d437a9577e2e830f84a6666b49dd0bcce211ed4d1311dad6f98e47bb9816f6b1155a4439e0fe475484cedb483f02a788de4282a0563550b8ea30b8e0 WHIRLPOOL a57d9250c7fc89e331c55dfa589be972111b6963efd17cad35ef7a01477a5b2c5cfffdb3265f4f8affa4edbbd3fc61a7d003b72b5ab96b0e99f5aa3cfd0a9b8a
|
||||
EBUILD gitlab-shell-2.0.1.ebuild 3304 SHA256 35c085cd702149462fafe0bdfdb41ab244fe06c6caef3542aceb399d37f334bf SHA512 24725735f67323d5b6cd95f9a54981c20288acea05b07b1b195b62bf9add1b850fb787f4a9fb7749f7103cd932023d3180653dc812a02d6314ec1b674e751449 WHIRLPOOL 8adf08faa3892f2ab5ad03eadab584097f6869a720517fd925f34a05f042410411cb3132df42b1d82c3f5dba68fdb2f76b1f00611747d3f48074d9e69dc9c49f
|
||||
EBUILD gitlab-shell-2.3.1-r1.ebuild 3502 SHA256 6c604db35e20522c499f45d5994c421ea08b25313f630af8349441ddae96d757 SHA512 8d492097a53e1314212c263730b5f00f8f53c8d52b1fdc8b6c5d8abed86927f4ff56c2bf04a430dd6aa0b155d4531881d5fbbd7d8948131ec609dc2d7eb41080 WHIRLPOOL 2b491377ffe21cd0706e6c8422e1c5b52530460b08abbc315cb7e172a052f1acfdabc335575b284bd8a9107cc83d4d1411e3afe1294710d4064d14025acf1bb4
|
||||
EBUILD gitlab-shell-2.3.1.ebuild 3635 SHA256 d7b6f533145bdf67c3b19bfb2e5d330be77077939d2b75bff73d056c29645dd6 SHA512 b3f1690327682a30fbe166e38ec49171fedec22127db1555195271e4ed949238ad6d1b186dcb4d7a9c31f5c44ad60663e68efb0adfd29f1b9d6e18f58b260954 WHIRLPOOL 2a24f5a92d4a2495b8d4dd7a4182c869e32def571b2e74450659017256be08c02f4a9fa6ff8523c819391b8204aebbac41ecb6d8f5e4198168a34f10348cd73a
|
||||
EBUILD gitlab-shell-2.4.0.ebuild 3502 SHA256 6c604db35e20522c499f45d5994c421ea08b25313f630af8349441ddae96d757 SHA512 8d492097a53e1314212c263730b5f00f8f53c8d52b1fdc8b6c5d8abed86927f4ff56c2bf04a430dd6aa0b155d4531881d5fbbd7d8948131ec609dc2d7eb41080 WHIRLPOOL 2b491377ffe21cd0706e6c8422e1c5b52530460b08abbc315cb7e172a052f1acfdabc335575b284bd8a9107cc83d4d1411e3afe1294710d4064d14025acf1bb4
|
||||
EBUILD gitlab-shell-2.4.0.ebuild 3493 SHA256 f9a0ad0117da896c4369cecfe7d1fb3df4c23715375278b95126e62ebd3cb101 SHA512 70ba569ccb431eb52421526af9456c66806d90b330bfb71a08609973195f01882f4a95a3347a30becb10c4638d0728f40b04670936897e29586ede724bed20d1 WHIRLPOOL beb82a34d00f12e755977fef75d57d98c57172490de120d825ec213e0d388a3294a2f6afbf45faaea411e37de385630f39af3bb44c693713e6666d35c02d54e9
|
||||
|
|
126
dev-vcs/gitlab-shell/gitlab-shell-2.3.1-r1.ebuild
Normal file
126
dev-vcs/gitlab-shell/gitlab-shell-2.3.1-r1.ebuild
Normal file
|
@ -0,0 +1,126 @@
|
|||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
USE_RUBY="ruby20 ruby21"
|
||||
|
||||
inherit eutils ruby-ng user
|
||||
|
||||
DESCRIPTION="SSH access and repository management for GitLab"
|
||||
HOMEPAGE="https://github.com/gitlabhq/gitlab-shell"
|
||||
SRC_URI="https://github.com/gitlabhq/gitlab-shell/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="
|
||||
dev-vcs/git
|
||||
dev-db/redis
|
||||
virtual/ssh"
|
||||
ruby_add_bdepend "
|
||||
virtual/ruby-ssl"
|
||||
|
||||
MERGE_TYPE="binary"
|
||||
|
||||
RUBY_PATCHES=(
|
||||
"${PN}-2.0.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-6/.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}."
|
||||
}
|
|
@ -14,7 +14,7 @@ SRC_URI="https://github.com/gitlabhq/gitlab-shell/archive/v${PV}.tar.gz -> ${P}.
|
|||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
KEYWORDS="-*"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
|
|
Loading…
Reference in a new issue