GNU bug report logs - #70115
[PATCH] gnu: skopeo: Update to 1.15.0.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Tomas Volf <~@wolfsden.cz>; Keywords: patch; dated Sun, 31 Mar 2024 21:08:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 70115 <at> debbugs.gnu.org:


Received: (at 70115) by debbugs.gnu.org; 1 Apr 2024 13:05:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 01 09:05:26 2024
Received: from localhost ([127.0.0.1]:49820 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rrHLq-0004jI-1D
	for submit <at> debbugs.gnu.org; Mon, 01 Apr 2024 09:05:26 -0400
Received: from out203-205-221-153.mail.qq.com ([203.205.221.153]:41911)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <873216071@HIDDEN>) id 1rrHLi-0004io-6P
 for 70115 <at> debbugs.gnu.org; Mon, 01 Apr 2024 09:05:24 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512;
 t=1711976697; bh=I1+kZRPpZOls4/LUCcIBYEzX94bKLtNbquWHgKfuRas=;
 h=References:From:To:Cc:Subject:Date:In-reply-to;
 b=CP8DYa9HwquGFTnEF6Qld1SzIXrkbIdBN5kq8uA48rWMISqhvA7EYL5SV3PteYJyi
 Plv+53S9xT27rgqOoocoHTHdZQV0UWsh7CKklG/ZzeaTx2/BW+MoIsiK18W3+cgLBL
 WBorEx/nUYbZvGQ12TD5NTQfyJLDHvMAgIQ1c6uQ=
Received: from m ([2409:8a28:f1d:5040::1000])
 by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP
 id 1370B830; Mon, 01 Apr 2024 21:04:55 +0800
X-QQ-mid: xmsmtpt1711976695tvpdho0p9
Message-ID: <tencent_18D6D91F968E77797509496DD0E65B6A4D06@HIDDEN>
X-QQ-XMAILINFO: NE3QucI8OULeFgKBIneH9+s5HPuoKrbBzVRtPDg+5C5OPUkkOARPSk0xFu9Q3G
 MfWk9wGwoGnXkANzvC18Mv9JqPLow9fxJ+HTC65Nph17LuSbobW7XVKZKpBMIQR//hkKktoU5GPu
 H9l/f0P6gbyQnQHLlS3RCqZV3lc+4dTIX7qqyUafNNUJk9rpPQANNkNCyoD2lioIyy/TKss+AIKG
 tX4KeRIrPiCqNBNue+ZchyJqaj4eR4mvMiVKD3HfOcG4K6TA/wOYhfWRBJRcolSSLbOBtEHVoAB9
 YxEdAVZdbMG573XetJyCJAM2rv1eUolPIIOaJX7A/1pCq4YGMJe7DutYdZnNLRYiYNePggaoybl1
 GvFSgohyOQQ1uQjkRC7FmAWljxdrXNO021AXirgBDMHZBp13+nq1KgGZPpmpPRkhB6Y1IoozLzbf
 DWUyi90ypXU9rgXB8Ogj9hqDFiYvlwbN2OMZAvsEDzlvdEqCg1ogEG2os8pSJZxh5hwFsCImbRL8
 rZtZYAECn/DG+Lmxr7CUuojfSCI9gPPT6TNbJXzmmHSCaIthlnx53JeovoYRFipQR4dutd3S1t57
 azXTN8u3b2mEcdi7K5dioKIIc24qrDu88DNofEwoGSuzThSlEYB5tp5GTnOJxZT/mrgYkgYmoDAH
 ST8emRj4pSrR8lbB3SJGutJJX9QYhxtQp5KAuGV0VOo7WFsvNIWHcnZOPvDD+1LMUiDO0VDXJLy0
 XHCn2DW6kvOC+Uw1ZJebCLfQxsa8tKDTork69WmS7Qc9rkxZqVpnmkZPgzhUNpnULdZA3Muh4P/d
 nsZX8OMbLeAGP1dO+3ngofOsF6ikP6ZsGW4SmOZ8K4f0NL6cpdJeEwHpLhHw1ItgaIDwtbBIPOIz
 1H04XK1oi5baPbsKTREdz9y5K+MFUQ/s6BnKaEzU8L5KdnaEXDIG78S2zt8TdMYY1HM1Fqccr0+M
 rn9BM18LomCw52DlZiLw==
X-QQ-XMRINFO: NS+P29fieYNw95Bth2bWPxk=
References: <071ced8c13ed07991da93082180cad133fe393aa.1711919102.git.~@wolfsden.cz>
User-agent: mu4e 1.10.8; emacs 30.0.50
From: Z572 <873216071@HIDDEN>
To: Tomas Volf <~@wolfsden.cz>
Subject: Re: [bug#70115] [PATCH] gnu: skopeo: Update to 1.15.0.
Date: Mon, 01 Apr 2024 20:37:45 +0800
In-reply-to: <071ced8c13ed07991da93082180cad133fe393aa.1711919102.git.~@wolfsden.cz>
Message-ID: <874jcl44k2.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 3.9 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: Tomas Volf writes: > 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 (skop [...]
 Content analysis details:   (3.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [203.205.221.153 listed in list.dnswl.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (873216071[at]qq.com)
 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
 in digit (873216071[at]qq.com)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.4 RDNS_DYNAMIC           Delivered to internal network by host with
 dynamic-looking rDNS
 3.2 HELO_DYNAMIC_IPADDR    Relay HELO'd using suspicious hostname (IP
 addr 1)
X-Debbugs-Envelope-To: 70115
Cc: 70115 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Tomas Volf writes: > 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 (skop [...]
    
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [203.205.221.153 listed in list.dnswl.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (873216071[at]qq.com)
  0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
                             in digit (873216071[at]qq.com)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  3.2 HELO_DYNAMIC_IPADDR    Relay HELO'd using suspicious hostname (IP
                             addr 1)
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable


Tomas Volf <~@wolfsden.cz> writes:

> The package is also converted to gnu-build-system in order to take advant=
age
> of already existing Makefile instead of reinventing (parts) of it in Guil=
e.
>
> * 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(-)
>
> diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualizatio=
n.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 Do=
cker
> -       #: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=3D" out)))))))))
> +     (list
> +      #:make-flags
> +      #~(list (string-append "CC=3D" #$(cc-for-target))
> +              "PREFIX=3D"
> +              (string-append "DESTDIR=3D" #$output)
> +              (string-append "GOMD2MAN=3D"
> +                             #$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=3D/homeless-s=
helter.
> +              (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))))

I don't think this is a good idea. Why not "$(CC)", this env can get
from set-env phase.

> +                        '("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")))))

It would be nice to add some comments about why need wrap /run/setuid-progr=
ams .

> +          (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 regist=
ries")
>      (description


--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfr6klGDOXiwIdX/bO1qpk+Gi3/AFAmYKsO4ACgkQO1qpk+Gi
3/BEPA/9HQurwrepNv47qTjU8MwuhyIyjApxUgVfj8bOyJ0OMqT7ZgctEgIuAdu8
s0B55l8B4DDGZYe9nn6pyXGuXmUKOxToaBUK4xUryiJf1RhY7V7FdX1xQMl1YI39
NB2h9h2lqBfru+AzF+hgtHY3vYCUMHW4+PGUvHiltMf4YZSzQYnWQSX0O37ex4B0
Q1PhYd+6jDsc+/qVsxO/USHU0V1HmnbciJzKCl5BJCNWm1mcZ6X5r3JNAO0me1Vf
2LWTfanDguwMByw8KK4rUA8oN6TQmvsJyJpzaWpJV8lYkhhWqjNloBKLYgVHjQS2
fHHqOHg5DnuWei642yF5Y0AE2oV+BsrLkCfxFPzl6BeOxjFoL+69jhFk/kvsuURK
KiDBjAGAVCFXLrQwYpkHq0uiXUN7zMYXOYA/pat6PSV4xjv0iqmM2Ytqdjbe2UmO
QU4D9sK30lCBhdH9p3isnddQeVJ7cNlB1apgnqZGD3JaNvSf5eDJ4Eo4MGwy/13E
pEbYJuI9x/ds+yqx6+4FpFDgawi8MEdDgDbVHX2ve7tHqZYVUoTu32bppEoAn3ze
OcfzYnR648zy0iFPtXsVwKe0PJrV5FODrk/aAHBNUOAKPSq1+3940hjqKL17u5Ks
DCsAOcjxhzLe9ieND6KJoZar9FysOCjDt8Ogyr2v3c7PvahlpaM=
=RIkg
-----END PGP SIGNATURE-----
--=-=-=--





Information forwarded to guix-patches@HIDDEN:
bug#70115; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 31 Mar 2024 21:07:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 31 17:07:42 2024
Received: from localhost ([127.0.0.1]:48695 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rr2Oz-0004Uy-Kl
	for submit <at> 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 <at> 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@HIDDEN; 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@HIDDEN; 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=
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden
X-Spam-Level: 
X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED
 autolearn=unavailable autolearn_force=no version=3.4.6
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>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: skopeo: Update to 1.15.0.
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
Content-Transfer-Encoding: 8bit
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-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
Cc: Tomas Volf <~@wolfsden.cz>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

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(-)

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
--
2.41.0




Acknowledgement sent to Tomas Volf <~@wolfsden.cz>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#70115; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 1 Apr 2024 13:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.