Skip to content

Commit

Permalink
Updated rpm spec file to include build id
Browse files Browse the repository at this point in the history
  • Loading branch information
Yagnesh-Suribhatla authored and rhaoran-aws committed Jun 8, 2022
1 parent f1f3b5d commit 0f11f0c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions amazon-ssm-agent.spec
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ sed -i -e 's#const[ \s]*Version.*#const Version = "%{version}"#g' agent/version/

%build

CGO_ENABLED=0 go build -ldflags "-s -w -extldflags=-Wl,-z,now,-z,relro,-z,defs" -buildmode=pie -o bin/amazon-ssm-agent -v core/agent.go core/agent_unix.go core/agent_parser.go
CGO_ENABLED=0 go build -ldflags "-s -w -extldflags=-Wl,-z,now,-z,relro,-z,defs" -buildmode=pie -o bin/ssm-agent-worker -v agent/agent.go agent/agent_unix.go agent/agent_parser.go
CGO_ENABLED=0 go build -ldflags "-s -w -extldflags=-Wl,-z,now,-z,relro,-z,defs" -buildmode=pie -o bin/ssm-document-worker -v agent/framework/processor/executer/outofproc/worker/main.go
CGO_ENABLED=0 go build -ldflags "-s -w -extldflags=-Wl,-z,now,-z,relro,-z,defs" -buildmode=pie -o bin/ssm-session-worker -v agent/framework/processor/executer/outofproc/sessionworker/main.go
CGO_ENABLED=0 go build -ldflags "-s -w -extldflags=-Wl,-z,now,-z,relro,-z,defs" -buildmode=pie -o bin/ssm-session-logger -v agent/session/logging/main.go
CGO_ENABLED=0 go build -ldflags "-s -w -extldflags=-Wl,-z,now,-z,relro,-z,defs" -buildmode=pie -o bin/ssm-cli -v agent/cli-main/cli-main.go
CGO_ENABLED=0 go build -ldflags "-extldflags=-Wl,-z,now,-z,relro,-z,defs -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -buildmode=pie -o bin/amazon-ssm-agent -v core/agent.go core/agent_unix.go core/agent_parser.go
CGO_ENABLED=0 go build -ldflags "-extldflags=-Wl,-z,now,-z,relro,-z,defs -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -buildmode=pie -o bin/ssm-agent-worker -v agent/agent.go agent/agent_unix.go agent/agent_parser.go
CGO_ENABLED=0 go build -ldflags "-extldflags=-Wl,-z,now,-z,relro,-z,defs -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -buildmode=pie -o bin/ssm-document-worker -v agent/framework/processor/executer/outofproc/worker/main.go
CGO_ENABLED=0 go build -ldflags "-extldflags=-Wl,-z,now,-z,relro,-z,defs -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -buildmode=pie -o bin/ssm-session-worker -v agent/framework/processor/executer/outofproc/sessionworker/main.go
CGO_ENABLED=0 go build -ldflags "-extldflags=-Wl,-z,now,-z,relro,-z,defs -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -buildmode=pie -o bin/ssm-session-logger -v agent/session/logging/main.go
CGO_ENABLED=0 go build -ldflags "-extldflags=-Wl,-z,now,-z,relro,-z,defs -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -buildmode=pie -o bin/ssm-cli -v agent/cli-main/cli-main.go

%install

Expand All @@ -59,8 +59,6 @@ cp packaging/linux/amazon-ssm-agent.conf %{buildroot}%{_sysconfdir}/init/
cp amazon-ssm-agent.json.template %{buildroot}%{_sysconfdir}/amazon/ssm/amazon-ssm-agent.json.template
cp seelog_unix.xml %{buildroot}%{_sysconfdir}/amazon/ssm/seelog.xml.template

strip --strip-unneeded %{buildroot}%{_prefix}/bin/{amazon-ssm-agent,ssm-agent-worker,ssm-document-worker,ssm-session-worker,ssm-session-logger,ssm-cli}

%files
%defattr(-,root,root,-)
%{_sysconfdir}/amazon/ssm/amazon-ssm-agent.json.template
Expand Down

0 comments on commit 0f11f0c

Please sign in to comment.