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

Re: [Libguestfs] installing appears broken by 199f218bf431b77c12a728f7072bed1553a0f0af



On Sat, Oct 23, 2010 at 11:23:41PM +0100, Nix wrote:
> The intent of commit 199f218bf431b77c12a728f7072bed1553a0f0af seems
> praiseworthy, but since 'all-am' is automatically added by Automake as a
> prerequisite of the 'install' target, its effect is to stop people
> running 'make install' as root:
> 
> make  install-am
> make[2]: Entering directory `/usr/src/libguestfs/x86_64-spindle/src'
> make -C ../generator stamp-generator
> make[3]: Entering directory `/usr/src/libguestfs/x86_64-spindle/generator'
> make[3]: `stamp-generator' is up to date.
> make[3]: Leaving directory `/usr/src/libguestfs/x86_64-spindle/generator'
> *** Error: Don't run 'make' or 'make check' as root.
> make[2]: *** [checkroot] Error 1
> make[2]: Leaving directory `/usr/src/libguestfs/x86_64-spindle/src'
> make[1]: *** [install] Error 2
> make[1]: Leaving directory `/usr/src/libguestfs/x86_64-spindle/src'
> make: *** [install-recursive] Error 1
> 
> 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).

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

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

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

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top


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