From patchwork Mon Apr 1 13:51:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Volf <~@wolfsden.cz> X-Patchwork-Id: 62432 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 59A1927BBEA; Mon, 1 Apr 2024 14:54:18 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D2D4027BBE9 for ; Mon, 1 Apr 2024 14:54:11 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrI6r-0004in-Te; Mon, 01 Apr 2024 09:54:02 -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 1rrI6p-0004hy-9b for guix-patches@gnu.org; Mon, 01 Apr 2024 09:54:00 -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 1rrI6p-0008EU-0e for guix-patches@gnu.org; Mon, 01 Apr 2024 09:53:59 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rrI6r-0000gl-UI for guix-patches@gnu.org; Mon, 01 Apr 2024 09:54:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70115] [PATCH v2] gnu: skopeo: Update to 1.15.0. References: <071ced8c13ed07991da93082180cad133fe393aa.1711919102.git.~@wolfsden.cz> In-Reply-To: <071ced8c13ed07991da93082180cad133fe393aa.1711919102.git.~@wolfsden.cz> Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 01 Apr 2024 13:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70115 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70115@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz> Received: via spool by 70115-submit@debbugs.gnu.org id=B70115.17119795842575 (code B ref 70115); Mon, 01 Apr 2024 13:54:01 +0000 Received: (at 70115) by debbugs.gnu.org; 1 Apr 2024 13:53:04 +0000 Received: from localhost ([127.0.0.1]:49844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrI5v-0000fT-Uu for submit@debbugs.gnu.org; Mon, 01 Apr 2024 09:53:04 -0400 Received: from wolfsden.cz ([37.205.8.62]:35626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1rrI5s-0000ew-Kb for 70115@debbugs.gnu.org; Mon, 01 Apr 2024 09:53:02 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id C766B2A1607; Mon, 1 Apr 2024 13:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1711979575; bh=FJjh+O25FTzUIfgrBL41Nu0VjmZ/o6ZbB3IwBQkRmzI=; h=From:To:Cc:Subject:Date; b=wdp9GVhevE7fKR5lmSpLXFSnfUjqEOFr0YZm5HhRyGpOmiYOJVz3HYDvDBKF13m7I yY/CFp8v+LXatVhDoOXqZ/OHwHYCLjSCj69HzQrz2aKNp3plxNFEcUfEigrJ3ji8rl LutkfwpcHrxhotnnQvFneSikYDRAE8s4nwOx6JDSVaz0gPxSjKN5HUWCTp+0okx/7e IEKQjBzqE9QCUX6xapSRDgx72gO7iNmElxEaYtR+8uPQllDyWcPhoI9fyhxtHibOXH Fo+p/bHQNL4AMO5g/LUNiX5YIhsbC9BhO2p64gpkSrVc+FUFCkOJodiFcQGSjvRjyZ x4apVgqiEMKL+iqE21Zk4mOirFZbTimUF35e75KZt4BH9B55FZbmhDwJuy+Qn1fhRT ySJMWyfqAgc2BRY8jH41X8dF4iH7LsKrJ1nLoJqBiTIBPQD0LoqbPoQnAsDMe5YzSA sV2Mp/s3qc83drt44o5cj25/354dB5vUdbcgzAdcVIHOe3FOnY0M4HTydM25+VEu8u gBr/QGTFAfFbEs/xxbnxhXp7pW3rxP4BlcC5I/TOdym9bCpWFwx6e+B/sSmYH1n28x s2m3iUTKPqUFxrsOnszcQEfvW6vdEV3GyhzgKant4JYXYiCudvCXYVqvmB/BXGJ1rU a/+r+78i3WMqyIrvFx5oD5RI= Received: from localhost (unknown [193.32.127.157]) by wolfsden.cz (Postfix) with ESMTPSA id 4FF9F2A0EFB; Mon, 1 Apr 2024 13:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1711979575; bh=FJjh+O25FTzUIfgrBL41Nu0VjmZ/o6ZbB3IwBQkRmzI=; h=From:To:Cc:Subject:Date; b=wdp9GVhevE7fKR5lmSpLXFSnfUjqEOFr0YZm5HhRyGpOmiYOJVz3HYDvDBKF13m7I yY/CFp8v+LXatVhDoOXqZ/OHwHYCLjSCj69HzQrz2aKNp3plxNFEcUfEigrJ3ji8rl LutkfwpcHrxhotnnQvFneSikYDRAE8s4nwOx6JDSVaz0gPxSjKN5HUWCTp+0okx/7e IEKQjBzqE9QCUX6xapSRDgx72gO7iNmElxEaYtR+8uPQllDyWcPhoI9fyhxtHibOXH Fo+p/bHQNL4AMO5g/LUNiX5YIhsbC9BhO2p64gpkSrVc+FUFCkOJodiFcQGSjvRjyZ x4apVgqiEMKL+iqE21Zk4mOirFZbTimUF35e75KZt4BH9B55FZbmhDwJuy+Qn1fhRT ySJMWyfqAgc2BRY8jH41X8dF4iH7LsKrJ1nLoJqBiTIBPQD0LoqbPoQnAsDMe5YzSA sV2Mp/s3qc83drt44o5cj25/354dB5vUdbcgzAdcVIHOe3FOnY0M4HTydM25+VEu8u gBr/QGTFAfFbEs/xxbnxhXp7pW3rxP4BlcC5I/TOdym9bCpWFwx6e+B/sSmYH1n28x s2m3iUTKPqUFxrsOnszcQEfvW6vdEV3GyhzgKant4JYXYiCudvCXYVqvmB/BXGJ1rU a/+r+78i3WMqyIrvFx5oD5RI= From: Tomas Volf <~@wolfsden.cz> Date: Mon, 1 Apr 2024 15:51:29 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches The package is also converted to gnu-build-system in order to take advantage of already existing Makefile instead of reinventing (parts) of it in Guile. * gnu/packages/virtualization.scm (skopeo)[version]: Update to 1.15.0. [build-system]: Use gnu-build-system. [native-inputs]: Add go-1.21, sort. [inputs]: Add bash-minimal. [arguments]<#:import-path, #:install-source?>: Delete. <#:make-flags, #:test-target, #:imported-modules>: New arguments. <#:phases>{'configure}: Delete. {'set-env, 'cc-to-gcc, 'wrap-skopeo, 'remove-go-references}: New phases. Change-Id: I1010e1f4fbdc093646c2879bdf30125ab2e88bdd --- v2: - Use "$CC" instead of hard-coding gcc. - Add comment why /run/setuid-programs is required. gnu/packages/virtualization.scm | 81 ++++++++++++++++++++++----------- 1 file changed, 55 insertions(+), 26 deletions(-) -- 2.41.0 diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 251fe00aa0..34cccd6550 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -151,6 +151,7 @@ (define-module (gnu packages virtualization) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix packages) + #:use-module (guix modules) #:use-module (guix utils) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) @@ -2257,7 +2258,7 @@ (define-public umoci (define-public skopeo (package (name "skopeo") - (version "1.2.3") + (version "1.15.0") (source (origin (method git-fetch) (uri (git-reference @@ -2266,12 +2267,15 @@ (define-public skopeo (file-name (git-file-name name version)) (sha256 (base32 - "0n22sdif437ddg5ch0ipwim3fg0n6ihc9bfi52qkhy3r1grz04hs")))) - (build-system go-build-system) + "1f9n3ysdmll7vq8dmgpv03m8aqq3w9cfvbmxxpwmnv1nlfc67ihq")))) + (build-system gnu-build-system) (native-inputs - (list pkg-config go-github-com-go-md2man)) + (list go-1.21 + go-github-com-go-md2man + pkg-config)) (inputs - (list btrfs-progs + (list bash-minimal + btrfs-progs eudev libassuan libselinux @@ -2280,27 +2284,52 @@ (define-public skopeo glib gpgme)) (arguments - '(#:import-path "github.com/containers/skopeo" - #:install-source? #f - #:tests? #f ; The tests require Docker - #:phases - (modify-phases %standard-phases - (replace 'build - (lambda* (#:key import-path #:allow-other-keys) - (with-directory-excursion (string-append "src/" import-path) - (invoke "make" "bin/skopeo")))) - (add-after 'build 'build-docs - (lambda* (#:key import-path #:allow-other-keys) - (with-directory-excursion (string-append "src/" import-path) - (invoke "make" "docs")))) - (replace 'install - (lambda* (#:key import-path outputs #:allow-other-keys) - (with-directory-excursion (string-append "src/" import-path) - (let ((out (assoc-ref outputs "out"))) - (install-file "default-policy.json" - (string-append out "/etc/containers")) - (invoke "make" "install-binary" "install-completions" "install-docs" - (string-append "PREFIX=" out))))))))) + (list + #:make-flags + #~(list (string-append "CC=" #$(cc-for-target)) + "PREFIX=" + (string-append "DESTDIR=" #$output) + (string-append "GOMD2MAN=" + #$go-github-com-go-md2man "/bin/go-md2man")) + #:tests? #f ; The tests require Docker + #:test-target "test-unit" + #:imported-modules + (source-module-closure `(,@%gnu-build-system-modules + (guix build go-build-system))) + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'set-env + (lambda _ + ;; When running go, things fail because HOME=/homeless-shelter. + (setenv "HOME" "/tmp") + ;; Required for detecting btrfs in hack/btrfs* due to bug in GNU + ;; Make <4.4 causing CC not to be propagated into $(shell ...) + ;; calls. Can be removed once we update to >4.3. + ;; + ;; This techically does nothing *now*, but after upstream + ;; issue[1] is solved and 'cc-to-gcc phase is removed, it will + ;; start being required. + ;; 1: https://github.com/containers/skopeo/issues/2278 + (setenv "CC" #$(cc-for-target)))) + (add-after 'unpack 'cc-to-gcc + (lambda _ + (for-each (lambda (file) + (substitute* file + (("^cc( -.*)" all rest) + (string-append "\"$CC\"" rest)))) + '("hack/btrfs_tag.sh" + "hack/btrfs_installed_tag.sh" + "hack/libdm_tag.sh" + "hack/libsubid_tag.sh")))) + (add-after 'install 'wrap-skopeo + (lambda _ + (wrap-program (string-append #$output "/bin/skopeo") + `("PATH" suffix + ;; We need at least newuidmap, newgidmap and mount. + ("/run/setuid-programs"))))) + (add-after 'install 'remove-go-references + (@@ (guix build go-build-system) remove-go-references))))) (home-page "https://github.com/containers/skopeo") (synopsis "Interact with container images and container image registries") (description