From patchwork Fri Oct 16 20:00:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Morgan Smith X-Patchwork-Id: 24655 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9C01127BBF1; Fri, 16 Oct 2020 21:02:39 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A067427BBEE for ; Fri, 16 Oct 2020 21:02:38 +0100 (BST) Received: from localhost ([::1]:50934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTVvx-0007EI-LL for patchwork@mira.cbaines.net; Fri, 16 Oct 2020 16:02:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTVvQ-0007Df-Do for guix-patches@gnu.org; Fri, 16 Oct 2020 16:02:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49422) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kTVvO-0004sY-GW for guix-patches@gnu.org; Fri, 16 Oct 2020 16:02:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kTVvO-0005QY-El for guix-patches@gnu.org; Fri, 16 Oct 2020 16:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44040] [PATCH 2/2] gnu: Add libguestfs. Resent-From: Morgan.J.Smith@outlook.com Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 16 Oct 2020 20:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44040 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 44040@debbugs.gnu.org Cc: Morgan Smith Received: via spool by 44040-submit@debbugs.gnu.org id=B44040.160287851520839 (code B ref 44040); Fri, 16 Oct 2020 20:02:02 +0000 Received: (at 44040) by debbugs.gnu.org; 16 Oct 2020 20:01:55 +0000 Received: from localhost ([127.0.0.1]:60967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTVvH-0005Q2-AY for submit@debbugs.gnu.org; Fri, 16 Oct 2020 16:01:55 -0400 Received: from mail-bn8nam11olkn2022.outbound.protection.outlook.com ([40.92.20.22]:48300 helo=NAM11-BN8-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTVvF-0005Pm-Va for 44040@debbugs.gnu.org; Fri, 16 Oct 2020 16:01:54 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X5ymxPHPhFMi2gy37zEwnwOpR781txKfBSeLDFm8jjJp+zTz7aMRugVXnprZEG74h+1s7OBoKKk7XvgVZnTrqoGMhWH1MTbwd9+//LLFakX5Jze5eJhDToqElF1V2s9m00Iqy7WddTsM4ze+rFFLEPWX9k2njI+sGBDH1ilTWGgZIZuojrlwi9WK47B1iQ9exIl7s0nKWuGiJYW3W6l/RKePtUHtYpOZ6WBFUSH1b3ZtPylk7b1IuHMH49/S/3KSYXKJAvg3cBvD59OotOL6bBgW85BsrvXWig3UkJU97DqTNsNSHhWcDO567uJ0uWCqW2w0FDs8okNhK6Vl4msqYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CyEIAnhlkS74m7OX0669oaTh+0bVrtfiUizYdCM3Tts=; b=Xvl/xCd0aoA4TAnjjlR0KmjFrzS9SeB43WDvzD0Z222ZSY9901N9/Y+h+taEd4mNLomB6dDqHWnd+4k6NJ5odhobbppflzvPZB6eimGspZ96jsfQKQEXBy51cSM20UiA5NLHSUrl4dSW4FfdCofZiIUuaNO6EzXNGbrCs1Za1cT8kxInDgMTjIVQW3+GOdAuCaLW9aVx0Omjfcge0tUnqhA49Ryv+2g+U2ktD/78Mjej1RtWveXozEMT8I6dHjdgYLC3C8403DyGkqk3rqcWM+uWjqWMwmeOGDBxhSGQ49tZyrwNrXEWBGpx8ULtLd4b+3NSJEnxjMY+OG1hFEUOwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CyEIAnhlkS74m7OX0669oaTh+0bVrtfiUizYdCM3Tts=; b=oiZM57eeeWyeK04Q3QKVh9h3en5M7VfqBNFGPOWIIW4vY5AUakPRTHahEJW7XTrsdlHNEc3VX8Vdk5Ltphy8wb8bAO2OWqeCKJ9jVPmpidZEd17+SS72Zp2xSCfm/nBKbHrANkza3pubKCmAsnjp4NnFU/IK2o5C+Xex5wLVYOKIil9Cbl8VuiOB6ym67LCkVXMVydT6HCJjPF4lzuvvZKSyg5zIgxXUgC4T23bwJIXsLwYBUILJYVD0Vyzprbic5zsCs0sTdnszSChbDNsy5OPYPUr+DFb5YRe+s6vAPaqzhI0KFiXTu/vKTlgdezKxQDRoXW/wSoh76+5RaHrKgg== Received: from BN8NAM11FT055.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4b::4f) by BN8NAM11HT019.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4b::253) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21; Fri, 16 Oct 2020 20:01:47 +0000 Received: from DM5PR1001MB2105.namprd10.prod.outlook.com (2a01:111:e400:fc4b::41) by BN8NAM11FT055.mail.protection.outlook.com (2a01:111:e400:fc4b::318) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Fri, 16 Oct 2020 20:01:47 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:0F9A8B07DF3BBC06643F1E48E5A84D2D8511A4C848178F3274A8A59E3284E6D4; UpperCasedChecksum:8B8A365D367777015C4559FBC6BC92207388D2F81CC6A943625C9A753510B1FB; SizeAsReceived:8611; Count:47 Received: from DM5PR1001MB2105.namprd10.prod.outlook.com ([fe80::2405:9d83:9d59:c5cf]) by DM5PR1001MB2105.namprd10.prod.outlook.com ([fe80::2405:9d83:9d59:c5cf%5]) with mapi id 15.20.3477.025; Fri, 16 Oct 2020 20:01:47 +0000 From: Morgan.J.Smith@outlook.com Date: Fri, 16 Oct 2020 16:00:53 -0400 Message-ID: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: X-TMN: [ZDYZE0r+7e7jC/uDhYHpG0hvphquFilN] X-ClientProxiedBy: YT1PR01CA0113.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:2c::22) To DM5PR1001MB2105.namprd10.prod.outlook.com (2603:10b6:4:2b::24) X-Microsoft-Original-Message-ID: <20201016200051.6985-2-Morgan.J.Smith@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pancake.lan (184.164.21.96) by YT1PR01CA0113.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:2c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20 via Frontend Transport; Fri, 16 Oct 2020 20:01:46 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 3389215d-6e27-4f01-c607-08d8720e5010 X-MS-Exchange-SLBlob-MailProps: 3R77UsUWwWc+qtSLweqt0DSdyzdmfVOHuRGLd+AEqi3u84gp6oGhDa8uZN2GU+Dylqyf5G9j9xb/QXIIyIOxG5JZpvvQVy2jK7g8WXvwuZBU9MAvAFQ5KLS532T1KpkFGugPH2x7pxWSSkYJTs+GJgbNM3kqdf38WupineOLQ/u/fYaTV+fpoG1z64kSv887V5ERFiNXaq3ZLgpnzh3AVFlJHUzFbIIjMaOQlJvysyK1uplqXUOQIoD+NYXyxhT502Y5JoKwRJWBREbudDCz91vfQUxQK+2mFpAP5Vlpe/vpDmEHeidrUVk62ghjelbYczTietLFzPN3csv5S7rKP2XCBNQZqtuwoEWOMn4SGXCpj+UfL0oOHRDYpmO8UUPFxWXgAu37A64xxQoOLw5gVfOlkFpE36y+fSYda2gZC+noBRZmSVt8vGD0ro5pISfeOb3sTOZ2qUIAYSK+jmqeeClxOKI6ZsM1GzKgrHWsx2qm0zb1491aXKFKhaYB9Oy97BZilZU2zujwJenXjl09DBjj8zdfd0C77dYgHO28O4e6apCkNOP63YfquSXQn2C7yimwGiWC3WZtJfkVjTiJycRBSu9uIDfkUDH1eYe+bF6x/ef88GJK4STM06HsJwsLQ1eKdT8VcNThEyQHiHcwdPyZplK1XNG/3i+90uBSwPqsFXCc8C2voXzohStNooDKtFoN19PPPuFRR5J32lLE3Zgr4rmPo+RCwFx3lz8g5aAQtkfvUqlEhN785GlGVcKYfWTSQLstBR0cQ/hbvH/LOihJc9Jg8c0tsfyIv/IDcej0G1ZqymMHTYXiFWuTTqShuVHmNebLn39SGtjsQxHxo6im4I5+xq6Zr6MWs9Q7M7fbBoqKfk6XiDyOZ9prT7vM0GbC99swb6e+ThzedVbBCw== X-MS-TrafficTypeDiagnostic: BN8NAM11HT019: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C0LI1FurlOTY0YK9Qi79ABtfT/Nwso0t0JwQLf9P96dnW25GjuUppZ0bnz31XdwfKhzLuGr7bGrjRudi/NmP/S6SDRNo3Cz8qbyFGd4CqiC4Wmx9Lfs41zS4Whjei7KhoWYEF4ZGZwmLKQ+MSbz0T3WIvzJsdmSYSRzcKEsIIEkDElVo7DtWSp58H5k3mcUMe60GKYMhG0MczVygqz71aUK3T1JP9CYeBtQr5O7+Z81tzVu6zS23U/oFdIQ71zBl X-MS-Exchange-AntiSpam-MessageData: WBvDu4j4Y6mOnDAUSxzq36C9/+xopZQDO/6R3C4QpQF8g7yNTnNHnw1+6b5JTq/bD2ZA2kKqrq+Yy1y993QvEi1ZYrjnKhDksh8Oi9SxvcjFhuLZwTlCcnU5X2/M+DSApgos8LADdQ6E4xtsNhv4mQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3389215d-6e27-4f01-c607-08d8720e5010 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2020 20:01:47.4488 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT055.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8NAM11HT019 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From: Morgan Smith * gnu/packages/virtualization.scm (libguestfs): New variable. --- gnu/packages/virtualization.scm | 103 ++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index ac062dfa15..d958d99330 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2020 Mathieu Othacehe ;;; Copyright © 2020 Marius Bakke ;;; Copyright © 2020 Maxim Cournoyer +;;; Copyright © 2020 Morgan Smith ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,13 +38,16 @@ #:use-module (gnu packages admin) #:use-module (gnu packages assembly) #:use-module (gnu packages attr) + #:use-module (gnu packages augeas) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) #:use-module (gnu packages base) #:use-module (gnu packages bison) + #:use-module (gnu packages cdrom) #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) + #:use-module (gnu packages cpio) #:use-module (gnu packages cross-base) #:use-module (gnu packages curl) #:use-module (gnu packages cyrus-sasl) @@ -63,6 +67,7 @@ #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) #:use-module (gnu packages golang) + #:use-module (gnu packages gperf) #:use-module (gnu packages graphviz) #:use-module (gnu packages gtk) #:use-module (gnu packages haskell) @@ -79,8 +84,10 @@ #:use-module (gnu packages ncurses) #:use-module (gnu packages nettle) #:use-module (gnu packages networking) + #:use-module (gnu packages ocaml) #:use-module (gnu packages onc-rpc) #:use-module (gnu packages package-management) + #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages polkit) @@ -2032,3 +2039,99 @@ administrators and developers in managing the database.") libosinfo library. It provides information about guest operating systems for use with virtualization provisioning tools") (license license:lgpl2.0+))) + +(define-public libguestfs + (package + (name "libguestfs") + (version "1.42.0") + (source (origin + (method url-fetch) + (uri (string-append + "https://download.libguestfs.org/" + (version-major+minor version) + "-stable/libguestfs-" + version + ".tar.gz")) + (sha256 + (base32 + "097hfi53w5lhf3im9l1lrymzv07ksyi1zcmg8bqrg9daycn1kvjg")))) + (build-system gnu-build-system) + (arguments + `(;; XXX: I'm not sure why runpath validation doesn't work + #:validate-runpath? #f + ;; XXX: It's possible to get at least some of the tests to work + #:tests? #f + #:configure-flags (list "--disable-gnulib-tests" + "--disable-daemon" + "--disable-appliance" + "--with-distro=none" + "--disable-static") + ;; Installation is discouraged because users might want to have multiple + ;; versions installed at once. For that reason we have to specify + ;; "REALLY_INSTALL=yes" to install + #:make-flags (list "REALLY_INSTALL=yes") + #:phases + (modify-phases %standard-phases + (add-before 'configure 'fix-configure + (lambda* (#:key inputs #:allow-other-keys) + ;; Our ncurses package doesn't have a binary called + ;; "ncurses6-config". It probably should though + (substitute* "configure" + (("ncurses6-config") + "ncursesw6-config")) + ;; Hard code paths to ld and file in the configure script + (substitute* "configure" + (("/usr/bin/ld") + (string-append (assoc-ref inputs "ld-wrapper") "/bin/ld")) + (("/usr/bin/file") + (string-append (assoc-ref inputs "file") "/bin/file"))) + #t)) + (add-before 'check 'fix-tests + (lambda* (#:key inputs #:allow-other-keys) + (let ((bash (string-append (assoc-ref inputs "bash") "/bin/bash"))) + (setenv "SHELL" bash)) + #t)) + (add-before 'install 'patch-ocaml-installdir + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; Force ocaml installdir to be correct + (substitute* "ocaml/Makefile" + (("\\$\\(DESTDIR\\)\\$\\(OCAMLLIB\\)") + (string-append + out "/lib/ocaml/site-lib")))) + #t))))) + (native-inputs + `(("bison" ,bison) + ("curl" ,curl) + ("flex" ,flex) + ("pkg-config" ,pkg-config))) + (inputs + `(("augeas" ,augeas) + ("cdrkit-libre" ,cdrkit-libre) + ("cpio" ,cpio) + ("fuse" ,fuse) + ("gperf" ,gperf) + ("gperf" ,gperf) + ("jansson" ,jansson) + ("libselinux" ,libselinux) + ("libtirpc" ,libtirpc) + ("libvirt" ,libvirt) + ("libxml2" ,libxml2) + ("util-linux" ,util-linux) ; getopt + ("ncurses" ,ncurses) + ("ocaml" ,ocaml) + ("ocaml-findlib" ,ocaml-findlib) + ("ocaml-hivex" ,ocaml-hivex) + ("pcre" ,pcre) + ("perl" ,perl) + ("qemu" ,qemu))) + (home-page "https://libguestfs.org/") + (synopsis "Tools for accessing and modifying virtual machine (VM) disk +images") + (description "libguestfs is a C library and a set of tools for accessing +and modifying virtual disk images used in platform virtualization. The tools +can be used for viewing and editing virtual machines (VMs) managed by libvirt +and files inside VMs, scripting changes to VMs, and creating VMs.") + ;; The library files are released under LGPLv2.1 or later. + ;; The programs ;; are released under GPLv2+. + (license (list license:lgpl2.1+ license:gpl2+))))