* [gentoo-commits] repo/gentoo:master commit in: dev-util/gitlab-runner/files/, dev-util/gitlab-runner/
@ 2022-03-27 22:15 William Hubbs
0 siblings, 0 replies; 3+ messages in thread
From: William Hubbs @ 2022-03-27 22:15 UTC (permalink / raw
To: gentoo-commits
commit: 1245d3fb758b18e5799e502e97cad3282a9f7bb6
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 27 22:13:38 2022 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Mar 27 22:14:43 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1245d3fb
dev-util/gitlab-runner: initial import
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
dev-util/gitlab-runner/Manifest | 2 +
dev-util/gitlab-runner/files/gitlab-runner.confd | 19 +++++++
dev-util/gitlab-runner/files/gitlab-runner.initd | 35 +++++++++++++
dev-util/gitlab-runner/files/gitlab-runner.service | 18 +++++++
dev-util/gitlab-runner/files/gitlab-runner.tmpfile | 1 +
dev-util/gitlab-runner/gitlab-runner-14.9.1.ebuild | 60 ++++++++++++++++++++++
dev-util/gitlab-runner/metadata.xml | 12 +++++
7 files changed, 147 insertions(+)
diff --git a/dev-util/gitlab-runner/Manifest b/dev-util/gitlab-runner/Manifest
new file mode 100644
index 000000000000..a6b0f0003131
--- /dev/null
+++ b/dev-util/gitlab-runner/Manifest
@@ -0,0 +1,2 @@
+DIST gitlab-runner-14.9.1-deps.tar.xz 142907928 BLAKE2B fb61c7b03d3dd63196bb4de0042a3c65035a3fc132435d7844635bb968a6bfe43e05fca053bfa96ba22cc9fd601d533857bffdf8bd734e90e86fefce8091da34 SHA512 d077cc1220ad33196655e578937c910c7b368eef57bb96d385eac0957e5f8902bb3720b1614f3179753929f25589a8d1d543bcb61d4cf5972bf4ada96a4056d8
+DIST gitlab-runner-14.9.1.tar.gz 1259997 BLAKE2B a4694198630fb2cc47ad4e9fe36b366ae695d8a4618e755b9ff12b608d5d8266614cc649b0e63bca125919ebe8dd40859fc7804cd8bb40ed391a54d6ae65a325 SHA512 ec804f3a4982414d52a4f3b5ff1560c5342a3650f1bb3edefa211a3810b17e202263abc67bfcd4423fe88b5acd501da1d23f3980a078800ab25932625ff75bc5
diff --git a/dev-util/gitlab-runner/files/gitlab-runner.confd b/dev-util/gitlab-runner/files/gitlab-runner.confd
new file mode 100644
index 000000000000..513b2f9cef18
--- /dev/null
+++ b/dev-util/gitlab-runner/files/gitlab-runner.confd
@@ -0,0 +1,19 @@
+# config file for /etc/init.d/gitlab-runner
+# The convention is that the defaults are shown here, commented out.
+# Do not override these unless you know exactly what you are doing.
+
+# runner_config="/etc/gitlab-runner/config.toml"
+# runner_datadir="/var/lib/gitlab-runner"
+# runner_service="${RC_SVCNAME}"
+# runner_user="gitlab-runner"
+
+# Additional options
+# run /usr/bin/gitlab-runner -h to see available options
+# --config, --user, --service and --working-directory are set by the
+# above variables, so do not add them here.
+# RUNNER_OPTS=""
+
+# Logging
+# runner_logdir="/var/log/gitlab-runner"
+# output_log="${runner_logdir}/gitlab-runner.log"
+# error_log="${runner_logdir}/error.log"
diff --git a/dev-util/gitlab-runner/files/gitlab-runner.initd b/dev-util/gitlab-runner/files/gitlab-runner.initd
new file mode 100644
index 000000000000..8ae45b510fd0
--- /dev/null
+++ b/dev-util/gitlab-runner/files/gitlab-runner.initd
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/gitlab-runner"
+command_args="run
+ --config ${runner_config:-/etc/gitlab-runner/config.toml}
+ --service ${runner_service:-${RC_SVCNAME}}
+ --user ${runner_user:-gitlab-runner}
+ --working-directory ${runner_datadir:-/var/lib/gitlab-runner}
+ ${RUNNER_OPTS}"
+command_background=true
+extra_started_commands="reload"
+name="${name:-GitLab Runner}"
+pidfile="/run/${RC_SVCNAME}.pid"
+output_log="${output_log:-${runner_logdir}/gitlab-runner.log"
+error_log="${error_log:-${runner_logdir}/gitlab-runner.err"
+retry="QUIT/60/TERM/60"
+required_files="${runner_config}"
+
+depend() {
+ need localmount
+ after net.lo loopback
+}
+
+start_pre() {
+ checkpath -d -m 0700 -o "${runner_user}" "${runner_datadir}"
+ checkpath -d -m 0750 -o "${runner_user}" "${runner_logdir}"
+}
+
+reload() {
+ ebegin "Reloading ${name} configuration"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $? "Failed to reload ${name}"
+}
diff --git a/dev-util/gitlab-runner/files/gitlab-runner.service b/dev-util/gitlab-runner/files/gitlab-runner.service
new file mode 100644
index 000000000000..047de5cc7363
--- /dev/null
+++ b/dev-util/gitlab-runner/files/gitlab-runner.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=GitLab Runner service
+After=syslog.target network.target
+ConditionFileIsExecutable=/usr/bin/gitlab-runner
+
+[Service]
+StartLimitInterval=5
+StartLimitBurst=10
+ExecStart=/usr/bin/gitlab-runner run -c /etc/gitlab-runner/config.toml -u gitlab-runner -d /var/lib/gitlab-runner --syslog
+Restart=always
+RestartSec=120
+StandardOutput=syslog
+StandardError=syslog
+SyslogIdentifier=gitlab-runner
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-util/gitlab-runner/files/gitlab-runner.tmpfile b/dev-util/gitlab-runner/files/gitlab-runner.tmpfile
new file mode 100644
index 000000000000..40453089f869
--- /dev/null
+++ b/dev-util/gitlab-runner/files/gitlab-runner.tmpfile
@@ -0,0 +1 @@
+d /run/gitlab-runner 0755 gitlab-runner gitlab-runner
diff --git a/dev-util/gitlab-runner/gitlab-runner-14.9.1.ebuild b/dev-util/gitlab-runner/gitlab-runner-14.9.1.ebuild
new file mode 100644
index 000000000000..22780481d840
--- /dev/null
+++ b/dev-util/gitlab-runner/gitlab-runner-14.9.1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module systemd tmpfiles
+GIT_COMMIT=bd40e3da
+
+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.gz -> ${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+COMMON_DEPEND="acct-group/gitlab-runner
+ acct-user/gitlab-runner"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+BDEPEND="dev-go/gox"
+
+DOCS=( docs CHANGELOG.md README.md config.toml.example )
+
+S="${WORKDIR}/${PN}-v${PV}"
+
+src_compile() {
+ emake \
+ BUILT="$(date -u '+%Y-%m-%dT%H:%M:%S%:z')" \
+ GOX="${EPREFIX}/usr/bin/gox" \
+ REVISION=${GIT_COMMIT} \
+ VERSION=${PV} \
+ runner-bin-host
+}
+
+src_test() {
+ ego test
+}
+
+src_install() {
+ dobin out/binaries/gitlab-runner
+ einstalldocs
+
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+ keepdir /{etc,var/log}/${PN}
+ fowners gitlab-runner:gitlab-runner /{etc,var/log}/${PN}
+ fperms 0700 /{etc,var/log}/gitlab-runner
+}
+
+pkg_postinst() {
+ tmpfiles_process gitlab-runner.conf
+ [[ -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"
+}
diff --git a/dev-util/gitlab-runner/metadata.xml b/dev-util/gitlab-runner/metadata.xml
new file mode 100644
index 000000000000..3ec5d0dffffd
--- /dev/null
+++ b/dev-util/gitlab-runner/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>infra@gentoo.org</email>
+ <name>Gentoo Infrastructure Project</name>
+ </maintainer>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/gitlab-runner/files/, dev-util/gitlab-runner/
@ 2022-03-29 2:39 William Hubbs
0 siblings, 0 replies; 3+ messages in thread
From: William Hubbs @ 2022-03-29 2:39 UTC (permalink / raw
To: gentoo-commits
commit: cfed4d10bd3144ed782b625e266cedd533d505d6
Author: Henning Schild <henning <AT> hennsch <DOT> de>
AuthorDate: Mon Mar 28 18:31:43 2022 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Mar 29 02:37:41 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cfed4d10
dev-util/gitlab-runner: fix init script syntax
Closes: https://bugs.gentoo.org/836305
Closes: https://github.com/gentoo/gentoo/pull/24795
Thanks-to: Henning Schild <henning <AT> hennsch.de>
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
dev-util/gitlab-runner/files/gitlab-runner.initd | 11 +++++++----
...ab-runner-14.9.1.ebuild => gitlab-runner-14.9.1-r1.ebuild} | 0
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dev-util/gitlab-runner/files/gitlab-runner.initd b/dev-util/gitlab-runner/files/gitlab-runner.initd
index 8ae45b510fd0..0e5c5ed224b6 100644
--- a/dev-util/gitlab-runner/files/gitlab-runner.initd
+++ b/dev-util/gitlab-runner/files/gitlab-runner.initd
@@ -1,20 +1,23 @@
#!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
command="/usr/bin/gitlab-runner"
+runner_datadir="${runner_datadir:-/var/lib/gitlab-runner}"
command_args="run
--config ${runner_config:-/etc/gitlab-runner/config.toml}
--service ${runner_service:-${RC_SVCNAME}}
--user ${runner_user:-gitlab-runner}
- --working-directory ${runner_datadir:-/var/lib/gitlab-runner}
+ --working-directory ${runner_datadir}
${RUNNER_OPTS}"
command_background=true
extra_started_commands="reload"
name="${name:-GitLab Runner}"
pidfile="/run/${RC_SVCNAME}.pid"
-output_log="${output_log:-${runner_logdir}/gitlab-runner.log"
-error_log="${error_log:-${runner_logdir}/gitlab-runner.err"
+runner_user="${runner_user:-gitlab-runner}"
+runner_logdir="${runner_logdir:-/var/log/gitlab-runner}"
+output_log="${output_log:-${runner_logdir}/gitlab-runner.log}"
+error_log="${error_log:-${runner_logdir}/gitlab-runner.err}"
retry="QUIT/60/TERM/60"
required_files="${runner_config}"
diff --git a/dev-util/gitlab-runner/gitlab-runner-14.9.1.ebuild b/dev-util/gitlab-runner/gitlab-runner-14.9.1-r1.ebuild
similarity index 100%
rename from dev-util/gitlab-runner/gitlab-runner-14.9.1.ebuild
rename to dev-util/gitlab-runner/gitlab-runner-14.9.1-r1.ebuild
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/gitlab-runner/files/, dev-util/gitlab-runner/
@ 2022-06-21 23:14 William Hubbs
0 siblings, 0 replies; 3+ messages in thread
From: William Hubbs @ 2022-06-21 23:14 UTC (permalink / raw
To: gentoo-commits
commit: 23c14ef8c96c49228be5605e24e464d4490cc116
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 21 23:11:37 2022 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Jun 21 23:14:18 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23c14ef8
dev-util/gitlab-runner: add patch for arm64
Bug: https://bugs.gentoo.org/852962
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
dev-util/gitlab-runner/files/build-for-arm64.patch | 48 ++++++++++++++++++++++
.../gitlab-runner/gitlab-runner-14.10.1-r1.ebuild | 5 +++
.../gitlab-runner/gitlab-runner-15.0.0-r1.ebuild | 5 +++
dev-util/gitlab-runner/gitlab-runner-15.1.0.ebuild | 5 +++
4 files changed, 63 insertions(+)
diff --git a/dev-util/gitlab-runner/files/build-for-arm64.patch b/dev-util/gitlab-runner/files/build-for-arm64.patch
new file mode 100644
index 000000000000..c150b5bc3918
--- /dev/null
+++ b/dev-util/gitlab-runner/files/build-for-arm64.patch
@@ -0,0 +1,48 @@
+From 2fc7d1d71c298fe736d4b8679f684942cd23d102 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 21 Jun 2022 23:35:28 +0100
+Subject: [PATCH] Makefile.build.mk: allow building for arm64 without
+ overriding ARCH
+
+Bug: https://bugs.gentoo.org/852962
+Thanks-to: William Hubbs <williamh@gentoo.org>
+---
+ Makefile.build.mk | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.build.mk b/Makefile.build.mk
+index 977db1e0e9..f6f31647f9 100644
+--- a/Makefile.build.mk
++++ b/Makefile.build.mk
+@@ -35,7 +35,7 @@ runner-bin-fips-docker:
+ @docker rm -f gitlab-runner-fips
+
+ runner-bin-host: OS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
+-runner-bin-host: ARCH := $(shell uname -m | sed s/x86_64/amd64/ | sed s/i386/386/)
++runner-bin-host: ARCH := $(shell uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/ | sed s/i386/386/)
+ runner-bin-host:
+ # Building $(NAME) in version $(VERSION) for host platform
+ $(MAKE) runner-bin BUILD_PLATFORMS="-osarch=$(OS)/$(ARCH)"
+@@ -56,15 +56,15 @@ runner-and-helper-docker-host: runner-and-helper-deb-host
+ $(MAKE) release_docker_images
+ $(MAKE) release_helper_docker_images
+
+-runner-and-helper-deb-host: ARCH := $(shell uname -m | sed s/x86_64/amd64/ | sed s/i386/386/)
++runner-and-helper-deb-host: ARCH := $(shell uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/ | sed s/i386/386/)
+ runner-and-helper-deb-host: export BUILD_ARCHS := -arch '$(ARCH)'
+-runner-and-helper-deb-host: PACKAGE_ARCH := $(shell uname -m | sed s/x86_64/amd64/ | sed s/i386/i686/)
++runner-and-helper-deb-host: PACKAGE_ARCH := $(shell uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/ | sed s/i386/i686/)
+ runner-and-helper-deb-host: runner-and-helper-bin-host package-deps package-prepare
+ $(MAKE) package-deb-arch ARCH=$(ARCH) PACKAGE_ARCH=$(PACKAGE_ARCH)
+
+-runner-and-helper-rpm-host: ARCH := $(shell uname -m | sed s/x86_64/amd64/ | sed s/i386/386/)
++runner-and-helper-rpm-host: ARCH := $(shell uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/ | sed s/i386/386/)
+ runner-and-helper-rpm-host: export BUILD_ARCHS := -arch '$(ARCH)'
+-runner-and-helper-rpm-host: PACKAGE_ARCH := $(shell uname -m | sed s/x86_64/amd64/ | sed s/i386/i686/)
++runner-and-helper-rpm-host: PACKAGE_ARCH := $(shell uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/ | sed s/i386/i686/)
+ runner-and-helper-rpm-host: runner-and-helper-bin-host package-deps package-prepare
+ $(MAKE) package-rpm-arch ARCH=$(ARCH) PACKAGE_ARCH=$(PACKAGE_ARCH)
+
+--
+GitLab
+
diff --git a/dev-util/gitlab-runner/gitlab-runner-14.10.1-r1.ebuild b/dev-util/gitlab-runner/gitlab-runner-14.10.1-r1.ebuild
index 176609496e49..6761ca661422 100644
--- a/dev-util/gitlab-runner/gitlab-runner-14.10.1-r1.ebuild
+++ b/dev-util/gitlab-runner/gitlab-runner-14.10.1-r1.ebuild
@@ -24,6 +24,11 @@ BDEPEND="dev-go/gox"
DOCS=( docs CHANGELOG.md README.md config.toml.example )
+PATCHES=(
+ # https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/3498
+ "${FILESDIR}"/build-for-arm64.patch
+ )
+
S="${WORKDIR}/${PN}-v${PV}"
src_compile() {
diff --git a/dev-util/gitlab-runner/gitlab-runner-15.0.0-r1.ebuild b/dev-util/gitlab-runner/gitlab-runner-15.0.0-r1.ebuild
index 36a78be3b1cb..046e21d8e4bb 100644
--- a/dev-util/gitlab-runner/gitlab-runner-15.0.0-r1.ebuild
+++ b/dev-util/gitlab-runner/gitlab-runner-15.0.0-r1.ebuild
@@ -24,6 +24,11 @@ BDEPEND="dev-go/gox"
DOCS=( docs CHANGELOG.md README.md config.toml.example )
+PATCHES=(
+ # https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/3498
+ "${FILESDIR}"/build-for-arm64.patch
+ )
+
S="${WORKDIR}/${PN}-v${PV}"
src_compile() {
diff --git a/dev-util/gitlab-runner/gitlab-runner-15.1.0.ebuild b/dev-util/gitlab-runner/gitlab-runner-15.1.0.ebuild
index df4a8331c7a6..fcce7a120b1e 100644
--- a/dev-util/gitlab-runner/gitlab-runner-15.1.0.ebuild
+++ b/dev-util/gitlab-runner/gitlab-runner-15.1.0.ebuild
@@ -24,6 +24,11 @@ BDEPEND="dev-go/gox"
DOCS=( docs CHANGELOG.md README.md config.toml.example )
+PATCHES=(
+ # https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/3498
+ "${FILESDIR}"/build-for-arm64.patch
+ )
+
S="${WORKDIR}/${PN}-v${PV}"
src_compile() {
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-21 23:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-27 22:15 [gentoo-commits] repo/gentoo:master commit in: dev-util/gitlab-runner/files/, dev-util/gitlab-runner/ William Hubbs
-- strict thread matches above, loose matches on Subject: below --
2022-03-29 2:39 William Hubbs
2022-06-21 23:14 William Hubbs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox