dev-vcs/gitlab-shell:
added ebuild for version 3.2.0 Package-Manager: portage-2.2.28
This commit is contained in:
		
							parent
							
								
									a66e26ecd1
								
							
						
					
					
						commit
						c1454b6b43
					
				
					 3 changed files with 134 additions and 2 deletions
				
			
		|  | @ -1,3 +1,7 @@ | |||
| *gitlab-shell-3.2.0 (09 Jul 2016) | ||||
| 
 | ||||
|   09 Jul 2016; Manuel Friedli <manuel@fritteli.ch> +gitlab-shell-3.2.0.ebuild: | ||||
|   dev-vcs/gitlab-shell:  added ebuild for version 3.2.0 | ||||
| 
 | ||||
|   07 Jun 2016; Manuel Friedli <manuel@fritteli.ch> +ChangeLog: | ||||
|   Added ChangeLog | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,7 +1,9 @@ | |||
| AUX gitlab-shell-2.0.0-config-paths.patch 1356 SHA256 442a8e18b4d8e6092db0d39659cba5e41404e90f21070ed50b5460177f28f1b2 SHA512 0445cd42086b2d77825c487d604ddcb11f8fdf4eb8dcdfa1fe1b8e8c24d7b8f273834dbec0bfbb763a35a74605d558cc8d3feaa056eb02a113d18124a764551e WHIRLPOOL 0e3367b229ea4f13818fe2e485dc8da83ad695aec496881cb5eb918b183029b0013518ca64acba1568d93dc418dfaf083c2a86b9f2e3adf9fe15cad038011b30 | ||||
| DIST gitlab-shell-2.7.2.tar.gz 37901 SHA256 2cb4bac3d5888154f39a51b717ad2ae0795c6c59ecbc97deb9c94f51b1c9af27 SHA512 7b28d6593f8752e79f78f24c1be216eb94a5bed827e12ef96fe3f04f57e55e9eabfcf66259df8191d5eee7932a788d0f9f36e4d1658a296547c4c9021f6d7662 WHIRLPOOL c1211d5195e9c92325dc0cc706cbfad29f3df91ce63e8926bb91112846739f65249fcec511c54fc1c52cb8ac123f695010ffbc360e11c5ab7e289c93902cb2fe | ||||
| DIST gitlab-shell-3.0.0.tar.gz 68088 SHA256 3b00daa0e003b73a34f20ed06b4c0298b33099600de7832bec25bfbce525d779 SHA512 97874a4a76240b73e3dac93510910fde847d0ccb8906011412091769345a2efef82bd187609ea2596b6a7b1838fa144eb62f9e246f4aea396df96316f18121e9 WHIRLPOOL 378b9f9a879e4c011fb0714387aa0f24616e6cb8c19084431923cc24853212e0319dffe5081a0b556dca41712e5015538a7038548bcd737cd9116fecbb2421c9 | ||||
| DIST gitlab-shell-3.2.0.tar.gz 68796 SHA256 a279d78f1439b13f9f96c6cc1507175040732aab25954b1e6a41445b336d1460 SHA512 836b94fdff10daafa54ad672752eb8fcf1acc4f238a7c47a0795669ffcbfd0c892abd49c4102cb07bcc0350867a7bc53acecffe5b0eb46849f1fae0b38200c25 WHIRLPOOL cb536713dd2352d94e657313c717f3c13f50c1056e30391f31a6bfdc82b559c8738d722b95aa194d1c4182923198cf4defda7c1c31e00fa360b132a2c610398c | ||||
| EBUILD gitlab-shell-2.7.2.ebuild 3516 SHA256 5ae386bd0f8960b1d068530a5b8502651c76cb43195502f76551a4249a510efc SHA512 ed9d009a894ee3ae2f1d140aec64f8c9ad4013178419f87f96e57f5cda4dbd7b099436568cf3d718d25753e405d859bb7bc8aea2c4683a14b024b942503eaa13 WHIRLPOOL b325873e31a1b5b8afaa4ba3678ae8435c20678b5ad720482283f48ba217f48cfe50c533b13c7e9bfb4e32719dc8155512d743b7f7db3dae6262e07612519331 | ||||
| EBUILD gitlab-shell-3.0.0.ebuild 3516 SHA256 5ae386bd0f8960b1d068530a5b8502651c76cb43195502f76551a4249a510efc SHA512 ed9d009a894ee3ae2f1d140aec64f8c9ad4013178419f87f96e57f5cda4dbd7b099436568cf3d718d25753e405d859bb7bc8aea2c4683a14b024b942503eaa13 WHIRLPOOL b325873e31a1b5b8afaa4ba3678ae8435c20678b5ad720482283f48ba217f48cfe50c533b13c7e9bfb4e32719dc8155512d743b7f7db3dae6262e07612519331 | ||||
| MISC ChangeLog 82 SHA256 12ed3543adc88564630b15553233b47b2bf04f4acc8f97eeb5c5befa2c16c75b SHA512 bf31a0cd9c7f4c2b560ef6cd2174e927933d1004c8fab2089e1d0d8c8d76f26f449f9babd33b72176038868259296cd4dda9db0b9cb175274e98fff888290703 WHIRLPOOL f7606de1e805cc293c25b9538e2fd7433ed4cd076bf7e047d7583e4e3886de1a365fe6b1e75bbcbd80f8d4da4a74ec3259d9914462a80ac75e9537dca5c9e52f | ||||
| EBUILD gitlab-shell-3.2.0.ebuild 3516 SHA256 10c74bf2bc885fcdcc9abd1d2866ff03e5934a877bca76a364a4482aeffbbd6c SHA512 c1ccf8ecdd1ab63df502b1c3d5168a74e76d2ac36348d015c11ee04284ac0ba0f57aeb3ab84e9cbc74b63904bf31de054136fe615600dadde8490e6a1d186882 WHIRLPOOL ddc0a326b25560016817f545fb40bd3442ebb2a4ce7d9332a9503d1804dbe16527775f52bef5944bee991f0123729da055684df13ddb6718d1d1fd8755fbd677 | ||||
| MISC ChangeLog 252 SHA256 13d7252e9eba043b242db349e9b0135102cd8c0e2d94a4187b666980f5ae2799 SHA512 e007f03eeec6dfb6af802b065f97b5684a67b77e2fd57c8bba93f23de37dd4c7f3e338280d8103599fa6088313414928569042fe667d00f94440e18ee0fe55fd WHIRLPOOL 5cfa7f635df904ab467621b61dd57cafc01d6b398fdfe2819a6358b0ad6a2b8b8f84e53fcae77abf4c909aa84718d643213aecf3491813883631c7997e19d475 | ||||
| MISC metadata.xml 234 SHA256 f35b97f99a26d73cc441e1d93bfe25aaa4e9f7f6d90c8d05a74f7b7bc5b68472 SHA512 59d8156b3ca3e99c40d5a2a32de7edf2eb53279b2424998862589d6bad77617d23fc852afec0a92f8ac5bb54a88ebc504cc0641029c1936412e90ab03dfdd447 WHIRLPOOL 935a1401910a42f888c991e443a49275ea8b87976c5aa977f670053d97d18754231749749bc92d37d4b5f45ecf65914480942a11b5827b6c08fb24313a428431 | ||||
|  |  | |||
							
								
								
									
										126
									
								
								dev-vcs/gitlab-shell/gitlab-shell-3.2.0.ebuild
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										126
									
								
								dev-vcs/gitlab-shell/gitlab-shell-3.2.0.ebuild
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,126 @@ | |||
| # Copyright 1999-2016 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 ~arm ~arm64" | ||||
| IUSE="" | ||||
| 
 | ||||
| DEPEND="" | ||||
| RDEPEND=" | ||||
| 	>=dev-vcs/git-2.7.4 | ||||
| 	dev-db/redis | ||||
| 	virtual/ssh" | ||||
| ruby_add_bdepend " | ||||
| 	virtual/ruby-ssl" | ||||
| 
 | ||||
| MERGE_TYPE="binary" | ||||
| 
 | ||||
| RUBY_PATCHES=( | ||||
| 	"${PN}-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}." | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue