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
This commit is contained in:
Matthias Fechner 2018-04-06 16:27:27 +00:00
parent 933fef100f
commit 076bb65ad8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=466666
7 changed files with 120 additions and 2 deletions

2
GIDs
View File

@ -416,7 +416,7 @@ nomad:*:472:
minio:*:473:
gitlab-runner:*:474:
traefik:*:475:
# free: 476
gitlab-pages:*:476:
# free: 477
prometheus:*:478:
alertmanager:*:479:

2
UIDs
View File

@ -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

View File

@ -198,6 +198,7 @@
SUBDIR += gist
SUBDIR += gitea
SUBDIR += gitlab
SUBDIR += gitlab-pages
SUBDIR += gitlab-workhorse
SUBDIR += glassfish
SUBDIR += glpi

41
www/gitlab-pages/Makefile Normal file
View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -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