Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 302614

Summary: new ebuild app-emulation/libguestfs
Product: Gentoo Linux Reporter: Andreis Vinogradovs ( slepnoga ) <andreis.vinogradovs>
Component: New packagesAssignee: Maxim Koltsov (RETIRED) <maksbotan>
Status: RESOLVED FIXED    
Severity: normal CC: cassio, jinxinzheng, nikoli, rich, tais.hansen
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://libguestfs.org
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 342217, 342389, 342391, 342401, 346753    
Bug Blocks:    
Attachments: libguestfs-1.5.21.ebuil
disable-debootstrap-configure.ac.patch
libguestfs-1.5.26.ebuild
Patch, that fixes automagic (not completely ready though)
Patch that completely removes automagic.
Experimental ebuild for libguestfs-1.7.1
libguestfs-1.7.3.ebuild
1.7.3.patch
libguestfs-1.7.12.ebuild
remove-root-check.patch
libguestfs-1.7.13.ebuild
libguestfs-1.7.19.ebuild
libguestfs-1.8.7
/libguestfs-1.10.3
1.8/disable_php_in_makefile.patch
1.8/configure.ac_all.patch
1.10/configure.ac_all.patch
1.10/disable_php_in_makefile.patch
libguestfs-1.8.13.ebuild

Description Andreis Vinogradovs ( slepnoga ) 2010-01-28 11:57:54 UTC
libguestfs is a library for accessing and modifying virtual machine (VM) disk images. Amongst the things this is good for: making batch configuration changes to guests, viewing and editing files inside guests, getting disk used/free statistics, migrating between virtualization systems, performing partial backups, performing partial guest clones, cloning VMs and changing registry/UUID/hostname info, and much else besides.

libguestfs can access any type of filesystem including but not limited to: ext2/3/4, btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow2, vmdk.
libguestfs is a library that can be linked with C and C++ management programs and has bindings for OCaml, Perl, Python, Ruby, Java, Haskell and C#. You can also use it from shell scripts or the command line. With FUSE support you can also mount guest filesystems on the host .

Please, create ebuild for libguestfs

Reproducible: Always

Steps to Reproduce:
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2010-02-04 22:02:33 UTC
Its much more than a library. Its an actual "appliance" device. It will require to build a mini version of your distro and booting that inside of qemu and then it attaches the disk image inside of it. Inside the distro image it has a little daemon that listens for requests from the host system's guestfs speaking applications.

Its got a GIANT dependency list and will be quite involved to build.
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2010-02-04 22:03:03 UTC
http://libguestfs.org/FAQ.html#distros
Comment 3 Jinxin Zheng 2010-09-14 10:52:14 UTC
I found a libguestfs ebuild at the rion overlay:

http://gpo.zugaina.org/app-emulation/libguestfs

I tried to emerge it, seems broken though...
It depends on fakechroot, febootstrap, rpm and yum. So I guess this ebuild will require rpm packages from the redhat distros like fedora. I do not think it's a good approach...

However, it'll be really great to get libguestfs emerged in gentoo. Waiting for update to this request..
Comment 4 Richard Jones 2010-09-14 11:10:32 UTC
This might be of interest to packagers:

http://libguestfs.org/download/binaries/REUSING-THE-APPLIANCE.txt

Of course this means using the binary blob that we supply (basically
it's a Fedora-based appliance).  However this is way easier than any
other build method.

An ebuild-based method would require someone from Gentoo to
write an appliance builder similar to debirf or febootstrap, and this
is no simple task.
Comment 5 Andreis Vinogradovs ( slepnoga ) 2010-10-18 16:09:34 UTC
(In reply to comment #3)
> I found a libguestfs ebuild at the rion overlay:
> 
> http://gpo.zugaina.org/app-emulation/libguestfs
> 
> I tried to emerge it, seems broken though...
> It depends on fakechroot, febootstrap, rpm and yum. So I guess this ebuild will
> require rpm packages from the redhat distros like fedora. I do not think it's a
> good approach...
> 
> However, it'll be really great to get libguestfs emerged in gentoo. Waiting for
> update to this request..
> 
zugaina collect all overlay. This ebuild in rion overlay and mantained by me.
I have not come up with ways to install it :(
Comment 6 Andreis Vinogradovs ( slepnoga ) 2010-10-22 17:24:04 UTC
Created attachment 251619 [details]
libguestfs-1.5.21.ebuil

Very small and experimental ebuild
Comment 7 Andreis Vinogradovs ( slepnoga ) 2010-10-22 17:24:45 UTC
Created attachment 251621 [details]
disable-debootstrap-configure.ac.patch
Comment 8 Richard Jones 2010-10-22 17:41:25 UTC
Comment 6 ebuild looks good to me.

Comment 7 is really an upstream bug, you shouldn't need that
patch.  I have noted it here:
https://bugzilla.redhat.com/show_bug.cgi?id=645869
Comment 9 Richard Jones 2010-10-22 17:43:40 UTC
Gentoo maintainers should be aware of this moderate CVE
which affects libguestfs <= 1.5.21:

https://www.redhat.com/archives/libguestfs/2010-October/msg00036.html
CVE-2010-3851 libguestfs: missing disk format specifier when adding a disk

A patch to fix this is done (we are still testing it) and will
be in 1.5.22.
Comment 10 Andreis Vinogradovs ( slepnoga ) 2010-10-31 20:28:35 UTC
Comment on attachment 251621 [details]
disable-debootstrap-configure.ac.patch

upstream fix this bug, 
see 
https://bugzilla.redhat.com/show_bug.cgi?id=645869#c1
Comment 11 Andreis Vinogradovs ( slepnoga ) 2010-10-31 20:30:55 UTC
Created attachment 252713 [details]
libguestfs-1.5.26.ebuild
Comment 12 Maxim Koltsov (RETIRED) gentoo-dev 2010-10-31 20:33:06 UTC
Created attachment 252715 [details, diff]
Patch, that fixes automagic (not completely ready though)
Comment 13 Maxim Koltsov (RETIRED) gentoo-dev 2010-11-07 16:07:53 UTC
Created attachment 253533 [details, diff]
Patch that completely removes automagic.

After three days of hard work i've done this. Hope it's no errors.
Comment 14 Maxim Koltsov (RETIRED) gentoo-dev 2010-11-07 16:09:38 UTC
Created attachment 253535 [details]
Experimental ebuild for libguestfs-1.7.1

Ebuild for libguestfs-1.7.1. dev-perl/Sys-Virt and dev-ml/xml-light are in 'rion' overlay (available in layman)
Comment 15 Maxim Koltsov (RETIRED) gentoo-dev 2010-11-07 17:32:10 UTC
Patch in previous comment is example, please look at this place for updates: http://code.google.com/p/slepnoga/source/browse/#hg/portage/app-emulation/libguestfs
Comment 16 Richard Jones 2010-11-08 15:20:27 UTC
Maxim, I have converted your patch in comment 13 and pushed it
upstream.

http://git.annexia.org/?p=libguestfs.git;a=summary

There are some differences from your patch however:

(1) The options have the opposite sense (--disable-<feature>):

  --disable-fuse          Disable FUSE (guestmount) support
  --disable-ocaml         Disable OCaml language bindings
  --disable-perl          Disable Perl language bindings
  --disable-python        Disable Python language bindings
  --disable-ruby          Disable Ruby language bindings
  --disable-haskell       Disable Haskell language bindings
  --disable-php           Disable PHP language bindings

(2) If you specify --enable-<feature> then it auto-detects the
feature and will not be fatal if the feature is not present.  So
this is slightly different from what you did where you changed
the feature detection to fail if the feature was not found.

(3) I did not implement --disable-inspector nor --disable-tools.
That is because we will probably rewrite some of these tools in
another language (ie. not Perl) soon, so this will all change.

(4) I did not change po4a handling, but did make your change to
po-docs/ja/Makefile.am so it should work if po4a is not available.

libguestfs 1.7.3 will include all of these changes, plus the missing
generated files, so I hope that it will be suitable for Gentoo.
However if there is anything which is still missing / not working
in 1.7.3 then let me know.
Comment 17 Andreis Vinogradovs ( slepnoga ) 2010-11-09 09:13:43 UTC
Created attachment 253719 [details]
libguestfs-1.7.3.ebuild
Comment 18 Andreis Vinogradovs ( slepnoga ) 2010-11-09 09:14:15 UTC
Created attachment 253721 [details, diff]
1.7.3.patch
Comment 19 Andreis Vinogradovs ( slepnoga ) 2010-11-24 23:53:36 UTC
Created attachment 255373 [details]
libguestfs-1.7.12.ebuild
Comment 20 Andreis Vinogradovs ( slepnoga ) 2010-11-24 23:54:18 UTC
Created attachment 255375 [details, diff]
remove-root-check.patch
Comment 21 Andreis Vinogradovs ( slepnoga ) 2010-11-25 12:03:56 UTC
Created attachment 255397 [details]
libguestfs-1.7.13.ebuild
Comment 22 Richard Jones 2010-12-08 20:45:22 UTC
This might be interesting ...  I have changed the way the
appliance is built (simplified it in fact), so that now
all that is needed are a few simple package manager
operations in order to build a supermin appliance on any
distro.

Unfortunately it is focused currently on binary distributions
(we have written back ends for Fedora, Debian/Ubuntu and ArchLinux
so far).  But it may be possible to adapt these for source distros
like Gentoo.

https://www.redhat.com/archives/libguestfs/2010-December/msg00012.html

https://www.redhat.com/archives/libguestfs/2010-December/msg00015.html
Comment 23 Andreis Vinogradovs ( slepnoga ) 2011-02-13 20:54:56 UTC
#346753 block to build aplance - yum not work correctly
Comment 24 Andreis Vinogradovs ( slepnoga ) 2011-02-13 20:58:08 UTC
Created attachment 262383 [details]
libguestfs-1.7.19.ebuild

I use  1.7.19 version more than 2 months
Comment 25 Andreis Vinogradovs ( slepnoga ) 2011-06-01 10:42:04 UTC
Created attachment 275455 [details]
libguestfs-1.8.7
Comment 26 Andreis Vinogradovs ( slepnoga ) 2011-06-01 10:42:21 UTC
Created attachment 275457 [details]
/libguestfs-1.10.3
Comment 27 Andreis Vinogradovs ( slepnoga ) 2011-06-01 10:42:42 UTC
Created attachment 275459 [details]
1.8/disable_php_in_makefile.patch
Comment 28 Andreis Vinogradovs ( slepnoga ) 2011-06-01 10:43:01 UTC
Created attachment 275461 [details]
1.8/configure.ac_all.patch
Comment 29 Andreis Vinogradovs ( slepnoga ) 2011-06-01 10:43:20 UTC
Created attachment 275463 [details]
1.10/configure.ac_all.patch
Comment 30 Andreis Vinogradovs ( slepnoga ) 2011-06-01 10:43:36 UTC
Created attachment 275465 [details]
1.10/disable_php_in_makefile.patch
Comment 31 Andreis Vinogradovs ( slepnoga ) 2011-11-06 20:47:23 UTC
Created attachment 291839 [details]
libguestfs-1.8.13.ebuild
Comment 32 Maxim Koltsov (RETIRED) gentoo-dev 2011-12-11 19:33:43 UTC
1.8.15 version finally added to tree with hard mask. Thanks.