[ARVADOS] updated: 2.1.0-2456-g5596b6305

Git user git at public.arvados.org
Fri May 13 19:27:20 UTC 2022


Summary of changes:
 lib/install/deps.go | 40 ++++++++++++++++++++++++++++++++++++++--
 1 file changed, 38 insertions(+), 2 deletions(-)

       via  5596b6305dc208640ea2946d1fd8a0ac0075fc23 (commit)
      from  8c52491b9feedc523f5aa30721a5a496ebfe7ea6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 5596b6305dc208640ea2946d1fd8a0ac0075fc23
Author: Tom Clegg <tom at curii.com>
Date:   Fri May 13 15:26:35 2022 -0400

    19099: Add docker to development/test dependencies.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/lib/install/deps.go b/lib/install/deps.go
index 2d9da72b9..3ededf030 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -35,6 +35,7 @@ const (
 	rubyversion             = "2.7.5"
 	bundlerversion          = "2.2.19"
 	singularityversion      = "3.9.9"
+	dockerversion           = "5:20.10.13~3-0"
 	pjsversion              = "1.9.8"
 	geckoversion            = "0.24.0"
 	gradleversion           = "5.3.1"
@@ -199,6 +200,7 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
 		}
 		if dev || test {
 			pkgs = append(pkgs, "squashfs-tools") // for singularity
+			pkgs = append(pkgs, "gnupg")          // for docker install recipe
 		}
 		switch {
 		case osv.Debian && osv.Major >= 11:
@@ -223,6 +225,37 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
 		}
 	}
 
+	if dev || test {
+		if havedockerversion, err := exec.Command("docker", "--version").CombinedOutput(); err == nil {
+			logger.Printf("%s installed, assuming that version is ok", bytes.TrimSuffix(havedockerversion, []byte("\n")))
+		} else if osv.Debian {
+			var codename string
+			switch osv.Major {
+			case 10:
+				codename = "buster"
+			case 11:
+				codename = "bullseye"
+			default:
+				err = fmt.Errorf("don't know how to install docker-ce for debian %d", osv.Major)
+				return 1
+			}
+			err = inst.runBash(`
+rm -f /usr/share/keyrings/docker-archive-keyring.gpg
+curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
+echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian/ `+codename+` stable' | \
+    tee /etc/apt/sources.list.d/docker.list
+apt-get update
+DEBIAN_FRONTEND=noninteractive apt-get --yes --no-install-recommends install docker-ce
+`, stdout, stderr)
+			if err != nil {
+				return 1
+			}
+		} else {
+			err = fmt.Errorf("don't know how to install docker for osversion %v", osv)
+			return 1
+		}
+	}
+
 	os.Mkdir("/var/lib/arvados", 0755)
 	os.Mkdir("/var/lib/arvados/tmp", 0700)
 	if prod || pkg {
@@ -338,11 +371,14 @@ make -C ./builddir install
 			}
 		}
 
+		// Allow users in the "sudo" group to use
+		// --network=bridge without --fakeroot. (Currently
+		// tests use --fakeroot anyway.)
 		err = inst.runBash(`
 install /usr/bin/nsenter /var/lib/arvados/bin/nsenter
 setcap "cap_sys_admin+pei cap_sys_chroot+pei" /var/lib/arvados/bin/nsenter
-singularity config global --set 'allow net networks' bridge
-singularity config global --set 'allow net groups' sudo
+/var/lib/arvados/bin/singularity config global --set 'allow net networks' bridge
+/var/lib/arvados/bin/singularity config global --set 'allow net groups' sudo
 `, stdout, stderr)
 		if err != nil {
 			return 1

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list