Re: tmpfiles.d and spaces in filenames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1 June 2011 16:11, Corinna Vinschen <vinschen@xxxxxxxxxx> wrote:
> Hi,
>
> How can I specify filenames with spaces in tmpfiles.d configuration
> files? ÂThere's no hint in `man tmfiles.d'. ÂI tried
>
> - fstab style: Â Â Âd /foo\040bar 0755 root root
> - web style: Â Â Â Âd /foo%20bar 0755 root root
> - quoted style 1: Â d "/foo bar" 0755 root root
> - quoted style 2: Â d '/foo bar' 0755 root root
>
> This results in two directories
>
> Â/foo\040bar
> Â/foo%20bar
>
> and two error messages:
>
> ÂPath '"/foo' not absolute.
> ÂPath ''/foo' not absolute.
>
> So, do I have to take it that tmpfiles.d doesn't grok spaces in
> filenames at all?
>
> Please note, I'm not asking for the obvious answer "don't do this" and
> I'm also not asking for the counter question "why do you need this?"
>

As usual both of these might push in the direction of another way to
solve the problem. From checking the documentation it seems packages
are expected to define patterns here for their tmpfiles which they
should have control over. Which I guess is not the situation you're
dealing with. Looking at it I think the short answer is you can't as
tmpfiles.c is just using sscanf to parse this line:
http://cgit.freedesktop.org/systemd/tree/src/tmpfiles.c
Line 670:
 if (sscanf(buffer,
                   "%c "
                   "%ms "
                   "%ms "
                   "%ms "
                   "%ms "
                   "%ms",
                   &i->type,
                   &i->path,
                   &mode,
                   &user,
                   &group,
                   &age) < 2) {
                log_error("[%s:%u] Syntax error.", fname, line);
                r = -EIO;
                goto finish;
        }

So the long answer is you either have to modify tmpfiles.c to deal
with this or write a similar daemon to do it.

-- 
imalone
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux