[bug#74746] Updating Docker to v27

Message ID CAM_04A02R+awxv1-4J1gkvpLybc6cCUMgf4yF7GxfGJeqzSaWQ@mail.gmail.com
State New
Headers
Series [bug#74746] Updating Docker to v27 |

Commit Message

Josep Bigorra Dec. 9, 2024, 2:55 p.m. UTC
  Hi all, I am struggling to get new Docker versions working on Guix.
For the this is critical for day to day work and I start to have some
problems due to running on old version.
I attempted some changes to the Guix package for docker but no
success. See the patch attached and the error message.

Thanks
Joe
  

Comments

Josep Bigorra Dec. 9, 2024, 3:12 p.m. UTC | #1
Thank you Janneke for the quick reply, I will continue pursuing a fix.
It seems like it will take me a while and I will need to be really at
my best, to understand the errors,
greetings
  
Janneke Nieuwenhuizen Dec. 9, 2024, 3:21 p.m. UTC | #2
Josep Bigorra writes:

> Hi all, I am struggling to get new Docker versions working on Guix.
> For the this is critical for day to day work and I start to have some
> problems due to running on old version.
> I attempted some changes to the Guix package for docker but no
> success. See the patch attached and the error message.

> starting phase `separate-from-pid1'

> Backtrace:
>           10 (primitive-load "/gnu/store/xgwamcagyz6lkf4hrwncdrxyc63…")
> In guix/build/gnu-build-system.scm:
>     966:2  9 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #)
> In ice-9/boot-9.scm:
>   1752:10  8 (with-exception-handler _ _ #:unwind? _ # _)
> In srfi/srfi-1.scm:
>     634:9  7 (for-each #<procedure fffff413cd80 at guix/build/gnu-b…> …)
> In ice-9/boot-9.scm:
>   1752:10  6 (with-exception-handler _ _ #:unwind? _ # _)
> In guix/build/gnu-build-system.scm:
>    987:23  5 (_)
> In ice-9/eval.scm:
>     619:8  4 (_ #(#(#<directory (guile-user) fffff778ec80>) (# # …)))
> In guix/build/utils.scm:
>    903:19  3 (with-atomic-file-replacement "vendor/github.com/conta…" …)
> In unknown file:
>            2 (mkstemp! "vendor/github.com/containerd/containerd/run…" …)

So this file "vendor/github.com/containerd/containerd/run…" does not
exist, which is visible from the unpack log.  You can just comment-out
that substitute line, or better yet, find out the new name of that
source file like you did with execution_unix.go-> execution_linux.go

It may be worth your while to check all the substitute* file names in
the "patch-paths" phase beforehand.

Greetings,
Janneke
  
Josep Bigorra Dec. 9, 2024, 3:51 p.m. UTC | #3
I am afraid I am at my knowledge's end. I think also the initial patch
i submitted is not helping at all.
I face countless problems at build time, and even the application of a
patch (containerd-create-pid-file.patch) is failing at guix build time
(while locally and manually it works fine).
I am officially calling it a day on this one, I am unfamiliar with
advanced Guix builds, and even more unfamiliar with how Docker
internally should build.
I would really appreciate some help from more experienced people here,
  
Josep Bigorra Dec. 9, 2024, 7:51 p.m. UTC | #4
I ended up going a different direction today and using root-less setup
with Podman. I am very happy with it, and wanted to teach others how
to achieve is in Guix:

https://jointhefreeworld.org/blog/articles/gnu-linux/podman-root-less-guix/

Still would be awesome to see Docker upgraded btw!

Greetings Joe
  
Sharlatan Hellseher Dec. 11, 2024, 6:52 p.m. UTC | #5
Hi,

Containerd package packed with all vendor preserved.
As the amount of missing packages are huge (the same case as
Kubo ipfs).

I'll take a look for solution as I'm in golang mod this week :-).

Thanks,
Oleg
  
Sharlatan Hellseher Dec. 11, 2024, 9:24 p.m. UTC | #6
Hi,

The initial attempt to update Docker has been failed.

I've madden a try to import containerd completely.

    guix go import --recursive github.com/containerd/containerd/v2

Produced 353 new packages which are overlap with missing in kubo,
matterbridge, prometheus, restic, afero and some other.
It would be nice unbundle each of them properly.

Scheduled for go-team, any help in packaging are welcome.

--
Thanks,
Oleg
  

Patch

From 9ac032ab3228f461467b63a164b76b3545b1bcf2 Mon Sep 17 00:00:00 2001
Message-ID: <9ac032ab3228f461467b63a164b76b3545b1bcf2.1733755906.git.jjbigorra@gmail.com>
From: Josep Bigorra <jjbigorra@gmail.com>
Date: Mon, 9 Dec 2024 15:50:43 +0100
Subject: [PATCH] attempt to update docker to v27

---
 gnu/packages/docker.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm
index b49dc58bd0..0798fd7285 100644
--- a/gnu/packages/docker.scm
+++ b/gnu/packages/docker.scm
@@ -55,7 +55,7 @@  (define-module (gnu packages docker)
 
 ;; Note - when changing Docker versions it is important to update the versions
 ;; of several associated packages (docker-libnetwork and go-sctp).
-(define %docker-version "20.10.27")
+(define %docker-version "27.3.1")
 
 (define-public python-docker
   (package
@@ -350,7 +350,7 @@  (define-public docker
       #~(modify-phases %standard-phases
           (add-after 'unpack 'patch-paths
             (lambda* (#:key inputs #:allow-other-keys)
-              (substitute* "builder/builder-next/executor_unix.go"
+              (substitute* "builder/builder-next/executor_linux.go"
                 (("CommandCandidates:.*runc.*")
                  (string-append "CommandCandidates: []string{\""
                                 (search-input-file inputs "/sbin/runc")
-- 
2.46.0