Re: tmpfiles.d and spaces in filenames

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

 



On Jun  1 09:59, JD wrote:
> On 06/01/11 09:37, Ian Malone wrote:
> > 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
> >> [...]
> >> 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?"
> >>
> > [...]
> > So the long answer is you either have to modify tmpfiles.c to deal
> > with this or write a similar daemon to do it.

I guess this should be converted into a bugzilla entry then.

> Since a space is Unix's and Linux's chosen field separator,

Just because the space is a field separator doesn't mean there are
no ways to define spaces in filenames.

> I think having a space in filenames should be avoided. there

That's not always possible and you can't ask all users to rename their
files.  Filenames like "Expenses May 2011.odt" are just to be expected.
Another example is the default naming of CF or SD media formatted on
certain camera models.  Yet another exmaple are customer request.

> are many situations where spaces in filenames cause problems.
> A simple example:
> 
> for i in *; do
> [ -f $i ] && echo $i is a file
> done

Which is just an example of insufficient quoting.  If this isn't part of
a script which exactly knows that no filename will have spaces, it's
broken by design.  Spaces in filenames are perfectly valid and system
tools which may come into contact with user-defined content should be
able to deal with them.

The fact that even /etc/fstab (rather, mount(8)) deals with spaces in
mount points shows that there is a need and a way to handle them.

Having said that, using the space definition in /etc/fstab shouldn't
be too hard to do in tmpfiles.d as well.


Corinna
-- 
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