From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id gLxPGRW1CmbkGQAAe85BDQ:P1 (envelope-from ) for ; Mon, 01 Apr 2024 15:22:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id gLxPGRW1CmbkGQAAe85BDQ (envelope-from ) for ; Mon, 01 Apr 2024 15:22:29 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=UZZcIaKS; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=hnVUuMfl; dmarc=fail reason="SPF not aligned (relaxed)" header.from=wolfsden.cz (policy=none); 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711977749; a=rsa-sha256; cv=none; b=mAK0e72eHjWvOliSpHq5Ro1odVvIZIBv7Rs2oBM0lqHxeCT3kTFOW85rrCtV1KlrDUYUss 4TDentf9CQThu37O5uIkayFX3bJIp01uCOFdR3MmgBYkdFVLArO4lI+TBKJy3ziXIVp4Eq mUSkflPegFthCCRwnEsixJc9xnHxGIiF2mpRuj7dlAtHvlqQPvRp4DTw8Tjbz7JTRnkp+S TMLhp/Lqe+niF1mvOXuAmIHdU/qMfy7oV8Mx4b0vlGyDToGRKlITlU3fpt/kZLv8WqXoGa rK1ctNwOL5zkUpfUn8q/O5pbsiIQe0M7MNJvilQI6fFDKk2WZNHZiVk8gV3s1g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=UZZcIaKS; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=hnVUuMfl; dmarc=fail reason="SPF not aligned (relaxed)" header.from=wolfsden.cz (policy=none); 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711977749; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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=nr0wnLOKPDw7gTVESWeeb7FodkyiG70EFABjQYqa87A=; b=rL49koMz5suK+4ae5XQr9oTWFE+M8UXGlIOgse+TF9elf7Xfap9q9DhW9sDvKOBVeSSIpK IlSUIoDVslebQi4pHgR14IgdZDm/MyTJLLkJ0sNyxuKVj/jv9F9ovWxN7MWmO0KWz8KTS/ tfrJwSLRfix7H2ZCOXlnJMl6yyTT6Q+bcl9TUt/OGnrMjSk48qJIrzE0V9kt4H1OPtB9gd dOP79bMXFyGUJ4RVu0ehqK/Y7z0TBtLmAiGEgf0DFZgjUCPtKvSDT0+67rayt116Fq9Rs0 JkmiUZLNcSt9SLGD5Z3BVsISiqrGxQn3ReNJyrwdx/RWw5PuRM8mMfrJOpsplw== 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 B652434B0B for ; Mon, 1 Apr 2024 15:22:28 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrHbw-0007lY-F0; Mon, 01 Apr 2024 09:22:05 -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 1rrHbs-0007kv-91 for guix-patches@gnu.org; Mon, 01 Apr 2024 09:22: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 1rrHbr-0002CF-97 for guix-patches@gnu.org; Mon, 01 Apr 2024 09:21:59 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rrHbu-0007zQ-C5 for guix-patches@gnu.org; Mon, 01 Apr 2024 09:22: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: Mon, 01 Apr 2024 13:22:02 +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: Z572 <873216071@qq.com> Cc: 70115@debbugs.gnu.org Received: via spool by 70115-submit@debbugs.gnu.org id=B70115.171197767530652 (code B ref 70115); Mon, 01 Apr 2024 13:22:02 +0000 Received: (at 70115) by debbugs.gnu.org; 1 Apr 2024 13:21:15 +0000 Received: from localhost ([127.0.0.1]:49832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrHb8-0007yK-H9 for submit@debbugs.gnu.org; Mon, 01 Apr 2024 09:21:15 -0400 Received: from wolfsden.cz ([37.205.8.62]:42744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1rrHb3-0007y5-Hy for 70115@debbugs.gnu.org; Mon, 01 Apr 2024 09:21:13 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 8EC392A11BA; Mon, 1 Apr 2024 13:21:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1711977664; bh=YI+0T+QWfgkYBs3L6DUgNT/enUUSLMJKQmtqcpyGKzw=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=UZZcIaKSjtasC6i68oNTMaQ0BwAVYlr5MNaLp6G1tAX24fmj6cBdGYRuDEfPDvFID z6MDDJdjXwhn55PR2J9rzFC3wKkBaIpcm47stBUiheo5Kv/kgsNyTL2HLsRh4+RcrY Mxfwlg9MPnPY3ap4xzJXJx6TYvz/xlpj+owyY3sK6Rl/ArNVO+XBmoq0eOstjasewm k4wqUloZy3KTizc1UdqdZjr595j9WoNkM4C2oj97C5Sx97GkVg3vCGeyviAjsny0hP iqifGst+tpEKSadMA/qQX74e0pSS5t/NqTBe52McXFlRot7iJQlD1g0IwGHf8xmghK lxleaxu2aUB4xaxeGdMjvvascEWv+7APUsmdKkDW+gW+8nW3A5eo7ZOzGoujD+o+1n hyhvOstb3K/in3PvSmf/ZHCn6OMfkn/TsLUiu9QhIV20RWoE/VEyLMLGQl9vJBGEpA Wqn1x9y4HTdVJl0WZkUz+YlsYgvHnJ5T2FuiEqoXsLxd3JtEk4kPklfgMvgARNuC10 EKtq3iClWcmXAKyJf1ewktCYFNStnniOB8nFmVdKq62ueDDIBfYHjBfLdeqs68DwX9 CUkxrWMgRIn+xbI6q/BIjgDSol+ns9xe/5bc+Xd29B3X8fImXuFbHjF0XRlaFOCMSa wVTH2qcKJ4kJSaDGPon0q8wo= Received: from localhost (unknown [193.32.127.157]) by wolfsden.cz (Postfix) with ESMTPSA id A5E132A159F; Mon, 1 Apr 2024 13:21:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1711977663; bh=YI+0T+QWfgkYBs3L6DUgNT/enUUSLMJKQmtqcpyGKzw=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=hnVUuMfl5UtDzGo0NMleTI6rG8GDfO3Yf6Ax7JIaG++f9cEv0MIUWJ6Ar5STOtb85 uodloJwArWw4zYonf9LRNyGJ6gf5iOGXNPsLnB1PwLXMIFGizyFIbsdhhXxF9h1hPv cFzJsDSV8epmfeVE18wopFsImOIujbq9LQhVvaJ4F2wtaki80yZxeVtgr54Ous1Iig WUXU5Ziu/cJBNnWAVDNbyQQx1CkmOprGzCuoklLVciZmfoF9oRPrRB6JWy5tOUTJZF tGuUBPfAKN+hNmqeRBQpOp8YVsB2QSUExYjBKfyunBiGgLdHD5yKpRKPU97tlV+u4x xyQa0hyJ7SfNzOyQbBtfzWwib+OiKHqNW8bTv3BgKtt+NcngHpk4fNzk5/fS5uhzTr wYD4SCEgBLVGNDcluBEtEqxGB9SdPGzXvzfKVk0YKRPV9nbhidRUnAGDl2Q5tl4AYh tmvh2ZGWXsUL1Eb9hamZ0AYXYg7yEjBlt8FL2aFrbD2BtxA0x6iDhRx3as6hzXcWls /l8LffvONbS0njmsSSZ8DA9iMX6xhG57oZhax9pKyH8W3+Hd+kykCtHQ7ucvCFVMpO NpFlTQKzeX1Su8nJ21zxBXKrqfY0QvtgxAdSXvq+RPS/UlHfbIssYhUzA1uaxjrZ8W fFER7mrt/S0L+1LVQQESUZok= Date: Mon, 1 Apr 2024 15:21:03 +0200 From: Tomas Volf <~@wolfsden.cz> Message-ID: References: <071ced8c13ed07991da93082180cad133fe393aa.1711919102.git.~@wolfsden.cz> <874jcl44k2.fsf@qq.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="svBVo8/rVB8ypiiW" Content-Disposition: inline In-Reply-To: <874jcl44k2.fsf@qq.com> 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: 1.05 X-Migadu-Queue-Id: B652434B0B X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: 1.05 X-TUID: jUIMrLXXKFAk --svBVo8/rVB8ypiiW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2024-04-01 20:37:45 +0800, Z572 wrote: > > Tomas Volf <~@wolfsden.cz> 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 (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)))) > > I don't think this is a good idea. Why not "$(CC)", this env can get > from set-env phase. I mean, sure, I could do that. I do not think it really matters, since I *know* we are building with gcc, but will change it. > > > + '("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-programs . Will do. > > > + (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 > Thanks for review :) Tomas -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --svBVo8/rVB8ypiiW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmYKtL8ACgkQL7/ufbZ/ walswQ/7BpLAJG0Zrtv1gu8YzDqihCuU3yvih8IE+0qXmHWG4TR5W053+MBZRiGy bnoUYfdyJz+Uk4ACrpfRV8cN15fj+H9Wm7+opO0Pl3MhQzs8CcUCjenvD5g/DnZu 3dcTio40rYjw4RJYQa8HYIGg45cjYqb27GTnFKATTQPKMFoDEx6zkOK/x4IADKdQ gNyuHxa/KgotWQYId7lZIZXzodad3Z6bR2n7KddyrLF7mWszTN0Xqo22y1N//CPU Z3uucQ2pBDcJzHNHEsNzWYYyEmoJXyP6lVmUfDG7ubhN9kbF90yX1zLrrYNaplob 1KJOrCo+4gzAN2SnBLMvFQYuheJbrD7CEMsRwTZ8hUtEmoEts1rHKG5bcgZPqmJc 9635TvPnGeOdFD2hoIDRbgB9+XgAPcW5qm6b6OnFbSDgH81f76bUlWKrwCGUMkU+ XjzcXnpLNNzFO32nnrthkGrXWeGjobm3fOOzKyAmnIC6k+ZIfGTp0jAcrdZcMGFi rzONNHTfN1KsudT2+yRhlWnTUERbKSeJaHQu6YXVmsPF6Id0S2xTbnRGvOx1qaE0 n8YFRs95O8/rC1ju1mqC74bR/YK013mi+uSNuL/5J82B3K3RqQ7NI+V8Ts7g9GuN nszDGFDLAt+D29BqAhqoWTkpPSCvUF/JagXWbbY/uPENW9r0fHY= =3b6M -----END PGP SIGNATURE----- --svBVo8/rVB8ypiiW--