dev-vcs/gitlab-shell:

Add new versions of gitlab-shell

Package-Manager: Portage-2.3.6, Repoman-2.3.1
This commit is contained in:
Manuel Friedli 2017-07-25 11:13:51 +02:00
parent 1cab7f9880
commit e9f6de2a55
4 changed files with 292 additions and 1 deletions

View File

@ -1,3 +1,10 @@
*gitlab-shell-5.3.1 (25 Jul 2017)
*gitlab-shell-5.4.0 (25 Jul 2017)
25 Jul 2017; Manuel Friedli <manuel@fritteli.ch> +gitlab-shell-5.3.1.ebuild,
+gitlab-shell-5.4.0.ebuild:
dev-vcs/gitlab-shell: Add new versions of gitlab-shell
16 Jul 2017; 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.0.5.ebuild, gitlab-shell-5.1.1.ebuild:

View File

@ -6,10 +6,14 @@ DIST gitlab-shell-5.0.2.tar.gz 79009 SHA256 bb5125f12f2f3fbbb93aa78f6810cd62f97b
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
DIST gitlab-shell-5.3.1.tar.gz 708811 SHA256 989e7976c56d09d455e5e67e587426be2aca71ef2e27541c8654e74aac82f68c SHA512 00c6dde3d7a59c956396988b2f5790291c44fe134812588ab5c03e7612d49c08de2f5fd08a8b4a55a2c95a46db1d0cdb0e07469958d5c0d6c778d0f9dd279afc WHIRLPOOL 266218edb547e2e7fab95982f78d5c2a7057e061a48a854697949214791dab512f4512a57197ce1ac901dd2b97f4e363a39b8cd2ac74f5cb002ffdc38b8fd06a
DIST gitlab-shell-5.4.0.tar.gz 713393 SHA256 2c778f559617a63911fbc9fdb531d0cd2266b56eb2d3c8533f455312aa185eb0 SHA512 81991ee212f5babfe5217aa14afbf2cdc3aee6e3b44418c6262632fbadaf97eecf0688537e602b4cd297881134f789b57475c9a43a85b57ab00b3feebf6dca71 WHIRLPOOL da193bcbccfe8248a90fd5c6a1d1df61bfe9ec045a8a3cb6a83660f9fa74b6b7e0f23cf96629cd8e7477dcfda4ad0fb39ebe4395c58350f10eb9f9a765750d9d
EBUILD gitlab-shell-5.0.0.ebuild 3653 SHA256 346718615330cb98f84556a65fbac2561c14fab6ed22a42d4fa6cbcb651faa98 SHA512 390c922cc1eebd3dd7fa10e94b58a61a2d7363e19b59cffbd54be40c6fee60a894487c168b42294af5bae772d94c687dd14edf48c50c43696a52e4c8db87088c WHIRLPOOL 1278ab21caa8385e21976bed117ac1428ea2ed08576e20f58c7337ab8e8d565c4bf4742895458373878f19dfc48924f808bb4950303f48ce17af216f797f885a
EBUILD gitlab-shell-5.0.2.ebuild 3653 SHA256 0af6f31c8d068612d618ec4d5959e06e78cd867dfb994079793fb2041803663f SHA512 65eac38adc73d5bec64bb95214a0c9599a72d51b6e4c766881b39087afc0b72b4180fad30b7ee5f46e85949a2d52956475db7b8d52976a12bae7d51681e140e1 WHIRLPOOL 8d406881dfd71e0b3b9168f3fd23766a04dfeecfdf668de9e3298a5650333c851feb6702c8f2134cfe683fd280369481cd53896ec95d1b89f4f9a92d89eb3f7b
EBUILD gitlab-shell-5.0.4.ebuild 3653 SHA256 8e235cbe5a233e0382aadb466ee130c8b76bc3474fdfe175bf27a38d2cb975a0 SHA512 16e3a82a9705dd525fb24d3cb3981c12c2dbf3f944055570b1299cfcd67ad480c3ad69068c4347c61274003c20908bf2918a336d80c7a5148df5418fd1524d8a WHIRLPOOL edab6e46dc3af776db143be3a0009917f55fdcd01528c746bfa69b7acb0135d9880387e46653c31b5a04c60d6aee51efd7773aa2403e1cf0142d4a3e4a380835
EBUILD gitlab-shell-5.0.5.ebuild 3646 SHA256 6ccddb217f38775da4165ffd595965b81724565317615b3ff824d8754aeada13 SHA512 18cd05520e0310384fdd662db00e0ae4c7dd9283b32553ec06493a1ab2fbed64207a9664d7130dab5343aa3e8fc2246e8560949e84327a7ac1c99ab637e857fa WHIRLPOOL f577a12fee7f171804eff6e79d43f6ac5f19e0166487536704197e645ff3467a9b7e791b1ee78c38054d74ceff76337bc546f5f132acc993b8aaf58ca830a95c
EBUILD gitlab-shell-5.1.1.ebuild 3888 SHA256 9e7c878a166555bdd6c14d1be5929b0363eabe4352073db46e84905937323169 SHA512 4bb335f810619f813e84a20a0861ab3e1fdff1134b829f55bd209e70fcfb43fdac96b9fe011aed1a031b6674518c8b36be13d8fb7c8f9ea9cbc3335e3f0b1edc WHIRLPOOL 0285dacb4e03ede570ed4c5d07153d0c7835e91d7dc7742064021c92ec8d2d04ffc9a6d2baf533f86edf4bd18337658a96297918e38ff6c81ee2291284e9a237
MISC ChangeLog 4040 SHA256 99697080185e83be7d6207ecaaccd5035b975f3883d5b09fe70acfa678e59281 SHA512 29661c24b561d7c885113b74e3e54f9a89d8cc4438a128a549a288ec2de6a741f9e97ab153027c282642c52b2bb29b43fa778b43e729784cf1358db8e012bfab WHIRLPOOL 8c1692f859f55ed8d85a0fe12cff710ccaebcadeea31922c10947754865fc1ae075acd4baeb367a0b8a32de27aa8522e88e83bb5c93a442da4a9c7586f253453
EBUILD gitlab-shell-5.3.1.ebuild 3888 SHA256 7075b271eeee6da9a8bd9f9e5aaf9c0c9612ab2d27f8399df32628e7bde53fa2 SHA512 b7c567e262e23fdb9f6845b141aa4157d31b86ce115e305f56f30e1673dcd9cb1a4dce82f45a4139ff47008c9072cc743d76f00ab92f4d9fa869dcf4ecd26cc4 WHIRLPOOL e3efacb596afb62d21feffa26e7c2b2947a03e742a55edd1d4f60746395ab6edd636824d14f937d3e66003fdec9b168ebb80ba31a34e9ee6faf8964cca8839e7
EBUILD gitlab-shell-5.4.0.ebuild 3888 SHA256 3e66c555e3d1f7a8e9cdacd615917014329b42a12fd8f7d74faa01493bd77add SHA512 e2d6afbce2906462943b3405b386ab92a8f6529790de206806b7cddd0d0425fd2fca06ff9a76218323bb6f2bc9b08175677c97e9d111e28af995636acca3bbbc WHIRLPOOL 9889b9cdf7bd3f0d2109cc4c6e6873c0bdb424977537a404afe92935a9a831f81d1a4dec18133668d9f4625e29e60990ac065e7b521b80fa124eec4704b9a65d
MISC ChangeLog 4277 SHA256 40eeac9d723336be3aaf1868a1a893c02ce6670eaa0c60c7a08fa718c63a0d2b SHA512 d60bba4aacdc44ac5e6b2f635515b2c018ae2dac61bd622818cab213b14d4cdc8a20b09be140cf2e458f4c0816ba41de35dbbd06b138fccca14be1d39e8370ad WHIRLPOOL 8b94560d063f6f1e85818650044bcdca11979855e3d6426cb098235cdcb6c7818911c9c0d98be916125fc7a376ccd5a4012ba3c2b9977a97482f5a4642425a6a
MISC metadata.xml 248 SHA256 7b43be15755627edf5c12cf1b50c607d781558640bf8375d685d51d7ade99a32 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2 WHIRLPOOL 993013c9878ead35469db13d3072f694a341ee654182e0c31d0678f5dd6de4bdc8d59a0b7bb6d685dc41ea6b55dac518cd8034131baea8002170c680e50304d1

View File

@ -0,0 +1,140 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
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}."
}

View File

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