From e233c14c0fa45410d7294b536665ca6f23703df3 Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Mon, 19 Feb 2018 01:17:56 +0100 Subject: [PATCH 1/4] www-servers/gitlab-gitaly: Add ebuild for version 0.66.0 Package-Manager: Portage-2.3.19, Repoman-2.3.6 --- www-servers/gitlab-gitaly/ChangeLog | 8 ++++ www-servers/gitlab-gitaly/Manifest | 6 ++- ...italy-0.66.0-fix-config.toml.example.patch | 43 +++++++++++++++++++ .../files/gitlab-gitaly-0.66.0.conf | 9 ++++ .../files/gitlab-gitaly-0.66.0.init | 20 +++++++++ .../gitlab-gitaly/gitlab-gitaly-0.66.0.ebuild | 40 +++++++++++++++++ 6 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 www-servers/gitlab-gitaly/files/0002-gitlab-gitaly-0.66.0-fix-config.toml.example.patch create mode 100644 www-servers/gitlab-gitaly/files/gitlab-gitaly-0.66.0.conf create mode 100644 www-servers/gitlab-gitaly/files/gitlab-gitaly-0.66.0.init create mode 100644 www-servers/gitlab-gitaly/gitlab-gitaly-0.66.0.ebuild diff --git a/www-servers/gitlab-gitaly/ChangeLog b/www-servers/gitlab-gitaly/ChangeLog index a9e3ca9..54f7e45 100644 --- a/www-servers/gitlab-gitaly/ChangeLog +++ b/www-servers/gitlab-gitaly/ChangeLog @@ -1,3 +1,11 @@ +*gitlab-gitaly-0.66.0 (19 Feb 2018) + + 19 Feb 2018; Manuel Friedli + +files/0002-gitlab-gitaly-0.66.0-fix-config.toml.example.patch, + +files/gitlab-gitaly-0.66.0.conf, +files/gitlab-gitaly-0.66.0.init, + +gitlab-gitaly-0.66.0.ebuild: + www-servers/gitlab-gitaly: Add ebuild for version 0.66.0 + *gitlab-gitaly-0.59.2 (17 Feb 2018) 17 Feb 2018; Manuel Friedli diff --git a/www-servers/gitlab-gitaly/Manifest b/www-servers/gitlab-gitaly/Manifest index 30ec059..9ed2186 100644 --- a/www-servers/gitlab-gitaly/Manifest +++ b/www-servers/gitlab-gitaly/Manifest @@ -4,8 +4,11 @@ AUX 0002-gitlab-gitaly-0.11.2-fix-config.toml.example.patch 700 SHA256 7f5c3f840 AUX 0002-gitlab-gitaly-0.35.0-fix-config.toml.example.patch 1015 SHA256 44cd87bb35224634ef9832f2d1e79de2ab27580101665a049eaf20f5ffae590d SHA512 9110e6f42babac04c98227ecfff3a961ec35fe6c487559e5a638676f409dbf6b0b133524b092322085cb7c7c41c5fc729c7b6be80bae10931efd5785172f01b2 WHIRLPOOL 8b0f1aa8c8c9c2ea4a8a5dbfd1e5a00603d587209b0967be82a9d78d0eabe4d350ac44fce80bfc9dac77ea2c0ff5d0f954e8cb4fb50ee778fb636599b1d8456f AUX 0002-gitlab-gitaly-0.43.1-fix-config.toml.example.patch 1095 SHA256 3e9558a127675bca052a9219265572504729380087665f2cd681c44d5545f101 SHA512 1ee6b6a127a6f7e82970c2e4270b42427a88bfbca5ba9d979d6667381d2a6cf934c77cc6e2f47af24a2810e0427285565bc42a0d26c36649a9177b917ac5a424 WHIRLPOOL f96a7dd2952d5a8d7652d5e6966c4e2d85c3a9785e824108068fab158f5871cd1a0ca0f88f563478c4f937ba2d9e3df489611d07c092ff0c4c9b6668f0abb5fb AUX 0002-gitlab-gitaly-0.59.2-fix-config.toml.example.patch 1183 SHA256 edd4dc6f1d1b56bfc902d79c0abb2d3b85b69cfe3b90e4250b804fafe00f49c3 SHA512 4a9bf3222e442fcd76cf62921a7f184e67784532c2c4706f3f7d3d1b7a13c874520dba6ef629d93aa1514ce3483827d1a11cf7a04ae530fb4ed67844be1e9353 WHIRLPOOL a93af879b93415470e41449390388f908dba17dc1ea5f4e47e5bbe80fcac11f85c64ce18899aa2ee084438598e24e2ddc72076c0d63bd8fc61de4f2ee8ee2cc0 +AUX 0002-gitlab-gitaly-0.66.0-fix-config.toml.example.patch 1309 SHA256 1fd8a1d8b15b713a53f9d5fc34be9a3c7bc081724f9e3fde582213fbdfe047cd SHA512 33ae00c2fadf085e5a1e12e48155144369fdf9db0fb7547a1d0695e903eb17859985d48af5765a544c68fa9186de23c7228348a38c431202e65deee26c3d3953 WHIRLPOOL 28c85bc36d3c42460dc2044245b71181ec6fa72737d2f2ccb565fc5b3a7e8e51f3315e166cc3067709f90ffd0ad489fe1745790036bb18be4dc8c8bc3377098c AUX gitlab-gitaly-0.11.2.conf 289 SHA256 da2640e0ac6a3f356d68f2825c78a1965703df292cd6631b2e884e1a9c7ecc87 SHA512 86f2b4dd283de117c3a371a98a1472d248a21a2c931be6644bec2406249e000fe2e55d031b523d6e64fa2eaa3addad27704f338f65cad6b559680c5c327b9614 WHIRLPOOL 18cb38b35c9a79c6eaaa15ed9bbbeb6dc502a0291f3bff2bf1f59a950556c4c3fd3742a4097ab784c1e9a12d2209b336f2bf688b0888e13bb1b7f78219bb6d87 AUX gitlab-gitaly-0.11.2.init 631 SHA256 32257b9e72c2ee201e5104f6eafc134920237f0f5465110edda4778dd92c17a2 SHA512 a0bf57f392a75b1a2875837ec1ad47b61317c6ae530d12e60ae3f62f69b0fb8ef48499b31751fab788df1a6ab842926a73443795a5888258f62e473e2953299a WHIRLPOOL 8185d1927c021be4b3de7c4e0228c68cba558b35c0894c6b17de7f24ebc42dd771593b2d9169f27c5a1ada90e14b2fdb651521ddf39660a77dece586c7f1d348 +AUX gitlab-gitaly-0.66.0.conf 319 SHA256 a5c264800874973e62abd163e5e9144ab698192fc5aaf62aa06488e4727bc54b SHA512 5c0548ba52cfac02388d45f1b88c7bd43df1fef103ba8be1000c0e48438fbe6c1c4cfd6e6c26c1afe0f9ccbfe05b10e2dd4f13c9615ecde32cd23b496a9bb8ca WHIRLPOOL 5eb849c3b24e1e4ec0b7eba8366143f36f4ba3243f02c17102bda15bde05dc8d77ba97768b9cd0dfe9bec18d5b0eaae948622e071c30b590207ce7dac2e026df +AUX gitlab-gitaly-0.66.0.init 692 SHA256 bb5e4bc7b2e1a8ac16aa0d2a548ce924d12f5eb8e0a6cc1bc7cff331d1ca8737 SHA512 5a760d58c4f96db585d2008964e3407393ce6547ded05d92d0ffa4ea62c691caf1c261543f3004bb45c14288603858768fcae9a817a4293e0454d2319e303975 WHIRLPOOL d87fef85569ba648d6713104f259276b2a377cb5657c7350c96fbb83f63d0ccc5d94c4a5a41cab4e0c01702fec9b9e52aae420d7a22abbb63c090072e603a518 DIST gitlab-gitaly-0.10.0.tar.bz2 693273 SHA256 44a4a68beb75b464b35fd003cf47a9bc483bb6bbcc8ab4bd4ef87a75329a3747 SHA512 1d7b2d38d68ceaacde03d0ba2cbec19f730527af6a0d56fd92c03f41a4d11c4e5db5c5cc2bd363a8ccfc0f5bf3fb678aec4b17e5996ccc7f1898a78e4598cc1a WHIRLPOOL 737ff05c6992e90eab9ba38a721cf699d87ea1ef84005dbaa16d37ef3c33cec9607571b0421412bba3efd2bf88267ff7d624e57ac92cc08b14c3b8801779c455 DIST gitlab-gitaly-0.3.0.tar.bz2 621097 SHA256 60404ae78b6551e7258a30fa615d7d8c200b84f161ecf904e034db3839391766 SHA512 ad50d15f4a97bf5dd2cc64830840041d8537bd251176eb8964cda3fdb6ef6e1bf3c8b7773516c6e1d51005cc0a718a1bc3ca95fc9ee5d0826c3f9690e1235bb6 WHIRLPOOL 364cdc3407d5fef6ac48a67f8bdd477b75300069be2cbf2567aa73ea7406256ea3c15a27c7a13f92d17c6b63f5923d4e737437bdd3a1e8b808de1832cc9c1af8 DIST gitlab-gitaly-0.6.0.tar.bz2 687192 SHA256 ead87c0da129c075011a55e5b2138febf11fd5146dd62763fc9d4b5d8725840d SHA512 f1e8e337192af02b42087604eb90fab3af73ef3753a07af368b1784462a0c1f8b1d166952b8d4e9c25c93228625195be42b4d3dfad0a70bea0520956acf2522f WHIRLPOOL 283899fb6c3fed332731d06ea42cf76ee5de433849b0784eb78b76391d15ca5feeb36fa9d28f3a90962f378c1c485eb0653a62090dbb6aae8bc87965d534da34 @@ -19,5 +22,6 @@ EBUILD gitlab-gitaly-0.43.1.ebuild 1073 SHA256 594e68b869e53fe6fbdcf8fdade3889f5 EBUILD gitlab-gitaly-0.52.1.ebuild 1073 SHA256 594e68b869e53fe6fbdcf8fdade3889f55883b8b4ab17a2b064b3fd12a1ef739 SHA512 e3e7f045aa0565267bb516f685685c704841b5186dcca1282274ddd9392b734ac7808cb99d587ced3c87a357dc5af02bca99056386f0db0f9ecd07bba9e6e18e WHIRLPOOL 1329e9b461fe5c7386aa127a815602c655f8411a030537de9a247ea033723cfd60eb00a38e39cb775c985607b90b0e30fe55a9ef6856b49204a2ddc8427afa1c EBUILD gitlab-gitaly-0.59.2.ebuild 1073 SHA256 a9899ddb752550e82510d101a93286cb6b872b8faa53d008e55af3ddc2d2e685 SHA512 da7ba77fe0a9234c5e4f5994a3c7fa9c11a93cdd6f9cff3ab5a658f6a9385a0bea8f00cee878a43c9580632c9837c305b293e8609f3e284b958f7b514ef10c81 WHIRLPOOL e4b12a160c2cfc08da4fd36fcbde8dcd1f383acbd5211c50dfcea1610e4e5105ca9720f9f8c34a7ab41fe2c33a77d3129ae527fd94f3b8d0259e9c2e4ec9a027 EBUILD gitlab-gitaly-0.6.0.ebuild 769 SHA256 601ca500d12250325bf6f924d53b28cb120cc75da9b9e1d83cd4c9317aa1ee91 SHA512 1263c919fb3c126a0ba5dda2b9da45b0a16b6bb703ec4260b11b40463fcfedd1249389272ab638d25ced351a63c0812c0cbc7ea035f9c2250d2eb79786424c2d WHIRLPOOL 261dfdd551dad839d687b2092027de33e95142e1ed7336fd6513742044ff219353743988aefad8e5da6850a8e1c8d5b44baf08c6702960a829673cfc5580e152 -MISC ChangeLog 5020 SHA256 198eaa93db9ce37a1cb442811ad6c54c72faf6c41d730bc6d88c9d59b04644a4 SHA512 26202dbd0a5907dd6bc236551023bbdb2ee75e431b52e0309a1af85cb1ac80f59a5d68f4fe86f639276224b27582acf78ff3e8bc62387086b225b1a77ded61e8 WHIRLPOOL 88a7573a71b0ee89b1d5197c8c1fd3e8dfbff55cd8858aa1ab004e3ee860a1748f3981c19d1cce7322ae80d7c06caa1cbbb49658ab18d8f3bb5e5ec26d1e3187 +EBUILD gitlab-gitaly-0.66.0.ebuild 1086 SHA256 bd5b1734d6354c2e7bbf6e815700b38c81f7325bf1d222b9c74576852529dcd3 SHA512 4fe2be263fbf16ab7f9f24f06f82d1a60b3b30322f3f72fc6ddd5a13763f137da3ce122b81d747bb8b4c733e0bb6fa7e53a51f5ce186f1690ae256b8712c41a6 WHIRLPOOL c3e34cda3ef250cefeb761e8b1b1c53fea6e22d7f21269000081f18a7858b8153256c770e01f5df1dfd43ba219172d4f74992f6244fef8ca166fb35fa6a21fc5 +MISC ChangeLog 5337 SHA256 3d8fe1b846d569b7c302b225182694bb49ac10b51f7799075232a0736c5b50d7 SHA512 6eb14e233c9064948f3ed80b0d5e4b683e27f3e5d393691c06cf581224751da19f180af253055eb6c1a2248142a165609e3230e257625d715af7818b164cf2c7 WHIRLPOOL 6862a5df874bd897d95f55b606cafaa6ea7d3ae6bf1483ea71af8e245b14e5b6740a9fa814a99b6a021e2a3feec1dfd057d4fb001cc33a47513642ec878db902 MISC metadata.xml 248 SHA256 7b43be15755627edf5c12cf1b50c607d781558640bf8375d685d51d7ade99a32 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2 WHIRLPOOL 993013c9878ead35469db13d3072f694a341ee654182e0c31d0678f5dd6de4bdc8d59a0b7bb6d685dc41ea6b55dac518cd8034131baea8002170c680e50304d1 diff --git a/www-servers/gitlab-gitaly/files/0002-gitlab-gitaly-0.66.0-fix-config.toml.example.patch b/www-servers/gitlab-gitaly/files/0002-gitlab-gitaly-0.66.0-fix-config.toml.example.patch new file mode 100644 index 0000000..3b2ca91 --- /dev/null +++ b/www-servers/gitlab-gitaly/files/0002-gitlab-gitaly-0.66.0-fix-config.toml.example.patch @@ -0,0 +1,43 @@ +diff --git a/config.toml.example b/config.toml.example +index 10f8cce..f65b5b9 100644 +--- a/config.toml.example ++++ b/config.toml.example +@@ -1,9 +1,9 @@ + # Example Gitaly configuration file + +-socket_path = "/home/git/gitlab/tmp/sockets/private/gitaly.socket" ++socket_path = "/run/gitlab/gitaly.socket" + + # The directory where Gitaly's executables are stored +-bin_dir = "/home/git/gitaly" ++bin_dir = "/usr/bin" + + # # Optional: listen on a TCP socket. This is insecure (no authentication) + # listen_addr = "localhost:9999" +@@ -19,7 +19,7 @@ bin_dir = "/home/git/gitaly" + + [[storage]] + name = "default" +-path = "/home/git/repositories" ++path = "/var/lib/git/repositories" + + # # You can optionally configure more storages for this Gitaly instance to serve up + # +@@ -40,7 +40,7 @@ path = "/home/git/repositories" + + [gitaly-ruby] + # The directory where gitaly-ruby is installed +-dir = "/home/git/gitaly/ruby" ++dir = "/var/lib/gitlab-gitaly/ruby" + + # # Gitaly-ruby resident set size (RSS) that triggers a memory restart (bytes) + # max_rss = 300000000 +@@ -53,7 +53,7 @@ dir = "/home/git/gitaly/ruby" + + [gitlab-shell] + # The directory where gitlab-shell is installed +-dir = "/home/git/gitlab-shell" ++dir = "/usr/share/gitlab-shell" + + # # You can adjust the concurrency of each RPC endpoint + # [[concurrency]] 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 new file mode 100644 index 0000000..0377216 --- /dev/null +++ b/www-servers/gitlab-gitaly/files/gitlab-gitaly-0.66.0.conf @@ -0,0 +1,9 @@ +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 new file mode 100644 index 0000000..1828380 --- /dev/null +++ b/www-servers/gitlab-gitaly/files/gitlab-gitaly-0.66.0.init @@ -0,0 +1,20 @@ +#!/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.66.0.ebuild b/www-servers/gitlab-gitaly/gitlab-gitaly-0.66.0.ebuild new file mode 100644 index 0000000..42c751f --- /dev/null +++ b/www-servers/gitlab-gitaly/gitlab-gitaly-0.66.0.ebuild @@ -0,0 +1,40 @@ +# 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" + epatch "${FILESDIR}/0002-${PN}-0.66.0-fix-config.toml.example.patch" + eapply_user +} + +src_install() { + # TODO fowners, fperms on config.toml.example + insinto "/etc/gitlab" + newins "config.toml.example" "gitaly-config.toml" + newconfd "${FILESDIR}/${PN}-0.66.0.conf" "gitlab-gitaly" + newinitd "${FILESDIR}/${PN}-0.66.0.init" "gitlab-gitaly" + into "/usr" + newbin "gitaly" "gitlab-gitaly" + + # install gitaly-ruby + insinto "/var/lib/gitlab-gitaly" + doins -r "ruby" + fperms 0755 /var/lib/gitlab-gitaly/ruby/bin/{gitaly-ruby,ruby-cd} +} From 0774052be89c861055551611a8240b6ca72e8497 Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Mon, 19 Feb 2018 01:37:29 +0100 Subject: [PATCH 2/4] dev-vcs/gitlab-shell: Add ebuild for version 5.11.0 Package-Manager: Portage-2.3.19, Repoman-2.3.6 --- dev-vcs/gitlab-shell/ChangeLog | 5 + dev-vcs/gitlab-shell/Manifest | 3 +- .../gitlab-shell/gitlab-shell-5.11.0.ebuild | 132 ++++++++++++++++++ 3 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 dev-vcs/gitlab-shell/gitlab-shell-5.11.0.ebuild diff --git a/dev-vcs/gitlab-shell/ChangeLog b/dev-vcs/gitlab-shell/ChangeLog index f399c68..0524aa2 100644 --- a/dev-vcs/gitlab-shell/ChangeLog +++ b/dev-vcs/gitlab-shell/ChangeLog @@ -1,3 +1,8 @@ +*gitlab-shell-5.11.0 (19 Feb 2018) + + 19 Feb 2018; Manuel Friedli +gitlab-shell-5.11.0.ebuild: + dev-vcs/gitlab-shell: Add ebuild for version 5.11.0 + *gitlab-shell-5.10.2 (17 Feb 2018) 17 Feb 2018; Manuel Friedli +gitlab-shell-5.10.2.ebuild: diff --git a/dev-vcs/gitlab-shell/Manifest b/dev-vcs/gitlab-shell/Manifest index 652afd8..c5c7f32 100644 --- a/dev-vcs/gitlab-shell/Manifest +++ b/dev-vcs/gitlab-shell/Manifest @@ -16,9 +16,10 @@ EBUILD gitlab-shell-5.0.4.ebuild 3654 SHA256 6227964f26e195eb914163aba910af177e9 EBUILD gitlab-shell-5.1.1.ebuild 3889 SHA256 1ec35ad363ec198c9b53974f3410401b559c56814d747941888b475f19479918 SHA512 fdbc2465617043aa2dc813624e513996c7827831abed242fa9dfb2e943825cf710ba65c0d5882a312af64e154f667a82989a787b63e61d0ea8dd81fb4accf035 WHIRLPOOL 3b231de69ff373868a4acbb4df49a6120b443db20f9ab5ecda9902a6f74539b4534a400f86d8de8564fb1d86f71f02aa48e830c18486e08700bbdc2602d2083f EBUILD gitlab-shell-5.10.0.ebuild 3927 SHA256 bfbbc8298d256f4f1051ab6c3fe59197ea933a798a521940bdae1f884b5954ff SHA512 6d2461f85b1d1232de89471f4e3fe35cbd6d59a5c644913c78c5b7cc868ab035ceec8c96b4973289fefaeb2e836edf7d7cf0bdf7c4364e6e947ba1b32b6c5b85 WHIRLPOOL e44a285e9264875cda07b3bae39fc5f17fd74f9d91927f2dc9d1cd4a34fc310ec2f73808c5096807265fe3dbd94269ce3e03e6b0d5a1ef176cd1236a1c0002ec EBUILD gitlab-shell-5.10.2.ebuild 3717 SHA256 f0733e56a42e32de7976321a41cb553e6805c7e3d3df41db7180e9a764516b3f SHA512 ae660c8f88b91bd183e786064122ae8e3504efaf5da181b9ad3c2911dd10c981767544a72380b6f23aaf7546b93bdca3e5a7679d54a2d8ee23795e800398106a WHIRLPOOL 72eac46110d8fc2550d52e73cf8577a2c9200b476b6ae1f0fc1bf225af2298b715f7ecb5d0bc3c78bfa75a9bbe39b32aeca036febdca8f8f5ede5c9260593259 +EBUILD gitlab-shell-5.11.0.ebuild 3717 SHA256 f0733e56a42e32de7976321a41cb553e6805c7e3d3df41db7180e9a764516b3f SHA512 ae660c8f88b91bd183e786064122ae8e3504efaf5da181b9ad3c2911dd10c981767544a72380b6f23aaf7546b93bdca3e5a7679d54a2d8ee23795e800398106a WHIRLPOOL 72eac46110d8fc2550d52e73cf8577a2c9200b476b6ae1f0fc1bf225af2298b715f7ecb5d0bc3c78bfa75a9bbe39b32aeca036febdca8f8f5ede5c9260593259 EBUILD gitlab-shell-5.3.1.ebuild 3889 SHA256 be4349d3faccc8bda7ec85ad68204de0d525feef55ab9159ba293810ab4c7162 SHA512 2922c2271cb66220432ea0c79b74b2b1015cb55eed3c98845bb8ac15ca6ca2846579802bd832e9b3fa188879b613aada0bdeeca47fce29a6c7bf8d51242e7d6e WHIRLPOOL 2f0aea6989a00f07452e4097436596517bee8fab5b557f2a373d185b76eeeef40c8753e32b32d40f08070cba28e7b59ba86278bf665fa9e19260e799f44d5eb0 EBUILD gitlab-shell-5.8.0.ebuild 3908 SHA256 6f144e30269af1f4b608258da78553f64a1c6fb4e4ad532de4adcc4d93c8962d SHA512 e9131c8d9361a7321837c996b098b515b15cbd93c15067c000a5811d313fb167432bc415a5327a110adc6a92009d52cad78f12311552042c1b214b5df3eae9ba WHIRLPOOL e16d0ea02eceea491c8bc079cd1d4932d83340f1db3a9e249960b57e550ed65903610f0541d89ef616561f83f4c7fc771b1aedd115e48b80c62e72f62d7dbc3a EBUILD gitlab-shell-5.9.0.ebuild 3908 SHA256 91618dfa168fff385eb362572c8e65e1f72464ea4240b03e60cb554f7c872a8d SHA512 c16e5176dcfc866a696c4b1096b17bf15437ee77db92f28de79990688f146fa38ca2d345d1b3138072626086242f6c3e044a345435ea11ebd0455c3115c8bafe WHIRLPOOL 0b3d586d6c991a20c806ca5a53437aa8eb79eabfa64a26fb839d493052ae2d752dc65ec9626c3c7f62d6de9182d31870eb99c6018f6d490a30962f0b823eccd1 EBUILD gitlab-shell-5.9.3.ebuild 3908 SHA256 27290b4d2d5ceacaf991026c149ea2e1eaa270959490d9a8850596c8e7b4afed SHA512 daa5328dd238804860f8aa52cc4b09c484fc1477dfa6e60aa2fb424e27cc69121dea2c677e02832613ce0bc0023b9b23fe91c53dd455cbe689c6c09bb342138e WHIRLPOOL 8fa05924b1405f79656da46cfe7d22f1631a10ef19629f75fafdec11fe7b6d6fbc0db80ae2a31c81d3c11a9b412f39aa25234e7d5e318b6f4ebbd305af3f6781 -MISC ChangeLog 5572 SHA256 7f452659054ce68f9c7311c0e8e41d9437fb6f979d8dcd76c59c3e6a7c7cb56f SHA512 c8cacc1cdfe073a04e130ea6b310d2356efff90aee29a2589dc7d3ec4e77f048638463afabcc3ff9f45908994f38b32c3afc30477e6ddd6c75f3311c51ad2739 WHIRLPOOL 00c7af0fd46690c9eae9c21c25e7be1272a7dd5be1a2390fe98503f63e8b7b873a6c5482eee395476856ff80af69e32c6dfc8e9a6d2b70f09f991b0a53353979 +MISC ChangeLog 5744 SHA256 ec69305ea0a610a6dc7b14eab01fec6919a930ffeaeb12765e69e448298838c8 SHA512 c5a04ef09d44b0d6c4926d4f428482641a9c282655bc5d50f50501a53ddebdebef599b4b9db7494f9ba02d05ae5e09a705ba0f6d1ea920fed54661f978ae4559 WHIRLPOOL 37ea329706b43fbedd949fc6553a332a8f1c01c2bb03708fab0bcabdd88ba7f63411d42ed8f6be3239eaf408bf97d583af72dd4a852a4e631109f8b513d89432 MISC metadata.xml 248 SHA256 7b43be15755627edf5c12cf1b50c607d781558640bf8375d685d51d7ade99a32 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2 WHIRLPOOL 993013c9878ead35469db13d3072f694a341ee654182e0c31d0678f5dd6de4bdc8d59a0b7bb6d685dc41ea6b55dac518cd8034131baea8002170c680e50304d1 diff --git a/dev-vcs/gitlab-shell/gitlab-shell-5.11.0.ebuild b/dev-vcs/gitlab-shell/gitlab-shell-5.11.0.ebuild new file mode 100644 index 0000000..75e1d1c --- /dev/null +++ b/dev-vcs/gitlab-shell/gitlab-shell-5.11.0.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +USE_RUBY="ruby23" + +EGIT_REPO_URI="https://gitlab.com/gitlab-org/gitlab-shell.git" +EGIT_COMMIT="v${PV}" + +inherit eutils git-r3 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="" + +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" +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 +} + +src_prepare() { + epatch "${FILESDIR}/0001-${PN}-4.1.1-config-paths.patch" + epatch "${FILESDIR}/0002-${PN}-5.1.1-Makefile.patch" + # 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" + eapply_user +} + +src_install() { + # install lib + insinto ${DEST_DIR}; doins -r lib LICENSE README.md VERSION + + # install scripts + exeinto ${DEST_DIR}/bin; doexe bin/* + exeinto ${DEST_DIR}/hooks; doexe hooks/* + exeinto ${DEST_DIR}/support; doexe support/* + + # create symlinks to bin + local name; for name in $(basename -a bin/gitlab-*); do + dosym "${DEST_DIR}/bin/${name}" "/usr/bin/${name}" + done + + insinto $(dirname ${CONF_FILE}) + newins config.yml.example $(basename ${CONF_FILE}) + + # create symlink for .gitlab_shell_secret + einfo "creating symlink for .gitlab_shell_secret" + TOKEN_FILE="${DEST_DIR}/.gitlab_shell_secret" + dosym ../../../opt/gitlab/.gitlab_shell_secret "${TOKEN_FILE}" + + # Gitaly stupidly hardcodes the path to config.yml :( + MY_CONF_FILE="${DEST_DIR}/config.yml" + dosym "${CONF_FILE}" "${MY_CONF_FILE}" + + # prepare directories + diropts -m750; dodir ${DATA_DIR} + diropts -m770; keepdir ${DATA_DIR}/repositories + diropts -m755; dodir ${LOGS_DIR} + + # GitLab stupidly expects that gitlab-shell is in home of git user... + dosym ${DEST_DIR} ${DATA_DIR}/gitlab-shell + + # fix permissions + fowners -R ${GIT_USER}:${GIT_USER} ${DATA_DIR} ${LOGS_DIR} +} + +pkg_postinst() { + # check git home directory + local git_home=$(egethome ${GIT_USER}) + if [ ! "${git_home}" -ef ${DATA_DIR} ]; then + ewarn "An authorized_keys is configured to be inside ${DATA_DIR}/.ssh," + ewarn "but HOME of ${GIT_USER} user is located in ${git_home}. You must" + ewarn "either change the authorized_keys location in ${CONF_FILE}," + ewarn "or change home directory of ${GIT_USER} user to ${DATA_DIR}" + ewarn "and move ${git_home}/.ssh here." + ewarn + fi + + local auth_dir="${git_home}/.ssh" + + elog "Initializing authorized_keys file in ${auth_dir}" + mkdir -p ${auth_dir} + touch ${auth_dir}/authorized_keys + chmod -R u=rwX,go=- ${auth_dir} + chown -R ${GIT_USER}:${GIT_USER} ${auth_dir} + + elog + elog "GitLab Shell was initialized. Repositories are located in" + elog "${DATA_DIR}/repositories, scripts in ${DEST_DIR}/bin." + elog "All gitlab-* scripts was symlinked to /usr/bin to be on your path." + elog + elog "You should change your gitlab_url in: ${CONF_FILE}." +} From b351ca733ad6dc8d59b4c3ee4335dc1a29ade880 Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Mon, 19 Feb 2018 02:41:50 +0100 Subject: [PATCH 3/4] www-apps/gitlab-ce: Add ebuild for version 10.4.4. Package-Manager: Portage-2.3.19, Repoman-2.3.6 --- www-apps/gitlab-ce/ChangeLog | 8 + www-apps/gitlab-ce/Manifest | 6 +- .../08-gitlab-ce-10.4.4-general-config.patch | 96 ++++ .../files/gitlab-10.4.4-sidekiq.init | 64 +++ .../files/gitlab-10.4.4-unicorn.init | 157 +++++++ www-apps/gitlab-ce/gitlab-ce-10.4.4.ebuild | 430 ++++++++++++++++++ 6 files changed, 760 insertions(+), 1 deletion(-) create mode 100644 www-apps/gitlab-ce/files/08-gitlab-ce-10.4.4-general-config.patch create mode 100644 www-apps/gitlab-ce/files/gitlab-10.4.4-sidekiq.init create mode 100644 www-apps/gitlab-ce/files/gitlab-10.4.4-unicorn.init create mode 100644 www-apps/gitlab-ce/gitlab-ce-10.4.4.ebuild diff --git a/www-apps/gitlab-ce/ChangeLog b/www-apps/gitlab-ce/ChangeLog index 2048bf1..df6f533 100644 --- a/www-apps/gitlab-ce/ChangeLog +++ b/www-apps/gitlab-ce/ChangeLog @@ -1,3 +1,11 @@ +*gitlab-ce-10.4.4 (19 Feb 2018) + + 19 Feb 2018; Manuel Friedli + +files/08-gitlab-ce-10.4.4-general-config.patch, + +files/gitlab-10.4.4-sidekiq.init, +files/gitlab-10.4.4-unicorn.init, + +gitlab-ce-10.4.4.ebuild: + www-apps/gitlab-ce: Add ebuild for version 10.4.4. + *gitlab-ce-10.3.7 (17 Feb 2018) 17 Feb 2018; Manuel Friedli +gitlab-ce-10.3.7.ebuild: diff --git a/www-apps/gitlab-ce/Manifest b/www-apps/gitlab-ce/Manifest index 63b7338..c5b7455 100644 --- a/www-apps/gitlab-ce/Manifest +++ b/www-apps/gitlab-ce/Manifest @@ -9,6 +9,9 @@ AUX 04-gitlab-ce-9.3.0-fix-check-task.patch 1090 SHA256 51ade91e5e7ef67e6d3c0e6e AUX 05-gitlab-ce-9.0.0-replace-sys-filesystem.patch 2436 SHA256 53fcd9fc123a0fcb671a8cbcb3b2dc61765e32be6836206ae0edea8cf0ae8203 SHA512 21636f298df7e762f59595f39fb50266f8737311f37aa2b9ba96bc29190b8a67eea01b09e3b589d0885da6b27beaa136fa66c7d98408a8e3ecb3ac6baf20d891 WHIRLPOOL e0c709dfc5f72e33207fd7d62a7db5a85c0ed4b6064d5d6a13bcce7d660d9ba144fe09d0985c16c313f06a4e02911729be132086735eac47ddff981874f31acc AUX 06-gitlab-ce-8.17.0-fix-webpack-config.patch 614 SHA256 0c1cdc25032322eff6c279435ba5f3fc349b30de0d55d86fad2616bd2bb7fef4 SHA512 f5ccb4d1849ab395ba4ec3c80735a1fedd9fa7f790c8b114d8dc8d1fc2c431d7b9e5645247485f0b8c1061a00ed61c21a5e50f49af0d76e232182c68868a163f WHIRLPOOL 6968ddefed74607c36cc66dc133dbf4942979d2ae867f819cf2e7e5c9701fe8dd86b266d923e6343971e6904f0ad1f35200971660df139edabcc9e0790fc107c AUX 07-gitlab-ce-10.0.7-yarn.patch 36442 SHA256 b45cfd739ca94058987c55458c89dba4cdbb1b9b9fc2e486d02e67e275044855 SHA512 931edab62e1218f84f08db72cc2f4ff95e53c6f88d755224de5e9dd19c230bb4b4c808accebd14c7bb06e6c57e4f101f7b4fb1843abb9a908d7f9f2b901d4e5f WHIRLPOOL 0f0ba8a1dfb38355bedebb17a8d174fa33a695be9da364bfebf3ffc5629eff5f462a9b66af65ad0fcc3b35f93c67c4b15a93e1962ae32225dbed45c87b30c5b1 +AUX 08-gitlab-ce-10.4.4-general-config.patch 4074 SHA256 f020ebd86ad81a35ed8a39d2072a7cdb9bd0f121c80a3e01b94a9343dccfb1c3 SHA512 58e267ba55d3db89f88a7a47e871eaa97ec14aca2fb1a5140d1debbad5929551a2c1dd7c5a7b5e8b983fea56a636e504df30d253b6ab68dc4b457419734561b6 WHIRLPOOL c43cef9d469d3a6b1219fbc856bfa34a081707fc80cd73ea2936850aebe3249bf924f00da6bcbacee4bbc612f9bdc2b959d75478ec55202927517a276837567e +AUX gitlab-10.4.4-sidekiq.init 1461 SHA256 99fd95716abde96f9a031cb22e04371c7dfe6bf53440154dcf94be9477d1a6f8 SHA512 8d536a3db5af3bdf04b92e0c1e9e9d65aacb3dff244729d32f28b8dd66f586cbd5a2e60b3e2f58c2be96c0c09708dc21275adca3f89fbdfa20e000e9563ee880 WHIRLPOOL e47f69b06fd0d60837fc7cab03eb4c4cf9111597b7b3e81c3c35b7fc83be12f85ac26ad6693ff30c95b91a998b0685128b303df5aa97ab7835f575ce199f141b +AUX gitlab-10.4.4-unicorn.init 4068 SHA256 a29c2741626fae15156117786d7ab63f4c68c5357d28c257a9da8e6d92ce71d7 SHA512 0dce3a14f113776bacb86eac602726a70ba3f71ee1a9310c7a2f427a658622b94e0550564360339b044a58c2db52ed6782de7675aa622b2ab9016ed93261b22a WHIRLPOOL 58a4c3328665dffcf9f96a2eeee495b9dcd550a41c26d8e256b44ca6ad247a84c909838e31f8de8673f94d767c077bb253c20f3a4321abe7d5de937f680ec215 AUX gitlab-8.13.0-sidekiq.service 990 SHA256 183ccbdb19a3dcc74cf1f1f865bf396466e06f7408ff7d3e92359b2a0e83f24c SHA512 c356baf65337739b08a0a4bfe24d3b68f557e9d6d95f479b39ec954ee6c2077e380f99d1e9e9390f5b038e093c0a46562f651512a6578dfa86977580159470a2 WHIRLPOOL 81d9ea9febf47d5fdb9c49a54bbc499bd796fc56bc1c16404fe4c74d00c4bb9fa9631e4cd4cf88d3c30a44c04b74b35a61cd4da9f2139a4abf61e758b4e5949a AUX gitlab-8.13.3-sidekiq.init 1459 SHA256 fdf808f9c0a92d7a77ae8be27c8fc11cec571ec6b5b94e31639028eec19546f1 SHA512 ec2130483b603f2be423c288fd0d55615c831ce995a8a5509f0240f149b3464d8f0a75cade1c736d085fb5f898d109368af62d8fdfb280aa00c4df8c06abb1e9 WHIRLPOOL d3493ac268257386e22c677337c8f9b1050212fce4aa855119b2ccd5f56850a5288d0cdd74e3c2f34552f59f9431c9ab5080e372766b88de003cad5dab015100 AUX gitlab-8.13.3-unicorn.init 3562 SHA256 f4ae5b785d61fb2c463b2405533d5e9a2209bbff7a085106b463f59505123287 SHA512 4af87415da7e482725a6f97f5e2ffafe0d16784cdcf3f877c99b5f646832c14dd1b3e875ec00e57560060bf3c049dd7fd0aeb7452db1100740e6b17dc29fdfb6 WHIRLPOOL a63d236a76bcbbd6e39268c76a7fbb75f4b9e5488d0cbc0bb2973ae09753f11d1863e477fe88f6c652370c19c3a0f037f99cc681b91679eb4da992db5e2eff20 @@ -36,6 +39,7 @@ EBUILD gitlab-ce-10.0.7.ebuild 13568 SHA256 c164db3f0af93824bb97992b20b0bc5415bb EBUILD gitlab-ce-10.1.7.ebuild 13679 SHA256 9c1bec7e86d46422f87baecaece80197c506b758eab28fd85fc214512ff67e3c SHA512 6958f3f67b7d8729519175337b5e411b9d32fa3e7348105870d5f35c938e905cc60e7af23802b1b5835610c72e9a76ca50c229f5d862403ffd5065e82ee39d25 WHIRLPOOL 6caf644203291c7903f7c67a93e3f11a3f8d632e01384390742bc8b1fc4068e494f750c44817f0143a0f6eeaadbb4a7243c4194397fded59956363b49bd32ae4 EBUILD gitlab-ce-10.2.8.ebuild 13681 SHA256 0e02e1a51f335872facce2751aa23d8ff5b9cd8aa7359fed1cd0f5a3ed5bd1e7 SHA512 805d6a717b0dcdc6551f549722abb8322a51d6cee1eb807dabac1fe4b98ffd32fcf3667d1de7f845a08e9dfb72afa257c51c6382cbc48f5f23fe15b027724dde WHIRLPOOL 1c48b8ea54d65d1d2ea001c6af45c0a76f0587d815353675ce36245c721f4b2d9c5b48c608fe632743863f5db859c5ee0c96b95fe6b429fcdd7053d4e8fb86e8 EBUILD gitlab-ce-10.3.7.ebuild 14085 SHA256 cbff8442516b815e386974191d48464202b3b4f93e5d4688a71de08fadaeb89c SHA512 311e256f675c6cbb8e374448858e0adcfecd6a5432c4384a5d9c302a3c82dcab0aab0eb9a79d90f8f770dba0d1d984f0b7e3d53ce1e3b2c4c915aaa2facdbdd7 WHIRLPOOL 29674dc1a54311518047df70ecd21971b642bc7b8511d8c6ba3f754b7beae3de10c289704dcd214c7c5cf76f60772117c2649daac4d691b13387d758d2fb3f36 +EBUILD gitlab-ce-10.4.4.ebuild 13152 SHA256 6b226f67a85d25131a9acef87447a357ea67cc3f48e6aab927735de62fdbcaed SHA512 b8b43172d6b37ca3bbf84b7d2598ff558cebf84157a87957316d5f7168b52e8c91f87db853cf7a9c0843ab83540d811a4ad98da9c69343e87a0633b44f72b37b WHIRLPOOL d39bc072986261de7ddc35d58ee570eedfe8f01532dea8fa1423cfb40a5352453a1ba2647023032194ef44a87dfa7f0b4ca0dc96472c609ea3a49a1a5a339153 EBUILD gitlab-ce-9.0.13.ebuild 13139 SHA256 ecdcd1d6ca3999eb4b299628bac4c97a231cfcf682569cc1a0c11241cfcb6099 SHA512 8a6b8f3f05f54a752d57651b34ba4f6310e6695ea6eea1bbebe4a1dd38aa9ea0e9030bd59448a886918e20ea81f1b167236712e21fb6c43b7fb50b79565e2d87 WHIRLPOOL 0873a646dcb208e8c006e0e587fc03003594fd00e790e22d89839c9ffb8b7403a2df7b306ddfb817ea10a32e58d095d97989591de18ca78782bd468ae1fb8bc7 EBUILD gitlab-ce-9.1.10.ebuild 13295 SHA256 a69c179d072e76597091d825956bc308a25757a95406444a95a4ccbe9fe8ee9e SHA512 cc01ae887bce9e838eb020c7b414de4f80c5cc94762bd7c65fc5f6ab732b3ac7447f3f136b054557a5a93d09ed946b821d027fe29d7fdeea6eaaa6fc336cf394 WHIRLPOOL 1778e46da386704fbecc9e62769b9ab6ccdb40ee1028ef33607b4668e3fafbd0996ff4397128d8320098e3bf5c8f1d47a227e3c61a73a26a63663223790c8107 EBUILD gitlab-ce-9.2.10.ebuild 13040 SHA256 ace7b7561f499e43c19284153358b718275ac55792650391f39fa4ab89941c20 SHA512 22c8723251fefd50739ac082f04c377543f659720346cd29680d4956a2d6a37bb27b2c6beb723c09f49d7e478375e6679940f63f43c644564155a0eaffe300ed WHIRLPOOL 9601c5fcdc9b8d753a58ea4b4606957f3d09e63834335703896f55b16c41df7b81ef00b64e57f4409322789dcaa3745d60b31a973950c99037895d71a38ddaf2 @@ -43,5 +47,5 @@ EBUILD gitlab-ce-9.3.11.ebuild 13699 SHA256 e56490b1f59cf32e84d65ba3c91231c07a41 EBUILD gitlab-ce-9.4.7.ebuild 13526 SHA256 5078d51dcca18d9c5380bff25d494437506482beb4e586727b577f1c475363ec SHA512 244e178828910739018fa794c9f03c8f3b0411e45298800eaf828099f9d468b01d73102c9183ce6552d4ba208c086e5b4de85b4e0427e5502b9a54d56cb6a636 WHIRLPOOL 0306b7fc67f570d2ece6cc321461604c2be4fe886122750a481c6573800bbb4164c4cecee54a29a408b1eee17aa479a54271b395575d2d606dbd2ec3ddc4a1ae EBUILD gitlab-ce-9.5.10.ebuild 13526 SHA256 6e7c361f31989dd608eff4c8dd01b7301b142b4d38acdf38e61e2eecb2d4b285 SHA512 e33e56c8e49bd2ef03dd9af508b186f7908b8502960cbdb95ca9166631b84d5357c4965c0919e432ee5de9b9eeb33f68773ac405c24430568f9abb0d8e7354a6 WHIRLPOOL 3e866d785e8018096a92a223a2f6cedf4398cc07726a183d805005b3cd718fed2296edd63f5bc9d2b8849fe2298e9a61bf998a2241de2cd5ab4527f8ddaed325 EBUILD gitlab-ce-9999.ebuild 13468 SHA256 ab13060918b09a67f3f0c653a3836c1077933c606e5ea4e3416fde204aa530af SHA512 f14bc61622929dc57460fd7e4b3d965437fdc44706c52608a6b278021960bb70b62f81a6dd38beeb134c0f40ef29a81e07ea5a49c9a7a8e7ab63f55529231cb8 WHIRLPOOL 204d2f97890f2868b9f890fcc9b03d3c47c6916e52af341cf946e197acd8c2287409a5a1e525183a62fec9588eaa21b9d3ad30bba3b12267aa4c9e1163ca7fb0 -MISC ChangeLog 26064 SHA256 8820edb5b622f84bedd3dc859312642a9efc672eda16f3d6517424a0af71e118 SHA512 269983d651bf8c7e1e67d9a32d29da88b7f01754b58380e18dabded57374a49b4be4651659026373d14b51d8d3d3ea2441aeab5e274dc236eb0a02d584e0e72f WHIRLPOOL 22267d14138614165b9c5cb4407cb46ed7be44ffaa2f5346b6dbffe9b684fe7b733191d344771d89c2fd059ec58ecfe9724d616bdad366a6b616fde929ae0580 +MISC ChangeLog 26353 SHA256 9674027692dcf3201003c9272a5c98eef023a1c2c8e46f73fcaa02e98509dfe1 SHA512 782d1773d13ad96e24495030936d3b1d6df036e5294979e7acda747cb6881ab4820a39dd4f148a5aa2c624ca539ad96d7763d2b4ac6d20da508f5a8a38b0e445 WHIRLPOOL 7f5424d2571f68f92d92e67ecab94ef0ea864ef6ea2519f0267b6ffdfb9ea0db23c22c806d73867cccac58c0dff7889926c0d9de13c683191795ae38f9ed5745 MISC metadata.xml 801 SHA256 3dc7486a12903f47f65968d524c93500ba30a4a09fa57e5a9dacf356509b44bb SHA512 e132754b72e64246531fa883400a0cf1a473ac5a6a49623db58ccf118a038b7cf37df03d9550f37b4a25f9ddbb1dcc5652ec9a4f2259d8e3ce202692c4025f41 WHIRLPOOL e9d961681fd790008eaf80fa07ce2c55a00a58f2e920d759793783ca8c8f508602a777e94c0cb65fe87c7dbef0cabdf26e4f4082584421097d939cbab20c4ac6 diff --git a/www-apps/gitlab-ce/files/08-gitlab-ce-10.4.4-general-config.patch b/www-apps/gitlab-ce/files/08-gitlab-ce-10.4.4-general-config.patch new file mode 100644 index 0000000..634a8c3 --- /dev/null +++ b/www-apps/gitlab-ce/files/08-gitlab-ce-10.4.4-general-config.patch @@ -0,0 +1,96 @@ +diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example +index f2f05b3..0670112 100644 +--- a/config/gitlab.yml.example ++++ b/config/gitlab.yml.example +@@ -502,7 +502,7 @@ production: &base + # Gitaly settings + gitaly: + # Path to the directory containing Gitaly client executables. +- client_path: /home/git/gitaly/bin ++ client_path: /usr/bin + # Default Gitaly authentication token. Can be overriden per storage. Can + # be left blank when Gitaly is running locally on a Unix socket, which + # is the normal way to deploy Gitaly. +@@ -520,8 +520,8 @@ production: &base + # real path not the symlink. + storages: # You must have at least a `default` storage path. + default: +- path: /home/git/repositories/ +- gitaly_address: unix:/home/git/gitlab/tmp/sockets/private/gitaly.socket # TCP connections are supported too (e.g. tcp://host:port) ++ path: /var/lib/git/repositories/ ++ gitaly_address: unix:/run/gitlab/gitaly.socket # TCP connections are supported too (e.g. tcp://host:port) + # gitaly_token: 'special token' # Optional: override global gitaly.token for this storage. + + ## Backup settings +@@ -549,12 +549,12 @@ production: &base + + ## GitLab Shell settings + gitlab_shell: +- path: /home/git/gitlab-shell/ +- hooks_path: /home/git/gitlab-shell/hooks/ ++ path: /usr/share/gitlab-shell/ ++ hooks_path: /usr/share/gitlab-shell/hooks/ + + # File that contains the secret key for verifying access for gitlab-shell. + # Default is '.gitlab_shell_secret' relative to Rails.root (i.e. root of the GitLab app). +- # secret_file: /home/git/gitlab/.gitlab_shell_secret ++ secret_file: /opt/gitlab/.gitlab_shell_secret + + # Git over HTTP + upload_pack: true +@@ -569,7 +569,7 @@ production: &base + workhorse: + # File that contains the secret key for verifying access for gitlab-workhorse. + # Default is '.gitlab_workhorse_secret' relative to Rails.root (i.e. root of the GitLab app). +- # secret_file: /home/git/gitlab/.gitlab_workhorse_secret ++ # secret_file: /opt/gitlab/.gitlab_workhorse_secret + + ## Git settings + # CAUTION! +@@ -667,8 +667,8 @@ test: + backup: + path: tmp/tests/backups + gitlab_shell: +- path: tmp/tests/gitlab-shell/ +- hooks_path: tmp/tests/gitlab-shell/hooks/ ++ path: /usr/share/gitlab-shell/ ++ hooks_path: /usr/share/gitlab-shell/hooks/ + issues_tracker: + redmine: + title: "Redmine" +diff --git a/config/unicorn.rb.example b/config/unicorn.rb.example +index cc10da2..3c80d44 100644 +--- a/config/unicorn.rb.example ++++ b/config/unicorn.rb.example +@@ -33,12 +33,12 @@ worker_processes 3 + + # Help ensure your application will always spawn in the symlinked + # "current" directory that Capistrano sets up. +-working_directory "/home/git/gitlab" # available in 0.94.0+ ++working_directory "/opt/gitlab" # available in 0.94.0+ + + # Listen on both a Unix domain socket and a TCP port. + # If you are load-balancing multiple Unicorn masters, lower the backlog + # setting to e.g. 64 for faster failover. +-listen "/home/git/gitlab/tmp/sockets/gitlab.socket", :backlog => 1024 ++listen "/run/gitlab/gitlab.socket", :backlog => 1024 + listen "127.0.0.1:8080", :tcp_nopush => true + + # nuke workers after 30 seconds instead of 60 seconds (the default) +@@ -59,13 +59,13 @@ listen "127.0.0.1:8080", :tcp_nopush => true + timeout 60 + + # feel free to point this anywhere accessible on the filesystem +-pid "/home/git/gitlab/tmp/pids/unicorn.pid" ++pid "/run/gitlab/pids/unicorn.pid" + + # By default, the Unicorn logger will write to stderr. + # Additionally, some applications/frameworks log to stderr or stdout, + # so prevent them from going to /dev/null when daemonized here: +-stderr_path "/home/git/gitlab/log/unicorn.stderr.log" +-stdout_path "/home/git/gitlab/log/unicorn.stdout.log" ++stderr_path "/var/log/gitlab/unicorn.stderr.log" ++stdout_path "/var/log/gitlab/unicorn.stdout.log" + + # combine Ruby 2.0.0dev or REE with "preload_app true" for memory savings + # http://rubyenterpriseedition.com/faq.html#adapt_apps_for_cow diff --git a/www-apps/gitlab-ce/files/gitlab-10.4.4-sidekiq.init b/www-apps/gitlab-ce/files/gitlab-10.4.4-sidekiq.init new file mode 100644 index 0000000..20bc069 --- /dev/null +++ b/www-apps/gitlab-ce/files/gitlab-10.4.4-sidekiq.init @@ -0,0 +1,64 @@ +#!/sbin/openrc-run + +extra_started_commands="check" + +name="GitLab Sidekiq" +description="Sidekiq for GitLab" +description_check="Runs sanity checks" + +: ${gitlab_user:=@USER@} +: ${gitlab_base:="@GITLAB_BASE@"} +: ${rails_env:=production} + +: ${sidekiq_pidfile:="/run/gitlab/sidekiq.pid"} +: ${sidekiq_logfile:="@LOGS_DIR@/sidekiq.log"} +: ${sidekiq_config:="/etc/gitlab/sidekiq_queues.yml"} + +sidekiq_command="/usr/bin/bundle" +sidekiq_command_args="exec sidekiq -C ${sidekiq_config} -P ${sidekiq_pidfile} -L ${sidekiq_logfile}" + +check_command="sudo -u ${gitlab_user} -H /usr/bin/bundle" +check_command_args1="exec rake gitlab:env:info RAILS_ENV=${rails_env}" +check_command_args2="exec rake gitlab:check RAILS_ENV=${rails_env}" + +depend() { + need redis gitlab-workhorse + use net +} + +start() { + checkpath -d -o ${gitlab_user} -m755 "$(dirname "${sidekiq_pidfile}")" + + ebegin "Starting ${name} - Sidekiq" + + start-stop-daemon --start \ + --background --quiet \ + --chdir "${gitlab_base}" \ + --user=${gitlab_user} \ + --pidfile="${sidekiq_pidfile}" \ + --env RAILS_ENV=${rails_env} \ + --exec ${sidekiq_command} -- ${sidekiq_command_args} + eend $? +} + +stop() { + ebegin "Stopping ${name} - Sidekiq" + start-stop-daemon --stop \ + --pidfile="${sidekiq_pidfile}" \ + --exec ${sidekiq_command} + eend $? +} + +check() { + ebegin "Running sanity checks for ${name}" + + cd /opt/gitlab + + ${check_command} ${check_command_args1} + + eend $? + + ${check_command} ${check_command_args2} + + eend $? +} diff --git a/www-apps/gitlab-ce/files/gitlab-10.4.4-unicorn.init b/www-apps/gitlab-ce/files/gitlab-10.4.4-unicorn.init new file mode 100644 index 0000000..94082db --- /dev/null +++ b/www-apps/gitlab-ce/files/gitlab-10.4.4-unicorn.init @@ -0,0 +1,157 @@ +#!/sbin/openrc-run + +extra_started_commands="restartsidekiq check" +extra_stopped_commands="backup" + +name="GitLab" +description="GitLab on Unicorns" +description_restartsidekiq="Restarts Sidekiq only" +description_check="Runs sanity checks" +description_backup="Creates a backup of your Gitlab database and files" + +: ${gitlab_user:=@USER@} +: ${gitlab_base:="@GITLAB_BASE@"} +: ${rails_env:=production} + +: ${server_pidfile:="/run/gitlab/unicorn.pid"} + +: ${sidekiq_pidfile:="/run/gitlab/sidekiq.pid"} +: ${sidekiq_logfile:="@LOGS_DIR@/sidekiq.log"} +: ${sidekiq_config:="/etc/gitlab/sidekiq_queues.yml"} + +: ${mail_room_pidfile:="/run/gitlab/mail_room.pid"} +: ${mail_room_logfile:="@LOGS_DIR@/mail_room.log"} +: ${mail_room_config:="/etc/gitlab/mail_room.yml"} + +socket_dir="/run/gitlab" + +server_command="/usr/bin/bundle" +server_command_args="exec unicorn_rails -c ${gitlab_base}/config/unicorn.rb -E ${rails_env} -D" + +sidekiq_command="/usr/bin/bundle" +sidekiq_command_args="exec sidekiq -C ${sidekiq_config} -P ${sidekiq_pidfile} -L ${sidekiq_logfile}" + +mail_room_command="/usr/bin/bundle" +mail_room_command_args="exec mail_room -q -c ${mail_room_config} >> ${mail_room_logfile} 2>&1" + +check_command="sudo -u ${gitlab_user} -H /usr/bin/bundle" +check_command_args1="exec rake gitlab:env:info RAILS_ENV=${rails_env}" +check_command_args2="exec rake gitlab:check RAILS_ENV=${rails_env}" + +backup_command="sudo -u ${gitlab:user} -H /usr/bin/bundle" +backup_args=" exec rake gitlab:backup:create RAILS_ENV=${rails_env}" + +depend() { + provide gitlab + need redis gitlab-workhorse gitlab-gitaly + use net +} + +start() { + ebegin "Starting ${name} - Unicorn servers" + + checkpath -d -o ${gitlab_user} -m755 "$(dirname "${server_pidfile}")" + checkpath -d -o ${gitlab_user} -m755 "$(dirname "${sidekiq_pidfile}")" + checkpath -d -o ${gitlab_user} -m755 "$(dirname "${mail_room_pidfile}")" + checkpath -d -o ${gitlab_user} -m700 "${socket_dir}" + + start-stop-daemon --start \ + --chdir "${gitlab_base}" \ + --user=${gitlab_user} \ + --pidfile="${server_pidfile}" \ + --env RAILS_ENV=${rails_env} \ + --exec ${server_command} -- ${server_command_args} + eend $? + + ebegin "Starting ${name} - Sidekiq" + + start-stop-daemon --start \ + --background --quiet \ + --chdir "${gitlab_base}" \ + --user=${gitlab_user} \ + --pidfile="${sidekiq_pidfile}" \ + --env RAILS_ENV=${rails_env} \ + --exec ${sidekiq_command} -- ${sidekiq_command_args} + eend $? + + if [ -e /etc/default/gitlab ]; then + . /etc/default/gitlab + if [ "${mail_room_enabled}" == "true" ]; then + ebegin "Starting ${name} - mail_room" + + start-stop-daemon --start \ + --background --quiet \ + --chdir "${gitlab_base}" \ + --user=${gitlab_user} \ + --pidfile="${mail_room_pidfile}" -m \ + --env RAILS_ENV=${rails_env} \ + --exec ${mail_room_command} -- ${mail_room_command_args} + eend $? + fi + fi +} + +stop() { + ebegin "Stopping ${name} - mail_room" + start-stop-daemon --stop \ + --signal QUIT \ + --pidfile=${mail_room_pidfile} \ + --exec ${mail_room_command} + eend $? + + ebegin "Stopping ${name} - Sidekiq" + start-stop-daemon --stop \ + --pidfile=${sidekiq_pidfile} \ + --exec ${sidekiq_command} + eend $? + + ebegin "Stopping ${name} - Unicorn servers" + start-stop-daemon --stop \ + --signal QUIT \ + --pidfile=${server_pidfile} \ + --exec ${server_command} + eend $? +} + +restartsidekiq() { + ebegin "Restarting ${name} - Sidekiq: Stopping" + start-stop-daemon --stop \ + --pidfile=${sidekiq_pidfile} \ + --exec ${sidekiq_command} \ + --progress \ + --retry 180 + + eend $? + + ebegin "Starting ${name} - Sidekiq" + + start-stop-daemon --start \ + --background --quiet \ + --chdir "${gitlab_base}" \ + --user=${gitlab_user} \ + --pidfile="${sidekiq_pidfile}" \ + --env RAILS_ENV=${rails_env} \ + --exec ${sidekiq_command} -- ${sidekiq_command_args} + eend $? +} + +check() { + ebegin "Running sanity checks for ${name}" + + cd /opt/gitlab + + ${check_command} ${check_command_args1} + + eend $? + + ${check_command} ${check_command_args2} + + eend $? +} + +backup() { + ebegin "Creating backup of ${name}" + cd /opt/gitlab + ${backup_command} ${backup_args} + eend $? +} diff --git a/www-apps/gitlab-ce/gitlab-ce-10.4.4.ebuild b/www-apps/gitlab-ce/gitlab-ce-10.4.4.ebuild new file mode 100644 index 0000000..8c81fb3 --- /dev/null +++ b/www-apps/gitlab-ce/gitlab-ce-10.4.4.ebuild @@ -0,0 +1,430 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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" + +EGIT_REPO_URI="https://gitlab.com/gitlab-org/${PN}.git" +EGIT_COMMIT="v${PV}" +EGIT_CHECKOUT_DIR="${WORKDIR}/all" + +inherit eutils git-r3 ruby-ng user systemd + +GITLAB_GITALY_VERSION="0.66.0" +GITLAB_PAGES_VERSION="0.6.0" +GITLAB_SHELL_VERSION="5.11.0" +GITLAB_WORKHORSE_VERSION="3.3.1" + +DESCRIPTION="GitLab is a free project and repository management application" +HOMEPAGE="https://about.gitlab.com/" + +RESTRICT="mirror" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~arm64" +IUSE="kerberos mysql +postgres +unicorn systemd pages 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-libs/re2 + dev-util/ragel + >=net-libs/nodejs-4.3.0 + >=sys-apps/yarn-0.17.0 + postgres? ( >=dev-db/postgresql-9.6:* ) + mysql? ( virtual/mysql ) + 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} + kerberos? ( !app-crypt/heimdal ) + 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-${GITLAB_GITALY_VERSION}" +DEPEND=" + ${CDEPEND} + ${COMMON_DEPEND}" +RDEPEND=" + ${COMMON_DEPEND} + >=dev-db/redis-2.8 + virtual/mta + systemd? ( sys-apps/systemd:0= )" +ruby_add_bdepend " + virtual/rubygems + >=dev-ruby/bundler-1.15.4" + +# +# fix-sendmail-config: +# Fix default settings to work with ssmtp that doesn't know '-t' argument. +# fix-redis-config-path: +# Point to the absolute location of redis_config.rb +# +PATCHES=( + "${FILESDIR}/01-${PN}-8.7.5-fix-sendmail-config.patch" + "${FILESDIR}/02-${PN}-9.0.0-fix-redis-config-path.patch" + "${FILESDIR}/03-${PN}-10.2.8-database.yml.patch" + "${FILESDIR}/04-${PN}-9.3.0-fix-check-task.patch" + "${FILESDIR}/05-${PN}-9.0.0-replace-sys-filesystem.patch" + "${FILESDIR}/06-${PN}-8.17.0-fix-webpack-config.patch" + "${FILESDIR}/08-${PN}-10.4.4-general-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}" + +all_ruby_unpack() { + git-r3_fetch + git-r3_checkout +} + +all_ruby_prepare() { + # fix paths + sed -i \ + -e "s|/home/git/gitlab/tmp|/run/${MY_NAME}|g" \ + 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}"/ + 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" + + einfo "Cleaning old gems ..." + ${RUBY} /usr/bin/bundle clean + + # clean gems cache + rm -Rf vendor/bundle/ruby/*/cache + rm -Rf vendor/bundle/ruby/*/bundler/gems/charlock_holmes-dde194609b35/.git + + ## RC script ## + + if use systemd ; then + ewarn "Beware: systemd support has not been tested, use at your own risk!" + systemd_newunit "${FILESDIR}/gitlab-8.13.0-sidekiq.service" "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-10.4.4-sidekiq.init + use unicorn && rcscript=gitlab-10.4.4-unicorn.init + + cp "${FILESDIR}/${rcscript}" "${T}" || die + sed -i \ + -e "s|@USER@|${MY_USER}|g" \ + -e "s|@GITLAB_BASE@|${dest}|g" \ + -e "s|@LOGS_DIR@|${logs}|g" \ + "${T}/${rcscript}" \ + || die "failed to filter ${rcscript}" + + newinitd "${T}/${rcscript}" "${MY_NAME}" + fi + + # fix permissions + fowners -R ${MY_USER}:${MY_USER} ${dest} ${temp} ${logs} +} + +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. Run these commands (as root):" + elog + elog " cd /opt/gitlab" + elog " sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production" + elog + elog "If you're using OpenRC, you can use the following command:" + elog + elog " /etc/init.d/gitlab backup" + 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 initialize the 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." + if use postgres; then + elog "Please note: As of GitLab 8.6, users of PostgreSQL need to enable the" + elog "`pg_trgm` extension by running the following command as a PostgreSQL" + elog "super user for *every* GitLab database:" + elog " CREATE EXTENSION IF NOT EXISTS pg_trgm;" + elog "For details, see the documentation at the GitLab website." + fi + if use mysql ; then + ewarn "You must grant the GitLab user permissions the following on the database:" + ewarn " mysql -u root -p -e \\" + ewarn " \"GRANT TRIGGER ON \`gitlab\`.* TO 'gitlab'@'localhost';\"" + ewarn "PLEASE also read this document about needed migrations on MySQL:" + ewarn + ewarn "https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/database_mysql.md" + ewarn + ewarn "Failing to follow those instructions may make the config phase fail!" + fi +} + +pkg_config() { + 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 + + 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 + + su -l ${MY_USER} -c "git config --global repack.writeBitmaps true" + + # determine whether this is an update or a fresh install. we do this by + # checking whether the ${DEST_DIR}/.git directory exists or not + # + if [ -d "${DEST_DIR}/.git" ]; then + local update=true + else + local update=false + fi + + if use mysql ; then + ewarn "Please only proceed if you've read and understood the following page:" + ewarn "https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/database_mysql.md" + if [ "${update}" = 'true' ]; then + ewarn "Failing to follow those instructions may cause the upgrade to fail" + fi + ewarn + fi + + ewarn "Now is a good time to create a backup of your Gitlab installation, just in case." + ewarn "To do so, abort this configuration with Ctrl+C and type the following commands:" + ewarn " cd /opt/gitlab" + ewarn " sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production" + ewarn + ewarn "Press Ctrl+C to abort now or any key to continue." + read + + ## Initialize app ## + + local RAILS_ENV="production" + local RUBY=${RUBY:-/usr/bin/ruby} + local BUNDLE="${RUBY} /usr/bin/bundle" + + if [ "${update}" = 'true' ]; then + einfo "Migrating database ..." + exec_rake db:migrate + + einfo "Compiling GetText PO files ..." + exec_rake gettext:compile + + # https://github.com/gitlabhq/gitlabhq/issues/5311#issuecomment-31656496 + einfo "Migrating iids ..." + exec_rake migrate_iids + + einfo "Installing npm modules ..." + exec_rake yarn:install + + einfo "Cleaning old precompiled assets ..." + exec_rake gitlab:assets:clean + + einfo "Cleaning cache ..." + exec_rake cache:clear + else + # 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 + + einfo "Initializing database ..." + exec_rake gitlab:setup + + einfo "Compiling GetText PO files ..." + exec_rake gettext:pack + exec_rake gettext:po_to_json + + einfo "Installing npm modules ..." + exec_rake yarn:install + fi + + einfo "Precompiling assests ..." + exec_rake gitlab:assets:compile + + 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 + elog + elog "If you want to make sure that the install/upgrade was successful, start" + elog "Gitlab now and then run these commands (as root):" + elog + elog " cd /opt/gitlab" + elog " sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production" + elog " sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production" + elog + if ! use systemd ; then + elog "You may also run" + elog " /etc/init.d/gitlab check" + elog " for convenience." + 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} NODE_ENV=${RAILS_ENV}" + + echo " ${command}" + su -l ${MY_USER} -c " + export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8; export NODE_PATH=${DEST_DIR}/node_modules + cd ${DEST_DIR} + ${command}" \ + || die "failed to run rake $@" +} From ded6fb1b310a385646d2a28de4cf82061b25368f Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Fri, 9 Mar 2018 20:21:34 +0100 Subject: [PATCH 4/4] Fix the patch for the PID file. --- www-apps/gitlab-ce/Manifest | 2 +- .../gitlab-ce/files/08-gitlab-ce-10.4.4-general-config.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/www-apps/gitlab-ce/Manifest b/www-apps/gitlab-ce/Manifest index 30a1753..cb14649 100644 --- a/www-apps/gitlab-ce/Manifest +++ b/www-apps/gitlab-ce/Manifest @@ -6,7 +6,7 @@ AUX 04-gitlab-ce-9.3.0-fix-check-task.patch 1090 SHA256 51ade91e5e7ef67e6d3c0e6e AUX 05-gitlab-ce-9.0.0-replace-sys-filesystem.patch 2436 SHA256 53fcd9fc123a0fcb671a8cbcb3b2dc61765e32be6836206ae0edea8cf0ae8203 SHA512 21636f298df7e762f59595f39fb50266f8737311f37aa2b9ba96bc29190b8a67eea01b09e3b589d0885da6b27beaa136fa66c7d98408a8e3ecb3ac6baf20d891 WHIRLPOOL e0c709dfc5f72e33207fd7d62a7db5a85c0ed4b6064d5d6a13bcce7d660d9ba144fe09d0985c16c313f06a4e02911729be132086735eac47ddff981874f31acc AUX 06-gitlab-ce-8.17.0-fix-webpack-config.patch 614 SHA256 0c1cdc25032322eff6c279435ba5f3fc349b30de0d55d86fad2616bd2bb7fef4 SHA512 f5ccb4d1849ab395ba4ec3c80735a1fedd9fa7f790c8b114d8dc8d1fc2c431d7b9e5645247485f0b8c1061a00ed61c21a5e50f49af0d76e232182c68868a163f WHIRLPOOL 6968ddefed74607c36cc66dc133dbf4942979d2ae867f819cf2e7e5c9701fe8dd86b266d923e6343971e6904f0ad1f35200971660df139edabcc9e0790fc107c AUX 07-gitlab-ce-10.0.7-yarn.patch 36442 SHA256 b45cfd739ca94058987c55458c89dba4cdbb1b9b9fc2e486d02e67e275044855 SHA512 931edab62e1218f84f08db72cc2f4ff95e53c6f88d755224de5e9dd19c230bb4b4c808accebd14c7bb06e6c57e4f101f7b4fb1843abb9a908d7f9f2b901d4e5f WHIRLPOOL 0f0ba8a1dfb38355bedebb17a8d174fa33a695be9da364bfebf3ffc5629eff5f462a9b66af65ad0fcc3b35f93c67c4b15a93e1962ae32225dbed45c87b30c5b1 -AUX 08-gitlab-ce-10.4.4-general-config.patch 4074 SHA256 f020ebd86ad81a35ed8a39d2072a7cdb9bd0f121c80a3e01b94a9343dccfb1c3 SHA512 58e267ba55d3db89f88a7a47e871eaa97ec14aca2fb1a5140d1debbad5929551a2c1dd7c5a7b5e8b983fea56a636e504df30d253b6ab68dc4b457419734561b6 WHIRLPOOL c43cef9d469d3a6b1219fbc856bfa34a081707fc80cd73ea2936850aebe3249bf924f00da6bcbacee4bbc612f9bdc2b959d75478ec55202927517a276837567e +AUX 08-gitlab-ce-10.4.4-general-config.patch 4069 SHA256 d4b8c0f35fb695e193eb211e1f24938169c7e1e5de5f9191e69fef0b8d2a285f SHA512 c9e7e2456c43b9b3494adacd980a07e4f75ce07259622e2215a9a2f3cd7f4173473e5e0044f978ee8b84042a42eb49156cb1d9f258e4c32b1284beb1f5ac9524 WHIRLPOOL 368cb32ae93cd62b444d9124806d20dc80a18a64480fdbb765eeffc552da42a557e4fa3c06a0f5650d98a9948ce46e90a38c335ac07c7ff0f1ec4f7d16caf399 AUX gitlab-10.4.4-sidekiq.init 1461 SHA256 99fd95716abde96f9a031cb22e04371c7dfe6bf53440154dcf94be9477d1a6f8 SHA512 8d536a3db5af3bdf04b92e0c1e9e9d65aacb3dff244729d32f28b8dd66f586cbd5a2e60b3e2f58c2be96c0c09708dc21275adca3f89fbdfa20e000e9563ee880 WHIRLPOOL e47f69b06fd0d60837fc7cab03eb4c4cf9111597b7b3e81c3c35b7fc83be12f85ac26ad6693ff30c95b91a998b0685128b303df5aa97ab7835f575ce199f141b AUX gitlab-10.4.4-unicorn.init 4068 SHA256 a29c2741626fae15156117786d7ab63f4c68c5357d28c257a9da8e6d92ce71d7 SHA512 0dce3a14f113776bacb86eac602726a70ba3f71ee1a9310c7a2f427a658622b94e0550564360339b044a58c2db52ed6782de7675aa622b2ab9016ed93261b22a WHIRLPOOL 58a4c3328665dffcf9f96a2eeee495b9dcd550a41c26d8e256b44ca6ad247a84c909838e31f8de8673f94d767c077bb253c20f3a4321abe7d5de937f680ec215 AUX gitlab-8.13.0-sidekiq.service 990 SHA256 183ccbdb19a3dcc74cf1f1f865bf396466e06f7408ff7d3e92359b2a0e83f24c SHA512 c356baf65337739b08a0a4bfe24d3b68f557e9d6d95f479b39ec954ee6c2077e380f99d1e9e9390f5b038e093c0a46562f651512a6578dfa86977580159470a2 WHIRLPOOL 81d9ea9febf47d5fdb9c49a54bbc499bd796fc56bc1c16404fe4c74d00c4bb9fa9631e4cd4cf88d3c30a44c04b74b35a61cd4da9f2139a4abf61e758b4e5949a diff --git a/www-apps/gitlab-ce/files/08-gitlab-ce-10.4.4-general-config.patch b/www-apps/gitlab-ce/files/08-gitlab-ce-10.4.4-general-config.patch index 634a8c3..244fdb1 100644 --- a/www-apps/gitlab-ce/files/08-gitlab-ce-10.4.4-general-config.patch +++ b/www-apps/gitlab-ce/files/08-gitlab-ce-10.4.4-general-config.patch @@ -82,7 +82,7 @@ index cc10da2..3c80d44 100644 # feel free to point this anywhere accessible on the filesystem -pid "/home/git/gitlab/tmp/pids/unicorn.pid" -+pid "/run/gitlab/pids/unicorn.pid" ++pid "/run/gitlab/unicorn.pid" # By default, the Unicorn logger will write to stderr. # Additionally, some applications/frameworks log to stderr or stdout,