Date: Tue, 3 Feb 2015 09:36:01 -0800
Subject: make install ignoring PREFIX for bash_completion
I am trying to install the libguestfs python bindings in my
virtualenv. Since this cannot be done through PIP,
The PIP problem is
https://bugzilla.redhat.com/show_bug.cgi?id=1075594
Unfortunately we are stuck here because the pypi website still has a
license that we cannot live with (it would have the effect of
assigning all work we upload to them). They have said this is not
their intention, but declined to do anything about the actual wording.
I was trying to do
the following:
https://github.com/libguestfs/libguestfs/commit/fcbfc4775fa2a440209740735...
To get to building the python dist, I did the following:
git clone
https://github.com/libguestfs/libguestfs.git
git checkout 1.28.5
./autogen.sh --disable-php --disable-ruby --disable-gobject
--disable-golang --disable-erlang --disable-lua
--prefix=/home/dev/venv
make
rm po-docs/podfiles; make -C po-docs update-po
make
make -C python sdist
make install
However at the "make install" step, I get the following error:
make[2]: Entering directory '/home/dev/libguestfs/bash'
make[2]: Nothing to be done for 'install-exec-am'.
/bin/mkdir -p /usr/share/bash-completion/completions
cp -d guestfish guestmount virt-alignment-scan virt-rescue virt-resize
virt-builder virt-cat virt-df virt-edit virt-filesystems virt-format
virt-inspector virt-log virt-ls virt-sparsify virt-sysprep
/usr/share/bash-completion/completions
cp: cannot create regular file
'/usr/share/bash-completion/completions/guestfish': Permission denied
cp: cannot create regular file
'/usr/share/bash-completion/completions/guestmount': Permission denied
cp: cannot create regular file
'/usr/share/bash-completion/completions/virt-alignment-scan':
Permission denied
cp: cannot create regular file
'/usr/share/bash-completion/completions/virt-rescue': Permission
denied
cp: cannot create regular file
'/usr/share/bash-completion/completions/virt-resize': Permission
denied
cp: cannot remove
'/usr/share/bash-completion/completions/virt-builder': Permission
denied
cp: cannot remove '/usr/share/bash-completion/completions/virt-cat':
Permission denied
cp: cannot remove '/usr/share/bash-completion/completions/virt-df':
Permission denied
cp: cannot remove '/usr/share/bash-completion/completions/virt-edit':
Permission denied
cp: cannot remove
'/usr/share/bash-completion/completions/virt-filesystems': Permission
denied
cp: cannot remove
'/usr/share/bash-completion/completions/virt-format': Permission
denied
cp: cannot remove
'/usr/share/bash-completion/completions/virt-inspector': Permission
denied
cp: cannot remove '/usr/share/bash-completion/completions/virt-log':
Permission denied
cp: cannot remove '/usr/share/bash-completion/completions/virt-ls':
Permission denied
cp: cannot remove
'/usr/share/bash-completion/completions/virt-sparsify': Permission
denied
cp: cannot remove
'/usr/share/bash-completion/completions/virt-sysprep': Permission
denied
Makefile:1671: recipe for target 'install-data-local' failed
make[2]: *** [install-data-local] Error 1
Why is the install process trying to copy files in to /usr/share/ and
not /home/dev/venv/usr/share/? Am I doing something wrong or is there
a workaround for this?
After trying './configure --prefix=/tmp && make && make install' I
see
there's a disturbingly large number of problems/bugs in this area ...
The configure script only uses --prefix so far, but frequently
overrides it. eg: OCaml scripts are always installed in
`ocamlc -where' and in the case above bash-completion scripts are
always installed in `pkg-config --variable=completionsdir bash-completion'.
I guess whether you think this is a bug or a feature depends on your
point of view ...
After using 'python sdist', can't you use the tarball (in python/dist)
in order to create a venv directly?
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html