From 5280e4139080fe81aab0d009eb292117e40c557f Mon Sep 17 00:00:00 2001 From: Bernhard M. Wiedemann Date: Sep 13 2019 14:29:36 +0000 Subject: restructure files to remain below github limit of 1000 entries --- diff --git a/amazon-ecs-init.changes b/amazon-ecs-init.changes new file mode 100644 index 0000000..fea23ea --- /dev/null +++ b/amazon-ecs-init.changes @@ -0,0 +1,160 @@ +------------------------------------------------------------------- +Wed Apr 3 18:45:07 UTC 2019 - Robert Schweikert + +- Enable aarch64 build (bsc#1131459) + +------------------------------------------------------------------- +Thu Aug 30 09:25:08 UTC 2018 - bwiedemann@suse.com + +- Add reproducible.patch to use constant build path (boo#1062303) + +------------------------------------------------------------------- +Tue Jul 17 11:54:46 UTC 2018 - adrian.glaubitz@suse.com + +- Update to version 1.18.0 + + Cache Agent version 1.18.0 + + Add support for regional buckets + + Bundle ECS Agent tarball in package + + Download agent based on the partition + + Mount Docker plugin files dir + +------------------------------------------------------------------- +Fri May 25 12:53:24 UTC 2018 - rjschwei@suse.com + +- Modify dependencies to work around module dependency issues in SLE + +------------------------------------------------------------------- +Tue May 22 13:42:50 UTC 2018 - rjschwei@suse.com + +- Update to version 1.17.3 + + No upstream changelog + +------------------------------------------------------------------- +Thu Nov 3 22:35:12 UTC 2016 - rjschwei@suse.com + +- Service needs to run after we know the network is fully configured + thus use network-online.target instead of network.target + +------------------------------------------------------------------- +Thu Nov 3 12:00:29 UTC 2016 - rjschwei@suse.com + +- Update to version 1.13.0 (bsc#1008298) + + Cache agent version 1.13.0 +- From 1.12.2 + + Cache Agent version 1.12.2 +- From 1.12.1 + + Cache Agent version 1.12.1 +- From 1.12.0 + + Enable Task IAM Role for containers launched with 'host' network mode + + Cache Agent version 1.12.0 +- From 1.11.1 + + Cache Agent version 1.11.1 +- From 1.11.0 + + Enhancement - Support Task IAM Roles feature of Agent + + Enhancement - Start Agent with host network mode + + Enhancement - Cache Agent version 1.11.0 + + Enhancement - Add support for Docker 1.11.2 +- From 1.10.0 + + Enhancement - Cache Agent version 1.10.0 + + Enhancement - Add support for Docker 1.11.1 +- From 1.9.0 + + Enhancement - Cache Agent version 1.9.0 + - From 1.8.2 + + Enhancement - Cache Agent version 1.8.2 +- From 1.8.1 + + Enhancement - Cache Agent version 1.8.1 + +------------------------------------------------------------------- +Wed Jan 27 19:25:00 UTC 2016 - rjschwei@suse.com + +- Update to version 1.7.1 (bsc#963837) + + remove cgroup_location.patch, system path is integrated in build + configuration + + Cache Agent version 1.7.1 +- From 1.7.0 + + Cache Agent version 1.7.0 + + Add support for Docker 1.9.1 +- From 1.6.0 + + Cache Agent version 1.6.0 + + Updated source dependencies + +------------------------------------------------------------------- +Thu Oct 8 21:44:45 UTC 2015 - rjschwei@suse.com + +- Update to version 1.5.0 (bsc#949602) + + Enhancement - Cache Agent version 1.5.0 + + Enhancement - Improved merge strategy for user-supplied environment + + Enhancement - Add default supported logging drivers +- Add build switch for SUSE, modify cgroup_location.patch + +------------------------------------------------------------------- +Mon Sep 28 13:04:58 UTC 2015 - rjschwei@suse.com + +- Update long description + +------------------------------------------------------------------- +Sun Sep 27 13:08:42 UTC 2015 - rjschwei@suse.com + +- Add patch cgroup_location.patch + + Modify location where the agent looks for cgroup information + +------------------------------------------------------------------- +Thu Sep 24 20:16:36 UTC 2015 - rjschwei@suse.com + +- Drop the extra version number + + Going forward we do not care about picking up -x tarball releases + the do not contain source changes + +------------------------------------------------------------------- +Thu Sep 24 17:56:40 UTC 2015 - rjschwei@suse.com + +- Rename the service file, request from upstream +- Spec file improvements to better match the requirements of the code + +------------------------------------------------------------------- +Tue Sep 22 14:48:33 UTC 2015 - rjschwei@suse.com + +- Update to version 1.4.0.2 (1.4.0-2 upstream) + + Enhancement - Add support for Docker 1.7.1 + + Enhancement: Cache Agent version 1.4.0 + + Feature: Read Docker endpoint from environment variable + DOCKER_HOST if present + +------------------------------------------------------------------- +Tue Sep 22 12:28:32 CEST 2015 - lchiquitto@suse.de + +- Set ExclusiveArch to disable building on architectures not + supported by Go. + +------------------------------------------------------------------- +Mon Aug 10 17:18:13 UTC 2015 - rjschwei@suse.com + +- Include in SLE 12 (fate#319338) + + Also related to fate#318337 + +------------------------------------------------------------------- +Mon Aug 10 17:10:53 UTC 2015 - rjschwei@suse.com + +- go is only a BuildRequires as go is completely static and we need + no runtime bits and pieces + +------------------------------------------------------------------- +Wed Aug 5 18:45:57 UTC 2015 - rjschwei@suse.com + +- Use the systemd unit file as source, no need to wrap it in a tarball + +------------------------------------------------------------------- +Wed Aug 5 09:21:51 UTC 2015 - ms@suse.com + +- Update to version 1.3.1 + + Added systemd unit script for start/stop + + Added activation/deactivation of service in spec file + +------------------------------------------------------------------- +Mon Jun 1 17:41:41 UTC 2015 - rjschwei@suse.com + +- Initial build + + Version 1.0-3 + + Not ready for use, still experimenting but need to share to push the + work forward. The systemd init files need to be sorted out + diff --git a/amazon-ecs-init.spec b/amazon-ecs-init.spec new file mode 100644 index 0000000..d480fe5 --- /dev/null +++ b/amazon-ecs-init.spec @@ -0,0 +1,100 @@ +# +# spec file for package amazon-ecs-init +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define short_name amazon-ecs +Name: amazon-ecs-init +Version: 1.18.0 +Release: 0 +Summary: Amazon EC2 Container Service Initialization +License: Apache-2.0 +Group: System Environment/Base +Url: https://github.com/aws/amazon-ecs-init +Source0: %{name}-%{version}-1.tar.gz +Source1: %{short_name}.service +Patch0: reproducible.patch +BuildRequires: go +BuildRequires: systemd +%if 0%{?is_opensuse} +Requires: docker >= 1.6.0 +%else +# We cannot handle cross module dependencies properly, i.e. one module can +# onlyd depend on one other module, instead of having a one to many +# dependency construct. +Recommends: docker >= 1.6.0 +%endif +Requires: systemd +BuildRoot: %{_tmppath}/%{name}-%{version}-build +ExclusiveArch: %ix86 x86_64 aarch64 + +%description +The Amazon EC2 Container Service initialization will start the ECS agent. +The ECS agent runs in a container and is needed to support integration +between the aws-cli ecs command line tool and an instance running in +Amazon EC2. + +%prep +%setup -q -n %{name}-%{version}-1 +%patch0 -p1 + +%build +./scripts/gobuild.sh suse +gzip -c scripts/amazon-ecs-init.1 > scripts/amazon-ecs-init.1.gz + +%install +install -d -m 755 %{buildroot}/%{_mandir}/man1 +install -d -m 755 %{buildroot}/%{_sbindir} +install -d -m 755 %{buildroot}/%{_sysconfdir}/ecs +install -m 644 scripts/amazon-ecs-init.1.gz %{buildroot}/%{_mandir}/man1 +install -m 755 amazon-ecs-init %{buildroot}/%{_sbindir} + +mkdir -p %{buildroot}/%{_unitdir} +install -m 755 %SOURCE1 %{buildroot}/%{_unitdir} + +touch %{buildroot}/%{_sysconfdir}/ecs/ecs.config +touch %{buildroot}/%{_sysconfdir}/ecs/ecs.config.json + +mkdir -p %{buildroot}/%{_localstatedir}/cache/ecs +touch %{buildroot}/%{_localstatedir}/cache/ecs/ecs-agent.tar +touch %{buildroot}/%{_localstatedir}/cache/ecs/state + +%files +%defattr(-,root,root,-) +%dir %{_sysconfdir}/ecs +%dir %{_localstatedir}/cache/ecs +%doc CONTRIBUTING.md LICENSE NOTICE README.md +%config(noreplace) %{_sysconfdir}/ecs/ecs.config +%config(noreplace) %{_sysconfdir}/ecs/ecs.config.json +%{_mandir}/man*/* +%{_sbindir}/* +%{_unitdir}/%{short_name}.service +%{_localstatedir}/cache/ecs/ecs-agent.tar +%{_localstatedir}/cache/ecs/state + +%pre +%service_add_pre %{short_name}.service + +%preun +%service_del_preun %{short_name}.service + +%post +%service_add_post %{short_name}.service + +%postun +%service_del_postun %{short_name}.service + +%changelog diff --git a/amazon-ecs.service b/amazon-ecs.service new file mode 100644 index 0000000..9fe7309 --- /dev/null +++ b/amazon-ecs.service @@ -0,0 +1,16 @@ +[Unit] +Description=Amazon EC2 Container Service Initialization +After=docker.service +After=network-online.target +Requires=docker.service +Requires=network-online.target + +[Service] +Type=simple +ExecStartPre=/usr/sbin/amazon-ecs-init pre-start +ExecStart=/usr/sbin/amazon-ecs-init start +ExecStop=/usr/sbin/amazon-ecs-init pre-stop +ExecReload=/usr/sbin/amazon-ecs-init reload-cache + +[Install] +WantedBy=multi-user.target diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..abdaa87 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,27 @@ +Author: Bernhard M. Wiedemann +Date: 2018-08-30 + +https://bugzilla.opensuse.org/show_bug.cgi?id=1062303 + +Without this patch, there was always variation +in /usr/sbin/amazon-ecs-init differs in ELF section .gopclntab + b7ed20 7a5f1e00 285f1e00 2f746d70 2f746d70 z_..(_../tmp/tmp +- b7ed30 2e6a4867 4463556e 6c46702f 7372632f .jHgDcUnlFp/src/ ++ b7ed30 2e385731 596d4c63 556a462f 7372632f .8W1YmLcUjF/src/ + b7ed40 67697468 75622e63 6f6d2f61 77732f61 github.com/aws/a + +See https://reproducible-builds.org/ for why this matters. + +Index: amazon-ecs-init-1.18.0-1/scripts/gobuild.sh +=================================================================== +--- amazon-ecs-init-1.18.0-1.orig/scripts/gobuild.sh ++++ amazon-ecs-init-1.18.0-1/scripts/gobuild.sh +@@ -15,7 +15,7 @@ + set -x + set -e + export TOPWD="$(pwd)" +-export BUILDDIR="$(mktemp -d)" ++export BUILDDIR="$TOPWD/build" + export GOPATH="${TOPWD}/ecs-init/:${BUILDDIR}" + export SRCPATH="${BUILDDIR}/src/github.com/aws/amazon-ecs-init" +