# Generated by go2rpm 1.9.0 %global srcname amazon-ssm-agent # https://github.com/aws/amazon-ssm-agent %global goipath github.com/aws/amazon-ssm-agent Version: 3.2.2143.0 %global tag %{version} %gometa -f %global common_description %{expand: An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs).} Name: %{srcname} Release: 1%{dist} Summary: Amazon EC2 Simple Systems Manager (SSM) Agent License: MIT AND Apache-2.0 AND BSD-3-Clause URL: %{gourl} Source: %{gosource} # Disable a test which requires an IP address assigned to the system. # Upstream does not test/build in mock and it expects an IP address # to be assigned while running tests. Patch0: 0001-Disable-tests-broken-in-mock.patch BuildRequires: systemd # Upstream has been notified about packaging challenges with the existing # list of dependencies, but they haven't responded to the open issue on # this topic: # https://github.com/aws/amazon-ssm-agent/issues/460 # # Thanks to the go-mods-to-bundled-providers.py script from the butane # package repository for helping to build this list. 👏 Provides: bundled(golang(github.com/Jeffail/gabs)) = 1.0.0 Provides: bundled(golang(github.com/Workiva/go-datastructures/cache)) = 1.0.53 Provides: bundled(golang(github.com/Workiva/go-datastructures/queue)) = 1.0.53 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/arn)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/awserr)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/awsutil)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/client)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/client/metadata)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/corehandlers)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/endpointcreds)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/processcreds)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/ssocreds)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/stscreds)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/csm)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/defaults)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/ec2metadata)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/endpoints)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/request)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/session)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/signer/v4)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/awstesting)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/awstesting/mock)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/context)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/encoding/gzip)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/ini)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/s3shared)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/s3shared/arn)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/s3shared/s3err)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/sdkio)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/sdkmath)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/sdkrand)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/sdkuri)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/shareddefaults)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/smithytesting)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/smithytesting/xml)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/strings)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/sync/singleflight)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/private/checksum)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/eventstream)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/json/jsonutil)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/jsonrpc)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/query)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/query/queryutil)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/rest)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/restjson)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/restxml)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/private/util)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/cloudwatch)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/cloudwatchlogs)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/kms)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/kms/kmsiface)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3/s3iface)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3/s3manager)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/ssm)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/ssm/ssmiface)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/ssm/ssmiface/mocks)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/ssmmds)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/ssmmds/ssmmdsiface)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/ssmmds/ssmmdsiface/mocks)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/sso)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/sso/ssoiface)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/sts)) = 1.44.261 Provides: bundled(golang(github.com/aws/aws-sdk-go/service/sts/stsiface)) = 1.44.261 Provides: bundled(golang(github.com/carlescere/scheduler)) = 0.0.0-20150615230211.git9b78eac89dfb Provides: bundled(golang(github.com/cenkalti/backoff/v4)) = 4.0.2 Provides: bundled(golang(github.com/cihub/seelog)) = 0.0.0-20170130134532.gitf561c5e57575 Provides: bundled(golang(github.com/cihub/seelog/archive)) = 0.0.0-20170130134532.gitf561c5e57575 Provides: bundled(golang(github.com/cihub/seelog/archive/gzip)) = 0.0.0-20170130134532.gitf561c5e57575 Provides: bundled(golang(github.com/cihub/seelog/archive/tar)) = 0.0.0-20170130134532.gitf561c5e57575 Provides: bundled(golang(github.com/cihub/seelog/archive/zip)) = 0.0.0-20170130134532.gitf561c5e57575 Provides: bundled(golang(github.com/coreos/go-semver/semver)) = 0.2.0 Provides: bundled(golang(github.com/creack/pty)) = 1.1.11 Provides: bundled(golang(github.com/digitalocean/go-smbios/smbios)) = 0.0.0-20180907143718.git390a4f403a8e Provides: bundled(golang(github.com/fsnotify/fsnotify)) = 1.5.1 Provides: bundled(golang(github.com/go-git/go-git/v5)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/config)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/internal/revision)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/internal/url)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/cache)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/color)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/filemode)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/format/config)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/format/diff)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/format/gitignore)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/format/idxfile)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/format/index)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/format/objfile)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/format/packfile)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/format/pktline)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/object)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/protocol/packp)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/protocol/packp/capability)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/protocol/packp/sideband)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/revlist)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/storer)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/transport)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/transport/client)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/transport/file)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/transport/git)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/transport/http)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/transport/internal/common)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/transport/server)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/plumbing/transport/ssh)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/storage)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/storage/filesystem)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/storage/filesystem/dotgit)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/storage/memory)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/utils/binary)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/utils/diff)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/utils/ioutil)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/utils/merkletrie)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/utils/merkletrie/filesystem)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/utils/merkletrie/index)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/utils/merkletrie/internal/frame)) = 5.3.0 Provides: bundled(golang(github.com/go-git/go-git/v5/utils/merkletrie/noder)) = 5.3.0 Provides: bundled(golang(github.com/google/go-github/github)) = 0.0.0-20170604025028.gita117bb2595a5 Provides: bundled(golang(github.com/google/shlex)) = 0.0.0-20191202100458.gite7afc7fbc510 Provides: bundled(golang(github.com/gorhill/cronexpr)) = 0.0.0-20180427100037.git88b0669f7d75 Provides: bundled(golang(github.com/gorilla/websocket)) = 1.4.2 Provides: bundled(golang(github.com/hectane/go-acl)) = 0.0.0-20151103031024.git7f56832555fc Provides: bundled(golang(github.com/hectane/go-acl/api)) = 0.0.0-20151103031024.git7f56832555fc Provides: bundled(golang(github.com/mitchellh/go-ps)) = 1.0.0 Provides: bundled(golang(github.com/nightlyone/lockfile)) = 0.0.0 Provides: bundled(golang(github.com/pborman/ansi)) = 1.0.0 Provides: bundled(golang(github.com/stretchr/testify/assert)) = 1.7.0 Provides: bundled(golang(github.com/stretchr/testify/mock)) = 1.7.0 Provides: bundled(golang(github.com/stretchr/testify/require)) = 1.7.0 Provides: bundled(golang(github.com/stretchr/testify/suite)) = 1.7.0 Provides: bundled(golang(github.com/twinj/uuid)) = 0.0.0-20151029044442.git89173bcdda19 Provides: bundled(golang(github.com/xtaci/smux)) = 1.5.15 Provides: bundled(golang(go.nanomsg.org/mangos/v3)) = 3.3.0 Provides: bundled(golang(go.nanomsg.org/mangos/v3/errors)) = 3.3.0 Provides: bundled(golang(go.nanomsg.org/mangos/v3/internal/core)) = 3.3.0 Provides: bundled(golang(go.nanomsg.org/mangos/v3/protocol)) = 3.3.0 Provides: bundled(golang(go.nanomsg.org/mangos/v3/protocol/respondent)) = 3.3.0 Provides: bundled(golang(go.nanomsg.org/mangos/v3/protocol/surveyor)) = 3.3.0 Provides: bundled(golang(go.nanomsg.org/mangos/v3/transport)) = 3.3.0 Provides: bundled(golang(go.nanomsg.org/mangos/v3/transport/ipc)) = 3.3.0 Provides: bundled(golang(golang.org/x/crypto/blowfish)) = 0.17.0 Provides: bundled(golang(golang.org/x/crypto/cast5)) = 0.17.0 Provides: bundled(golang(golang.org/x/crypto/chacha20)) = 0.17.0 Provides: bundled(golang(golang.org/x/crypto/curve25519)) = 0.17.0 Provides: bundled(golang(golang.org/x/crypto/curve25519/internal/field)) = 0.17.0 Provides: bundled(golang(golang.org/x/crypto/internal/alias)) = 0.17.0 Provides: bundled(golang(golang.org/x/crypto/internal/poly1305)) = 0.17.0 Provides: bundled(golang(golang.org/x/crypto/openpgp)) = 0.17.0 Provides: bundled(golang(golang.org/x/crypto/openpgp/armor)) = 0.17.0 Provides: bundled(golang(golang.org/x/crypto/openpgp/elgamal)) = 0.17.0 Provides: bundled(golang(golang.org/x/crypto/openpgp/errors)) = 0.17.0 Provides: bundled(golang(golang.org/x/crypto/openpgp/packet)) = 0.17.0 Provides: bundled(golang(golang.org/x/crypto/openpgp/s2k)) = 0.17.0 Provides: bundled(golang(golang.org/x/crypto/ssh)) = 0.17.0 Provides: bundled(golang(golang.org/x/crypto/ssh/agent)) = 0.17.0 Provides: bundled(golang(golang.org/x/crypto/ssh/internal/bcrypt_pbkdf)) = 0.17.0 Provides: bundled(golang(golang.org/x/crypto/ssh/knownhosts)) = 0.17.0 Provides: bundled(golang(golang.org/x/net/context)) = 0.17.0 Provides: bundled(golang(golang.org/x/net/context/ctxhttp)) = 0.17.0 Provides: bundled(golang(golang.org/x/net/internal/socks)) = 0.17.0 Provides: bundled(golang(golang.org/x/net/proxy)) = 0.17.0 Provides: bundled(golang(golang.org/x/oauth2)) = 0.0.0-20211005180243.git6b3c2da341f1 Provides: bundled(golang(golang.org/x/oauth2/internal)) = 0.0.0-20211005180243.git6b3c2da341f1 Provides: bundled(golang(golang.org/x/sync/errgroup)) = 0.0.0-20220722155255.git886fb9371eb4 Provides: bundled(golang(golang.org/x/sys/cpu)) = 0.15.0 Provides: bundled(golang(golang.org/x/sys/unix)) = 0.15.0 Provides: bundled(golang(golang.org/x/sys/windows)) = 0.15.0 Provides: bundled(golang(golang.org/x/sys/windows/registry)) = 0.15.0 Provides: bundled(golang(golang.org/x/sys/windows/svc)) = 0.15.0 Provides: bundled(golang(golang.org/x/sys/windows/svc/mgr)) = 0.15.0 Provides: bundled(golang(gopkg.in/ini.v1)) = 1.62.0 Provides: bundled(golang(gopkg.in/yaml.v2)) = 2.3.0 %description %{common_description} %prep # Use vendored dependencies. %goprep -k %autopatch -p1 tar c -C vendor/ . | tar x -C %{gobuilddir}/src %build export GOFLAGS+=" -mod=vendor" # Binaries gathered from upstream's repository: # https://github.com/aws/amazon-ssm-agent/blob/mainline/amazon-ssm-agent.spec %gobuild -o %{gobuilddir}/bin/%{srcname} core/agent.go core/agent_unix.go core/agent_parser.go %gobuild -o %{gobuilddir}/bin/ssm-agent-worker agent/agent.go agent/agent_unix.go agent/agent_parser.go %gobuild -o %{gobuilddir}/bin/ssm-document-worker agent/framework/processor/executer/outofproc/worker/main.go %gobuild -o %{gobuilddir}/bin/ssm-session-worker agent/framework/processor/executer/outofproc/sessionworker/main.go %gobuild -o %{gobuilddir}/bin/ssm-session-logger agent/session/logging/main.go %gobuild -o %{gobuilddir}/bin/ssm-cli agent/cli-main/cli-main.go %install install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ mkdir -p %{buildroot}%{_localstatedir}/lib/amazon/ssm/ mkdir -p %{buildroot}%{_localstatedir}/log/amazon/ssm/ install -D -m0644 packaging/linux/%{srcname}.service %{buildroot}%{_unitdir}/%{srcname}.service install -D -m0644 %{srcname}.json.template %{buildroot}%{_sysconfdir}/amazon/ssm/%{srcname}.json.template install -D -m0644 seelog_unix.xml %{buildroot}%{_sysconfdir}/amazon/ssm/seelog.xml.template %check # Skip extra due to use of internal imports: # https://github.com/aws/amazon-ssm-agent/issues/556 export GOFLAGS+=" -mod=vendor" %if 0%{?rhel} export GOPATH=$PWD/_build:%{gopath} cd $PWD/_build/src/%{goipath} #%%gotest ./... TESTS_TO_RUN=$(go list ./... | grep -v internal) %gotest ${TESTS_TO_RUN} %else %gocheck -t extra %endif %files %license LICENSE %doc CODE_OF_CONDUCT.md CONTRIBUTING.md README.md RELEASENOTES.md %{_sysconfdir}/amazon/ssm/%{srcname}.json.template %{_sysconfdir}/amazon/ssm/seelog.xml.template %{_unitdir}/%{srcname}.service %dir %{_localstatedir}/lib/amazon/ssm/ %dir %ghost %{_localstatedir}/log/amazon/ssm/ %{_bindir}/%{srcname} %{_bindir}/ssm-agent-worker %{_bindir}/ssm-cli %{_bindir}/ssm-document-worker %{_bindir}/ssm-session-logger %{_bindir}/ssm-session-worker %post %systemd_post %{srcname}.service %preun %systemd_preun %{srcname}.service %postun %systemd_postun_with_restart %{srcname}.service %changelog * Wed Jan 31 2024 Major Hayden - 3.2.2143.0-1 - Initial package