From patchwork Sun Mar 31 21:05:02 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: 62403 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 BB11927BBE2; Sun, 31 Mar 2024 22:08:17 +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 80AC327BBE9 for ; Sun, 31 Mar 2024 22:08:16 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rr2PJ-0006fR-KT; Sun, 31 Mar 2024 17:08: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 1rr2PI-0006fF-SY for guix-patches@gnu.org; Sun, 31 Mar 2024 17:08: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 1rr2PI-0003oa-K9 for guix-patches@gnu.org; Sun, 31 Mar 2024 17:08:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rr2PK-0004Xt-NG for guix-patches@gnu.org; Sun, 31 Mar 2024 17:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70115] [PATCH] gnu: skopeo: Update to 1.15.0. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 31 Mar 2024 21:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70115 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70115@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz> X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.171191926217301 (code B ref -1); Sun, 31 Mar 2024 21:08:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 Mar 2024 21:07:42 +0000 Received: from localhost ([127.0.0.1]:48695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rr2Oz-0004Uy-Kl for submit@debbugs.gnu.org; Sun, 31 Mar 2024 17:07:42 -0400 Received: from lists.gnu.org ([2001:470:142::17]:36332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1rr2Ow-0004Uk-Tr for submit@debbugs.gnu.org; Sun, 31 Mar 2024 17:07:39 -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 <~@wolfsden.cz>) id 1rr2Oo-0006Vx-Su for guix-patches@gnu.org; Sun, 31 Mar 2024 17:07:30 -0400 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1rr2Om-0003Mh-J8 for guix-patches@gnu.org; Sun, 31 Mar 2024 17:07:30 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 821C229F248; Sun, 31 Mar 2024 21:07:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1711919245; bh=mh93fn6G9uAa+Ou7Xg4QItzHDalo/keNcUcYNyT/sBA=; h=From:To:Cc:Subject:Date; b=UHYNW5EH+5mFjfpQ8EvE9ezG7dmYvrVpwVOvLTS5vFeRtHvMKwP04eYXTfjxh5Wio MmKbehuQ3Gu1RhGlTZsVusublRorJ4iEsk7FraVMwYMP4x9OCnDkncRirRSVcbh8OO b6NPgnwFrD4XK4wW/4a4YVf7x3RX6yw5zBuflG4MAAPC7Vs96R3Oxuueg7wpJjRq+6 5X3a05RRrUWG2wjQoCOLwkASIFMlHhRqYKiMbrS6RmpP1xG0ICCrpDwGWEdHpM8/fb rVCXQsKZN6OBHSWV9GqScgSgb9ObPskpY4XuYYyZ6Jf2WrTF1TetYWiqujZ7YCDc24 qBZSdcZv7xBHsHvnRynfNuE5pg7qo3Oegh42vT9e4ARCQ2clkduJYf8K4+nFk0yqC3 W7/M/m5BS7uIJhZhdCsQhO2ZXVC6kYmJrJDbvj20rKBdF5q/pWX/eI8PE55df2ZKMM qo93qa57N7vhMBkgAbLGaOCjJA8pkX854QTz6tvLevu/y7VPakJxp4ObRWZD2TWLa8 JyEoMG/nrm7+wEDQmbx6l3HTdF0tteXk0+Sz6IEUjZzYlYClk9jzuoi+Kh8TVzeiio PU67xv6qHWC7a2C8aaXyb8XMq+ZKu4TnmVTepT6kd83HuEgKrD70j5FNNiIssUXefE lVMCb9ODScgXLOKPGvBr0Yg0= Received: from localhost (unknown [193.32.127.158]) by wolfsden.cz (Postfix) with ESMTPSA id 0534C2A07B8; Sun, 31 Mar 2024 21:07:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1711919245; bh=mh93fn6G9uAa+Ou7Xg4QItzHDalo/keNcUcYNyT/sBA=; h=From:To:Cc:Subject:Date; b=UHYNW5EH+5mFjfpQ8EvE9ezG7dmYvrVpwVOvLTS5vFeRtHvMKwP04eYXTfjxh5Wio MmKbehuQ3Gu1RhGlTZsVusublRorJ4iEsk7FraVMwYMP4x9OCnDkncRirRSVcbh8OO b6NPgnwFrD4XK4wW/4a4YVf7x3RX6yw5zBuflG4MAAPC7Vs96R3Oxuueg7wpJjRq+6 5X3a05RRrUWG2wjQoCOLwkASIFMlHhRqYKiMbrS6RmpP1xG0ICCrpDwGWEdHpM8/fb rVCXQsKZN6OBHSWV9GqScgSgb9ObPskpY4XuYYyZ6Jf2WrTF1TetYWiqujZ7YCDc24 qBZSdcZv7xBHsHvnRynfNuE5pg7qo3Oegh42vT9e4ARCQ2clkduJYf8K4+nFk0yqC3 W7/M/m5BS7uIJhZhdCsQhO2ZXVC6kYmJrJDbvj20rKBdF5q/pWX/eI8PE55df2ZKMM qo93qa57N7vhMBkgAbLGaOCjJA8pkX854QTz6tvLevu/y7VPakJxp4ObRWZD2TWLa8 JyEoMG/nrm7+wEDQmbx6l3HTdF0tteXk0+Sz6IEUjZzYlYClk9jzuoi+Kh8TVzeiio PU67xv6qHWC7a2C8aaXyb8XMq+ZKu4TnmVTepT6kd83HuEgKrD70j5FNNiIssUXefE lVMCb9ODScgXLOKPGvBr0Yg0= From: Tomas Volf <~@wolfsden.cz> Date: Sun, 31 Mar 2024 23:05:02 +0200 Message-ID: <071ced8c13ed07991da93082180cad133fe393aa.1711919102.git.~@wolfsden.cz> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 --- This commit updates the skopeo, and also converts it to use gnu-build-system. Both is done in one commit, since 1.15 did not built just by straight-forward update, and due to the intended rewrite the time spent debugging that would be wasted. This (gnu-build-system) matches how podman and buildah are done in #70112 bringing all github.com/containers/* projects on the same model. gnu/packages/virtualization.scm | 80 ++++++++++++++++++++++----------- 1 file changed, 54 insertions(+), 26 deletions(-) -- 2.41.0 diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 251fe00aa0..60f43c19cf 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,51 @@ (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) + (string-append "g" all)))) + '("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 + ("/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