Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Created attachment 789098[details]
an example of tmpfiles.d configuration file
Description of problem:
path of x rules should be ignored during cleaning and if path is directory, all its contents should be ignored too.
Version-Release number of selected component (if applicable):
systemd-206-4.el7.x86_64
How reproducible:
always
Steps to Reproduce:
1. $ touch /var/tmp/abrt/foo
2. put the attached config file to /usr/lib/tmpfiles.d/
2. $ systemd-tmpfiles --create --clean --remove abrt.conf
3. $ ls /var/tmp/abrt
Actual results:
ls: cannot access /var/tmp/abrt/foo: No such file or directory
Expected results:
/var/tmp/abrt/foo
As we have discussed, current behavior is correct. If you don't want to delete whole directory, you have to use glob /var/tmp/abrt/*. This is mentioned in the manpage, but it is not obvious on the first sight.
So I would suggest to add this scenario to examples.
I find the current man page very confusing on this point. Here is the man page
section describing the "x" and "X" types:
x
Ignore a path during cleaning. Use this type to exclude paths from
clean-up as controlled with the Age parameter. 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.
X
Ignore a path during cleanup. Use this type to prevent path removal
as controlled with the Age parameter. Note that if path is a
directory, content of a directory is not excluded from clean-up,
only directory itself. Lines of this type accept shell-style globs
in place of normal path names.
The only meaningful difference in the descriptions is that "X" says that the "content of a directory is not excluded from clean-up, only directory itself".
This suggests that "x" (as opposed to "X") does include the contents of the directory. And I have done some limited testing in F19 to suggest that this is true.
A patch to the man page to clarify these behaviors and the differences between "x" and "X" would be really helpful.
Thanks,
Andy
Hi Václav, thanks for that clarification. I think it's a big improvement in the man page.
But how does this relate to Comment 2 above which says that one must use globbing to prevent the contents of a directory from being deleted? Is comment #2 incorrect? In other words, was this a valid bug to begin with?
Thanks,
Andy
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.
Created attachment 789098 [details] an example of tmpfiles.d configuration file Description of problem: path of x rules should be ignored during cleaning and if path is directory, all its contents should be ignored too. Version-Release number of selected component (if applicable): systemd-206-4.el7.x86_64 How reproducible: always Steps to Reproduce: 1. $ touch /var/tmp/abrt/foo 2. put the attached config file to /usr/lib/tmpfiles.d/ 2. $ systemd-tmpfiles --create --clean --remove abrt.conf 3. $ ls /var/tmp/abrt Actual results: ls: cannot access /var/tmp/abrt/foo: No such file or directory Expected results: /var/tmp/abrt/foo