Bug 968374

Summary: systemd-tmpfiles doesn't accept relative paths to configuration files
Product: Red Hat Enterprise Linux 7 Reporter: Jakub Filak <jfilak>
Component: systemdAssignee: systemd-maint
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: jberan, lnykryn, systemd-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-23 15:47:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
A proposed patch for solution 1 from comment #0 none

Description Jakub Filak 2013-05-29 14:55:59 UTC
Created attachment 754432 [details]
A proposed patch for solution 1 from comment #0

Description of problem:
If you want to test your new configuration file and you pass a relative file system path as the last argument of systemd-tmpfiles, systemd-tmpfiles prints the following message:
"Failed to open 'my_tmpfiles.conf', ignoring: No such file or directory"

The help text doesn't say that an absolute path is required.

$ systemd-tmpfiles --help
systemd-tmpfiles [OPTIONS...] [CONFIGURATION FILE...]

Creates, deletes and cleans up volatile and temporary files and directories.

  -h --help             Show this help
     --create           Create marked files/directories
     --clean            Clean up marked directories
     --remove           Remove marked files/directories
     --prefix=PATH      Only apply rules that apply to paths with the specified prefix

Version-Release number of selected component (if applicable):
systemd-204-2.el7.1.x86_64

Any one of these solutions would be fine:
1) if no standard tmpfiles directory contains the configuration file, systemd-tmpfiles tries to open the configuration file from the current directory.
2) more verbose help text 
3) more precise error message

Comment 2 Lukáš Nykrýn 2013-07-23 15:47:24 UTC
Documented in tmpfiles.d(5).

Comment 3 Jakub Filak 2013-07-23 16:14:21 UTC
Thank you for taking the time to look at this bug!

I'm afraid that the right documentation is systemd-tmpfiles(8) because tmpfiles.d(5) describes only the configuration format and the purpose of files placed in the tmpfiles.d directories.