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

Re: [Libguestfs] Building from source with custom gperf location

On Sun, May 02, 2021 at 02:23:55PM +0100, Lewis Gaul wrote:
> Thanks, once again that seems to have got me past that problem,

Do you have a patch for this one?

> only
> for a new one to crop up (this time hivex, which I'm not sure how to
> build or why it's required on Linux). I take it this isn't really an
> expected workflow, trying to get the package to build without being
> able to use a package manager to install the dependencies?

Hivex is needed to inspect and edit Windows registries, and is a
required dependency nowadays.  It's also only a small C library and is
available in most distros.

> Searching the output from ./configure, I can't yet see any mention
> of quite a few of the other dependencies listed
> at https://libguestfs.org/ guestfs-building.1.html that may be
> problematic, so I'm wondering if it's time to throw in the towel for
> this approach.
> All I'm looking for really is a way to programmatically edit a
> single file in a qcow2 VM image (which I planned to achieve with
> virt-edit) - is there an easier way to do this? Does virt-edit alone
> require all these dependencies, or would there be a way to build
> just virt-edit without pulling apart the build system?

> Alternatively, would it be possible/easier to build a static virt-edit binary
> in a CentOS 7 VM that could simply be copied onto this RHEL 7 machine?
> I appreciate your help so far and any further suggestions you might have!

RHEL 7 has libguestfs already.  You don't have root access, but it
should be possible to download what you need as RPMs, unpack them, and
run libguestfs from your home directory.  Something like this:

$ yumdownloader libguestfs
libguestfs-1.40.2-5.el7.x86_64.rpm                         | 2.4 MB   00:01

$ yumdownloader libguestfs-tools-c

$ rpm2cpio libguestfs-1.40.2-5.el7.x86_64.rpm | cpio -id
$ rpm2cpio libguestfs-tools-c-1.40.2-5.el7.x86_64.rpm | cpio -id

$ cd usr/bin/
$ LIBGUESTFS_PATH=$PWD/../lib64/guestfs LD_LIBRARY_PATH=../lib64 ./libguestfs-test-tool 

You might also need to download other dependencies as RPMs and unpack
those in the same way (supermin, hivex, etc)

Or ask for root to install the package(!)


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.

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