Richard W.M. Jones
2015-Feb-03 19:34 UTC
Re: [Libguestfs] make install ignoring PREFIX for bash_completion
> 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/fcbfc4775fa2a44020974073594a745ca420d614 > > 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
AP
2015-Feb-03 20:26 UTC
Re: [Libguestfs] 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/fcbfc4775fa2a44020974073594a745ca420d614 >> >> 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'.Ah I see what is going on now. Interestingly I had this somehow working with 1.27.49. I unfortunately did not keep detailed notes.> 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?I think I will be able to install the python library in the venv using the tarball. However, won't my liguestfs application require some of the binaries installed as part of 'make install' for running? I am trying to not have libguestfs installed outside of the venv. Thanks, Aravindh
Richard W.M. Jones
2015-Feb-03 20:55 UTC
Re: [Libguestfs] make install ignoring PREFIX for bash_completion
> > After using 'python sdist', can't you use the tarball (in python/dist) > > in order to create a venv directly? > > I think I will be able to install the python library in the venv using > the tarball. However, won't my liguestfs application require some of > the binaries installed as part of 'make install' for running? I am > trying to not have libguestfs installed outside of the venv.Yes, it'll require only the following files and directory (using their normal install location): /usr/lib64/libguestfs.so.0 -> libguestfs.so.0.<N>.0 /usr/lib64/libguestfs.so.0.<N>.0 /usr/lib64/guestfs/supermin.d You can move these files/directory anywhere you want. You will need to set the environment variables `LD_LIBRARY_PATH' so that the shared library is found, and `LIBGUESTFS_PATH' so that the supermin.d directory can be found (you have to set LIBGUESTFS_PATH to the *parent* directory of supermin.d). If you look at the 'run' script which is created in the top level source directory you can see some of the many environment variables that may be set and how they are used. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW