[ARVADOS] updated: 1.3.0-2973-g20649f2d5

Git user git at public.arvados.org
Tue Nov 10 22:15:46 UTC 2020


Summary of changes:
 cmd/arvados-dev/buildpackage.go | 11 +++++++++++
 1 file changed, 11 insertions(+)

       via  20649f2d57f8e5c8bddfb672c164b7a96f75efab (commit)
      from  821c7273388a56ad5ae9b89a0cf2f351388e8b61 (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 20649f2d57f8e5c8bddfb672c164b7a96f75efab
Author: Ward Vandewege <ward at curii.com>
Date:   Tue Nov 10 17:15:08 2020 -0500

    16306: shrink package size by removing unused cache and .git directories
           under /var/www/.gem/
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/cmd/arvados-dev/buildpackage.go b/cmd/arvados-dev/buildpackage.go
index c562c5685..93482e1c7 100644
--- a/cmd/arvados-dev/buildpackage.go
+++ b/cmd/arvados-dev/buildpackage.go
@@ -69,6 +69,14 @@ func (bldr *builder) run(ctx context.Context, prog string, args []string, stdin
 	if err != nil {
 		return fmt.Errorf("gem install fpm: %w", err)
 	}
+	// Shrink our package, remove unneeded stuff
+	cmd = exec.Command("bash", "-c", "rm -rf /var/www/.gem/ruby/*/cache/ /var/www/.gem/ruby/*/bundler/gems/arvados-*/.git /var/www/.gem/ruby/*/bundler/gems/nulldb-*/.git /var/www/.gem/ruby/*/bundler/gems/themes_for_rails-*/.git")
+	cmd.Stdout = stdout
+	cmd.Stderr = stderr
+	err = cmd.Run()
+	if err != nil {
+		return fmt.Errorf("rm -rf /var/www/.gem/ruby/*/cache/: %w", err)
+	}
 
 	format := "deb" // TODO: rpm
 
@@ -88,6 +96,9 @@ func (bldr *builder) run(ctx context.Context, prog string, args []string, stdin
 		"--deb-use-file-permissions",
 		"--rpm-use-file-permissions",
 		"--exclude", "var/lib/arvados/go",
+		"--exclude", "tmp",
+		"--exclude", "log",
+		"--exclude", "coverage",
 		"/var/lib/arvados",
 		"/var/www/.gem",
 		"/var/www/.passenger",

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list