dev-vcs/gitlab-shell:

Purge obsolete versions of gitlab-shell

Package-Manager: Portage-2.3.19, Repoman-2.3.6
This commit is contained in:
Manuel Friedli 2018-03-08 20:54:29 +01:00
parent 7a630876ec
commit 347a274a45
7 changed files with 6 additions and 676 deletions

View file

@ -1,3 +1,8 @@
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:
dev-vcs/gitlab-shell: Purge obsolete versions of gitlab-shell
*gitlab-shell-5.10.2 (17 Feb 2018)
17 Feb 2018; Manuel Friedli <manuel@fritteli.ch> +gitlab-shell-5.10.2.ebuild:

View file

@ -1,24 +1,14 @@
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-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.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
DIST gitlab-shell-5.9.3.tar.gz 711416 SHA256 43692b5ba3c9757ad201611b66f199a636e6d4b47c144ebfd5e8d9b9c996e127 SHA512 b58c7eac03152378bba7f965e630669b6d3628edc11e880500eca5a200d93777e164c3f31c1a241c7b5789d3cbbb19944005268c406d4371ccbe90f913be215e WHIRLPOOL 2ab0627c4ab532c6d291b8ebce6e5d34484bef8ac8cf3feee0d2c1ba2a8d7c570b6e36df1b1c6b121a49145d49b6d1a5d8a37a70ca3f8af70f3231125674a3d2
EBUILD gitlab-shell-5.0.0.ebuild 3654 SHA256 2a3a890e9c7d9dd8af476dd0cdfe480512dacdcbbf53182bd353797c76684256 SHA512 243b7add0a8f737640d46c7c0bd8b0a6c93b1275302d1cd3cfae20cfb77116645a8b384a977ae862941cadb7200f81dc6a6eaf604372fa5a1bfa1761430627e5 WHIRLPOOL b8762ae9c23b2c1a8e322b5b22ece63eaa1421a5cfc53b067b036c61d9c59f84d4a38e4ed95f002be6d5e5c1ce8d9c88d694a8fee5abe1a0b1dda5f4751c2722
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.10.2.ebuild 3717 SHA256 f0733e56a42e32de7976321a41cb553e6805c7e3d3df41db7180e9a764516b3f SHA512 ae660c8f88b91bd183e786064122ae8e3504efaf5da181b9ad3c2911dd10c981767544a72380b6f23aaf7546b93bdca3e5a7679d54a2d8ee23795e800398106a WHIRLPOOL 72eac46110d8fc2550d52e73cf8577a2c9200b476b6ae1f0fc1bf225af2298b715f7ecb5d0bc3c78bfa75a9bbe39b32aeca036febdca8f8f5ede5c9260593259
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 5572 SHA256 7f452659054ce68f9c7311c0e8e41d9437fb6f979d8dcd76c59c3e6a7c7cb56f SHA512 c8cacc1cdfe073a04e130ea6b310d2356efff90aee29a2589dc7d3ec4e77f048638463afabcc3ff9f45908994f38b32c3afc30477e6ddd6c75f3311c51ad2739 WHIRLPOOL 00c7af0fd46690c9eae9c21c25e7be1272a7dd5be1a2390fe98503f63e8b7b873a6c5482eee395476856ff80af69e32c6dfc8e9a6d2b70f09f991b0a53353979
MISC ChangeLog 5833 SHA256 122b2e18ba78c963faa1f46153dd8e118cc1e7d929c181fce82f1bed26b707c9 SHA512 17376f31cc4bc73082c8c80021a70dce48d032cb63410abcae474e2184923612c13fedfc8b450a85a1e875d679a617bce461bbecb8a3c464f357c6c31acb85b8 WHIRLPOOL 5ea586f822f8e0b6d57a21b6eb372b0b33906c5c3c4ff5152b747cf5c5e7540f7551c175606d0afd46f94c9a67b38ff11bad8e9a1fe09421c78a2eb1418be4da
MISC metadata.xml 248 SHA256 7b43be15755627edf5c12cf1b50c607d781558640bf8375d685d51d7ade99a32 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2 WHIRLPOOL 993013c9878ead35469db13d3072f694a341ee654182e0c31d0678f5dd6de4bdc8d59a0b7bb6d685dc41ea6b55dac518cd8034131baea8002170c680e50304d1

View file

@ -1,129 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
USE_RUBY="ruby21 ruby23"
inherit eutils ruby-ng user
MY_PV="v${PV/_/-}"
MY_GIT_COMMIT="199e2d62ebea9939e48d442c6a866d26d0aede4f"
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}."
}

View file

@ -1,129 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
USE_RUBY="ruby21 ruby23"
inherit eutils ruby-ng user
MY_PV="v${PV/_/-}"
MY_GIT_COMMIT="3d22504d1cebecdfe778e3ee10b9a380efea80dd"
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}."
}

View file

@ -1,129 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
USE_RUBY="ruby21 ruby23"
inherit eutils ruby-ng user
MY_PV="v${PV/_/-}"
MY_GIT_COMMIT="285c061ed8933c0d94a9ad027f99653039673324"
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}."
}

View file

@ -1,139 +0,0 @@
# Copyright 1999-2017 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="0a64624152735766c428d1532e434dd0bf5a9748"
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"
RUBY_PATCHES=(
"0001-${PN}-4.1.1-config-paths.patch"
"0002-${PN}-5.1.1-Makefile.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_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}."
}

View file

@ -1,139 +0,0 @@
# Copyright 1999-2017 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="5f1ab2100c2e520785a46da6d759685a65849d51"
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"
RUBY_PATCHES=(
"0001-${PN}-4.1.1-config-paths.patch"
"0002-${PN}-5.1.1-Makefile.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_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}."
}