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 2GNvCQncfmeSUwEAe85BDQ:P1 (envelope-from ) for ; Wed, 08 Jan 2025 20:11:53 +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 2GNvCQncfmeSUwEAe85BDQ (envelope-from ) for ; Wed, 08 Jan 2025 21:11:53 +0100 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=lnGvUUde; dkim=fail ("headers rsa verify failed") header.d=hallsby.com header.s=google header.b=Sb26c20o; 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=1736367113; 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-type:content-type: 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=somyza2vcM3JVbXzqiKgg/8tRBGz7YaOKrulL5YOpaY=; b=lpbbN4ylXtaIEmq1TTyjTd67Ku0MAtO05My+tOVRqlzlgELhstwt2upHLgGzzbahsaC1S4 gEkzKSNlBPF31rj3xyF96yMoKR50D0K5oVFw8fmLfUaS+7CtMfDQTTlylgoyTk4LRUjnS6 XZV5v/g6q0pF2BDNFCFTY+sm+zXiPBMeKpqSw1t97q4g5qx/s5Ny8EzwwscvgSUW1bPWxU RcA7QyT8072TjmD/2BKvAraPU0gp+uVtkDwAKBzKSnMMfNE/rnYMEgE4FL9xK/4T3mvkPv DhHI3b7sSUuSHcbf2hw0jJ+pRBTfvQKlIx81WJiW7B+Lc6nB78c6tda3N/Otrw== 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=lnGvUUde; dkim=fail ("headers rsa verify failed") header.d=hallsby.com header.s=google header.b=Sb26c20o; 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=1736367113; a=rsa-sha256; cv=none; b=DVRcpOjq5LEbj4ntMrxCLYjbd6vHb3IxsckxQZ7mVDHV2GLiO3jEBkcy0gYs4Ih6Q/GmbH xl5tNEjT/2qNL3QmjSgIwV5vGxYDIG2qUxIMbc+ATdPEUHEFmT/1T64wQPZO3LrdNo852r AMSBVqw/Uh12+ZFbzVSTxnr0xcAQt82PMnq3+q3tIqORlEGPB9y9lSPRDGr74QOP+OUIEe ihO/V3TcUwu8paYuWH5Ezd4X90mRAcuBmp0pkK1NOpxejRcg+62i60uOERIiMJMystwzss wDMeNtv9IimXZdlcOSRGUnKUntuMDdmp9eRtoyMizJfMopw90Aapm7dkspBVmA== 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 9D04578BC4 for ; Wed, 08 Jan 2025 21:11:52 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVcOf-00041V-2h; Wed, 08 Jan 2025 15:11:21 -0500 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 1tVcON-0003nA-A3 for guix-patches@gnu.org; Wed, 08 Jan 2025 15:11:11 -0500 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 1tVcOM-0003Kf-Sm for guix-patches@gnu.org; Wed, 08 Jan 2025 15:11:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=somyza2vcM3JVbXzqiKgg/8tRBGz7YaOKrulL5YOpaY=; b=lnGvUUde0VHXXoqombJkn2+zZVj7Lqpb77sBWP/VlXwbXvvxkgH5Y0cRHX1toMtVL8lVNJ47oUFHGMYwPt3WnmVST7SUdEBYzgSn5FmZG0W6DwQ69Rl8vzuU0qcAqK3TROn9AFRJ00b1nWCb1ehDzttKYPwckE+VltlXy3s5VAcj+pT/8RPi6fA+ToDbe4x8IgY3aDZsrvaTKHZ9xUIlCIxw37D0ky/eK0j5c/NhLgthG23VIkBxZgcV73qEJZujfizOlzDO7AE8IzDQ3IUa/HIcXOSikRZuZQqOxom+Q0Q8jIFICf58lTozgUO3Oqmrr5FtTJLNoo1Oz6EEUE3PKg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVcOM-0000b1-DW; Wed, 08 Jan 2025 15:11:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#72249] [PATCH 1/2] gnu: Add xe-guest-utilities. References: In-Reply-To: Resent-From: Karl Hallsby Original-Sender: "Debbugs-submit" Resent-CC: sharlatanus@gmail.com, guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2025 20:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72249 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72249@debbugs.gnu.org Cc: Karl Hallsby , Sharlatan Hellseher X-Debbugs-Original-Xcc: Sharlatan Hellseher Received: via spool by 72249-submit@debbugs.gnu.org id=B72249.17363670432251 (code B ref 72249); Wed, 08 Jan 2025 20:11:02 +0000 Received: (at 72249) by debbugs.gnu.org; 8 Jan 2025 20:10:43 +0000 Received: from localhost ([127.0.0.1]:49092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVcO3-0000aF-0o for submit@debbugs.gnu.org; Wed, 08 Jan 2025 15:10:43 -0500 Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]:47188) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tVcNy-0000Zt-Sk for 72249@debbugs.gnu.org; Wed, 08 Jan 2025 15:10:41 -0500 Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-84cdb6fba9bso7426339f.2 for <72249@debbugs.gnu.org>; Wed, 08 Jan 2025 12:10:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hallsby.com; s=google; t=1736367032; x=1736971832; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=somyza2vcM3JVbXzqiKgg/8tRBGz7YaOKrulL5YOpaY=; b=Sb26c20of/AURoGK8rGljN9PwnZTiHUbPpODt1IIk9sriKhE+IO57CkQXxpX2vWTpf HPKt6hzb0iC6CV2NO3F81/zvYpUSf7jMrUZ3u0F+RgghLc240Z1tQSAff8GiJSo6g3wO k1AwsjzxkJyoILEAF1IWnC60QTrq5Y8MBq+tyKnNBoCEVJhGzXbrqFMoZ6WKhjORfLa/ 2oVx3qo0kctEWRmO13h2x4lFxLxdULREMODJLCPuqFmf5BTBgzKRftIKLA5v2604eUzJ N7LFC+rOcnvUl16By0YBrkLE3L1obnBaEUmp2ITUXFwWOxaeozxn2DCl5vT/F5I0L3o4 3c6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736367032; x=1736971832; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=somyza2vcM3JVbXzqiKgg/8tRBGz7YaOKrulL5YOpaY=; b=QBXCvR3UHOW3np8aJpa2fGZl2ilHngW43pWUWnwcIlO/65nambThX8zyoFWODWxgOy wxVZsUgIp0UGG73BXpx36uxz/1WRjpWPu6ToOOJKwy2yMIwjuGXWPmLQ4QdiFWPec4if IQptCtpMTz8dpO9I4yHBYdZzz+vcxpRw5IWvqx0iPimy0rFVF4m0+ElivI+EX+4SaWt8 1LPQLQiXWcjlkd/yAPE7EbVAsKNbJtAbWVwyi53XFe6VH1wQlpoWOIy3hCKxghyWnzmZ u9kpaXl6XmLj3diR3EXQnZh4IWciJ4YhdmbbrnC50DvXiWjdhqh+Vv2zPCF/vTiqPRYg OJGQ== X-Gm-Message-State: AOJu0YxvNqDLzOcmnDJr+aAWdJyDGEHzRm+W16/lo7pgB2v/1ySnY3kr 4bIUATPKmYbFEVZgTafYgrREQ3TrQvM1h84d+rcJjc+P0tUq2Xmdzsug7r3dRlqYIswWwu4C36c = X-Gm-Gg: ASbGncuUFYWgWVQoKT8owGTcQOlyI7pEJAIet9wMvk5d9snGwGjvKL8qqJwQ7yNwQV2 oQ7m07JZ358fY8XMaWgkL+la3dkahysOUz6wP/uvbC6sweA8ymJ1M3caMm4b1w3x0CfKipqgS0b /1ojJ3fiUQcUIRB/AKcHWNyyWeU43Nz2p1JEsA/xVcZjq+3uDJxABYrTuwK37Pjoz1AOcWmqf5o iFnNjZHBijdpflZAsoTUdIVsrzNZBMNnwvmnvusOzOSW6NUPFxeEs0oP+1MAQ== X-Google-Smtp-Source: AGHT+IHvmpSFqx64aHr0ZEYcZ2eK15e0bRCO5jVBNQyaNTq3AU/7VcfOZ/Z99A6zDeDg81MIum07KA== X-Received: by 2002:a05:6e02:87:b0:3a6:c98d:86bc with SMTP id e9e14a558f8ab-3ce3a86a258mr39807325ab.1.1736367032301; Wed, 08 Jan 2025 12:10:32 -0800 (PST) Received: from Karl-Desktop.raven ([207.237.222.72]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4e68c1df14csm10674260173.125.2025.01.08.12.10.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 12:10:31 -0800 (PST) Date: Wed, 8 Jan 2025 14:10:25 -0600 Message-ID: <6920fcb2b7edd619b323c7f70d076a7a73ab0463.1736366732.git.karl@hallsby.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: Karl Hallsby X-ACL-Warn: , Karl Hallsby via Guix-patches From: Karl Hallsby 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -3.48 X-Spam-Score: -3.48 X-Migadu-Queue-Id: 9D04578BC4 X-TUID: r9WCMpDG8Aya * gnu/packages/virtualization.scm (xe-guest-utilities): Init at 8.4.0 Change-Id: I4daf19dc1964be00554e1c598ef88897081f5d52 --- gnu/packages/virtualization.scm | 88 +++++++++++++++++++++++++++++++++ gnu/services/virtualization.scm | 1 + 2 files changed, 89 insertions(+) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 9dff421341..3b162474af 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -104,6 +104,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 golang-build) #:use-module (gnu packages gperf) #:use-module (gnu packages graphviz) #:use-module (gnu packages gtk) @@ -2772,6 +2773,93 @@ (define-public xen (license license:gpl2) (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux")))) +(define-public xe-guest-utilities + (package + (name "xe-guest-utilities") + (version "8.4.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/xenserver/xe-guest-utilities") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1yqspizhq3ii6cz2w75slaxy8838yyri9pmgc2q1radnm7w735if")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/xenserver/xe-guest-utilities" + #:install-source? #f + #:tests? #f ; There are no tests. + #:phases + #~(modify-phases %standard-phases + ;; Despite using go-build-system, this project does not use Go's build + ;; infrastructure to do anything, instead relying on a Makefile. + ;; NOTE: This target builds a tarball, but it is only filled with + ;; 2 binaries, 1 script, and a bunch of text files; it is tiny. + (add-after 'patch-source-shebangs 'fix-udev-rule + (lambda* (#:key inputs import-path #:allow-other-keys) + (substitute* (string-append "src/" import-path "/mk/xen-vcpu-hotplug.rules") + (("/bin/sh") (search-input-file inputs "/bin/sh"))))) + (replace 'build + (lambda* (#:key import-path #:allow-other-keys) + (let* ((version #$version) + (version-split (string-split version #\.)) + (major-version (list-ref version-split 0)) + (minor-version (list-ref version-split 1)) + (micro-version (list-ref version-split 2)) + (build-number "0")) + (with-directory-excursion (string-append "src/" import-path) + ;; Perform a buggy substitution. In Guix, the Go's guestmetric + ;; import will resolve to the source version, NOT the version + ;; the Makefile and sed substituted into build/. So we perform + ;; the correct substitution. + ;; This file list is what make & sed substitute, but we do it + ;; in-place too. + (substitute* (list "xe-daemon/xe-daemon.go" + "syslog/syslog.go" + "system/system.go" + "guestmetric/guestmetric.go" + "guestmetric/guestmetric_linux.go" + "xenstoreclient/xenstore.go" + "xenstore/xenstore.go") + (("@PRODUCT_MAJOR_VERSION@") major-version) + (("@PRODUCT_MINOR_VERSION@") minor-version) + (("@PRODUCT_MICRO_VERSION@") micro-version) + (("@NUMERIC_BUILD_NUMBER@") build-number)) + ;; Explicitly state version, removes git as native-input and + ;; removes using git commit hash as an ID. + ;; NOTE: The final step of the Makefile's build target is to "cd" + ;; to the final build directory. + (invoke "make" "build" + (string-append "RELEASE=" version) + (string-append "PRODUCT_MAJOR_VERSION=" major-version) + (string-append "PRODUCT_MINOR_VERSION=" minor-version) + (string-append "PRODUCT_MICRO_VERSION=" micro-version)))))) + ;; The default "install" actions produce package-manager-specific + ;; outputs, .deb, .rpm, and .tgz. We just copy the final build + ;; products out. + (replace 'install + (lambda* (#:key outputs import-path #:allow-other-keys) + (let* ((stage (string-append "src/" import-path "/build/stage")) + (out (assoc-ref outputs "out"))) + ;; Put udev rules in #$output/lib/udev/rules.d/ + (copy-recursively (string-append stage "/etc/udev") + (string-append out "/lib/udev")) + ;; Copy produced binaries and scripts + (copy-recursively (string-append stage "/usr") out))))))) + (native-inputs (list go-golang-org-x-sys)) + (inputs (list bash-minimal)) + (home-page "https://github.com/xenserver/xe-guest-utilities") + (synopsis "XenServer guest utilities for unix-like operating systems") + (description "The XenServer guest utilities enable a Xen-based hypervisor, +(Citrix XenServer, XCP-ng, etc.) to work with a Xen-enabled Unix-like guest VMs. +This allows the guest to share information about its state back to the host, +such IP address, memory usage, etc. and allows the host to inform the guest VM +about events that change the virtualized hardware, such as hotplugging.") + (license license:bsd-2))) + (define-public osinfo-db-tools (package (name "osinfo-db-tools") diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm index 53f79e367b..c32c47484c 100644 --- a/gnu/services/virtualization.scm +++ b/gnu/services/virtualization.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2022 Oleg Pykhalov ;;; Copyright © 2022 Leo Nikkilä ;;; Copyright © 2023 Efraim Flashner +;;; Copyright © 2024 Raven Hallsby ;;; ;;; This file is part of GNU Guix. ;;; base-commit: 4eaeff997907bc1b67884a6dc087756a50f175e2 -- 2.46.0