From ce2380ff6844a22e945daa97780b2bf0e4c02f69 Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Thu, 14 Jan 2016 21:50:57 +0100 Subject: [PATCH 1/4] added ebuild for www-apps/gitlab-ce-8.3.4 and dev-vcs/gitlab-workhorse-0.5.4 --- dev-vcs/gitlab-workhorse/Manifest | 3 + .../files/fix-Makefile-0.5.4.patch | 16 + .../gitlab-workhorse-0.5.4.ebuild | 38 ++ www-apps/gitlab-ce/Manifest | 2 + www-apps/gitlab-ce/gitlab-ce-8.3.4.ebuild | 370 ++++++++++++++++++ 5 files changed, 429 insertions(+) create mode 100644 dev-vcs/gitlab-workhorse/files/fix-Makefile-0.5.4.patch create mode 100644 dev-vcs/gitlab-workhorse/gitlab-workhorse-0.5.4.ebuild create mode 100644 www-apps/gitlab-ce/gitlab-ce-8.3.4.ebuild diff --git a/dev-vcs/gitlab-workhorse/Manifest b/dev-vcs/gitlab-workhorse/Manifest index 21946e4..17afb2d 100644 --- a/dev-vcs/gitlab-workhorse/Manifest +++ b/dev-vcs/gitlab-workhorse/Manifest @@ -1,9 +1,12 @@ AUX fix-Makefile-0.4.2.patch 508 SHA256 970bb7ce34fd846902ad83394e929f7162d3c33ddf8307f0538e1f3fb9d1b59f SHA512 77ef8cd1781a1dcd86483ec53db72ad31ea00556c96831f6f4af39c010a4075b503cf5c6a62c787139f92ab651f9a8fefecb8bdab6da38f9a139f89e96c15c86 WHIRLPOOL 33ee8956a2497f7a324f6970e3a8ec83ced3a2364593ce1272cc665c761f2d83a2ab6b73062a333216acb9d345108672181323c3228d94fd1630c29ef4c533e3 AUX fix-Makefile-0.5.1.patch 508 SHA256 f63fe5302487d698212b52984f3f51efb3a6768558ae8927044c6a84f1814bc0 SHA512 27916751eda48b5cf4b8a3d650c74ca5031462fec14648a7535def6ebd321d49e1104b84f916109b5fdccdd90f9ee42fdbec587e3ee52f9c649fb49caac283e6 WHIRLPOOL 6f04c95575233eadd8b5f4d3e0ce564591d12e279d9827383292296d118dfc8670e239e2aaa74a3c132cc205b4d6214cb54edc983a5d2270dc005720955c805a +AUX fix-Makefile-0.5.4.patch 508 SHA256 3d0eefeafabef0043d9952ba03890fe241cecdbe20354827e187778cf65aea60 SHA512 16c2ae7f5117590bb4f794ac9aa85aa6e66c2edb01219f339d6db8dc91871bf6331e81bec93ce51d0aee5b5e6ef487d3d33a7f33901aafb036035da2444b9bf2 WHIRLPOOL ed054321aba5c546bda4f15750373546fa0ff9b951ee6d901bb7d73d69b3a933583d5897c2ef397348655a3fe6c0e3d4106e645d3ae2cc9e4348b316df82168f AUX gitlab-workhorse.conf 248 SHA256 6d11d63aa869cfd8c6f77c3a875984c226db633be899ad7ce97fafe94236eee7 SHA512 234213c8361702bdfeea40bd306b5899de19f34ce985e090a86e01aa601cf4ed23da4dfb75f74fe5986bbea5535a7a6a745406b4f67f79d352bd1c863777c7f1 WHIRLPOOL 8ac1134cde3aee942466d206e703ebd5330f83537d7e29641447f812d857bcc57b07fbf82eab086c0d622750694f64fabf8ffca2ba26a725f61b40fd1941e963 AUX gitlab-workhorse.init 653 SHA256 f38c37ed818cb8c25fb800bfcb5448f659e876b78ea33ea7a1ba3c80e73ea95e SHA512 2667997def39e6dc17e6a1d9be06d6e855d5d3e956e64d93bb3e74bbad0a1d427dc034f9c139f3b05e2666abab014404b2c8013c5347f4ec25fbf5ef86e7e88e WHIRLPOOL 63cd7ff80d88676b44c2d6ccdadf74907d5f8e4268f03ee11775c423bf95955f9d3aaeedd79fa6e0486b2d225336eb2ffa165dd7b9ac87ed0c2d403dc7e5afb4 DIST gitlab-workhorse-0.4.2.tar.bz2 14206 SHA256 09bd196334c2cde6e86a905df23ad904aaea7f01915b23c7e36cbff40fd0e14d SHA512 dcd2081786729ebcdd19aa1b5763a3ab4cf3e834ba0198827e354f610cbd338367229c2a57576413a3b18ab09a5fb1467eb0c9fe825830269a8990b662bce01a WHIRLPOOL 749803ad942e58e6dcf55dc4dcddf788591af7fe56729c946991e38c70f54aac65b3ba282e9a0106c9e717213ba70ba9c754257aee6bc5fedb3471eb333db4d6 DIST gitlab-workhorse-0.5.1.tar.bz2 18396 SHA256 fe5170da871cb48136f35f90963242fe64871185cbf3fcf13129a7f98ff1fc97 SHA512 5d46b047f2aeb7cf174bc3cd5d13e9d6595ddfb2cd80fa174733e3948903552995c4b6ebc2da27a24f50bbb00bf7da44a12b71acb49d90abfe245d2f59a6a3e6 WHIRLPOOL 43ee51fe5db55f1459c0e45ab867cb78f055f811be515af2ba272915df0cd894b899ab9ef9b11e8a53803c1156739d3057fb8d09b9bc3cf36973728dd4a44c8a +DIST gitlab-workhorse-0.5.4.tar.bz2 19488 SHA256 aae86bff51ab421a2e529c45c5d3f9223d2ebc23b9a6326416dac9998185488e SHA512 ba555f6aff07826281991cbb66bd2b1f4b92cf3ecb02a6e9f12120e01cd7846eb33eebef3f7fc2e7a531cd498f576d9f2e4529358e0d88b11103f0cd22208d40 WHIRLPOOL 1bbec15e69c674f1fa9205ea74cb8555ff97b3d71dad2815389d8953cc7cfdfdda61bd2e5b36ed871ded913b834546571ab12fee883bfc0f39878d68f84a5135 EBUILD gitlab-workhorse-0.4.2.ebuild 866 SHA256 b4377c171ea120bd743f5f7edd222d45260d6fbc290cb263f2e72944335033ce SHA512 24d2c0cb6b71723e8f6349db1b7a501e77a428455506273dd840f715beaf2cb057da0807677a01cde18e4fe3cf98ed7823e83b88a4f4b7711723eef7eaebe20b WHIRLPOOL ec42a052573f4654f808ad7ecffef8f67eb25599127223cf3690cf3e4156f197fac511c4540412394645186ee45a7f4ffee71aeb1803522d57daaa823217d878 EBUILD gitlab-workhorse-0.5.1.ebuild 866 SHA256 188539bf1d1f156a37f5044058508e9140f80e648fccdba3c438307a73f14fb9 SHA512 6f8dd6210a522a87e72795ea6b78d4b6a825b8ba6c610c30e04676980ffe49db5e5199d780284ff778e7ba75a633406c95762f16d55b5c15e8d881a3ad8ba567 WHIRLPOOL f713e415daaa8d654b334ed6d991446b6d600192867d6f93e02f9196d1c5454abce92022668ab49e2cc1f084c79da43a6b65d120cec6e627a7dc6f5eaccda651 +EBUILD gitlab-workhorse-0.5.4.ebuild 866 SHA256 93c056d8226ecd39b57a00e3df876204675b9f0baf3593a2ad9fbe09156a5f81 SHA512 aeb2b5537e0901418554532ef810597aa40b56aa5755b9d7d38d49c3f30f2ed6c1b59b3ae82c97eda4711c76e113245270f556a58f883a6a9aa5d966d0ed429f WHIRLPOOL 9a20dbc894930bcb10f0dc1cce940fd097ac44929ab1c98dbe46ed57c9b319c761306383a642b094cd84d17737a9433d5775c066344190d45bc18554a6f07f47 MISC metadata.xml 234 SHA256 f35b97f99a26d73cc441e1d93bfe25aaa4e9f7f6d90c8d05a74f7b7bc5b68472 SHA512 59d8156b3ca3e99c40d5a2a32de7edf2eb53279b2424998862589d6bad77617d23fc852afec0a92f8ac5bb54a88ebc504cc0641029c1936412e90ab03dfdd447 WHIRLPOOL 935a1401910a42f888c991e443a49275ea8b87976c5aa977f670053d97d18754231749749bc92d37d4b5f45ecf65914480942a11b5827b6c08fb24313a428431 diff --git a/dev-vcs/gitlab-workhorse/files/fix-Makefile-0.5.4.patch b/dev-vcs/gitlab-workhorse/files/fix-Makefile-0.5.4.patch new file mode 100644 index 0000000..68696bf --- /dev/null +++ b/dev-vcs/gitlab-workhorse/files/fix-Makefile-0.5.4.patch @@ -0,0 +1,16 @@ +diff --git a/Makefile b/Makefile +index c2c8c59..419f4d8 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,8 @@ +-PREFIX=/usr/local +-VERSION=$(shell git describe)-$(shell date -u +%Y%m%d.%H%M%S) ++PREFIX=${DESTDIR}/usr ++VERSION=0.5.4-$(shell date -u +%Y%m%d.%H%M%S) + + gitlab-workhorse: $(wildcard *.go) +- go build -ldflags "-X main.Version ${VERSION}" -o gitlab-workhorse ++ go build -ldflags "-X main.Version=${VERSION}" -o gitlab-workhorse + + install: gitlab-workhorse + install gitlab-workhorse ${PREFIX}/bin/ diff --git a/dev-vcs/gitlab-workhorse/gitlab-workhorse-0.5.4.ebuild b/dev-vcs/gitlab-workhorse/gitlab-workhorse-0.5.4.ebuild new file mode 100644 index 0000000..69c08d3 --- /dev/null +++ b/dev-vcs/gitlab-workhorse/gitlab-workhorse-0.5.4.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils user + +DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab >= 8.2" +HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-workhorse" +SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=${PV} -> ${P}.tar.bz2" +S="${WORKDIR}/${P}-58957d60b525e83663f48b119b82160be604111c" +RESTRICT="mirror" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=">=dev-lang/go-1.5.1 + !dev-vcs/gitlab-git-http-server" + +src_prepare() { + epatch "${FILESDIR}/fix-Makefile-${PV}.patch" +} + +src_install() { + local dest=/usr/bin + + diropts -m755 + dodir ${dest} + + exeinto ${dest} + doexe "${S}/${PN}" + + ## RC script ## + newinitd "${FILESDIR}/${PN}.init" "${PN}" + newconfd "${FILESDIR}/${PN}.conf" "${PN}" +} diff --git a/www-apps/gitlab-ce/Manifest b/www-apps/gitlab-ce/Manifest index 3bc6c91..a022bc6 100644 --- a/www-apps/gitlab-ce/Manifest +++ b/www-apps/gitlab-ce/Manifest @@ -19,10 +19,12 @@ DIST gitlab-ce-8.0.5.tar.gz 8238566 SHA256 476185a191bfe8757ca1a981419ff5d314491 DIST gitlab-ce-8.1.4.tar.gz 8761954 SHA256 619ac3b8c83ac2e3dfa81054b5ae0e76ae81497cf38587410504d6a603181897 SHA512 3973af3480f7e52dc64aec2ef99ff13cac9296fbbc76bfb59387416ee683099109fce361cd1619b4d3fa55032f7e1029b272e07cd15e0b6e353ac6f6c730f2bd WHIRLPOOL d3ce2dfaf013dbd99b023cf9d7ab3494d54d8628093761dd7b9cfe522ac8fb2c00a53d4534843dc292fa38ca1200f2dbe2c376efbd1c40e6e0ca1f9a31762936 DIST gitlab-ce-8.2.3.tar.gz 9961014 SHA256 470c10f267ad904ebd6228ccc5007092ab0fdc521277cc6f96ac98959a2b35c2 SHA512 77be97245a266536e1065e689b1e3183cda8b1800553a47f32c6e01d740537831898ec2ed86c9626a57c03e507e9d5d108afb5af0aba3623873973b71c842d7f WHIRLPOOL 44dcfeb1e5dc619e7e78fb7328e50bb3a4b0ac03b1ddbb1fa616e1c79491ce610def90c7bf0d1be541ae63870adc622765ce329e5ddbddafb103a810acdf45f5 DIST gitlab-ce-8.3.2.tar.gz 10683322 SHA256 87f6c27043058bba2d879c079f36a81f09f77c8e359ff7cf3bb0f5ebc4dca73e SHA512 a4d05cef4edcdd3ea07858eb52f1fa093a323d6586bcab9e5e2bd78320e56566c496146a89ed24410a551fa5d770a44b018636c11f55eae325cd6ec13de94f77 WHIRLPOOL 2bf74671e58d9f625c385ce2bcd8909bed828108deea17fd4bdbea7bf9d365dda14d1422699582a818fb656ab43cdea7f841c2334de152070dd2acac2f195e05 +DIST gitlab-ce-8.3.4.tar.gz 10255543 SHA256 15cc1644c05798deafb81be5ae4c313d2d1dc38475ba4b119a5f1d8e905f2c67 SHA512 ce29dbd0b64eee3353e5ea335a738fd0ccc2910167d1d1c4849e7403b91a3b058edb037746b04988a780937abf4fbc33dd769f89a965ec99e8f7042478016f2e WHIRLPOOL 7ed124eaf9ccc913bb18da6fd5f4702cbe756b7a175da6dade53ceb04f35794bd58c8492052b0074ed1fa82e0258213081900ce9157c1ad13eb6f7a18e7c6e2c EBUILD gitlab-ce-7.14.3.ebuild 10996 SHA256 a632476e8fe87ec1a478d2229f9e27cbe9e7cc86351e411d9f15105178a4c69f SHA512 a8646de0798d7dae299e500e0a42e6b093e229cb666614b895b979decb1d4b6b398ec2b2f1d19e07cc115f2acb16536426d1769b65412bc51349ac1b262b3053 WHIRLPOOL 2ba4e53846507899b3e6ebb38063e11ee92904262b8a6e00817ab50d6634ed0f0b1013f4a0d8a1cbb26e18c4008e5ab457d3cbd0fdc5f92e5c6214cb45c692f5 EBUILD gitlab-ce-8.0.5.ebuild 11185 SHA256 1240818953ae8f61b6c88c91c3c1dd32fb7d03c8a62964f5d3ad2e98ff5dad11 SHA512 fd411dd3cd8a4dd1ee0040438fe5da01f81ccf4f97b7b7b3157fcbb35bfacbfd0eda8754fb01e0061e6b0c5bd0e752b0eaff4d663d11b764623e7baafb4f56da WHIRLPOOL 9514cd8f83c7fbaba82b49352cb9b8e62d1a5317a09bfea85ce945abd1402e634a88f6eb033494729519ac6fc1282c18bfc8224b9bbe6f41ac89a1286b1d5d0a EBUILD gitlab-ce-8.1.4.ebuild 11177 SHA256 6b920132ff2c4926f2ed3edb3fff7cdf3e88c0314f8a0a9c077cdaae9fad4a0e SHA512 617656f6fd52d0c4751e0726983fc7d2c1532e8bc44761dbbe5bfb7f489e18ef66a68769bb0f7736c9d49d536e8103a5486e92869a9bba4d1aa92c4068eedf6e WHIRLPOOL 1c8a0968a1fa7b95ceb47f66610a72585666cc5b2f7f3157d1f5c04f98a2c89d79ac1875a28c57b3116105d2e0af17dabcecaa00159af42166565ae7fa88647e EBUILD gitlab-ce-8.2.3.ebuild 11149 SHA256 b9ea26478efe2bb798334178589f94c014550360bcce109af55cf9e9431519f1 SHA512 8cb298285f338c2f45a6b2048d597067ecdb51f3c70ab4c893810029b4773a20b7f058c4262019ae9f88cef5cbaf993726b653d5e214005495acb064bc00d83c WHIRLPOOL bbcfa2b53863fe887b2eaf62d1495463f1590eb5f04856dddb2d95f28a9cec377d29eeac04bb90eeaf8be657a7a71c73edac8ee5fc123f905b694aa2a50aeba9 EBUILD gitlab-ce-8.3.2.ebuild 11156 SHA256 3bbee882fafa3f1cf16e5e214c87bcadbb64c0abaf1566930aa548e5198cc361 SHA512 2794d6a92dbf5341c46b7b7504b9099fd3f350de0934599d3d8d59fd26c2515a88dbf850ac7e490929ab2cc897225c40696e98192e863549d3d5e677c5c96927 WHIRLPOOL 3083fec80d5cac025b0bc29fe2035e98e37b06bf7e54c5d54519171e052f7435fef38ac7f63030f828713b1af80e949fd7a117d421231fc01fff93837f885a3c +EBUILD gitlab-ce-8.3.4.ebuild 11156 SHA256 6a9d5dffb4228ef4ad3eda9429d9429ab7cc9ce64364d208b38bbd92d2fd5834 SHA512 e9cbfc68f80c737b0f605ac3db4861c50e4a304fec175db699c6eb24a1284180ea83e8a619abc3ba5808374f380d45b42986f646f8feb229af4a329807f2d817 WHIRLPOOL 2afd92aa67b7a8d7495db65830615fd6671b6b8366b2dd0492278e598ea069642c3d394fde77bd4fad6c5f0484f5d2bcb19c4b5a996a1af1db3e390a374653ab EBUILD gitlab-ce-9999.ebuild 11209 SHA256 64550d2d6bb5306df3c60a7e8b77562306ed2b41fb1045aaad3bbc6598916260 SHA512 d8ea512d408505362e464fd626490e676442c319029aaf07f34360b47c724fd017db52e0d3b713590dcc6253cc343e571fc7d9f6d2261445d1ae79e2d3c662db WHIRLPOOL 3e8366d75fe3c739b5a55942afd36acb456fa478500334de9bd8efd4f144bf59cad9c91643e7b99f7046a11c76003d52be1ba52f20fcb7e1802bb16e02080745 MISC metadata.xml 545 SHA256 1b7fc44d811e1ab7638fe4a40253f49d5f1071872d3020c22c4f67662750cb2f SHA512 86f47d297892bccfefa087d93936296f5647993a9ec8e3f47907a6859cbf385e5bc6f00502d7836c9e8d9efef2b6725bf145b0150924c2082b2bd164469ef6ea WHIRLPOOL 6bfb8a55684d68c8bfa6e025a0be965f7b815394ee0896dd2a13cfb524e3cf3f3149acc9072897e30a1842060389576aac07ea8beb4a8b0bfc3e8eab3723f2a1 diff --git a/www-apps/gitlab-ce/gitlab-ce-8.3.4.ebuild b/www-apps/gitlab-ce/gitlab-ce-8.3.4.ebuild new file mode 100644 index 0000000..944f881 --- /dev/null +++ b/www-apps/gitlab-ce/gitlab-ce-8.3.4.ebuild @@ -0,0 +1,370 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +# 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="ruby21" + +inherit eutils ruby-ng user systemd + +MY_PKGNAME="gitlabhq" + +DESCRIPTION="GitLab is a free project and repository management application" +HOMEPAGE="https://about.gitlab.com/" +SRC_URI="https://github.com/${MY_PKGNAME}/${MY_PKGNAME}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +RUBY_S="${MY_PKGNAME}-${PV}" + +RESTRICT="mirror" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="kerberos mysql +postgres +unicorn systemd rugged_use_system_libraries" + +## Gems dependencies: +# charlock_holmes dev-libs/icu +# grape, capybara dev-libs/libxml2, dev-libs/libxslt +# rugged dev-util/cmake, virtual/pkgconfig +# json dev-util/ragel +# pygments.rb python 2.7+ +# execjs net-libs/nodejs, or any other JS runtime +# pg dev-db/postgresql +# mysql virtual/mysql +# +GEMS_DEPEND=" + dev-libs/icu + dev-libs/libxml2 + dev-libs/libxslt + dev-util/ragel + net-libs/nodejs + postgres? ( >=dev-db/postgresql-9.1:* ) + mysql? ( virtual/mysql ) + kerberos? ( virtual/krb5 )" +CDEPEND=" + dev-util/cmake + virtual/pkgconfig" +DEPEND="${GEMS_DEPEND} + >=dev-vcs/gitlab-shell-2.6.9 + dev-vcs/git + ~dev-vcs/gitlab-workhorse-0.5.4 + kerberos? ( !app-crypt/heimdal ) + rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/23 )" +RDEPEND="${DEPEND} + >=dev-db/redis-2.8 + virtual/mta + systemd? ( sys-apps/systemd:0= )" +ruby_add_bdepend " + virtual/rubygems + >=dev-ruby/bundler-1.0" + +# +# fix-sendmail-config: +# Fix default settings to work with ssmtp that doesn't know '-t' argument. +# +RUBY_PATCHES=( + "${PN}-fix-sendmail-config.patch" +) + +MY_NAME="gitlab" +MY_USER="git" # should be same as in gitlab-shell + +DEST_DIR="/opt/${MY_NAME}" +CONF_DIR="/etc/${MY_NAME}" +LOGS_DIR="/var/log/${MY_NAME}" +TEMP_DIR="/var/tmp/${MY_NAME}" + +# When updating ebuild to newer version, check list of the queues in +# https://gitlab.com/gitlab-org/gitlab-ce/blob/v${PV}/bin/background_jobs +SIDEKIQ_QUEUES="post_receive,mailers,archive_repo,system_hook,project_web_hook,gitlab_shell,incoming_email,runner,common,default" + +all_ruby_prepare() { + # fix paths + local satellites_path="${TEMP_DIR}/repo_satellites" + local repos_path=/var/lib/git/repositories + local shell_path=/usr/share/gitlab-shell + sed -i -E \ + -e "/satellites:$/,/\w:$/ s|(\s*path:\s).*|\1${satellites_path}/|" \ + -e "/gitlab_shell:$/,/\w:$/ s|(\s*path:\s).*|\1${shell_path}/|" \ + -e "/gitlab_shell:$/,/\w:$/ s|(\s*repos_path:\s).*|\1${repos_path}/|" \ + -e "/gitlab_shell:$/,/\w:$/ s|(\s*hooks_path:\s).*|\1${shell_path}/hooks/|" \ + config/gitlab.yml.example || die "failed to filter gitlab.yml.example" + + local run_path=/run/${MY_NAME} + sed -i -E \ + -e "s|/home/git/gitlab/tmp/(pids\|sockets)|${run_path}|" \ + -e "s|/home/git/gitlab/log|${LOGS_DIR}|" \ + -e "s|/home/git/gitlab|${DEST_DIR}|" \ + config/unicorn.rb.example || die "failed to filter unicorn.rb.example" + + sed -i \ + -e "s|/home/git/gitlab/tmp/sockets|${run_path}|" \ + lib/support/nginx/gitlab || die "failed to filter nginx/gitlab" + + # modify default database settings for PostgreSQL + sed -i -E \ + -e 's|(username:).*|\1 gitlab|' \ + -e 's|(password:).*|\1 gitlab|' \ + -e 's|(socket:).*|\1 /run/postgresql/.s.PGSQL.5432|' \ + config/database.yml.postgresql \ + || die "failed to filter database.yml.postgresql" + + # rename config files + mv config/gitlab.yml.example config/gitlab.yml + mv config/unicorn.rb.example config/unicorn.rb + + local dbconf=config/database.yml + if use postgres && ! use mysql; then + mv ${dbconf}.postgresql ${dbconf} + rm ${dbconf}.mysql + elif use mysql && ! use postgres; then + mv ${dbconf}.mysql ${dbconf} + rm ${dbconf}.postgresql + fi + + # remove useless files + rm -r lib/support/{deploy,init.d} + use unicorn || rm config/unicorn.rb +} + +all_ruby_install() { + local dest=${DEST_DIR} + local conf=${CONF_DIR} + local logs=${LOGS_DIR} + local temp=${TEMP_DIR} + + # prepare directories + diropts -m750 + dodir ${logs} ${temp} + + diropts -m755 + dodir ${conf} ${dest}/public/uploads + + dosym ${temp} ${dest}/tmp + dosym ${logs} ${dest}/log + + # install configs + insinto ${conf} + doins -r config/* + dosym ${conf} ${dest}/config + + echo 'export RAILS_ENV=production' > "${D}/${dest}/.profile" + + # remove needless dirs + rm -Rf config tmp log + + # install the rest files + # using cp 'cause doins is slow + cp -Rl * "${D}/${dest}"/ + + # install logrotate config + dodir /etc/logrotate.d + cat > "${D}/etc/logrotate.d/${MY_NAME}" <<-EOF + ${logs}/*.log { + missingok + delaycompress + compress + copytruncate + } + EOF + + ## Install gems via bundler ## + + cd "${D}/${dest}" + + local without="development test aws" + local flag; for flag in mysql postgres unicorn kerberos; do + without+="$(use $flag || echo ' '$flag)" + done + local bundle_args="--deployment ${without:+--without ${without}}" + + use "rugged_use_system_libraries" && export RUGGED_USE_SYSTEM_LIBRARIES="YES" + + einfo "Running bundle install ${bundle_args} ..." + ${RUBY} /usr/bin/bundle install ${bundle_args} || die "bundler failed" + + # clean gems cache + rm -Rf vendor/bundle/ruby/*/cache + rm -Rf vendor/bundle/ruby/*/bundler/gems/charlock_holmes-dde194609b35/.git + + # fix permissions + fowners -R ${MY_USER}:${MY_USER} ${dest} ${temp} ${logs} + + ## RC script ## + + if use systemd ; then + ewarn "Beware: systemd support has not been tested, use at your own risk!" + systemd_dounit "${FILESDIR}/gitlab-sidekiq.service" + systemd_dounit "${FILESDIR}/gitlab-unicorn.service" + systemd_dounit "${FILESDIR}/gitlab-workhorse.service" + systemd_dounit "${FILESDIR}/gitlab-mailroom.service" + systemd_dotmpfilesd "${FILESDIR}/gitlab.conf" + else + local rcscript=gitlab-sidekiq-8.2.init + use unicorn && rcscript=gitlab-unicorn-8.2.init + + cp "${FILESDIR}/${rcscript}" "${T}" || die + sed -i \ + -e "s|@USER@|${MY_USER}|" \ + -e "s|@GITLAB_BASE@|${dest}|" \ + -e "s|@LOGS_DIR@|${logs}|" \ + -e "s|@QUEUES@|${SIDEKIQ_QUEUES}|" \ + "${T}/${rcscript}" \ + || die "failed to filter ${rcscript}" + + newinitd "${T}/${rcscript}" "${MY_NAME}" + fi +} + +pkg_postinst() { + elog "If this is an update from a previous version, stop your GitLab" + elog "instance and issue the following command to perform all required" + elog "migrations:" + elog " emerge --config \"=${CATEGORY}/${PF}\"" + elog "PLEASE NOTE: It's HIGHLY recommended to backup your database" + elog "before running the config phase!" + elog + elog "If this was a fresh install, follow these steps:" + elog + elog "1. Configure your GitLab's settings in ${CONF_DIR}/gitlab.yml." + elog + elog "2. Configure your database settings in ${CONF_DIR}/database.yml" + elog " for \"production\" environment." + elog + elog "3. Then you should create a database for your GitLab instance, if you" + elog "haven't done so already." + elog + if use postgres; then + elog "If you have local PostgreSQL running, just copy&run:" + elog " su postgres" + elog " psql -c \"CREATE ROLE gitlab PASSWORD 'gitlab' \\" + elog " NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\"" + elog " createdb -E UTF-8 -O gitlab gitlabhq_production" + elog " Note: You should change your password to something more random..." + elog + fi + elog "4. Finally execute the following command to initlize environment:" + elog " emerge --config \"=${CATEGORY}/${PF}\"" + elog " Note: Do not forget to start Redis server first!" + elog + elog "If you're running GitLab behind an SSL proxy such as nginx or Apache and" + elog "you can't login after the upgrade, be sure to read the section about the" + elog "verification of the CSRF token in GitLab's trouble-shooting guide at" + elog "http://goo.gl/5XGRGv." +} + +pkg_config() { + local shell_conf='/etc/gitlab-shell.yml' + + einfo "Checking configuration files" + + if [ ! -r "${CONF_DIR}/database.yml" ]; then + eerror "Copy ${CONF_DIR}/database.yml.* to" + eerror "${CONF_DIR}/database.yml and edit this file in order to configure your" + eerror "database settings for \"production\" environment."; die + fi + + # check gitlab-shell configuration + if [ -r ${shell_conf} ]; then + local shell_repos_path="$(ryaml ${shell_conf} repos_path)" + local gitlab_repos_path="$(ryaml ${CONF_DIR}/gitlab.yml \ + production gitlab_shell repos_path)" + + if [ ! "${shell_repos_path}" -ef "${gitlab_repos_path}" ]; then + eerror "repos_path in ${CONF_DIR}/gitlab.yml and ${shell_conf}" + eerror "must points to the same location! Fix the repos_path location and" + eerror "run this again."; die + fi + else + ewarn "GitLab Shell checks skipped, could not find config file at" + ewarn "${shell_conf}. Make sure that you have gitlab-shell properly" + ewarn "installed and that repos_path is the same as in GitLab." + fi + + local email_from="$(ryaml ${CONF_DIR}/gitlab.yml production gitlab email_from)" + local git_home="$(egethome ${MY_USER})" + + # configure Git global settings + if [ ! -e "${git_home}/.gitconfig" ]; then + einfo "Setting git user" + su -l ${MY_USER} -c " + git config --global user.email '${email_from}'; + git config --global user.name 'GitLab'" \ + || die "failed to setup git name and email" + fi + + if [ ! -d "${DEST_DIR}/.git" ]; then + # create dummy git repo as workaround for + # https://github.com/bundler/bundler/issues/2039 + einfo "Initializing dummy git repository to avoid false errors from bundler" + su -l ${MY_USER} -c " + cd ${DEST_DIR} + git init + git add README.md + git commit -m 'Dummy repository'" >/dev/null + fi + + ## Initialize app ## + + local RAILS_ENV="production" + local RUBY=${RUBY:-/usr/bin/ruby} + local BUNDLE="${RUBY} /usr/bin/bundle" + + local dbname="$(ryaml ${CONF_DIR}/database.yml production database)" + + if [ -f "${DEST_DIR}/.secret" ]; then + local update=true + + einfo "Migrating database ..." + exec_rake db:migrate + + # https://github.com/gitlabhq/gitlabhq/issues/5311#issuecomment-31656496 + einfo "Migrating iids ..." + exec_rake migrate_iids + + einfo "Cleaning old precompiled assets ..." + exec_rake assets:clean + + einfo "Cleaning cache ..." + exec_rake cache:clear + else + local update=false + + einfo "Initializing database ..." + exec_rake gitlab:setup + fi + + einfo "Precompiling assests ..." + exec_rake assets:precompile + + if [ "${update}" = 'true' ]; then + ewarn + ewarn "This configuration script runs only common migration tasks." + ewarn "Please read guides on" + ewarn " https://github.com/gitlabhq/gitlabhq/blob/master/doc/update/" + ewarn "for any additional migration tasks specific to your previous GitLab" + ewarn "version." + fi +} + +ryaml() { + ruby -ryaml -e 'puts ARGV[1..-1].inject(YAML.load(File.read(ARGV[0]))) {|acc, key| acc[key] }' "$@" +} + +exec_rake() { + local command="${BUNDLE} exec rake $@ RAILS_ENV=${RAILS_ENV}" + + echo " ${command}" + su -l ${MY_USER} -c " + export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 + cd ${DEST_DIR} + ${command}" \ + || die "failed to run rake $@" +} From 3d067fe86bcee07dc75c68c28af8196e33a1077e Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Thu, 14 Jan 2016 21:53:26 +0100 Subject: [PATCH 2/4] added ebuild for dev-vcs/gitlab-shell-2.6.10 --- dev-vcs/gitlab-shell/Manifest | 2 + .../gitlab-shell/gitlab-shell-2.6.10.ebuild | 126 ++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 dev-vcs/gitlab-shell/gitlab-shell-2.6.10.ebuild diff --git a/dev-vcs/gitlab-shell/Manifest b/dev-vcs/gitlab-shell/Manifest index a3ec0e4..4d39916 100644 --- a/dev-vcs/gitlab-shell/Manifest +++ b/dev-vcs/gitlab-shell/Manifest @@ -1,8 +1,10 @@ AUX gitlab-shell-2.0.0-config-paths.patch 1356 SHA256 442a8e18b4d8e6092db0d39659cba5e41404e90f21070ed50b5460177f28f1b2 SHA512 0445cd42086b2d77825c487d604ddcb11f8fdf4eb8dcdfa1fe1b8e8c24d7b8f273834dbec0bfbb763a35a74605d558cc8d3feaa056eb02a113d18124a764551e WHIRLPOOL 0e3367b229ea4f13818fe2e485dc8da83ad695aec496881cb5eb918b183029b0013518ca64acba1568d93dc418dfaf083c2a86b9f2e3adf9fe15cad038011b30 +DIST gitlab-shell-2.6.10.tar.gz 35574 SHA256 c83f1cc9371f90fd0c9907c5cc7e64ba77dff228bb3d427afda999f583ba59a5 SHA512 f03b0d4b1e4b6f3e934acd29ca4e7fb478e7891e31d7fa8e6dfb7cb0d4b1dadd14a88254262d2e71691e01742610a86de1039fd738bde0ba05d6d19fe17fbf10 WHIRLPOOL 6c787b5bdfc6fa0e3ce66a4915d3737fa8fc1f47c1be44c0cecdda802e1bee1cf11f0154d6bb63e799458368bc71553f316024895b2465016d699f597cdfb851 DIST gitlab-shell-2.6.5.tar.gz 33445 SHA256 586092a62b053adf0b046372aa5983b1170446456cd24e63c145460acc927648 SHA512 52f5c1db5b813dcd68183c6ca02e1fa0eb693040d2e6dedbb903743c285feaddd2a2836726228673eb6da99da07fcd04103e9207443b9f4fb42ba6d1bd4e29db WHIRLPOOL f52937b73942bd2064bc4414f9d4c8b34366dac59912ee926347ba02b7d44c28630a8f530beea82c3df5b6b801db5249080269a9a4e2f8daf33c484a3d203754 DIST gitlab-shell-2.6.6.tar.gz 33660 SHA256 0352a5f9247abac00dbd9914371eafef1b8521879479337a5d520adbe3ec7494 SHA512 f41519bb71331ac4a0cf55deb4cae40030a3b1692d9c85007cff73ee4e4b953d134ad06c321dc27d156f17b8a0946da26e07c7d6813def97945fe88dc8def0ab WHIRLPOOL a93f076eceed3a3f00f61d43c146db10ab4e0c8ec3ddc7e33043a8403230067defdfdeb3a1a103fe591c83d473844389ada318acd808ca1132de4e963cee022d DIST gitlab-shell-2.6.8.tar.gz 35191 SHA256 196ac258f036ab6d41439b8149ad46dcaeebae727b69bea53a9747c46757ac1c SHA512 8093476675a63b97a56f50838a27fed1f0f355533177927056acdad5d5da450ff4a82242d9b618bc5f6c289820a01f1aaa924787966779e087ce3c8b2c84507d WHIRLPOOL a8a7a8f6dd0a3e49f2a6b6d03200a320802929d5cc283bbf6eddad90644664a3ca8ff14f9ba7760c8026351801f78ce47ca6a5a95d7bc3ab7c1aaad157423d64 DIST gitlab-shell-2.6.9.tar.gz 35487 SHA256 b61839622ca14331b21622b28ff1b28839d86b55c00033b00a4f320df378d8cf SHA512 be5e0c1e6169049d18956229668beca5f6497a090127b204b4ada463bf09ce0df180302b6e85e251cb152716d79ba35975c4842486b9603e7c7001e918e05718 WHIRLPOOL 2430f92b2d370a57f0f68ad6ab227ce50f09af5a2b99bb2556ce38611c70e11a3ca6c27a1da9de219d4f3ef7444e34c380f54c569de65f11dd101953de37b983 +EBUILD gitlab-shell-2.6.10.ebuild 3496 SHA256 942e2c5af4d03353b4d5b48a46bcf05c837cf1d0375434ff083ceee7e389ff61 SHA512 34600582b7e2defd8470a2a4f70213f598ac540f57ce9748cdaf16192f1e79a59eb950d1b15231d27b8c07649116364208fd12294e89453159a39f2e56048474 WHIRLPOOL a17a4881720eb0a7e68db927a93cb40d852250acb5b2f6daa4625e5338c6dce6707b90683885ead72769bc9a36d0e173178d3df8616ceab4eb32114955aa2300 EBUILD gitlab-shell-2.6.5.ebuild 3496 SHA256 942e2c5af4d03353b4d5b48a46bcf05c837cf1d0375434ff083ceee7e389ff61 SHA512 34600582b7e2defd8470a2a4f70213f598ac540f57ce9748cdaf16192f1e79a59eb950d1b15231d27b8c07649116364208fd12294e89453159a39f2e56048474 WHIRLPOOL a17a4881720eb0a7e68db927a93cb40d852250acb5b2f6daa4625e5338c6dce6707b90683885ead72769bc9a36d0e173178d3df8616ceab4eb32114955aa2300 EBUILD gitlab-shell-2.6.6.ebuild 3496 SHA256 942e2c5af4d03353b4d5b48a46bcf05c837cf1d0375434ff083ceee7e389ff61 SHA512 34600582b7e2defd8470a2a4f70213f598ac540f57ce9748cdaf16192f1e79a59eb950d1b15231d27b8c07649116364208fd12294e89453159a39f2e56048474 WHIRLPOOL a17a4881720eb0a7e68db927a93cb40d852250acb5b2f6daa4625e5338c6dce6707b90683885ead72769bc9a36d0e173178d3df8616ceab4eb32114955aa2300 EBUILD gitlab-shell-2.6.8.ebuild 3496 SHA256 942e2c5af4d03353b4d5b48a46bcf05c837cf1d0375434ff083ceee7e389ff61 SHA512 34600582b7e2defd8470a2a4f70213f598ac540f57ce9748cdaf16192f1e79a59eb950d1b15231d27b8c07649116364208fd12294e89453159a39f2e56048474 WHIRLPOOL a17a4881720eb0a7e68db927a93cb40d852250acb5b2f6daa4625e5338c6dce6707b90683885ead72769bc9a36d0e173178d3df8616ceab4eb32114955aa2300 diff --git a/dev-vcs/gitlab-shell/gitlab-shell-2.6.10.ebuild b/dev-vcs/gitlab-shell/gitlab-shell-2.6.10.ebuild new file mode 100644 index 0000000..46f4828 --- /dev/null +++ b/dev-vcs/gitlab-shell/gitlab-shell-2.6.10.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +USE_RUBY="ruby20 ruby21" + +inherit eutils ruby-ng user + +DESCRIPTION="SSH access and repository management for GitLab" +HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-shell" +SRC_URI="https://github.com/gitlabhq/gitlab-shell/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND=" + dev-vcs/git + dev-db/redis + virtual/ssh" +ruby_add_bdepend " + virtual/ruby-ssl" + +MERGE_TYPE="binary" + +RUBY_PATCHES=( + "${PN}-2.0.0-config-paths.patch" +) + +GIT_USER="git" +DEST_DIR="/usr/share/${PN}" +DATA_DIR="/var/lib/git" +LOGS_DIR="/var/log/gitlab" +CONF_FILE="/etc/gitlab-shell.yml" + +pkg_setup() { + enewgroup ${GIT_USER} + enewuser ${GIT_USER} -1 /bin/bash ${DATA_DIR} "${GIT_USER}" + + local git_shell=$(egetshell ${GIT_USER}) + if [ ! ${git_shell} -ef '/bin/bash' ]; then + ewarn "User ${GIT_USER} already exists, but with the shell ${git_shell}." + ewarn "Changing shell to /bin/bash ..." + + usermod -s /bin/bash ${GIT_USER} \ + || die "failed to change login shell for ${GIT_USER}" + fi +} + +all_ruby_prepare() { + # fix paths + sed -i -E \ + -e "s|/home/git|${DATA_DIR}|" \ + -e "s|[\# ]*(log_file: ).*|\1\"${LOGS_DIR}/gitlab-shell.log\"|" \ + config.yml.example || die "failed to filter config.yml.example" + + sed -i \ + -e "s|File\.join(ROOT_PATH, 'config.yml')|'${CONF_FILE}'|" \ + lib/gitlab_config.rb || die "failed to filter gitlab_config.rb" +} + +all_ruby_install() { + # install lib + insinto ${DEST_DIR}; doins -r lib LICENSE README.md VERSION + + # install scripts + exeinto ${DEST_DIR}/bin; doexe bin/* + exeinto ${DEST_DIR}/hooks; doexe hooks/* + exeinto ${DEST_DIR}/support; doexe support/* + + # create symlinks to bin + local name; for name in $(basename -a bin/gitlab-*); do + dosym "${DEST_DIR}/bin/${name}" "/usr/bin/${name}" + done + + insinto $(dirname ${CONF_FILE}) + newins config.yml.example $(basename ${CONF_FILE}) + + # create symlink for .gitlab_shell_secret + einfo "creating symlink for .gitlab_shell_secret" + TOKEN_FILE="${DEST_DIR}/.gitlab_shell_secret" + dosym /opt/gitlab/.gitlab_shell_secret "$TOKEN_FILE" + + # prepare directories + diropts -m750; dodir ${DATA_DIR} + diropts -m770; keepdir ${DATA_DIR}/repositories + diropts -m755; dodir ${LOGS_DIR} + + # GitLab stupidly expects that gitlab-shell is in home of git user... + dosym ${DEST_DIR} ${DATA_DIR}/gitlab-shell + + # fix permissions + fowners -R ${GIT_USER}:${GIT_USER} ${DATA_DIR} ${LOGS_DIR} +} + +pkg_postinst() { + # check git home directory + local git_home=$(egethome ${GIT_USER}) + if [ ! "${git_home}" -ef ${DATA_DIR} ]; then + ewarn "An authorized_keys is configured to be inside ${DATA_DIR}/.ssh," + ewarn "but HOME of ${GIT_USER} user is located in ${git_home}. You must" + ewarn "either change the authorized_keys location in ${CONF_FILE}," + ewarn "or change home directory of ${GIT_USER} user to ${DATA_DIR}" + ewarn "and move ${git_home}/.ssh here." + ewarn + fi + + local auth_dir="${git_home}/.ssh" + + elog "Initializing authorized_keys file in ${auth_dir}" + mkdir -p ${auth_dir} + touch ${auth_dir}/authorized_keys + chmod -R u=rwX,go=- ${auth_dir} + chown -R ${GIT_USER}:${GIT_USER} ${auth_dir} + + elog + elog "GitLab Shell was initialized. Repositories are located in" + elog "${DATA_DIR}/repositories, scripts in ${DEST_DIR}/bin." + elog "All gitlab-* scripts was symlinked to /usr/bin to be on your path." + elog + elog "You should change your gitlab_url in: ${CONF_FILE}." +} From b06214ea860e3cdc9338fa589edd7ad14956b63f Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Thu, 14 Jan 2016 21:54:51 +0100 Subject: [PATCH 3/4] updated dependencies of ebuild for www-apps/gitlab-ce-9999 --- www-apps/gitlab-ce/Manifest | 2 +- www-apps/gitlab-ce/gitlab-ce-9999.ebuild | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/www-apps/gitlab-ce/Manifest b/www-apps/gitlab-ce/Manifest index 3bc6c91..120cd76 100644 --- a/www-apps/gitlab-ce/Manifest +++ b/www-apps/gitlab-ce/Manifest @@ -24,5 +24,5 @@ EBUILD gitlab-ce-8.0.5.ebuild 11185 SHA256 1240818953ae8f61b6c88c91c3c1dd32fb7d0 EBUILD gitlab-ce-8.1.4.ebuild 11177 SHA256 6b920132ff2c4926f2ed3edb3fff7cdf3e88c0314f8a0a9c077cdaae9fad4a0e SHA512 617656f6fd52d0c4751e0726983fc7d2c1532e8bc44761dbbe5bfb7f489e18ef66a68769bb0f7736c9d49d536e8103a5486e92869a9bba4d1aa92c4068eedf6e WHIRLPOOL 1c8a0968a1fa7b95ceb47f66610a72585666cc5b2f7f3157d1f5c04f98a2c89d79ac1875a28c57b3116105d2e0af17dabcecaa00159af42166565ae7fa88647e EBUILD gitlab-ce-8.2.3.ebuild 11149 SHA256 b9ea26478efe2bb798334178589f94c014550360bcce109af55cf9e9431519f1 SHA512 8cb298285f338c2f45a6b2048d597067ecdb51f3c70ab4c893810029b4773a20b7f058c4262019ae9f88cef5cbaf993726b653d5e214005495acb064bc00d83c WHIRLPOOL bbcfa2b53863fe887b2eaf62d1495463f1590eb5f04856dddb2d95f28a9cec377d29eeac04bb90eeaf8be657a7a71c73edac8ee5fc123f905b694aa2a50aeba9 EBUILD gitlab-ce-8.3.2.ebuild 11156 SHA256 3bbee882fafa3f1cf16e5e214c87bcadbb64c0abaf1566930aa548e5198cc361 SHA512 2794d6a92dbf5341c46b7b7504b9099fd3f350de0934599d3d8d59fd26c2515a88dbf850ac7e490929ab2cc897225c40696e98192e863549d3d5e677c5c96927 WHIRLPOOL 3083fec80d5cac025b0bc29fe2035e98e37b06bf7e54c5d54519171e052f7435fef38ac7f63030f828713b1af80e949fd7a117d421231fc01fff93837f885a3c -EBUILD gitlab-ce-9999.ebuild 11209 SHA256 64550d2d6bb5306df3c60a7e8b77562306ed2b41fb1045aaad3bbc6598916260 SHA512 d8ea512d408505362e464fd626490e676442c319029aaf07f34360b47c724fd017db52e0d3b713590dcc6253cc343e571fc7d9f6d2261445d1ae79e2d3c662db WHIRLPOOL 3e8366d75fe3c739b5a55942afd36acb456fa478500334de9bd8efd4f144bf59cad9c91643e7b99f7046a11c76003d52be1ba52f20fcb7e1802bb16e02080745 +EBUILD gitlab-ce-9999.ebuild 11209 SHA256 28d8cd75fe6f5eda2466101653105f1afbb1639fa94a9bdd6cf40dfbb5d1c4b2 SHA512 2dd8997089fb45cec9a2bbc4a915665b3212506a221f9c7a099f5150d3704e8540851d7ccfdf24196170c3e2106d206c8967d9a8183de6a35d95a5f35813126e WHIRLPOOL 8624799592922b0883cb62d170999e7d6134cc8152ec7519845a97ef2bb58799ff4b75a949df9880342636fa1127fe4f9b391c09f5ac8448666756472cf3d77f MISC metadata.xml 545 SHA256 1b7fc44d811e1ab7638fe4a40253f49d5f1071872d3020c22c4f67662750cb2f SHA512 86f47d297892bccfefa087d93936296f5647993a9ec8e3f47907a6859cbf385e5bc6f00502d7836c9e8d9efef2b6725bf145b0150924c2082b2bd164469ef6ea WHIRLPOOL 6bfb8a55684d68c8bfa6e025a0be965f7b815394ee0896dd2a13cfb524e3cf3f3149acc9072897e30a1842060389576aac07ea8beb4a8b0bfc3e8eab3723f2a1 diff --git a/www-apps/gitlab-ce/gitlab-ce-9999.ebuild b/www-apps/gitlab-ce/gitlab-ce-9999.ebuild index be404ab..f930097 100644 --- a/www-apps/gitlab-ce/gitlab-ce-9999.ebuild +++ b/www-apps/gitlab-ce/gitlab-ce-9999.ebuild @@ -52,9 +52,9 @@ CDEPEND=" dev-util/cmake virtual/pkgconfig" DEPEND="${GEMS_DEPEND} - >=dev-vcs/gitlab-shell-2.6.9 + ~dev-vcs/gitlab-shell-2.6.10 dev-vcs/git - ~dev-vcs/gitlab-workhorse-0.5.1 + ~dev-vcs/gitlab-workhorse-0.5.4 kerberos? ( !app-crypt/heimdal ) rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/23 )" RDEPEND="${DEPEND} From 0b0083e5710286f8e3eac2b139d615078bc43ad2 Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Fri, 15 Jan 2016 21:01:16 +0100 Subject: [PATCH 4/4] cleaned up stuff --- dev-vcs/gitlab-shell/Manifest | 2 - .../gitlab-shell/gitlab-shell-2.6.9.ebuild | 126 ------ dev-vcs/gitlab-workhorse/Manifest | 3 - .../files/fix-Makefile-0.5.1.patch | 16 - .../gitlab-workhorse-0.5.1.ebuild | 38 -- www-apps/gitlab-ce/Manifest | 2 - www-apps/gitlab-ce/gitlab-ce-8.3.2.ebuild | 370 ------------------ 7 files changed, 557 deletions(-) delete mode 100644 dev-vcs/gitlab-shell/gitlab-shell-2.6.9.ebuild delete mode 100644 dev-vcs/gitlab-workhorse/files/fix-Makefile-0.5.1.patch delete mode 100644 dev-vcs/gitlab-workhorse/gitlab-workhorse-0.5.1.ebuild delete mode 100644 www-apps/gitlab-ce/gitlab-ce-8.3.2.ebuild diff --git a/dev-vcs/gitlab-shell/Manifest b/dev-vcs/gitlab-shell/Manifest index 092b64c..b0bc245 100644 --- a/dev-vcs/gitlab-shell/Manifest +++ b/dev-vcs/gitlab-shell/Manifest @@ -1,6 +1,4 @@ AUX gitlab-shell-2.0.0-config-paths.patch 1356 SHA256 442a8e18b4d8e6092db0d39659cba5e41404e90f21070ed50b5460177f28f1b2 SHA512 0445cd42086b2d77825c487d604ddcb11f8fdf4eb8dcdfa1fe1b8e8c24d7b8f273834dbec0bfbb763a35a74605d558cc8d3feaa056eb02a113d18124a764551e WHIRLPOOL 0e3367b229ea4f13818fe2e485dc8da83ad695aec496881cb5eb918b183029b0013518ca64acba1568d93dc418dfaf083c2a86b9f2e3adf9fe15cad038011b30 DIST gitlab-shell-2.6.10.tar.gz 35574 SHA256 c83f1cc9371f90fd0c9907c5cc7e64ba77dff228bb3d427afda999f583ba59a5 SHA512 f03b0d4b1e4b6f3e934acd29ca4e7fb478e7891e31d7fa8e6dfb7cb0d4b1dadd14a88254262d2e71691e01742610a86de1039fd738bde0ba05d6d19fe17fbf10 WHIRLPOOL 6c787b5bdfc6fa0e3ce66a4915d3737fa8fc1f47c1be44c0cecdda802e1bee1cf11f0154d6bb63e799458368bc71553f316024895b2465016d699f597cdfb851 -DIST gitlab-shell-2.6.9.tar.gz 35487 SHA256 b61839622ca14331b21622b28ff1b28839d86b55c00033b00a4f320df378d8cf SHA512 be5e0c1e6169049d18956229668beca5f6497a090127b204b4ada463bf09ce0df180302b6e85e251cb152716d79ba35975c4842486b9603e7c7001e918e05718 WHIRLPOOL 2430f92b2d370a57f0f68ad6ab227ce50f09af5a2b99bb2556ce38611c70e11a3ca6c27a1da9de219d4f3ef7444e34c380f54c569de65f11dd101953de37b983 EBUILD gitlab-shell-2.6.10.ebuild 3496 SHA256 942e2c5af4d03353b4d5b48a46bcf05c837cf1d0375434ff083ceee7e389ff61 SHA512 34600582b7e2defd8470a2a4f70213f598ac540f57ce9748cdaf16192f1e79a59eb950d1b15231d27b8c07649116364208fd12294e89453159a39f2e56048474 WHIRLPOOL a17a4881720eb0a7e68db927a93cb40d852250acb5b2f6daa4625e5338c6dce6707b90683885ead72769bc9a36d0e173178d3df8616ceab4eb32114955aa2300 -EBUILD gitlab-shell-2.6.9.ebuild 3496 SHA256 942e2c5af4d03353b4d5b48a46bcf05c837cf1d0375434ff083ceee7e389ff61 SHA512 34600582b7e2defd8470a2a4f70213f598ac540f57ce9748cdaf16192f1e79a59eb950d1b15231d27b8c07649116364208fd12294e89453159a39f2e56048474 WHIRLPOOL a17a4881720eb0a7e68db927a93cb40d852250acb5b2f6daa4625e5338c6dce6707b90683885ead72769bc9a36d0e173178d3df8616ceab4eb32114955aa2300 MISC metadata.xml 234 SHA256 f35b97f99a26d73cc441e1d93bfe25aaa4e9f7f6d90c8d05a74f7b7bc5b68472 SHA512 59d8156b3ca3e99c40d5a2a32de7edf2eb53279b2424998862589d6bad77617d23fc852afec0a92f8ac5bb54a88ebc504cc0641029c1936412e90ab03dfdd447 WHIRLPOOL 935a1401910a42f888c991e443a49275ea8b87976c5aa977f670053d97d18754231749749bc92d37d4b5f45ecf65914480942a11b5827b6c08fb24313a428431 diff --git a/dev-vcs/gitlab-shell/gitlab-shell-2.6.9.ebuild b/dev-vcs/gitlab-shell/gitlab-shell-2.6.9.ebuild deleted file mode 100644 index 46f4828..0000000 --- a/dev-vcs/gitlab-shell/gitlab-shell-2.6.9.ebuild +++ /dev/null @@ -1,126 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI="5" - -USE_RUBY="ruby20 ruby21" - -inherit eutils ruby-ng user - -DESCRIPTION="SSH access and repository management for GitLab" -HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-shell" -SRC_URI="https://github.com/gitlabhq/gitlab-shell/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -DEPEND="" -RDEPEND=" - dev-vcs/git - dev-db/redis - virtual/ssh" -ruby_add_bdepend " - virtual/ruby-ssl" - -MERGE_TYPE="binary" - -RUBY_PATCHES=( - "${PN}-2.0.0-config-paths.patch" -) - -GIT_USER="git" -DEST_DIR="/usr/share/${PN}" -DATA_DIR="/var/lib/git" -LOGS_DIR="/var/log/gitlab" -CONF_FILE="/etc/gitlab-shell.yml" - -pkg_setup() { - enewgroup ${GIT_USER} - enewuser ${GIT_USER} -1 /bin/bash ${DATA_DIR} "${GIT_USER}" - - local git_shell=$(egetshell ${GIT_USER}) - if [ ! ${git_shell} -ef '/bin/bash' ]; then - ewarn "User ${GIT_USER} already exists, but with the shell ${git_shell}." - ewarn "Changing shell to /bin/bash ..." - - usermod -s /bin/bash ${GIT_USER} \ - || die "failed to change login shell for ${GIT_USER}" - fi -} - -all_ruby_prepare() { - # fix paths - sed -i -E \ - -e "s|/home/git|${DATA_DIR}|" \ - -e "s|[\# ]*(log_file: ).*|\1\"${LOGS_DIR}/gitlab-shell.log\"|" \ - config.yml.example || die "failed to filter config.yml.example" - - sed -i \ - -e "s|File\.join(ROOT_PATH, 'config.yml')|'${CONF_FILE}'|" \ - lib/gitlab_config.rb || die "failed to filter gitlab_config.rb" -} - -all_ruby_install() { - # install lib - insinto ${DEST_DIR}; doins -r lib LICENSE README.md VERSION - - # install scripts - exeinto ${DEST_DIR}/bin; doexe bin/* - exeinto ${DEST_DIR}/hooks; doexe hooks/* - exeinto ${DEST_DIR}/support; doexe support/* - - # create symlinks to bin - local name; for name in $(basename -a bin/gitlab-*); do - dosym "${DEST_DIR}/bin/${name}" "/usr/bin/${name}" - done - - insinto $(dirname ${CONF_FILE}) - newins config.yml.example $(basename ${CONF_FILE}) - - # create symlink for .gitlab_shell_secret - einfo "creating symlink for .gitlab_shell_secret" - TOKEN_FILE="${DEST_DIR}/.gitlab_shell_secret" - dosym /opt/gitlab/.gitlab_shell_secret "$TOKEN_FILE" - - # prepare directories - diropts -m750; dodir ${DATA_DIR} - diropts -m770; keepdir ${DATA_DIR}/repositories - diropts -m755; dodir ${LOGS_DIR} - - # GitLab stupidly expects that gitlab-shell is in home of git user... - dosym ${DEST_DIR} ${DATA_DIR}/gitlab-shell - - # fix permissions - fowners -R ${GIT_USER}:${GIT_USER} ${DATA_DIR} ${LOGS_DIR} -} - -pkg_postinst() { - # check git home directory - local git_home=$(egethome ${GIT_USER}) - if [ ! "${git_home}" -ef ${DATA_DIR} ]; then - ewarn "An authorized_keys is configured to be inside ${DATA_DIR}/.ssh," - ewarn "but HOME of ${GIT_USER} user is located in ${git_home}. You must" - ewarn "either change the authorized_keys location in ${CONF_FILE}," - ewarn "or change home directory of ${GIT_USER} user to ${DATA_DIR}" - ewarn "and move ${git_home}/.ssh here." - ewarn - fi - - local auth_dir="${git_home}/.ssh" - - elog "Initializing authorized_keys file in ${auth_dir}" - mkdir -p ${auth_dir} - touch ${auth_dir}/authorized_keys - chmod -R u=rwX,go=- ${auth_dir} - chown -R ${GIT_USER}:${GIT_USER} ${auth_dir} - - elog - elog "GitLab Shell was initialized. Repositories are located in" - elog "${DATA_DIR}/repositories, scripts in ${DEST_DIR}/bin." - elog "All gitlab-* scripts was symlinked to /usr/bin to be on your path." - elog - elog "You should change your gitlab_url in: ${CONF_FILE}." -} diff --git a/dev-vcs/gitlab-workhorse/Manifest b/dev-vcs/gitlab-workhorse/Manifest index 4276933..c075e78 100644 --- a/dev-vcs/gitlab-workhorse/Manifest +++ b/dev-vcs/gitlab-workhorse/Manifest @@ -1,9 +1,6 @@ -AUX fix-Makefile-0.5.1.patch 508 SHA256 f63fe5302487d698212b52984f3f51efb3a6768558ae8927044c6a84f1814bc0 SHA512 27916751eda48b5cf4b8a3d650c74ca5031462fec14648a7535def6ebd321d49e1104b84f916109b5fdccdd90f9ee42fdbec587e3ee52f9c649fb49caac283e6 WHIRLPOOL 6f04c95575233eadd8b5f4d3e0ce564591d12e279d9827383292296d118dfc8670e239e2aaa74a3c132cc205b4d6214cb54edc983a5d2270dc005720955c805a AUX fix-Makefile-0.5.4.patch 508 SHA256 3d0eefeafabef0043d9952ba03890fe241cecdbe20354827e187778cf65aea60 SHA512 16c2ae7f5117590bb4f794ac9aa85aa6e66c2edb01219f339d6db8dc91871bf6331e81bec93ce51d0aee5b5e6ef487d3d33a7f33901aafb036035da2444b9bf2 WHIRLPOOL ed054321aba5c546bda4f15750373546fa0ff9b951ee6d901bb7d73d69b3a933583d5897c2ef397348655a3fe6c0e3d4106e645d3ae2cc9e4348b316df82168f AUX gitlab-workhorse.conf 248 SHA256 6d11d63aa869cfd8c6f77c3a875984c226db633be899ad7ce97fafe94236eee7 SHA512 234213c8361702bdfeea40bd306b5899de19f34ce985e090a86e01aa601cf4ed23da4dfb75f74fe5986bbea5535a7a6a745406b4f67f79d352bd1c863777c7f1 WHIRLPOOL 8ac1134cde3aee942466d206e703ebd5330f83537d7e29641447f812d857bcc57b07fbf82eab086c0d622750694f64fabf8ffca2ba26a725f61b40fd1941e963 AUX gitlab-workhorse.init 653 SHA256 f38c37ed818cb8c25fb800bfcb5448f659e876b78ea33ea7a1ba3c80e73ea95e SHA512 2667997def39e6dc17e6a1d9be06d6e855d5d3e956e64d93bb3e74bbad0a1d427dc034f9c139f3b05e2666abab014404b2c8013c5347f4ec25fbf5ef86e7e88e WHIRLPOOL 63cd7ff80d88676b44c2d6ccdadf74907d5f8e4268f03ee11775c423bf95955f9d3aaeedd79fa6e0486b2d225336eb2ffa165dd7b9ac87ed0c2d403dc7e5afb4 -DIST gitlab-workhorse-0.5.1.tar.bz2 18396 SHA256 fe5170da871cb48136f35f90963242fe64871185cbf3fcf13129a7f98ff1fc97 SHA512 5d46b047f2aeb7cf174bc3cd5d13e9d6595ddfb2cd80fa174733e3948903552995c4b6ebc2da27a24f50bbb00bf7da44a12b71acb49d90abfe245d2f59a6a3e6 WHIRLPOOL 43ee51fe5db55f1459c0e45ab867cb78f055f811be515af2ba272915df0cd894b899ab9ef9b11e8a53803c1156739d3057fb8d09b9bc3cf36973728dd4a44c8a DIST gitlab-workhorse-0.5.4.tar.bz2 19488 SHA256 aae86bff51ab421a2e529c45c5d3f9223d2ebc23b9a6326416dac9998185488e SHA512 ba555f6aff07826281991cbb66bd2b1f4b92cf3ecb02a6e9f12120e01cd7846eb33eebef3f7fc2e7a531cd498f576d9f2e4529358e0d88b11103f0cd22208d40 WHIRLPOOL 1bbec15e69c674f1fa9205ea74cb8555ff97b3d71dad2815389d8953cc7cfdfdda61bd2e5b36ed871ded913b834546571ab12fee883bfc0f39878d68f84a5135 -EBUILD gitlab-workhorse-0.5.1.ebuild 866 SHA256 188539bf1d1f156a37f5044058508e9140f80e648fccdba3c438307a73f14fb9 SHA512 6f8dd6210a522a87e72795ea6b78d4b6a825b8ba6c610c30e04676980ffe49db5e5199d780284ff778e7ba75a633406c95762f16d55b5c15e8d881a3ad8ba567 WHIRLPOOL f713e415daaa8d654b334ed6d991446b6d600192867d6f93e02f9196d1c5454abce92022668ab49e2cc1f084c79da43a6b65d120cec6e627a7dc6f5eaccda651 EBUILD gitlab-workhorse-0.5.4.ebuild 866 SHA256 93c056d8226ecd39b57a00e3df876204675b9f0baf3593a2ad9fbe09156a5f81 SHA512 aeb2b5537e0901418554532ef810597aa40b56aa5755b9d7d38d49c3f30f2ed6c1b59b3ae82c97eda4711c76e113245270f556a58f883a6a9aa5d966d0ed429f WHIRLPOOL 9a20dbc894930bcb10f0dc1cce940fd097ac44929ab1c98dbe46ed57c9b319c761306383a642b094cd84d17737a9433d5775c066344190d45bc18554a6f07f47 MISC metadata.xml 234 SHA256 f35b97f99a26d73cc441e1d93bfe25aaa4e9f7f6d90c8d05a74f7b7bc5b68472 SHA512 59d8156b3ca3e99c40d5a2a32de7edf2eb53279b2424998862589d6bad77617d23fc852afec0a92f8ac5bb54a88ebc504cc0641029c1936412e90ab03dfdd447 WHIRLPOOL 935a1401910a42f888c991e443a49275ea8b87976c5aa977f670053d97d18754231749749bc92d37d4b5f45ecf65914480942a11b5827b6c08fb24313a428431 diff --git a/dev-vcs/gitlab-workhorse/files/fix-Makefile-0.5.1.patch b/dev-vcs/gitlab-workhorse/files/fix-Makefile-0.5.1.patch deleted file mode 100644 index bba9aaa..0000000 --- a/dev-vcs/gitlab-workhorse/files/fix-Makefile-0.5.1.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/Makefile b/Makefile -index c2c8c59..419f4d8 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,8 +1,8 @@ --PREFIX=/usr/local --VERSION=$(shell git describe)-$(shell date -u +%Y%m%d.%H%M%S) -+PREFIX=${DESTDIR}/usr -+VERSION=0.5.1-$(shell date -u +%Y%m%d.%H%M%S) - - gitlab-workhorse: $(wildcard *.go) -- go build -ldflags "-X main.Version ${VERSION}" -o gitlab-workhorse -+ go build -ldflags "-X main.Version=${VERSION}" -o gitlab-workhorse - - install: gitlab-workhorse - install gitlab-workhorse ${PREFIX}/bin/ diff --git a/dev-vcs/gitlab-workhorse/gitlab-workhorse-0.5.1.ebuild b/dev-vcs/gitlab-workhorse/gitlab-workhorse-0.5.1.ebuild deleted file mode 100644 index e1325bd..0000000 --- a/dev-vcs/gitlab-workhorse/gitlab-workhorse-0.5.1.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI="5" - -inherit eutils user - -DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab >= 8.2" -HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-workhorse" -SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=${PV} -> ${P}.tar.bz2" -S="${WORKDIR}/${P}-bd5ec0015cf9f9f13d6909bd0d2013b9a2fa5aec" -RESTRICT="mirror" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -DEPEND=">=dev-lang/go-1.5.1 - !dev-vcs/gitlab-git-http-server" - -src_prepare() { - epatch "${FILESDIR}/fix-Makefile-${PV}.patch" -} - -src_install() { - local dest=/usr/bin - - diropts -m755 - dodir ${dest} - - exeinto ${dest} - doexe "${S}/${PN}" - - ## RC script ## - newinitd "${FILESDIR}/${PN}.init" "${PN}" - newconfd "${FILESDIR}/${PN}.conf" "${PN}" -} diff --git a/www-apps/gitlab-ce/Manifest b/www-apps/gitlab-ce/Manifest index 5bd897c..4410f7a 100644 --- a/www-apps/gitlab-ce/Manifest +++ b/www-apps/gitlab-ce/Manifest @@ -6,9 +6,7 @@ AUX gitlab-unicorn-8.2.init 2553 SHA256 9f6d3276d52589a5224c1a9b5a117a0d5d3e8331 AUX gitlab-unicorn.service 773 SHA256 010c9e223a30400d9155b39499eb0d7efad23b66baab9fcd9e365c689086b9bd SHA512 0bf9630aa91ed8f590a7bfa42d09b7ba33f6342b43b3d191c792c11157f8926c2a2ac2390eebd8179637e29b5bf68233d4699d62463497a0fd45b9bdbdd9167b WHIRLPOOL fbc709a5550dcc548a35c22c812dafe52ee507f5678b57c22c709ee89a399ae9109e2f56b7a13135d4140f1e024ebc4effe4aa4de13e0f36691da2a0737d9792 AUX gitlab-workhorse.service 930 SHA256 09348a52fec333b4b19828752e0484400c1efa9dfb644723fcf8e80537e294b6 SHA512 6332024fe0049287899cf482b6e4439e9dd90da14e489d08aa8e5e79cb7872efcc517d99b69fa23b011b382acb1e5926496a78f08af5d2d64daa515b869a0c6a WHIRLPOOL 3749c6719b2a35c7de29763cd616e1e9cc30a85aa1630ffc46440334459b5922503d52629556c125a6dd6574bdc5f23f1b2a7f2a85e2270a415b22246e0b6bae AUX gitlab.conf 27 SHA256 cd9be088bbb67a5400407fc6f63c061eb224f16748b7d0812ff2c101f43ca263 SHA512 909c49fee6d050c1e94b2559ff2a9d54c5c346492be0e2920b50d56d69eaddbed67e3ac12e012d2a9601b5596640ebf33c8dc68fc588a03ca370d963294be37f WHIRLPOOL fa436e8d7d2643d450259d26b6e7b24dae69df47ed22e5ef2a567f37aa785fbf3b0eb1129ae7c8bf8986c29559fc3b744a34064375e5245dce2b10053cd715d9 -DIST gitlab-ce-8.3.2.tar.gz 10683322 SHA256 87f6c27043058bba2d879c079f36a81f09f77c8e359ff7cf3bb0f5ebc4dca73e SHA512 a4d05cef4edcdd3ea07858eb52f1fa093a323d6586bcab9e5e2bd78320e56566c496146a89ed24410a551fa5d770a44b018636c11f55eae325cd6ec13de94f77 WHIRLPOOL 2bf74671e58d9f625c385ce2bcd8909bed828108deea17fd4bdbea7bf9d365dda14d1422699582a818fb656ab43cdea7f841c2334de152070dd2acac2f195e05 DIST gitlab-ce-8.3.4.tar.gz 10255543 SHA256 15cc1644c05798deafb81be5ae4c313d2d1dc38475ba4b119a5f1d8e905f2c67 SHA512 ce29dbd0b64eee3353e5ea335a738fd0ccc2910167d1d1c4849e7403b91a3b058edb037746b04988a780937abf4fbc33dd769f89a965ec99e8f7042478016f2e WHIRLPOOL 7ed124eaf9ccc913bb18da6fd5f4702cbe756b7a175da6dade53ceb04f35794bd58c8492052b0074ed1fa82e0258213081900ce9157c1ad13eb6f7a18e7c6e2c -EBUILD gitlab-ce-8.3.2.ebuild 11156 SHA256 3bbee882fafa3f1cf16e5e214c87bcadbb64c0abaf1566930aa548e5198cc361 SHA512 2794d6a92dbf5341c46b7b7504b9099fd3f350de0934599d3d8d59fd26c2515a88dbf850ac7e490929ab2cc897225c40696e98192e863549d3d5e677c5c96927 WHIRLPOOL 3083fec80d5cac025b0bc29fe2035e98e37b06bf7e54c5d54519171e052f7435fef38ac7f63030f828713b1af80e949fd7a117d421231fc01fff93837f885a3c EBUILD gitlab-ce-8.3.4.ebuild 11156 SHA256 6a9d5dffb4228ef4ad3eda9429d9429ab7cc9ce64364d208b38bbd92d2fd5834 SHA512 e9cbfc68f80c737b0f605ac3db4861c50e4a304fec175db699c6eb24a1284180ea83e8a619abc3ba5808374f380d45b42986f646f8feb229af4a329807f2d817 WHIRLPOOL 2afd92aa67b7a8d7495db65830615fd6671b6b8366b2dd0492278e598ea069642c3d394fde77bd4fad6c5f0484f5d2bcb19c4b5a996a1af1db3e390a374653ab EBUILD gitlab-ce-9999.ebuild 11209 SHA256 28d8cd75fe6f5eda2466101653105f1afbb1639fa94a9bdd6cf40dfbb5d1c4b2 SHA512 2dd8997089fb45cec9a2bbc4a915665b3212506a221f9c7a099f5150d3704e8540851d7ccfdf24196170c3e2106d206c8967d9a8183de6a35d95a5f35813126e WHIRLPOOL 8624799592922b0883cb62d170999e7d6134cc8152ec7519845a97ef2bb58799ff4b75a949df9880342636fa1127fe4f9b391c09f5ac8448666756472cf3d77f MISC metadata.xml 545 SHA256 1b7fc44d811e1ab7638fe4a40253f49d5f1071872d3020c22c4f67662750cb2f SHA512 86f47d297892bccfefa087d93936296f5647993a9ec8e3f47907a6859cbf385e5bc6f00502d7836c9e8d9efef2b6725bf145b0150924c2082b2bd164469ef6ea WHIRLPOOL 6bfb8a55684d68c8bfa6e025a0be965f7b815394ee0896dd2a13cfb524e3cf3f3149acc9072897e30a1842060389576aac07ea8beb4a8b0bfc3e8eab3723f2a1 diff --git a/www-apps/gitlab-ce/gitlab-ce-8.3.2.ebuild b/www-apps/gitlab-ce/gitlab-ce-8.3.2.ebuild deleted file mode 100644 index 091bd01..0000000 --- a/www-apps/gitlab-ce/gitlab-ce-8.3.2.ebuild +++ /dev/null @@ -1,370 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI="5" - -# 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="ruby21" - -inherit eutils ruby-ng user systemd - -MY_PKGNAME="gitlabhq" - -DESCRIPTION="GitLab is a free project and repository management application" -HOMEPAGE="https://about.gitlab.com/" -SRC_URI="https://github.com/${MY_PKGNAME}/${MY_PKGNAME}/archive/v${PV}.tar.gz -> ${P}.tar.gz" -RUBY_S="${MY_PKGNAME}-${PV}" - -RESTRICT="mirror" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="kerberos mysql +postgres +unicorn systemd rugged_use_system_libraries" - -## Gems dependencies: -# charlock_holmes dev-libs/icu -# grape, capybara dev-libs/libxml2, dev-libs/libxslt -# rugged dev-util/cmake, virtual/pkgconfig -# json dev-util/ragel -# pygments.rb python 2.7+ -# execjs net-libs/nodejs, or any other JS runtime -# pg dev-db/postgresql -# mysql virtual/mysql -# -GEMS_DEPEND=" - dev-libs/icu - dev-libs/libxml2 - dev-libs/libxslt - dev-util/ragel - net-libs/nodejs - postgres? ( >=dev-db/postgresql-9.1:* ) - mysql? ( virtual/mysql ) - kerberos? ( virtual/krb5 )" -CDEPEND=" - dev-util/cmake - virtual/pkgconfig" -DEPEND="${GEMS_DEPEND} - >=dev-vcs/gitlab-shell-2.6.9 - dev-vcs/git - ~dev-vcs/gitlab-workhorse-0.5.1 - kerberos? ( !app-crypt/heimdal ) - rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/23 )" -RDEPEND="${DEPEND} - >=dev-db/redis-2.8 - virtual/mta - systemd? ( sys-apps/systemd:0= )" -ruby_add_bdepend " - virtual/rubygems - >=dev-ruby/bundler-1.0" - -# -# fix-sendmail-config: -# Fix default settings to work with ssmtp that doesn't know '-t' argument. -# -RUBY_PATCHES=( - "${PN}-fix-sendmail-config.patch" -) - -MY_NAME="gitlab" -MY_USER="git" # should be same as in gitlab-shell - -DEST_DIR="/opt/${MY_NAME}" -CONF_DIR="/etc/${MY_NAME}" -LOGS_DIR="/var/log/${MY_NAME}" -TEMP_DIR="/var/tmp/${MY_NAME}" - -# When updating ebuild to newer version, check list of the queues in -# https://gitlab.com/gitlab-org/gitlab-ce/blob/v${PV}/bin/background_jobs -SIDEKIQ_QUEUES="post_receive,mailers,archive_repo,system_hook,project_web_hook,gitlab_shell,incoming_email,runner,common,default" - -all_ruby_prepare() { - # fix paths - local satellites_path="${TEMP_DIR}/repo_satellites" - local repos_path=/var/lib/git/repositories - local shell_path=/usr/share/gitlab-shell - sed -i -E \ - -e "/satellites:$/,/\w:$/ s|(\s*path:\s).*|\1${satellites_path}/|" \ - -e "/gitlab_shell:$/,/\w:$/ s|(\s*path:\s).*|\1${shell_path}/|" \ - -e "/gitlab_shell:$/,/\w:$/ s|(\s*repos_path:\s).*|\1${repos_path}/|" \ - -e "/gitlab_shell:$/,/\w:$/ s|(\s*hooks_path:\s).*|\1${shell_path}/hooks/|" \ - config/gitlab.yml.example || die "failed to filter gitlab.yml.example" - - local run_path=/run/${MY_NAME} - sed -i -E \ - -e "s|/home/git/gitlab/tmp/(pids\|sockets)|${run_path}|" \ - -e "s|/home/git/gitlab/log|${LOGS_DIR}|" \ - -e "s|/home/git/gitlab|${DEST_DIR}|" \ - config/unicorn.rb.example || die "failed to filter unicorn.rb.example" - - sed -i \ - -e "s|/home/git/gitlab/tmp/sockets|${run_path}|" \ - lib/support/nginx/gitlab || die "failed to filter nginx/gitlab" - - # modify default database settings for PostgreSQL - sed -i -E \ - -e 's|(username:).*|\1 gitlab|' \ - -e 's|(password:).*|\1 gitlab|' \ - -e 's|(socket:).*|\1 /run/postgresql/.s.PGSQL.5432|' \ - config/database.yml.postgresql \ - || die "failed to filter database.yml.postgresql" - - # rename config files - mv config/gitlab.yml.example config/gitlab.yml - mv config/unicorn.rb.example config/unicorn.rb - - local dbconf=config/database.yml - if use postgres && ! use mysql; then - mv ${dbconf}.postgresql ${dbconf} - rm ${dbconf}.mysql - elif use mysql && ! use postgres; then - mv ${dbconf}.mysql ${dbconf} - rm ${dbconf}.postgresql - fi - - # remove useless files - rm -r lib/support/{deploy,init.d} - use unicorn || rm config/unicorn.rb -} - -all_ruby_install() { - local dest=${DEST_DIR} - local conf=${CONF_DIR} - local logs=${LOGS_DIR} - local temp=${TEMP_DIR} - - # prepare directories - diropts -m750 - dodir ${logs} ${temp} - - diropts -m755 - dodir ${conf} ${dest}/public/uploads - - dosym ${temp} ${dest}/tmp - dosym ${logs} ${dest}/log - - # install configs - insinto ${conf} - doins -r config/* - dosym ${conf} ${dest}/config - - echo 'export RAILS_ENV=production' > "${D}/${dest}/.profile" - - # remove needless dirs - rm -Rf config tmp log - - # install the rest files - # using cp 'cause doins is slow - cp -Rl * "${D}/${dest}"/ - - # install logrotate config - dodir /etc/logrotate.d - cat > "${D}/etc/logrotate.d/${MY_NAME}" <<-EOF - ${logs}/*.log { - missingok - delaycompress - compress - copytruncate - } - EOF - - ## Install gems via bundler ## - - cd "${D}/${dest}" - - local without="development test aws" - local flag; for flag in mysql postgres unicorn kerberos; do - without+="$(use $flag || echo ' '$flag)" - done - local bundle_args="--deployment ${without:+--without ${without}}" - - use "rugged_use_system_libraries" && export RUGGED_USE_SYSTEM_LIBRARIES="YES" - - einfo "Running bundle install ${bundle_args} ..." - ${RUBY} /usr/bin/bundle install ${bundle_args} || die "bundler failed" - - # clean gems cache - rm -Rf vendor/bundle/ruby/*/cache - rm -Rf vendor/bundle/ruby/*/bundler/gems/charlock_holmes-dde194609b35/.git - - # fix permissions - fowners -R ${MY_USER}:${MY_USER} ${dest} ${temp} ${logs} - - ## RC script ## - - if use systemd ; then - ewarn "Beware: systemd support has not been tested, use at your own risk!" - systemd_dounit "${FILESDIR}/gitlab-sidekiq.service" - systemd_dounit "${FILESDIR}/gitlab-unicorn.service" - systemd_dounit "${FILESDIR}/gitlab-workhorse.service" - systemd_dounit "${FILESDIR}/gitlab-mailroom.service" - systemd_dotmpfilesd "${FILESDIR}/gitlab.conf" - else - local rcscript=gitlab-sidekiq-8.2.init - use unicorn && rcscript=gitlab-unicorn-8.2.init - - cp "${FILESDIR}/${rcscript}" "${T}" || die - sed -i \ - -e "s|@USER@|${MY_USER}|" \ - -e "s|@GITLAB_BASE@|${dest}|" \ - -e "s|@LOGS_DIR@|${logs}|" \ - -e "s|@QUEUES@|${SIDEKIQ_QUEUES}|" \ - "${T}/${rcscript}" \ - || die "failed to filter ${rcscript}" - - newinitd "${T}/${rcscript}" "${MY_NAME}" - fi -} - -pkg_postinst() { - elog "If this is an update from a previous version, stop your GitLab" - elog "instance and issue the following command to perform all required" - elog "migrations:" - elog " emerge --config \"=${CATEGORY}/${PF}\"" - elog "PLEASE NOTE: It's HIGHLY recommended to backup your database" - elog "before running the config phase!" - elog - elog "If this was a fresh install, follow these steps:" - elog - elog "1. Configure your GitLab's settings in ${CONF_DIR}/gitlab.yml." - elog - elog "2. Configure your database settings in ${CONF_DIR}/database.yml" - elog " for \"production\" environment." - elog - elog "3. Then you should create a database for your GitLab instance, if you" - elog "haven't done so already." - elog - if use postgres; then - elog "If you have local PostgreSQL running, just copy&run:" - elog " su postgres" - elog " psql -c \"CREATE ROLE gitlab PASSWORD 'gitlab' \\" - elog " NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\"" - elog " createdb -E UTF-8 -O gitlab gitlabhq_production" - elog " Note: You should change your password to something more random..." - elog - fi - elog "4. Finally execute the following command to initlize environment:" - elog " emerge --config \"=${CATEGORY}/${PF}\"" - elog " Note: Do not forget to start Redis server first!" - elog - elog "If you're running GitLab behind an SSL proxy such as nginx or Apache and" - elog "you can't login after the upgrade, be sure to read the section about the" - elog "verification of the CSRF token in GitLab's trouble-shooting guide at" - elog "http://goo.gl/5XGRGv." -} - -pkg_config() { - local shell_conf='/etc/gitlab-shell.yml' - - einfo "Checking configuration files" - - if [ ! -r "${CONF_DIR}/database.yml" ]; then - eerror "Copy ${CONF_DIR}/database.yml.* to" - eerror "${CONF_DIR}/database.yml and edit this file in order to configure your" - eerror "database settings for \"production\" environment."; die - fi - - # check gitlab-shell configuration - if [ -r ${shell_conf} ]; then - local shell_repos_path="$(ryaml ${shell_conf} repos_path)" - local gitlab_repos_path="$(ryaml ${CONF_DIR}/gitlab.yml \ - production gitlab_shell repos_path)" - - if [ ! "${shell_repos_path}" -ef "${gitlab_repos_path}" ]; then - eerror "repos_path in ${CONF_DIR}/gitlab.yml and ${shell_conf}" - eerror "must points to the same location! Fix the repos_path location and" - eerror "run this again."; die - fi - else - ewarn "GitLab Shell checks skipped, could not find config file at" - ewarn "${shell_conf}. Make sure that you have gitlab-shell properly" - ewarn "installed and that repos_path is the same as in GitLab." - fi - - local email_from="$(ryaml ${CONF_DIR}/gitlab.yml production gitlab email_from)" - local git_home="$(egethome ${MY_USER})" - - # configure Git global settings - if [ ! -e "${git_home}/.gitconfig" ]; then - einfo "Setting git user" - su -l ${MY_USER} -c " - git config --global user.email '${email_from}'; - git config --global user.name 'GitLab'" \ - || die "failed to setup git name and email" - fi - - if [ ! -d "${DEST_DIR}/.git" ]; then - # create dummy git repo as workaround for - # https://github.com/bundler/bundler/issues/2039 - einfo "Initializing dummy git repository to avoid false errors from bundler" - su -l ${MY_USER} -c " - cd ${DEST_DIR} - git init - git add README.md - git commit -m 'Dummy repository'" >/dev/null - fi - - ## Initialize app ## - - local RAILS_ENV="production" - local RUBY=${RUBY:-/usr/bin/ruby} - local BUNDLE="${RUBY} /usr/bin/bundle" - - local dbname="$(ryaml ${CONF_DIR}/database.yml production database)" - - if [ -f "${DEST_DIR}/.secret" ]; then - local update=true - - einfo "Migrating database ..." - exec_rake db:migrate - - # https://github.com/gitlabhq/gitlabhq/issues/5311#issuecomment-31656496 - einfo "Migrating iids ..." - exec_rake migrate_iids - - einfo "Cleaning old precompiled assets ..." - exec_rake assets:clean - - einfo "Cleaning cache ..." - exec_rake cache:clear - else - local update=false - - einfo "Initializing database ..." - exec_rake gitlab:setup - fi - - einfo "Precompiling assests ..." - exec_rake assets:precompile - - if [ "${update}" = 'true' ]; then - ewarn - ewarn "This configuration script runs only common migration tasks." - ewarn "Please read guides on" - ewarn " https://github.com/gitlabhq/gitlabhq/blob/master/doc/update/" - ewarn "for any additional migration tasks specific to your previous GitLab" - ewarn "version." - fi -} - -ryaml() { - ruby -ryaml -e 'puts ARGV[1..-1].inject(YAML.load(File.read(ARGV[0]))) {|acc, key| acc[key] }' "$@" -} - -exec_rake() { - local command="${BUNDLE} exec rake $@ RAILS_ENV=${RAILS_ENV}" - - echo " ${command}" - su -l ${MY_USER} -c " - export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 - cd ${DEST_DIR} - ${command}" \ - || die "failed to run rake $@" -}