[tbb-commits] [tor-browser-build/master] Bug 25876: Generate source tarballs during build
gk at torproject.org
gk at torproject.org
Tue Mar 12 14:12:05 UTC 2019
commit 1b79a12ecc1b918c379c29b58954d2680672e201
Author: Nicolas Vigier <boklm at torproject.org>
Date: Wed Apr 25 15:10:30 2018 +0200
Bug 25876: Generate source tarballs during build
We now generate source tarballs for firefox, torbutton and tor-launcher
during stable, alpha and nightly builds. We don't generate them with
|make testbuild|, but they can be generated with |make testbuild-src|.
---
Makefile | 15 +++++++++++++++
README.MAKEFILE | 11 ++++++++---
projects/firefox/config | 12 ++++++++++++
projects/release/build | 6 ++++++
projects/release/config | 32 ++++++++++++++++++++++++++++++++
projects/tor-launcher/config | 8 ++++++++
projects/torbutton/config | 8 ++++++++
rbm.conf | 9 +++++++++
8 files changed, 98 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index d419422..285b49d 100644
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,9 @@ release-windows-x86_64: submodule-update
release-osx-x86_64: submodule-update
$(rbm) build release --target release --target torbrowser-osx-x86_64
+release-src: submodule-update
+ $(rbm) build release --target release --target torbrowser-src
+
alpha: submodule-update
$(rbm) build release --target alpha --target torbrowser-all
@@ -56,6 +59,9 @@ alpha-windows-x86_64: submodule-update
alpha-osx-x86_64: submodule-update
$(rbm) build release --target alpha --target torbrowser-osx-x86_64
+alpha-src: submodule-update
+ $(rbm) build release --target alpha --target torbrowser-src
+
nightly: submodule-update
$(rbm) build release --target nightly --target torbrowser-all
@@ -83,6 +89,9 @@ nightly-windows-x86_64: submodule-update
nightly-osx-x86_64: submodule-update
$(rbm) build release --target nightly --target torbrowser-osx-x86_64
+nightly-src: submodule-update
+ $(rbm) build release --target nightly --target torbrowser-src
+
alpha_nightly: submodule-update
$(rbm) build release --target alpha_nightly --target torbrowser-all
@@ -107,6 +116,9 @@ alpha_nightly-windows-x86_64: submodule-update
alpha_nightly-osx-x86_64: submodule-update
$(rbm) build release --target alpha_nightly --target torbrowser-osx-x86_64
+alpha_nightly-src: submodule-update
+ $(rbm) build release --target alpha_nightly --target torbrowser-src
+
testbuild: submodule-update
$(rbm) build release --target testbuild --target torbrowser-all
@@ -134,6 +146,9 @@ testbuild-windows-i686: submodule-update
testbuild-osx-x86_64: submodule-update
$(rbm) build release --target testbuild --target torbrowser-osx-x86_64
+testbuild-src: submodule-update
+ $(rbm) build release --target testbuild --target torbrowser-src-testbuild
+
signtag-release: submodule-update
$(rbm) build release --step signtag --target release
diff --git a/README.MAKEFILE b/README.MAKEFILE
index 1514780..7351c5f 100644
--- a/README.MAKEFILE
+++ b/README.MAKEFILE
@@ -46,14 +46,19 @@ The same as alpha_nightly, for the selected platform only.
testbuild
---------
Build a Tor Browser test build. To make the build faster, only the en-US
-locale is created, without mar files. By default it is based on the
-alpha channel, but you can change that by editing rbm.local.conf.
-The resulting build can be found in directory testbuild.
+locale is created, without mar files, and without the source tarballs.
+By default it is based on the alpha channel, but you can change that by
+editing rbm.local.conf. The resulting build can be found in directory
+testbuild.
{release,alpha,nightly,testbuild}-linux-x86_64-debug
----------------------------------------------------
Create a debug build for Linux x86_64 with debug features such as ASan.
+{release,alpha,nightly,testbuild}-src
+-------------------------------------
+Create source tarballs for firefox, torbutton and tor-launcher.
+
fetch
-----
Fetch new commits from all components. This is useful when you want to
diff --git a/projects/firefox/config b/projects/firefox/config
index 4d68969..2f40fe2 100644
--- a/projects/firefox/config
+++ b/projects/firefox/config
@@ -28,6 +28,18 @@ var:
# used by projects/firefox-locale-bundle
l10n-changesets.json: '[% exec("cat mobile/locales/l10n-changesets.json") %]'
+steps:
+ src-tarballs:
+ filename: 'src-[% project %]-[% c("version") %].tar.xz'
+ version: '[% c("git_hash") %]'
+ input_files: []
+ var:
+ container:
+ use_container: 0
+ targets:
+ nightly:
+ version: '[% c("abbrev") %]'
+
targets:
release:
var:
diff --git a/projects/release/build b/projects/release/build
index ca7b26d..af9d673 100644
--- a/projects/release/build
+++ b/projects/release/build
@@ -27,6 +27,12 @@ mkdir -p "$destdir"
[% IF c("var/torbrowser-linux-x86_64") -%]
mv [% c('input_files_by_name/linux-x86_64') %]/* "$destdir"/
[% END -%]
+[% IF c("var/torbrowser-src") -%]
+ mv [% c('input_files_by_name/src-firefox') %] \
+ [% c('input_files_by_name/src-torbutton') %] \
+ [% c('input_files_by_name/src-tor-launcher') %] \
+ "$destdir"/
+[% END -%]
cd "$destdir"
cat > .htaccess <<EOF
RewriteEngine On
diff --git a/projects/release/config b/projects/release/config
index 1a742ac..52a416a 100644
--- a/projects/release/config
+++ b/projects/release/config
@@ -16,6 +16,7 @@ targets:
- torbrowser-osx-x86_64
- torbrowser-android-armv7
- torbrowser-android-x86
+ - torbrowser-src
torbrowser-android-armv7:
var:
torbrowser-android-armv7: 1
@@ -41,6 +42,12 @@ targets:
torbrowser-osx-x86_64:
var:
torbrowser-osx-x86_64: 1
+ torbrowser-src:
+ var:
+ torbrowser-src: '[% ! c("var/testbuild") %]'
+ torbrowser-src-testbuild:
+ var:
+ torbrowser-src: 1
notarget:
- release
@@ -74,6 +81,7 @@ targets:
testbuild:
output_dir: 'testbuild'
var:
+ testbuild: 1
build_target: torbrowser-testbuild
publish_dir: ''
@@ -153,6 +161,30 @@ input_files:
- torbrowser-windows-x86_64
- expert-bundle
+ - name: src-firefox
+ project: firefox
+ enable: '[% c("var/torbrowser-src") %]'
+ pkg_type: src-tarballs
+ target:
+ - '[% c("var/build_target") %]'
+ - torbrowser-src
+
+ - name: src-torbutton
+ project: torbutton
+ enable: '[% c("var/torbrowser-src") %]'
+ pkg_type: src-tarballs
+ target:
+ - '[% c("var/build_target") %]'
+ - torbrowser-src
+
+ - name: src-tor-launcher
+ project: tor-launcher
+ enable: '[% c("var/torbrowser-src") %]'
+ pkg_type: src-tarballs
+ target:
+ - '[% c("var/build_target") %]'
+ - torbrowser-src
+
steps:
signtag:
build_log: '-'
diff --git a/projects/tor-launcher/config b/projects/tor-launcher/config
index 4f2d2b7..8087727 100644
--- a/projects/tor-launcher/config
+++ b/projects/tor-launcher/config
@@ -11,6 +11,14 @@ var:
input_files:
- project: container-image
+steps:
+ src-tarballs:
+ filename: 'src-[% project %]-[% c("version") %].tar.xz'
+ input_files: []
+ var:
+ container:
+ use_container: 0
+
targets:
nightly:
version: '[% c("abbrev") %]'
diff --git a/projects/torbutton/config b/projects/torbutton/config
index 5d42fc5..369d7e4 100644
--- a/projects/torbutton/config
+++ b/projects/torbutton/config
@@ -11,6 +11,14 @@ var:
input_files:
- project: container-image
+steps:
+ src-tarballs:
+ filename: 'src-[% project %]-[% c("version") %].tar.xz'
+ input_files: []
+ var:
+ container:
+ use_container: 0
+
targets:
nightly:
version: '[% c("abbrev") %]'
diff --git a/rbm.conf b/rbm.conf
index 1b82e60..df31741 100644
--- a/rbm.conf
+++ b/rbm.conf
@@ -7,6 +7,15 @@ build_log: '[% GET ENV.RBM_LOGS_DIR ? ENV.RBM_LOGS_DIR : "logs" %]/[% project %]
pkg_type: build
+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") %]'
+
# buildconf contains build options that the user can change in rbm.local.conf
# When adding a new option to buildconf, a default value should be defined
# in var/build_id, so that changing this option does not affect the build_id.
More information about the tbb-commits
mailing list