aboutsummaryrefslogtreecommitdiff
path: root/security/teleport
diff options
context:
space:
mode:
authorSean Chittenden <seanc@FreeBSD.org>2018-07-02 05:26:24 +0000
committerSean Chittenden <seanc@FreeBSD.org>2018-07-02 05:26:24 +0000
commit1620d360456f5207d971e8542975139908e1c6bf (patch)
treecc83d14768b7f794511fa524660a0b919a1c90f7 /security/teleport
parentf14ce6d681dfe1ec1a6763b54c5dca293b6fded4 (diff)
downloadports-1620d360456f5207d971e8542975139908e1c6bf.tar.gz
ports-1620d360456f5207d971e8542975139908e1c6bf.zip
Upgrade gravitational teleport to 2.6.6.
* See upstream's changelog for details https://github.com/gravitational/teleport/blob/master/CHANGELOG.md * Explicitly specify the git sha when building teleport. * Restrict builds to amd64. * Work around daemon(8)'s lack of syslog functionality in 10-STABLE. Submitted by: swills Approved by: swills (mentor) Differential Revision: https://reviews.freebsd.org/D15311
Notes
Notes: svn path=/head/; revision=473704
Diffstat (limited to 'security/teleport')
-rw-r--r--security/teleport/Makefile20
-rw-r--r--security/teleport/distinfo6
-rw-r--r--security/teleport/files/patch-version.mk8
-rw-r--r--security/teleport/files/teleport.in33
-rw-r--r--security/teleport/pkg-descr2
5 files changed, 42 insertions, 27 deletions
diff --git a/security/teleport/Makefile b/security/teleport/Makefile
index 5e4464842379..f09b0e9102f6 100644
--- a/security/teleport/Makefile
+++ b/security/teleport/Makefile
@@ -2,7 +2,7 @@
PORTNAME= teleport
DISTVERSIONPREFIX= v
-DISTVERSION= 2.5.7
+DISTVERSION= 2.6.6
CATEGORIES= security
MAINTAINER= seanc@FreeBSD.org
@@ -10,10 +10,11 @@ COMMENT= Gravitational Telport SSH
LICENSE= APACHE20
-ONLY_FOR_ARCHS= amd64
+NOT_FOR_ARCHS= i386
+NOT_FOR_ARCHS_REASON= Uses 64bit types
-BUILD_DEPENDS= ${LOCALBASE}/bin/go:lang/go \
- ${LOCALBASE}/bin/zip:archivers/zip
+BUILD_DEPENDS= go:lang/go \
+ zip:archivers/zip
USES= compiler gmake
@@ -28,8 +29,9 @@ SUB_FILES= pkg-message
PLIST_FILES= bin/teleport \
bin/tctl \
bin/tsh \
- etc/teleport.yaml.sample
+ "@sample etc/teleport.yaml.sample"
+# Extra assets are stored in the binary and must not be inadvertently removed
STRIP=
GO_TELEPORT_SRC_DIR= src/github.com/gravitational/teleport
@@ -41,17 +43,21 @@ post-extract:
@${CP} -rp ${WRKDIR}/${PRE_GOPATH_DIR}/* ${WRKDIR}/${GO_TELEPORT_SRC_DIR}/
post-patch:
- @${REINPLACE_CMD} -e "s|%%GH_TAG_COMMIT%%|${GH_TAG_COMMIT}|g" \
+ @${REINPLACE_CMD} -e 's|^GITREF=.*|GITREF=${GH_TAG_COMMIT}|' \
${WRKDIR}/${GO_TELEPORT_SRC_DIR}/version.mk
+ @${FIND} ${WRKDIR} -type f -exec ${SED} -i '' -e 's|\/var\/lib|/var/db|g' {} \;
+ @${FIND} ${WRKDIR} -type f -exec ${SED} -i '' -e 's|\/usr\/bin\/hostname|/bin/hostname|g' {} \;
do-build:
@cd ${WRKDIR}/${GO_TELEPORT_SRC_DIR} && \
${SETENV} ${MAKE_ENV} ${BUILD_ENV} \
CGO_ENABLED=1 GOPATH=${WRKDIR} \
- ${GMAKE} -s full
+ ${GMAKE} full
do-install:
${WRKDIR}/${GO_TELEPORT_SRC_DIR}/build/teleport configure > ${STAGEDIR}${PREFIX}/etc/teleport.yaml.sample
+ @${SED} -i '' -e "s|nodename: .*|nodename: |g" ${STAGEDIR}${PREFIX}/etc/teleport.yaml.sample
+ @${SED} -i '' -e "s|cluster-join-token||g" ${STAGEDIR}${PREFIX}/etc/teleport.yaml.sample
${INSTALL_PROGRAM} ${WRKDIR}/${GO_TELEPORT_SRC_DIR}/build/teleport ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKDIR}/${GO_TELEPORT_SRC_DIR}/build/tsh ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKDIR}/${GO_TELEPORT_SRC_DIR}/build/tctl ${STAGEDIR}${PREFIX}/bin
diff --git a/security/teleport/distinfo b/security/teleport/distinfo
index ccf73fd660fe..579cf634a823 100644
--- a/security/teleport/distinfo
+++ b/security/teleport/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1525898627
-SHA256 (gravitational-teleport-v2.5.7_GH0.tar.gz) = 26a62a4ae91482d51191f53edde01a93b13e23a257b5336de06e336ed39c8e7e
-SIZE (gravitational-teleport-v2.5.7_GH0.tar.gz) = 16216353
+TIMESTAMP = 1530495583
+SHA256 (gravitational-teleport-v2.6.6_GH0.tar.gz) = 4c88989e9a780d964156040c87a027a445400d800b5e300cfceb1be6400eb042
+SIZE (gravitational-teleport-v2.6.6_GH0.tar.gz) = 16652923
diff --git a/security/teleport/files/patch-version.mk b/security/teleport/files/patch-version.mk
deleted file mode 100644
index 92d7ca36ec11..000000000000
--- a/security/teleport/files/patch-version.mk
+++ /dev/null
@@ -1,8 +0,0 @@
---- ../src/github.com/gravitational/teleport/version.mk.orig 2018-05-05 22:53:11 UTC
-+++ ../src/github.com/gravitational/teleport/version.mk
-@@ -1,4 +1,4 @@
--GITREF=`git describe --dirty --long --tags`
-+GITREF="%%GH_TAG_COMMIT%%"
-
- # $(VERSION_GO) will be written to version.go
- VERSION_GO="/* DO NOT EDIT THIS FILE. IT IS GENERATED BY 'make setver'*/\n\n\
diff --git a/security/teleport/files/teleport.in b/security/teleport/files/teleport.in
index 5d9777f35dda..dff563708ebd 100644
--- a/security/teleport/files/teleport.in
+++ b/security/teleport/files/teleport.in
@@ -9,14 +9,16 @@
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
-# teleport_enable (bool): Set to NO by default.
-# Set it to YES to enable teleport.
-# teleport_config (str): Configuration file.
-# Default is "${LOCALBASE}/etc/teleport.yaml"
+# teleport_enable (bool): Set to NO by default.
+# Set it to YES to enable teleport.
+# teleport_config (str): Configuration file.
+# Default is "${LOCALBASE}/etc/teleport.yaml"
# teleport_dir (dir): Set dir to run teleport in.
-# Default is "/var/lib/teleport".
+# Default is "/var/db/teleport".
# teleport_roles (dir): Set roles to run teleport in.
# Default is "node".
+# Can be any combination of
+# "proxy" "node" and "auth", separated by commas
. /etc/rc.subr
@@ -27,14 +29,29 @@ load_rc_config $name
: ${teleport_enable:="NO"}
: ${teleport_config:="%%PREFIX%%/etc/teleport.yaml"}
-: ${teleport_args:="--config=${teleport_config}"
-: ${teleport_dir:="/var/lib/teleport"}
+: ${teleport_args:="--config=${teleport_config}"}
+: ${teleport_dir:="/var/db/teleport"}
: ${teleport_roles:="node"}
pidfile=/var/run/teleport.pid
required_files="${teleport_config}"
procname="%%PREFIX%%/bin/teleport"
command="/usr/sbin/daemon"
-command_args="-S -T teleport -s info -m 3 -p ${pidfile} /usr/bin/env ${teleport_env} ${procname} start --roles=${teleport_roles} ${teleport_args}"
+
+DAEMON=$(daemon 2>&1 | grep -q syslog ; echo $?)
+if [ ${DAEMON} -eq 0 ]; then
+ DAEMON_SYSLOG_FLAGS="-S -T teleport -s info -m 3"
+else
+ DAEMON_SYSLOG_FLAGS=""
+fi
+
+command_args="${DAEMON_SYSLOG_FLAGS} -f -p ${pidfile} /usr/bin/env ${teleport_env} ${procname} start --roles=${teleport_roles} ${teleport_args}"
+
+start_precmd="teleport_prestart"
+
+teleport_prestart()
+{
+ mkdir -p ${teleport_dir}
+}
run_rc_command "$1"
diff --git a/security/teleport/pkg-descr b/security/teleport/pkg-descr
index 34f891dc7c47..772be91aa143 100644
--- a/security/teleport/pkg-descr
+++ b/security/teleport/pkg-descr
@@ -1,7 +1,7 @@
What is Teleport?
=================
Gravitational Teleport ("Teleport") is a modern SSH server for remotely
-accessing clusters of Linux servers via SSH or HTTPS. It is intended to be used
+accessing clusters of servers via SSH or HTTPS. It is intended to be used
instead of sshd. Teleport enables teams to easily adopt the best SSH practices
like: