Re: How to install a mountpoint directory from an rpm?

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

 



On Fri, 2019-05-03 at 00:30 -0400, Nico Kadel-Garcia wrote:
> On Tue, Apr 30, 2019 at 8:25 PM Ian Kent <raven@xxxxxxxxxx> wrote:
> > 
> > On Tue, 2019-04-30 at 17:29 +0000, Zbigniew Jędrzejewski-Szmek wrote:
> > > On Tue, Apr 30, 2019 at 01:12:43PM -0400, Robert Marcano wrote:
> > > > On 4/30/19 11:45 AM, David Howells wrote:
> > > > > Hi,
> > > > > 
> > > > > I need to install a directory (/afs) that will be a mountpoint that a
> > > > > systemd
> > > > > service (also installed in the rpm) will mount upon.
> > 
> > I seem to remember you can't create root level directories from a
> > program either.
> 
> Of course you can. The program needs to run with root privileges. and
> not violate whatever SELinux or other "/" mountpoint restrictions
> exist.

What I'm referring to is (must have been) the selinux rules because
automount(8) needs to be run as root.

> 
> It's a *Bad Idea(tm), since it violates the File System Hierarchy, but
> that hardly makes it impossible.

That's debatable but I'm not going to argue about it, but do disagree
with this for the case of long time existing system services such as
autofs.

> 
> > So the user needs to create these directories manually!
> > 
> > That problem hasn't been reported for a while so this may have changed.
> > 
> > > 
> > > Nope. New top-level directories are a big thing and need FPC approval:
> > > 
> > 
> > 
https://fedoraproject.org/w/index.php?title=Packaging:Guidelines&oldid=528452#Filesystem_Layout
> > > (I can't find the text in the new guidelines, but the new guidelines don't
> > > support searching, so finding anything is PITA, so I'll just assume that
> > > this is still valid...)
> > 
> > That's a great idea.
> > 
> > So, as has been happening, I have to advise users that they must create
> > any mount point directories they need in / manually before starting autofs.
> 
> Or better yet, in /opt/ or /usr/local/ or /var/lib/ or whatever makes
> the most sense with the File System Hierarchy.

That imposes a restriction on the system administrator, although
/usr/local makes sense in some cases and is sometimes used, but
it depends on the file system names space the administrator wants
to use to get naming consistency while also keeping path names as
short as possible.

This actually makes quite a difference for sites that have a large
number of files and directories in their automount mount trees.

> 
> > It's this sort of policy that makes me want to close bugs for this without
> > any explanation of why the problem occurs!
> > > Regarding the FPC approval: I don't think it should be granted. There
> > > is no good reason to create a mount point like this under root. It should
> > > go
> > > somewhere under /run or /var.
> > 
> > Rubbish, the package is following long standing conventions, there's no
> > good reason to prevent this and, while it may be possible in this case,
> > it's not always possible to know what directory (or directories) will
> > need to be created therefore it's not possible to seek approval.
> 
> \And violating a much more important, namely the File System Hiearchy.
> If you can find a good reason to violate that, publish your reasoning.
> 
> By the way, I've dealt with /afs style automounting before, and it was
> a nightmare to clean up after when it inevitably croaked precisely due
> to the root filesystem location of "/afs".

Yes, there can problems from time to time with automounting.

autofs has a command line option to clear out all existing mounts
at startup so you can start over but it's not exactly straight
forward to use now we use systemd (at least I'm not aware of a
way to add custom actions to units).

Ian
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux