Date: Thu, 16 May 2019 01:09:42 +0000 (UTC) From: Colin Percival <cperciva@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r501759 - in head/sysutils/amazon-ssm-agent: . files Message-ID: <201905160109.x4G19ggK080903@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cperciva Date: Thu May 16 01:09:41 2019 New Revision: 501759 URL: https://svnweb.freebsd.org/changeset/ports/501759 Log: Update amazon-ssm-agent to 2.3.612.0. This adds support for "sessions", aka. creating a remote shell via the Agent. In order to support this, an "ssm-user" account is created when the package is installed; we create this via pkg-install rather than the USERS= / UIDs functionality, since ssm-user needs to be in wheel and needs to have a home directory. Thanks to: Alexey Milevsky Added: head/sysutils/amazon-ssm-agent/files/patch-agent_session_utility_utility__unix.go (contents, props changed) head/sysutils/amazon-ssm-agent/files/patch-agent_version_version.go (contents, props changed) head/sysutils/amazon-ssm-agent/pkg-deinstall (contents, props changed) head/sysutils/amazon-ssm-agent/pkg-install (contents, props changed) Modified: head/sysutils/amazon-ssm-agent/Makefile head/sysutils/amazon-ssm-agent/distinfo head/sysutils/amazon-ssm-agent/files/patch-agent_appconfig_constants__unix.go head/sysutils/amazon-ssm-agent/files/patch-agent_log_log__unix.go Modified: head/sysutils/amazon-ssm-agent/Makefile ============================================================================== --- head/sysutils/amazon-ssm-agent/Makefile Thu May 16 00:56:47 2019 (r501758) +++ head/sysutils/amazon-ssm-agent/Makefile Thu May 16 01:09:41 2019 (r501759) @@ -1,8 +1,7 @@ # $FreeBSD$ PORTNAME= amazon-ssm-agent -PORTVERSION= 2.0.790.0 -PORTREVISION= 1 +PORTVERSION= 2.3.612.0 CATEGORIES= sysutils MAINTAINER= cperciva@FreeBSD.org @@ -20,18 +19,41 @@ GH_SUBDIR= src/github.com/aws/amazon-ssm-agent PLIST_FILES= etc/amazon/ssm/amazon-ssm-agent.json.template \ etc/amazon/ssm/seelog_unix.xml.template \ - sbin/amazon-ssm-agent + sbin/amazon-ssm-agent \ + sbin/ssm-document-worker \ + sbin/ssm-session-worker \ + sbin/ssm-session-logger \ + sbin/ssm-cli USE_RC_SUBR= amazon-ssm-agent do-build: @cd ${WRKSRC}; \ ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC}:${WRKSRC}/vendor CGO_ENABLED=0 \ - go build -ldflags "-s -w" -o amazon-ssm-agent \ - agent/agent.go agent/agent_unix.go agent/agent_parser.go + go build -ldflags "-s -w" -o amazon-ssm-agent -v \ + agent/agent.go agent/agent_unix.go agent/agent_parser.go + @cd ${WRKSRC}; \ + ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC}:${WRKSRC}/vendor CGO_ENABLED=0 \ + go build -ldflags "-s -w" -o ssm-document-worker -v \ + agent/framework/processor/executer/outofproc/worker/main.go + @cd ${WRKSRC}; \ + ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC}:${WRKSRC}/vendor CGO_ENABLED=0 \ + go build -ldflags "-s -w" -o ssm-session-worker -v \ + agent/framework/processor/executer/outofproc/sessionworker/main.go + @cd ${WRKSRC}; \ + ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC}:${WRKSRC}/vendor CGO_ENABLED=0 \ + go build -ldflags "-s -w" -o ssm-session-logger -v \ + agent/session/logging/main.go + @cd ${WRKSRC}; \ + ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC}:${WRKSRC}/vendor CGO_ENABLED=0 \ + go build -ldflags "-s -w" -o ssm-cli -v agent/cli-main/cli-main.go do-install: ${INSTALL_PROGRAM} ${WRKSRC}/amazon-ssm-agent ${STAGEDIR}${PREFIX}/sbin + ${INSTALL_PROGRAM} ${WRKSRC}/ssm-document-worker ${STAGEDIR}${PREFIX}/sbin + ${INSTALL_PROGRAM} ${WRKSRC}/ssm-session-worker ${STAGEDIR}${PREFIX}/sbin + ${INSTALL_PROGRAM} ${WRKSRC}/ssm-session-logger ${STAGEDIR}${PREFIX}/sbin + ${INSTALL_PROGRAM} ${WRKSRC}/ssm-cli ${STAGEDIR}${PREFIX}/sbin ${MKDIR} ${STAGEDIR}${PREFIX}/etc/amazon/ssm ${INSTALL_DATA} ${WRKSRC}/amazon-ssm-agent.json.template ${STAGEDIR}${PREFIX}/etc/amazon/ssm ${INSTALL_DATA} ${WRKSRC}/seelog_unix.xml ${STAGEDIR}${PREFIX}/etc/amazon/ssm/seelog_unix.xml.template Modified: head/sysutils/amazon-ssm-agent/distinfo ============================================================================== --- head/sysutils/amazon-ssm-agent/distinfo Thu May 16 00:56:47 2019 (r501758) +++ head/sysutils/amazon-ssm-agent/distinfo Thu May 16 01:09:41 2019 (r501759) @@ -1,3 +1,3 @@ -TIMESTAMP = 1495953791 -SHA256 (aws-amazon-ssm-agent-2.0.790.0_GH0.tar.gz) = e6b5c3f34ccae795bde48f410ed325c1e20ee148eb63a0cfbbaed6a37f212170 -SIZE (aws-amazon-ssm-agent-2.0.790.0_GH0.tar.gz) = 9276985 +TIMESTAMP = 1557465201 +SHA256 (aws-amazon-ssm-agent-2.3.612.0_GH0.tar.gz) = 297937404da04e52adbe92a767f2aa11ae03b4fd61c112a6fac793a5fae40ff4 +SIZE (aws-amazon-ssm-agent-2.3.612.0_GH0.tar.gz) = 16975913 Modified: head/sysutils/amazon-ssm-agent/files/patch-agent_appconfig_constants__unix.go ============================================================================== --- head/sysutils/amazon-ssm-agent/files/patch-agent_appconfig_constants__unix.go Thu May 16 00:56:47 2019 (r501758) +++ head/sysutils/amazon-ssm-agent/files/patch-agent_appconfig_constants__unix.go Thu May 16 01:09:41 2019 (r501759) @@ -1,15 +1,6 @@ ---- agent/appconfig/constants_unix.go.orig 2017-05-22 17:12:08.000000000 +0000 -+++ agent/appconfig/constants_unix.go 2017-05-28 06:51:05.792117000 +0000 -@@ -18,7 +18,7 @@ - - const ( - // DefaultProgramFolder is the default folder for SSM -- DefaultProgramFolder = "/etc/amazon/ssm/" -+ DefaultProgramFolder = "/usr/local/etc/amazon/ssm/" - - // AppConfigPath is the path of the AppConfig - AppConfigPath = DefaultProgramFolder + AppConfigFileName -@@ -47,7 +47,7 @@ +--- agent/appconfig/constants_unix.go.orig 2019-05-08 20:19:03 UTC ++++ agent/appconfig/constants_unix.go +@@ -53,7 +53,7 @@ const ( DownloadRoot = "/var/log/amazon/ssm/download/" // DefaultDataStorePath represents the directory for storing system data @@ -18,3 +9,12 @@ // EC2ConfigDataStorePath represents the directory for storing ec2 config data EC2ConfigDataStorePath = "/var/lib/amazon/ec2config/" +@@ -95,7 +95,7 @@ const ( + var PowerShellPluginCommandName string + + // DefaultProgramFolder is the default folder for SSM +-var DefaultProgramFolder = "/etc/amazon/ssm/" ++var DefaultProgramFolder = "/usr/local/etc/amazon/ssm/" + var DefaultDocumentWorker = "/usr/bin/ssm-document-worker" + var DefaultSessionWorker = "/usr/bin/ssm-session-worker" + var DefaultSessionLogger = "/usr/bin/ssm-session-logger" Modified: head/sysutils/amazon-ssm-agent/files/patch-agent_log_log__unix.go ============================================================================== --- head/sysutils/amazon-ssm-agent/files/patch-agent_log_log__unix.go Thu May 16 00:56:47 2019 (r501758) +++ head/sysutils/amazon-ssm-agent/files/patch-agent_log_log__unix.go Thu May 16 01:09:41 2019 (r501759) @@ -1,4 +1,4 @@ ---- agent/log/log_unix.go.orig 2016-07-06 21:51:35 UTC +--- agent/log/log_unix.go.orig 2019-05-08 20:19:03 UTC +++ agent/log/log_unix.go @@ -24,7 +24,7 @@ const ( // DefaultSeelogConfigFilePath specifies the default seelog location Added: head/sysutils/amazon-ssm-agent/files/patch-agent_session_utility_utility__unix.go ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/amazon-ssm-agent/files/patch-agent_session_utility_utility__unix.go Thu May 16 01:09:41 2019 (r501759) @@ -0,0 +1,11 @@ +--- agent/session/utility/utility_unix.go.orig 2019-05-15 22:56:33 UTC ++++ agent/session/utility/utility_unix.go +@@ -65,7 +65,7 @@ func (u *SessionUtil) CreateLocalAdminUser(log log.T) + } + } + +- err = u.createSudoersFileIfNotPresent(log) ++ err = nil + return + } + Added: head/sysutils/amazon-ssm-agent/files/patch-agent_version_version.go ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/amazon-ssm-agent/files/patch-agent_version_version.go Thu May 16 01:09:41 2019 (r501759) @@ -0,0 +1,8 @@ +--- agent/version/version.go.orig 2019-05-08 20:19:03 UTC ++++ agent/version/version.go +@@ -19,4 +19,4 @@ + package version + + // Version is the version of the Agent +-const Version = "2.3.0.0" ++const Version = "2.3.612.0" Added: head/sysutils/amazon-ssm-agent/pkg-deinstall ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/amazon-ssm-agent/pkg-deinstall Thu May 16 01:09:41 2019 (r501759) @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ "$2" = "DEINSTALL" ]; then + echo "Removing ssm-user" + pw userdel ssm-user -r +fi Added: head/sysutils/amazon-ssm-agent/pkg-install ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/amazon-ssm-agent/pkg-install Thu May 16 01:09:41 2019 (r501759) @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ "$2" = "POST-INSTALL" ]; then + echo "Creating ssm-user for SSM Agent Sessions" + pw useradd ssm-user -G wheel -m +fi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905160109.x4G19ggK080903>