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

> > 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.
> But it is quite likely that most of packaged software allows it today and
> no patching is required for them.
> > (I don't know how many there are.)
> Marc Espie says:
> "You just need to tweak the install process so that stuff goes into
> fake/usr/local/bin instead of /usr/local/bin, for instance. In many modern
> software, you just need to set DESTDIR=fake. In other cases, this is a bit

I understand it perfectly. I have had the opportunity to build
several hundreds of software suites from source. And I have packages well
over a hundred packages. And I have helped update many more. And in most
cases (such as those using automake/autoconf) nothing needs to be fixed.

> > > $ 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?
> You mean the implementation? It just called chown() syscall, which was
> intercepted by fakeroot.

I mean: how did the end result work? (But you answer it below.)

> > Please run "id" here.
> $ fakeroot
> bash-2.05a# id
> uid=0(root) gid=0(root) groups=100(users)

As far as I can tell, the chown in your example made no sense. The files
were already owned as root:root (when you did mkdir and touch).

Can you do the fakeroot again doing the steps as a non-root user and show
the ls -l and tar listing again?


 Jeremy C. Reed

 	  	 	 technical support & remote administration