Merge branch '25-gitlab-8-9-5' into 'master'

Resolve "GitLab 8.9.5"

Closes #25

See merge request !83
This commit is contained in:
Manuel Friedli 2016-07-10 00:56:01 +02:00
commit 8e65f40d37
10 changed files with 719 additions and 4 deletions

View file

@ -1,3 +1,10 @@
*gitlab-ci-multi-runner-1.3.2 (09 Jul 2016)
09 Jul 2016; Manuel Friedli <manuel@fritteli.ch>
+gitlab-ci-multi-runner-1.3.2.ebuild:
dev-vcs/gitlab-ci-multi-runner: added ebuild for version 1.3.2 which contains
a bugfix for ARM
*gitlab-ci-multi-runner-1.3.1 (26 Jun 2016)
26 Jun 2016; Manuel Friedli <manuel@fritteli.ch>

View file

@ -6,7 +6,11 @@ DIST gitlab-ci-multi-runner-1.1.4-x86 32562200 SHA256 4b5cc4a70d7f8fdb5c389c7525
DIST gitlab-ci-multi-runner-1.3.1-amd64 59026624 SHA256 3a80fefb5bb76e43999d95a44467531b47b30b99385ccb2e67b00279cdab6eb7 SHA512 af62b0e7b76d909bfaaa7ebac385df61ae8ba4ca6e0bd9ad7463f628117f1428160ac1a2aa16834837130edb28a22b2c2e720ee93eb70c1086ce6855127f5767 WHIRLPOOL 140b1aa6bfd6ba45acde7a27b29d0410cbcd3940e37f45de9ab4e5c064ffb4ea73cfe25ae80e30ec6f6cc8733535607c779596e7e56c2412f74c51b3cb9b1328
DIST gitlab-ci-multi-runner-1.3.1-arm 55880648 SHA256 106a6abb55b055f6f9f7f6ac2f65dd26f440b4afcd000cfc128a10c347c3e95d SHA512 a019c30c390d6da949ada3dccc8de9ed0e8c24fc68abbd2d3fa78fb79055c542d74584bff013a228b9abec6e7e2881f99ad5a94ebc008fb19584f12fc55111af WHIRLPOOL 1f9f1e0e4bbfc1c7a3702e2748868e3a9021e9d1289274b4014dbe6876e379ef12f258cdcc9d85320ef5c2e413d78e6815a41e33b9aad2781fba226a2fcc3b13
DIST gitlab-ci-multi-runner-1.3.1-x86 56049856 SHA256 3b8df407e0014bf82d7751d0cc6a55c7cf73be224550cdc239aa23b4f053a7f4 SHA512 4635de807a4812bf75396eb3f81f160409b1997931b5601530af794a06914bcbb41d25139bc5899385e16ae7ec2f09387b5973589c7ea66c5df6b4e993050814 WHIRLPOOL fa576629cd700ff7cd9f55c5da4f4dbf24e8188066df78f383be413052462fccc13d5e3b45ff582785052acef2a77ff49f3a9e1f2f1742e6ce98b67274bb03a3
DIST gitlab-ci-multi-runner-1.3.2-amd64 59026624 SHA256 11a27560c0b52138e1947b25fc02768a493fb6480a9e81f1be9980823767dfc0 SHA512 1f80754c13460ea3c849b91a1e08ca19cc906e96ed2d392a7a5b5ac86596b065ef0969c396b17dede090d00b2d61734db1c997ab6884f2768170bc50a69ff262 WHIRLPOOL c0c48efd7591861a969c3ab0d0c3317eefa8ea9f90d518e3f4698d16df2ab35865fe90320063570c064c9fe553f79a015b22f6ac0202f8b70ea381e4a6e42308
DIST gitlab-ci-multi-runner-1.3.2-arm 55880656 SHA256 9277c93936071c28853e30c65f1619ad8633636cd33b44d844f564e606f9a816 SHA512 95bf8ba209c137b02fc9d08ffa8222a98d3d9e821360c77cac174b8482dc41f04ea294784b7dc3937515731ad41927f756c448247728582e3782484ffa3015e5 WHIRLPOOL 7ed4df051005b9b77aecdc99753e8a6a63afacbacf57e86431a544ca6fbd0fd9d6acf3c9685d28b6dce6213a235c29c35145833bcd74183e7ce42ac593b7962b
DIST gitlab-ci-multi-runner-1.3.2-x86 56049864 SHA256 f76eb70b7033f0db62022136e585635e28e8f89bebef327a240f8becb7bd254e SHA512 cf379e9fc3187ce018f23fdc4be0c541e7d0bc9080ba9358beb20b8db9ad0e18926d383f22bbdbbe5345668c84d4005c206568c10a2b255a93d7e6e0735a709e WHIRLPOOL 200ffa04bcf330f0f3f54b7f13639c5b17bd4571b599539ae1f5166a5709f410945b1b33450b87aad666250cfc13a32a1312afa4c6509c906c8e15cd5a579188
EBUILD gitlab-ci-multi-runner-1.1.4.ebuild 2349 SHA256 6432c48b3a7a36c0b28ccab7fb79382061fa9296df9b6dc9ca32d4caa5f20702 SHA512 2a7674d506e79d8570fa8527dd10b87e775a75b4daf41458bcca28f5ad9863145571d4ebf9d9e0d9df015e48c89a7bd4a05d1bc7928223fdc2b7fd528d5282d8 WHIRLPOOL 6df8346401d631b58a3a6e1ce9f2c0e3e8b871e99880099463dcb9b5639d08b3725c7c83e7f96dfe7e8cba4e60abe77e2afbeb2c7ae8ec13cf02b05d1723fd9f
EBUILD gitlab-ci-multi-runner-1.3.1.ebuild 2349 SHA256 e08c86353148305b0d0b6e671061ae22bf551b8bdce0902b65112fffb9b35cde SHA512 43c9921253423607a395f943d50c699e33e868aac3c76c06c9d9e3701d97fbf8513d06734eefb826f8a26fa62bd435bd12945dd623af122013edfd6295025185 WHIRLPOOL dec520c11a615649549616dac61335367183f08eec5ec137750d64b8fd47330870370cd5dae50a11244203f8c4ddfdf9ef11ef1e654e6508b999d5db211cfc06
MISC ChangeLog 331 SHA256 0f33ca60ed9d4f2a56a250a64af5322127784b2233b1118d58365908b4423503 SHA512 53adf761c39c6fd9039c71cf59f9ea8cae0a0701658c2d8f244a57a1eb395c88cfdc87a6b4f90ab012a5ac9b6e08675f57f9aebb93d360bbd0180f6966d2f6e8 WHIRLPOOL 9abeef103adb8b8ec725640208c0d7131db5bcd204da7de154cc3fdcf1f7939be010817a1c8e9ba7ae3899c5338ec05f276d8776fed5c9438e9ce667d856616a
EBUILD gitlab-ci-multi-runner-1.3.2.ebuild 2349 SHA256 29cac383ea3d01f2c5edc10698d5c49870e6d82eb05dc035610df7028ba5ebc9 SHA512 ebe3807eba35b313a64baf16121cc1794bda640a4f5e979c5898c33f4d02e756832fe1a052e500bc7257dfdd16faa43de5abe69062572064360689add0f3ad76 WHIRLPOOL 2674e052ed40f61530c34c396fc35fe9aa555f6f825abc3ac20b89f0d0090234e198bce69c5d1580c25401888b000b5e9c47c4ae6c0f3f02d8d2654f3a8ecd89
MISC ChangeLog 568 SHA256 9a3476e5b90bd7e8a8a6ad0e3009e8eb3ea9fa5aedb5858fcad5b72df1607ff5 SHA512 3e709080b37f1d014f5f27e0b150a0418e98d6c473500382878fa3dac67b1b969727afa2fb8a44896ce9a57460808611598b77ab9c9b7a135f37a5f645c90a94 WHIRLPOOL 6df59c07af7f11b8475feae33c2b9150fffde873ae082948c3e7900fbd804712e06735c32789e8bf24b6cd0fb5bbd7c7af28f73d991e03057aca2c080a656fa3
MISC metadata.xml 234 SHA256 f35b97f99a26d73cc441e1d93bfe25aaa4e9f7f6d90c8d05a74f7b7bc5b68472 SHA512 59d8156b3ca3e99c40d5a2a32de7edf2eb53279b2424998862589d6bad77617d23fc852afec0a92f8ac5bb54a88ebc504cc0641029c1936412e90ab03dfdd447 WHIRLPOOL 935a1401910a42f888c991e443a49275ea8b87976c5aa977f670053d97d18754231749749bc92d37d4b5f45ecf65914480942a11b5827b6c08fb24313a428431

View file

@ -0,0 +1,100 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
inherit eutils user
DESCRIPTION="GitLab CI Multi Runner is the new build processor needed for GitLab CI >= 7.12"
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-ci-multi-runner"
SRC_URI="x86? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-386 -> ${P}-x86 )
amd64? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-amd64 -> ${P}-amd64 )
arm? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-arm -> ${P}-arm )"
RESTRICT="mirror"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~arm"
DEPEND="dev-vcs/git"
RDEPEND="${DEPEND}
net-libs/nodejs
virtual/mta"
MY_NAME="${PN}"
MY_USER="gitlab_ci_multi_runner"
DEST_DIR="/opt/${MY_NAME}"
LOGS_DIR="/var/log/${MY_NAME}"
TEMP_DIR="/var/tmp/${MY_NAME}"
RUN_DIR="/run/${MY_NAME}"
pkg_setup() {
enewgroup ${MY_USER}
enewuser ${MY_USER} -1 /bin/bash ${DEST_DIR} ${MY_USER}
}
src_unpack() {
local a="$(usev amd64)$(usev arm)$(usev x86)"
mkdir -p "${S}"
cp "${DISTDIR}/${P}-${a}" "${S}/${PN}"
}
src_prepare() {
chmod +x "${S}/${PN}"
}
src_compile() {
# nothing to compile, binary all-in-one goodness! (?)
:
}
src_install() {
local dest=${DEST_DIR}
local conf="/etc/gitlab-runner"
diropts -m755
dodir ${dest}
exeinto ${dest}
doexe "${S}/${PN}"
diropts -m750
dodir ${conf}
dosym ${conf} ${dest}/.gitlab-runner
# fix permissions
fowners -R ${MY_USER}:${MY_USER} ${dest} ${conf}
## RC script ##
local rcscript="${MY_NAME}.init"
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@USER@|${MY_USER}|" \
"${T}/${rcscript}" \
|| die "failed to filter ${rcscript}"
newinitd "${T}/${rcscript}" "${MY_NAME}"
newconfd "${FILESDIR}/${MY_NAME}.conf" "${MY_NAME}"
}
pkg_postinst() {
elog
elog "If this is a fresh install of GitLab CI Multi Runner, please configure it"
elog "with the following command:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
}
pkg_config() {
einfo "You need to register the runner with your GitLab CI instance. Please"
einfo "Follow the instructions on"
einfo
einfo "https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-manually.md"
einfo
einfo "Perhaps I'll improve the ebuild later ... kthxbye."
}

View file

@ -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

View file

@ -1,7 +1,10 @@
AUX gitlab-shell-2.0.0-config-paths.patch 1356 SHA256 442a8e18b4d8e6092db0d39659cba5e41404e90f21070ed50b5460177f28f1b2 SHA512 0445cd42086b2d77825c487d604ddcb11f8fdf4eb8dcdfa1fe1b8e8c24d7b8f273834dbec0bfbb763a35a74605d558cc8d3feaa056eb02a113d18124a764551e WHIRLPOOL 0e3367b229ea4f13818fe2e485dc8da83ad695aec496881cb5eb918b183029b0013518ca64acba1568d93dc418dfaf083c2a86b9f2e3adf9fe15cad038011b30
AUX gitlab-shell-3.2.0-config-paths.patch 1826 SHA256 c83db7c37dcac577ce499eab4bb0168253f49d303ba1991fdec90d13cc3fe37a SHA512 7524b6b8cd7cd141a56c468efa303b1d21576ac9e03cb866cbf9dcac34e1b8d4f356333737050e2e5dfeb0f0ad904b3f548c40e1209c1f35054ed2027b1d8271 WHIRLPOOL fdbd2dfe43ff4a2af97227fbf8c4589ca3734ebf0320b7e9c5e8ea39882c49d45815a0ee3c765a141affacbe48f4063987b9664a918e0e216b49ca46a475cc5f
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 3509 SHA256 55b1f12be58f972793adc90dc952e7f09d7a2cee3591d9ba40f42a503f22b9cb SHA512 fe5d78bf082e9bd53acf4326764d3a99c509c3a8bde7af7d6edd294e35c1c4cca808a38d5a91f090fcf20922b91f2a2efb33db410e3041b5a998164b35e34d78 WHIRLPOOL 2777285c7ac88b68d99fb60b0dea2725bdcade41bca08eeb30b666b9ed6c0867db6e54438da884ec558455c8e01801cb622b584073c6a6c14bb22828eaaf19d8
MISC ChangeLog 252 SHA256 13d7252e9eba043b242db349e9b0135102cd8c0e2d94a4187b666980f5ae2799 SHA512 e007f03eeec6dfb6af802b065f97b5684a67b77e2fd57c8bba93f23de37dd4c7f3e338280d8103599fa6088313414928569042fe667d00f94440e18ee0fe55fd WHIRLPOOL 5cfa7f635df904ab467621b61dd57cafc01d6b398fdfe2819a6358b0ad6a2b8b8f84e53fcae77abf4c909aa84718d643213aecf3491813883631c7997e19d475
MISC metadata.xml 234 SHA256 f35b97f99a26d73cc441e1d93bfe25aaa4e9f7f6d90c8d05a74f7b7bc5b68472 SHA512 59d8156b3ca3e99c40d5a2a32de7edf2eb53279b2424998862589d6bad77617d23fc852afec0a92f8ac5bb54a88ebc504cc0641029c1936412e90ab03dfdd447 WHIRLPOOL 935a1401910a42f888c991e443a49275ea8b87976c5aa977f670053d97d18754231749749bc92d37d4b5f45ecf65914480942a11b5827b6c08fb24313a428431

View file

@ -0,0 +1,64 @@
diff --git a/config.yml.example b/config.yml.example
index 166e384..4a47b28 100644
--- a/config.yml.example
+++ b/config.yml.example
@@ -25,11 +25,11 @@ http_settings:
self_signed_cert: false
# File used as authorized_keys for gitlab user
-auth_file: "/home/git/.ssh/authorized_keys"
+auth_file: "/var/lib/git/.ssh/authorized_keys"
# File that contains the secret key for verifying access to GitLab.
-# Default is .gitlab_shell_secret in the root directory.
-# secret_file: "/home/git/gitlab-shell/.gitlab_shell_secret"
+# Default is /opt/gitlab/.gitlab_shell_secret.
+# secret_file: "/opt/gitlab/.gitlab_shell_secret"
# Redis settings used for pushing commit notices to gitlab
redis:
@@ -43,7 +43,7 @@ redis:
# Log file.
# Default is gitlab-shell.log in the root directory.
-# log_file: "/home/git/gitlab-shell/gitlab-shell.log"
+log_file: "/var/log/gitlab/gitlab-shell.log"
# Log level. INFO by default
log_level: INFO
diff --git a/lib/gitlab_config.rb b/lib/gitlab_config.rb
index beaf173..6e1b799 100644
--- a/lib/gitlab_config.rb
+++ b/lib/gitlab_config.rb
@@ -4,11 +4,11 @@ class GitlabConfig
attr_reader :config
def initialize
- @config = YAML.load_file(File.join(ROOT_PATH, 'config.yml'))
+ @config = YAML.load_file('/etc/gitlab-shell.yml')
end
def home
- ENV['HOME']
+ "/var/lib/git"
end
def auth_file
@@ -16,7 +16,7 @@ class GitlabConfig
end
def secret_file
- @config['secret_file'] ||= File.join(ROOT_PATH, '.gitlab_shell_secret')
+ @config['secret_file'] ||= "/opt/gitlab/.gitlab_shell_secret"
end
def gitlab_url
@@ -36,7 +36,7 @@ class GitlabConfig
end
def log_file
- @config['log_file'] ||= File.join(ROOT_PATH, 'gitlab-shell.log')
+ @config['log_file'] ||= "/var/log/gitlab/gitlab-shell.log"
end
def log_level

View 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=(
"${P}-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}."
}

View file

@ -1,3 +1,9 @@
*gitlab-ce-8.9.5 (09 Jul 2016)
09 Jul 2016; Manuel Friedli <manuel@fritteli.ch> +gitlab-ce-8.9.5.ebuild:
www-apps/gitlab-ce: Added ebuild for gitlab-8.9.5. It contains a security fix
for CVE-2012-6684
*gitlab-ce-8.9.4 (05 Jul 2016)
05 Jul 2016; Manuel Friedli <manuel@fritteli.ch> +gitlab-ce-8.9.4.ebuild:

View file

@ -13,11 +13,13 @@ DIST gitlab-ce-8.9.1.tar.gz 21151788 SHA256 f93c32ea9c79e80f705afc3b008cfc52b29c
DIST gitlab-ce-8.9.2.tar.gz 21152737 SHA256 f1da983b827297ed45ee859293e9abd1b2da401e5c02d4d94deb08971cc019a9 SHA512 dd9fe895a3a9590b8c22fd158c6909b3abe4652721e1defe5dc6ab529fca9954e15b6e0c11be21f2a3a047b43188a23b7b7d75830808f4283838631fcc910b8e WHIRLPOOL 4570ed68e7918ec2cf149bed6fbe551d7e5a3e74e4a7334038f66d3970b77569d16f514ff6aa34f1e0fadf40e474f572e34cda5515e57fb410d46b069c6bfd83
DIST gitlab-ce-8.9.3.tar.gz 21156182 SHA256 39578df8b98113bbe79f49d1435d9c399729e9b0d42062a60c8d8c11d1fe056b SHA512 e03b448da007145a8869813e39ceb96f3209b5ab79cc1eee06bdfdb8c85392fdb7a7d5bf3c957fb9d55be93ee6f35945e88747ca1770d566dd4a55cdb0170149 WHIRLPOOL c390be29b4da63f222d22e667baa9876cdbba3d0d1d9d3aa22783355dd1989b2f2bb3692e6c17094444518e36bb0e87b972484c7afc3af132ddc3c536aebcaf9
DIST gitlab-ce-8.9.4.tar.gz 21156625 SHA256 bd2e2342e68b887f35b322f3e15894aa654c0701476ecfd7c4072f70c1752ad9 SHA512 7b60c99746a3f36298a30c396769189c10d129c827ef0b1f52b38b2fc72a3e425ca4b46fdd47cfec7d0680e84ecc37ab478dfaf9fbff45bb3773abab5681c088 WHIRLPOOL 70a698d85526537ec1f965472ebfeab76b6cc1ce8b638fbfa5c433b9ee9411f48284969c1dcac8297e5415e229ec172e38605338d1108aebde5e6645c1350aa1
DIST gitlab-ce-8.9.5.tar.gz 21555267 SHA256 6f1685d5b2cf36a580467017ba5a4ce59dc13f90ce160e031d883b424e2557d0 SHA512 7d8a6bb7fee72b4b6b877b5484aeacfb1ccbc387b5635c4bd56cc7296b7b107532aac43f25911580906b186504452c9a8a43d8b64e2c5a5b4b8027ef10bc8e52 WHIRLPOOL aaac0b42fe2b97107b868924e6710829376f42df6ed11af7456362463f19e5d4cd6cc9d4616dd1d7e865caa6f420e028fca2abf07746b5fb0ef3cb2c0427aec3
EBUILD gitlab-ce-8.8.5.ebuild 12342 SHA256 0b528722bb3bc7d232dc6a272973bf8da77992fefa308dabf4b7a9fba8548c18 SHA512 430ee8b469bf43bd8889e9375c49ca83a35d2956c6964e0f1dd07921fbb124a8d7decf60950fbbbc836025d74e73da1e7c89119da2348090d163eb6062739fb4 WHIRLPOOL 3730bf6b32dbc0c3605b15a953114aca56faf859f83672f05ad0b92251697a9cc0778b13d3ba3fd25ddb0858e8ce43b400573f68a605e063ad9bed8597c29fc5
EBUILD gitlab-ce-8.9.1.ebuild 12336 SHA256 d50f5bb06b8fd2082804e096d372d0caca441d5d24d30a5ab3fdbd78d7cf5aa2 SHA512 91a88f5342bdd9736f9e45ccbd690caf50c51eabd327c419aaca4203d65ab37ce562214d59280a073c0945945bd60d6f523ebb6586cec09a91b9fca16a3f0412 WHIRLPOOL 67ab639a78899f8161ee47f07d983e7bc90442348170b36c873b94475fcd11a0799c89fecfc1f7a3e21fc95b553ffbee23655d3d1fb1368dd83b66de46652bd5
EBUILD gitlab-ce-8.9.2.ebuild 12343 SHA256 504ae1facfdd479f79d8b1b03cf2a8695f55b9a653923c4c75bf7ede96d5eba0 SHA512 9a59ae1aaa358d94eb1548d940fb6ac100f38387f5f1d70b8798f6ac7d820317575e7e4f018a81c3a1a8a6b7ae8450625fcd0b1f7316f21e93a2e3936ae82236 WHIRLPOOL 5800a3894693f8152778508119f87011c5fe25b6e90f7d930208b0e68aac48ed90ef3a5be86a6c87198d8bd7ac440c8f08d79d525ab3f13d32a0c79e63e95aa0
EBUILD gitlab-ce-8.9.3.ebuild 12343 SHA256 504ae1facfdd479f79d8b1b03cf2a8695f55b9a653923c4c75bf7ede96d5eba0 SHA512 9a59ae1aaa358d94eb1548d940fb6ac100f38387f5f1d70b8798f6ac7d820317575e7e4f018a81c3a1a8a6b7ae8450625fcd0b1f7316f21e93a2e3936ae82236 WHIRLPOOL 5800a3894693f8152778508119f87011c5fe25b6e90f7d930208b0e68aac48ed90ef3a5be86a6c87198d8bd7ac440c8f08d79d525ab3f13d32a0c79e63e95aa0
EBUILD gitlab-ce-8.9.4.ebuild 12343 SHA256 504ae1facfdd479f79d8b1b03cf2a8695f55b9a653923c4c75bf7ede96d5eba0 SHA512 9a59ae1aaa358d94eb1548d940fb6ac100f38387f5f1d70b8798f6ac7d820317575e7e4f018a81c3a1a8a6b7ae8450625fcd0b1f7316f21e93a2e3936ae82236 WHIRLPOOL 5800a3894693f8152778508119f87011c5fe25b6e90f7d930208b0e68aac48ed90ef3a5be86a6c87198d8bd7ac440c8f08d79d525ab3f13d32a0c79e63e95aa0
EBUILD gitlab-ce-8.9.5.ebuild 12343 SHA256 504ae1facfdd479f79d8b1b03cf2a8695f55b9a653923c4c75bf7ede96d5eba0 SHA512 9a59ae1aaa358d94eb1548d940fb6ac100f38387f5f1d70b8798f6ac7d820317575e7e4f018a81c3a1a8a6b7ae8450625fcd0b1f7316f21e93a2e3936ae82236 WHIRLPOOL 5800a3894693f8152778508119f87011c5fe25b6e90f7d930208b0e68aac48ed90ef3a5be86a6c87198d8bd7ac440c8f08d79d525ab3f13d32a0c79e63e95aa0
EBUILD gitlab-ce-9999.ebuild 12347 SHA256 b7850042b023eb505544b47fcf8896bc0319ce96808d29b462d527aacb25d6c0 SHA512 2fc140d00fde6e248ea7cba17ce6e0243dcdad76c497d052a9bac5abdb6618b27ee2a1cbeb86aa5f4718688746abf1be499830af2fea848aec63ec870f4fa72a WHIRLPOOL 7f2de913692b0d363cc8f24a152302de2feaa70db97069049c3c15515b76da330dbbb11ce868f6d59e22e2c1fd5c7ef3874197d2bc5eb36b60e52056a02dd028
MISC ChangeLog 1607 SHA256 07bb67157c24f7834a68550f223fb7b2841c2aff91492b62df7ac33d46446791 SHA512 d175ad2e40fc28e6f8baf49f6127c644a7cffbc26cd68572e104e00020fa00f15a2d2a16f32ecdb87adbb6376280f622b23e208643d72bdaa29d536023cd52ca WHIRLPOOL 6896b3e71a44b15d9426a347bdd1ca0b8d394935892b2ae7accd5118b5cde0a4b7b306f10f3fcb3df03d62a4e03b05608d560614e00f0f2bea7fa47a7d6c92f9
MISC ChangeLog 1817 SHA256 bdf6a0164485d72cc113c8c97558eb45b3e3cd613c9a89b33302f0db984ca765 SHA512 36cc851d2794d182adc244623a3b095ee08f97f43c1b58fe463c999e660bd653b62f16a4106d945446247c0f30af08b15cb0e9b4be89d1c650464941d500b1e9 WHIRLPOOL 1f2dd2c8d6e978cbf98f0f78ed7c45a4b1949be23722547cee8afd9ad073141210c24008335553cc74eeade82669dc2b7294d16a29a0cbab9c7a251f8f2ec617
MISC metadata.xml 545 SHA256 1b7fc44d811e1ab7638fe4a40253f49d5f1071872d3020c22c4f67662750cb2f SHA512 86f47d297892bccfefa087d93936296f5647993a9ec8e3f47907a6859cbf385e5bc6f00502d7836c9e8d9efef2b6725bf145b0150924c2082b2bd164469ef6ea WHIRLPOOL 6bfb8a55684d68c8bfa6e025a0be965f7b815394ee0896dd2a13cfb524e3cf3f3149acc9072897e30a1842060389576aac07ea8beb4a8b0bfc3e8eab3723f2a1

View file

@ -0,0 +1,399 @@
# Copyright 1999-2016 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 ~arm ~arm64"
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"
COMMON_DEPEND="
${GEMS_DEPEND}
>=dev-vcs/gitlab-shell-3.0.0
>=dev-vcs/git-2.7.4
>=dev-vcs/gitlab-workhorse-0.7.5
kerberos? ( !app-crypt/heimdal )
rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 )"
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.0"
#
# 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
#
RUBY_PATCHES=(
"${PN}-8.7.5-fix-sendmail-config.patch"
"${PN}-8.9.1-fix-redis-config-path.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"
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
# 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.init
use unicorn && rcscript=gitlab-unicorn.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. 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 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
}
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
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
}
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 $@"
}