generate .gitlab_shell_secret upon installation

This commit is contained in:
Manuel Friedli 2014-11-19 16:17:08 +01:00
parent 3b4b87b42f
commit b724a4d15a
2 changed files with 10 additions and 1 deletions

View file

@ -16,4 +16,4 @@ EBUILD gitlab-shell-1.9.7.ebuild 3348 SHA256 e76c7155c1532a5d60545632b938af401a2
EBUILD gitlab-shell-2.0.0.ebuild 3297 SHA256 668c0430dc5783852cfff4588ac1fef2fa049a5e58b233566d12b923e8778b2f SHA512 a40aebc6d437a9577e2e830f84a6666b49dd0bcce211ed4d1311dad6f98e47bb9816f6b1155a4439e0fe475484cedb483f02a788de4282a0563550b8ea30b8e0 WHIRLPOOL a57d9250c7fc89e331c55dfa589be972111b6963efd17cad35ef7a01477a5b2c5cfffdb3265f4f8affa4edbbd3fc61a7d003b72b5ab96b0e99f5aa3cfd0a9b8a EBUILD gitlab-shell-2.0.0.ebuild 3297 SHA256 668c0430dc5783852cfff4588ac1fef2fa049a5e58b233566d12b923e8778b2f SHA512 a40aebc6d437a9577e2e830f84a6666b49dd0bcce211ed4d1311dad6f98e47bb9816f6b1155a4439e0fe475484cedb483f02a788de4282a0563550b8ea30b8e0 WHIRLPOOL a57d9250c7fc89e331c55dfa589be972111b6963efd17cad35ef7a01477a5b2c5cfffdb3265f4f8affa4edbbd3fc61a7d003b72b5ab96b0e99f5aa3cfd0a9b8a
EBUILD gitlab-shell-2.0.1.ebuild 3304 SHA256 35c085cd702149462fafe0bdfdb41ab244fe06c6caef3542aceb399d37f334bf SHA512 24725735f67323d5b6cd95f9a54981c20288acea05b07b1b195b62bf9add1b850fb787f4a9fb7749f7103cd932023d3180653dc812a02d6314ec1b674e751449 WHIRLPOOL 8adf08faa3892f2ab5ad03eadab584097f6869a720517fd925f34a05f042410411cb3132df42b1d82c3f5dba68fdb2f76b1f00611747d3f48074d9e69dc9c49f EBUILD gitlab-shell-2.0.1.ebuild 3304 SHA256 35c085cd702149462fafe0bdfdb41ab244fe06c6caef3542aceb399d37f334bf SHA512 24725735f67323d5b6cd95f9a54981c20288acea05b07b1b195b62bf9add1b850fb787f4a9fb7749f7103cd932023d3180653dc812a02d6314ec1b674e751449 WHIRLPOOL 8adf08faa3892f2ab5ad03eadab584097f6869a720517fd925f34a05f042410411cb3132df42b1d82c3f5dba68fdb2f76b1f00611747d3f48074d9e69dc9c49f
EBUILD gitlab-shell-2.2.0.ebuild 3304 SHA256 35c085cd702149462fafe0bdfdb41ab244fe06c6caef3542aceb399d37f334bf SHA512 24725735f67323d5b6cd95f9a54981c20288acea05b07b1b195b62bf9add1b850fb787f4a9fb7749f7103cd932023d3180653dc812a02d6314ec1b674e751449 WHIRLPOOL 8adf08faa3892f2ab5ad03eadab584097f6869a720517fd925f34a05f042410411cb3132df42b1d82c3f5dba68fdb2f76b1f00611747d3f48074d9e69dc9c49f EBUILD gitlab-shell-2.2.0.ebuild 3304 SHA256 35c085cd702149462fafe0bdfdb41ab244fe06c6caef3542aceb399d37f334bf SHA512 24725735f67323d5b6cd95f9a54981c20288acea05b07b1b195b62bf9add1b850fb787f4a9fb7749f7103cd932023d3180653dc812a02d6314ec1b674e751449 WHIRLPOOL 8adf08faa3892f2ab5ad03eadab584097f6869a720517fd925f34a05f042410411cb3132df42b1d82c3f5dba68fdb2f76b1f00611747d3f48074d9e69dc9c49f
EBUILD gitlab-shell-2.3.1.ebuild 3304 SHA256 35c085cd702149462fafe0bdfdb41ab244fe06c6caef3542aceb399d37f334bf SHA512 24725735f67323d5b6cd95f9a54981c20288acea05b07b1b195b62bf9add1b850fb787f4a9fb7749f7103cd932023d3180653dc812a02d6314ec1b674e751449 WHIRLPOOL 8adf08faa3892f2ab5ad03eadab584097f6869a720517fd925f34a05f042410411cb3132df42b1d82c3f5dba68fdb2f76b1f00611747d3f48074d9e69dc9c49f EBUILD gitlab-shell-2.3.1.ebuild 3637 SHA256 9432a93459d61327985f0c72d26637251c99c8c4b513a47f3ae432d029488817 SHA512 820cdff3e5ad24b5496f90202a137d9550d9a99abbbcea7305275156cf338424de73f2534b69bf43b21f6f3cd6dd4c0bda1f83203a9592337689a54d702f07dd WHIRLPOOL c606d2609fab472a5ba00220f2f48498f60d2c50e96c1a492df29ce476581a18a600e5e9425c368838ccf8e297f3daa90cfc09b35e876ae7b455d36e9a5d2547

View file

@ -80,6 +80,12 @@ all_ruby_install() {
insinto $(dirname ${CONF_FILE}) insinto $(dirname ${CONF_FILE})
newins config.yml.example $(basename ${CONF_FILE}) newins config.yml.example $(basename ${CONF_FILE})
# create random .gitlab_shell_secret
einfo "creating random .gitlab_shell_secret"
RANDOM_TOKEN=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
TOKEN_FILE="${DEST_DIR}/.gitlab_shell_secret"
echo $RANDOM_TOKEN > ${D}/"$TOKEN_FILE"
# prepare directories # prepare directories
diropts -m750; dodir ${DATA_DIR} diropts -m750; dodir ${DATA_DIR}
diropts -m770; keepdir ${DATA_DIR}/repositories diropts -m770; keepdir ${DATA_DIR}/repositories
@ -90,6 +96,9 @@ all_ruby_install() {
# fix permissions # fix permissions
fowners -R ${GIT_USER}:${GIT_USER} ${DATA_DIR} ${LOGS_DIR} fowners -R ${GIT_USER}:${GIT_USER} ${DATA_DIR} ${LOGS_DIR}
fowners ${GIT_USER}:${GIT_USER} "${TOKEN_FILE}"
fperms -m600 "${TOKEN_FILE}"
} }
pkg_postinst() { pkg_postinst() {