File 0002-data-more-precise-prune-pattern-for-tmpfiles.patch of Package snapd

From 5400bfdf1e4c3f861826a215417234420470cb25 Mon Sep 17 00:00:00 2001
Message-ID: <5400bfdf1e4c3f861826a215417234420470cb25.1773816160.git.maciej.borzecki@canonical.com>
From: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Date: Fri, 13 Feb 2026 15:38:01 +0100
Subject: [PATCH] data: more precise prune pattern for tmpfiles
Upstream: cherry pick

This way the structure of private tmp directories is left intact, while the
(aging) content of such directories is allowed to be removed.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
---
 data/systemd-tmpfiles/snapd.conf | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/data/systemd-tmpfiles/snapd.conf b/data/systemd-tmpfiles/snapd.conf
index da8f1c38b7098d745f2f75f1f4eec4bf212942a7..98329e3d6ca7ab8dda07b62213707781bfdf9ff9 100644
--- a/data/systemd-tmpfiles/snapd.conf
+++ b/data/systemd-tmpfiles/snapd.conf
@@ -1,7 +1,7 @@
 D! /tmp/snap-private-tmp 0700 root root -
 
-# make sure the snap's private tmp folders are 
-# not reaped by age if configured by the system (noble+)
-# this will still let the contents be reaped, just not the
-# folder itself
+# Allow removing content in the private tmp folders without affecting the
+# architectural structure of the folders themselves.
+X /tmp/snap-private-tmp
 X /tmp/snap-private-tmp/*/tmp
+x /tmp/snap-private-tmp/*/tmp/.snap
-- 
2.53.0

openSUSE Build Service is sponsored by