Blame amazon-ecs-init.spec

Bernhard M. Wiedemann 5280e4
#
Bernhard M. Wiedemann 5280e4
# spec file for package amazon-ecs-init
Bernhard M. Wiedemann 5280e4
#
71c881
# Copyright (c) 2024 SUSE LLC
Bernhard M. Wiedemann 5280e4
#
Bernhard M. Wiedemann 5280e4
# All modifications and additions to the file contributed by third parties
Bernhard M. Wiedemann 5280e4
# remain the property of their copyright owners, unless otherwise agreed
Bernhard M. Wiedemann 5280e4
# upon. The license for this file, and modifications and additions to the
Bernhard M. Wiedemann 5280e4
# file, is the same license as for the pristine package itself (unless the
Bernhard M. Wiedemann 5280e4
# license for the pristine package is not an Open Source License, in which
Bernhard M. Wiedemann 5280e4
# case the license is the MIT License). An "Open Source License" is a
Bernhard M. Wiedemann 5280e4
# license that conforms to the Open Source Definition (Version 1.9)
Bernhard M. Wiedemann 5280e4
# published by the Open Source Initiative.
Bernhard M. Wiedemann 5280e4
Bernhard M. Wiedemann 5280e4
# Please submit bugfixes or comments via https://bugs.opensuse.org/
Bernhard M. Wiedemann 5280e4
#
Bernhard M. Wiedemann 5280e4
Bernhard M. Wiedemann 5280e4
Bernhard M. Wiedemann 5280e4
%define short_name amazon-ecs
Bernhard M. Wiedemann 5280e4
Name:           amazon-ecs-init
070b77
Version:        1.53.0
Bernhard M. Wiedemann 5280e4
Release:        0
Bernhard M. Wiedemann 5280e4
Summary:        Amazon EC2 Container Service Initialization
Bernhard M. Wiedemann 5280e4
License:        Apache-2.0
Bernhard M. Wiedemann 5280e4
Group:          System Environment/Base
Bernhard M. Wiedemann 9825a8
URL:            https://github.com/aws/amazon-ecs-init
71c881
Source0:        https://github.com/aws/amazon-ecs-init/archive/refs/tags/v%{version}-1.tar.gz#/%{name}-%{version}-1.tar.gz
Bernhard M. Wiedemann 5280e4
Source1:        %{short_name}.service
Bernhard M. Wiedemann 5280e4
Patch0:         reproducible.patch
c14692
Patch1:         use-agent-container-built-in-certs.patch
af0fa2
BuildRequires:  go  >= 1.7
Bernhard M. Wiedemann 9825a8
BuildRequires:  pkgconfig(systemd)
Bernhard M. Wiedemann 5280e4
# We cannot handle cross module dependencies properly, i.e. one module can
8d6b64
# only depend on one other module, instead of having a one to many
8d6b64
# dependency construct. While docker is a hard requirement this cannot be
8d6b64
# expressed here and we use Recommends. AS we want to have openSUSE and SLE
8d6b64
# behave in the same way openSUSE has to suffer the same "brokenness"
Bernhard M. Wiedemann 5280e4
Recommends:     docker >= 1.6.0
Bernhard M. Wiedemann 5280e4
Requires:       systemd
af0fa2
Provides:       bundled(golang(github.com/Azure/go-ansiterm))
af0fa2
Provides:       bundled(golang(github.com/Azure/go-ansiterm/winterm))
af0fa2
Provides:       bundled(golang(github.com/Microsoft/go-winio))
af0fa2
Provides:       bundled(golang(github.com/NVIDIA/gpu-monitoring-tools/bindings/go/nvml))
af0fa2
Provides:       bundled(golang(github.com/Nvveen/Gotty))
af0fa2
Provides:       bundled(golang(github.com/Sirupsen/logrus))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/aws))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/aws/awserr))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/aws/awsutil))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/aws/client))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/aws/client/metadata))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/aws/corehandlers))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/aws/credentials))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/endpointcreds))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/stscreds))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/aws/defaults))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/aws/ec2metadata))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/aws/endpoints))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/aws/request))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/aws/session))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/aws/signer/v4))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/internal/sdkio))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/internal/sdkrand))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/internal/shareddefaults))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/private/protocol))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/private/protocol/query))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/private/protocol/query/queryutil))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/private/protocol/rest))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/private/protocol/restxml))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/service/s3))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/service/s3/s3iface))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/service/s3/s3manager))
af0fa2
Provides:       bundled(golang(github.com/aws/aws-sdk-go/service/sts))
af0fa2
Provides:       bundled(golang(github.com/cihub/seelog))
af0fa2
Provides:       bundled(golang(github.com/cihub/seelog/archive))
af0fa2
Provides:       bundled(golang(github.com/cihub/seelog/archive/gzip))
af0fa2
Provides:       bundled(golang(github.com/cihub/seelog/archive/tar))
af0fa2
Provides:       bundled(golang(github.com/cihub/seelog/archive/zip))
af0fa2
Provides:       bundled(golang(github.com/coreos/go-systemd/activation))
af0fa2
Provides:       bundled(golang(github.com/davecgh/go-spew/spew))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/api/types))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/api/types/blkiodev))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/api/types/container))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/api/types/filters))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/api/types/mount))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/api/types/network))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/api/types/registry))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/api/types/strslice))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/api/types/swarm))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/api/types/versions))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/opts))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/pkg/archive))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/pkg/fileutils))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/pkg/homedir))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/pkg/idtools))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/pkg/ioutils))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/pkg/jsonlog))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/pkg/jsonmessage))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/pkg/longpath))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/pkg/mount))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/pkg/pools))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/pkg/promise))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/pkg/stdcopy))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/pkg/system))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/pkg/term))
af0fa2
Provides:       bundled(golang(github.com/docker/docker/pkg/term/windows))
af0fa2
Provides:       bundled(golang(github.com/docker/go-connections/nat))
af0fa2
Provides:       bundled(golang(github.com/docker/go-connections/sockets))
af0fa2
Provides:       bundled(golang(github.com/docker/go-plugins-helpers/sdk))
af0fa2
Provides:       bundled(golang(github.com/docker/go-plugins-helpers/volume))
af0fa2
Provides:       bundled(golang(github.com/docker/go-units))
af0fa2
Provides:       bundled(golang(github.com/fsouza/go-dockerclient))
af0fa2
Provides:       bundled(golang(github.com/go-ini/ini))
af0fa2
Provides:       bundled(golang(github.com/golang/mock/gomock))
af0fa2
Provides:       bundled(golang(github.com/jmespath/go-jmespath))
af0fa2
Provides:       bundled(golang(github.com/opencontainers/go-digest))
af0fa2
Provides:       bundled(golang(github.com/opencontainers/image-spec/specs-go))
af0fa2
Provides:       bundled(golang(github.com/opencontainers/image-spec/specs-go/v1))
af0fa2
Provides:       bundled(golang(github.com/opencontainers/runc/libcontainer/system))
af0fa2
Provides:       bundled(golang(github.com/opencontainers/runc/libcontainer/user))
af0fa2
Provides:       bundled(golang(github.com/pkg/errors))
af0fa2
Provides:       bundled(golang(github.com/pmezard/go-difflib/difflib))
af0fa2
Provides:       bundled(golang(github.com/stretchr/testify/assert))
af0fa2
Provides:       bundled(golang(golang.org/x/net/context))
af0fa2
Provides:       bundled(golang(golang.org/x/net/context/ctxhttp))
af0fa2
Provides:       bundled(golang(golang.org/x/net/proxy))
af0fa2
Provides:       bundled(golang(golang.org/x/sys/unix))
af0fa2
Provides:       bundled(golang(golang.org/x/sys/windows))
af0fa2
Bernhard M. Wiedemann 5280e4
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
e3432c
ExclusiveArch:  x86_64 aarch64
Bernhard M. Wiedemann 5280e4
Bernhard M. Wiedemann 5280e4
%description
Bernhard M. Wiedemann 5280e4
The Amazon EC2 Container Service initialization will start the ECS agent.
Bernhard M. Wiedemann 5280e4
The ECS agent runs in a container and is needed to support integration
Bernhard M. Wiedemann 5280e4
between the aws-cli ecs command line tool and an instance running in
Bernhard M. Wiedemann 5280e4
Amazon EC2.
Bernhard M. Wiedemann 5280e4
Bernhard M. Wiedemann 5280e4
%prep
Bernhard M. Wiedemann 5280e4
%setup -q -n %{name}-%{version}-1
6191eb
%patch -P 0 -p1
6191eb
%patch -P 1
Bernhard M. Wiedemann 5280e4
Bernhard M. Wiedemann 5280e4
%build
af0fa2
export GO111MODULE="auto"
Bernhard M. Wiedemann 5280e4
./scripts/gobuild.sh suse
Bernhard M. Wiedemann 5280e4
gzip -c scripts/amazon-ecs-init.1 > scripts/amazon-ecs-init.1.gz
Bernhard M. Wiedemann 5280e4
Bernhard M. Wiedemann 5280e4
%install
Bernhard M. Wiedemann 5280e4
install -d -m 755 %{buildroot}/%{_mandir}/man1
Bernhard M. Wiedemann 5280e4
install -d -m 755 %{buildroot}/%{_sbindir}
Bernhard M. Wiedemann 5280e4
install -d -m 755 %{buildroot}/%{_sysconfdir}/ecs
Bernhard M. Wiedemann 5280e4
install -m 644 scripts/amazon-ecs-init.1.gz %{buildroot}/%{_mandir}/man1
Bernhard M. Wiedemann 5280e4
install -m 755 amazon-ecs-init %{buildroot}/%{_sbindir}
Bernhard M. Wiedemann 5280e4
Bernhard M. Wiedemann 5280e4
mkdir -p %{buildroot}/%{_unitdir}
Bernhard M. Wiedemann 5280e4
install -m 755 %SOURCE1 %{buildroot}/%{_unitdir}
Bernhard M. Wiedemann 5280e4
Bernhard M. Wiedemann 5280e4
touch %{buildroot}/%{_sysconfdir}/ecs/ecs.config
Bernhard M. Wiedemann 5280e4
touch %{buildroot}/%{_sysconfdir}/ecs/ecs.config.json
Bernhard M. Wiedemann 5280e4
Bernhard M. Wiedemann 5280e4
mkdir -p %{buildroot}/%{_localstatedir}/cache/ecs
Bernhard M. Wiedemann 5280e4
touch %{buildroot}/%{_localstatedir}/cache/ecs/ecs-agent.tar
c14692
echo 0 > %{buildroot}/%{_localstatedir}/cache/ecs/state
Bernhard M. Wiedemann 5280e4
Bernhard M. Wiedemann 5280e4
%files
Bernhard M. Wiedemann 5280e4
%defattr(-,root,root,-)
Bernhard M. Wiedemann 5280e4
%dir %{_sysconfdir}/ecs
Bernhard M. Wiedemann 5280e4
%dir %{_localstatedir}/cache/ecs
71c881
%license LICENSE
71c881
%doc CONTRIBUTING.md NOTICE README.md
Bernhard M. Wiedemann 5280e4
%config(noreplace) %{_sysconfdir}/ecs/ecs.config
Bernhard M. Wiedemann 5280e4
%config(noreplace) %{_sysconfdir}/ecs/ecs.config.json
Bernhard M. Wiedemann 5280e4
%{_mandir}/man*/*
Bernhard M. Wiedemann 5280e4
%{_sbindir}/*
Bernhard M. Wiedemann 5280e4
%{_unitdir}/%{short_name}.service
Bernhard M. Wiedemann 5280e4
%{_localstatedir}/cache/ecs/ecs-agent.tar
Bernhard M. Wiedemann 5280e4
%{_localstatedir}/cache/ecs/state
Bernhard M. Wiedemann 5280e4
Bernhard M. Wiedemann 5280e4
%pre
Bernhard M. Wiedemann 5280e4
%service_add_pre %{short_name}.service
Bernhard M. Wiedemann 5280e4
Bernhard M. Wiedemann 5280e4
%preun
Bernhard M. Wiedemann 5280e4
%service_del_preun %{short_name}.service
Bernhard M. Wiedemann 5280e4
Bernhard M. Wiedemann 5280e4
%post
Bernhard M. Wiedemann 5280e4
%service_add_post %{short_name}.service
Bernhard M. Wiedemann 5280e4
Bernhard M. Wiedemann 5280e4
%postun
Bernhard M. Wiedemann 5280e4
%service_del_postun %{short_name}.service
Bernhard M. Wiedemann 5280e4
Bernhard M. Wiedemann 5280e4
%changelog