Date: Sun, 17 Sep 2017 01:34:38 +0000 (UTC) From: Steve Wills <swills@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r449979 - in head/devel/gitlab-runner: . files Message-ID: <201709170134.v8H1YceQ072120@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: swills Date: Sun Sep 17 01:34:38 2017 New Revision: 449979 URL: https://svnweb.freebsd.org/changeset/ports/449979 Log: devel/gitlab-runner: update to 9.5.0 [0] While here, add patch to enable syslog logging and enable it in rc script [1] PR: 221769 [1] Submitted by: Ben RUBSON <ben.rubson@gmail.com> [1] Added: head/devel/gitlab-runner/files/patch-helpers_service_simple.go (contents, props changed) Modified: head/devel/gitlab-runner/Makefile head/devel/gitlab-runner/distinfo head/devel/gitlab-runner/files/gitlab_runner.in Modified: head/devel/gitlab-runner/Makefile ============================================================================== --- head/devel/gitlab-runner/Makefile Sun Sep 17 01:09:34 2017 (r449978) +++ head/devel/gitlab-runner/Makefile Sun Sep 17 01:34:38 2017 (r449979) @@ -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 Modified: head/devel/gitlab-runner/distinfo ============================================================================== --- head/devel/gitlab-runner/distinfo Sun Sep 17 01:09:34 2017 (r449978) +++ head/devel/gitlab-runner/distinfo Sun Sep 17 01:34:38 2017 (r449979) @@ -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 Modified: head/devel/gitlab-runner/files/gitlab_runner.in ============================================================================== --- head/devel/gitlab-runner/files/gitlab_runner.in Sun Sep 17 01:09:34 2017 (r449978) +++ head/devel/gitlab-runner/files/gitlab_runner.in Sun Sep 17 01:34:38 2017 (r449979) @@ -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 Added: head/devel/gitlab-runner/files/patch-helpers_service_simple.go ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/gitlab-runner/files/patch-helpers_service_simple.go Sun Sep 17 01:34:38 2017 (r449979) @@ -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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709170134.v8H1YceQ072120>