Index: head/security/teleport/Makefile =================================================================== --- head/security/teleport/Makefile +++ head/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 @@ 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 @@ 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 @@ @${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 Index: head/security/teleport/distinfo =================================================================== --- head/security/teleport/distinfo +++ head/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 Index: head/security/teleport/files/patch-version.mk =================================================================== --- head/security/teleport/files/patch-version.mk +++ head/security/teleport/files/patch-version.mk @@ -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\ Index: head/security/teleport/files/teleport.in =================================================================== --- head/security/teleport/files/teleport.in +++ head/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 @@ : ${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 +++ head/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: