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

Re: Installing files in user directories



On Thu, 22 Oct 1998, Steve Greenland wrote:

> > > In either case, get rid of the .bashrc. If root wants an example,
> > > there's always /etc/skel. Heck, if you want to copy dot.profile and
> > > dot.bashrc to /root, no problem. Just stop screwing with the files that
> > > are actually used!
> > 
> > Well, .bashrc is not just an example, it is now sourced by .profile :-)
> > This is more a reasonable default than an example.
> 
> No, it's not, because there is no reason for it to be in .bashrc.
> Instead, please put both those commands in .profile, where they belong,
> and get rid of the .bashrc.

I do not plan to get rid of .bashrc, because it contains example aliases.
aliases are better in .bashrc than in .profile, because they are not
inherited from one shell to another one.

> > I would be willing to modify base-files.postinst so that it install
> > dotfiles for root *only* when it is not being upgraded (i.e. when creating
> > the base system which is being shipped in base2_0.tgz).
> 
> I would like that. Hell, I'd settle for the postinst just *asking* if I
> want to write a .profile and .bashrc (on an upgrade).

No, policy says that asking should be avoided unless absolutely necessary.
(And we have already too many questions in upgrades).

If I have to ask the user about root's dotfiles, then I would better
modify base-files so that these files are only provided in base2_0.tgz.
(i.e. only when you are not "upgrading" the package).

> > But before that I would like to be sure that this new behaviour is
> > supported by all the policy people here, and that "reinstalling base-files
> > did not fix my PATH" should not be considered a bug anymore.
> 
> Obviously, I agree.

Ok.

> > Does the rule "reinstalling a package should be idempotent" apply to
> > base-files?
> 
> If that applies, then you should *always* overwrite the .profile, right?

No, because it is a configuration file. I was referring to the fact that
if something goes wrong (and not having a dotfile which ensures
that root has the proper PATH is "wrong" in some sense), reinstalling a
package should ideally fix the problem.

But I think you have a valid point here. If you decided to move the
setting of the PATH for root from dotfiles to /etc/profile, you should
have the right (and the freedom) to do so, and I don't think base-files
should force people to create empty dotfiles if they do not want to have
the default ones.

So unless somebody strongly objects and tells me that this is a really bad
idea, I will modify base-files so that it installs default dotfiles only
for the base system (base2_0.tgz), i.e. when it is not an "upgrade".

base-files will assume from now on that the user knows what he/she is
doing with root's dotfiles and will not try to be more clever than
the user.

We have to take in account also that:

1) If all the dotfiles disappear from /root, the default PATH will be then
the one in /etc/profile, which is supposed to be sensible enough, it may
be not suitable for root, but it is not a security risk, after all.

2) The default dotfiles will be still available in /usr/share/base-files.
If somebody loses his dotfiles and wants the default ones again,
he/she will be able to copy them from that directory. If needed, I will
document this in /usr/doc/base-files/README.

Thanks.

-- 
 "00df38a60d65b6024086095137a36e4f" (a truly random sig)


Reply to: