From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id +CI2EzBtAGfbfwAAe85BDQ:P1 (envelope-from ) for ; Fri, 04 Oct 2024 22:33:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id +CI2EzBtAGfbfwAAe85BDQ (envelope-from ) for ; Sat, 05 Oct 2024 00:33:20 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=PoLe9lnu; dkim=fail ("headers rsa verify failed") header.d=autistici.org header.s=stigmate header.b=gdaSW0I4; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1728081200; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=D92Bg72ptgN7Ftbsc1z2gGAPYBsX0BcAdElDK1gDtJM=; b=BM9sSA/EQk29wAB4LWT25GXYcgjKMQYHzQgndnuAAcn1kn90f8bhRxjp72+VUyO0bv9xTu zeHX3kCzqdKwooTXMzjsKHWFxKm+3gOuZdVdecjGOARmuG2XgvfBZA4RSr0+gB8KXZuw63 1c6G097j1PGlpccmGZolm/1naaqIAMhRKOU7c+F9SQ+RNXlHsHG4GyPICZuhMi46xqRphb PTD72EgQIpwCUyfk0mRNDllMIU0MA7lZI3VXYXAZtwm06l3d18q0oRzM/PfW+JamJW8SSY nh8T0uoYIaVqf2B7xM0gz31bV6bGHy/VrYnLiTvVzbE4WqAetxGYX+pBYSrlcQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=PoLe9lnu; dkim=fail ("headers rsa verify failed") header.d=autistici.org header.s=stigmate header.b=gdaSW0I4; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1728081200; a=rsa-sha256; cv=none; b=uCZlPDz6PifP8vD1cNb2KOCi0mGwUNlB4X8x7c9usTUznTw6A1CFHyyDUlLeyiFriqXkjT KunCvQhT9In2mJbwCwqpWt7iITK8U/MJquACfooeLdIh+XRGwaWsPEJO/4zHPY3s9Uc4Uj cRafYlb7IErKGjDgLxlcLW2bouH4gOvFJWszGRuw556sO/6tJq5LQ40DbtY3LXj5kHtH9E MoMK7geul0ngYTeLCNCqRFZWXnVgR3AlMzy3m1RlAKyQWjh0jsgCeC3fAkS6NmKC7AU9m4 lxbLJLK50M2bvp2Z8NdAzMK/o85gNl5Tdw7G9Uu+UWHGL9qy5FmmNYxbqV5Q4Q== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1F34F8C2B2 for ; Sat, 05 Oct 2024 00:33:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swqr7-0000FG-1A; Fri, 04 Oct 2024 18:33:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1swqr5-0000EV-GC for guix-patches@gnu.org; Fri, 04 Oct 2024 18:32:59 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swqr5-0004Gw-7E for guix-patches@gnu.org; Fri, 04 Oct 2024 18:32:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=D92Bg72ptgN7Ftbsc1z2gGAPYBsX0BcAdElDK1gDtJM=; b=PoLe9lnuVhvMECovB5RpsDsTVXLufT7cuOyTzSDvjLWA5YDDeJKEAsVTpQcB3EYv9FUiGpYsi/8TSOIDXQYQEzHB/XfoJ81Hz73/dlbdoUHCVpF17Z6MyW1d313jFJxHpYmQ97o/higINAyNIYYMEn+dBnsWQQJJiCqiRNrnT5eoaEWzx+/AZ1iE2q781bvsSXvFCmPAgTXE3LSa9HpWscXY4uVmDF/pzlss2Osf4Q8yaXdmvEyqo4xIqxINArTdiBEn1cSSr4dJQAt1/T9LbO9liBiWdPwboF5cR4Xj05Szp69M14o5VBw0p1jXInKHbY6BSJsV4hoeS0BHAmIMig==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1swqr8-0001QS-Sv for guix-patches@gnu.org; Fri, 04 Oct 2024 18:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73260] [PATCH v2 2/3] gnu: Add libguestfs-minimal. Resent-From: Giacomo Leidi Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 04 Oct 2024 22:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73260 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 73260@debbugs.gnu.org Cc: Giacomo Leidi Received: via spool by 73260-submit@debbugs.gnu.org id=B73260.17280811495419 (code B ref 73260); Fri, 04 Oct 2024 22:33:02 +0000 Received: (at 73260) by debbugs.gnu.org; 4 Oct 2024 22:32:29 +0000 Received: from localhost ([127.0.0.1]:36784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swqqa-0001PK-Gj for submit@debbugs.gnu.org; Fri, 04 Oct 2024 18:32:29 -0400 Received: from confino.investici.org ([93.190.126.19]:61143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swqqW-0001Ox-9t for 73260@debbugs.gnu.org; Fri, 04 Oct 2024 18:32:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1728081132; bh=D92Bg72ptgN7Ftbsc1z2gGAPYBsX0BcAdElDK1gDtJM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gdaSW0I4gzLP6xsH1beMVMVXQC4aKgZQcpqrZ0tuN55HfRNOT+1aYnx3qAQijm4kn aRJlJJzjLx+ge1stTmLUdhaOuZS5i7Mn/ok/MzHl+oDljntzPYyCBnaTTT3c14yMVs fzq2UcfDOon1OUL/jejoUL3V4j/FYucpY2u+7hT0= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4XL3FS6MTwz11GY; Fri, 4 Oct 2024 22:32:12 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4XL3FS5brnz11C9; Fri, 4 Oct 2024 22:32:12 +0000 (UTC) Date: Sat, 5 Oct 2024 00:31:43 +0200 Message-ID: <131c7d0bc4270ad05fc5d7f4b10b9a52be27ff28.1728081104.git.goodoldpaul@autistici.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <42a57a06130e77a6471ea9717a670306283ecb51.1728081104.git.goodoldpaul@autistici.org> References: <42a57a06130e77a6471ea9717a670306283ecb51.1728081104.git.goodoldpaul@autistici.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: , Reply-to: Giacomo Leidi X-ACL-Warn: , Giacomo Leidi via Guix-patches From: Giacomo Leidi via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: 0.43 X-Spam-Score: 0.43 X-Migadu-Queue-Id: 1F34F8C2B2 X-TUID: f/Ts5Agd5pMr * gnu/packages/virtualization.scm (libguestfs-minimal): New variable. * gnu/packages/patches/libguestfs-syms.patch: Add file. * gnu/local.mk: Add it. Change-Id: Ide22707724ecd41145243c9f41adc3f5557c593e --- gnu/local.mk | 1 + gnu/packages/patches/libguestfs-syms.patch | 44 +++++++ gnu/packages/virtualization.scm | 127 +++++++++++++++++++++ 3 files changed, 172 insertions(+) create mode 100644 gnu/packages/patches/libguestfs-syms.patch diff --git a/gnu/local.mk b/gnu/local.mk index 49660d4b3e..6503b0cb7a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1607,6 +1607,7 @@ dist_patch_DATA = \ %D%/packages/patches/libgeotiff-fix-tests-with-proj-9.3.0.patch \ %D%/packages/patches/libgeotiff-fix-tests-with-proj-9.3.1.patch \ %D%/packages/patches/libgeotiff-fix-tests-on-i386.patch \ + %D%/packages/patches/libguestfs-syms.patch \ %D%/packages/patches/libobjc2-unbundle-robin-map.patch \ %D%/packages/patches/libvirt-add-install-prefix.patch \ %D%/packages/patches/libziparchive-add-includes.patch \ diff --git a/gnu/packages/patches/libguestfs-syms.patch b/gnu/packages/patches/libguestfs-syms.patch new file mode 100644 index 0000000000..ad7453ea3c --- /dev/null +++ b/gnu/packages/patches/libguestfs-syms.patch @@ -0,0 +1,44 @@ +diff -urN a/lib/Makefile.am b/lib/Makefile.am + +Without this patch the build phase fails during linking with: + +ld:./libguestfs.syms: file format not recognized; treating as linker script +ld:./libguestfs.syms:23: syntax error +collect2: error: ld returned 1 exit status +make[3]: *** [Makefile:1252: libguestfs.la] Error 1 +make[3]: *** Waiting for unfinished jobs.... +Wide character in print at /tmp/guix-build-libguestfs-1.53.6.drv-0/libguestfs-1.50.1/podwrapper.pl line 633. +touch stamp-guestfs.pod +make[3]: Leaving directory '/tmp/guix-build-libguestfs-1.53.6.drv-0/libguestfs-1.50.1/lib' +make[2]: *** [Makefile:1161: all] Error 2 +make[2]: Leaving directory '/tmp/guix-build-libguestfs-1.53.6.drv-0/libguestfs-1.50.1/lib' +make[1]: *** [Makefile:1083: all-recursive] Error 1 +make[1]: Leaving directory '/tmp/guix-build-libguestfs-1.53.6.drv-0/libguestfs-1.50.1' +make: *** [Makefile:989: all] Error 2 +error: in phase 'build': uncaught exception: + +--- a/lib/Makefile.am 2023-07-20 17:35:16.489080853 +0200 ++++ b/lib/Makefile.am 2023-07-20 17:35:47.305793499 +0200 +@@ -160,8 +160,7 @@ + # Force libtool to name the library 'libguestfs.so.0.$(MAX_PROC_NR).0'. + # Include the version script to limit which symbols are exported. + libguestfs_la_LDFLAGS = \ +- -version-info $(MAX_PROC_NR):0:$(MAX_PROC_NR) \ +- $(VERSION_SCRIPT_FLAGS)$(srcdir)/libguestfs.syms ++ -version-info $(MAX_PROC_NR):0:$(MAX_PROC_NR) + + if HAVE_FUSE + # XXX Unfortunately FUSE_CFLAGS defines _FILE_OFFSET_BITS=64. +diff -urN a/lib/Makefile.in b/lib/Makefile.in +--- a/lib/Makefile.in 2023-07-20 17:35:16.489080853 +0200 ++++ b/lib/Makefile.in 2023-07-20 17:36:05.474213641 +0200 +@@ -1109,8 +1109,7 @@ + # Force libtool to name the library 'libguestfs.so.0.$(MAX_PROC_NR).0'. + # Include the version script to limit which symbols are exported. + libguestfs_la_LDFLAGS = \ +- -version-info $(MAX_PROC_NR):0:$(MAX_PROC_NR) \ +- $(VERSION_SCRIPT_FLAGS)$(srcdir)/libguestfs.syms ++ -version-info $(MAX_PROC_NR):0:$(MAX_PROC_NR) + + @HAVE_LIBVIRT_TRUE@libvirt_is_version_SOURCES = libvirt-is-version.c + @HAVE_LIBVIRT_TRUE@libvirt_is_version_LDADD = \ diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 4ad94ea8e5..4d3d7502f1 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -61,6 +61,7 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages apparmor) #: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) @@ -68,11 +69,13 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages bison) #:use-module (gnu packages bootloaders) #:use-module (gnu packages build-tools) + #:use-module (gnu packages cdrom) #:use-module (gnu packages check) #:use-module (gnu packages cluster) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages containers) + #:use-module (gnu packages cpio) #:use-module (gnu packages cross-base) #:use-module (gnu packages crypto) #:use-module (gnu packages cryptsetup) @@ -84,6 +87,7 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) #:use-module (gnu packages figlet) + #:use-module (gnu packages file) #:use-module (gnu packages firmware) #:use-module (gnu packages flex) #:use-module (gnu packages fonts) @@ -96,6 +100,7 @@ (define-module (gnu packages virtualization) #: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) @@ -3011,3 +3016,125 @@ (define-public hivex file available through a C API, or through a separate program to export the hive as XML.") (license license:lgpl2.1))) + +(define-public libguestfs-minimal + (package + (name "libguestfs-minimal") + (version "1.53.6") + (source (origin + (method url-fetch) + (uri (string-append "https://libguestfs.org/download/" + (version-major+minor version) + "-stable/libguestfs-" version ".tar.gz")) + (sha256 + (base32 + "0vssarc3n4kv26fyjmkrrcvh55v41fhycba43pij3rc2izl72s2y")) + (patches + (search-patches "libguestfs-syms.patch")))) + (build-system gnu-build-system) + (arguments + (list #:configure-flags + #~(list "--disable-appliance" + "--disable-daemon" + "--disable-static" + "--disable-erlang" + "--disable-golang" + "--disable-haskell" + "--disable-java" + "--disable-lua" + ;; FIXME: Perl bindings have wrong rpath and break the + ;; validate-runpath phase. Temporarily disable them until + ;; a way is found to correctly patch perl/Build.PL.in. + "--disable-perl" + "--disable-php" + "--with-distro=\"Guix System\"" + "--with-readline" + (string-append "LDFLAGS=-Wl,-rpath," %output "/lib")) + #:make-flags #~`("REALLY_INSTALL=yes") + #:phases + #~(let* ((lib (string-append #$output "/lib")) + (lib/ocaml (string-append lib "/ocaml"))) + (modify-phases %standard-phases + (add-after 'unpack 'patch-makefiles + (lambda _ + (for-each patch-shebang + (find-files ".")) + (substitute* "ocaml/Makefile.in" + (("\\$\\(DESTDIR\\)\\$\\(OCAMLLIB\\)") + lib/ocaml)) + ;; FIXME: Perl bindings have broken runpath, + ;; this substitution doesn't seem to work. + (substitute* "perl/Build.PL.in" + (("extra_linker_flags => \\[") + (string-append "extra_linker_flags => [ + '-L" #$output "/lib',"))))) + (replace 'check + (lambda* (#:key tests? make-flags #:allow-other-keys) + (when tests? + (apply invoke `("make" ,@make-flags "check-direct"))))) + (replace 'install + (lambda* (#:key make-flags #:allow-other-keys) + (mkdir-p "temp-build-dir") + (apply invoke `("make" ,@make-flags "INSTALLDIRS=vendor" + "install")))) + (add-after 'install 'wrap-binaries + (lambda _ + (let ((bin (string-append #$output "/bin"))) + (for-each + (lambda (binary) + (use-modules (srfi srfi-1)) + (wrap-program binary + `("PERL5LIB" ":" prefix + (,(string-append #$output + "/lib/perl5/site_perl"))) + `("PATH" ":" prefix + ,(search-path-as-list + '("bin") + (map second + '#$(package-inputs this-package)))))) + (find-files bin))))) + (replace 'validate-documentation-location + (lambda _ + (let ((man-dir + (string-append #$output "/man")) + (info-dir + (string-append #$output "/info"))) + (for-each (lambda (d) + (invoke "rm" "-rf" d)) + (list man-dir info-dir))))))))) + (native-inputs (list augeas + bison + cpio + flex + gettext-minimal + gperf + libtool + ocaml + ocaml-findlib + ncurses + perl + perl-getopt-long + perl-module-build + pkg-config + po4a + xorriso + xz + zstd)) + (inputs + (list file + fuse + jansson + hivex + libtirpc + pcre2 + readline + qemu)) + (home-page "https://libguestfs.org/") + (synopsis "Access and modify virtual machine disk images") + (description + "@code{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.") + (license (list license:gpl2+ license:lgpl2.1+)))) -- 2.46.0