File project.diff of Package amazon-ecs-init
--- amazon-ecs-init.changes.orig
+++ amazon-ecs-init.changes
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Fri Feb 20 14:36:21 UTC 2026 - Petr Gajdos <pgajdos@suse.com>
+
+- package /var/cache/amazon/ecs via tmpfiles [jsc#PED-14842]
+- added sources
+ * amazon-ecs-init-tmpfiles.conf
+
+-------------------------------------------------------------------
Mon Apr 14 08:50:15 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to version 1.64.0-1
--- amazon-ecs-init.spec.orig
+++ amazon-ecs-init.spec
@@ -1,7 +1,7 @@
#
# spec file for package amazon-ecs-init
#
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,7 @@ Group: System Environment/Base
URL: https://github.com/aws/amazon-ecs-init
Source0: https://github.com/aws/amazon-ecs-init/archive/refs/tags/v%{version}-1.tar.gz#/%{name}-%{version}-1.tar.gz
Source1: %{short_name}.service
+Source2: amazon-ecs-init-tmpfiles.conf
Patch0: reproducible.patch
Patch1: use-agent-container-built-in-certs.patch
BuildRequires: go >= 1.7
@@ -160,14 +161,15 @@ install -m 755 %SOURCE1 %{buildroot}/%{_
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
-echo 0 > %{buildroot}/%{_localstatedir}/cache/ecs/state
+mkdir -p %{buildroot}%{_tmpfilesdir}
+install -m 644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/amazon-ecs-init.conf
+mkdir -p %{buildroot}%{_datadir}/factory/%{_localstatedir}/cache/ecs
+touch %{buildroot}/%{_datadir}/factory/%{_localstatedir}/cache/ecs/ecs-agent.tar
+echo 0 > %{buildroot}/%{_datadir}/factory/%{_localstatedir}/cache/ecs/state
%files
%defattr(-,root,root,-)
%dir %{_sysconfdir}/ecs
-%dir %{_localstatedir}/cache/ecs
%license LICENSE
%doc CONTRIBUTING.md NOTICE README.md
%config(noreplace) %{_sysconfdir}/ecs/ecs.config
@@ -175,8 +177,14 @@ echo 0 > %{buildroot}/%{_localstatedir}/
%{_mandir}/man*/*
%{_sbindir}/*
%{_unitdir}/%{short_name}.service
-%{_localstatedir}/cache/ecs/ecs-agent.tar
-%{_localstatedir}/cache/ecs/state
+%{_tmpfilesdir}/amazon-ecs-init.conf
+%dir %{_datadir}/factory
+%dir %{_datadir}/factory/%{_localstatedir}
+%dir %{_datadir}/factory/%{_localstatedir}/cache
+%{_datadir}/factory/%{_localstatedir}/cache/ecs
+%ghost %dir %attr(755,root,root) %{_localstatedir}/cache/ecs
+%ghost %attr(644,root,root) %{_localstatedir}/cache/ecs/ecs-agent.tar
+%ghost %attr(644,root,root) %{_localstatedir}/cache/ecs/state
%pre
%service_add_pre %{short_name}.service
@@ -186,6 +194,7 @@ echo 0 > %{buildroot}/%{_localstatedir}/
%post
%service_add_post %{short_name}.service
+%tmpfiles_create amazon-ecs-init.conf
%postun
%service_del_postun %{short_name}.service