Package Details: libguestfs 1.40.2-1

Git Clone URL: https://aur.archlinux.org/libguestfs.git (read-only, click to copy)
Package Base: libguestfs
Description: Access and modify virtual machine disk image
Upstream URL: http://libguestfs.org
Licenses: GPL2, LGPL2.1
Provides: guestfish=1.40.2
Submitter: thatch45
Maintainer: skalkoto
Last Packager: skalkoto
Votes: 94
Popularity: 0.92
First Submitted: 2010-12-13 04:01
Last Updated: 2019-03-08 22:25

Latest Comments

1 2 3 4 5 6 ... Next › Last »

skalkoto commented on 2020-01-17 15:37

I'll be off for the next days. I'll check both suggestions next week. Sorry for the delay.

rwmjones commented on 2020-01-16 16:34

This line shouldn't be needed:

+  install -D -m 644 -t "$pkgdir"/usr/lib/guestfs/ "$srcdir"/appliance/{kernel,initrd,root,README.fixed}

What happens on Fedora and Debian is that $LIBDIR/guestfs/supermin.d/ is added to the distro package. This contains a supermin appliance (essentially a skeleton appliance) which is very small. It gets instantiated automatically at runtime on the end users system.

$ du -sh /usr/lib64/guestfs/supermin.d/
2.2M    /usr/lib64/guestfs/supermin.d/

CyberShadow commented on 2020-01-16 15:39

@starkers Kindly read https://wiki.archlinux.org/index.php/Arch_User_Repository (esp. the note in the "Prerequisites" section).

starkers commented on 2020-01-16 15:37

you are missing some build deps: bison flex

CyberShadow commented on 2020-01-16 12:53

Please kindly replace the clumsy update-libguestfs-appliance script with a PKGBUILD. As was suggested in 2018. Here is a PKGBUILD you can upload:

From 5f0587be8b441da26ceceef164bc5a07b8480f9b Mon Sep 17 00:00:00 2001
From: Vladimir Panteleev <git@thecybershadow.net>
Date: Thu, 16 Jan 2020 11:25:42 +0000
Subject: [PATCH] Initial commit

---
 .gitignore |  4 ++++
 LICENSE    |  5 +++++
 PKGBUILD   | 19 +++++++++++++++++++
 3 files changed, 28 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 LICENSE
 create mode 100644 PKGBUILD

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc37327
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg/
+/src/
+/appliance-*.tar.xz
+/libguestfs-appliance-*.pkg.tar.*
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..9f98476
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,5 @@
+This appliance contains software under a variety of open source
+licenses.  The software is from Fedora (<https://fedoraproject.org/>),
+and to rebuild it you need to download Fedora 17+ and
+libguestfs >= 1.17.10, and build libguestfs from source in the usual
+way.
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..a7e1621
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,19 @@
+# Maintainer: Nikos Skalkotos <skalkoto (at) Gmail.com>
+# Contributor: Vladimir Panteleev <arch-pkg at thecybershadow.net>
+
+pkgname=libguestfs-appliance
+pkgver=1.40.1
+pkgrel=1
+pkgdesc="Appliance files for libguestfs"
+arch=("any")
+url="<http://libguestfs.org>"
+license=("custom")
+options=()
+source=("<http://libguestfs.org/download/binaries/appliance/appliance>-${pkgver}.tar.xz"
+        "LICENSE")
+sha512sums=('2d63b2ce8850929b42ddc91518b0e2b37d13e358be94bb54899da6c310afa308d708a3443b9f3b3aa3c46f4f2079036a6a4b34027788f183c17a20b68fcf4e6e'
+            '2fdb2f55b94c9d52b112f5251adde4d42fbd420103f5317b84a956a66102188d0324cda181e1e25265a10f93ac4def20bb7c4f4248b621bab17d010923e34fac')
+package() {
+  install -D -m 644 -t "$pkgdir"/usr/lib/guestfs/ "$srcdir"/appliance/{kernel,initrd,root,README.fixed}
+  install -D -m 644 -t "$pkgdir"/usr/share/licenses/libguestfs-appliance/ "$srcdir"/LICENSE
+}
-- 
2.25.0

And here is a patch for this package to use it:

From f08ec84d7fb8c8e41a53919b900854d502c93b27 Mon Sep 17 00:00:00 2001
From: Vladimir Panteleev <git@thecybershadow.net>
Date: Thu, 16 Jan 2020 11:29:44 +0000
Subject: [PATCH] Replace update-libguestfs-appliance script with
 libguestfs-appliance package

---
 PKGBUILD                    | 13 +++------
 appliance.install           | 20 -------------
 update-libguestfs-appliance | 58 -------------------------------------
 3 files changed, 4 insertions(+), 87 deletions(-)
 delete mode 100644 appliance.install
 delete mode 100755 update-libguestfs-appliance

diff --git a/PKGBUILD b/PKGBUILD
index [`923436d`](https://aur.archlinux.org/cgit/aur.git/commit/?h=libguestfs&id=923436d)..d364b11 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,6 @@ backup=("etc/libguestfs-tools.conf"
         "etc/xdg/virt-builder/repos.d/libguestfs.conf"
    "etc/xdg/virt-builder/repos.d/libguestfs.gpg")
 # backup=("etc/libguestfs-tools.conf" "etc/php.d/guestfs_php.ini")
-install="appliance.install"
 _pythonver=2
 depends=("qemu-headless"
          "augeas"
@@ -27,7 +26,8 @@ depends=("qemu-headless"
          "file"
          "cpio"
          "wget"
-    "jansson")
+        "jansson"
+         "libguestfs-appliance")
 makedepends=("qemu-headless"
              "pcre"
              "cdrkit"
@@ -63,10 +63,8 @@ optdepends=("python${_pythonver}: Python bindings"
             "ocaml: Ocaml libs")
 provides=("guestfish=${pkgver}")
 options=()
-source=("<http://libguestfs.org/download/>${pkgver_short}-stable/${pkgname}-${pkgver}.tar.gz"
-        "update-libguestfs-appliance")
-sha512sums=('d288f15d5a70b4b87a4271ea2eb7dc0ec4f48fdb136b8f62003352a069f75573de873e1063763889f410fb1b99951252e9a48dd73bf0233047f21aae43ac6de2'
-            '6f695baf27927a7643b2b3f6a2497ca37e306b2e8640bd6025c49f1fc3b243a379b38ad6183acb099e9d762e5ab55b28bbdfab0c6dbd1d3fe748caa0846b1c5a')
+source=("<http://libguestfs.org/download/>${pkgver_short}-stable/${pkgname}-${pkgver}.tar.gz")
+sha512sums=('d288f15d5a70b4b87a4271ea2eb7dc0ec4f48fdb136b8f62003352a069f75573de873e1063763889f410fb1b99951252e9a48dd73bf0233047f21aae43ac6de2')

 check() {
     # test-lock fails, perhaps related to:
@@ -109,8 +107,5 @@ build() {
 package() {
   cd "${srcdir}/${pkgname}-${pkgver}"
   make DESTDIR="${pkgdir}" install
-
-  mkdir -p "$pkgdir/usr/lib/guestfs" "$pkgdir/var/cache/guestfs"
-  install -Dm755 "${srcdir}/update-libguestfs-appliance" "${pkgdir}/usr/bin/update-libguestfs-appliance"
 }

-- 
2.25.0

(and delete appliance.install and update-libguestfs-appliance).


Please observe how simpler the final result is.

Note that there is a large sparse file in the appliance. This is nothing to worry about, makepkg/pacman handle it correctly.

I understand @rwmjones suggests that there exists an even better way to improve this package. I'm not sure how to implement that suggestion myself, but perhaps they can provide a patch to apply instead of this one.

Thanks!

7thkQ33TNgk commented on 2019-12-31 13:19

If Downloading binary appliance ${VERSION} for libguestfs ... takes a long time, you can simply navigate to http://download.libguestfs.org/binaries/appliance/. Download the corresponding version and put it under /var/cache/guestfs.

skalkoto commented on 2019-12-11 15:11

@FFY00 yeah sure! Why not?

FFY00 commented on 2019-12-10 21:27

Are you ok if I move this to the official repos?

rwmjones commented on 2019-11-19 15:04

We added Arch (ie. pacman) support to supermin in 2014 so it shouldn't be necessary to use the prebuilt appliance at all.

mqs commented on 2019-11-19 14:54

Thank you for providing this package! I have a question: Why are the appliances downloaded on install-time rather than included as sources directly or downloaded in build/prepare/package?