[ARVADOS] updated: 2.1.0-342-g81d57969e

Git user git at public.arvados.org
Tue Feb 2 20:25:38 UTC 2021


Summary of changes:
 cmd/arvados-package/build.go   | 11 ++---------
 cmd/arvados-package/cmd.go     | 10 ++++++++--
 cmd/arvados-package/fpm.go     |  5 +++++
 cmd/arvados-package/install.go | 36 ++++++++++++++++++++++++------------
 lib/boot/cmd.go                |  1 +
 5 files changed, 40 insertions(+), 23 deletions(-)

       via  81d57969ee70d6118937b4f4f61f6e1cd235de44 (commit)
       via  78762462bbea3d51223bdf0ed01668ac1bbbcedb (commit)
       via  40e21ed3a79d7da89b9805a700ff3844c7d9a610 (commit)
      from  eb0dd856470fe91ba4592ee24c05a5fed11af217 (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 81d57969ee70d6118937b4f4f61f6e1cd235de44
Author: Tom Clegg <tom at curii.com>
Date:   Tue Feb 2 15:24:25 2021 -0500

    16306: Don't generate Packages.gz until/unless testing the package.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/cmd/arvados-package/build.go b/cmd/arvados-package/build.go
index 6cbca5538..1437f4b77 100644
--- a/cmd/arvados-package/build.go
+++ b/cmd/arvados-package/build.go
@@ -128,15 +128,6 @@ func build(ctx context.Context, opts opts, stdin io.Reader, stdout, stderr io.Wr
 		return err
 	}
 
-	cmd = exec.CommandContext(ctx, "bash", "-c", "dpkg-scanpackages --multiversion . | gzip > Packages.gz.tmp && mv Packages.gz.tmp Packages.gz")
-	cmd.Stdout = stdout
-	cmd.Stderr = stderr
-	cmd.Dir = opts.PackageDir
-	err = cmd.Run()
-	if err != nil {
-		return fmt.Errorf("dpkg-scanpackages: %w", err)
-	}
-
 	return nil
 }
 
diff --git a/cmd/arvados-package/install.go b/cmd/arvados-package/install.go
index 91e6d8806..85c64b867 100644
--- a/cmd/arvados-package/install.go
+++ b/cmd/arvados-package/install.go
@@ -29,12 +29,6 @@ func testinstall(ctx context.Context, opts opts, stdin io.Reader, stdout, stderr
 	}
 	defer os.RemoveAll(tmpdir)
 
-	sourcesFile := tmpdir + "/arvados-local.list"
-	err = ioutil.WriteFile(sourcesFile, []byte("deb [trusted=yes] file:///pkg ./\n"), 0644)
-	if err != nil {
-		return fmt.Errorf("Write %s: %w", sourcesFile, err)
-	}
-
 	if exists, err := dockerImageExists(ctx, depsImageName); err != nil {
 		return err
 	} else if !exists || opts.RebuildImage {
@@ -47,15 +41,24 @@ func testinstall(ctx context.Context, opts opts, stdin io.Reader, stdout, stderr
 			"--name", depsCtrName,
 			"--tmpfs", "/tmp:exec,mode=01777",
 			"-v", opts.PackageDir+":/pkg:ro",
-			"-v", sourcesFile+":/etc/apt/sources.list.d/arvados-local.list:ro",
 			"--env", "DEBIAN_FRONTEND=noninteractive",
 			opts.TargetOS,
 			"bash", "-c", `
-set -e
+set -e -o pipefail
+apt-get update
+apt-get install -y --no-install-recommends dpkg-dev eatmydata
+
+mkdir /tmp/pkg
+ln -s /pkg/*.deb /tmp/pkg/
+(cd /tmp/pkg; dpkg-scanpackages --multiversion . | gzip > Packages.gz)
+echo >/etc/apt/sources.list.d/arvados-local.list "deb [trusted=yes] file:///tmp/pkg ./"
 apt-get update
-apt-get install -y eatmydata
+
 eatmydata apt-get install -y --no-install-recommends arvados-server-easy postgresql
+eatmydata apt-get remove -y dpkg-dev
+SUDO_FORCE_REMOVE=yes apt-get autoremove -y
 eatmydata apt-get remove -y arvados-server-easy
+rm /etc/apt/sources.list.d/arvados-local.list
 `)
 		cmd.Stdout = stdout
 		cmd.Stderr = stderr
@@ -80,19 +83,27 @@ eatmydata apt-get remove -y arvados-server-easy
 	cmd := exec.CommandContext(ctx, "docker", "run", "--rm",
 		"--tmpfs", "/tmp:exec,mode=01777",
 		"-v", opts.PackageDir+":/pkg:ro",
-		"-v", sourcesFile+":/etc/apt/sources.list.d/arvados-local.list:ro",
 		"--env", "DEBIAN_FRONTEND=noninteractive",
 		depsImageName,
 		"bash", "-c", `
-set -e
+set -e -o pipefail
 PATH="/var/lib/arvados/bin:$PATH"
 apt-get update
+apt-get install -y --no-install-recommends dpkg-dev
+mkdir /tmp/pkg
+ln -s /pkg/*.deb /tmp/pkg/
+(cd /tmp/pkg; dpkg-scanpackages --multiversion . | gzip > Packages.gz)
+apt-get remove -y dpkg-dev
+echo
+
+echo >/etc/apt/sources.list.d/arvados-local.list "deb [trusted=yes] file:///tmp/pkg ./"
+apt-get update
 eatmydata apt-get install --reinstall -y --no-install-recommends arvados-server-easy`+versionsuffix+`
-apt-get -y autoremove
+SUDO_FORCE_REMOVE=yes apt-get autoremove -y
+
 /etc/init.d/postgresql start
 arvados-server init -cluster-id x1234
 exec arvados-server boot -listen-host 0.0.0.0 -shutdown
-echo "PASS - server installed and booted successfully"
 `)
 	cmd.Stdout = stdout
 	cmd.Stderr = stderr
diff --git a/lib/boot/cmd.go b/lib/boot/cmd.go
index 373613bb3..963d16226 100644
--- a/lib/boot/cmd.go
+++ b/lib/boot/cmd.go
@@ -112,6 +112,7 @@ func (bcmd bootCommand) run(ctx context.Context, prog string, args []string, std
 			// ensuing "context cancelled" error, though:
 			// return nil to indicate successful startup.
 			_ = super.Wait()
+			fmt.Fprintln(stderr, "PASS - all services booted successfully")
 			return nil
 		}
 	}

commit 78762462bbea3d51223bdf0ed01668ac1bbbcedb
Author: Tom Clegg <tom at curii.com>
Date:   Tue Feb 2 11:12:52 2021 -0500

    16306: Print PASS line when testinstall succeeds.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/cmd/arvados-package/install.go b/cmd/arvados-package/install.go
index 984779950..91e6d8806 100644
--- a/cmd/arvados-package/install.go
+++ b/cmd/arvados-package/install.go
@@ -92,6 +92,7 @@ apt-get -y autoremove
 /etc/init.d/postgresql start
 arvados-server init -cluster-id x1234
 exec arvados-server boot -listen-host 0.0.0.0 -shutdown
+echo "PASS - server installed and booted successfully"
 `)
 	cmd.Stdout = stdout
 	cmd.Stderr = stderr

commit 40e21ed3a79d7da89b9805a700ff3844c7d9a610
Author: Tom Clegg <tom at curii.com>
Date:   Tue Feb 2 11:12:45 2021 -0500

    16306: Add package metadata.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/cmd/arvados-package/build.go b/cmd/arvados-package/build.go
index e826408c1..6cbca5538 100644
--- a/cmd/arvados-package/build.go
+++ b/cmd/arvados-package/build.go
@@ -113,6 +113,8 @@ func build(ctx context.Context, opts opts, stdin io.Reader, stdout, stderr io.Wr
 		"-package-version", opts.PackageVersion,
 		"-package-dir", "/pkg",
 		"-package-chown", opts.PackageChown,
+		"-package-maintainer", opts.Maintainer,
+		"-package-vendor", opts.Vendor,
 	)
 	cmd.Stdout = stdout
 	cmd.Stderr = stderr
diff --git a/cmd/arvados-package/cmd.go b/cmd/arvados-package/cmd.go
index 16d1fe89b..54f0809d6 100644
--- a/cmd/arvados-package/cmd.go
+++ b/cmd/arvados-package/cmd.go
@@ -64,12 +64,16 @@ type opts struct {
 	RebuildImage   bool
 	SourceDir      string
 	TargetOS       string
+	Maintainer     string
+	Vendor         string
 }
 
 func parseFlags(args []string) (opts, error) {
 	opts := opts{
-		SourceDir: ".",
-		TargetOS:  "debian:10",
+		SourceDir:  ".",
+		TargetOS:   "debian:10",
+		Maintainer: "Arvados Package Maintainers <packaging at arvados.org>",
+		Vendor:     "The Arvados Project",
 	}
 	flags := flag.NewFlagSet("", flag.ContinueOnError)
 	flags.StringVar(&opts.PackageVersion, "package-version", opts.PackageVersion, "package version to build/test, like \"1.2.3\"")
@@ -77,6 +81,8 @@ func parseFlags(args []string) (opts, error) {
 	flags.StringVar(&opts.PackageDir, "package-dir", opts.PackageDir, "destination directory for new package (default is cwd)")
 	flags.StringVar(&opts.PackageChown, "package-chown", opts.PackageChown, "desired uid:gid for new package (default is current user:group)")
 	flags.StringVar(&opts.TargetOS, "target-os", opts.TargetOS, "target operating system vendor:version")
+	flags.StringVar(&opts.Maintainer, "package-maintainer", opts.Maintainer, "maintainer to be listed in package metadata")
+	flags.StringVar(&opts.Vendor, "package-vendor", opts.Vendor, "vendor to be listed in package metadata")
 	flags.BoolVar(&opts.RebuildImage, "rebuild-image", opts.RebuildImage, "rebuild docker image(s) instead of using existing")
 	flags.Usage = func() {
 		fmt.Fprint(flags.Output(), `Usage: arvados-package <subcommand> [options]
diff --git a/cmd/arvados-package/fpm.go b/cmd/arvados-package/fpm.go
index c143e46ef..ca63929e9 100644
--- a/cmd/arvados-package/fpm.go
+++ b/cmd/arvados-package/fpm.go
@@ -79,6 +79,11 @@ func fpm(ctx context.Context, opts opts, stdin io.Reader, stdout, stderr io.Writ
 		"--package", pkgfile,
 		"--name", "arvados-server-easy",
 		"--version", opts.PackageVersion,
+		"--url", "https://arvados.org",
+		"--maintainer", opts.Maintainer,
+		"--vendor", opts.Vendor,
+		"--license", "GNU Affero General Public License, version 3.0",
+		"--description", "platform for managing, processing, and sharing genomic and other large scientific and biomedical data",
 		"--input-type", "dir",
 		"--output-type", format)
 	deps, err := install.ProductionDependencies()

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list