Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Apr 2018 16:27:27 +0000 (UTC)
From:      Matthias Fechner <mfechner@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r466666 - in head: . www www/gitlab-pages www/gitlab-pages/files
Message-ID:  <201804061627.w36GRR7A034731@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mfechner
Date: Fri Apr  6 16:27:27 2018
New Revision: 466666
URL: https://svnweb.freebsd.org/changeset/ports/466666

Log:
  New ports required for gitlab update to 10.5.x.
  
  Submitted by:	swills
  Reviewed by:	mat, swills (mentor)
  Approved by:	swills (mentor)
  Differential Revision:	https://reviews.freebsd.org/D14841

Added:
  head/www/gitlab-pages/
  head/www/gitlab-pages/Makefile   (contents, props changed)
  head/www/gitlab-pages/distinfo   (contents, props changed)
  head/www/gitlab-pages/files/
  head/www/gitlab-pages/files/gitlab_pages.in   (contents, props changed)
  head/www/gitlab-pages/pkg-descr   (contents, props changed)
Modified:
  head/GIDs
  head/UIDs
  head/www/Makefile

Modified: head/GIDs
==============================================================================
--- head/GIDs	Fri Apr  6 16:27:23 2018	(r466665)
+++ head/GIDs	Fri Apr  6 16:27:27 2018	(r466666)
@@ -416,7 +416,7 @@ nomad:*:472:
 minio:*:473:
 gitlab-runner:*:474:
 traefik:*:475:
-# free: 476
+gitlab-pages:*:476:
 # free: 477
 prometheus:*:478:
 alertmanager:*:479:

Modified: head/UIDs
==============================================================================
--- head/UIDs	Fri Apr  6 16:27:23 2018	(r466665)
+++ head/UIDs	Fri Apr  6 16:27:27 2018	(r466666)
@@ -422,7 +422,7 @@ nomad:*:472:472::0:0:Nomad Daemon:/var/tmp/nomad:/usr/
 minio:*:473:473::0:0:Minio Daemon:/var/tmp/minio:/usr/sbin/nologin
 gitlab-runner:*:474:474::0:0:GitLab Runner Daemon:/var/tmp/gitlab_runner:/usr/sbin/nologin
 traefik:*:475:475::0:0:Traefik Daemon:/var/tmp/traefik:/usr/sbin/nologin
-# free: 476
+gitlab-pages:*:476:476::0:0:GitLab Pages Daemon:/var/tmp/gitlab_pages:/usr/sbin/nologin
 # free: 477
 prometheus:*:478:478::0:0:Prometheus Daemon:/var/tmp/prometheus:/usr/sbin/nologin
 alertmanager:*:479:479::0:0:Alertmanager Daemon:/var/tmp/alertmanager:/usr/sbin/nologin

Modified: head/www/Makefile
==============================================================================
--- head/www/Makefile	Fri Apr  6 16:27:23 2018	(r466665)
+++ head/www/Makefile	Fri Apr  6 16:27:27 2018	(r466666)
@@ -198,6 +198,7 @@
     SUBDIR += gist
     SUBDIR += gitea
     SUBDIR += gitlab
+    SUBDIR += gitlab-pages
     SUBDIR += gitlab-workhorse
     SUBDIR += glassfish
     SUBDIR += glpi

Added: head/www/gitlab-pages/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/gitlab-pages/Makefile	Fri Apr  6 16:27:27 2018	(r466666)
@@ -0,0 +1,41 @@
+# $FreeBSD$
+
+PORTNAME=	gitlab-pages
+PORTVERSION=	0.6.0
+CATEGORIES=	www
+
+MAINTAINER=	swills@FreeBSD.org
+COMMENT=	Official GitLab Pages daemon
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	go:lang/go
+
+USE_GITLAB=	yes
+GL_ACCOUNT=	gitlab-org
+# Find the here: https://gitlab.com/gitlab-org/gitlab-pages/tags
+GL_COMMIT=	15c938cafbd95064bbc4be34cd72091f9a61edaa
+
+PLIST_FILES=	bin/gitlab-pages
+
+USE_RC_SUBR=	gitlab_pages
+
+USERS=		gitlab-pages
+GROUPS=		gitlab-pages
+
+post-patch:
+	@${MV} ${WRKSRC}/vendor ${WRKSRC}/src
+	@${MKDIR} ${WRKSRC}/src/gitlab.com/gitlab-org
+	@${LN} -s ${WRKSRC} ${WRKSRC}/src/gitlab.com/gitlab-org/gitlab-pages
+
+do-build:
+	cd ${WRKSRC} && ${SETENV} GOCACHE=${WRKSRC}/go CGO_ENABLED=0 GO15VENDOREXPERIMENT=1 \
+		GOPATH=${WRKSRC} GOCACHE=off \
+		go build -o gitlab-pages \
+		--ldflags="-X main.VERSION=${PORTVERSION} -X main.REVISION=${GITHASH}"
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/gitlab-pages ${STAGEDIR}${PREFIX}/bin/gitlab-pages
+
+.include <bsd.port.mk>

Added: head/www/gitlab-pages/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/gitlab-pages/distinfo	Fri Apr  6 16:27:27 2018	(r466666)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1522768525
+SHA256 (gitlab-org-gitlab-pages-15c938cafbd95064bbc4be34cd72091f9a61edaa_GL0.tar.gz) = 80a497358eb895858878ee256abb27e3eecaab1b02e067babac768c0ef82508c
+SIZE (gitlab-org-gitlab-pages-15c938cafbd95064bbc4be34cd72091f9a61edaa_GL0.tar.gz) = 297539

Added: head/www/gitlab-pages/files/gitlab_pages.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/gitlab-pages/files/gitlab_pages.in	Fri Apr  6 16:27:27 2018	(r466666)
@@ -0,0 +1,69 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: gitlab_pages
+# REQUIRE: DAEMON NETWORKING
+# KEYWORD: shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable gitlab_pages:
+#
+# gitlab_pages_enable (bool):  Set to "NO" by default.
+#                              Set it to "YES" to enable gitlab-pages
+# gitlab_pages_dir (str):      Set to "/var/tmp/gitlab_pages" by default.
+#                              Set it to directory to run gitlab-pages in
+# gitlab_pages_user (str):     Set to "gitlab-pages" by default.
+#                              Set it to user to run gitlab_pages under
+# gitlab_pages_group (str):    Set to "gitlab-pages" by default.
+#                              Set it to group to run gitlab-pages under
+#
+
+. /etc/rc.subr
+
+name="gitlab_pages"
+rcvar="gitlab_pages_enable"
+
+load_rc_config $name
+
+: ${gitlab_pages_enable:="NO"}
+: ${gitlab_pages_dir:="/var/tmp/gitlab_pages"}
+: ${gitlab_pages_user:="gitlab-pages"}
+: ${gitlab_pages_group:="gitlab-pages"}
+
+export HOME=${gitlab_pages_dir}
+export PATH=${PATH}:%%PREFIX%%/bin
+
+pidfile="/var/run/${name}.pid"
+command="/usr/sbin/daemon"
+command_args="-f -p ${pidfile} %%PREFIX%%/bin/gitlab-pages run"
+gitlab_pages_chdir="${gitlab_pages_dir}"
+
+procname=%%PREFIX%%/bin/gitlab-pages
+
+start_precmd="gitlab_pages_startprecmd"
+list_cmd="listfunc"
+register_cmd="registerfunc"
+
+listfunc()
+{
+        su -m ${gitlab_pages_user} -c "env HOME=${gitlab_pages_dir} %%PREFIX%%/bin/gitlab-pages list"
+}
+
+registerfunc()
+{
+        su -m ${gitlab_pages_user} -c "env HOME=${gitlab_pages_dir} %%PREFIX%%/bin/gitlab-pages register"
+}
+
+gitlab_pages_startprecmd()
+{
+        if [ ! -e "${pidfile}" ]; then
+                install -g ${gitlab_pages_group} -o ${gitlab_pages_user} -- /dev/null "${pidfile}";
+        fi
+        if [ ! -d "${gitlab_pages_dir}" ]; then
+                install -d -o "${gitlab_pages_user}" -g "${gitlab_pages_group}" "${gitlab_pages_dir}"
+        fi
+}
+
+extra_commands="list register"
+run_rc_command $1

Added: head/www/gitlab-pages/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/gitlab-pages/pkg-descr	Fri Apr  6 16:27:27 2018	(r466666)
@@ -0,0 +1,4 @@
+This is a simple HTTP server written in Go, made to serve GitLab Pages with
+CNAMEs and SNI using HTTP/HTTP2.
+
+WWW: https://gitlab.com/gitlab-org/gitlab-pages



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804061627.w36GRR7A034731>