File project.diff of Package amazon-ssm-agent

--- amazon-ssm-agent.changes.orig
+++ amazon-ssm-agent.changes
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Thu Feb 19 17:17:33 UTC 2026 - Petr Gajdos <pgajdos@suse.com>
+
+- package /var/{lib,log}/amazon via tmpfiles [jsc#PED-14843]
+- added sources
+  * amazon-ssm-agent-tmpfiles.conf
+
+-------------------------------------------------------------------
 Mon Jan  5 12:39:50 UTC 2026 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
 
 - Update to version 3.3.3598.0
--- amazon-ssm-agent.spec.orig
+++ amazon-ssm-agent.spec
@@ -1,6 +1,7 @@
 #
 # spec file for package amazon-ssm-agent
 #
+# Copyright (c) 2026 SUSE LLC
 # Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
@@ -24,6 +25,7 @@ License:        Apache-2.0
 Group:          System/Management
 URL:            https://github.com/aws/amazon-ssm-agent
 Source0:        https://github.com/aws/amazon-ssm-agent/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Source1:        amazon-ssm-agent-tmpfiles.conf
 # PATCH-FIX-UPSTREAM - Fix an SSH client process terminating when receiving an unexpected
 # message type in response to a key listing or signing request (CVE-2025-47913)
 # Partial patch taken from https://cs.opensource.google/go/x/crypto/+/559e062ce8bfd6a39925294620b50906ca2a6f95
@@ -125,8 +127,6 @@ CGO_ENABLED=0 go build -ldflags "-s -w -
 %install
 install -d -m 755 %{buildroot}%{_sbindir}
 install -d -m 755 %{buildroot}%{_sysconfdir}/amazon/ssm
-install -d -m 755 %{buildroot}%{_localstatedir}/log/amazon/ssm
-install -d -m 755 %{buildroot}%{_localstatedir}/lib/amazon/ssm
 install -m 755 bin/amazon-ssm-agent %{buildroot}%{_sbindir}
 install -m 755 bin/ssm-agent-worker %{buildroot}%{_sbindir}
 install -m 755 bin/ssm-cli %{buildroot}%{_sbindir}
@@ -139,20 +139,24 @@ cp seelog_unix.xml %{buildroot}%{_syscon
 cp amazon-ssm-agent.json.template %{buildroot}%{_sysconfdir}/amazon/ssm/
 install -m 644 packaging/linux/amazon-ssm-agent.service %{buildroot}%{_unitdir}
 
+install -d -m 0755 %{buildroot}%{_tmpfilesdir}
+install -m 0644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/amazon-ssm-agent.conf
+
 %files
 %defattr(-,root,root,-)
 %dir %{_sysconfdir}/amazon
 %dir %{_sysconfdir}/amazon/ssm
-%dir %{_localstatedir}/log/amazon
-%dir %{_localstatedir}/lib/amazon
 %license LICENSE
 %doc CONTRIBUTING.md NOTICE.md README.md RELEASENOTES.md
 %config(noreplace) %{_sysconfdir}/amazon/ssm/amazon-ssm-agent.json.template
 %config(noreplace) %{_sysconfdir}/amazon/ssm/seelog.xml.template
 %{_sbindir}/*
 %{_unitdir}/%{name}.service
-%{_localstatedir}/lib/amazon/ssm
-%ghost %{_localstatedir}/log/amazon/ssm/
+%{_tmpfilesdir}/amazon-ssm-agent.conf
+%ghost %dir %attr(755,root,root) %{_localstatedir}/lib/amazon
+%ghost %dir %attr(755,root,root) %{_localstatedir}/lib/amazon/ssm
+%ghost %dir %attr(755,root,root) %{_localstatedir}/log/amazon
+%ghost %dir %attr(700,root,root) %{_localstatedir}/log/amazon/ssm
 
 %pre
 %service_add_pre %{name}.service
@@ -162,6 +166,7 @@ install -m 644 packaging/linux/amazon-ss
 
 %post
 %service_add_post %{name}.service
+%tmpfiles_create %{name}.conf
 
 %postun
 %service_del_postun %{name}.service
openSUSE Build Service is sponsored by