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

Re: Installing files in user directories



On Wed, 21 Oct 1998, Steve Greenland wrote:

> Here are some problems with the current "solution":
> 
> 1. Who said that root's home dir is /root?

The /etc/passwd file as provided by base-passwd. If you modify root's home
dir, you break the base-passwd package, since root is a user who belong
to the system, not to you.

> 2. If I deleted my .profile and .bash_profile and (whatever) from
>    ~root, that's what I wanted to do. I don't want them replaced.

I fail to see why you want to break your system in that way.

As I said before, some time ago I received a bug report from someone who
lost his .bash_profile file, and he said that installing base-files again
did not help in fixing the PATH. Policy says that reinstalling a package
should be "idempotent" so that this type of bug may be easily fixed by
simply reinstalling the package.

You seem to be the only one who wants to remove all your root dotfiles.
There is an easy workaround for you: Just create empty files and they will
not be replaced at all.

> 3. There way more ways for root to screw things up. This is a pretty
>    limited fix. I suspect it's far more like for the novice user
>    to screw up his/her .profile in vi than to rm it completely.

Well, I encountered a user that removed it completely. 

> Here's what I'd like to see:
> 
> 1. Put root's PATH and "umask 022" in /etc/profile, where it belongs.

I think that root's PATH is special and belong to root's dotfiles, not to
/etc/profile.

> or 
> 
> 2. Provide some sort of prompting *before* you copy the default .profile
> (and only if none of the potential startup files are there, either by
> hand or via the conffile mechanism (better).

No, the conffile mechanism is *not* better in this case, because if you
have no file, dpkg thinks that you do not want *any* file, which is not
what one would normally want, because then we have the PATH problem, 
that's why these dotfiles are not conffiles anymore.

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


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).

[ Maybe this is the best solution, I agree ].

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.

Does the rule "reinstalling a package should be idempotent" apply to
base-files?

-- 
 "566100428febf3fbaeae13c676b98e06" (a truly random sig)


Reply to: