dev-vcs/gitlab-ci-multi-runner:

install init script, set up required directories ... taken from gitlab-ci-multi-runner-bin

Package-Manager: portage-2.3.0
This commit is contained in:
Manuel Friedli 2016-10-25 23:27:27 +02:00
parent 274e59ecae
commit 9edf4ac4c7
4 changed files with 63 additions and 6 deletions

View file

@ -1,3 +1,8 @@
25 Oct 2016; Manuel Friedli <manuel@fritteli.ch>
files/gitlab-ci-multi-runner.init, gitlab-ci-multi-runner-1.7.0.ebuild:
dev-vcs/gitlab-ci-multi-runner: install init script, set up required
directories ... taken from gitlab-ci-multi-runner-bin
24 Oct 2016; Manuel Friedli <manuel@fritteli.ch>
+files/0001-fix-Makefile.patch, -ChangeLog,
-gitlab-ci-multi-runner-1.4.1.ebuild, -gitlab-ci-multi-runner-1.5.0.ebuild,

View file

@ -1,9 +1,9 @@
AUX 0001-fix-Makefile.patch 3401 SHA256 d764379ad6b027eaab6e6f8a3874befad9567e5114caa247843d9abad29bf10e SHA512 12a44684aa05df41dea29e66bf42ec6a6b40f06b1a9c8a2682c5ce7a62264b1135df3a69f98cd9bf10bc05da062c61cfa02f803226d022ed9ebaf0bf6469449b WHIRLPOOL cdab4d9382f522ef136e77eeb38c7532172bc538e95254c4e57dfdf9b277d10f469211350994a228529142dc07d04f1df89a81acac01665ca2c9c9961f7da65a
AUX gitlab-ci-multi-runner.conf 44 SHA256 0b93ba53d557fbf603b50f6d78eb2c4415b9a79f056142b6edf4a63fc6612d6e SHA512 1f5ff480740b18fc985ae9337b8dc4ddd1bde5253e09042b5542cb9a3db54b9cef1f7b24445c829eb83fcfd8751b693018154f6b97ce0a6e723d5d71d9a27429 WHIRLPOOL fc5218c55917b3303baf649fbafaf1dc50cf52d0ee04852716defe4f21b806f4f313071b1c55920d89da66180405d35da0f7cca73c2617b70bcaa67f725cab2a
AUX gitlab-ci-multi-runner.init 702 SHA256 7a19a20f0b3138a86d805872706ebc2918b01663cfdb351aa2d2cb89707602e9 SHA512 005e10a1c2974209f74efb5899d8f7627284947b716049a5211a2c5767a43b7a629061d96a6f445646f88cdb4afb9918fc2d154d68fabd4fe8ec4e0b9fd0125f WHIRLPOOL 85100f9a311ce1a39adddc10dee5af7862dceff5ae24e30c2830b74cdf78d74357fc0f0b43010a79909caf31e33439f0facc5dbd8e87b6452180093d1058eb3d
AUX gitlab-ci-multi-runner.init 662 SHA256 faf47cdc02b78527d98cd044f2d2aed38a44e39fc6aa5ccc6249c6bce7b979b2 SHA512 9a2f6bcac4c1b992aa5f046cc2cf8f379d2b1f5b6d8065793996828be1527fb5e9131b2967131c292003319f2b27c0cb1229a147236279027e11d13f73e9bd76 WHIRLPOOL 7ffb5d25cb5bd66459981fb71a79d4690b1efaff41e5873431b8ec9cae62783c9fb71ea426a0a1d8f0bf9fdd7dbcb569136dc38f7736296565258a0dcfa3536f
DIST gitlab-ci-multi-runner-1.7.0-prebuilt-arm.tar.xz 9331496 SHA256 11431f2db5809829fe652c337b05cad9ccba837491c44c6fa0bb3ae0c9be6f49 SHA512 61b3fe3559b18f55be1148ab77232d6b505949ec965622fefa92fff07ffcee74ee2516c065ae4af3074f407c4ee77ba45d3cf4dc37f893c2e6322a911ffaef0b WHIRLPOOL 4d4a7696bf7ff462442f7dcbff4c7e0d49160b87dbfefe7d5c1a60184eba021a83ebfc54859dcc8beedc6e10fbab88bdfb374be06ab7791e2b374a52d05c3563
DIST gitlab-ci-multi-runner-1.7.0-prebuilt-x86_64.tar.xz 8370352 SHA256 e50ba210ccdde7635d1d8621de1f8bad2c4765495d4ce0f6385e776e569d80e1 SHA512 c62060a6f8314f308e12840506ec074c685b9962235ead8a2454b7e628060028274374b11d5da94ebda3ff802e6d3c377dc3e1e9d190d4ea0638722a98661c7c WHIRLPOOL 39727f719fd4394793601b6c521fa97a7c7333ba52aa0efb83348c5c366f180d8e60236349efa0400b346bfa8d1e75770f8c08b124d6107981c2967cca730882
DIST gitlab-ci-multi-runner-1.7.0.tar.gz 3527772 SHA256 ffcc18bfc54d4e2846bbfb21e72798c90ca5af214ac606ea07fbbeec24bb155f SHA512 06289c910f599ce180d62bad2e36cf4ac0f261f740c7ae3d4baf42aa4926b9dd2229b8c25ce8191613957017e1b1af4cdde76512eff2460f4a3db7f085a0e2a1 WHIRLPOOL 17d1259123bd0e8275f72453ba89e59f557e568b6698a0f61a511217b22a28d60350925928275072b1599cf4cf841d3f720eebd7a4e409627ad9257e8e2829f8
EBUILD gitlab-ci-multi-runner-1.7.0.ebuild 1959 SHA256 88fc294a346844f9dd95448f566266572216397aa30e988ff4d919eee86391df SHA512 38c9b13a0c2f468f46657b5d4840bd0b473556789b4c6de8459033259c34c5e9f2b51a3b4961d039cf6807a238bf62f7206c6ea18fc4930e3c346ddb81e6f9e4 WHIRLPOOL c3c73bd802c446b08e85828e0d28a2611ed6e4a99ce3173905a5d5e1276caddaa81664c9b8d40e0c052ba95bf9313c0fee24551912812017bb38ef466299100c
MISC ChangeLog 460 SHA256 e3043e75de553336ee302b1d4a05843aa076eee5396a57edfe29bea05aed7bdf SHA512 5e1ecb125bf027b7e08bfa538a486d29a9ca2c4aa516e5acac2307dae90631dae0d76202a98232e11597c44601b6279a023aee7b7082d07ddd2ffb0844e03ea9 WHIRLPOOL 1607b339be49016ab4c5bc3eff2ee072a7528cfd7a93fed3b3edb015af7890ede57500a55a16bfd7f87caa5625a517cd012cf5b850bd41340d49af4f1f9b8b33
EBUILD gitlab-ci-multi-runner-1.7.0.ebuild 3250 SHA256 fc9f976619ff9ddedaceee812dd2babcb1fb7d7236868368d23a5b67b60bd08b SHA512 276835a37b5be71c8663f92bb093c568ecdcae69d45a88a9ce3ccf896cefd3d59a7f8bfce43eed7de72744e4a60b110b8ca9ae8c2fed94f62c0da475e5c40a50 WHIRLPOOL cc4796822e8443f81f958c8fa39475fb1b168ca06b7e8c38f148b91b77da033c1113c88dd818aaf14265ea07ade5de367235168cdf6e2ccb276ffd45538e9812
MISC ChangeLog 714 SHA256 0f25cf56f039852a47fc1a86f09bf43e24295913799be6ee747946c3e5f19b48 SHA512 2f905e4bb1ae863e77e5a5ff95049a276faa1dfe15a2751a7fce583fa5e18a23995df6a38ded969ce444e110bffbfb320027ba2ac5d35d43908e11627b42224e WHIRLPOOL 7e3de88c9e79cd0aa141e6075a5e88ccf79392b5651d51f829efb59be7aecf8c32594ad319bef8e43ca7ff36a5189a197464ac940125d94f6ede25d3fe65b55c
MISC metadata.xml 329 SHA256 f0ae08a64aa32a07486e744ce11ac5448770b7320454015bcd065e312fcb5e9c SHA512 11e4eaf25633c5979e5243350bdf2ddc6d9dca06ab54ec38359591f1d002ea2a224e53b3e6c4ac53b5b2e795a87769fdbd97c547b008272e0a1491141f422e5d WHIRLPOOL ab2c1cb3d9aff1f757b49633f94d4b98da4b83dadab12ab8d869f9e1f6763b3125010147472e58e910e7fc42da262dbd69a1bf3939f3720a79ab4329184b4c35

View file

@ -11,8 +11,8 @@ start() {
ebegin "Starting gitlab-ci-multi-runner"
checkpath -d /var/run
checkpath -f -o @USER@ -m640 "${LOGFILE}"
start-stop-daemon --start -b -u @USER@ --chdir /opt/gitlab-ci-multi-runner --pidfile /var/run/gitlab-ci-multi-runner.pid -1 "${LOGFILE}" -2 "${LOGFILE}" --make-pidfile \
--exec /opt/gitlab-ci-multi-runner/gitlab-ci-multi-runner -- run
start-stop-daemon --start -b -u @USER@ --chdir @HOME@ --pidfile /var/run/gitlab-ci-multi-runner.pid -1 "${LOGFILE}" -2 "${LOGFILE}" --make-pidfile \
--exec /usr/bin/gitlab-ci-multi-runner -- run
eend $?
}

View file

@ -3,7 +3,7 @@
# $Id$
EAPI=6
inherit eutils golang-build golang-vcs-snapshot
inherit eutils golang-build golang-vcs-snapshot user
EGO_PN="gitlab.com/gitlab-org/gitlab-ci-multi-runner/..."
@ -31,6 +31,14 @@ DEPEND=">=dev-go/gox-0.3.1_alpha
RESTRICT="test"
MY_USER="gitlab_ci_multi_runner"
MY_HOME_DIR="/opt/gitlab-ci-multi-runner"
pkg_setup() {
enewgroup ${MY_USER}
enewuser ${MY_USER} -1 /bin/bash ${MY_HOME_DIR} ${MY_USER}
}
src_prepare() {
if ! use docker-build; then
mkdir -p src/${EGO_PN%/*}/out/docker || die
@ -62,4 +70,48 @@ src_install() {
golang-build_src_install
dobin bin/*
dodoc src/${EGO_PN%/*}/README.md src/${EGO_PN%/*}/CHANGELOG.md
# set up dirs
# here be the builds
diropts -m755
dodir ${MY_HOME_DIR}
# here be my home and my castle
local conf="/etc/gitlab-runner"
diropts -m750
dodir ${conf}
dosym ${conf} ${MY_HOME_DIR}/.gitlab-runner
# fix permissions
fowners -R ${MY_USER}:${MY_USER} ${MY_HOME_DIR} ${conf}
# rc script
local rcscript="${PN}.init"
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@USER@|${MY_USER}|" \
-e "s|@HOME@|${MY_HOME_DIR}|" \
"${T}/${rcscript}" \
|| die "failed to filter ${rcscript}"
newinitd "${T}/${rcscript}" "${PN}"
newconfd "${FILESDIR}/${PN}.conf" "${PN}"
}
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 at"
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."
}