diff --git a/.directory b/.directory new file mode 100644 index 0000000000000000000000000000000000000000..9ad84e2c3ba04eaa65588f1506c9559268ac3450 --- /dev/null +++ b/.directory @@ -0,0 +1,4 @@ +[Dolphin] +Timestamp=2020,5,7,22,35,26 +Version=4 +ViewMode=1 diff --git a/dev-vcs/gitlab-shell/gitlab-shell-3.6.6-r1.ebuild b/dev-vcs/gitlab-shell/gitlab-shell-3.6.6-r1.ebuild deleted file mode 100644 index 1c945fc01392e84866c91056ca73e37732542970..0000000000000000000000000000000000000000 --- a/dev-vcs/gitlab-shell/gitlab-shell-3.6.6-r1.ebuild +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="5" - -USE_RUBY="ruby21" -EGIT_REPO_URI="https://github.com/gitlabhq/gitlab-shell.git" -EGIT_COMMIT="v${PV}" - -inherit eutils git-2 ruby-ng user - -DESCRIPTION="GitLab Shell is a free SSH access and repository management application" -HOMEPAGE="https://github.com/gitlabhq/gitlab-shell" -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 x86 ~arm" -IUSE="nginx" -RDEPEND=" - nginx? ( www-servers/nginx ) - virtual/ssh - dev-db/redis" -DEPEND="${RDEPEND} - $(ruby_implementations_depend) - dev-vcs/git" - -GIT_USER="git" -GIT_GROUP="git" -HOME="/home/git" -REPO_DIR="${HOME}/repositories" -AUTH_FILE="${HOME}/.ssh/authorized_keys" -KEY_DIR="${HOME}/.ssh" -DEST_DIR="/var/lib/${PN}" - -pkg_setup() { - - enewgroup ${GIT_GROUP} - enewuser ${GIT_USER} -1 /bin/bash "${HOME}" ${GIT_GROUP} -} - -all_ruby_unpack() { - git-2_src_unpack - cd ${P} - sed -i \ - -e "s|\(user:\).*|\1 ${GIT_USER}|" \ - -e "s|\(repos_path:\).*|\1 \"${REPO_DIR}\"|" \ - -e "s|\(auth_file:\).*|\1 \"${AUTH_FILE}\"|" \ - config.yml.example || die "failed to filter config.yml.example" -} - -all_ruby_install() { - - rm -Rf .git .gitignore - - insinto ${DEST_DIR} - touch gitlab-shell.log - doins -r . || die - - dosym ${DEST_DIR}/bin/gitlab-keys /usr/bin/gitlab-keys || die - dosym ${DEST_DIR}/bin/gitlab-projects /usr/bin/gitlab-projects || die - dosym ${DEST_DIR}/bin/gitlab-shell /usr/bin/gitlab-shell || die - dosym ${DEST_DIR}/bin/check /usr/bin/gitlab-check || die - - fperms 0755 ${DEST_DIR}/bin/gitlab-keys || die - fperms 0755 ${DEST_DIR}/bin/gitlab-projects || die - fperms 0755 ${DEST_DIR}/bin/gitlab-shell || die - fperms 0755 ${DEST_DIR}/bin/check || die - fperms 0755 ${DEST_DIR}/bin/create-hooks || die - fperms 0755 ${DEST_DIR}/bin/install || die - - fperms 0755 ${DEST_DIR}/hooks/post-receive || die - fperms 0755 ${DEST_DIR}/hooks/pre-receive || die - fperms 0755 ${DEST_DIR}/hooks/update || die - - fowners -R ${GIT_USER} ${DEST_DIR} || die -} - -pkg_postinst() { - use nginx && usermod git -aG nginx - dodir "${REPO_DIR}" || die - - if [[ ! -d "${KEY_DIR}" ]] ; then - mkdir "${KEY_DIR}" || die - chmod 0700 "${KEY_DIR}" || die - chown ${GIT_USER}:${GIT_GROUP} "${KEY_DIR}" -R || die - fi - - if [[ ! -e "${AUTH_FILE}" ]] ; then - touch "${AUTH_FILE}" || die - chmod 0600 "${AUTH_FILE}" || die - chown ${GIT_USER}:${GIT_GROUP} "${AUTH_FILE}" || die - fi - - if [[ ! -d "${REPO_DIR}" ]] ; then - mkdir "${REPO_DIR}" - chmod ug+rwX,o-rwx "${REPO_DIR}" -R || die - chmod ug-s,o-rwx "${REPO_DIR}" -R || die - chown ${GIT_USER}:${GIT_GROUP} "${REPO_DIR}" -R || die - fi - fperms -R ug+rwX,o-rwx "${REPO_DIR}" - fperms -R ug-s "${REPO_DIR}" - - elog "Copy ${DEST_DIR}/config.yml.example to ${DEST_DIR}/config.yml" - elog "and edit this file in order to configure your GitLab-Shell settings." -} diff --git a/dev-vcs/gitlab-shell/gitlab-shell-5.0.0.ebuild b/dev-vcs/gitlab-shell/gitlab-shell-5.0.0.ebuild deleted file mode 100644 index 7a0b4ef7e01a3a108b915d1153f1233b3ddac23a..0000000000000000000000000000000000000000 --- a/dev-vcs/gitlab-shell/gitlab-shell-5.0.0.ebuild +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="5" - -USE_RUBY="ruby22 ruby23 ruby24" -EGIT_REPO_URI="https://github.com/gitlabhq/gitlab-shell.git" -EGIT_COMMIT="v${PV}" - -inherit eutils git-2 ruby-ng user - -DESCRIPTION="GitLab Shell is a free SSH access and repository management application" -HOMEPAGE="https://github.com/gitlabhq/gitlab-shell" -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 x86 ~arm" -IUSE="nginx" -RDEPEND=" - nginx? ( www-servers/nginx ) - virtual/ssh - dev-db/redis" -DEPEND="${RDEPEND} - $(ruby_implementations_depend) - dev-vcs/git" - -GIT_USER="git" -GIT_GROUP="git" -DEST_DIR="/var/lib/${PN}" - -pkg_setup() { - HOME=$(if [ -n "$(getent passwd git | cut -d: -f6)" ]; then (getent passwd git | cut -d: -f6); else (echo /home/git); fi) - REPO_DIR="${HOME}/repositories" - AUTH_FILE="${HOME}/.ssh/authorized_keys" - KEY_DIR=$(dirname "${AUTH_FILE}") - - enewgroup ${GIT_GROUP} - enewuser ${GIT_USER} -1 -1 "${HOME}" ${GIT_GROUP} -} - -all_ruby_unpack() { - git-2_src_unpack - cd ${P} - sed -i \ - -e "s|\(user:\).*|\1 ${GIT_USER}|" \ - -e "s|\(repos_path:\).*|\1 \"${REPO_DIR}\"|" \ - -e "s|\(auth_file:\).*|\1 \"${AUTH_FILE}\"|" \ - config.yml.example || die "failed to filter config.yml.example" -} - -all_ruby_install() { - - rm -Rf .git .gitignore go_build - - insinto ${DEST_DIR} - touch gitlab-shell.log - doins -r . || die - - dosym ${DEST_DIR}/bin/gitlab-keys /usr/bin/gitlab-keys || die - dosym ${DEST_DIR}/bin/gitlab-shell /usr/bin/gitlab-shell || die - dosym ${DEST_DIR}/bin/check /usr/bin/gitlab-check || die - - for bin in authorized_keys check create-hooks gitlab-keys gitlab-projects gitlab-shell install ; do - fperms 0755 ${DEST_DIR}/bin/${bin} || die - done - - fperms 0755 ${DEST_DIR}/hooks/post-receive || die - fperms 0755 ${DEST_DIR}/hooks/pre-receive || die - fperms 0755 ${DEST_DIR}/hooks/update || die - - fowners ${GIT_USER} ${DEST_DIR}/gitlab-shell.log - fowners ${GIT_USER} ${DEST_DIR} || die -} - -pkg_postinst() { - - dodir "${REPO_DIR}" || die - - if [[ ! -d "${KEY_DIR}" ]] ; then - mkdir "${KEY_DIR}" || die - chmod 0700 "${KEY_DIR}" || die - chown ${GIT_USER}:${GIT_GROUP} "${KEY_DIR}" -R || die - fi - - if [[ ! -e "${AUTH_FILE}" ]] ; then - touch "${AUTH_FILE}" || die - chmod 0600 "${AUTH_FILE}" || die - chown ${GIT_USER}:${GIT_GROUP} "${AUTH_FILE}" || die - fi - - if [[ ! -d "${REPO_DIR}" ]] ; then - mkdir "${REPO_DIR}" - chmod ug+rwX,o-rwx "${REPO_DIR}" -R || die - chmod ug-s,o-rwx "${REPO_DIR}" -R || die - chown ${GIT_USER}:${GIT_GROUP} "${REPO_DIR}" -R || die - fi - - elog "Copy ${DEST_DIR}/config.yml.example to ${DEST_DIR}/config.yml" - elog "and edit this file in order to configure your GitLab-Shell settings." -} diff --git a/dev-vcs/gitlab-shell/gitlab-shell-5.0.4-r1.ebuild b/dev-vcs/gitlab-shell/gitlab-shell-5.0.4-r1.ebuild deleted file mode 100644 index 22865a6a59ae9d707ff619cfe2f7611ac702690a..0000000000000000000000000000000000000000 --- a/dev-vcs/gitlab-shell/gitlab-shell-5.0.4-r1.ebuild +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="5" - -USE_RUBY="ruby22 ruby23 ruby24" -EGIT_REPO_URI="https://github.com/gitlabhq/gitlab-shell.git" -EGIT_COMMIT="v${PV}" - -inherit eutils git-2 ruby-ng user - -DESCRIPTION="GitLab Shell is a free SSH access and repository management application" -HOMEPAGE="https://github.com/gitlabhq/gitlab-shell" -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 x86 ~arm" -IUSE="nginx" -RDEPEND=" - nginx? ( www-servers/nginx ) - virtual/ssh - dev-db/redis" -DEPEND="${RDEPEND} - $(ruby_implementations_depend) - dev-vcs/git" - -GIT_USER="git" -GIT_GROUP="git" -DEST_DIR="/var/lib/${PN}" - -pkg_setup() { - HOME=$(if [ -n "$(getent passwd git | cut -d: -f6)" ]; then (getent passwd git | cut -d: -f6); else (echo /home/git); fi) - REPO_DIR="${HOME}/repositories" - AUTH_FILE="${HOME}/.ssh/authorized_keys" - KEY_DIR=$(dirname "${AUTH_FILE}") - - enewgroup ${GIT_GROUP} - enewuser ${GIT_USER} -1 -1 "${HOME}" ${GIT_GROUP} -} - -all_ruby_unpack() { - git-2_src_unpack - cd ${P} - sed -i \ - -e "s|\(user:\).*|\1 ${GIT_USER}|" \ - -e "s|\(repos_path:\).*|\1 \"${REPO_DIR}\"|" \ - -e "s|\(auth_file:\).*|\1 \"${AUTH_FILE}\"|" \ - config.yml.example || die "failed to filter config.yml.example" -} - -all_ruby_compile() { - ./bin/compile - default -} - -all_ruby_install() { - - rm -Rf .git .gitignore go_build - - insinto ${DEST_DIR} - touch gitlab-shell.log - doins -r . || die - - dosym ${DEST_DIR}/bin/gitlab-keys /usr/bin/gitlab-keys || die - dosym ${DEST_DIR}/bin/gitlab-shell /usr/bin/gitlab-shell || die - dosym ${DEST_DIR}/bin/check /usr/bin/gitlab-check || die - - for bin in authorized_keys check compile create-hooks gitaly-receive-pack gitaly-upload-pack gitlab-keys gitlab-shell gitlab-shell-authorized-keys-check install ; do - fperms 0755 ${DEST_DIR}/bin/${bin} || die - done - - fperms 0755 ${DEST_DIR}/hooks/post-receive || die - fperms 0755 ${DEST_DIR}/hooks/pre-receive || die - fperms 0755 ${DEST_DIR}/hooks/update || die - - fowners ${GIT_USER} ${DEST_DIR}/gitlab-shell.log - fowners ${GIT_USER} ${DEST_DIR} || die -} - -pkg_postinst() { - - dodir "${REPO_DIR}" || die - - if [[ ! -d "${KEY_DIR}" ]] ; then - mkdir "${KEY_DIR}" || die - chmod 0700 "${KEY_DIR}" || die - chown ${GIT_USER}:${GIT_GROUP} "${KEY_DIR}" -R || die - fi - - if [[ ! -e "${AUTH_FILE}" ]] ; then - touch "${AUTH_FILE}" || die - chmod 0600 "${AUTH_FILE}" || die - chown ${GIT_USER}:${GIT_GROUP} "${AUTH_FILE}" || die - fi - - if [[ ! -d "${REPO_DIR}" ]] ; then - mkdir "${REPO_DIR}" - chmod ug+rwX,o-rwx "${REPO_DIR}" -R || die - chmod ug-s,o-rwx "${REPO_DIR}" -R || die - chown ${GIT_USER}:${GIT_GROUP} "${REPO_DIR}" -R || die - fi - - elog "Copy ${DEST_DIR}/config.yml.example to ${DEST_DIR}/config.yml" - elog "and edit this file in order to configure your GitLab-Shell settings." -} diff --git a/dev-vcs/gitlab-shell/gitlab-shell-6.0.3.ebuild b/dev-vcs/gitlab-shell/gitlab-shell-6.0.3.ebuild deleted file mode 100644 index 3237fd03caddbef4d767c32397a8da3a489e5827..0000000000000000000000000000000000000000 --- a/dev-vcs/gitlab-shell/gitlab-shell-6.0.3.ebuild +++ /dev/null @@ -1,111 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -USE_RUBY="ruby23" - -EGIT_REPO_URI="https://gitlab.com/gitlab-org/gitlab-shell.git" -EGIT_COMMIT="v${PV}" - -inherit eutils git-2 user - -DESCRIPTION="SSH access and repository management for GitLab" -HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-shell" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~arm ~arm64" -IUSE="nginx" - -CDEPEND=" - >=dev-lang/go-1.8.3 - virtual/ruby-ssl" - -DEPEND="" -RDEPEND=" - >=dev-vcs/git-2.7.4 - dev-db/redis - virtual/ssh" - -RESTRICT="mirror" - -GIT_USER="git" -GIT_GROUP="git" -DEST_DIR="/var/lib/${PN}" - -pkg_setup() { - HOME=$(if [ -n "$(getent passwd git | cut -d: -f6)" ]; then (getent passwd git | cut -d: -f6); else (echo /home/git); fi) - REPO_DIR="${HOME}/repositories" - AUTH_FILE="${HOME}/.ssh/authorized_keys" - KEY_DIR=$(dirname "${AUTH_FILE}") - - enewgroup ${GIT_GROUP} - enewuser ${GIT_USER} -1 -1 "${HOME}" ${GIT_GROUP} -} - -all_ruby_unpack() { - git-2_src_unpack - cd ${P} - sed -i \ - -e "s|\(user:\).*|\1 ${GIT_USER}|" \ - -e "s|\(repos_path:\).*|\1 \"${REPO_DIR}\"|" \ - -e "s|\(auth_file:\).*|\1 \"${AUTH_FILE}\"|" \ - config.yml.example || die "failed to filter config.yml.example" -} - -all_ruby_compile() { - ./bin/compile - default -} - -all_ruby_install() { - - rm -Rf .git .gitignore go_build - - insinto ${DEST_DIR} - touch gitlab-shell.log - doins -r . || die - - dosym ${DEST_DIR}/bin/gitlab-keys /usr/bin/gitlab-keys || die - dosym ${DEST_DIR}/bin/gitlab-shell /usr/bin/gitlab-shell || die - dosym ${DEST_DIR}/bin/check /usr/bin/gitlab-check || die - - for bin in authorized_keys check compile create-hooks gitaly-receive-pack gitaly-upload-pack gitlab-keys gitlab-shell gitlab-shell-authorized-keys-check install ; do - fperms 0755 ${DEST_DIR}/bin/${bin} || die - done - - fperms 0755 ${DEST_DIR}/hooks/post-receive || die - fperms 0755 ${DEST_DIR}/hooks/pre-receive || die - fperms 0755 ${DEST_DIR}/hooks/update || die - - fowners ${GIT_USER} ${DEST_DIR}/gitlab-shell.log - fowners ${GIT_USER} ${DEST_DIR} || die -} - -pkg_postinst() { - - dodir "${REPO_DIR}" || die - - if [[ ! -d "${KEY_DIR}" ]] ; then - mkdir "${KEY_DIR}" || die - chmod 0700 "${KEY_DIR}" || die - chown ${GIT_USER}:${GIT_GROUP} "${KEY_DIR}" -R || die - fi - - if [[ ! -e "${AUTH_FILE}" ]] ; then - touch "${AUTH_FILE}" || die - chmod 0600 "${AUTH_FILE}" || die - chown ${GIT_USER}:${GIT_GROUP} "${AUTH_FILE}" || die - fi - - if [[ ! -d "${REPO_DIR}" ]] ; then - mkdir "${REPO_DIR}" - chmod ug+rwX,o-rwx "${REPO_DIR}" -R || die - chmod ug-s,o-rwx "${REPO_DIR}" -R || die - chown ${GIT_USER}:${GIT_GROUP} "${REPO_DIR}" -R || die - fi - - elog "Copy ${DEST_DIR}/config.yml.example to ${DEST_DIR}/config.yml" - elog "and edit this file in order to configure your GitLab-Shell settings." -} diff --git a/dev-vcs/gitlab-shell/gitlab-shell-7.1.2.ebuild b/dev-vcs/gitlab-shell/gitlab-shell-7.1.2.ebuild index 2d1d4e160f00e7fd4ede27ba3c953348c06a0395..0e5425f4d7384d4640433a2f01ecdda4d7aa963e 100644 --- a/dev-vcs/gitlab-shell/gitlab-shell-7.1.2.ebuild +++ b/dev-vcs/gitlab-shell/gitlab-shell-7.1.2.ebuild @@ -2,13 +2,13 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI="5" +EAPI=6 EGIT_REPO_URI="https://gitlab.com/gitlab-org/gitlab-shell.git" EGIT_COMMIT="v${PV}" USE_RUBY="ruby23" -inherit eutils git-2 ruby-ng user +inherit git-r3 ruby-ng user DESCRIPTION="GitLab Shell is a free SSH access and repository management application" HOMEPAGE="https://github.com/gitlabhq/gitlab-shell" @@ -28,25 +28,43 @@ GIT_GROUP="git" DEST_DIR="/var/lib/${PN}" pkg_setup() { - HOME=$(if [ -n "$(getent passwd git | cut -d: -f6)" ]; then (getent passwd git | cut -d: -f6); else (echo /home/git); fi) - REPO_DIR="${HOME}/repositories" - AUTH_FILE="${HOME}/.ssh/authorized_keys" - KEY_DIR=$(dirname "${AUTH_FILE}") + export HOME=$(if [ -n "$(getent passwd git | cut -d: -f6)" ]; then (getent passwd git | cut -d: -f6); else (echo /var/lib/git); fi) + export REPO_DIR="${HOME}/repositories" + export AUTH_FILE="${HOME}/.ssh/authorized_keys" + export KEY_DIR=$(dirname "${AUTH_FILE}") enewgroup ${GIT_GROUP} enewuser ${GIT_USER} -1 -1 "${HOME}" ${GIT_GROUP} + + 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 +} + +src_unpack(){ + git-r3_src_unpack + default } -all_ruby_unpack() { - git-2_src_unpack - cd ${P} +src_prepare(){ + einfo "preparing src ..." + einfo "ls :$(ls .)" + einfo "pwd : $(pwd)" sed -i \ -e "s|\(user:\).*|\1 ${GIT_USER}|" \ -e "s|\(repos_path:\).*|\1 \"${REPO_DIR}\"|" \ -e "s|\(auth_file:\).*|\1 \"${AUTH_FILE}\"|" \ - config.yml.example || die "failed to filter config.yml.example" + ${P}/config.yml.example || die "failed to filter config.yml.example" + eapply_user + cp -a ${P} all } + all_ruby_compile() { ./bin/compile default diff --git a/dev-vcs/gitlab-shell/gitlab-shell-7.1.4.ebuild b/dev-vcs/gitlab-shell/gitlab-shell-7.1.4.ebuild index 2d1d4e160f00e7fd4ede27ba3c953348c06a0395..08f35e237b8aa8eea0ed2dc5c532f18def6d6b4e 100644 --- a/dev-vcs/gitlab-shell/gitlab-shell-7.1.4.ebuild +++ b/dev-vcs/gitlab-shell/gitlab-shell-7.1.4.ebuild @@ -2,13 +2,13 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI="5" +EAPI=6 EGIT_REPO_URI="https://gitlab.com/gitlab-org/gitlab-shell.git" EGIT_COMMIT="v${PV}" USE_RUBY="ruby23" -inherit eutils git-2 ruby-ng user +inherit git-r3 ruby-ng user DESCRIPTION="GitLab Shell is a free SSH access and repository management application" HOMEPAGE="https://github.com/gitlabhq/gitlab-shell" @@ -27,24 +27,45 @@ GIT_USER="git" GIT_GROUP="git" DEST_DIR="/var/lib/${PN}" +GIT_USER="git" +GIT_GROUP="git" +DEST_DIR="/var/lib/${PN}" + pkg_setup() { - HOME=$(if [ -n "$(getent passwd git | cut -d: -f6)" ]; then (getent passwd git | cut -d: -f6); else (echo /home/git); fi) - REPO_DIR="${HOME}/repositories" - AUTH_FILE="${HOME}/.ssh/authorized_keys" - KEY_DIR=$(dirname "${AUTH_FILE}") + export HOME=$(if [ -n "$(getent passwd git | cut -d: -f6)" ]; then (getent passwd git | cut -d: -f6); else (echo /var/lib/git); fi) + export REPO_DIR="${HOME}/repositories" + export AUTH_FILE="${HOME}/.ssh/authorized_keys" + export KEY_DIR=$(dirname "${AUTH_FILE}") enewgroup ${GIT_GROUP} enewuser ${GIT_USER} -1 -1 "${HOME}" ${GIT_GROUP} + + 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 +} + +src_unpack(){ + git-r3_src_unpack + default } -all_ruby_unpack() { - git-2_src_unpack - cd ${P} +src_prepare(){ + einfo "preparing src ..." + einfo "ls :$(ls .)" + einfo "pwd : $(pwd)" sed -i \ -e "s|\(user:\).*|\1 ${GIT_USER}|" \ -e "s|\(repos_path:\).*|\1 \"${REPO_DIR}\"|" \ -e "s|\(auth_file:\).*|\1 \"${AUTH_FILE}\"|" \ - config.yml.example || die "failed to filter config.yml.example" + ${P}/config.yml.example || die "failed to filter config.yml.example" + eapply_user + cp -a ${P} all } all_ruby_compile() { diff --git a/dev-vcs/gitlab-shell/gitlab-shell-5.8.0.ebuild b/dev-vcs/gitlab-shell/gitlab-shell-8.4.4.ebuild similarity index 70% rename from dev-vcs/gitlab-shell/gitlab-shell-5.8.0.ebuild rename to dev-vcs/gitlab-shell/gitlab-shell-8.4.4.ebuild index 9bed6de51a8998e9ae645cbbf33d0fbe2f51489c..05fb686c871590ac8563fc0046b1e1bb183f7d82 100644 --- a/dev-vcs/gitlab-shell/gitlab-shell-5.8.0.ebuild +++ b/dev-vcs/gitlab-shell/gitlab-shell-8.4.4.ebuild @@ -1,47 +1,46 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +# $Header: $ -EAPI="5" +EAPI=6 -USE_RUBY="ruby22 ruby23 ruby24" -EGIT_REPO_URI="https://github.com/gitlabhq/gitlab-shell.git" +EGIT_REPO_URI="https://gitlab.com/gitlab-org/gitlab-shell.git" EGIT_COMMIT="v${PV}" +USE_RUBY="ruby24" -inherit eutils git-2 ruby-ng user +inherit git-r3 ruby-ng user DESCRIPTION="GitLab Shell is a free SSH access and repository management application" HOMEPAGE="https://github.com/gitlabhq/gitlab-shell" LICENSE="MIT" SLOT="0" -KEYWORDS="amd64 x86 ~arm" +KEYWORDS="~amd64 ~x86 ~arm" IUSE="nginx" -RDEPEND=" - nginx? ( www-servers/nginx ) - virtual/ssh - dev-db/redis" -DEPEND="${RDEPEND} - $(ruby_implementations_depend) - dev-vcs/git" + +DEPEND="$(ruby_implementations_depend) + dev-vcs/git + virtual/ssh + dev-db/redis" +RDEPEND="${DEPEND}" + +GIT_USER="git" +GIT_GROUP="git" +DEST_DIR="/var/lib/${PN}" GIT_USER="git" GIT_GROUP="git" DEST_DIR="/var/lib/${PN}" pkg_setup() { - HOME=$(if [ -n "$(getent passwd git | cut -d: -f6)" ]; then (getent passwd git | cut -d: -f6); else (echo /home/git); fi) - REPO_DIR="${HOME}/repositories" - AUTH_FILE="${HOME}/.ssh/authorized_keys" - KEY_DIR=$(dirname "${AUTH_FILE}") + export HOME=$(if [ -n "$(getent passwd git | cut -d: -f6)" ]; then (getent passwd git | cut -d: -f6); else (echo /var/lib/git); fi) + export REPO_DIR="${HOME}/repositories" + export AUTH_FILE="${HOME}/.ssh/authorized_keys" + export KEY_DIR=$(dirname "${AUTH_FILE}") enewgroup ${GIT_GROUP} enewuser ${GIT_USER} -1 -1 "${HOME}" ${GIT_GROUP} -} -pkg_setup() { - enewgroup ${GIT_USER} - enewuser ${GIT_USER} -1 /bin/bash ${DATA_DIR} "${GIT_USER}" - - local git_shell=$(egetshell ${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 ..." @@ -51,14 +50,22 @@ pkg_setup() { fi } -all_ruby_unpack() { - git-2_src_unpack - cd ${P} +src_unpack(){ + git-r3_src_unpack + default +} + +src_prepare(){ + einfo "preparing src ..." + einfo "ls :$(ls .)" + einfo "pwd : $(pwd)" sed -i \ -e "s|\(user:\).*|\1 ${GIT_USER}|" \ -e "s|\(repos_path:\).*|\1 \"${REPO_DIR}\"|" \ -e "s|\(auth_file:\).*|\1 \"${AUTH_FILE}\"|" \ - config.yml.example || die "failed to filter config.yml.example" + ${P}/config.yml.example || die "failed to filter config.yml.example" + eapply_user + cp -a ${P} all } all_ruby_compile() { @@ -78,7 +85,7 @@ all_ruby_install() { dosym ${DEST_DIR}/bin/gitlab-shell /usr/bin/gitlab-shell || die dosym ${DEST_DIR}/bin/check /usr/bin/gitlab-check || die - for bin in authorized_keys check compile create-hooks gitaly-receive-pack gitaly-upload-pack gitlab-keys gitlab-projects gitlab-shell install ; do + for bin in authorized_keys check compile create-hooks gitaly-receive-pack gitaly-upload-pack gitlab-keys gitlab-shell gitlab-shell-authorized-keys-check install ; do fperms 0755 ${DEST_DIR}/bin/${bin} || die done diff --git a/www-apps/gitlabhq/files/gitlab-console b/www-apps/gitlabhq/files/gitlab-console index 075cf669073fbd16e3f1e5910673734d69abc41a..d51d6242701afeb68424c21e1740a694798bcfc7 100755 --- a/www-apps/gitlabhq/files/gitlab-console +++ b/www-apps/gitlabhq/files/gitlab-console @@ -6,7 +6,10 @@ echo "you need to be a root to use this script" exit fi RUBY="$(readlink $(which ruby))" - +# ${BUNDLE} exec rake assets:clean RAILS_ENV=production +# ${BUNDLE} exec rake assets:precompile RAILS_ENV=production +# +SUPPORTED_ARGS=( backups diagnostic maitenance help console ) INTERACTIVE=False function usage() { cat <<EOM @@ -33,7 +36,6 @@ function usage() { diagnostic # Various testing functions maitenance # Many useful maitanance functions EOM - exit 0 } function help() { echo -e "This program will allow easy managment for gitlabhq package.\ @@ -41,6 +43,73 @@ function help() { usage } +function main_menu(){ + + +if [[ $# > 0 ]];then + if [[ ! ${SUPPORTED_ARGS[@]} =~ $1 ]];then + INTERACTIVE=True + help + echo -e "Choose available option:\n1 : backups\t2 : diagnostic\t3 : maitenance " + read -p ":" opt + case $opt in + 1) + backups + ;; + 2) + diagnostic + ;; + 3) + maitenance + ;; + *) + help + exit 0 + esac + else + case $1 in + 1) + for arg in $(seq 2 $#);do + backups ${!arg} + done + ;; + 2) + for arg in $(seq 2 $#);do + diagnostic ${!arg} + done + ;; + 3) + for arg in $(seq 2 $#);do + maitenance ${!arg} + done + ;; + *) + help + exit 0 + esac + fi +else + help + INTERACTIVE=True + echo -e "Choose available option:\n1 : backups\t2 : diagnostic\t3 : maitenance " + read -p ":" opt + case $opt in + 1) + backups + ;; + 2) + diagnostic + ;; + 3) + maitenance + ;; + *) + help + exit 0 + esac +fi +} + function rake_cmd() { #This if [[ -n $1 ]];then @@ -80,7 +149,7 @@ if [[ $# > 0 ]];then echo -e "backup function can accept additional option to SKIP:\ndb\t repositories\tuploads for (attachments)\t\ builds for (CI build output logs)\tartifacts for (CI build artifacts)\tlfs for (LFS objects)" read -p "If not full buckup is required, then provide option in comma separated format : 1,2,3 - 1:db, 2:repositories, 3:uploads, 4:builds, 5:artifacts, 6:lfs :" opts + 1:db, 2:repositories, 3:uploads, 4:builds, 5:artifacts, 6:lfs, 7:pages, 8:registry :" opts if [[ -n $opts ]];then rake_cmd backup:create SKIP=$opts unset opts @@ -388,48 +457,5 @@ EOM fi } -if [[ $# > 0 ]];then - if [[ $1 == "console" ]];then - INTERACTIVE=True - echo -e "Choose available option:\n1 : backups\t2 : diagnostic\t3 : maitenance " - read -p ":" opt - case $opt in - 1) - backups - ;; - 2) - diagnostic - ;; - 3) - maitenance - ;; - *) - help - exit 0 - esac - else - case $1 in - 1) - for arg in $(seq 2 $#);do - backups ${!arg} - done - ;; - 2) - for arg in $(seq 2 $#);do - diagnostic ${!arg} - done - ;; - 3) - for arg in $(seq 2 $#);do - maitenance ${!arg} - done - ;; - *) - help - exit 0 - esac - fi -else -help -fi +main_menu exit 0 diff --git a/www-apps/gitlabhq/files/gitlabhq-11-fix-check-task.patch b/www-apps/gitlabhq/files/gitlabhq-11-fix-check-task.patch new file mode 100644 index 0000000000000000000000000000000000000000..c9df83e912a9c8e334c804ee934a7bd95a341d10 --- /dev/null +++ b/www-apps/gitlabhq/files/gitlabhq-11-fix-check-task.patch @@ -0,0 +1,12 @@ +diff -urN a/lib/system_check/rake_task/app_task.rb b/lib/system_check/rake_task/app_task.rb +--- a/lib/system_check/rake_task/app_task.rb 2020-05-08 00:50:02.416565766 +0100 ++++ b/lib/system_check/rake_task/app_task.rb 2020-05-08 00:50:19.836418444 +0100 +@@ -23,8 +23,6 @@ + SystemCheck::App::UploadsDirectoryExistsCheck, + SystemCheck::App::UploadsPathPermissionCheck, + SystemCheck::App::UploadsPathTmpPermissionCheck, +- SystemCheck::App::InitScriptExistsCheck, +- SystemCheck::App::InitScriptUpToDateCheck, + SystemCheck::App::ProjectsHaveNamespaceCheck, + SystemCheck::App::RedisVersionCheck, + SystemCheck::App::RubyVersionCheck, diff --git a/www-apps/gitlabhq/files/gitlabhq-9.0-fix-checks-gentoo.patch b/www-apps/gitlabhq/files/gitlabhq-9.0-fix-checks-gentoo.patch deleted file mode 100644 index 2603dfdadc9b6caa820ea74d8566af965539d038..0000000000000000000000000000000000000000 --- a/www-apps/gitlabhq/files/gitlabhq-9.0-fix-checks-gentoo.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake ---- a/lib/tasks/gitlab/check.rake 2020-05-06 15:12:56.852671812 +0100 -+++ b/lib/tasks/gitlab/check.rake 2020-05-06 15:13:19.942672101 +0100 -@@ -21,8 +21,6 @@ - check_log_writable - check_tmp_writable - check_uploads -- check_init_script_exists -- check_init_script_up_to_date - check_projects_have_namespace - check_redis_version - check_ruby_version diff --git a/www-apps/gitlabhq/gitlabhq-10.8.7.ebuild b/www-apps/gitlabhq/gitlabhq-10.8.7.ebuild index ce381e7dd2a339028a92aa1ffac7d239ed7b6faf..6a898c385850b278802af35ec54bde2b34f2a172 100644 --- a/www-apps/gitlabhq/gitlabhq-10.8.7.ebuild +++ b/www-apps/gitlabhq/gitlabhq-10.8.7.ebuild @@ -17,7 +17,7 @@ PYTHON_COMPAT=( python2_7 ) inherit python-r1 ruby-ng systemd versionator user GITLAB_GITALY_VERSION="0.100.1" -GITLAB_PAGES_VERSION="0.9.1" +GITLAB_PAGES_VERSION="0.9.1" # integrated web server GITLAB_SHELL_VERSION="7.1.2" GITLAB_WORKHORSE_VERSION="4.2.1" @@ -106,7 +106,7 @@ pkg_setup() { all_ruby_unpack(){ default export RUBY_S="$(find ${WORKDIR}/all/ -maxdepth 1 -iname gitlab*${EGIT_COMMIT} |awk -F "/" '{print $NF}')" - } +} each_ruby_prepare() { @@ -192,7 +192,7 @@ src_install() { "${_tmpfile}" > "${T}/${tmpfile/X/${SLOT}}" || die "Failed to tempfile: $tmpfile" systemd_dotmpfilesd "${T}/${tmpfile/X/${SLOT}}" fi - exeinto /sbin/ + exeinto ${DEST_DIR}/bin/ doexe ${FILESDIR}/gitlab-console } @@ -373,6 +373,7 @@ pkg_postinst() { ## create set of directories needed before first run dodir "${ROOT}${GITLAB_TMP}/{backups,cache,pids,sessions,sockets}" fowners -R ${GIT_USER}:${GIT_GROUP} "${ROOT}${GITLAB_TMP}" + [ ! -L /usr/sbin/gitlab-console ] && dosym /usr/sbin/gitlab-console ${ROOT}/${DEST_DIR}/bin/gitlab-console } pkg_config() { diff --git a/www-apps/gitlabhq/gitlabhq-11.0.6.ebuild b/www-apps/gitlabhq/gitlabhq-11.0.6.ebuild index 541b2d817f210340d272a5788745a14944f693e7..4e126cf834655c5a66d30799085ba3adefb240b0 100644 --- a/www-apps/gitlabhq/gitlabhq-11.0.6.ebuild +++ b/www-apps/gitlabhq/gitlabhq-11.0.6.ebuild @@ -23,7 +23,8 @@ GITLAB_WORKHORSE_VERSION="4.3.1" EGIT_TAG="v${PV}" EGIT_COMMIT="d509ed26e7f8ccd49588dfc433d691754c45ed8c" -SRC_URI="https://gitlab.com/gitlab-org/gitlab-ce/repository/archive.tar.gz?ref=${EGIT_COMMIT} -> ${P}.tar.gz " +# SRC_URI="https://gitlab.com/gitlab-org/gitlab-ce/repository/archive.tar.gz?ref=${EGIT_COMMIT} -> ${P}.tar.gz " +SRC_URI="https://gitlab.com/gitlab-org/gitlab-foss/-/archive/v${PV}/gitlab-foss-v{PV}}.tar.gz -> ${P}.tar.gz " DESCRIPTION="GitLab is a free project and repository management application" HOMEPAGE="https://about.gitlab.com/gitlab-ci/" @@ -77,54 +78,55 @@ GEMS_DEPEND=" virtual/rubygems >=dev-ruby/bundler-1.15.4" -GIT_USER="git" -GIT_GROUP="git" -DEFAULT_DB_PASS="gitlab" -GIT_HOME=$(if [ -n "$(getent passwd git | cut -d: -f6)" ]; then (getent passwd git | cut -d: -f6); else (echo /var/lib/git); fi) -DEST_DIR="/opt/${PN}-${SLOT}" -CONF_DIR="/etc/${PN}-${SLOT}/config" - -GIT_REPOS="${GIT_HOME}/repositories" -GIT_SATELLITES="${GIT_HOME}/gitlab-satellites" -GITLAB_SHELL="/var/lib/gitlab-shell" -GITLAB_SHELL_HOOKS="${GITLAB_SHELL}/hooks" -GITLAB_LOGS="/var/log/${PN}-${SLOT}" -GITLAB_TMP="/var/tmp/${PN}-${SLOT}" -GITLAB_GITALY="/var/lib/gitlab-gitaly/" - -RAILS_ENV=${RAILS_ENV:-production} -RUBY=${RUBY:-ruby23} -BUNDLE="${RUBY} /usr/bin/bundle" - pkg_setup() { + export GIT_USER="git" + export GIT_GROUP="git" + export DEFAULT_DB_PASS="gitlab" + export GIT_HOME=$(if [ -n "$(getent passwd git | cut -d: -f6)" ]; then (getent passwd git | cut -d: -f6); else (echo /var/lib/git); fi) + export DEST_DIR="/opt/${PN}-${SLOT}" + export CONF_DIR="/etc/${PN}-${SLOT}/config" + + export GIT_REPOS="${GIT_HOME}/repositories" + export GIT_SATELLITES="${GIT_HOME}/gitlab-satellites" + export GITLAB_SHELL="/var/lib/gitlab-shell" + export GITLAB_SHELL_HOOKS="${GITLAB_SHELL}/hooks" + export GITLAB_LOGS="/var/log/${PN}-${SLOT}" + export GITLAB_TMP="/var/tmp/${PN}-${SLOT}" + export GITLAB_GITALY="/var/lib/gitlab-gitaly/" + + export RAILS_ENV=${RAILS_ENV:-production} + export RUBY=${RUBY:-ruby23} + export BUNDLE="${RUBY} /usr/bin/bundle" + enewgroup ${GIT_GROUP} enewuser ${GIT_USER} -1 -1 ${DEST_DIR} "${GIT_GROUP}" use "rugged_use_system_libraries" && export RUGGED_USE_SYSTEM_LIBRARIES="YES" - } +} all_ruby_unpack(){ default export RUBY_S="$(find ${WORKDIR}/all/ -maxdepth 1 -iname gitlab*${EGIT_COMMIT} |awk -F "/" '{print $NF}')" - } +} each_ruby_prepare() { - # fix path to repo and gitlab-shell hooks - test -d "${ROOT}${GITLAB_SHELL_HOOKS}" || die "Gitlab Shell hooks directory not found: \"${GITLAB_SHELL_HOOKS}. Have you properly installed dev-vcs/gitlab-shell"? + # fix path to repo and gitlab-shell hooks + test -d "${ROOT}${GITLAB_SHELL_HOOKS}" || die "Gitlab Shell hooks directory not found: \"${GITLAB_SHELL_HOOKS}. Have you properly installed dev-vcs/gitlab-shell"? - sed -i \ - -e "s|\(\s*path:\s\)/.*/gitlab-shell/|\1 ${GITLAB_SHELL}/|" \ - -e "s|\(\s*repos_path:\s\)/.*|\1 ${GIT_REPOS}/|" \ - -e "s|\(\s*hooks_path:\s\)/.*|\1 ${GITLAB_SHELL_HOOKS}/|" \ - -e "s|\(\s*path:\s\)/.*/gitlab-satellites/|\1 ${GIT_SATELLITES}/|" \ - -e "s|\(\s*GITLAB_SHELL:\s*\)|\1\n\tpath: \"${GITLAB_SHELL}\"|" \ + sed -i \ + -e "s|\(\s*path:\s\)/.*/gitlab-shell/|\1 ${GITLAB_SHELL}/|" \ + -e "s|\(\s*repos_path:\s\)/.*|\1 ${GIT_REPOS}/|" \ + -e "s|\(\s*hooks_path:\s\)/.*|\1 ${GITLAB_SHELL_HOOKS}/|" \ + -e "s|\(\s*path:\s\)/.*/gitlab-satellites/|\1 ${GIT_SATELLITES}/|" \ + -e "s|\(\s*GITLAB_SHELL:\s*\)|\1\n\tpath: \"${GITLAB_SHELL}\"|" \ + -e "s|# socket_path: tmp/sockets/private/gitaly\.socket|socket_path: tmp/sockets/gitaly.socket|" \ config/gitlab.yml.example || die "failed to filter gitlab.yml.example" elog "gitlab.yml.example prepared" - # modify database settings - if use postgres; then + # modify database settings + if use postgres; then sed -i \ - -e "s|\(username:\) postgres.*|\1 ${GIT_USER}|" \ + -e "s|\(username:\) postgres.*|\1 ${GIT_USER}|" \ -e "s|\(password:\).*|\1 DEFAULT_DB_PASS|" \ -e "s|\(socket:\).*|/run/postgresql/.s.PGSQL.5432|" \ config/database.yml.postgresql \ @@ -134,29 +136,22 @@ each_ruby_prepare() { rm config/database.yml.postgresql fi - # replace "secret" token with random one - local randpw=$(echo ${RANDOM}|sha512sum|cut -c 1-128) - sed -i -e "/secret_token =/ s/=.*/= '${randpw}'/" \ - config/initializers/secret_token.rb \ - || die "failed to filter secret_token.rb" - elog " config/initializers/secret_token.rb prepared" - - # remove needless files - rm .foreman .gitignore Procfile - rm -r lib/support/{deploy,init.d} - use mysql || rm config/database.yml.mysql - use unicorn || rm config/unicorn.rb.example - # change cache_store - if use memcached; then - sed -i \ - -e "/\w*config.cache_store / s/=.*/= :dalli_store, { namespace: 'gitlab' }/" \ - config/environments/production.rb \ - || die "failed to modify production.rb" - fi + # remove needless files + rm .foreman .gitignore Procfile + rm -r lib/support/{deploy,init.d} + use mysql || rm config/database.yml.mysql + use unicorn || rm config/unicorn.rb.example + # change cache_store + if use memcached; then + sed -i \ + -e "/\w*config.cache_store / s/=.*/= :dalli_store, { namespace: 'gitlab' }/" \ + config/environments/production.rb \ + || die "failed to modify production.rb" + fi sed -i -e "s|gem 'gemnasium-gitlab-service', '~> 0.2'|gem 'gemnasium-gitlab-service', git: 'https://github.com/gemnasium/gemnasium-gitlab-service'|g" Gemfile sed -i -e "s|gem 'gemnasium-gitlab-service', '~> 0.2'|gem 'gemnasium-gitlab-service', git: 'https://github.com/gemnasium/gemnasium-gitlab-service'|g" Gemfile.lock - + # fir a BUG https://gitlab.com/gitlab-org/gitlab-foss/-/issues/47483 sed -i -e "/ check_gitaly_connection/d" lib/tasks/gitlab/setup.rake } @@ -192,7 +187,7 @@ src_install() { "${_tmpfile}" > "${T}/${tmpfile/X/${SLOT}}" || die "Failed to tempfile: $tmpfile" systemd_dotmpfilesd "${T}/${tmpfile/X/${SLOT}}" fi - exeinto /sbin/ + exeinto ${DEST_DIR}/bin/ doexe ${FILESDIR}/gitlab-console } @@ -291,7 +286,7 @@ each_ruby_install() { fowners -h ${GIT_USER} "${GIT_HOME}/gitaly" # fix QA Security Notice: world writable file(s) vendor/bundle/ruby/2.3.0/gems/attr_required-1.0.0/* - fperms go-w -R vendor/bundle/ruby/*/gems/attr_required-* + chmod go-w -R vendor/bundle/ruby/*/gems/attr_required-* if use memcached; then sed -i -e '/^depend/,// {/need / s/$/ memcached/}' \ @@ -371,8 +366,9 @@ pkg_postinst() { elog "Important: Do not remove the earlier version prior migration!" ## create set of directories needed before first run - dodir "${ROOT}${GITLAB_TMP}/{backups,cache,pids,sessions,sockets}" + mkdir -p "${ROOT}${GITLAB_TMP}"/{backups,cache,pids,sessions,sockets} fowners -R ${GIT_USER}:${GIT_GROUP} "${ROOT}${GITLAB_TMP}" + [ ! -L /usr/sbin/gitlab-console ] && dosym /usr/sbin/gitlab-console ${ROOT}/${DEST_DIR}/bin/gitlab-console } pkg_config() { @@ -444,6 +440,14 @@ pkg_config() { cd - " fi + if [ ! -d ${DEST_DIR}/node_modules/bootstrap ]; then + ## fix a BUG where node_modules/bootstrap is required + su -l ${GIT_USER} -s /bin/sh -c " + cd ${DEST_DIR} + npm install bootstrap + cd - + " + fi einfo "Press ENTER to continue, STRG-C to cancel" read @@ -519,6 +523,13 @@ pkg_config() { ${BUNDLE} clean" \ || die "failed to clean up old gems ..." + einfo "Re-run the migrations generator ..." + su -l ${GIT_USER} -s /bin/sh -c " + export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 + cd ${DEST_DIR} + ${BUNDLE} exec rake acts_as_taggable_on_engine:install:migrations RAILS_ENV=production" \ + || die "failed to clean up old gems ..." + einfo "Migrating database ..." su -l ${GIT_USER} -s /bin/sh -c " export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 @@ -622,6 +633,14 @@ pkg_config() { cd - " fi + if [ ! -d ${DEST_DIR}/node_modules/bootstrap ]; then + ## fix a BUG where node_modules/bootstrap is required + su -l ${GIT_USER} -s /bin/sh -c " + cd ${DEST_DIR} + npm install bootstrap + cd - + " + fi einfo "Initializing database ..." su -l ${GIT_USER} -s /bin/sh -c " export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 @@ -651,6 +670,7 @@ pkg_config() { fi if [ ! -d ${DEST_DIR}/node_modules/webpack ]; then ## fix a BUG where node_modules/webpack is required + # ActionView::Template::Error (Could not load compiled manifest from public/assets/webpack/manifest.json su -l ${GIT_USER} -s /bin/sh -c " export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 cd ${DEST_DIR} @@ -659,9 +679,15 @@ pkg_config() { ${BUNDLE} exec rake assets:clean RAILS_ENV=production ${BUNDLE} exec rake assets:precompile RAILS_ENV=production cd - " || die "failed to run assets:clean and assets:precompile" - fi - + # Post-install message from mousetrap-rails: + # Remember to run generator to generate sample file and include mousetrap-rails with Rails Asset Pipeline + su -l ${GIT_USER} -s /bin/sh -c " + export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 + cd ${DEST_DIR} + ${BUNDLE} exec rake generate mousetrap:install RAILS_ENV=${RAILS_ENV} + cd - " || die "failed to run assets:clean and assets:precompile" + # fix repository permissions einfo "### fix permission ###" chown -R ${GIT_USER}:${GIT_GROUP} "${DEST_DIR}" "${CONF_DIR}" "${GITLAB_TMP}" "${GITLAB_LOGS}" diff --git a/www-apps/gitlabhq/gitlabhq-10.0.7.ebuild b/www-apps/gitlabhq/gitlabhq-11.8.10.ebuild similarity index 80% rename from www-apps/gitlabhq/gitlabhq-10.0.7.ebuild rename to www-apps/gitlabhq/gitlabhq-11.8.10.ebuild index 24155a41e355913d8623032be4c4c75d523ba28a..192602237e253730fb87ee64dae0f8928439d295 100644 --- a/www-apps/gitlabhq/gitlabhq-10.0.7.ebuild +++ b/www-apps/gitlabhq/gitlabhq-11.8.10.ebuild @@ -11,19 +11,19 @@ EAPI=6 # difficult to maintain them via ebuilds. # -USE_RUBY="ruby23" +USE_RUBY="ruby24" PYTHON_COMPAT=( python2_7 ) -inherit python-r1 ruby-ng systemd versionator user +inherit linux-info python-r1 ruby-ng systemd versionator user -GITLAB_GITALY_VERSION="0.38.0" -GITLAB_PAGES_VERSION="0.5.1" -GITLAB_SHELL_VERSION="5.9.0" -GITLAB_WORKHORSE_VERSION="3.0.0" +GITLAB_GITALY_VERSION="1.20.1" +GITLAB_PAGES_VERSION="1.5.0" # builtin web server +GITLAB_SHELL_VERSION="8.4.4" +GITLAB_WORKHORSE_VERSION="8.3.3" EGIT_TAG="v${PV}" -EGIT_COMMIT="03a14086924c017c49b49d20b525b90ae2a965f5" -SRC_URI="https://gitlab.com/gitlab-org/gitlab-ce/repository/archive.tar.gz?ref=${EGIT_COMMIT} -> ${P}.tar.gz " +EGIT_COMMIT="7d457b7adc25db571fbff5583a1535607de6cec3" +SRC_URI="https://gitlab.com/gitlab-org/gitlab-foss/-/archive/v${PV}/gitlab-foss-v{PV}}.tar.gz -> ${P}.tar.gz " DESCRIPTION="GitLab is a free project and repository management application" HOMEPAGE="https://about.gitlab.com/gitlab-ci/" @@ -33,7 +33,7 @@ KEYWORDS="amd64 x86" IUSE="memcached mysql kerberos pages +postgres +unicorn systemd rugged_use_system_libraries" PATCHES=( "${FILESDIR}/${PN}-8.7.5-fix-sendmail-config.patch" - "${FILESDIR}/${PN}-9.3.0-fix-check-task.patch" + "${FILESDIR}/${PN}-11-fix-check-task.patch" ) RESTRICT="splitdebug" @@ -46,7 +46,7 @@ GEMS_DEPEND=" dev-util/ragel dev-libs/yajl >=net-libs/nodejs-8.9.3 - >=sys-apps/yarn-0.27.5 + >=sys-apps/yarn-1.10.0 postgres? ( >=dev-db/postgresql-9.6:* ) mysql? ( virtual/mysql ) memcached? ( net-misc/memcached ) @@ -66,7 +66,7 @@ GEMS_DEPEND=" DEPEND="${GEMS_DEPEND} ${CDEPEND} ${COMMON_DEPEND} - dev-lang/ruby:2.3[readline,ssl] + dev-lang/ruby:2.4[readline,ssl] net-misc/curl virtual/ssh" RDEPEND="${COMMON_DEPEND} @@ -77,29 +77,31 @@ GEMS_DEPEND=" virtual/rubygems >=dev-ruby/bundler-1.15.4" -GIT_USER="git" -GIT_GROUP="git" -DEFAULT_DB_PASS="gitlab" -GIT_HOME=$(if [ -n "$(getent passwd git | cut -d: -f6)" ]; then (getent passwd git | cut -d: -f6); else (echo /var/lib/git); fi) -DEST_DIR="/opt/${PN}-${SLOT}" -CONF_DIR="/etc/${PN}-${SLOT}/config" - -GIT_REPOS="${GIT_HOME}/repositories" -GIT_SATELLITES="${GIT_HOME}/gitlab-satellites" -GITLAB_SHELL="/var/lib/gitlab-shell" -GITLAB_SHELL_HOOKS="${GITLAB_SHELL}/hooks" -GITLAB_LOGS="/var/log/${PN}-${SLOT}" -GITLAB_TMP="/var/tmp/${PN}-${SLOT}" -GITLAB_GITALY="/var/lib/gitlab-gitaly/" - -RAILS_ENV=${RAILS_ENV:-production} -RUBY=${RUBY:-ruby23} -BUNDLE="${RUBY} /usr/bin/bundle" - pkg_setup() { + export GIT_USER="git" + export GIT_GROUP="git" + export DEFAULT_DB_PASS="gitlab" + export GIT_HOME=$(if [ -n "$(getent passwd git | cut -d: -f6)" ]; then (getent passwd git | cut -d: -f6); else (echo /var/lib/git); fi) + export DEST_DIR="/opt/${PN}-${SLOT}" + export CONF_DIR="/etc/${PN}-${SLOT}/config" + + export GIT_REPOS="${GIT_HOME}/repositories" + export GIT_SATELLITES="${GIT_HOME}/gitlab-satellites" + export GITLAB_SHELL="/var/lib/gitlab-shell" + export GITLAB_SHELL_HOOKS="${GITLAB_SHELL}/hooks" + export GITLAB_LOGS="/var/log/${PN}-${SLOT}" + export GITLAB_TMP="/var/tmp/${PN}-${SLOT}" + export GITLAB_GITALY="/var/lib/gitlab-gitaly/" + + export RAILS_ENV=${RAILS_ENV:-production} + export RUBY=${RUBY:-ruby24} + export BUNDLE="${RUBY} /usr/bin/bundle" + enewgroup ${GIT_GROUP} enewuser ${GIT_USER} -1 -1 ${DEST_DIR} "${GIT_GROUP}" - } + + use "rugged_use_system_libraries" && export RUGGED_USE_SYSTEM_LIBRARIES="YES" +} all_ruby_unpack(){ default @@ -108,21 +110,22 @@ all_ruby_unpack(){ each_ruby_prepare() { - # fix path to repo and gitlab-shell hooks - test -d "${ROOT}${GITLAB_SHELL_HOOKS}" || die "Gitlab Shell hooks directory not found: \"${GITLAB_SHELL_HOOKS}. Have you properly installed dev-vcs/gitlab-shell"? + # fix path to repo and gitlab-shell hooks + test -d "${ROOT}${GITLAB_SHELL_HOOKS}" || die "Gitlab Shell hooks directory not found: \"${GITLAB_SHELL_HOOKS}. Have you properly installed dev-vcs/gitlab-shell"? - sed -i \ - -e "s|\(\s*path:\s\)/.*/gitlab-shell/|\1 ${GITLAB_SHELL}/|" \ - -e "s|\(\s*repos_path:\s\)/.*|\1 ${GIT_REPOS}/|" \ - -e "s|\(\s*hooks_path:\s\)/.*|\1 ${GITLAB_SHELL_HOOKS}/|" \ - -e "s|\(\s*path:\s\)/.*/gitlab-satellites/|\1 ${GIT_SATELLITES}/|" \ - -e "s|\(\s*GITLAB_SHELL:\s*\)|\1\n\tpath: \"${GITLAB_SHELL}\"|" \ + sed -i \ + -e "s|\(\s*path:\s\)/.*/gitlab-shell/|\1 ${GITLAB_SHELL}/|" \ + -e "s|\(\s*repos_path:\s\)/.*|\1 ${GIT_REPOS}/|" \ + -e "s|\(\s*hooks_path:\s\)/.*|\1 ${GITLAB_SHELL_HOOKS}/|" \ + -e "s|\(\s*path:\s\)/.*/gitlab-satellites/|\1 ${GIT_SATELLITES}/|" \ + -e "s|\(\s*GITLAB_SHELL:\s*\)|\1\n\tpath: \"${GITLAB_SHELL}\"|" \ + -e "s|# socket_path: tmp/sockets/private/gitaly\.socket|socket_path: tmp/sockets/gitaly.socket|" \ config/gitlab.yml.example || die "failed to filter gitlab.yml.example" elog "gitlab.yml.example prepared" - # modify database settings - if use postgres; then + # modify database settings + if use postgres; then sed -i \ - -e "s|\(username:\) postgres.*|\1 ${GIT_USER}|" \ + -e "s|\(username:\) postgres.*|\1 ${GIT_USER}|" \ -e "s|\(password:\).*|\1 DEFAULT_DB_PASS|" \ -e "s|\(socket:\).*|/run/postgresql/.s.PGSQL.5432|" \ config/database.yml.postgresql \ @@ -132,29 +135,19 @@ each_ruby_prepare() { rm config/database.yml.postgresql fi - # replace "secret" token with random one - local randpw=$(echo ${RANDOM}|sha512sum|cut -c 1-128) - sed -i -e "/secret_token =/ s/=.*/= '${randpw}'/" \ - config/initializers/secret_token.rb \ - || die "failed to filter secret_token.rb" - elog " config/initializers/secret_token.rb prepared" - - # remove needless files - rm .foreman .gitignore Procfile - rm -r lib/support/{deploy,init.d} - use mysql || rm config/database.yml.mysql - use unicorn || rm config/unicorn.rb.example - # change cache_store - if use memcached; then - sed -i \ - -e "/\w*config.cache_store / s/=.*/= :dalli_store, { namespace: 'gitlab' }/" \ - config/environments/production.rb \ - || die "failed to modify production.rb" - fi - - sed -i -e "s|gem 'gemnasium-gitlab-service', '~> 0.2'|gem 'gemnasium-gitlab-service', git: 'https://github.com/gemnasium/gemnasium-gitlab-service'|g" Gemfile - sed -i -e "s|gem 'gemnasium-gitlab-service', '~> 0.2'|gem 'gemnasium-gitlab-service', git: 'https://github.com/gemnasium/gemnasium-gitlab-service'|g" Gemfile.lock - + # remove needless files + rm .foreman .gitignore Procfile + rm -r lib/support/{deploy,init.d} + use mysql || rm config/database.yml.mysql + use unicorn || rm config/unicorn.rb.example + # change cache_store + if use memcached; then + sed -i \ + -e "/\w*config.cache_store / s/=.*/= :dalli_store, { namespace: 'gitlab' }/" \ + config/environments/production.rb \ + || die "failed to modify production.rb" + fi + # fir a BUG https://gitlab.com/gitlab-org/gitlab-foss/-/issues/47483 sed -i -e "/ check_gitaly_connection/d" lib/tasks/gitlab/setup.rake } @@ -190,7 +183,7 @@ src_install() { "${_tmpfile}" > "${T}/${tmpfile/X/${SLOT}}" || die "Failed to tempfile: $tmpfile" systemd_dotmpfilesd "${T}/${tmpfile/X/${SLOT}}" fi - exeinto /sbin/ + exeinto ${DEST_DIR}/bin/ doexe ${FILESDIR}/gitlab-console } @@ -260,8 +253,6 @@ each_ruby_install() { done local bundle_args="--no-deployment --path=vendor/bundle ${without:+--without ${without}}" - use "rugged_use_system_libraries" && export RUGGED_USE_SYSTEM_LIBRARIES="YES" - # Use systemlibs for nokogiri as suggested ${BUNDLE} config build.nokogiri --use-system-libraries # Fix compiling of nokogumbo, see @@ -291,7 +282,8 @@ each_ruby_install() { fowners -h ${GIT_USER} "${GIT_HOME}/gitaly" # fix QA Security Notice: world writable file(s) vendor/bundle/ruby/2.3.0/gems/attr_required-1.0.0/* - fperms go-w -R vendor/bundle/ruby/*/gems/attr_required-* + chmod go-w -R vendor/bundle/ruby/*/gems/attr_required-* + chmod go-w -R vendor/bundle/ruby/*/gems/nakayoshi_fork-* if use memcached; then sed -i -e '/^depend/,// {/need / s/$/ memcached/}' \ @@ -371,8 +363,9 @@ pkg_postinst() { elog "Important: Do not remove the earlier version prior migration!" ## create set of directories needed before first run - dodir "${ROOT}${GITLAB_TMP}/{backups,cache,pids,sessions,sockets}" + mkdir -p "${ROOT}${GITLAB_TMP}"/{backups,cache,pids,sessions,sockets} fowners -R ${GIT_USER}:${GIT_GROUP} "${ROOT}${GITLAB_TMP}" + [ ! -L /usr/sbin/gitlab-console ] && dosym /usr/sbin/gitlab-console ${ROOT}/${DEST_DIR}/bin/gitlab-console } pkg_config() { @@ -436,14 +429,6 @@ pkg_config() { elog "/etc/init.d/postgresql-<VERSION>" fi fi - if [ ! -d ${DEST_DIR}/node_modules/pikaday ]; then - ## fix a BUG where node_modules/pikaday is required - su -l ${GIT_USER} -s /bin/sh -c " - cd ${DEST_DIR} - npm install pikaday - cd - - " - fi einfo "Press ENTER to continue, STRG-C to cancel" read @@ -519,6 +504,13 @@ pkg_config() { ${BUNDLE} clean" \ || die "failed to clean up old gems ..." + einfo "Re-run the migrations generator ..." + su -l ${GIT_USER} -s /bin/sh -c " + export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 + cd ${DEST_DIR} + ${BUNDLE} exec rake acts_as_taggable_on_engine:install:migrations RAILS_ENV=production" \ + || die "failed to clean up old gems ..." + einfo "Migrating database ..." su -l ${GIT_USER} -s /bin/sh -c " export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 @@ -533,13 +525,17 @@ pkg_config() { ${BUNDLE} exec rake cache:clear RAILS_ENV=production" \ || die "failed to run cache:clear" - einfo "Clear and precompile assets ..." + einfo "Clear up assets ..." su -l ${GIT_USER} -s /bin/sh -c " export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 cd ${DEST_DIR} - ${BUNDLE} exec rake assets:clean RAILS_ENV=production - ${BUNDLE} exec rake assets:precompile RAILS_ENV=production" \ - || die "failed to run assets:clean and assets:precompile" + ${BUNDLE} exec rake assets:clean RAILS_ENV=production" \ + || die "failed to run assets:clean" + + einfo "Configure Git to generate packfile bitmaps ..." + su -l ${GIT_USER} -s /bin/sh -c " + git config --global repack.writeBitmaps true" \ + || die "failed to configure Git" elog " Gitlab server migration has completed" @@ -555,20 +551,20 @@ pkg_config() { fi fi else - if use postgres; then - elog " To be able configuring database with ruby will need to create following role for ${GIT_USER} user " - elog " su postgres" - elog " psql -c \"CREATE ROLE ${GIT_USER} PASSWORD 'gitlab' \\" - elog " SUPERUSER CREATEDB NOCREATEROLE INHERIT LOGIN;\"" - elog " createdb -E UTF-8 -O ${GIT_USER} gitlab_production" - elog " Note: You should change your password to something more random..." - elog - elog " GitLab uses polymorphic associations which are not SQL-standard friendly." - elog " To get it work you must use this ugly workaround:" - elog " su postgres" - elog " psql -d gitlab_production -c \"CREATE CAST (integer AS text) WITH INOUT AS IMPLICIT;\"" + if use postgres; then + elog " To be able configuring database with ruby will need to create following role for ${GIT_USER} user " + elog " su postgres" + elog " psql -c \"CREATE ROLE ${GIT_USER} PASSWORD 'gitlab' \\" + elog " SUPERUSER CREATEDB NOCREATEROLE INHERIT LOGIN;\"" + elog " createdb -E UTF-8 -O ${GIT_USER} gitlab_production" + elog " Note: You should change your password to something more random..." + elog + elog " GitLab uses polymorphic associations which are not SQL-standard friendly." + elog " To get it work you must use this ugly workaround:" + elog " su postgres" + elog " psql -d gitlab_production -c \"CREATE CAST (integer AS text) WITH INOUT AS IMPLICIT;\"" - fi + fi if [[ ! -r "${GITLAB_SHELL}"/config.yml ]];then elog "Process will fail because gitlab-shell has not been configured" elog "" @@ -613,28 +609,29 @@ pkg_config() { ln -s "${DEST_DIR}" "${GIT_HOME}"/gitlab fi fi - - if [ ! -d ${DEST_DIR}/node_modules/pikaday ]; then - ## fix a BUG where node_modules/pikaday is required - su -l ${GIT_USER} -s /bin/sh -c " - cd ${DEST_DIR} - npm install pikaday - cd - - " - fi einfo "Initializing database ..." su -l ${GIT_USER} -s /bin/sh -c " export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 cd ${DEST_DIR} ${BUNDLE} exec rake gitlab:setup RAILS_ENV=${RAILS_ENV}" \ - || die "failed to run rake gitlab:setup" - einfo "Clear and precompile assets ..." + || die "failed to run rake gitlab:setup" + einfo "Compile assets ..." su -l ${GIT_USER} -s /bin/sh -c " export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 cd ${DEST_DIR} - ${BUNDLE} exec rake assets:clean RAILS_ENV=production - ${BUNDLE} exec rake assets:precompile RAILS_ENV=production" \ - || die "failed to run assets:clean and assets:precompile" + echo \"Fixing https://gitlab.com/gitlab-org/gitlab-ce/issues/38275 ...\" + yarn add ajv@^4.0.0 + yarn install --production=false --pure-lockfile --no-progress + ${BUNDLE} exec rake gitlab:assets:compile RAILS_ENV=${RAILS_ENV} NODE_ENV=production NODE_OPTIONS=\"--max-old-space-size=4096\"" \ + || die "failed to run yarn install and gitlab:assets:compile" + + einfo "Compile GetText PO files ..." + su -l ${GIT_USER} -s /bin/sh -c " + export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 + cd ${DEST_DIR} + ${BUNDLE} exec rake gettext:pack RAILS_ENV=${RAILS_ENV} + ${BUNDLE} exec rake gettext:po_to_json RAILS_ENV=${RAILS_ENV}" \ + || die "failed to compile GetText PO files" if use postgres; then elog " We can increase security of database by changing permission for ${GIT_USER} user " elog " su postgres" @@ -651,6 +648,7 @@ pkg_config() { fi if [ ! -d ${DEST_DIR}/node_modules/webpack ]; then ## fix a BUG where node_modules/webpack is required + # ActionView::Template::Error (Could not load compiled manifest from public/assets/webpack/manifest.json su -l ${GIT_USER} -s /bin/sh -c " export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 cd ${DEST_DIR} @@ -659,9 +657,15 @@ pkg_config() { ${BUNDLE} exec rake assets:clean RAILS_ENV=production ${BUNDLE} exec rake assets:precompile RAILS_ENV=production cd - " || die "failed to run assets:clean and assets:precompile" - fi - + # Post-install message from mousetrap-rails: + # Remember to run generator to generate sample file and include mousetrap-rails with Rails Asset Pipeline + #su -l ${GIT_USER} -s /bin/sh -c " + #export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 + #cd ${DEST_DIR} + #${BUNDLE} exec rake generate mousetrap:install RAILS_ENV=${RAILS_ENV} + #cd - " || die "failed to run assets:clean and assets:precompile" + # fix repository permissions einfo "### fix permission ###" chown -R ${GIT_USER}:${GIT_GROUP} "${DEST_DIR}" "${CONF_DIR}" "${GITLAB_TMP}" "${GITLAB_LOGS}" diff --git a/www-apps/gitlabhq/gitlabhq-9.0.13.ebuild b/www-apps/gitlabhq/gitlabhq-9.0.13.ebuild deleted file mode 100644 index 3247088a363950b88da81695921898d1bb989b88..0000000000000000000000000000000000000000 --- a/www-apps/gitlabhq/gitlabhq-9.0.13.ebuild +++ /dev/null @@ -1,642 +0,0 @@ -# Copyright 1999-2020 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=6 - -# Maintainer notes: -# - This ebuild uses Bundler to download and install all gems in deployment mode -# (i.e. into isolated directory inside application). That's not Gentoo way how -# it should be done, but GitLab has too many dependencies that it will be too -# difficult to maintain them via ebuilds. -# - -USE_RUBY="ruby23" -PYTHON_COMPAT=( python2_7 ) - -inherit python-r1 ruby-ng systemd versionator user - -GITALY_VERSION="0.3.0" -GITLAB_PAGES_VERSION="0.4.0" -GITLAB_SHELL_VERSION="5.0.0" -GITLAB_WORKHORSE_VERSION="1.4.2" - -EGIT_TAG="v${PV}" -EGIT_COMMIT="2377923e89968997a13db6e009b8a48c5bf6f00a" -SRC_URI="https://gitlab.com/gitlab-org/gitlab-ce/repository/archive.tar.gz?ref=${EGIT_COMMIT} -> ${P}.tar.gz " - -DESCRIPTION="GitLab is a free project and repository management application" -HOMEPAGE="https://about.gitlab.com/gitlab-ci/" -LICENSE="MIT" -SLOT="$(get_version_component_range 1-2)" -KEYWORDS="amd64 x86" -IUSE="memcached mysql kerberos pages +postgres +unicorn systemd rugged_use_system_libraries" -PATCHES=( - "${FILESDIR}/${PN}-8.7.5-fix-sendmail-config.patch" - "${FILESDIR}/${PN}-9.0-fix-checks-gentoo.patch" - "${FILESDIR}/${PN}-9.0.0-replace-sys-filesystem.patch" - ) -RESTRICT="splitdebug" - -GEMS_DEPEND=" - !app-crypt/heimdal - app-crypt/mit-krb5 - dev-libs/icu - dev-libs/libxml2 - dev-libs/libxslt - dev-libs/re2 - dev-util/ragel - dev-libs/yajl - >=net-libs/nodejs-4.3.0 - >=sys-apps/yarn-0.17.0 - postgres? ( dev-db/postgresql ) - mysql? ( virtual/mysql ) - memcached? ( net-misc/memcached ) - kerberos? ( virtual/krb5 ) - " -CDEPEND=" - dev-util/cmake - virtual/pkgconfig" -COMMON_DEPEND=" - ${GEMS_DEPEND} - ~dev-vcs/gitlab-shell-${GITLAB_SHELL_VERSION} - >=dev-vcs/git-2.8.4 - ~www-servers/gitlab-workhorse-${GITLAB_WORKHORSE_VERSION} - rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 ) - pages? ( ~www-servers/gitlab-pages-${GITLAB_PAGES_VERSION} ) - ~www-servers/gitlab-gitaly-${GITALY_VERSION}" -DEPEND="${GEMS_DEPEND} - ${CDEPEND} - ${COMMON_DEPEND} - dev-lang/ruby:2.3[readline,ssl] - net-misc/curl - virtual/ssh" -RDEPEND="${COMMON_DEPEND} - >=dev-db/redis-2.8.0 - virtual/mta - systemd? ( sys-apps/systemd:0= )" -ruby_add_bdepend " - virtual/rubygems - >=dev-ruby/bundler-1.14.6" - -GIT_USER="git" -GIT_GROUP="git" -DEFAULT_DB_PASS="gitlab" -GIT_HOME="/home/git" -DEST_DIR="/opt/${PN}-${SLOT}" -CONF_DIR="/etc/${PN}-${SLOT}/config" - -GIT_REPOS="${GIT_HOME}/repositories" -GIT_SATELLITES="${GIT_HOME}/gitlab-satellites" -GITLAB_SHELL="/var/lib/gitlab-shell" -GITLAB_SHELL_HOOKS="${GITLAB_SHELL}/hooks" -GITLAB_LOGS="/var/log/${PN}-${SLOT}" -GITLAB_TMP="/var/tmp/${PN}-${SLOT}" -GITLAB_GITALY="/var/lib/gitlab-gitaly/" - -RAILS_ENV=${RAILS_ENV:-production} -RUBY=${RUBY:-ruby23} -BUNDLE="${RUBY} /usr/bin/bundle" -SERVICES_DIR="${S}"/services - -pkg_setup() { - enewgroup ${GIT_GROUP} - enewuser ${GIT_USER} -1 -1 ${DEST_DIR} "${GIT_GROUP}" - - use "rugged_use_system_libraries" && export RUGGED_USE_SYSTEM_LIBRARIES="YES" - } - -all_ruby_unpack(){ - default - export RUBY_S="$(find ${WORKDIR}/all/ -maxdepth 1 -iname gitlab*${EGIT_COMMIT} |awk -F "/" '{print $NF}')" - } - - -each_ruby_prepare() { - - # fix path to repo and gitlab-shell hooks - test -d "${ROOT}${GITLAB_SHELL_HOOKS}" || die "Gitlab Shell hooks directory not found: \"${GITLAB_SHELL_HOOKS}. Have you properly installed dev-vcs/gitlab-shell"? - - sed -i \ - -e "s|\(\s*path:\s\)/.*/gitlab-shell/|\1 ${GITLAB_SHELL}/|" \ - -e "s|\(\s*repos_path:\s\)/.*|\1 ${GIT_REPOS}/|" \ - -e "s|\(\s*hooks_path:\s\)/.*|\1 ${GITLAB_SHELL_HOOKS}/|" \ - -e "s|\(\s*path:\s\)/.*/gitlab-satellites/|\1 ${GIT_SATELLITES}/|" \ - -e "s|\(\s*GITLAB_SHELL:\s*\)|\1\n\tpath: \"${GITLAB_SHELL}\"|" \ - config/gitlab.yml.example || die "failed to filter gitlab.yml.example" - elog "gitlab.yml.example prepared" - # modify database settings - if use postgres; then - sed -i \ - -e "s|\(username:\) postgres.*|\1 ${GIT_USER}|" \ - -e "s|\(password:\).*|\1 DEFAULT_DB_PASS|" \ - -e "s|\(socket:\).*|/run/postgresql/.s.PGSQL.5432|" \ - config/database.yml.postgresql \ - || die "failed to filter database.yml.postgresql" - elog " config/database.yml.postgresql prepared" - else - rm config/database.yml.postgresql - fi - - # replace "secret" token with random one - local randpw=$(echo ${RANDOM}|sha512sum|cut -c 1-128) - sed -i -e "/secret_token =/ s/=.*/= '${randpw}'/" \ - config/initializers/secret_token.rb \ - || die "failed to filter secret_token.rb" - elog " config/initializers/secret_token.rb prepared" - - # remove needless files - rm .foreman .gitignore Procfile - rm -r lib/support/{deploy,init.d} - use mysql || rm config/database.yml.mysql - use unicorn || rm config/unicorn.rb.example - # change cache_store - if use memcached; then - sed -i \ - -e "/\w*config.cache_store / s/=.*/= :dalli_store, { namespace: 'gitlab' }/" \ - config/environments/production.rb \ - || die "failed to modify production.rb" - fi - - sed -i -e "s|gem 'gemnasium-gitlab-service', '~> 0.2'|gem 'gemnasium-gitlab-service', git: 'https://github.com/gemnasium/gemnasium-gitlab-service'|g" Gemfile - sed -i -e "s|gem 'gemnasium-gitlab-service', '~> 0.2'|gem 'gemnasium-gitlab-service', git: 'https://github.com/gemnasium/gemnasium-gitlab-service'|g" Gemfile.lock - - # fir a BUG https://gitlab.com/gitlab-org/gitlab-foss/-/issues/47483 - sed -i -e "/ check_gitaly_connection/d" lib/tasks/gitlab/setup.rake -} - -pkg_preinst() { - diropts -m "0750" -o "${GIT_USER}" -g "${GIT_GROUP}" - dodir "${GIT_SATELLITES}" -} - -src_install() { - # DO NOT REMOVE - without this, the package won't install - ruby-ng_src_install - - if use systemd;then - einfo "installing systemd unit files" - for service in "${FILESDIR}"/systemd/*.service "${FILESDIR}"/systemd/*.target; do - unit="$(basename $service)" - sed -e "s#@DEST_DIR@#${DEST_DIR}#g" \ - -e "s#@CONF_DIR@#${CONF_DIR}#g" \ - -e "s#@LOG_DIR@#${GITLAB_LOGS}#g" \ - -e "s#@TMP_DIR@#${GITLAB_TMP}#g" \ - -e "s#@SLOT@#${SLOT}#g" \ - "${service}" > "${T}/${unit/X/${SLOT}}" || die "Failed to configure: $unit" - systemd_dounit "${T}/${unit/X/${SLOT}}" ||die "init install failed $file" - done - tmpfile="gitlabhq-X-tmpfiles.conf" - sed -e "s#@DEST_DIR@#${DEST_DIR}#g" \ - -e "s#@CONF_DIR@#${CONF_DIR}#g" \ - -e "s#@LOG_DIR@#${GITLAB_LOGS}#g" \ - -e "s#@TMP_DIR@#${GITLAB_TMP}#g" \ - -e "s#@SLOT@#${SLOT}#g" \ - "${tmpfile}" > "${T}/${tmpfile/X/${SLOT}}" || die "Failed to tempfile: $tmpfile" - systemd_dotmpfilesd "${T}/${tmpfile/X/${SLOT}}" - fi - exeinto /sbin/ - doexe ${FILESDIR}/gitlab-console -} - - -each_ruby_install() { - local dest="${DEST_DIR}" - local public="${DEST_DIR}/public" - local uploads="${DEST_DIR}/public/uploads" - - ## Prepare directories ## - diropts -m755 - dodir "${dest}" - dodir "${dest}/config" - dodir "${uploads}" - keepdir "${dest}/config" - - diropts -m750 - dodir "${GITLAB_TMP}" "${GITLAB_LOGS}" - keepdir "${GITLAB_LOGS}" - keepdir "${GITLAB_TMP}" - - diropts -m700 - dodir "${public}" - - dosym "${GITLAB_TMP}" "${dest}/tmp" - dosym "${GITLAB_LOGS}" "${dest}/log" - - ## Link gitlab-shell into git home - dosym "${GITLAB_SHELL}" "${GIT_HOME}/gitlab-shell" - - ## Link gitaly into git home - dosym "${GITLAB_GITALY}" "${GIT_HOME}/gitaly" - - ## Install configs ## - - # Note that we cannot install the config to /etc and symlink - # it to ${dest} since require_relative in config/application.rb - # seems to get confused by symlinks. So let's install the config - # to ${dest} and create a smylink to /etc/gitlabhq-<VERSION> - dosym "${dest}/config" "${CONF_DIR}" - - insinto "${dest}/.ssh" - newins "${FILESDIR}/config.ssh" config - - echo "export RAILS_ENV=production" > "${D}/${dest}/.profile" - - ## Install all others ## - - # remove needless dirs - rm -Rf tmp log - - insinto "${dest}" - doins -r ./ - - ## Install logrotate config ## - - dodir /etc/logrotate.d - sed -e "s|@LOG_DIR@|${logs}|" \ - "${FILESDIR}"/gitlab.logrotate > "${D}"/etc/logrotate.d/${PN}-${SLOT} \ - || die "failed to filter gitlab.logrotate" - ## Install gems via bundler ## - - cd "${D}/${dest}" - - local without="development test thin aws" - local flag; for flag in memcached mysql postgres unicorn kerberos; do - without+="$(use $flag || echo ' '$flag)" - done - local bundle_args="--no-deployment --full-index --path=vendor/bundle ${without:+--without ${without}}" - - # Use systemlibs for nokogiri as suggested - ${BUNDLE} config build.nokogiri --use-system-libraries - - ## Fix invalid ldflags for charlock_holmes, - ## see https://github.com/brianmario/charlock_holmes/issues/32 - #${BUNDLE} config build.charlock_holmes --with-ldflags='-L. -Wl,-O1 -Wl,--as- needed -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -lz -licuuc' - - einfo "Running bundle install ${bundle_args} ..." - ${BUNDLE} install ${bundle_args} || die "bundler failed" - - ## Clean ## - - # remove gems cache - rm -Rf vendor/bundle/ruby/*/cache - rm -Rf vendor/bundle/ruby/*/bundler/gems/charlock_holmes-*/.git - - # fix permissions - einfo "### fix permission ###" - fowners -R ${GIT_USER}:${GIT_GROUP} "${dest}" "${CONF_DIR}" "${GITLAB_TMP}" "${GITLAB_LOGS}" - fperms o+Xr "${GITLAB_TMP}" # Let nginx access the unicorn socket - fperms 2770 "${dest}" - fperms -R +x "${dest}"/bin/ - ## fix symlink ownership - fowners -h ${GIT_USER} "${GIT_HOME}/gitlab-shell" - fowners -h ${GIT_USER} "${GIT_HOME}/gitaly" - - if use memcached; then - sed -i -e '/^depend/,// {/need / s/$/ memcached/}' \ - "${T}/${rcscript}" || die "failed to filter ${rcscript}" - fi -} - -pkg_postinst() { - if [ ! -f "${GIT_HOME}/.ssh/id_rsa" ]; then - if [ ! -d "${GIT_HOME}/.ssh" ]; then - dodir -o "${GIT_USER}" "${GIT_HOME}/.ssh" - fi - einfo "Generating SSH key for git user" - su -l ${GIT_USER} -s /bin/sh -c " - ssh-keygen -q -N '' -t rsa -f ${GIT_HOME}/.ssh/id_rsa" \ - || elog "failed to generate SSH key" - fi - if [ ! -f "${GIT_HOME}/.gitconfig" ]; then - einfo "Setting git user in ${GIT_HOME}/.gitconfig, feel free to " - einfo "modify this file according to your needs!" - su -l ${GIT_USER} -s /bin/sh -c " - git config --global core.autocrlf 'input'; - git config --global user.email 'gitlab@localhost'; - git config --global user.name 'GitLab'" \ - || die "failed to setup git name and email" - fi - - elog "If this is a new installation, proceed with the following steps:" - elog - elog " 1. Copy ${CONF_DIR}/gitlab.yml.example to ${CONF_DIR}/gitlab.yml" - elog " and edit this file in order to configure your GitLab settings." - elog - elog " 2. Copy ${CONF_DIR}/database.yml.* to ${CONF_DIR}/database.yml" - elog " and edit this file in order to configure your database settings" - elog " for \"production\" environment." - elog - elog " 3. Copy ${CONF_DIR}/initializers/rack_attack.rb.example" - elog " to ${CONF_DIR}/initializers/rack_attack.rb" - elog - elog " 4. Copy ${CONF_DIR}/resque.yml.example to ${CONF_DIR}/resque.yml" - elog " and edit this file in order to configure your Redis settings" - elog " for \"production\" environment." - elog - - if use unicorn; then - elog " 4a. Copy ${CONF_DIR}/unicorn.rb.example to ${CONF_DIR}/unicorn.rb" - elog - fi - - elog " 5. If this is a new installation, create a database for your GitLab instance." - if use postgres; then - elog " To be able configuring database with ruby will need to create following role for ${GIT_USER} user " - elog " su postgres" - elog " psql -c \"CREATE ROLE ${GIT_USER} PASSWORD 'gitlab' \\" - elog " SUPERUSER CREATEDB NOCREATEROLE INHERIT LOGIN;\"" - elog " Note: You should change your password to something more random..." - fi - elog " 6. Execute the following command to finalize your setup:" - elog " emerge --config \"=${CATEGORY}/${PF}\"" - elog " Note: Do not forget to start Redis server." - elog - elog " 7. Configure nginx, you can copy config from ${DEST_DIR}/lib/support/nginx" - elog " create symlink from /etc/nginx/ssl to /etc/ssl/nginx and keep certificates there" - elog - elog "To update an existing instance, run the following command and choose upgrading when prompted:" - elog " emerge --config \"=${CATEGORY}/${PF}\"" - elog - elog "Important: Do not remove the earlier version prior migration!" - - ## create set of directories needed before first run - dodir "${GITLAB_TMP}/{backups,cache,pids,sessions,sockets}" - fowners -R ${GIT_USER}:${GIT_GROUP} "${GITLAB_TMP}" -} - -pkg_config() { - local GITLAB_LOGS="/var/log/${PN}-${SLOT}" - elog "This process will fail if redis is not running !!!" - einfo "" - if ! use systemd;then - elog "/etc/init.d/redis start" - else - elog "systemctl start redis.service" - fi - # Ask user whether this is the first installation - einfo "Do you want to upgrade an existing installation? [Y|n] " - do_upgrade="" - while true - do - read -r do_upgrade - if [[ $do_upgrade == "n" || $do_upgrade == "N" ]] ; then do_upgrade="" && break - elif [[ $do_upgrade == "y" || $do_upgrade == "Y" || $do_upgrade == "" ]] ; then do_upgrade=1 && break - else eerror "Please type either \"Y\" or \"N\" ... " ; fi - done - - if [[ $do_upgrade ]] ; then - - LATEST_DEST=$(test -n "${LATEST_DEST}" && echo ${LATEST_DEST} || \ - find /opt -maxdepth 1 -iname 'gitlabhq-*' -and -type d -and -not -iname "gitlabhq-${SLOT}" | \ - sort -r | head -n1) - - if [[ -z "${LATEST_DEST}" || ! -d "${LATEST_DEST}" ]] ; then - einfo "Please enter the path to your latest Gitlab instance:" - while true - do - read -r LATEST_DEST - test -d ${LATEST_DEST} && break ||\ - eerror "Please specify a valid path to your Gitlab instance!" - done - else - einfo "Found your latest Gitlab instance at \"${LATEST_DEST}\"." - fi - - einfo "Please make sure that you've created a backup and stopped all running Gitlab instance/services: " - elog "\$ cd \"${LATEST_DEST}\" && sudo -u ${GIT_USER} ${BUNDLE} exec rake gitlab:backup:create RAILS_ENV=production" - if ! use systemd;then - elog "\$ /etc/init.d/${LATEST_DEST#*/opt/} stop" - else - elog "systemctl stop gitlab-*" - fi - if [[ ! -r "${GITLAB_SHELL}"/config.yml ]];then - elog "Process will fail because gitlab-shell has not been configured" - elog "" - elog "Copy ${GITLAB_SHELL}/config.yml.example to ${GITLAB_SHELL}/config.yml" - elog "and edit this file in order to configure your GitLab-Shell settings." - fi - elog "" - elog "Make sure that your database service is runnig and is configured" - elog "" - if use postgres; then - if use systemd;then - elog " systemctl start postgresql-<VERSION>" - else - elog "/etc/init.d/postgresql-<VERSION>" - fi - fi - if [ ! -d ${DEST_DIR}/node_modules/pikaday ]; then - ## fix a BUG where node_modules/pikaday is required - cd ${DEST_DIR} - npm install pikaday - cd - - fi - einfo "Press ENTER to continue, STRG-C to cancel" - read - - if [[ ${LATEST_DEST} != ${DEST_DIR} ]] ; - then - einfo "Found major update, migrate data from \"$LATEST_DEST\":" - einfo "Migrating uploads ..." - einfo "This will move your uploads from \"$LATEST_DEST\" to \"${DEST_DIR}\", continue? [Y|n] " - migrate_uploads="" - while true - do - read -r migrate_uploads - if [[ $migrate_uploads == "n" || $migrate_uploads == "N" ]] ; then migrate_uploads="" && break - elif [[ $migrate_uploads == "y" || $migrate_uploads == "Y" || $migrate_uploads == "" ]] ; then migrate_uploads=1 && break - else eerror "Please type either \"Y\" or \"N\" ... " ; fi - done - if [[ $migrate_uploads ]] ; then - su -l ${GIT_USER} -s /bin/sh -c " - rm -rf ${DEST_DIR}/public/uploads && \ - mv ${LATEST_DEST}/public/uploads ${DEST_DIR}/public/uploads" \ - || die "failed to migrate uploads." - - # Fix permissions - find "${DEST_DIR}/public/uploads/" -type d -exec chmod 0700 {} \; - fi - - einfo "Migrating shared data ..." - einfon "This will move your shared data from \"$LATEST_DEST\" to \"${DEST_DIR}\", (C)ontinue or (s)kip? " - migrate_shared="" - while true - do - read -r migrate_shared - if [[ $migrate_shared == "s" || $migrate_shared == "S" ]] ; then migrate_shared="" && break - elif [[ $migrate_shared == "c" || $migrate_shared == "C" || $migrate_shared == "" ]] ; then migrate_shared=1 && break - else eerror "Please type either \"c\" to continue or \"n\" to skip ... " ; fi - done - if [[ $migrate_shared ]] ; then - su -l ${GIT_USER} -s /bin/sh -c " - rm -rf ${DEST_DIR}/shared && \ - mv ${LATEST_DEST}/shared ${DEST_DIR}/shared" \ - || die "failed to migrate shared data." - - # Fix permissions - find "${DEST_DIR}/shared/" -type d -exec chmod 0700 {} \; - fi - - for conf in database.yml gitlab.yml resque.yml unicorn.rb ; do - einfo "Migration config file \"$conf\" ..." - cp -p "${LATEST_DEST}/config/${conf}" "${CONF_DIR}" - sed -s "s#$(basename $LATEST_DEST)#${PN}-${SLOT}#g" -i "${CONF_DIR}/$conf" - example="${CONF_DIR}/${conf}.example" - test -f "${example}" && mv "${example}" "${DEST_DIR}/config/._cfg0000_${conf}" - done - CONFIG_PROTECT="${DEST_DIR}" dispatch-conf || die "failed to automatically migrate config, run \"CONFIG_PROTECT=${DEST_DIR} dispatch-conf\" by hand, re-run this routine and skip config migration to proceed." - fi - if [ ! -r "${CONF_DIR}/database.yml" ] ; then - eerror "Copy \"${CONF_DIR}/database.yml.*\" to \"${CONF_DIR}/database.yml\"" - eerror "and edit this file in order to configure your database settings for" - eerror "\"production\" environment." - die - fi - if [ ! -r "${CONF_DIR}/gitlab.yml" ]; then - eerror "Copy \"${CONF_DIR}/gitlab.yml.example\" to \"${CONF_DIR}/gitlab.yml\"" - eerror "and edit this file in order to configure your GitLab settings" - eerror "for \"production\" environment." - die - fi - - einfo "Clean up old gems ..." - su -l ${GIT_USER} -s /bin/sh -c " - export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 - cd ${DEST_DIR} - ${BUNDLE} clean" \ - || die "failed to clean up old gems ..." - - einfo "Migrating database ..." - su -l ${GIT_USER} -s /bin/sh -c " - export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 - cd ${DEST_DIR} - ${BUNDLE} exec rake db:migrate RAILS_ENV=production" \ - || die "failed to migrate database." - - einfo "Clear redis cache ..." - su -l ${GIT_USER} -s /bin/sh -c " - export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 - cd ${DEST_DIR} - ${BUNDLE} exec rake cache:clear RAILS_ENV=production" \ - || die "failed to run cache:clear" - - einfo "Clear and precompile assets ..." - su -l ${GIT_USER} -s /bin/sh -c " - export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 - cd ${DEST_DIR} - ${BUNDLE} exec rake assets:clean RAILS_ENV=production - ${BUNDLE} exec rake assets:precompile RAILS_ENV=production" \ - || die "failed to run assets:clean and assets:precompile" - - elog " Gitlab server migration has completed" - - ## (Re-)Link current gitlabhq into "${GIT_HOME}"/gitlab - if [[ ! -L "${GIT_HOME}"/gitlab ]];then - einfo "symlink ${GIT_HOME}/gitlab not present" - ln -s "${DEST_DIR}" "${GIT_HOME}"/gitlab - else - if [[ ! `readlink -f "${GIT_HOME}"/gitlab` == "${DEST_DIR}" ]];then - einfo "symlink ${GIT_HOME}/gitlab not valid" - unlink "${GIT_HOME}"/gitlab - ln -s "${DEST_DIR}" "${GIT_HOME}"/gitlab - fi - fi - else - if use postgres; then - elog " To be able configuring database with ruby will need to create following role for ${GIT_USER} user " - elog " su postgres" - elog " psql -c \"CREATE ROLE ${GIT_USER} PASSWORD 'gitlab' \\" - elog " SUPERUSER CREATEDB NOCREATEROLE INHERIT LOGIN;\"" - elog " Note: You should change your password to something more random..." - fi - if [[ ! -r "${GITLAB_SHELL}"/config.yml ]];then - elog "Process will fail because gitlab-shell has not been configured" - elog "" - elog "Copy ${GITLAB_SHELL}/config.yml.example to ${GITLAB_SHELL}/config.yml" - elog "and edit this file in order to configure your GitLab-Shell settings." - fi - elog "" - ## Check config files existence ## - einfo "Checking configuration files ..." - - einfo "Initial config setup ..." - if [ ! -r "${CONF_DIR}/database.yml" ] ; then - einfo "database.yml" - if use postgres; then - cp "${CONF_DIR}"/database.yml.postgresql "${CONF_DIR}"/database.yml ||die "failed to copy database config file" - fi - fi - if [ ! -r "${CONF_DIR}/gitlab.yml" ]; then - einfo "gitlab.yml" - cp "${CONF_DIR}"/gitlab.yml.example "${CONF_DIR}"/gitlab.yml ||die "failed to copy gitlab config file" - fi - if [ ! -r "${CONF_DIR}/resque.yml" ]; then - einfo "resque.yml" - cp "${CONF_DIR}"/resque.yml.example "${CONF_DIR}"/resque.yml ||die "failed to copy resque config file" - fi - if [ ! -r "${CONF_DIR}/unicorn.rb" ]; then - einfo "unicorn.rb" - cp "${CONF_DIR}"/unicorn.rb.example "${CONF_DIR}"/unicorn.rb ||die "failed to copy unicorn ruby file" - fi - if [ ! -r "${CONF_DIR}/initializers/rack_attack.rb" ]; then - einfo "rack_attack.rb" - cp "${CONF_DIR}"/initializers/rack_attack.rb.example "${CONF_DIR}"/initializers/rack_attack.rb ||die "failed to copy rack_attack ruby file" - fi - ## (Re-)Link current gitlabhq into "${GIT_HOME}"/gitlab - if [[ ! -L "${GIT_HOME}"/gitlab ]];then - einfo "symlink ${GIT_HOME}/gitlab not present" - ln -s "${DEST_DIR}" "${GIT_HOME}"/gitlab - else - if [[ ! `readlink -f "${GIT_HOME}"/gitlab` == "${DEST_DIR}" ]];then - einfo "symlink ${GIT_HOME}/gitlab not valid" - unlink "${GIT_HOME}"/gitlab - ln -s "${DEST_DIR}" "${GIT_HOME}"/gitlab - fi - fi - if [ ! -d ${DEST_DIR}/node_modules/pikaday ]; then - ## fix a BUG where node_modules/pikaday is required - cd ${DEST_DIR} - npm install pikaday - cd - - fi - einfo "Initializing database ..." - su -l ${GIT_USER} -s /bin/sh -c " - export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 - cd ${DEST_DIR} - ${BUNDLE} exec rake gitlab:setup RAILS_ENV=${RAILS_ENV}" \ - || die "failed to run rake gitlab:setup" - einfo "Clear and precompile assets ..." - su -l ${GIT_USER} -s /bin/sh -c " - export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 - cd ${DEST_DIR} - ${BUNDLE} exec rake assets:clean RAILS_ENV=production - ${BUNDLE} exec rake assets:precompile RAILS_ENV=production" \ - || die "failed to run assets:clean and assets:precompile" - if use postgres; then - elog " We can increase security of database by changing permission for ${GIT_USER} user " - elog " su postgres" - elog " psql -c \"ALTER USER ${GIT_USER} \\" - elog " NOSUPERUSER NOCREATEDB ;\"" - fi - - fi - ## (Re-)Link gitlab-shell-secret into gitlab-shell - if test -L "${GITLAB_SHELL}/.gitlab_shell_secret" - then - rm "${GITLAB_SHELL}/.gitlab_shell_secret" - ln -s "${DEST_DIR}/.gitlab_shell_secret" "${GITLAB_SHELL}/.gitlab_shell_secret" - fi - - # fix repository permissions - einfo "### fix permission ###" - chown -R ${GIT_USER}:${GIT_GROUP} "${DEST_DIR}" "${CONF_DIR}" "${GITLAB_TMP}" "${GITLAB_LOGS}" - chmod -R ug+rwX,o-rwx "${GIT_REPOS}" - chmod -R ug-s "${GIT_REPOS}" - find "${GIT_REPOS}" -type d -print0 | xargs -0 chmod g+s - - einfo "You might want to run the following in order to check your application status:" - einfo "# cd ${DEST_DIR} && sudo -u ${GIT_USER} ${BUNDLE} exec rake gitlab:check RAILS_ENV=production" - einfo "" - einfo "GitLab is prepared, now you should configure your web server." -} diff --git a/www-apps/gitlabhq/gitlabhq-9.5.10.ebuild b/www-apps/gitlabhq/gitlabhq-9.5.10.ebuild deleted file mode 100644 index 823283625c443b4b6a6d4718a23f184f2e3c19bc..0000000000000000000000000000000000000000 --- a/www-apps/gitlabhq/gitlabhq-9.5.10.ebuild +++ /dev/null @@ -1,643 +0,0 @@ -# Copyright 1999-2020 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=6 - -# Maintainer notes: -# - This ebuild uses Bundler to download and install all gems in deployment mode -# (i.e. into isolated directory inside application). That's not Gentoo way how -# it should be done, but GitLab has too many dependencies that it will be too -# difficult to maintain them via ebuilds. -# - -USE_RUBY="ruby23" -PYTHON_COMPAT=( python2_7 ) - -inherit python-r1 ruby-ng systemd versionator user - -GITALY_VERSION="0.35.0" -GITLAB_PAGES_VERSION="0.5.1" -GITLAB_SHELL_VERSION="5.8.0" -GITLAB_WORKHORSE_VERSION="3.0.0" - -EGIT_TAG="v${PV}" -EGIT_COMMIT="76c4568daa809c85a8de6e2df8546ef46e6470a4" -SRC_URI="https://gitlab.com/gitlab-org/gitlab-ce/repository/archive.tar.gz?ref=${EGIT_COMMIT} -> ${P}.tar.gz " - -DESCRIPTION="GitLab is a free project and repository management application" -HOMEPAGE="https://about.gitlab.com/gitlab-ci/" -LICENSE="MIT" -SLOT="$(get_version_component_range 1-2)" -KEYWORDS="amd64 x86" -IUSE="memcached mysql kerberos pages +postgres +unicorn systemd rugged_use_system_libraries" -PATCHES=( - "${FILESDIR}/${PN}-8.7.5-fix-sendmail-config.patch" - "${FILESDIR}/${PN}-9.3.0-fix-check-task.patch" - "${FILESDIR}/${PN}-9.0.0-replace-sys-filesystem.patch" - ) -RESTRICT="splitdebug" - -GEMS_DEPEND=" - !app-crypt/heimdal - app-crypt/mit-krb5 - dev-libs/icu - dev-libs/libxml2 - dev-libs/libxslt - dev-libs/re2 - dev-util/ragel - dev-libs/yajl - >=net-libs/nodejs-4.3.0 - >=sys-apps/yarn-0.17.0 - postgres? ( dev-db/postgresql ) - mysql? ( virtual/mysql ) - memcached? ( net-misc/memcached ) - kerberos? ( virtual/krb5 ) - " -CDEPEND=" - dev-util/cmake - virtual/pkgconfig" -COMMON_DEPEND=" - ${GEMS_DEPEND} - ~dev-vcs/gitlab-shell-${GITLAB_SHELL_VERSION} - >=dev-vcs/git-2.8.4 - ~www-servers/gitlab-workhorse-${GITLAB_WORKHORSE_VERSION} - rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/26 ) - pages? ( ~www-servers/gitlab-pages-${GITLAB_PAGES_VERSION} ) - ~www-servers/gitlab-gitaly-${GITALY_VERSION}" -DEPEND="${GEMS_DEPEND} - ${CDEPEND} - ${COMMON_DEPEND} - dev-lang/ruby:2.3[readline,ssl] - net-misc/curl - virtual/ssh" -RDEPEND="${COMMON_DEPEND} - >=dev-db/redis-2.8.0 - virtual/mta - systemd? ( sys-apps/systemd:0= )" -ruby_add_bdepend " - virtual/rubygems - >=dev-ruby/bundler-1.14.6" - -GIT_USER="git" -GIT_GROUP="git" -DEFAULT_DB_PASS="gitlab" -GIT_HOME="/home/git" -DEST_DIR="/opt/${PN}-${SLOT}" -CONF_DIR="/etc/${PN}-${SLOT}/config" - -GIT_REPOS="${GIT_HOME}/repositories" -GIT_SATELLITES="${GIT_HOME}/gitlab-satellites" -GITLAB_SHELL="/var/lib/gitlab-shell" -GITLAB_SHELL_HOOKS="${GITLAB_SHELL}/hooks" -GITLAB_LOGS="/var/log/${PN}-${SLOT}" -GITLAB_TMP="/var/tmp/${PN}-${SLOT}" -GITLAB_GITALY="/var/lib/gitlab-gitaly/" - -RAILS_ENV=${RAILS_ENV:-production} -RUBY=${RUBY:-ruby23} -BUNDLE="${RUBY} /usr/bin/bundle" -SERVICES_DIR="${S}"/services - -pkg_setup() { - enewgroup ${GIT_GROUP} - enewuser ${GIT_USER} -1 -1 ${DEST_DIR} "${GIT_GROUP}" - - use "rugged_use_system_libraries" && export RUGGED_USE_SYSTEM_LIBRARIES="YES" - } - -all_ruby_unpack(){ - default - export RUBY_S="$(find ${WORKDIR}/all/ -maxdepth 1 -iname gitlab*${EGIT_COMMIT} |awk -F "/" '{print $NF}')" - } - - -each_ruby_prepare() { - - # fix path to repo and gitlab-shell hooks - test -d "${ROOT}${GITLAB_SHELL_HOOKS}" || die "Gitlab Shell hooks directory not found: \"${GITLAB_SHELL_HOOKS}. Have you properly installed dev-vcs/gitlab-shell"? - - sed -i \ - -e "s|\(\s*path:\s\)/.*/gitlab-shell/|\1 ${GITLAB_SHELL}/|" \ - -e "s|\(\s*repos_path:\s\)/.*|\1 ${GIT_REPOS}/|" \ - -e "s|\(\s*hooks_path:\s\)/.*|\1 ${GITLAB_SHELL_HOOKS}/|" \ - -e "s|\(\s*path:\s\)/.*/gitlab-satellites/|\1 ${GIT_SATELLITES}/|" \ - -e "s|\(\s*GITLAB_SHELL:\s*\)|\1\n\tpath: \"${GITLAB_SHELL}\"|" \ - config/gitlab.yml.example || die "failed to filter gitlab.yml.example" - elog "gitlab.yml.example prepared" - # modify database settings - if use postgres; then - sed -i \ - -e "s|\(username:\) postgres.*|\1 ${GIT_USER}|" \ - -e "s|\(password:\).*|\1 DEFAULT_DB_PASS|" \ - -e "s|\(socket:\).*|/run/postgresql/.s.PGSQL.5432|" \ - config/database.yml.postgresql \ - || die "failed to filter database.yml.postgresql" - elog " config/database.yml.postgresql prepared" - else - rm config/database.yml.postgresql - fi - - # replace "secret" token with random one - local randpw=$(echo ${RANDOM}|sha512sum|cut -c 1-128) - sed -i -e "/secret_token =/ s/=.*/= '${randpw}'/" \ - config/initializers/secret_token.rb \ - || die "failed to filter secret_token.rb" - elog " config/initializers/secret_token.rb prepared" - - # remove needless files - rm .foreman .gitignore Procfile - rm -r lib/support/{deploy,init.d} - use mysql || rm config/database.yml.mysql - use unicorn || rm config/unicorn.rb.example - # change cache_store - if use memcached; then - sed -i \ - -e "/\w*config.cache_store / s/=.*/= :dalli_store, { namespace: 'gitlab' }/" \ - config/environments/production.rb \ - || die "failed to modify production.rb" - fi - - sed -i -e "s|gem 'gemnasium-gitlab-service', '~> 0.2'|gem 'gemnasium-gitlab-service', git: 'https://github.com/gemnasium/gemnasium-gitlab-service'|g" Gemfile - sed -i -e "s|gem 'gemnasium-gitlab-service', '~> 0.2'|gem 'gemnasium-gitlab-service', git: 'https://github.com/gemnasium/gemnasium-gitlab-service'|g" Gemfile.lock - - # fir a BUG https://gitlab.com/gitlab-org/gitlab-foss/-/issues/47483 - sed -i -e "/ check_gitaly_connection/d" lib/tasks/gitlab/setup.rake -} - -pkg_preinst() { - diropts -m "0750" -o "${GIT_USER}" -g "${GIT_GROUP}" - dodir "${GIT_SATELLITES}" -} - -src_install() { - # DO NOT REMOVE - without this, the package won't install - ruby-ng_src_install - - if use systemd;then - einfo "installing systemd unit files" - for service in "${FILESDIR}"/systemd/*.service "${FILESDIR}"/systemd/*.target; do - unit="$(basename $service)" - sed -e "s#@DEST_DIR@#${DEST_DIR}#g" \ - -e "s#@CONF_DIR@#${CONF_DIR}#g" \ - -e "s#@LOG_DIR@#${GITLAB_LOGS}#g" \ - -e "s#@TMP_DIR@#${GITLAB_TMP}#g" \ - -e "s#@SLOT@#${SLOT}#g" \ - "${service}" > "${T}/${unit/X/${SLOT}}" || die "Failed to configure: $unit" - systemd_dounit "${T}/${unit/X/${SLOT}}" ||die "init install failed $file" - done - _tmpfile="${FILESDIR}/systemd/gitlabhq-X-tmpfiles.conf" - tmpfile="$(basename $_tmpfile)" - sed -e "s#@DEST_DIR@#${DEST_DIR}#g" \ - -e "s#@CONF_DIR@#${CONF_DIR}#g" \ - -e "s#@LOG_DIR@#${GITLAB_LOGS}#g" \ - -e "s#@TMP_DIR@#${GITLAB_TMP}#g" \ - -e "s#@SLOT@#${SLOT}#g" \ - "${_tmpfile}" > "${T}/${tmpfile/X/${SLOT}}" || die "Failed to tempfile: $tmpfile" - systemd_dotmpfilesd "${T}/${tmpfile/X/${SLOT}}" - fi - exeinto /sbin/ - doexe ${FILESDIR}/gitlab-console -} - - -each_ruby_install() { - local dest="${DEST_DIR}" - local public="${DEST_DIR}/public" - local uploads="${DEST_DIR}/public/uploads" - - ## Prepare directories ## - diropts -m755 - dodir "${dest}" - dodir "${dest}/config" - dodir "${uploads}" - keepdir "${dest}/config" - - diropts -m750 - dodir "${GITLAB_TMP}" "${GITLAB_LOGS}" - keepdir "${GITLAB_LOGS}" - keepdir "${GITLAB_TMP}" - - diropts -m700 - dodir "${public}" - - dosym "${GITLAB_TMP}" "${dest}/tmp" - dosym "${GITLAB_LOGS}" "${dest}/log" - - ## Link gitlab-shell into git home - dosym "${GITLAB_SHELL}" "${GIT_HOME}/gitlab-shell" - - ## Link gitaly into git home - dosym "${GITLAB_GITALY}" "${GIT_HOME}/gitaly" - - ## Install configs ## - - # Note that we cannot install the config to /etc and symlink - # it to ${dest} since require_relative in config/application.rb - # seems to get confused by symlinks. So let's install the config - # to ${dest} and create a smylink to /etc/gitlabhq-<VERSION> - dosym "${dest}/config" "${CONF_DIR}" - - insinto "${dest}/.ssh" - newins "${FILESDIR}/config.ssh" config - - echo "export RAILS_ENV=production" > "${D}/${dest}/.profile" - - ## Install all others ## - - # remove needless dirs - rm -Rf tmp log - - insinto "${dest}" - doins -r ./ - - ## Install logrotate config ## - - dodir /etc/logrotate.d - sed -e "s|@LOG_DIR@|${logs}|" \ - "${FILESDIR}"/gitlab.logrotate > "${D}"/etc/logrotate.d/${PN}-${SLOT} \ - || die "failed to filter gitlab.logrotate" - ## Install gems via bundler ## - - cd "${D}/${dest}" - - local without="development test thin aws" - local flag; for flag in memcached mysql postgres unicorn kerberos; do - without+="$(use $flag || echo ' '$flag)" - done - local bundle_args="--no-deployment --path=vendor/bundle ${without:+--without ${without}}" - - # Use systemlibs for nokogiri as suggested - ${BUNDLE} config build.nokogiri --use-system-libraries - - ## Fix invalid ldflags for charlock_holmes, - ## see https://github.com/brianmario/charlock_holmes/issues/32 - #${BUNDLE} config build.charlock_holmes --with-ldflags='-L. -Wl,-O1 -Wl,--as- needed -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -lz -licuuc' - - einfo "Running bundle install ${bundle_args} ..." - ${BUNDLE} install ${bundle_args} || die "bundler failed" - - ## Clean ## - - # remove gems cache - rm -Rf vendor/bundle/ruby/*/cache - rm -Rf vendor/bundle/ruby/*/bundler/gems/charlock_holmes-*/.git - - # fix permissions - einfo "### fix permission ###" - fowners -R ${GIT_USER}:${GIT_GROUP} "${dest}" "${CONF_DIR}" "${GITLAB_TMP}" "${GITLAB_LOGS}" - fperms o+Xr "${GITLAB_TMP}" # Let nginx access the unicorn socket - fperms 2770 "${dest}" - fperms -R +x "${dest}"/bin/ - ## fix symlink ownership - fowners -h ${GIT_USER} "${GIT_HOME}/gitlab-shell" - fowners -h ${GIT_USER} "${GIT_HOME}/gitaly" - - if use memcached; then - sed -i -e '/^depend/,// {/need / s/$/ memcached/}' \ - "${T}/${rcscript}" || die "failed to filter ${rcscript}" - fi -} - -pkg_postinst() { - if [ ! -f "${GIT_HOME}/.ssh/id_rsa" ]; then - if [ ! -d "${GIT_HOME}/.ssh" ]; then - dodir -o "${GIT_USER}" "${GIT_HOME}/.ssh" - fi - einfo "Generating SSH key for git user" - su -l ${GIT_USER} -s /bin/sh -c " - ssh-keygen -q -N '' -t rsa -f ${GIT_HOME}/.ssh/id_rsa" \ - || elog "failed to generate SSH key" - fi - if [ ! -f "${GIT_HOME}/.gitconfig" ]; then - einfo "Setting git user in ${GIT_HOME}/.gitconfig, feel free to " - einfo "modify this file according to your needs!" - su -l ${GIT_USER} -s /bin/sh -c " - git config --global core.autocrlf 'input'; - git config --global user.email 'gitlab@localhost'; - git config --global user.name 'GitLab'" \ - || die "failed to setup git name and email" - fi - - elog "If this is a new installation, proceed with the following steps:" - elog - elog " 1. Copy ${CONF_DIR}/gitlab.yml.example to ${CONF_DIR}/gitlab.yml" - elog " and edit this file in order to configure your GitLab settings." - elog - elog " 2. Copy ${CONF_DIR}/database.yml.* to ${CONF_DIR}/database.yml" - elog " and edit this file in order to configure your database settings" - elog " for \"production\" environment." - elog - elog " 3. Copy ${CONF_DIR}/initializers/rack_attack.rb.example" - elog " to ${CONF_DIR}/initializers/rack_attack.rb" - elog - elog " 4. Copy ${CONF_DIR}/resque.yml.example to ${CONF_DIR}/resque.yml" - elog " and edit this file in order to configure your Redis settings" - elog " for \"production\" environment." - elog - - if use unicorn; then - elog " 4a. Copy ${CONF_DIR}/unicorn.rb.example to ${CONF_DIR}/unicorn.rb" - elog - fi - - elog " 5. If this is a new installation, create a database for your GitLab instance." - if use postgres; then - elog " To be able configuring database with ruby will need to create following role for ${GIT_USER} user " - elog " su postgres" - elog " psql -c \"CREATE ROLE ${GIT_USER} PASSWORD 'gitlab' \\" - elog " SUPERUSER CREATEDB NOCREATEROLE INHERIT LOGIN;\"" - elog " Note: You should change your password to something more random..." - fi - elog " 6. Execute the following command to finalize your setup:" - elog " emerge --config \"=${CATEGORY}/${PF}\"" - elog " Note: Do not forget to start Redis server." - elog - elog " 7. Configure nginx, you can copy config from ${DEST_DIR}/lib/support/nginx" - elog " create symlink from /etc/nginx/ssl to /etc/ssl/nginx and keep certificates there" - elog - elog "To update an existing instance, run the following command and choose upgrading when prompted:" - elog " emerge --config \"=${CATEGORY}/${PF}\"" - elog - elog "Important: Do not remove the earlier version prior migration!" - - ## create set of directories needed before first run - dodir "${GITLAB_TMP}/{backups,cache,pids,sessions,sockets}" - fowners -R ${GIT_USER}:${GIT_GROUP} "${GITLAB_TMP}" -} - -pkg_config() { - local GITLAB_LOGS="/var/log/${PN}-${SLOT}" - elog "This process will fail if redis is not running !!!" - einfo "" - if ! use systemd;then - elog "/etc/init.d/redis start" - else - elog "systemctl start redis.service" - fi - # Ask user whether this is the first installation - einfo "Do you want to upgrade an existing installation? [Y|n] " - do_upgrade="" - while true - do - read -r do_upgrade - if [[ $do_upgrade == "n" || $do_upgrade == "N" ]] ; then do_upgrade="" && break - elif [[ $do_upgrade == "y" || $do_upgrade == "Y" || $do_upgrade == "" ]] ; then do_upgrade=1 && break - else eerror "Please type either \"Y\" or \"N\" ... " ; fi - done - - if [[ $do_upgrade ]] ; then - - LATEST_DEST=$(test -n "${LATEST_DEST}" && echo ${LATEST_DEST} || \ - find /opt -maxdepth 1 -iname 'gitlabhq-*' -and -type d -and -not -iname "gitlabhq-${SLOT}" | \ - sort -r | head -n1) - - if [[ -z "${LATEST_DEST}" || ! -d "${LATEST_DEST}" ]] ; then - einfo "Please enter the path to your latest Gitlab instance:" - while true - do - read -r LATEST_DEST - test -d ${LATEST_DEST} && break ||\ - eerror "Please specify a valid path to your Gitlab instance!" - done - else - einfo "Found your latest Gitlab instance at \"${LATEST_DEST}\"." - fi - - einfo "Please make sure that you've created a backup and stopped all running Gitlab instance/services: " - elog "\$ cd \"${LATEST_DEST}\" && sudo -u ${GIT_USER} ${BUNDLE} exec rake gitlab:backup:create RAILS_ENV=production" - if ! use systemd;then - elog "\$ /etc/init.d/${LATEST_DEST#*/opt/} stop" - else - elog "systemctl stop gitlab-*" - fi - if [[ ! -r "${GITLAB_SHELL}"/config.yml ]];then - elog "Process will fail because gitlab-shell has not been configured" - elog "" - elog "Copy ${GITLAB_SHELL}/config.yml.example to ${GITLAB_SHELL}/config.yml" - elog "and edit this file in order to configure your GitLab-Shell settings." - fi - elog "" - elog "Make sure that your database service is runnig and is configured" - elog "" - if use postgres; then - if use systemd;then - elog " systemctl start postgresql-<VERSION>" - else - elog "/etc/init.d/postgresql-<VERSION>" - fi - fi - if [ ! -d ${DEST_DIR}/node_modules/pikaday ]; then - ## fix a BUG where node_modules/pikaday is required - cd ${DEST_DIR} - npm install pikaday - cd - - fi - einfo "Press ENTER to continue, STRG-C to cancel" - read - - if [[ ${LATEST_DEST} != ${DEST_DIR} ]] ; - then - einfo "Found major update, migrate data from \"$LATEST_DEST\":" - einfo "Migrating uploads ..." - einfo "This will move your uploads from \"$LATEST_DEST\" to \"${DEST_DIR}\", continue? [Y|n] " - migrate_uploads="" - while true - do - read -r migrate_uploads - if [[ $migrate_uploads == "n" || $migrate_uploads == "N" ]] ; then migrate_uploads="" && break - elif [[ $migrate_uploads == "y" || $migrate_uploads == "Y" || $migrate_uploads == "" ]] ; then migrate_uploads=1 && break - else eerror "Please type either \"Y\" or \"N\" ... " ; fi - done - if [[ $migrate_uploads ]] ; then - su -l ${GIT_USER} -s /bin/sh -c " - rm -rf ${DEST_DIR}/public/uploads && \ - mv ${LATEST_DEST}/public/uploads ${DEST_DIR}/public/uploads" \ - || die "failed to migrate uploads." - - # Fix permissions - find "${DEST_DIR}/public/uploads/" -type d -exec chmod 0700 {} \; - fi - - einfo "Migrating shared data ..." - einfon "This will move your shared data from \"$LATEST_DEST\" to \"${DEST_DIR}\", (C)ontinue or (s)kip? " - migrate_shared="" - while true - do - read -r migrate_shared - if [[ $migrate_shared == "s" || $migrate_shared == "S" ]] ; then migrate_shared="" && break - elif [[ $migrate_shared == "c" || $migrate_shared == "C" || $migrate_shared == "" ]] ; then migrate_shared=1 && break - else eerror "Please type either \"c\" to continue or \"n\" to skip ... " ; fi - done - if [[ $migrate_shared ]] ; then - su -l ${GIT_USER} -s /bin/sh -c " - rm -rf ${DEST_DIR}/shared && \ - mv ${LATEST_DEST}/shared ${DEST_DIR}/shared" \ - || die "failed to migrate shared data." - - # Fix permissions - find "${DEST_DIR}/shared/" -type d -exec chmod 0700 {} \; - fi - - for conf in database.yml gitlab.yml resque.yml unicorn.rb ; do - einfo "Migration config file \"$conf\" ..." - cp -p "${LATEST_DEST}/config/${conf}" "${CONF_DIR}" - sed -s "s#$(basename $LATEST_DEST)#${PN}-${SLOT}#g" -i "${CONF_DIR}/$conf" - example="${CONF_DIR}/${conf}.example" - test -f "${example}" && mv "${example}" "${DEST_DIR}/config/._cfg0000_${conf}" - done - CONFIG_PROTECT="${DEST_DIR}" dispatch-conf || die "failed to automatically migrate config, run \"CONFIG_PROTECT=${DEST_DIR} dispatch-conf\" by hand, re-run this routine and skip config migration to proceed." - fi - if [ ! -r "${CONF_DIR}/database.yml" ] ; then - eerror "Copy \"${CONF_DIR}/database.yml.*\" to \"${CONF_DIR}/database.yml\"" - eerror "and edit this file in order to configure your database settings for" - eerror "\"production\" environment." - die - fi - if [ ! -r "${CONF_DIR}/gitlab.yml" ]; then - eerror "Copy \"${CONF_DIR}/gitlab.yml.example\" to \"${CONF_DIR}/gitlab.yml\"" - eerror "and edit this file in order to configure your GitLab settings" - eerror "for \"production\" environment." - die - fi - - einfo "Clean up old gems ..." - su -l ${GIT_USER} -s /bin/sh -c " - export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 - cd ${DEST_DIR} - ${BUNDLE} clean" \ - || die "failed to clean up old gems ..." - - einfo "Migrating database ..." - su -l ${GIT_USER} -s /bin/sh -c " - export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 - cd ${DEST_DIR} - ${BUNDLE} exec rake db:migrate RAILS_ENV=production" \ - || die "failed to migrate database." - - einfo "Clear redis cache ..." - su -l ${GIT_USER} -s /bin/sh -c " - export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 - cd ${DEST_DIR} - ${BUNDLE} exec rake cache:clear RAILS_ENV=production" \ - || die "failed to run cache:clear" - - einfo "Clear and precompile assets ..." - su -l ${GIT_USER} -s /bin/sh -c " - export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 - cd ${DEST_DIR} - ${BUNDLE} exec rake assets:clean RAILS_ENV=production - ${BUNDLE} exec rake assets:precompile RAILS_ENV=production" \ - || die "failed to run assets:clean and assets:precompile" - - elog " Gitlab server migration has completed" - - ## (Re-)Link current gitlabhq into "${GIT_HOME}"/gitlab - if [[ ! -L "${GIT_HOME}"/gitlab ]];then - einfo "symlink ${GIT_HOME}/gitlab not present" - ln -s "${DEST_DIR}" "${GIT_HOME}"/gitlab - else - if [[ ! `readlink -f "${GIT_HOME}"/gitlab` == "${DEST_DIR}" ]];then - einfo "symlink ${GIT_HOME}/gitlab not valid" - unlink "${GIT_HOME}"/gitlab - ln -s "${DEST_DIR}" "${GIT_HOME}"/gitlab - fi - fi - else - if use postgres; then - elog " To be able configuring database with ruby will need to create following role for ${GIT_USER} user " - elog " su postgres" - elog " psql -c \"CREATE ROLE ${GIT_USER} PASSWORD 'gitlab' \\" - elog " SUPERUSER CREATEDB NOCREATEROLE INHERIT LOGIN;\"" - elog " Note: You should change your password to something more random..." - fi - if [[ ! -r "${GITLAB_SHELL}"/config.yml ]];then - elog "Process will fail because gitlab-shell has not been configured" - elog "" - elog "Copy ${GITLAB_SHELL}/config.yml.example to ${GITLAB_SHELL}/config.yml" - elog "and edit this file in order to configure your GitLab-Shell settings." - fi - elog "" - ## Check config files existence ## - einfo "Checking configuration files ..." - - einfo "Initial config setup ..." - if [ ! -r "${CONF_DIR}/database.yml" ] ; then - einfo "database.yml" - if use postgres; then - cp "${CONF_DIR}"/database.yml.postgresql "${CONF_DIR}"/database.yml ||die "failed to copy database config file" - fi - fi - if [ ! -r "${CONF_DIR}/gitlab.yml" ]; then - einfo "gitlab.yml" - cp "${CONF_DIR}"/gitlab.yml.example "${CONF_DIR}"/gitlab.yml ||die "failed to copy gitlab config file" - fi - if [ ! -r "${CONF_DIR}/resque.yml" ]; then - einfo "resque.yml" - cp "${CONF_DIR}"/resque.yml.example "${CONF_DIR}"/resque.yml ||die "failed to copy resque config file" - fi - if [ ! -r "${CONF_DIR}/unicorn.rb" ]; then - einfo "unicorn.rb" - cp "${CONF_DIR}"/unicorn.rb.example "${CONF_DIR}"/unicorn.rb ||die "failed to copy unicorn ruby file" - fi - if [ ! -r "${CONF_DIR}/initializers/rack_attack.rb" ]; then - einfo "rack_attack.rb" - cp "${CONF_DIR}"/initializers/rack_attack.rb.example "${CONF_DIR}"/initializers/rack_attack.rb ||die "failed to copy rack_attack ruby file" - fi - ## (Re-)Link current gitlabhq into "${GIT_HOME}"/gitlab - if [[ ! -L "${GIT_HOME}"/gitlab ]];then - einfo "symlink ${GIT_HOME}/gitlab not present" - ln -s "${DEST_DIR}" "${GIT_HOME}"/gitlab - else - if [[ ! `readlink -f "${GIT_HOME}"/gitlab` == "${DEST_DIR}" ]];then - einfo "symlink ${GIT_HOME}/gitlab not valid" - unlink "${GIT_HOME}"/gitlab - ln -s "${DEST_DIR}" "${GIT_HOME}"/gitlab - fi - fi - if [ ! -d ${DEST_DIR}/node_modules/pikaday ]; then - ## fix a BUG where node_modules/pikaday is required - cd ${DEST_DIR} - npm install pikaday - cd - - fi - einfo "Initializing database ..." - su -l ${GIT_USER} -s /bin/sh -c " - export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 - cd ${DEST_DIR} - ${BUNDLE} exec rake gitlab:setup RAILS_ENV=${RAILS_ENV}" \ - || die "failed to run rake gitlab:setup" - einfo "Clear and precompile assets ..." - su -l ${GIT_USER} -s /bin/sh -c " - export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 - cd ${DEST_DIR} - ${BUNDLE} exec rake assets:clean RAILS_ENV=production - ${BUNDLE} exec rake assets:precompile RAILS_ENV=production" \ - || die "failed to run assets:clean and assets:precompile" - if use postgres; then - elog " We can increase security of database by changing permission for ${GIT_USER} user " - elog " su postgres" - elog " psql -c \"ALTER USER ${GIT_USER} \\" - elog " NOSUPERUSER NOCREATEDB ;\"" - fi - - fi - ## (Re-)Link gitlab-shell-secret into gitlab-shell - if test -L "${GITLAB_SHELL}/.gitlab_shell_secret" - then - rm "${GITLAB_SHELL}/.gitlab_shell_secret" - ln -s "${DEST_DIR}/.gitlab_shell_secret" "${GITLAB_SHELL}/.gitlab_shell_secret" - fi - - # fix repository permissions - einfo "### fix permission ###" - chown -R ${GIT_USER}:${GIT_GROUP} "${DEST_DIR}" "${CONF_DIR}" "${GITLAB_TMP}" "${GITLAB_LOGS}" - chmod -R ug+rwX,o-rwx "${GIT_REPOS}" - chmod -R ug-s "${GIT_REPOS}" - find "${GIT_REPOS}" -type d -print0 | xargs -0 chmod g+s - - einfo "You might want to run the following in order to check your application status:" - einfo "# cd ${DEST_DIR} && sudo -u ${GIT_USER} ${BUNDLE} exec rake gitlab:check RAILS_ENV=production" - einfo "" - einfo "GitLab is prepared, now you should configure your web server." -} diff --git a/www-servers/gitlab-gitaly/files/config.toml b/www-servers/gitlab-gitaly/files/config.toml deleted file mode 100644 index a89f1ca1ebe8450da1cc10265a1b9f215a8f1e8e..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-gitaly/files/config.toml +++ /dev/null @@ -1,36 +0,0 @@ -# Example Gitaly configuration file - -socket_path = "/home/git/gitlab/tmp/sockets/gitaly.socket" - -# # Optional: listen on a TCP socket. This is insecure (no authentication) -# listen_addr = "localhost:9999" -# - -# # Optional: export metrics via Prometheus -# prometheus_listen_addr = "localhost:9236" -# - -# # Git executable settings -# [git] -# bin_path = "/usr/bin/git" - -[[storage]] -name = "default" -path = "/home/git/repositories" - -# # You can optionally configure more storages for this Gitaly instance to serve up -# -# [[storage]] -# name = "other_storage" -# path = "/mnt/other_storage/repositories" -# - -# # You can optionally configure Gitaly to output JSON-formatted log messages to stdout -# [logging] -# format = "json" -# # Additionally exceptions can be reported to Sentry -# sentry_dsn = "https://<key>:<secret>@sentry.io/<project>" - -# # You can optionally configure Gitaly to record histogram latencies on GRPC method calls -# [prometheus] -# grpc_latency_buckets = [0.001, 0.005, 0.025, 0.1, 0.5, 1.0, 10.0, 30.0, 60.0, 300.0, 1500.0] diff --git a/www-servers/gitlab-gitaly/files/gitlab-gitaly-0.11.2.conf b/www-servers/gitlab-gitaly/files/gitlab-gitaly-0.11.2.conf deleted file mode 100644 index 9b0626e99b56eb0675f01c9c59d045e40e2be141..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-gitaly/files/gitlab-gitaly-0.11.2.conf +++ /dev/null @@ -1,8 +0,0 @@ -CONFIGFILE=/etc/gitlab/gitaly-config.toml -RUNAS_USER=git -RUNAS_GROUP=${RUNAS_USER} -LOGFILE=/var/log/gitlab/gitlab-gitaly.log - -# This must match the setting in /etc/gitlab/gitaly-config.toml -# If not using a socket, simply comment out or delete the next line. -SOCKETDIR="/home/git/gitlab/tmp/sockets/" diff --git a/www-servers/gitlab-gitaly/files/gitlab-gitaly-0.11.2.init b/www-servers/gitlab-gitaly/files/gitlab-gitaly-0.11.2.init deleted file mode 100644 index 0f82d6a989bd0ee687f7698426488b1d9a235a2d..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-gitaly/files/gitlab-gitaly-0.11.2.init +++ /dev/null @@ -1,19 +0,0 @@ -#!/sbin/openrc-run - -start() { - ebegin "Starting gitlab-gitaly" - - checkpath -f -m 640 -o ${RUNAS_USER}:${RUNAS_GROUP} ${LOGFILE} - [ -z "${SOCKETDIR}" ] || checkpath -d -m 700 -o ${RUNAS_USER}:${RUNAS_GROUP} ${SOCKETDIR} - - start-stop-daemon --start --exec /usr/bin/gitlab-gitaly --pidfile /run/gitlab-gitaly.pid \ - --make-pidfile --background --user ${RUNAS_USER}:${RUNAS_GROUP} --stdout "${LOGFILE}" --stderr "${LOGFILE}" \ - -- ${CONFIGFILE} - eend $? -} - -stop() { - ebegin "Stopping gitlab-gitaly" - start-stop-daemon --stop --exec /usr/bin/gitlab-gitaly --pidfile /run/gitlab-gitaly.pid --user ${RUNAS_USER}:${RUNAS_GROUP} - eend $? -} diff --git a/www-servers/gitlab-gitaly/files/gitlab-gitaly-0.66.0.conf b/www-servers/gitlab-gitaly/files/gitlab-gitaly-0.66.0.conf deleted file mode 100644 index 03772163fcec86a6cb9e6a66cb9a8fc5b3ffd86f..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-gitaly/files/gitlab-gitaly-0.66.0.conf +++ /dev/null @@ -1,9 +0,0 @@ -CONFIGFILE=/etc/gitlab/gitaly-config.toml -RUNAS_USER=git -RUNAS_GROUP=${RUNAS_USER} -LOGFILE=/var/log/gitlab/gitlab-gitaly.log -PIDFILE=/run/gitlab/gitlab-gitaly.pid - -# This must match the setting in /etc/gitlab/gitaly-config.toml -# If not using a socket, simply comment out or delete the next line. -SOCKETDIR=/run/gitlab diff --git a/www-servers/gitlab-gitaly/files/gitlab-gitaly-0.66.0.init b/www-servers/gitlab-gitaly/files/gitlab-gitaly-0.66.0.init deleted file mode 100644 index 1828380e363d972af1350cb0551b640b442de688..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-gitaly/files/gitlab-gitaly-0.66.0.init +++ /dev/null @@ -1,20 +0,0 @@ -#!/sbin/openrc-run - -start() { - ebegin "Starting gitlab-gitaly" - - checkpath -f -m 640 -o ${RUNAS_USER}:${RUNAS_GROUP} "${LOGFILE}" - checkpath -d -m 700 -o ${RUNAS_USER}:${RUNAS_GROUP} "$(dirname ${PIDFILE})" - [ -z "${SOCKETDIR}" ] || checkpath -d -m 700 -o ${RUNAS_USER}:${RUNAS_GROUP} "${SOCKETDIR}" - - start-stop-daemon --start --exec /usr/bin/gitlab-gitaly --pidfile "${PIDFILE}" \ - --make-pidfile --background --user ${RUNAS_USER}:${RUNAS_GROUP} --stdout "${LOGFILE}" --stderr "${LOGFILE}" \ - -- ${CONFIGFILE} - eend $? -} - -stop() { - ebegin "Stopping gitlab-gitaly" - start-stop-daemon --stop --exec /usr/bin/gitlab-gitaly --pidfile "${PIDFILE}" --user ${RUNAS_USER}:${RUNAS_GROUP} - eend $? -} diff --git a/www-servers/gitlab-gitaly/gitlab-gitaly-0.3.0.ebuild b/www-servers/gitlab-gitaly/gitlab-gitaly-0.3.0.ebuild deleted file mode 100644 index 1166124cf10592eccf216c062637ac5e7d06664c..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-gitaly/gitlab-gitaly-0.3.0.ebuild +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -EGIT_REPO_URI="https://gitlab.com/gitlab-org/gitaly.git" -EGIT_COMMIT="v${PV}" - -inherit eutils git-r3 user - -DESCRIPTION="Gitaly is a Git RPC service for handling all the git calls made by GitLab." -HOMEPAGE="https://gitlab.com/gitlab-org/gitaly" -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~arm" -RESTRICT="splitdebug" -DEPEND=">=dev-lang/go-1.8.3" -RDEPEND="${DEPEND}" - -src_prepare() { - - # see https://gitlab.com/gitlab-org/gitaly/issues/493 - sed -i -s 's#LDFLAGS#GO_LDFLAGS#g' Makefile - sed -i -s 's|PREFIX=/usr/local|PREFIX := ${DESTDIR}/usr|g' Makefile -} - -src_install(){ - # Other cleanup candidates: a.out *.bin - - into "/usr" # This will install the binary to /usr/bin. Don't specify the "bin" folder! - newbin "gitaly" "gitlab-gitaly" - -} diff --git a/www-servers/gitlab-gitaly/gitlab-gitaly-0.35.0-r2.ebuild b/www-servers/gitlab-gitaly/gitlab-gitaly-0.35.0-r2.ebuild deleted file mode 100644 index b1fc52ff3b0593c859d6bf5d74b51df2377175e4..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-gitaly/gitlab-gitaly-0.35.0-r2.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -EGIT_REPO_URI="https://gitlab.com/gitlab-org/gitaly.git" -EGIT_COMMIT="v${PV}" - -inherit eutils git-r3 user - -DESCRIPTION="Gitaly is a Git RPC service for handling all the git calls made by GitLab." -HOMEPAGE="https://gitlab.com/gitlab-org/gitaly" -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~arm" -RESTRICT="splitdebug" -DEPEND=">=dev-lang/go-1.8.3" -RDEPEND="${DEPEND}" - -src_prepare() { - epatch "${FILESDIR}/0001-${PN}-0.23.0-fix-Makefile.patch" - - # see https://gitlab.com/gitlab-org/gitaly/issues/493 -sed -s 's#LDFLAGS#GO_LDFLAGS#g' -i Makefile || die -} - -src_install(){ - # Cleanup unneeded temp/object/source files - find ruby/vendor -name '*.[choa]' -delete - find ruby/vendor -name '*.[ch]pp' -delete - find ruby/vendor -iname 'Makefile' -delete - # Other cleanup candidates: a.out *.bin - - into "/usr" # This will install the binary to /usr/bin. Don't specify the "bin" folder! - newbin "gitaly" "gitlab-gitaly" - - insinto "/var/lib/gitlab-gitaly" - doins -r "ruby" - - # make binaries executable - exeinto "/var/lib/gitlab-gitaly/ruby/bin" - doexe "ruby/bin/"* - - exeinto /var/lib/gitlab-gitaly/ruby/vendor/bundle/ruby/*/bin/ - doexe ruby/vendor/bundle/ruby/*/bin/* - - insinto "/etc/gitaly" - newins "config.toml.example" "config.toml" -} diff --git a/www-servers/gitlab-gitaly/gitlab-gitaly-0.81.0.ebuild b/www-servers/gitlab-gitaly/gitlab-gitaly-0.81.0.ebuild deleted file mode 100644 index 69345f3482346b15cdbc5491e3c3e199ad63d1c8..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-gitaly/gitlab-gitaly-0.81.0.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -EGIT_REPO_URI="https://gitlab.com/gitlab-org/gitaly.git" -EGIT_COMMIT="v${PV}" - -inherit eutils git-r3 user - -DESCRIPTION="Gitaly is a Git RPC service for handling all the git calls made by GitLab." -HOMEPAGE="https://gitlab.com/gitlab-org/gitaly" -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~arm" - -DEPEND=">=dev-lang/go-1.8.3 - dev-ruby/bundler" -RDEPEND="${DEPEND}" - -src_prepare() { - epatch "${FILESDIR}/0001-${PN}-0.23.0-fix-Makefile.patch" - eapply_user -} - -src_install() -{ - # Cleanup unneeded temp/object/source files - find ruby/vendor -name '*.[choa]' -delete - find ruby/vendor -name '*.[ch]pp' -delete - find ruby/vendor -iname 'Makefile' -delete - # Other cleanup candidates: a.out *.bin - - into "/usr" # This will install the binary to /usr/bin. Don't specify the "bin" folder! - newbin "gitaly" "gitlab-gitaly" - - insinto "/var/lib/gitlab-gitaly" - doins -r "ruby" - - # make binaries executable - exeinto "/var/lib/gitlab-gitaly/ruby/bin" - doexe "ruby/bin/"* - - exeinto /var/lib/gitlab-gitaly/ruby/vendor/bundle/ruby/*/bin/ - doexe ruby/vendor/bundle/ruby/*/bin/* - - insinto "/etc/gitaly" - newins "config.toml.example" "config.toml" -} diff --git a/www-servers/gitlab-gitaly/gitlab-gitaly-0.38.0.ebuild b/www-servers/gitlab-gitaly/gitlab-gitaly-1.20.1.ebuild similarity index 65% rename from www-servers/gitlab-gitaly/gitlab-gitaly-0.38.0.ebuild rename to www-servers/gitlab-gitaly/gitlab-gitaly-1.20.1.ebuild index b1fc52ff3b0593c859d6bf5d74b51df2377175e4..f2d02934d704f18c45c38391aca50458c3da3d36 100644 --- a/www-servers/gitlab-gitaly/gitlab-gitaly-0.38.0.ebuild +++ b/www-servers/gitlab-gitaly/gitlab-gitaly-1.20.1.ebuild @@ -1,7 +1,8 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +# $Header: $ -EAPI="5" +EAPI=6 EGIT_REPO_URI="https://gitlab.com/gitlab-org/gitaly.git" EGIT_COMMIT="v${PV}" @@ -12,16 +13,27 @@ DESCRIPTION="Gitaly is a Git RPC service for handling all the git calls made by HOMEPAGE="https://gitlab.com/gitlab-org/gitaly" LICENSE="MIT" SLOT="0" +IUSE="rugged_use_system_libraries" KEYWORDS="~amd64 ~x86 ~arm" RESTRICT="splitdebug" -DEPEND=">=dev-lang/go-1.8.3" +DEPEND=">=dev-lang/go-1.8.3 + dev-libs/icu + dev-ruby/bundler + rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/27 )" RDEPEND="${DEPEND}" -src_prepare() { - epatch "${FILESDIR}/0001-${PN}-0.23.0-fix-Makefile.patch" - - # see https://gitlab.com/gitlab-org/gitaly/issues/493 -sed -s 's#LDFLAGS#GO_LDFLAGS#g' -i Makefile || die +pkg_setup(){ + use "rugged_use_system_libraries" && export RUGGED_USE_SYSTEM_LIBRARIES="YES" + } + +src_prepare() +{ + # See https://gitlab.com/gitlab-org/gitaly/issues/493 + sed -s 's#LDFLAGS#GO_LDFLAGS#g' -i Makefile || die + cd ruby + bundle config build.nokogumbo --with-ldflags='-Wl,--undefined' + cd - + eapply_user } src_install(){ diff --git a/www-servers/gitlab-pages/gitlab-pages-0.4.0.ebuild b/www-servers/gitlab-pages/gitlab-pages-0.4.0.ebuild deleted file mode 100644 index 273a5539c6508713daf4a5d11e0b6e0cba04ef5d..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-pages/gitlab-pages-0.4.0.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit eutils golang-build golang-vcs-snapshot user - -EGO_PN="gitlab.com/gitlab-org/gitlab-pages/..." - -MY_PV="v${PV/_/-}" -MY_GIT_HASH="fdcb2c9" - -DESCRIPTION="Simple HTTP server written in Go made to serve GitLab Pages with CNAMEs and SNI" -HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-pages" -SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=v${PV} -> ${P}.tar.bz2" - -KEYWORDS="~amd64 ~x86 ~arm ~arm64" -LICENSE="MIT" -SLOT="0/${PVR}" - -DEPEND=">=dev-lang/go-1.5" - -RESTRICT="test mirror" - -MY_USER="gitlab_pages" - -pkg_setup() { - enewgroup ${MY_USER} - enewuser ${MY_USER} -1 -1 -1 ${MY_USER} -} - -src_prepare() { - epatch "${FILESDIR}/0001-fix-Makefile-${PV}.patch" - - sed -i -E \ - -e "s/@@REVISION@@/${MY_GIT_HASH}/" \ - src/gitlab.com/gitlab-org/${PN}/Makefile - - eapply_user -} - -src_compile() { - emake GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" RELEASE=true -C src/${EGO_PN%/*} all -} - -src_install() { - golang-build_src_install - dobin bin/* - dodoc src/${EGO_PN%/*}/README.md src/${EGO_PN%/*}/CHANGELOG - - # rc script - local rcscript="${PN}-0.3.2.init" - - cp "${FILESDIR}/${rcscript}" "${T}" || die - sed -i \ - -e "s|@USER@|${MY_USER}|g" \ - "${T}/${rcscript}" \ - || die "failed to filter ${rcscript}" - - newinitd "${T}/${rcscript}" "${PN}" - newconfd "${FILESDIR}/${PN}-0.3.2.conf" "${PN}" -} - -pkg_postinst() { - elog - elog "If this is a fresh install of GitLab CI Multi Runner, please configure it" - elog "with the following command:" - elog " emerge --config \"=${CATEGORY}/${PF}\"" -} - -pkg_config() { - einfo "You need to register the runner with your GitLab CI instance. Please" - einfo "Follow the instructions at" - einfo - einfo "https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-manually.md" - einfo - einfo "Perhaps I'll improve the ebuild later ... kthxbye." -} diff --git a/www-servers/gitlab-pages/gitlab-pages-0.4.1.ebuild b/www-servers/gitlab-pages/gitlab-pages-0.4.1.ebuild deleted file mode 100644 index be4b880877709a13f809f44e08de6fde551a7801..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-pages/gitlab-pages-0.4.1.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit eutils golang-build golang-vcs-snapshot user - -EGO_PN="gitlab.com/gitlab-org/gitlab-pages/..." - -MY_PV="v${PV/_/-}" -MY_GIT_HASH="043be6d" - -DESCRIPTION="Simple HTTP server written in Go made to serve GitLab Pages with CNAMEs and SNI" -HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-pages" -SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=v${PV} -> ${P}.tar.bz2" - -KEYWORDS="~amd64 ~x86 ~arm ~arm64" -LICENSE="MIT" -SLOT="0/${PVR}" - -DEPEND=">=dev-lang/go-1.5" - -RESTRICT="test mirror" - -MY_USER="gitlab_pages" - -pkg_setup() { - enewgroup ${MY_USER} - enewuser ${MY_USER} -1 -1 -1 ${MY_USER} -} - -src_prepare() { - epatch "${FILESDIR}/0001-fix-Makefile-0.3.2.patch" - - sed -i -E \ - -e "s/@@REVISION@@/${MY_GIT_HASH}/" \ - src/gitlab.com/gitlab-org/${PN}/Makefile - - eapply_user -} - -src_compile() { - emake GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" RELEASE=true -C src/${EGO_PN%/*} all -} - -src_install() { - golang-build_src_install - dobin bin/* - dodoc src/${EGO_PN%/*}/README.md src/${EGO_PN%/*}/CHANGELOG - - # rc script - local rcscript="${PN}-0.3.2.init" - - cp "${FILESDIR}/${rcscript}" "${T}" || die - sed -i \ - -e "s|@USER@|${MY_USER}|g" \ - "${T}/${rcscript}" \ - || die "failed to filter ${rcscript}" - - newinitd "${T}/${rcscript}" "${PN}" - newconfd "${FILESDIR}/${PN}-0.3.2.conf" "${PN}" -} - -pkg_postinst() { - elog - elog "If this is a fresh install of GitLab CI Multi Runner, please configure it" - elog "with the following command:" - elog " emerge --config \"=${CATEGORY}/${PF}\"" -} - -pkg_config() { - einfo "You need to register the runner with your GitLab CI instance. Please" - einfo "Follow the instructions at" - einfo - einfo "https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-manually.md" - einfo - einfo "Perhaps I'll improve the ebuild later ... kthxbye." -} diff --git a/www-servers/gitlab-pages/gitlab-pages-0.4.2-r1.ebuild b/www-servers/gitlab-pages/gitlab-pages-0.4.2-r1.ebuild deleted file mode 100644 index f4e2cb7e533b2cdc26ad7d97ed1d829dedf1155f..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-pages/gitlab-pages-0.4.2-r1.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit eutils golang-build golang-vcs-snapshot user - -EGO_PN="gitlab.com/gitlab-org/gitlab-pages/..." - -MY_PV="v${PV/_/-}" -MY_GIT_HASH="dccd0f2" - -DESCRIPTION="Simple HTTP server written in Go made to serve GitLab Pages with CNAMEs and SNI" -HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-pages" -SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=v${PV} -> ${P}.tar.bz2" - -KEYWORDS="~amd64 ~x86 ~arm ~arm64" -LICENSE="MIT" -SLOT="0/${PVR}" - -DEPEND=">=dev-lang/go-1.5" - -RESTRICT="test mirror" - -MY_USER="gitlab_pages" - -pkg_setup() { - enewgroup ${MY_USER} - enewuser ${MY_USER} -1 -1 -1 ${MY_USER} -} - -src_prepare() { - epatch "${FILESDIR}/0001-fix-Makefile-0.3.2.patch" - - sed -i -E \ - -e "s/@@REVISION@@/${MY_GIT_HASH}/" \ - src/gitlab.com/gitlab-org/${PN}/Makefile - - eapply_user -} - -src_compile() { - emake GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" RELEASE=true -C src/${EGO_PN%/*} all -} - -src_install() { - golang-build_src_install - dobin bin/* - dodoc src/${EGO_PN%/*}/README.md src/${EGO_PN%/*}/CHANGELOG - - # rc script - local rcscript="${PN}-0.3.2.init" - - cp "${FILESDIR}/${rcscript}" "${T}" || die - sed -i \ - -e "s|@USER@|${MY_USER}|g" \ - "${T}/${rcscript}" \ - || die "failed to filter ${rcscript}" - - newinitd "${T}/${rcscript}" "${PN}" - newconfd "${FILESDIR}/${PN}-0.3.2.conf" "${PN}" -} diff --git a/www-servers/gitlab-pages/gitlab-pages-0.4.4.ebuild b/www-servers/gitlab-pages/gitlab-pages-0.4.4.ebuild deleted file mode 100644 index 41d33775d2d3df4579c62567249e8ab13b8587cd..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-pages/gitlab-pages-0.4.4.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit eutils golang-build golang-vcs-snapshot user - -EGO_PN="gitlab.com/gitlab-org/gitlab-pages/..." - -MY_PV="v${PV/_/-}" -MY_GIT_HASH="36f16fd" - -DESCRIPTION="Simple HTTP server written in Go made to serve GitLab Pages with CNAMEs and SNI" -HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-pages" -SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=v${PV} -> ${P}.tar.bz2" - -KEYWORDS="~amd64 ~x86 ~arm ~arm64" -LICENSE="MIT" -SLOT="0/${PVR}" - -DEPEND=">=dev-lang/go-1.8.3" - -RESTRICT="test mirror" - -MY_USER="gitlab_pages" - -pkg_setup() { - enewgroup ${MY_USER} - enewuser ${MY_USER} -1 -1 -1 ${MY_USER} -} - -src_prepare() { - epatch "${FILESDIR}/0001-fix-Makefile-0.3.2.patch" - - sed -i -E \ - -e "s/@@REVISION@@/${MY_GIT_HASH}/" \ - src/gitlab.com/gitlab-org/${PN}/Makefile - - eapply_user -} - -src_compile() { - emake GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" RELEASE=true -C src/${EGO_PN%/*} all -} - -src_install() { - golang-build_src_install - dobin bin/* - dodoc src/${EGO_PN%/*}/README.md src/${EGO_PN%/*}/CHANGELOG - - # rc script - local rcscript="${PN}-0.3.2.init" - - cp "${FILESDIR}/${rcscript}" "${T}" || die - sed -i \ - -e "s|@USER@|${MY_USER}|g" \ - "${T}/${rcscript}" \ - || die "failed to filter ${rcscript}" - - newinitd "${T}/${rcscript}" "${PN}" - newconfd "${FILESDIR}/${PN}-0.3.2.conf" "${PN}" -} diff --git a/www-servers/gitlab-pages/gitlab-pages-0.5.1.ebuild b/www-servers/gitlab-pages/gitlab-pages-0.5.1.ebuild deleted file mode 100644 index 719ad4932eff1358a215f2ec625e899aa0dec505..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-pages/gitlab-pages-0.5.1.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit eutils golang-build golang-vcs-snapshot user - -EGO_PN="gitlab.com/gitlab-org/gitlab-pages/..." - -MY_PV="v${PV/_/-}" -MY_GIT_HASH="243bdbc" - -DESCRIPTION="Simple HTTP server written in Go made to serve GitLab Pages with CNAMEs and SNI" -HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-pages" -SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=v${PV} -> ${P}.tar.bz2" - -KEYWORDS="~amd64 ~x86 ~arm ~arm64" -LICENSE="MIT" -SLOT="0/${PVR}" - -DEPEND=">=dev-lang/go-1.8.3" - -RESTRICT="test mirror" - -MY_USER="gitlab_pages" - -pkg_setup() { - enewgroup ${MY_USER} - enewuser ${MY_USER} -1 -1 -1 ${MY_USER} -} - -src_prepare() { - epatch "${FILESDIR}/0001-fix-Makefile-0.3.2.patch" - - sed -i -E \ - -e "s/@@REVISION@@/${MY_GIT_HASH}/" \ - src/gitlab.com/gitlab-org/${PN}/Makefile - - eapply_user -} - -src_compile() { - emake GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" RELEASE=true -C src/${EGO_PN%/*} all -} - -src_install() { - golang-build_src_install - dobin bin/* - dodoc src/${EGO_PN%/*}/README.md src/${EGO_PN%/*}/CHANGELOG - - # rc script - local rcscript="${PN}-0.3.2.init" - - cp "${FILESDIR}/${rcscript}" "${T}" || die - sed -i \ - -e "s|@USER@|${MY_USER}|g" \ - "${T}/${rcscript}" \ - || die "failed to filter ${rcscript}" - - newinitd "${T}/${rcscript}" "${PN}" - newconfd "${FILESDIR}/${PN}-0.3.2.conf" "${PN}" -} diff --git a/www-servers/gitlab-workhorse/gitlab-workhorse-1.1.1.ebuild b/www-servers/gitlab-workhorse/gitlab-workhorse-1.1.1.ebuild deleted file mode 100644 index 02c642f390dfab663940dcb7258a6915f5a8634b..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-workhorse/gitlab-workhorse-1.1.1.ebuild +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="5" - -EGIT_REPO_URI="https://gitlab.com/gitlab-org/gitlab-workhorse.git" -EGIT_COMMIT="v${PV}" - -inherit eutils git-2 user - -DESCRIPTION="Handles slow HTTP requests for GitLab" -HOMEPAGE="https://about.gitlab.com/gitlab-workhorse/" -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 x86" - -DEPEND=">=dev-lang/go-1.5.1" -RDEPEND="${DEPEND}" - -src_install() -{ - into "/usr" - dobin "gitlab-workhorse" -} diff --git a/www-servers/gitlab-workhorse/gitlab-workhorse-1.4.2.ebuild b/www-servers/gitlab-workhorse/gitlab-workhorse-1.4.2.ebuild deleted file mode 100644 index 7563e26cad039a1b68f639e3c9f0039328f2e0ea..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-workhorse/gitlab-workhorse-1.4.2.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit eutils user - -DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab >= 9.0.13" -HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-workhorse" -SRC_URI="https://gitlab.com/gitlab-org/${PN}/-/archive/v${PV}/${P}.tar.bz2" - -MY_GIT_COMMIT="a0f050c8fc680faa2c758c11ad2815cfe367db44" -S="${WORKDIR}/${PN}-v${PV}-${MY_GIT_COMMIT}" -RESTRICT="mirror" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~arm ~arm64" - -DEPEND=">=dev-lang/go-1.5.1" - -src_prepare() { - epatch "${FILESDIR}/0001-fix-Makefile.patch" - sed -i -e "s/@@VERSION@@/${PV}/" Makefile - eapply_user -} - -src_install() { - local dest=/usr/bin - - diropts -m755 - dodir ${dest} - - exeinto ${dest} - for f in "${PN}" gitlab-zip-cat gitlab-zip-metadata ; do - doexe "${S}/${f}" - done - - ## RC script ## - newinitd "${FILESDIR}/${PN}-0.8.2.init" "${PN}" - newconfd "${FILESDIR}/${PN}-0.8.2.conf" "${PN}" -} diff --git a/www-servers/gitlab-workhorse/gitlab-workhorse-1.4.3.ebuild b/www-servers/gitlab-workhorse/gitlab-workhorse-1.4.3.ebuild deleted file mode 100644 index d62e920bf4f8ddeee5cdc7151748a4313266f522..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-workhorse/gitlab-workhorse-1.4.3.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit eutils user - -DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab >= 8.4" -HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-workhorse" -SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=v${PV} -> ${P}.tar.bz2" - -MY_GIT_COMMIT="97d3583a6b36f8c267680c826bced98a43ba95f7" -S="${WORKDIR}/${PN}-v${PV}-${MY_GIT_COMMIT}" -RESTRICT="mirror" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~arm ~arm64" - -DEPEND=">=dev-lang/go-1.5.1" - -src_prepare() { - epatch "${FILESDIR}/0001-fix-Makefile.patch" - sed -i -e "s/@@VERSION@@/${PV}/" Makefile - eapply_user -} - -src_install() { - local dest=/usr/bin - - diropts -m755 - dodir ${dest} - - exeinto ${dest} - for f in "${PN}" gitlab-zip-cat gitlab-zip-metadata ; do - doexe "${S}/${f}" - done - - ## RC script ## - newinitd "${FILESDIR}/${PN}-0.8.2.init" "${PN}" - newconfd "${FILESDIR}/${PN}-0.8.2.conf" "${PN}" -} diff --git a/www-servers/gitlab-workhorse/gitlab-workhorse-2.0.0.ebuild b/www-servers/gitlab-workhorse/gitlab-workhorse-2.0.0.ebuild deleted file mode 100644 index d81b6b58c77a423a11e086eb55b8d123f7fde3f9..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-workhorse/gitlab-workhorse-2.0.0.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit eutils user - -DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab >= 8.4" -HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-workhorse" -SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=v${PV} -> ${P}.tar.bz2" - -MY_GIT_COMMIT="eacd5b7aff7cc1b51a2409d8645dfc61904f308c" -S="${WORKDIR}/${PN}-v${PV}-${MY_GIT_COMMIT}" -RESTRICT="mirror" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~arm ~arm64" - -DEPEND=">=dev-lang/go-1.5.1" - -src_prepare() { - epatch "${FILESDIR}/0001-fix-Makefile.patch" - sed -i -e "s/@@VERSION@@/${PV}/" Makefile - eapply_user -} - -src_install() { - local dest=/usr/bin - - diropts -m755 - dodir ${dest} - - exeinto ${dest} - for f in "${PN}" gitlab-zip-cat gitlab-zip-metadata ; do - doexe "${S}/${f}" - done - - ## RC script ## - newinitd "${FILESDIR}/${PN}-0.8.2.init" "${PN}" - newconfd "${FILESDIR}/${PN}-0.8.2.conf" "${PN}" -} diff --git a/www-servers/gitlab-workhorse/gitlab-workhorse-2.1.1.ebuild b/www-servers/gitlab-workhorse/gitlab-workhorse-2.1.1.ebuild deleted file mode 100644 index 6b30847d4f021007607ec09d1ef59d9ce174c958..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-workhorse/gitlab-workhorse-2.1.1.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit eutils user - -DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab >= 8.4" -HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-workhorse" -SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=v${PV} -> ${P}.tar.bz2" - -MY_GIT_COMMIT="e36227d823ff623a60a44281538f139f6864f683" -S="${WORKDIR}/${PN}-v${PV}-${MY_GIT_COMMIT}" -RESTRICT="mirror" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~arm ~arm64" - -DEPEND=">=dev-lang/go-1.8.3" - -src_prepare() { - epatch "${FILESDIR}/0001-fix-Makefile.patch" - sed -i -e "s/@@VERSION@@/${PV}/" Makefile - eapply_user -} - -src_install() { - local dest=/usr/bin - - diropts -m755 - dodir ${dest} - - exeinto ${dest} - for f in "${PN}" gitlab-zip-cat gitlab-zip-metadata ; do - doexe "${S}/${f}" - done - - ## RC script ## - newinitd "${FILESDIR}/${PN}-0.8.2.init" "${PN}" - newconfd "${FILESDIR}/${PN}-0.8.2.conf" "${PN}" -} diff --git a/www-servers/gitlab-workhorse/gitlab-workhorse-2.3.0.ebuild b/www-servers/gitlab-workhorse/gitlab-workhorse-2.3.0.ebuild deleted file mode 100644 index 4e10713c75c05db2045db0dba0296f079a2c0700..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-workhorse/gitlab-workhorse-2.3.0.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit eutils user - -DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab >= 8.4" -HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-workhorse" -SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=v${PV} -> ${P}.tar.bz2" - -MY_GIT_COMMIT="23e62f5114c7427917f9e1ef336ba227f1543192" -S="${WORKDIR}/${PN}-v${PV}-${MY_GIT_COMMIT}" -RESTRICT="mirror" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~arm ~arm64" - -DEPEND=">=dev-lang/go-1.8.3" - -src_prepare() { - epatch "${FILESDIR}/0001-fix-Makefile.patch" - sed -i -e "s/@@VERSION@@/${PV}/" Makefile - eapply_user -} - -src_install() { - local dest=/usr/bin - - diropts -m755 - dodir ${dest} - - exeinto ${dest} - for f in "${PN}" gitlab-zip-cat gitlab-zip-metadata ; do - doexe "${S}/${f}" - done - - ## RC script ## - newinitd "${FILESDIR}/${PN}-0.8.2.init" "${PN}" - newconfd "${FILESDIR}/${PN}-0.8.2.conf" "${PN}" -} diff --git a/www-servers/gitlab-workhorse/gitlab-workhorse-3.0.0.ebuild b/www-servers/gitlab-workhorse/gitlab-workhorse-3.0.0.ebuild deleted file mode 100644 index 626d81ff4449590cc787c279155a37c5b7622dd4..0000000000000000000000000000000000000000 --- a/www-servers/gitlab-workhorse/gitlab-workhorse-3.0.0.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit eutils user - -DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab 9.X - 10.0" -HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-workhorse" -SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=v${PV} -> ${P}.tar.bz2" - -MY_GIT_COMMIT="e6cfe0c0c6aafe639cdf2c362eab860053bc07cb" -S="${WORKDIR}/${PN}-v${PV}-${MY_GIT_COMMIT}" -RESTRICT="mirror" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~arm ~arm64" - -DEPEND=">=dev-lang/go-1.8.3" - -src_prepare() { - epatch "${FILESDIR}/0001-fix-Makefile.patch" - sed -i -e "s/@@VERSION@@/${PV}/" Makefile - eapply_user -} - -src_install() { - local dest=/usr/bin - - diropts -m755 - dodir ${dest} - - exeinto ${dest} - for f in "${PN}" gitlab-zip-cat gitlab-zip-metadata ; do - doexe "${S}/${f}" - done - - ## RC script ## - newinitd "${FILESDIR}/${PN}-0.8.2.init" "${PN}" - newconfd "${FILESDIR}/${PN}-0.8.2.conf" "${PN}" -} diff --git a/www-servers/gitlab-workhorse/gitlab-workhorse-0.7.5.ebuild b/www-servers/gitlab-workhorse/gitlab-workhorse-8.3.3.ebuild similarity index 69% rename from www-servers/gitlab-workhorse/gitlab-workhorse-0.7.5.ebuild rename to www-servers/gitlab-workhorse/gitlab-workhorse-8.3.3.ebuild index 1d52b2e94a6437ee5cf62a7b87dc157e18f7e8f2..660eb601a896f77c40e778c6d00c91382f46146f 100644 --- a/www-servers/gitlab-workhorse/gitlab-workhorse-0.7.5.ebuild +++ b/www-servers/gitlab-workhorse/gitlab-workhorse-8.3.3.ebuild @@ -2,24 +2,26 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI="5" +EAPI=6 EGIT_REPO_URI="https://gitlab.com/gitlab-org/gitlab-workhorse.git" EGIT_COMMIT="v${PV}" -inherit eutils git-2 user +inherit git-r3 DESCRIPTION="Handles slow HTTP requests for GitLab" HOMEPAGE="https://about.gitlab.com/gitlab-workhorse/" LICENSE="MIT" SLOT="0" -KEYWORDS="amd64 x86 ~arm" +KEYWORDS="~amd64 ~x86 ~arm" -DEPEND=">=dev-lang/go-1.5.1" +DEPEND=">=dev-lang/go-1.9.0" RDEPEND="${DEPEND}" src_install() { - into "/usr" - dobin "gitlab-workhorse" + into "/usr" + dobin "gitlab-workhorse" + dobin "gitlab-zip-cat" + dobin "gitlab-zip-metadata" }