Index: head/security/teleport/Makefile =================================================================== --- head/security/teleport/Makefile (revision 473703) +++ head/security/teleport/Makefile (revision 473704) @@ -1,67 +1,73 @@ # $FreeBSD$ PORTNAME= teleport DISTVERSIONPREFIX= v -DISTVERSION= 2.5.7 +DISTVERSION= 2.6.6 CATEGORIES= security MAINTAINER= seanc@FreeBSD.org 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 USE_GITHUB= yes GH_ACCOUNT= gravitational GH_TAG_COMMIT= b3f4ecb USE_RC_SUBR= teleport 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 PRE_GOPATH_DIR= ${PORTNAME}-${DISTVERSION}${DISTVERSIONSUFFIX} post-extract: @${MKDIR} ${WRKDIR}/${GO_TELEPORT_SRC_DIR} @${CP} -rp ${WRKDIR}/${PRE_GOPATH_DIR}/vendor/* ${WRKDIR}/src/ @${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 .include # golang assumes that if clang is in use, it is called "clang" and not "cc". If # it's called "cc", go fails. .if ${COMPILER_TYPE} == clang BUILD_ENV= CC=clang .endif .include Index: head/security/teleport/distinfo =================================================================== --- head/security/teleport/distinfo (revision 473703) +++ head/security/teleport/distinfo (revision 473704) @@ -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 Index: head/security/teleport/files/patch-version.mk =================================================================== --- head/security/teleport/files/patch-version.mk (revision 473703) +++ head/security/teleport/files/patch-version.mk (nonexistent) @@ -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\ Property changes on: head/security/teleport/files/patch-version.mk ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/security/teleport/files/teleport.in =================================================================== --- head/security/teleport/files/teleport.in (revision 473703) +++ head/security/teleport/files/teleport.in (revision 473704) @@ -1,40 +1,57 @@ #!/bin/sh # $FreeBSD$ # # PROVIDE: teleport # REQUIRE: LOGIN # KEYWORD: shutdown # # 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 name=teleport rcvar=teleport_enable 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" Index: head/security/teleport/pkg-descr =================================================================== --- head/security/teleport/pkg-descr (revision 473703) +++ head/security/teleport/pkg-descr (revision 473704) @@ -1,18 +1,18 @@ 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: Integrated SSH credentials with your organization Google Apps identities or other OAuth identitiy providers. No need to distribute keys: Teleport uses certificate-based access with automatic expiration time. Enforcement of 2nd factor authentication. Cluster introspection: every Teleport node becomes a part of a cluster and is visible on the Web UI. Record and replay SSH sessions for knowledge sharing and auditing purposes. Collaboratively troubleshoot issues through session sharing. Connect to clusters located behind firewalls without direct Internet access via SSH bastions. Teleport is built on top of the high-quality Golang SSH implementation and it is compatible with OpenSSH. WWW: http://gravitational.com/teleport/