aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GIDs2
-rw-r--r--UIDs2
-rw-r--r--www/Makefile1
-rw-r--r--www/gitlab-pages/Makefile41
-rw-r--r--www/gitlab-pages/distinfo3
-rw-r--r--www/gitlab-pages/files/gitlab_pages.in69
-rw-r--r--www/gitlab-pages/pkg-descr4
7 files changed, 120 insertions, 2 deletions
diff --git a/GIDs b/GIDs
index 928efb2ad4b3..fb52b5303eec 100644
--- a/GIDs
+++ b/GIDs
@@ -416,7 +416,7 @@ nomad:*:472:
minio:*:473:
gitlab-runner:*:474:
traefik:*:475:
-# free: 476
+gitlab-pages:*:476:
# free: 477
prometheus:*:478:
alertmanager:*:479:
diff --git a/UIDs b/UIDs
index f65331ea9bae..7e71fa0b11c8 100644
--- a/UIDs
+++ b/UIDs
@@ -422,7 +422,7 @@ nomad:*:472:472::0:0:Nomad Daemon:/var/tmp/nomad:/usr/sbin/nologin
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
diff --git a/www/Makefile b/www/Makefile
index 9e4ad92b125e..cb2fd20dc242 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -198,6 +198,7 @@
SUBDIR += gist
SUBDIR += gitea
SUBDIR += gitlab
+ SUBDIR += gitlab-pages
SUBDIR += gitlab-workhorse
SUBDIR += glassfish
SUBDIR += glpi
diff --git a/www/gitlab-pages/Makefile b/www/gitlab-pages/Makefile
new file mode 100644
index 000000000000..994ada89b57b
--- /dev/null
+++ b/www/gitlab-pages/Makefile
@@ -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>
diff --git a/www/gitlab-pages/distinfo b/www/gitlab-pages/distinfo
new file mode 100644
index 000000000000..dc5af33e6024
--- /dev/null
+++ b/www/gitlab-pages/distinfo
@@ -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
diff --git a/www/gitlab-pages/files/gitlab_pages.in b/www/gitlab-pages/files/gitlab_pages.in
new file mode 100644
index 000000000000..78eb1fe36779
--- /dev/null
+++ b/www/gitlab-pages/files/gitlab_pages.in
@@ -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
diff --git a/www/gitlab-pages/pkg-descr b/www/gitlab-pages/pkg-descr
new file mode 100644
index 000000000000..5c48d7a43390
--- /dev/null
+++ b/www/gitlab-pages/pkg-descr
@@ -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