summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/gitlab-runner/Makefile8
-rw-r--r--devel/gitlab-runner/distinfo6
-rw-r--r--devel/gitlab-runner/files/gitlab_runner.in5
-rw-r--r--devel/gitlab-runner/files/patch-helpers_service_simple.go66
4 files changed, 77 insertions, 8 deletions
diff --git a/devel/gitlab-runner/Makefile b/devel/gitlab-runner/Makefile
index 56b33e770edb..25c6ba66666a 100644
--- a/devel/gitlab-runner/Makefile
+++ b/devel/gitlab-runner/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= gitlab-runner
-PORTVERSION= 9.3.0
+PORTVERSION= 9.5.0
CATEGORIES= devel
MASTER_SITES= \
https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/repository/archive.tar.bz2?ref=v${PORTVERSION}&dummy=/ \
@@ -24,9 +24,9 @@ RUN_DEPENDS= ca_root_nss>=0:security/ca_root_nss \
git:devel/git
USES= tar:bz2
-GITHASH= 3df822b2c6e3b083986002bb9f012599bd74f6e9
-GITREV= 3df822b
-GITBRANCH= 9-3-stable
+GITHASH= 413da38a72634601bf435f6215d6669cd5a4e40e
+GITREV= 413da38
+GITBRANCH= 9-5-stable
WRKSRC= ${WRKDIR}/gitlab-ci-multi-runner-v${PORTVERSION}-${GITHASH}
PLIST_FILES= bin/gitlab-runner
diff --git a/devel/gitlab-runner/distinfo b/devel/gitlab-runner/distinfo
index a94b66497dd7..36185374cb0a 100644
--- a/devel/gitlab-runner/distinfo
+++ b/devel/gitlab-runner/distinfo
@@ -1,6 +1,6 @@
-TIMESTAMP = 1500583645
-SHA256 (gitlab-runner/gitlab-runner-9.3.0.tar.bz2) = c888f4a406bbb1b6013e2aed040593d209030aeec99c926d55ae20317ec1994f
-SIZE (gitlab-runner/gitlab-runner-9.3.0.tar.bz2) = 2211320
+TIMESTAMP = 1505611321
+SHA256 (gitlab-runner/gitlab-runner-9.5.0.tar.bz2) = 6de3f169534d95f9778f9f0f4f22318a582113bb1948b99857fd9dad6a3b8934
+SIZE (gitlab-runner/gitlab-runner-9.5.0.tar.bz2) = 2499170
SHA256 (gitlab-runner/prebuilt-x86_64.tar.xz) = 84b34f511ac2294a13e61aa3f0c8b1db2f450d610c72dc3b84f5c865355ef154
SIZE (gitlab-runner/prebuilt-x86_64.tar.xz) = 11106288
SHA256 (gitlab-runner/prebuilt-arm.tar.xz) = 874e101bfa996b2ed4460a930429277f6eeaeb6d3f9fbcb962452b259be56f26
diff --git a/devel/gitlab-runner/files/gitlab_runner.in b/devel/gitlab-runner/files/gitlab_runner.in
index 9d556fea1aea..14d040e24498 100644
--- a/devel/gitlab-runner/files/gitlab_runner.in
+++ b/devel/gitlab-runner/files/gitlab_runner.in
@@ -14,6 +14,8 @@
# Set it to user to run gitlab_runner under
# gitlab_runner_group (str): Set to "gitlab-runner" by default.
# Set it to group to run gitlab-runner under
+# gitlab_runner_syslogtag (str):Set to "gitlab-runner" by default.
+# Set it to tag to be used by syslog
#
. /etc/rc.subr
@@ -27,13 +29,14 @@ load_rc_config $name
: ${gitlab_runner_dir:="/var/tmp/gitlab_runner"}
: ${gitlab_runner_user:="gitlab-runner"}
: ${gitlab_runner_group:="gitlab-runner"}
+: ${gitlab_runner_syslogtag:="gitlab-runner"}
export HOME=${gitlab_runner_dir}
export PATH=${PATH}:%%PREFIX%%/bin
pidfile="/var/run/${name}.pid"
command="/usr/sbin/daemon"
-command_args="-f -p ${pidfile} %%PREFIX%%/bin/gitlab-runner run"
+command_args="-f -p ${pidfile} %%PREFIX%%/bin/gitlab-runner run --syslog --service ${gitlab_runner_syslogtag}"
gitlab_runner_chdir="${gitlab_runner_dir}"
procname=%%PREFIX%%/bin/gitlab-runner
diff --git a/devel/gitlab-runner/files/patch-helpers_service_simple.go b/devel/gitlab-runner/files/patch-helpers_service_simple.go
new file mode 100644
index 000000000000..22342aed2b7d
--- /dev/null
+++ b/devel/gitlab-runner/files/patch-helpers_service_simple.go
@@ -0,0 +1,66 @@
+--- helpers/service/simple.go.orig 2017-06-22 10:21:35 UTC
++++ helpers/service/simple.go
+@@ -6,6 +6,8 @@ import (
+ "os"
+ "os/signal"
+ "syscall"
++ "fmt"
++ "log/syslog"
+ )
+
+ var (
+@@ -18,6 +20,39 @@ type SimpleService struct {
+ c *service.Config
+ }
+
++// Begin copy from /vendor/github.com/ayufan/golang-kardianos-service/service_unix.go
++type sysLogger struct {
++ *syslog.Writer
++ errs chan<- error
++}
++
++func (s sysLogger) send(err error) error {
++ if err != nil && s.errs != nil {
++ s.errs <- err
++ }
++ return err
++}
++
++func (s sysLogger) Error(v ...interface{}) error {
++ return s.send(s.Writer.Err(fmt.Sprint(v...)))
++}
++func (s sysLogger) Warning(v ...interface{}) error {
++ return s.send(s.Writer.Warning(fmt.Sprint(v...)))
++}
++func (s sysLogger) Info(v ...interface{}) error {
++ return s.send(s.Writer.Info(fmt.Sprint(v...)))
++}
++func (s sysLogger) Errorf(format string, a ...interface{}) error {
++ return s.send(s.Writer.Err(fmt.Sprintf(format, a...)))
++}
++func (s sysLogger) Warningf(format string, a ...interface{}) error {
++ return s.send(s.Writer.Warning(fmt.Sprintf(format, a...)))
++}
++func (s sysLogger) Infof(format string, a ...interface{}) error {
++ return s.send(s.Writer.Info(fmt.Sprintf(format, a...)))
++}
++// End copy
++
+ // Run should be called shortly after the program entry point.
+ // After Interface.Stop has finished running, Run will stop blocking.
+ // After Run stops blocking, the program must exit shortly after.
+@@ -79,7 +114,13 @@ func (s *SimpleService) Logger(errs chan<- error) (ser
+ // SystemLogger opens and returns a system logger. If errs is non-nil errors
+ // will be sent on errs as well as returned from Logger's functions.
+ func (s *SimpleService) SystemLogger(errs chan<- error) (service.Logger, error) {
+- return nil, ErrNotSupported
++ // Begin copy from vendor/github.com/ayufan/golang-kardianos-service/service_unix.go
++ w, err := syslog.New(syslog.LOG_INFO, s.c.Name)
++ if err != nil {
++ return nil, err
++ }
++ return sysLogger{w, errs}, nil
++ // End copy
+ }
+
+ // String displays the name of the service. The display name if present,