Note: typing this out a second time due to backspace taking me back. Hit forward and it was all gone. If I'm missing a part of this then that is why.
What is libguestfs? From their homepage:
libguestfs is a set of tools for accessing and modifying virtual machine (VM) disk images. You can use this for viewing and editing files inside guests, scripting changes to VMs, monitoring disk used/free statistics, creating guests, P2V, V2V, performing backups, cloning VMs, building VMs, formatting disks, resizing disks, and much more.
I went down the rabbit hole of building packages from git, finding a dependency or error, tracking it down, building from git, and so on.
So, building libguestfs from git. There may be a few packages that I missed because of the stupid backspace navigation.
git clone https://github.com/libguestfs/libguestfs cd libguestfs ./autogen.sh
I have ncurses and ncurses-devel installed (and the 32 bit versions just in case) but it does not see them.
configure:56483: checking for tinfo configure:56490: $PKG_CONFIG --exists --print-errors "tinfo" Package tinfo was not found in the pkg-config search path. Perhaps you should add the directory containing `tinfo.pc' to the PKG_CONFIG_PATH environment variable No package 'tinfo' found configure:56493: $? = 1 configure:56507: $PKG_CONFIG --exists --print-errors "tinfo" Package tinfo was not found in the pkg-config search path. Perhaps you should add the directory containing `tinfo.pc' to the PKG_CONFIG_PATH environment variable No package 'tinfo' found configure:56510: $? = 1 configure:56524: result: no No package 'tinfo' found configure:56543: checking for ncurses configure:56550: $PKG_CONFIG --exists --print-errors "ncurses" Package ncurses was not found in the pkg-config search path. Perhaps you should add the directory containing `ncurses.pc' to the PKG_CONFIG_PATH environment variable No package 'ncurses' found configure:56553: $? = 1 configure:56567: $PKG_CONFIG --exists --print-errors "ncurses" Package ncurses was not found in the pkg-config search path. Perhaps you should add the directory containing `ncurses.pc' to the PKG_CONFIG_PATH environment variable No package 'ncurses' found configure:56570: $? = 1 configure:56584: result: no No package 'ncurses' found configure:56605: checking for ncurses6-config configure:56635: result: no configure:56605: checking for ncurses5-config configure:56635: result: no configure:56646: error: ncurses development package is not installed
And it worked
checking for tinfo... no checking for ncurses... no checking for ncurses6-config... /usr/bin/ncursesw5-config
Depends augeas which I built, but then I needed to set the environment variables. Not really sure which one of the exports did the trick though.
export AUGEAS_CFLAGS=/home/user/augeas/ export AUGEAS_LIBS=/home/user/augeas/src/.libs/
depended on yajl which was installed, so I installed yajl-devel and just did
There were a few warning and failed on supermin
configure: WARNING: FUSE library and headers are missing, so optional FUSE module won't be built configure: WARNING: POSIX acl library not found configure: WARNING: hivex not found, some core features will be disabled configure: WARNING: The Sleuth Kit library (libtsk) not found configure: WARNING: Yara library not found configure: error: supermin >= 5.1 must be installed
acl-devel and fuse-devel was in the software center, so I installed those, but nothing else is.
git clone of hivex, required ocaml which was in software center but quite large at 221MB
git clone of supermin required ocaml-findlib (or lib-findlib now). lib-findlib was easy to build from git. Then it required ext2fs (e2fsprogs-devel in software center).
git clone of yara built with no issues
git clone of sleuthkit built with no issues
Now libguestfs made it past
But then failed on make
In file included from augeas.c:26:0: /usr/local/include/augeas.h:24:25: fatal error: libxml/tree.h: No such file or directory #include <libxml/tree.h>
I found this command for a workaround from here: https://bugzilla.redhat.com/show_bug.cgi?id=1087607
sudo ln -s /usr/include/libxml2/libxml/ /usr/include/libxml
gcc: warning: /home/user/augeas/: linker input file unused because linking not done CCLD guestfsd /home/user/augeas/: file not recognized: Is a directory collect2: error: ld returned 1 exit status make: *** [Makefile:2039: guestfsd] Error 1 make: Leaving directory '/home/user/libguestfs/daemon' make: *** [Makefile:1944: all] Error 2 make: Leaving directory '/home/user/libguestfs/daemon' make: *** [Makefile:1959: all-recursive] Error 1 make: Leaving directory '/home/user/libguestfs' make: *** [Makefile:1868: all] Error 2
Unfortunately, this is as far as my knowledge takes me. I'd love to be able to resize my VM, and qemu's tool will not let me.
Sources that I needed to build: