From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 14 17:18:23 2024 Received: (at submit) by debbugs.gnu.org; 14 Sep 2024 21:18:23 +0000 Received: from localhost ([127.0.0.1]:47860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spa9u-0008Qs-WA for submit@debbugs.gnu.org; Sat, 14 Sep 2024 17:18:23 -0400 Received: from lists.gnu.org ([209.51.188.17]:51752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spa9s-0008Qk-PE for submit@debbugs.gnu.org; Sat, 14 Sep 2024 17:18:21 -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 1spa7Z-0003uN-Vk for guix-patches@gnu.org; Sat, 14 Sep 2024 17:15:58 -0400 Received: from confino.investici.org ([93.190.126.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1spa7M-00067s-2g for guix-patches@gnu.org; Sat, 14 Sep 2024 17:15:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1726348530; bh=2ftqgelMtMwX2xDy3PVEaHbYZIp6ZSVoRIBMXwEPZ08=; h=Date:To:From:Subject:From; b=J4CW4o6hB3GlnUJO3FI64VysZsqe+dxgPFkxqtq1iyh7sJd9WVOlgDVjE+CQ4n5al zwMEVCKLjZfZ7PdTU73EpUVSUBlRAcBiaFg0oXJW9SkhmNr70kwrg8G+KHhzWR444l PSDaLaRNOXODJZGNzduQjOQXmchqzGfDqdMkNFig= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4X5kVB0vC7z1132 for ; Sat, 14 Sep 2024 21:15:30 +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 4X5kVB0VFyz112t for ; Sat, 14 Sep 2024 21:15:30 +0000 (UTC) Message-ID: <0e7f7cc7-b6b8-0c97-f175-edd6d85a2eb1@autistici.org> Date: Sat, 14 Sep 2024 23:15:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Content-Language: en-US To: guix-patches@gnu.org From: paul Subject: Add libguestfs Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=93.190.126.19; envelope-from=goodoldpaul@autistici.org; helo=confino.investici.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hi Guix , I'm sending a patch series adding libguestfs. Thank you for your work giacomo From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 14 17:21:45 2024 Received: (at 73260) by debbugs.gnu.org; 14 Sep 2024 21:21:45 +0000 Received: from localhost ([127.0.0.1]:47870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spaDA-0000Dz-Qp for submit@debbugs.gnu.org; Sat, 14 Sep 2024 17:21:45 -0400 Received: from confino.investici.org ([93.190.126.19]:24599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spaD8-0000Dm-Eh for 73260@debbugs.gnu.org; Sat, 14 Sep 2024 17:21:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1726348890; bh=d5Rw70+sRJ9orkWrDTwkwjPoB8W6HKNORelsQr+yQV4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=One7/w25/0bte32V+/YoqriK8FeSmO0e2+s0anLHVjOd6smhun/n3L5jciCU+TFCl iFEtTs37ka/0TJGrcAxj1Qf+tdW17lVaul+3tLyY4TPM6S2aha++CpJDP0d1B1JDKY aw2UbASgaHj6OTE5XPvrXQlLVdAR1FSmU3m0odKE= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4X5kd65pM5z11BF; Sat, 14 Sep 2024 21:21:30 +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 4X5kd64Fkbz119H; Sat, 14 Sep 2024 21:21:30 +0000 (UTC) From: Giacomo Leidi To: 73260@debbugs.gnu.org Subject: [PATCH 2/3] gnu: Add libguestfs-minimal. Date: Sat, 14 Sep 2024 23:20:57 +0200 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: <247263a340d7dedbf4671ebaf75da540e7e62734.1726348858.git.goodoldpaul@autistici.org> References: <247263a340d7dedbf4671ebaf75da540e7e62734.1726348858.git.goodoldpaul@autistici.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73260 Cc: Giacomo Leidi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * 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 | 26 +++++ gnu/packages/virtualization.scm | 128 +++++++++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 gnu/packages/patches/libguestfs-syms.patch diff --git a/gnu/local.mk b/gnu/local.mk index fcdf174099..74d77ea4a7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1597,6 +1597,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..a4308eef5f --- /dev/null +++ b/gnu/packages/patches/libguestfs-syms.patch @@ -0,0 +1,26 @@ +diff -urN a/lib/Makefile.am b/lib/Makefile.am +--- 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 60f17ea630..8abc64527b 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -59,6 +59,7 @@ (define-module (gnu packages virtualization) #: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) @@ -66,11 +67,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) @@ -83,6 +86,7 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages documentation) #:use-module (gnu packages elf) #: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) @@ -95,6 +99,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) @@ -3020,3 +3025,126 @@ (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" + "--with-distro=\"Guix System\"") + #:make-flags #~'("REALLY_INSTALL=yes") + #:phases + #~(let* ((lib/ocaml (string-append #$output "/lib/ocaml"))) + (modify-phases %standard-phases + (add-after 'unpack 'patch-makefiles + (lambda _ + (for-each patch-shebang + (find-files ".")) + (for-each (lambda (makefile) + (substitute* "ocaml/Makefile.am" + (("\\$\\(DESTDIR\\)\\$\\(OCAMLLIB\\)") + lib/ocaml))) + '("ocaml/Makefile.am" + "ocaml/Makefile.in")))) + (replace 'bootstrap + (lambda _ + (invoke "autoreconf" "-vif"))) + (replace 'check + (lambda* (#:key tests? make-flags #:allow-other-keys) + (when tests? + (apply invoke `("make" ,@make-flags "check-direct"))))) + (add-before 'install 'set-rpath + (lambda _ + (for-each + (lambda (sofile) + (invoke "ls" "-la" "ocaml/") + ;; The ‘validate-runpath’ phase fails to find libguestfs.so.0. + (invoke (string-append #$(this-package-native-input "patchelf") + "/bin/patchelf") + "--add-rpath" (string-append #$output "/lib") sofile)) + '("perl/blib/arch/auto/Sys/Guestfs/Guestfs.so" + "ocaml/dllmlguestfs.so")))) + (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 autoconf + automake + augeas + bison + cpio + flex + gettext-minimal + gperf + libtool + ocaml + ocaml-findlib + ncurses + patchelf + 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 14 17:21:52 2024 Received: (at 73260) by debbugs.gnu.org; 14 Sep 2024 21:21:52 +0000 Received: from localhost ([127.0.0.1]:47874 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spaDH-0000EU-KM for submit@debbugs.gnu.org; Sat, 14 Sep 2024 17:21:52 -0400 Received: from confino.investici.org ([93.190.126.19]:39941) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spaDF-0000EB-51 for 73260@debbugs.gnu.org; Sat, 14 Sep 2024 17:21:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1726348890; bh=y+ZIbmwrWeRMd4YNqwXUPm04mrC1n8dh+PEfpR2ArUw=; h=From:To:Cc:Subject:Date:From; b=Wj5CBkk0NIEodS+yPV+PrjM1hGWQQPBALESJpTDXTflNjVaMKW23QdOZveKz+Cjae NFtkIs0QnrJItbX/Zlik0A8ZSstp1rrcadUbxNkZmkcYKFUcu8rojXt7hGZtrSmHaW mwBZijTWSYghmAH+QWFvSl42V/xVFNHGS0I+KLTE= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4X5kd62zyGz119y; Sat, 14 Sep 2024 21:21:30 +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 4X5kd629KZz119H; Sat, 14 Sep 2024 21:21:30 +0000 (UTC) From: Giacomo Leidi To: 73260@debbugs.gnu.org Subject: [PATCH 1/3] gnu: Add hivex. Date: Sat, 14 Sep 2024 23:20:56 +0200 Message-ID: <247263a340d7dedbf4671ebaf75da540e7e62734.1726348858.git.goodoldpaul@autistici.org> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73260 Cc: Giacomo Leidi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/virtualization.scm (hivex): New variable. Change-Id: I9828d267d5c6f24dc5039ea3b1849248cd9d23fb --- gnu/packages/virtualization.scm | 118 ++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index b076d49985..60f17ea630 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -36,6 +36,7 @@ ;;; Copyright © 2024 Raven Hallsby ;;; Copyright © 2024 jgart ;;; Copyright © 2024 Ashish SHUKLA +;;; Copyright © 2024 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -80,6 +81,7 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages dns) #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) + #:use-module (gnu packages elf) #:use-module (gnu packages figlet) #:use-module (gnu packages firmware) #:use-module (gnu packages flex) @@ -112,6 +114,7 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages nettle) #:use-module (gnu packages networking) #:use-module (gnu packages ninja) + #:use-module (gnu packages ocaml) #:use-module (gnu packages onc-rpc) #:use-module (gnu packages package-management) #:use-module (gnu packages pciutils) @@ -2902,3 +2905,118 @@ (define-public riscv-pk supervisor execution environment for tethered RISC-V systems. It is designed to host the RISC-V Linux port.") (license license:bsd-3))) + +(define-public hivex + (package + (name "hivex") + (version "1.3.24") + (source (origin + (method url-fetch) + (uri (string-append "https://libguestfs.org/download/" + name "/" name "-" version ".tar.gz")) + (sha256 + (base32 + "0g0rib62qg81fda8lxsaa7a1ykqy4rl5sq185pdqm9y9xifa8bx5")))) + (build-system gnu-build-system) + (native-inputs (list automake + autoconf + gettext-minimal + libtool + ocaml + patchelf + pkg-config + perl-io-stringy + python-wrapper + ruby + ruby-rake + ruby-rdoc)) + (inputs + (list bash-minimal + libxml2 + perl + readline)) + (arguments + (list + #:configure-flags + #~(list + "--disable-static" + "--with-readline" + "--disable-rpath") + #:phases + #~(modify-phases %standard-phases + (replace 'bootstrap + (lambda _ + (invoke "autoreconf" "-vif"))) + (add-after 'unpack 'patch-makefiles + (lambda _ + (let* ((current-system (or #$(%current-target-system) + #$(%current-system))) + (ocamllib + (string-append #$output "/lib/ocaml/" + #$(package-version + (this-package-native-input "ocaml")) "/site-lib")) + (python-installdir + (string-append #$output "/lib/python" + #$(version-major+minor + (package-version + (this-package-native-input + "python-wrapper"))) + "/site-packages")) + (ruby-version + #$(package-version + (this-package-native-input "ruby"))) + (ruby-libdir + (string-append #$output + "/lib/ruby/site_ruby/" + ruby-version)) + (ruby-archdir + (string-append ruby-libdir "/" current-system))) + (substitute* "lib/Makefile.am" + (((string-append "\\$\\(VERSION_SCRIPT_FLAGS\\)" + "\\$\\(srcdir\\)/hivex\\.syms")) + "")) + (substitute* "python/Makefile.am" + (("\\$\\(PYTHON_INSTALLDIR\\)") + python-installdir)) + (substitute* "ocaml/Makefile.am" + (("\\$\\(DESTDIR\\)\\$\\(OCAMLLIB\\)") + ocamllib)) + (substitute* "ruby/Makefile.am" + (("\\$\\(DESTDIR\\)\\$\\(RUBY_ARCHDIR\\)") + ruby-archdir) + (("\\$\\(DESTDIR\\)\\$\\(RUBY_LIBDIR\\)") + ruby-libdir))))) + (add-before 'install 'set-rpath + (lambda _ + (for-each + (lambda (sofile) + ;; The ‘validate-runpath’ phase fails to find libhivex.so.0. + (invoke (string-append #$(this-package-native-input "patchelf") + "/bin/patchelf") + "--add-rpath" (string-append #$output "/lib") sofile)) + '("perl/blib/arch/auto/Win/Hivex/Hivex.so" + "ruby/ext/hivex/_hivex.so")))) + (add-after 'install 'wrap-binaries + (lambda _ + (let ((hivexregedit + (string-append #$output "/bin/hivexregedit")) + (hivexml + (string-append #$output "/bin/hivexml"))) + (wrap-program hivexregedit + `("PERL5LIB" ":" prefix + (,(string-append #$output "/lib/perl5/site_perl"))) + `("PATH" ":" prefix + (,(string-append #$output "/bin")))) + (wrap-program hivexml + `("PATH" ":" prefix + (,(string-append #$output "/bin")))))))))) + (home-page "https://github.com/libguestfs/hivex") + (synopsis "Windows registry hive extraction library") + (description + "This package provides a self-contained library for reading and writing +Windows Registry \"hive\" binary files. Unlike many other tools in this area, +it doesn't use the textual @code{.REG} format for output, because parsing that +is as much trouble as parsing the original binary format. Instead it makes the +file available through a C API, or through a separate program to export the +hive as XML.") + (license license:lgpl2.1))) base-commit: c572cf81f4b322af4280ac2133889c997e39d247 -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 14 17:21:52 2024 Received: (at 73260) by debbugs.gnu.org; 14 Sep 2024 21:21:52 +0000 Received: from localhost ([127.0.0.1]:47876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spaDI-0000EW-7V for submit@debbugs.gnu.org; Sat, 14 Sep 2024 17:21:52 -0400 Received: from confino.investici.org ([93.190.126.19]:20069) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spaDF-0000ED-Te for 73260@debbugs.gnu.org; Sat, 14 Sep 2024 17:21:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1726348891; bh=hNmqhLVP8Vv8/PWYIjJNfWV3Cg6TUJq03Aemgsbjbxg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W/py+YF0eCQkotxMQMHss7Y/7gdJhmAMXqDqNBiCTeHEkGe4vpwVKU0UZouEk+IJk ohQ9xCigJofjQ9SP6Eeia8M38fW962J2ChheD/GJFKGtWjoN5CmC0hXsDIeDFFUilu d3V89+51ePoYO7eqKTDE17cLwg9eQ9PWHOe04h+4= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4X5kd71Pdwz11BK; Sat, 14 Sep 2024 21:21:31 +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 4X5kd70c84z119H; Sat, 14 Sep 2024 21:21:30 +0000 (UTC) From: Giacomo Leidi To: 73260@debbugs.gnu.org Subject: [PATCH 3/3] gnu: Add libguestfs. Date: Sat, 14 Sep 2024 23:20:58 +0200 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: <247263a340d7dedbf4671ebaf75da540e7e62734.1726348858.git.goodoldpaul@autistici.org> References: <247263a340d7dedbf4671ebaf75da540e7e62734.1726348858.git.goodoldpaul@autistici.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73260 Cc: Giacomo Leidi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/virtualization.scm (libguestfs): New variable. Change-Id: I99243550a7a6c9d787fa1a67e54acefd3deeaf1f --- gnu/packages/virtualization.scm | 39 +++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 8abc64527b..ce541ec8a0 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -59,6 +59,7 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages admin) #:use-module (gnu packages assembly) #:use-module (gnu packages attr) + #:use-module (gnu packages apparmor) #:use-module (gnu packages augeas) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) @@ -79,6 +80,7 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages cryptsetup) #:use-module (gnu packages curl) #:use-module (gnu packages cyrus-sasl) + #:use-module (gnu packages dbm) #:use-module (gnu packages debian) #:use-module (gnu packages disk) #:use-module (gnu packages dns) @@ -102,6 +104,7 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages gperf) #:use-module (gnu packages graphviz) #:use-module (gnu packages gtk) + #:use-module (gnu packages java) #:use-module (gnu packages haskell) #:use-module (gnu packages haskell-apps) #:use-module (gnu packages haskell-check) @@ -112,6 +115,7 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages libbsd) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) + #:use-module (gnu packages lua) #:use-module (gnu packages m4) #:use-module (gnu packages man) #:use-module (gnu packages multiprecision) @@ -3148,3 +3152,38 @@ (define-public libguestfs-minimal guests, P2V, V2V, performing backups, cloning VMs, building VMs, formatting disks, resizing disks, and much more.") (license (list license:gpl2+ license:lgpl2.1+)))) + +(define-public libguestfs + (package + (inherit libguestfs-minimal) + (name "libguestfs") + (arguments + (substitute-keyword-arguments (package-arguments libguestfs-minimal) + ((#:configure-flags flags) + #~(cons (string-append "--with-python-installdir=" + #$output "/lib/python" + #$(version-major+minor + (package-version python)) + "/site-packages") + #$flags)))) + (native-inputs + (modify-inputs (package-native-inputs libguestfs-minimal) + (prepend cdrtools + gobject-introspection + lua + `(,openjdk "jdk") + python + util-linux))) + (inputs + (modify-inputs (package-inputs libguestfs-minimal) + (prepend acl + bdb + gmp + libapparmor + libcap + libcap-ng + libconfig + libvirt + libxcrypt + numactl + yajl))))) -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 16 10:22:14 2024 Received: (at 73260) by debbugs.gnu.org; 16 Sep 2024 14:22:14 +0000 Received: from localhost ([127.0.0.1]:53004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqCcH-00031r-0Y for submit@debbugs.gnu.org; Mon, 16 Sep 2024 10:22:14 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:59702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqAeT-00049o-2z for 73260@debbugs.gnu.org; Mon, 16 Sep 2024 08:16:25 -0400 DKIM-Signature: a=rsa-sha256; b=OiY4QmFwpiESOqIAMk9u8Ipf7lS7FotpwBhLxBe4e3g8PmBgAUc+sZaneuay4f8FMklIe4ZDrqDZt78wl7uwRh3p8tMIN/ps+FuexHMhSzoDf0c7Vi//uMepsIGpeKokSO9RMFdLvX1Qw7UWqI8+bQc4fGBgtAw9l8LWh9UnONaEd2fO7pmzTYPpquI2J6P5AULQwWqkjtjAg94/IzsA72RaKSyBkdeAu3i9vKpAARUSKC2LRAE9sdVMiUFHnhZNV/qiH6bWOq295zPdy5ppIzQHFGxCUtBoHLqxC8/Ly95kiKk6Ag1zl+muwnbGHmaHEtTr57dFGwJeuV4DPyFeXQ==; s=purelymail2; d=stokorec.cz; v=1; bh=kpp+b0/DI2rlAdiinD9hD+Svbg+DnxhxQSIYedeS/0k=; h=Received:Date:From:To:Subject; DKIM-Signature: a=rsa-sha256; b=w4cTsVuVUvjQQV9MZztsJGSL4JrSH+mSVCS7mTh/FfcZlb0vphE1E0RtfZWEjpiJnHiQiK9YjXHAHeRzB6dI0vBYdbxwG72vY+xAx0+GUzqBVfo7ZpJb/LIq9w0p4sudnSn+57o5IEiRKv5ZB3PNCQ+HLSW4kXqnxsUjE2wg9eEZdamXGYpGI6PCfTtQmmnk9bGm+X3EzHMSYlws0uTCAU/sBhyq4jKlQBToBLvmuMd3V0JlPdvGdfhllplklvX1ECkCGrfxyCweRF6vrswv4Irkl9m60BIRymfI3Se1oJkiXikT9lyAcQ+cw/hUFUydRx9EZy5fu4GyJElooU8ftw==; s=purelymail2; d=purelymail.com; v=1; bh=kpp+b0/DI2rlAdiinD9hD+Svbg+DnxhxQSIYedeS/0k=; h=Feedback-ID:Received:Date:From:To:Subject; Feedback-ID: 3513:1003:null:purelymail X-Pm-Original-To: 73260@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPA id 1696876719 for <73260@debbugs.gnu.org>; Mon, 16 Sep 2024 12:15:54 +0000 (UTC) MIME-Version: 1.0 Date: Mon, 16 Sep 2024 14:15:54 +0200 From: Jiri Spacek To: 73260@debbugs.gnu.org Subject: bug#73260 User-Agent: Purely Mail via Roundcube/1.6.8 Message-ID: <3fee2595fe113a641242912ca9e4dddd@purelymail.com> X-Sender: spacek@stokorec.cz Content-Type: multipart/alternative; boundary="=_9b61586796be743d7b156cdad86a6fc3" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 73260 X-Mailman-Approved-At: Mon, 16 Sep 2024 10:22:11 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) --=_9b61586796be743d7b156cdad86a6fc3 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed I've tried your patch off tree (in my own) however the provided patch libguestfs-syms.patch does not apply correctly for the version of libguestfs-minimal@1.53.6 used: > applying > '/gnu/store/866c9b68vmmyz8vzzk014qdgg13jayfj-libguestfs-syms.patch'... > patching file lib/Makefile.am > Hunk #1 FAILED at 160. > 1 out of 1 hunk FAILED -- saving rejects to file lib/Makefile.am.rej > patching file lib/Makefile.in > patch unexpectedly ends in middle of line > Hunk #1 FAILED at 1109. > 1 out of 1 hunk FAILED -- saving rejects to file lib/Makefile.in.rej I've tried newer version of the patch that is a part of libguestfs-1.50.1 nixpkg [1] and it applies correctly (but, I'm not sure what it does or if it is needed at all in Guix..) Anyway, thank you for your contribution. This pkg is just what I was looking for recently. Jiri [1] https://raw.githubusercontent.com/NixOS/nixpkgs/025d82d45cf50400f68f06c5d07458f54926956e/pkgs/development/libraries/libguestfs/default.nix --=_9b61586796be743d7b156cdad86a6fc3 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8

I've tried your patch off tree (in my own) however the provided patch li= bguestfs-syms.patch does not apply correctly for the version of libguestfs-= minimal@1.53.6 used:

> applying '/gnu/store/866c9b68vmmyz8vzzk014qdgg13jayfj-libguestfs-sy= ms.patch'...
> patching file lib/Makefile.am
> Hunk #1 FAIL= ED at 160.
> 1 out of 1 hunk FAILED -- saving rejects to file lib/M= akefile.am.rej
> patching file lib/Makefile.in
> patch unex= pectedly ends in middle of line
> Hunk #1 FAILED at 1109.
>= 1 out of 1 hunk FAILED -- saving rejects to file lib/Makefile.in.rej

I've tried newer version of the patch that is a part of libguestfs-1.50.= 1 nixpkg [1] and it applies correctly (but, I'm not sure what it does or if= it is needed at all in Guix..)


Anyway, thank you for your contribution. This pkg is just what I was loo= king for recently.

Jiri

[1] https://raw.githubusercontent.com/NixOS/nixpkgs/025d82d45cf50400f68f= 06c5d07458f54926956e/pkgs/development/libraries/libguestfs/default.nix

--=_9b61586796be743d7b156cdad86a6fc3-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 30 13:04:51 2024 Received: (at 73260) by debbugs.gnu.org; 30 Sep 2024 17:04:52 +0000 Received: from localhost ([127.0.0.1]:45892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svJpK-0006JD-1B for submit@debbugs.gnu.org; Mon, 30 Sep 2024 13:04:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svJpC-0006H3-HD for 73260@debbugs.gnu.org; Mon, 30 Sep 2024 13:04:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svJoY-0000Yq-MW; Mon, 30 Sep 2024 13:04:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=7/3kTBK8ajgvFEXkVzHPKZBG4vGxEOHXKsmIw4NHFBQ=; b=I+6TICrJd2Foewyf0boj 2FSuM0n6AcVQYC1Q8HepO2piu/UwCvwboNM7vWdNwsJc3yPwZ52ggjs5tlGuYLaAP2lJMc5NhAeeo 0DqiQbR2maJQqJyGgfbBzrPHub5hZMTm+mCST3dtbXVnH40aaUo4jf4vTZoIp7syTn074WA1K2ecz b+N7o/22wmTQvlYV+sWEbK3dTmsvJG/Q/t65jeXl2vZryPeSeETuLALkOzNaftxx9a89U31S5rrxW Npoor+Nqy19V+8yagJoojgqZPpsSWhPPY/ullKPtoYC8tMuEs4g2ScY3PFNmxHYggvmPOAsAYtF02 Ck7/e1/COunj2Q==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Giacomo Leidi Subject: Re: bug#73260: Add libguestfs In-Reply-To: <247263a340d7dedbf4671ebaf75da540e7e62734.1726348858.git.goodoldpaul@autistici.org> (Giacomo Leidi's message of "Sat, 14 Sep 2024 23:20:56 +0200") References: <0e7f7cc7-b6b8-0c97-f175-edd6d85a2eb1@autistici.org> <247263a340d7dedbf4671ebaf75da540e7e62734.1726348858.git.goodoldpaul@autistici.org> Date: Mon, 30 Sep 2024 19:03:59 +0200 Message-ID: <87zfnp5b0g.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73260 Cc: 73260@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Giacomo Leidi skribis: > * gnu/packages/virtualization.scm (hivex): New variable. > > Change-Id: I9828d267d5c6f24dc5039ea3b1849248cd9d23fb [...] > + #:configure-flags > + #~(list > + "--disable-static" > + "--with-readline" > + "--disable-rpath") Please keep it on one line. > + #~(modify-phases %standard-phases > + (replace 'bootstrap > + (lambda _ > + (invoke "autoreconf" "-vif"))) I expect this to be unnecessary: isn=E2=80=99t that equivalent to the defau= lt =E2=80=98bootstrap=E2=80=99 phase? > + (add-before 'install 'set-rpath > + (lambda _ > + (for-each > + (lambda (sofile) > + ;; The =E2=80=98validate-runpath=E2=80=99 phase fails t= o find libhivex.so.0. > + (invoke (string-append #$(this-package-native-input "pa= tchelf") > + "/bin/patchelf") > + "--add-rpath" (string-append #$output "/lib") s= ofile)) > + '("perl/blib/arch/auto/Win/Hivex/Hivex.so" > + "ruby/ext/hivex/_hivex.so")))) As a rule of thumb, when building from source, better arrange to pass the right =E2=80=98-Wl,-rpath=3D=E2=80=A6=E2=80=99 flags to the compiler th= an resorting to PatchELF (PatchELF is useful when dealing with prebuilt binaries). In this case, could you tweak the build system to pass =E2=80=98-Wl,-rpath=3D(string-append #$output "/lib")=E2=80=99 when buildin= g these two shared libraries? > + (license license:lgpl2.1))) Please double-check whether it=E2=80=99s really explicitly =E2=80=9Cv2.1-on= ly=E2=80=9D. By default, it=E2=80=99s =E2=80=9Cor any later version=E2=80=9D, meaning =E2= =80=98lgpl2.1+=E2=80=99. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 30 13:07:48 2024 Received: (at 73260) by debbugs.gnu.org; 30 Sep 2024 17:07:48 +0000 Received: from localhost ([127.0.0.1]:45912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svJsB-0006kS-KZ for submit@debbugs.gnu.org; Mon, 30 Sep 2024 13:07:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svJs8-0006jO-Ru for 73260@debbugs.gnu.org; Mon, 30 Sep 2024 13:07:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svJrW-00018y-Jj; Mon, 30 Sep 2024 13:07:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=yexSzdGRqvBO4qxAmusgReqKmUIy8Hgcuyi/56WFXg4=; b=gGcDkJh3bsZ85OZms03r Ri09XMqP6qtW3TNye2GunS20kF1ezgEFpTiN+t7Z3F6vuTAzOqWqCRj/ijuerHn9vW1yWT9gkiAca DzJFqFxCrIWnOB0+u6v4U1Qp6T6Z/jYHUR7Fy2m8Ini2UwK/b/nokxF1fAiQNYUmij0c5iw+lsHUM vbunGBY7zRk6I9UtbIJFriPk03anZWloUF2f56KfwVq4IIfz8y7vznU2z67ahIOD7LA0n2t2gdFVl qjCfFuJhTDKF7JaUjbJhNTwyQKsqOdSSV0/CneIam3kDPRwE4ZEK4zYuvQ3rzIrkHsbadHUk7j93z StCU3FgjsOzG0w==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Giacomo Leidi Subject: Re: bug#73260: Add libguestfs In-Reply-To: (Giacomo Leidi's message of "Sat, 14 Sep 2024 23:20:57 +0200") References: <247263a340d7dedbf4671ebaf75da540e7e62734.1726348858.git.goodoldpaul@autistici.org> Date: Mon, 30 Sep 2024 19:07:04 +0200 Message-ID: <87v7yd5avb.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73260 Cc: 73260@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Giacomo Leidi skribis: > * gnu/packages/virtualization.scm (libguestfs-minimal): New variable. > * gnu/packages/patches/libguestfs-syms.patch: Add file. > * gnu/local.mk: Add it. > > Change-Id: Ide22707724ecd41145243c9f41adc3f5557c593e [...] > +++ b/gnu/packages/patches/libguestfs-syms.patch > @@ -0,0 +1,26 @@ > +diff -urN a/lib/Makefile.am b/lib/Makefile.am As suggested by =E2=80=98guix lint=E2=80=99 :-), please add a couple of lin= es at the top explaining what the patch does and what its upstream status is. [...] > + (modify-phases %standard-phases > + (add-after 'unpack 'patch-makefiles > + (lambda _ > + (for-each patch-shebang > + (find-files ".")) > + (for-each (lambda (makefile) > + (substitute* "ocaml/Makefile.am" > + (("\\$\\(DESTDIR\\)\\$\\(OCAMLLIB\\)") > + lib/ocaml))) > + '("ocaml/Makefile.am" > + "ocaml/Makefile.in")))) > + (replace 'bootstrap > + (lambda _ > + (invoke "autoreconf" "-vif"))) You can arrange to only modify =E2=80=98Makefile.in=E2=80=99, in which case= the =E2=80=98bootstrap=E2=80=99 phase is unnecessary and autotools can be remov= ed from the inputs. > + ;; The =E2=80=98validate-runpath=E2=80=99 phase = fails to find libguestfs.so.0. > + (invoke (string-append #$(this-package-native-in= put "patchelf") > + "/bin/patchelf") > + "--add-rpath" (string-append #$output "/= lib") sofile)) > + '("perl/blib/arch/auto/Sys/Guestfs/Guestfs.so" > + "ocaml/dllmlguestfs.so")))) Same comment as on the previous patch. :-) From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 30 13:09:25 2024 Received: (at 73260) by debbugs.gnu.org; 30 Sep 2024 17:09:25 +0000 Received: from localhost ([127.0.0.1]:45923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svJtk-0006sU-It for submit@debbugs.gnu.org; Mon, 30 Sep 2024 13:09:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svJth-0006rM-A5 for 73260@debbugs.gnu.org; Mon, 30 Sep 2024 13:09:22 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svJt4-0001Er-No; Mon, 30 Sep 2024 13:08:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=NrVup4C41sjYuNia4A0gZkdBoRwWvKq3au/VLH2XM1A=; b=U1ocXoUZYPNzHNGuYK0a uzL3bSFsuDOJjjCNWKU9cTuXYc5hVdXPmnGFMzAfsCMcYNIrKPSdnbuP0owf8Lf7l5z66IC/PavoR qFaQ3VCyRmJqk8+dyClo0af7Rou2ZYDuoqQHXE1OBojN8ORgiu6KDBBJB+uDMO+6Ai64DnflRKkNE TVZTGnosARQy+PH8e/fui1tRGrsqCB8T86RiUteSj8Ki8tz8kWsQBoOOgnEVMha4HRJYzt6LBZJDT UINCtrts25QE4Ekm0pc6FyNn85fzB0NuEy4Y2V502ryxXUTqtg+RmMT/Bn7irIu+tMwTeFjld0xdp xGuYATSXU3FLtw==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Giacomo Leidi Subject: Re: bug#73260: Add libguestfs In-Reply-To: (Giacomo Leidi's message of "Sat, 14 Sep 2024 23:20:58 +0200") References: <247263a340d7dedbf4671ebaf75da540e7e62734.1726348858.git.goodoldpaul@autistici.org> Date: Mon, 30 Sep 2024 19:08:40 +0200 Message-ID: <87r0915asn.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73260 Cc: 73260@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Giacomo Leidi skribis: > * gnu/packages/virtualization.scm (libguestfs): New variable. > > Change-Id: I99243550a7a6c9d787fa1a67e54acefd3deeaf1f [...] > +(define-public libguestfs > + (package > + (inherit libguestfs-minimal) Rather: (package/inherit libguestfs-minimal =E2=80=A6) so that the =E2=80=98replacement=E2=80=99 field is inherited too, should it= ever be used in the future. Could you send updated patches? Thanks for the great work! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 04 18:31:25 2024 Received: (at 73260) by debbugs.gnu.org; 4 Oct 2024 22:31:25 +0000 Received: from localhost ([127.0.0.1]:36774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swqpY-0001N5-UC for submit@debbugs.gnu.org; Fri, 04 Oct 2024 18:31:25 -0400 Received: from confino.investici.org ([93.190.126.19]:38427) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swqpW-0001Mw-BT for 73260@debbugs.gnu.org; Fri, 04 Oct 2024 18:31:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1728081070; bh=CVz0jObQvnpdyhe1w8Hz6YQ8vDBnGPUaJFHEZr+iShk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=sjhAYYbyeQbIiiw/mTH23WpDF+ctFGzBawFGq67n4KDmssBZrLQ4+9znsBbe+bUGm oqkAR5qdMxAJXE6eBM1uwNgsdbL/tIueBxooitK/0H1kvZJKRQez45XDZJl4iswac0 DfWZjk39nDoBvgzCzKi0kDftBmxR6aPU6D4wlZWw= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4XL3DG1YC8z11H1; Fri, 4 Oct 2024 22:31:10 +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 4XL3DG0wFZz11C9; Fri, 4 Oct 2024 22:31:10 +0000 (UTC) Message-ID: Date: Sat, 5 Oct 2024 00:31:09 +0200 MIME-Version: 1.0 User-Agent: Icedove Daily Subject: Re: bug#73260: Add libguestfs To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= References: <247263a340d7dedbf4671ebaf75da540e7e62734.1726348858.git.goodoldpaul@autistici.org> <87r0915asn.fsf_-_@gnu.org> Content-Language: en-US From: paul In-Reply-To: <87r0915asn.fsf_-_@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73260 Cc: 73260@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Ludo’ , I should have addressed your comments, I'm sending a v2 patchset. Thank you for your help, From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 04 18:32:20 2024 Received: (at 73260) by debbugs.gnu.org; 4 Oct 2024 22:32:21 +0000 Received: from localhost ([127.0.0.1]:36778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swqqS-0001Om-8v for submit@debbugs.gnu.org; Fri, 04 Oct 2024 18:32:20 -0400 Received: from confino.investici.org ([93.190.126.19]:33125) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swqqO-0001Oa-RR for 73260@debbugs.gnu.org; Fri, 04 Oct 2024 18:32:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1728081132; bh=3F6p8tDcLBf4PDxIXFRnFFZIpK4tA6jnaV3WtB2eEk8=; h=From:To:Cc:Subject:Date:From; b=E/TIgDxJr33PlFxvgNjvu2sKyPSZ2aKZS8dHoT/cuagTWhdLzhRU4olK4BnM9ZvwE YjB8MicWyYlagspvCAGU5UNrSOJo5tBsd6+tysJolZktNEhhcX3OyxUVo2KjAoF0ny o3Yoln+3S8TvgJ2hxEaEDqVwzhe6+QTisC+/syUE= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4XL3FS4FCdz11Dx; 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 4XL3FS3TNGz11C9; Fri, 4 Oct 2024 22:32:12 +0000 (UTC) From: Giacomo Leidi To: 73260@debbugs.gnu.org Subject: [PATCH v2 1/3] gnu: Add hivex. Date: Sat, 5 Oct 2024 00:31:42 +0200 Message-ID: <42a57a06130e77a6471ea9717a670306283ecb51.1728081104.git.goodoldpaul@autistici.org> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73260 Cc: Giacomo Leidi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/virtualization.scm (hivex): New variable. Change-Id: I9828d267d5c6f24dc5039ea3b1849248cd9d23fb --- gnu/packages/virtualization.scm | 111 ++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 59137eb2d4..4ad94ea8e5 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -37,6 +37,7 @@ ;;; Copyright © 2024 jgart ;;; Copyright © 2024 Ashish SHUKLA ;;; Copyright © 2024 Jakob Kirsch +;;; Copyright © 2024 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -114,6 +115,7 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages nettle) #:use-module (gnu packages networking) #:use-module (gnu packages ninja) + #:use-module (gnu packages ocaml) #:use-module (gnu packages onc-rpc) #:use-module (gnu packages package-management) #:use-module (gnu packages pciutils) @@ -2900,3 +2902,112 @@ (define-public riscv-pk supervisor execution environment for tethered RISC-V systems. It is designed to host the RISC-V Linux port.") (license license:bsd-3))) + +(define-public hivex + (package + (name "hivex") + (version "1.3.24") + (source (origin + (method url-fetch) + (uri (string-append "https://libguestfs.org/download/" + name "/" name "-" version ".tar.gz")) + (sha256 + (base32 + "0g0rib62qg81fda8lxsaa7a1ykqy4rl5sq185pdqm9y9xifa8bx5")))) + (build-system gnu-build-system) + (native-inputs (list automake + autoconf + gettext-minimal + libtool + ocaml + pkg-config + perl-io-stringy + python-wrapper + ruby + ruby-rake + ruby-rdoc)) + (inputs + (list bash-minimal + libxml2 + perl + readline)) + (arguments + (list + #:configure-flags + #~(list "--disable-static" "--with-readline" "--disable-rpath" + (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-makefiles + (lambda _ + (let* ((current-system (or #$(%current-target-system) + #$(%current-system))) + (ocamllib + (string-append #$output "/lib/ocaml/" + #$(package-version + (this-package-native-input "ocaml")) "/site-lib")) + (python-installdir + (string-append #$output "/lib/python" + #$(version-major+minor + (package-version + (this-package-native-input + "python-wrapper"))) + "/site-packages")) + (ruby-version + #$(package-version + (this-package-native-input "ruby"))) + (ruby-libdir + (string-append #$output + "/lib/ruby/site_ruby/" + ruby-version)) + (ruby-archdir + (string-append ruby-libdir "/" current-system))) + (substitute* "lib/Makefile.am" + (((string-append "\\$\\(VERSION_SCRIPT_FLAGS\\)" + "\\$\\(srcdir\\)/hivex\\.syms")) + "")) + (substitute* "python/Makefile.am" + (("\\$\\(PYTHON_INSTALLDIR\\)") + python-installdir)) + (substitute* "ocaml/Makefile.am" + (("\\$\\(DESTDIR\\)\\$\\(OCAMLLIB\\)") + ocamllib)) + (substitute* "ruby/Makefile.am" + (("\\$\\(DESTDIR\\)\\$\\(RUBY_ARCHDIR\\)") + ruby-archdir) + (("\\$\\(DESTDIR\\)\\$\\(RUBY_LIBDIR\\)") + ruby-libdir)) + ;; The ‘validate-runpath’ phase fails to find libhivex.so.0. + (substitute* "perl/Makefile.PL.in" + (("CCFLAGS => \\$Config\\{ccflags\\} \\. ' @CFLAGS@',") + (string-append "CCFLAGS => $Config{ccflags} . ' @CFLAGS@', + LDDLFLAGS => $Config{lddlflags} . ' -Wl,-rpath," #$output "/lib',"))) + (substitute* "ruby/ext/hivex/extconf.rb" + (("create_header") + (string-append " +$LDFLAGS += \" -Wl,-rpath=" #$output "/lib \" +create_header")))))) + (add-after 'install 'wrap-binaries + (lambda _ + (let ((hivexregedit + (string-append #$output "/bin/hivexregedit")) + (hivexml + (string-append #$output "/bin/hivexml"))) + (wrap-program hivexregedit + `("PERL5LIB" ":" prefix + (,(string-append #$output "/lib/perl5/site_perl"))) + `("PATH" ":" prefix + (,(string-append #$output "/bin")))) + (wrap-program hivexml + `("PATH" ":" prefix + (,(string-append #$output "/bin")))))))))) + (home-page "https://github.com/libguestfs/hivex") + (synopsis "Windows registry hive extraction library") + (description + "This package provides a self-contained library for reading and writing +Windows Registry \"hive\" binary files. Unlike many other tools in this area, +it doesn't use the textual @code{.REG} format for output, because parsing that +is as much trouble as parsing the original binary format. Instead it makes the +file available through a C API, or through a separate program to export the +hive as XML.") + (license license:lgpl2.1))) base-commit: 7e63a35ff265f5cb6efa8bbe0bbf62bb9c102cf0 -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 04 18:32:26 2024 Received: (at 73260) by debbugs.gnu.org; 4 Oct 2024 22:32:26 +0000 Received: from localhost ([127.0.0.1]:36782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swqqX-0001P5-WC for submit@debbugs.gnu.org; Fri, 04 Oct 2024 18:32:26 -0400 Received: from confino.investici.org ([93.190.126.19]:49823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swqqW-0001Oy-I1 for 73260@debbugs.gnu.org; Fri, 04 Oct 2024 18:32:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1728081133; bh=alMyXfrwJPaXbi4KpmmDofuX0bB2CVcYAa7cdWVrR38=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DgC3H+d7GGiZh8tDyaTyHf0vPmqg1bOCU4A4FoHZ2leM5aG6+1EEwaKNReMOlcU3j dKteYmw+05uGydbbydrI757ZTfq3kndoO5aFeUpWKtnRTftCjdCtprxRWmNVBQTj8r 20wVjXGqXWS1ZMZIjJGmYrFQ9jzP3Sw0JB6p9hQA= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4XL3FT1KLKz11H1; Fri, 4 Oct 2024 22:32:13 +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 4XL3FT0ZV9z11C9; Fri, 4 Oct 2024 22:32:13 +0000 (UTC) From: Giacomo Leidi To: 73260@debbugs.gnu.org Subject: [PATCH v2 3/3] gnu: Add libguestfs. Date: Sat, 5 Oct 2024 00:31:44 +0200 Message-ID: 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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73260 Cc: Giacomo Leidi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/virtualization.scm (libguestfs): New variable. Change-Id: I99243550a7a6c9d787fa1a67e54acefd3deeaf1f --- gnu/packages/virtualization.scm | 90 +++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 4d3d7502f1..bfca5885c6 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 apparmor) #:use-module (gnu packages augeas) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) @@ -81,6 +82,7 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages cryptsetup) #:use-module (gnu packages curl) #:use-module (gnu packages cyrus-sasl) + #:use-module (gnu packages dbm) #:use-module (gnu packages debian) #:use-module (gnu packages disk) #:use-module (gnu packages dns) @@ -103,6 +105,7 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages gperf) #:use-module (gnu packages graphviz) #:use-module (gnu packages gtk) + #:use-module (gnu packages java) #:use-module (gnu packages haskell) #:use-module (gnu packages haskell-apps) #:use-module (gnu packages haskell-check) @@ -113,6 +116,7 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages libbsd) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) + #:use-module (gnu packages lua) #:use-module (gnu packages m4) #:use-module (gnu packages man) #:use-module (gnu packages multiprecision) @@ -3138,3 +3142,89 @@ (define-public libguestfs-minimal guests, P2V, V2V, performing backups, cloning VMs, building VMs, formatting disks, resizing disks, and much more.") (license (list license:gpl2+ license:lgpl2.1+)))) + +(define-public libguestfs + (package/inherit libguestfs-minimal + (name "libguestfs") + (arguments + (substitute-keyword-arguments (package-arguments libguestfs-minimal) + ((#:configure-flags flags) + #~(append + (filter + (lambda (flag) + (not (string-prefix? "LDFLAGS" flag))) + #$flags) + (list + "--enable-vala=yes" + (string-append "--with-python-installdir=" + #$output "/lib/python" + #$(version-major+minor + (package-version python)) + "/site-packages") + (string-append "LDFLAGS=-Wl,-rpath," %output "/lib")))) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'patch-makefiles 'patch-additional-makefiles + (lambda _ + (let* ((current-system (or #$(%current-target-system) + #$(%current-system))) + (lib (string-append #$output "/lib")) + (share (string-append #$output "/share")) + (completions + (string-append share "/bash-completion/completions")) + (lib/lua (string-append lib "/lua")) + (lib/ocaml (string-append lib "/ocaml")) + (ruby-version + #$(package-version + (this-package-native-input "ruby"))) + (ruby-libdir + (string-append lib + "/ruby/site_ruby/" + ruby-version)) + (ruby-archdir + (string-append ruby-libdir "/" current-system))) + (substitute* "m4/guestfs-bash-completion.m4" + (("`pkg-config --variable=completionsdir bash-completion`") + completions)) + (substitute* "ocaml/Makefile.am" + (("\\$\\(DESTDIR\\)\\$\\(OCAMLLIB\\)") + lib/ocaml)) + (substitute* "lua/Makefile.am" + (("\\$\\(DESTDIR\\)\\$\\(lualibdir\\)") + lib/lua)) + (substitute* "ruby/Makefile.am" + (("\\$\\(DESTDIR\\)\\$\\(RUBY_ARCHDIR\\)") + ruby-archdir) + (("\\$\\(DESTDIR\\)\\$\\(RUBY_LIBDIR\\)") + ruby-libdir)) + ;; The ‘validate-runpath’ phase fails to find libguestfs.so.0. + (substitute* "ruby/ext/guestfs/extconf.rb.in" + (("create_header") + (string-append " +$LDFLAGS += \" -Wl,-rpath=" #$output "/lib \" +create_header")))))))))) + (native-inputs + (modify-inputs (package-native-inputs libguestfs-minimal) + (prepend autoconf + automake + bash-completion + cdrtools + gobject-introspection + python + ruby + util-linux + vala))) + (inputs + (modify-inputs (package-inputs libguestfs-minimal) + (prepend acl + bdb + fuse + gmp + libapparmor + libcap + libcap-ng + libconfig + libvirt + libxcrypt + numactl + yajl))))) -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 04 18:32:29 2024 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) From: Giacomo Leidi To: 73260@debbugs.gnu.org Subject: [PATCH v2 2/3] gnu: Add libguestfs-minimal. 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-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73260 Cc: Giacomo Leidi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 07 06:40:49 2024 Received: (at 73260-done) by debbugs.gnu.org; 7 Oct 2024 10:40:49 +0000 Received: from localhost ([127.0.0.1]:45034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxlAX-0003hI-6s for submit@debbugs.gnu.org; Mon, 07 Oct 2024 06:40:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxlAS-0003h0-Vp for 73260-done@debbugs.gnu.org; Mon, 07 Oct 2024 06:40:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sxlAD-0003Kz-6i; Mon, 07 Oct 2024 06:40:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=BBlnNmE2I4LpT6f2H9eTVYjr0YeB5AIXFvWxr64TSFA=; b=ogG2GdGox4yt7aJPyVE+ 3bvZMRffob0GmpaddgKZOv9txFALi/mIQ96YbQAspZ1SEFQvE7VOZsiykJtoZLqx4pvejmQ0vKRv3 57kbP14yFKT6qkCpoMQft5bdjO6VF9tn+VP+wBCVWEwBdvQ8WRvbq3H2dtwel9W6fp16JXk39JARn Zl3K7JmzT+g2OqsNVC9+J2sCuvT+vpPTCHklfM7iY496XEb/8wpUN7fOO4c961eQo5aaFLKY8YCeK BDMwRvc1S1VAAFYGqsZD5WkAZlkvO4gPqLS3jWIk0l/omVu4TygRkAkKvOojlfpjftOYq5qam95do Niba89s08Bv4FQ==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Giacomo Leidi Subject: Re: bug#73260: Add libguestfs In-Reply-To: <42a57a06130e77a6471ea9717a670306283ecb51.1728081104.git.goodoldpaul@autistici.org> (Giacomo Leidi's message of "Sat, 5 Oct 2024 00:31:42 +0200") References: <0e7f7cc7-b6b8-0c97-f175-edd6d85a2eb1@autistici.org> <42a57a06130e77a6471ea9717a670306283ecb51.1728081104.git.goodoldpaul@autistici.org> Date: Mon, 07 Oct 2024 12:40:26 +0200 Message-ID: <87msjgxkkl.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73260-done Cc: 73260-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Giacomo, Applied, thanks! Ludo=E2=80=99. From unknown Sun Jun 22 17:16:44 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 04 Nov 2024 12:24:16 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator