[Libguestfs] installing appears broken by 199f218bf431b77c12a728f7072bed1553a0f0af

Nix nix at esperi.org.uk
Sun Oct 24 13:12:12 UTC 2010


On 24 Oct 2010, Richard W. M. Jones stated:
> On Sat, Oct 23, 2010 at 11:23:41PM +0100, Nix wrote:
>> This seems... counterintuitive. Was that really the intent of this
>> change?
>
> The intent is to stop anyone running 'make all' as root.  People used
> to see "permission error" from febootstrap and think that meant they
> had to run the build as root (which you must *not* do and is actively
> dangerous).

Plainly. "What do you mean my OS was partly overwritten by the
appliance?"

> What I don't understand is why 'make install' is running the all-local
> rule.

install: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) install-am

install-am: all-am

all-am: Makefile $(LTLIBRARIES) $(MANS) $(HEADERS) all-local

*wham*

This dependency is hardwired: see automake-1.11/lib/am/install.am, line
71 or thereabouts.

>> (And how did nobody notice it? I'm using Automake 1.11.1, but Automake
>> has done this for a long, long time.)
>
> I guess we never run 'make install' as root.  I use libguestfs from
> the build directory, or build it in RPM (which does
> 'make install DESTDIR=...' as non-root).  See the various */run*local
> scripts.

Exactly what I thought. I keep on meaning to rejig my autobuilder to do
a fakeroot install, but it's sufficiently annoying to translate the
permission state on these into *real* root installs (thanks to the inode
number hell, and the different downsides of recording filenames in
fakeroot.log instead) that I haven't done so yet.

> Thanks for the report, do you have a suggested patch which just stops
> people doing make all/check as root?

I think your suggestion of checking at appliance make/update stage is
better. After all, this is what actually does the damage.

I'll whip something up for that soon.




More information about the Libguestfs mailing list