View Issue Details

IDProjectCategoryView StatusLast Update
0016228CentOS-7systemdpublic2019-06-30 07:19
Reporterngyuki 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version7.6.1810 
Target VersionFixed in Version 
Summary0016228: systemd-tmpfiles `x` and `X` no difference
Descriptionman tmpfiles.d

> X
> Ignore a path during cleaning. Use this type to exclude paths from clean-up as controlled with the Age parameter.
> Unlike x, this parameter will not exclude the content if path is a directory,
> but only directory itself. Note that lines of this type do not influence the effect of r or R lines.
> Lines of this type accept shell-style globs in place of normal path names.

But, `x` and` X` no difference, they do same thing.
Steps To ReproduceI have following tmpfiles config in `xxx.conf`.

```
# xxx.conf
d /var/xxx 0755 root root 1s
x /var/xxx/aaa
X /var/xxx/bbb
```

Prepare directory and file.

```
mkdir -p /var/xxx/aaa/
mkdir -p /var/xxx/bbb/
mkdir -p /var/xxx/ccc/

touch /var/xxx/aaa/zzz.txt
touch /var/xxx/bbb/zzz.txt
touch /var/xxx/ccc/zzz.txt
touch /var/xxx/zzz.txt

tree /var/xxx
# /var/xxx
# ├── aaa
# │   └── zzz.txt
# ├── bbb
# │   └── zzz.txt
# ├── ccc
# │   └── zzz.txt
# └── zzz.txt
```

Run `systemd-tmpfiles`

```
SYSTEMD_LOG_LEVEL=debug systemd-tmpfiles --clean $PWD/xxx.conf
```

I expect result following.

```
tree /var/xxx
# /var/xxx
# ├── aaa
# │   └── zzz.txt
# └── bbb
```

But, actual result following.

```
tree /var/xxx
# /var/xxx
# ├── aaa
# │   └── zzz.txt
# └── bbb
# └── zzz.txt
```
Additional InformationDebug output.

```
Reading config file "/root/xxx.conf".
Running clean action for entry d /var/xxx
Cleanup threshold for directory "/var/xxx" is Sun 2019-06-30 16:15:57.723816 JST
Ignoring "/var/xxx/aaa": a separate glob exists.
Ignoring "/var/xxx/bbb": a separate glob exists.
unlink "/var/xxx/ccc/zzz.txt"
Restoring access and modification time on "/var/xxx/ccc": Sun 2019-06-30 16:15:52.221807 JST, Sun 2019-06-30 16:15:49.375855 JST
Removing directory "/var/xxx/ccc".
unlink "/var/xxx/zzz.txt"
Restoring access and modification time on "/var/xxx": Sun 2019-06-30 16:15:52.221807 JST, Sun 2019-06-30 16:15:49.389855 JST
Running clean action for entry x /var/xxx/aaa
Running clean action for entry X /var/xxx/bbb
```
TagsNo tags attached.
abrt_hash
URL

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-06-30 07:17 ngyuki New Issue