Subject: Re: "make install" owerwrites files without asking
To: Pavel Cahyna <>
From: Jeremy C. Reed <>
List: tech-pkg
Date: 06/30/2005 09:20:48
On Thu, 30 Jun 2005, Pavel Cahyna wrote:

> > > It seems that the other idea requires providing shell wrappers for
> > > install, cp, chown/chmod, pax and other utilities, am I right? This seems
> > > to be a lot of work.
> >
> > Yes, I do agree it is a lot of work. Nevertheless, they must be wrapped in
> > one way or another if we are to make them do staged installs too -- in the
> > case that many don't allow changing destination directory after the build
> > is completed just for the install step.
> Are there really many of them? I don't believe Debian or OpenBSD does
> this. I think they rather patch the packages to allow setting the
> destination directory.

If you have to patch it to do allow setting the destination directory,
then there should be little difference in patching it to use the INSTALL_*
scripts at the same time.

(I don't know how many there are.)

> > That reminds me. Does fakeroot help at all with making a package that
> > properly has ownership, groups, permissions for extraction on another box?
> It seem that it can, if the pkg_create command runs under the same
> fakeroot environment. As an example, I tried creating a tar file with some
> setuid program as a regular user:
> $ fakeroot
> bash-2.05a# mkdir fakeroot
> bash-2.05a# chown root:root fakeroot
> bash-2.05a# cd fakeroot
> bash-2.05a# touch login
> bash-2.05a# chown root:root login
> bash-2.05a# chmod 4555 login
> bash-2.05a# ls -l login
> -r-sr-xr-x    1 root     root            0 Jun 30 18:05 login

I will have to try this myself. How did the chown work?

Please run "id" here.

> bash-2.05a# cd ..
> bash-2.05a# tar cf - fakeroot | tar tvf -
> drwxr-xr-x root/root         0 2005-06-30 18:05:11 fakeroot/
> -r-sr-xr-x root/root         0 2005-06-30 18:05:11 fakeroot/login

 Jeremy C. Reed

 	  	 	 technical support & remote administration