dev-util/gitlab-runner: add 18.0.1

Signed-off-by: William Hubbs <williamh@gentoo.org>
This commit is contained in:
William Hubbs
2025-05-19 09:55:37 -05:00
parent 994f42eb09
commit 1d7deffef7
4 changed files with 103 additions and 0 deletions

View File

@@ -4,3 +4,5 @@ DIST gitlab-runner-17.11.1-deps.tar.xz 114859732 BLAKE2B 52e2bc3aee36699d0a15b20
DIST gitlab-runner-17.11.1.tar.bz2 1873313 BLAKE2B 5d4bdf3a3c554476efaf15b82941cf037fbb842285b20b667da8cf23fb4f016b6466d68a6819fab66ca9842810310f90cdd22d587e5bf3132d50efb43607c6f8 SHA512 00e6e7b790332fc40a0e8a9efbf807a8751f9d7c158ab837b950dd39d521929fcdef689745d81f1d01a03ac4f1913bdc84fc68d1aaf5e98009699b6d5bc7bebf
DIST gitlab-runner-17.9.3-deps.tar.xz 110070696 BLAKE2B 4c2fdf31d190ab3d8023ddce40b608d81d607fc78865f8c5b9c14fcd66126455cfb69077aebefbf82cada2c9ef3de01a035247c6509296d663f36cc6b883beae SHA512 1abb78859ee9d4ee5ee8abfcd9b7d490f0b98980a10c459c3e4fe1e56455616a0d261ec627450c3b7a516c3b2b0bd62018a9ff5d3fb26144b7a6cc095247abbf
DIST gitlab-runner-17.9.3.tar.bz2 1791900 BLAKE2B 4f850cad7f869595cf4e9e100fa840dbd66f227a9ed7e8f34ecabc517f9459bc85527270e0b57194c1e4067b8138155e2eee980e7ffe3890da881b1414501061 SHA512 192abb08400dabc8c6d78f6571f2d675e78696e8a3bf93dcc5901035b3a0a4f14bff3e5d3c8786f21f6ed0fce11f06cbdb94bbdf25340c0b04eb83ce5c103856
DIST gitlab-runner-18.0.1-deps.tar.xz 116241368 BLAKE2B 305c76bec626dfe8072e23378137e342f2331678337ed2d53c1bd5dadc4a15c1eefa50edc6d2c3aa26af0f82f0ae61d0b9f1027fcfa29c31683fae77788561fa SHA512 558c808a675e02963cdd5108889a6bb1fbf665d099b4b1a7973621bb34d0c76b92ef7e190232f28645d4a849149014b1047cb78335211c6b868bec217c8cd13b
DIST gitlab-runner-18.0.1.tar.bz2 1943624 BLAKE2B ce2fc7dbbbdf6001a77e91a496f3bf4dba037361d341e733394d255121b196a9923e10b736fb8e621cdcf3b8cc52bae38882a209238ed07a7f508d2c67073480 SHA512 929fff692b7c9f4b59fc8f9741e001d96abec86dc91a95412171527833304772283d5f4116c9a8ea24b83ab5ecc8734f61ea6c56fb92cb388cdd8c36484b0f92

View File

@@ -0,0 +1,5 @@
# config file for /etc/init.d/gitlab-runner
# run /usr/bin/gitlab-runner -h to see available options
# --config, --user and --working-directory are set by the
# service script, so do not add them here.
# RUNNER_OPTS=""

View File

@@ -0,0 +1,28 @@
#!/sbin/openrc-run
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
command="/usr/bin/gitlab-runner"
command_args="run
--config /etc/gitlab-runner/config.toml
--working-directory /var/lib/gitlab-runner
--user gitlab-runner
--syslog
${RUNNER_OPTS}"
command_background=true
extra_started_commands="reload"
name="GitLab Runner"
pidfile="/run/${RC_SVCNAME}.pid"
retry="QUIT/60/TERM/60"
required_files="${runner_config}"
depend() {
need localmount
after net.lo loopback
}
reload() {
ebegin "Reloading ${name} configuration"
start-stop-daemon --signal HUP --pidfile "${pidfile}"
eend $? "Failed to reload ${NAME} configuration"
}

View File

@@ -0,0 +1,68 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit eapi9-ver go-module systemd tmpfiles
# make sure this gets updated for every bump
GIT_COMMIT=3e653c4e
DESCRIPTION="The official GitLab Runner, written in Go"
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-runner"
SRC_URI="https://gitlab.com/gitlab-org/gitlab-runner/-/archive/v${PV}/${PN}-v${PV}.tar.bz2 -> ${P}.tar.bz2"
SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
S="${WORKDIR}/${PN}-v${PV}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 ~ppc64 ~riscv"
COMMON_DEPEND="acct-group/gitlab-runner
acct-user/gitlab-runner"
DEPEND="${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}"
BDEPEND="dev-go/gox"
src_compile() {
emake \
BUILT="$(date -u '+%Y-%m-%dT%H:%M:%S%:z')" \
GOX="${EPREFIX}/usr/bin/gox" \
REVISION=${GIT_COMMIT} \
VERSION=${PV} \
runner-and-helper-bin-host
}
src_test() {
CI=0 ego test
}
src_install() {
newbin out/binaries/gitlab-runner-linux-* gitlab-runner
newbin out/binaries/gitlab-runner-helper/gitlab-runner-helper.linux-* gitlab-runner-helper
DOCS=( docs CHANGELOG.md README.md )
einstalldocs
insinto /usr/share/${PN}
doins config.toml.example
newconfd "${FILESDIR}/${PN}-18.confd" "${PN}"
newinitd "${FILESDIR}/${PN}-18.initd" "${PN}"
systemd_dounit "${FILESDIR}/${PN}.service"
newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
keepdir /etc/${PN}
fperms 0700 /etc/${PN}
fowners gitlab-runner:gitlab-runner /etc/${PN}
}
pkg_postinst() {
tmpfiles_process gitlab-runner.conf
if ver_replacing -lt 18.0.0; then
ewarn "The logs are now redirected to syslog instead of being stored in /var/log/gitlab-runner"
ewarn
fi
[[ -f ${EROOT}/etc/gitlab-runner/config.toml ]] && return
elog
elog "To use the runner, you need to register it with this command:"
elog "# gitlab-runner register"
elog "This will also create the configuration file in /etc/gitlab-runner/config.toml"
}