[tbb-commits] [Git][tpo/applications/tor-browser-build][maint-13.0] Bug 41102: Compress firefox source tarball in a container

boklm (@boklm) git at gitlab.torproject.org
Mon Mar 11 14:49:01 UTC 2024



boklm pushed to branch maint-13.0 at The Tor Project / Applications / tor-browser-build


Commits:
c73503ae by Nicolas Vigier at 2024-03-11T15:48:23+01:00
Bug 41102: Compress firefox source tarball in a container

As the xz version on the host can be different and produce different
output, we compress the firefox source tarball inside a container.

At the same time we use xz's --threads option to make compression
faster by using multiple threads.

We also move the src-tarballs step definition from rbm.conf to
projects/firefox/config since it's not used in any other project.

- - - - -


3 changed files:

- projects/firefox/config
- projects/release/config
- rbm.conf


Changes:

=====================================
projects/firefox/config
=====================================
@@ -58,9 +58,25 @@ steps:
   src-tarballs:
     filename: 'src-[% project %]-[% c("version") %].tar.xz'
     version: '[% c("git_hash") %]'
-    input_files: []
+    input_files:
+      - project: container-image
+        pkg_type: build
+    compress_tar: ''
     container:
-      use_container: 0
+      use_container: 1
+    var:
+      # single-thread and multi-thread xz will generate a different result,
+      # se we use at least 2 threads
+      xz_threads: '[% c("num_procs") == "1" ? "2" : c("num_procs") %]'
+    src-tarballs: |
+      #!/bin/bash
+      set -e
+      mkdir -p '[% dest_dir %]'
+      # Files copied to the container are owned by group root (rbm#40074),
+      # and it seems xz doesn't like that and exits with an error
+      chgrp rbm '[% project %]-[% c("version") %].tar'
+      xz --threads=[% c("var/xz_threads") %] -f '[% project %]-[% c("version") %].tar'
+      mv -vf '[% project %]-[% c("version") %].tar.xz' '[% dest_dir %]/[% c("filename") %]'
     targets:
       nightly:
         version: '[% c("abbrev") %]'


=====================================
projects/release/config
=====================================
@@ -229,8 +229,7 @@ input_files:
    pkg_type: src-tarballs
    target:
      - '[% c("var/build_target") %]'
-     - browser-src
-     - '[% c("var/browser_type") %]'
+     - '[% c("var/browser_type") %]-macos'
 
 steps:
   signtag:


=====================================
rbm.conf
=====================================
@@ -14,14 +14,6 @@ container:
     build: 1
 
 steps:
-  src-tarballs:
-    compress_tar: xz
-    src-tarballs: |
-      #!/bin/bash
-      set -e
-      mkdir -p '[% dest_dir %]'
-      mv -vf '[% project %]-[% c("version") %].tar.xz' '[% dest_dir %]/[% c("filename") %]'
-
   list_toolchain_updates:
     build_log: '-'
     list_toolchain_updates: '[% INCLUDE list_toolchain_updates %]'



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/c73503aeb29d458d182ea0e62b42a99cf1443d96

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/c73503aeb29d458d182ea0e62b42a99cf1443d96
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20240311/96048fbb/attachment-0001.htm>


More information about the tbb-commits mailing list