summaryrefslogtreecommitdiffstats
path: root/dom/media/webrtc/third_party_build
diff options
context:
space:
mode:
Diffstat (limited to 'dom/media/webrtc/third_party_build')
-rw-r--r--dom/media/webrtc/third_party_build/default_config_env20
-rw-r--r--dom/media/webrtc/third_party_build/elm_rebase.sh25
-rw-r--r--dom/media/webrtc/third_party_build/fetch_github_repo.py11
-rw-r--r--dom/media/webrtc/third_party_build/loop-ff.sh6
-rw-r--r--dom/media/webrtc/third_party_build/prep_repo.sh48
-rw-r--r--dom/media/webrtc/third_party_build/verify_vendoring.sh29
6 files changed, 96 insertions, 43 deletions
diff --git a/dom/media/webrtc/third_party_build/default_config_env b/dom/media/webrtc/third_party_build/default_config_env
index be3c5ba7c1..0fef4d3192 100644
--- a/dom/media/webrtc/third_party_build/default_config_env
+++ b/dom/media/webrtc/third_party_build/default_config_env
@@ -5,41 +5,41 @@
export MOZ_LIBWEBRTC_SRC=$STATE_DIR/moz-libwebrtc
# The previous fast-forward bug number is used for some error messaging.
-export MOZ_PRIOR_FASTFORWARD_BUG="1876843"
+export MOZ_PRIOR_FASTFORWARD_BUG="1883116"
# Fast-forwarding each Chromium version of libwebrtc should be done
# under a separate bugzilla bug. This bug number is used when crafting
# the commit summary as each upstream commit is vendored into the
# mercurial repository. The bug used for the v106 fast-forward was
# 1800920.
-export MOZ_FASTFORWARD_BUG="1883116"
+export MOZ_FASTFORWARD_BUG="1888181"
# MOZ_NEXT_LIBWEBRTC_MILESTONE and MOZ_NEXT_FIREFOX_REL_TARGET are
# not used during fast-forward processing, but facilitate generating this
# default config. To generate an default config for the next update, run
# bash dom/media/webrtc/third_party_build/update_default_config_env.sh
-export MOZ_NEXT_LIBWEBRTC_MILESTONE=122
-export MOZ_NEXT_FIREFOX_REL_TARGET=126
+export MOZ_NEXT_LIBWEBRTC_MILESTONE=123
+export MOZ_NEXT_FIREFOX_REL_TARGET=127
# For Chromium release branches, see:
# https://chromiumdash.appspot.com/branches
-# Chromium's v121 release branch was 6167. This is used to pre-stack
+# Chromium's v122 release branch was 6261. This is used to pre-stack
# the previous release branch's commits onto the appropriate base commit
# (the first common commit between trunk and the release branch).
-export MOZ_PRIOR_UPSTREAM_BRANCH_HEAD_NUM="6167"
+export MOZ_PRIOR_UPSTREAM_BRANCH_HEAD_NUM="6261"
-# New target release branch for v122 is branch-heads/6261. This is used
+# New target release branch for v123 is branch-heads/6312. This is used
# to calculate the next upstream commit.
-export MOZ_TARGET_UPSTREAM_BRANCH_HEAD="branch-heads/6261"
+export MOZ_TARGET_UPSTREAM_BRANCH_HEAD="branch-heads/6312"
# For local development 'mozpatches' is fine for a branch name, but when
# pushing the patch stack to github, it should be named something like
-# 'moz-mods-chr122-for-rel126'.
+# 'moz-mods-chr123-for-rel127'.
export MOZ_LIBWEBRTC_BRANCH="mozpatches"
# After elm has been merged to mozilla-central, the patch stack in
# moz-libwebrtc should be pushed to github. The script
# push_official_branch.sh uses this branch name when pushing to the
# public repo.
-export MOZ_LIBWEBRTC_OFFICIAL_BRANCH="moz-mods-chr122-for-rel126"
+export MOZ_LIBWEBRTC_OFFICIAL_BRANCH="moz-mods-chr123-for-rel127"
diff --git a/dom/media/webrtc/third_party_build/elm_rebase.sh b/dom/media/webrtc/third_party_build/elm_rebase.sh
index 0dbf93d3ce..734fcacc40 100644
--- a/dom/media/webrtc/third_party_build/elm_rebase.sh
+++ b/dom/media/webrtc/third_party_build/elm_rebase.sh
@@ -54,15 +54,32 @@ be as simple as running the following commands:
COMMIT_LIST_FILE=$TMP_DIR/rebase-commit-list.txt
export HGPLAIN=1
+if [ "x$MOZ_TOP_FF" = "x" ]; then
+ MOZ_TOP_FF=""
+fi
+if [ "x$MOZ_BOTTOM_FF" = "x" ]; then
+ MOZ_BOTTOM_FF=""
+fi
+if [ "x$STOP_FOR_REORDER" = "x" ]; then
+ STOP_FOR_REORDER=""
+fi
+
# After this point:
# * eE: All commands should succeed.
+# * u: All variables should be defined before use.
# * o pipefail: All stages of all pipes should succeed.
-set -eEo pipefail
+set -eEuo pipefail
if [ -f $STATE_DIR/rebase_resume_state ]; then
source $STATE_DIR/rebase_resume_state
else
+ # on first run, we want to verify sanity of the patch-stack so
+ # ending guidance is appropriate regarding changes in
+ # third_party/libwebrtc between the old central we're currently
+ # based on and the new central we're rebasing onto.
+ bash dom/media/webrtc/third_party_build/verify_vendoring.sh
+
if [ "x" == "x$MOZ_TOP_FF" ]; then
MOZ_TOP_FF=`hg log -r . -T"{node|short}"`
@@ -119,12 +136,6 @@ That command looks like:
fi
ERROR_HELP=""
- # After this point:
- # * eE: All commands should succeed.
- # * u: All variables should be defined before use.
- # * o pipefail: All stages of all pipes should succeed.
- set -eEuo pipefail
-
MOZ_NEW_CENTRAL=`hg log -r central -T"{node|short}"`
echo "bottom of fast-foward tree is $MOZ_BOTTOM_FF"
diff --git a/dom/media/webrtc/third_party_build/fetch_github_repo.py b/dom/media/webrtc/third_party_build/fetch_github_repo.py
index 8caa55d5c5..1031eb528b 100644
--- a/dom/media/webrtc/third_party_build/fetch_github_repo.py
+++ b/dom/media/webrtc/third_party_build/fetch_github_repo.py
@@ -67,12 +67,16 @@ def fetch_repo(github_path, clone_protocol, force_fetch, tar_path):
"git remote add upstream https://webrtc.googlesource.com/src", github_path
)
run_git("git fetch upstream", github_path)
- run_git("git merge upstream/master", github_path)
else:
print(
"Upstream remote (https://webrtc.googlesource.com/src) already configured"
)
+ # for sanity, ensure we're on master
+ run_git("git checkout master", github_path)
+ # make sure we successfully fetched upstream
+ run_git("git merge upstream/master", github_path)
+
# setup upstream branch-heads
stdout_lines = run_git(
"git config --local --get-all remote.upstream.fetch", github_path
@@ -87,9 +91,12 @@ def fetch_repo(github_path, clone_protocol, force_fetch, tar_path):
else:
print("Upstream remote branch-heads already configured")
+ # verify that a (quite old) branch-head exists
+ run_git("git show branch-heads/5059", github_path)
+
# prevent changing line endings when moving things out of the git repo
# (and into hg for instance)
- run_git("git config --local core.autocrlf false")
+ run_git("git config --local core.autocrlf false", github_path)
# do a sanity fetch in case this was not a freshly cloned copy of the
# repo, meaning it may not have all the mozilla branches present.
diff --git a/dom/media/webrtc/third_party_build/loop-ff.sh b/dom/media/webrtc/third_party_build/loop-ff.sh
index 73ad22822c..9836a8e687 100644
--- a/dom/media/webrtc/third_party_build/loop-ff.sh
+++ b/dom/media/webrtc/third_party_build/loop-ff.sh
@@ -99,9 +99,9 @@ To verify vendoring, run:
When verify_vendoring.sh is successful, please run the following command
in bash:
- (source $SCRIPT_DIR/use_config_env.sh ;
- ./mach python $SCRIPT_DIR/save_patch_stack.py \
- --repo-path $MOZ_LIBWEBRTC_SRC \
+ (source $SCRIPT_DIR/use_config_env.sh ; \\
+ ./mach python $SCRIPT_DIR/save_patch_stack.py \\
+ --repo-path $MOZ_LIBWEBRTC_SRC \\
--target-branch-head $MOZ_TARGET_UPSTREAM_BRANCH_HEAD )
You may resume running this script with the following command:
diff --git a/dom/media/webrtc/third_party_build/prep_repo.sh b/dom/media/webrtc/third_party_build/prep_repo.sh
index 8cd9ff6816..b1a04748b7 100644
--- a/dom/media/webrtc/third_party_build/prep_repo.sh
+++ b/dom/media/webrtc/third_party_build/prep_repo.sh
@@ -13,9 +13,30 @@ trap 'show_error_msg $LINENO' ERR
source dom/media/webrtc/third_party_build/use_config_env.sh
export HGPLAIN=1
+if [ "x$ALLOW_RERUN" = "x" ]; then
+ ALLOW_RERUN="0"
+fi
+
echo "MOZ_LIBWEBRTC_SRC: $MOZ_LIBWEBRTC_SRC"
echo "MOZ_LIBWEBRTC_BRANCH: $MOZ_LIBWEBRTC_BRANCH"
echo "MOZ_FASTFORWARD_BUG: $MOZ_FASTFORWARD_BUG"
+echo "ALLOW_RERUN: $ALLOW_RERUN"
+
+ERROR_HELP=$"
+A copy of moz-libwebrtc already exists at $MOZ_LIBWEBRTC_SRC
+While this script is not technically idempotent, it will try.
+However, the safest way forward is to start fresh by running:
+ rm -rf $STATE_DIR && \\
+ bash $0
+
+If you are sure you want to reuse the existing directory, run:
+ ALLOW_RERUN=1 bash $0
+"
+if [ -d $MOZ_LIBWEBRTC_SRC ] && [ "x$ALLOW_RERUN" != "x1" ]; then
+ echo "$ERROR_HELP"
+ exit 1
+fi
+ERROR_HELP=""
# After this point:
# * eE: All commands should succeed.
@@ -66,8 +87,25 @@ rm -f *.patch
# create a new work branch and "export" a new patch stack to rebase
# find the common commit between our upstream release branch and trunk
-CHERRY_PICK_BASE=`git merge-base branch-heads/$MOZ_PRIOR_UPSTREAM_BRANCH_HEAD_NUM master`
-echo "common commit: $CHERRY_PICK_BASE"
+PREVIOUS_RELEASE_BRANCH_BASE=`git merge-base branch-heads/$MOZ_PRIOR_UPSTREAM_BRANCH_HEAD_NUM master`
+echo "PREVIOUS_RELEASE_BRANCH_BASE: $PREVIOUS_RELEASE_BRANCH_BASE"
+
+NEXT_RELEASE_BRANCH_BASE=`git merge-base $MOZ_TARGET_UPSTREAM_BRANCH_HEAD master`
+echo "NEXT_RELEASE_BRANCH_BASE: $NEXT_RELEASE_BRANCH_BASE"
+
+ERROR_HELP=$"
+The previous release branch base ($PREVIOUS_RELEASE_BRANCH_BASE)
+and the next release branch base ($NEXT_RELEASE_BRANCH_BASE) are the
+same and should not be. This indicates a problem in the git repo at
+$MOZ_LIBWEBRTC_SRC.
+At the least it likely means that 'master' is older than the two
+release branches. Investigation is necessary.
+"
+if [ "x$PREVIOUS_RELEASE_BRANCH_BASE" == "x$NEXT_RELEASE_BRANCH_BASE" ]; then
+ echo "$ERROR_HELP"
+ exit 1
+fi
+ERROR_HELP=""
# find the last upstream commit used by the previous update, so we don't
# accidentally grab release branch commits that were added after we started
@@ -85,9 +123,9 @@ commands will allow the process to continue:
git checkout $MOZ_LIBWEBRTC_BRANCH && \\
git checkout -b $MOZ_LIBWEBRTC_BRANCH-old && \\
git branch -D $MOZ_LIBWEBRTC_BRANCH ) && \\
- bash $0
+ ALLOW_RERUN=1 bash $0
"
-git branch $MOZ_LIBWEBRTC_BRANCH $CHERRY_PICK_BASE
+git branch $MOZ_LIBWEBRTC_BRANCH $PREVIOUS_RELEASE_BRANCH_BASE
ERROR_HELP=""
git checkout $MOZ_LIBWEBRTC_BRANCH
@@ -95,7 +133,7 @@ git checkout $MOZ_LIBWEBRTC_BRANCH
rm -f $TMP_DIR/*.patch $TMP_DIR/*.patch.bak
# grab the patches for all the commits in chrome's release branch for libwebrtc
-git format-patch -o $TMP_DIR -k $CHERRY_PICK_BASE..$LAST_UPSTREAM_COMMIT_SHA
+git format-patch -o $TMP_DIR -k $PREVIOUS_RELEASE_BRANCH_BASE..$LAST_UPSTREAM_COMMIT_SHA
# tweak the release branch commit summaries to show they were cherry picked
sed -i.bak -e "/^Subject: / s/^Subject: /Subject: (cherry-pick-branch-heads\/$MOZ_PRIOR_UPSTREAM_BRANCH_HEAD_NUM) /" $TMP_DIR/*.patch
git am $TMP_DIR/*.patch # applies to branch mozpatches
diff --git a/dom/media/webrtc/third_party_build/verify_vendoring.sh b/dom/media/webrtc/third_party_build/verify_vendoring.sh
index 008ab0d5db..6152e6d003 100644
--- a/dom/media/webrtc/third_party_build/verify_vendoring.sh
+++ b/dom/media/webrtc/third_party_build/verify_vendoring.sh
@@ -13,6 +13,12 @@ trap 'show_error_msg $LINENO' ERR
source dom/media/webrtc/third_party_build/use_config_env.sh
export HGPLAIN=1
+# After this point:
+# * eE: All commands should succeed.
+# * u: All variables should be defined before use.
+# * o pipefail: All stages of all pipes should succeed.
+set -eEuo pipefail
+
echo "MOZ_LIBWEBRTC_SRC: $MOZ_LIBWEBRTC_SRC"
echo "MOZ_LIBWEBRTC_BRANCH: $MOZ_LIBWEBRTC_BRANCH"
echo "MOZ_FASTFORWARD_BUG: $MOZ_FASTFORWARD_BUG"
@@ -30,27 +36,18 @@ LAST_PATCHSTACK_UPDATE_COMMIT_SHA=`echo $LAST_PATCHSTACK_UPDATE_COMMIT \
echo "LAST_PATCHSTACK_UPDATE_COMMIT_SHA: $LAST_PATCHSTACK_UPDATE_COMMIT_SHA"
# grab the oldest, non "Vendor from libwebrtc" line
-OLDEST_CANDIDATE_COMMIT=`hg log --template "{node|short} {desc|firstline}\n" \
- -r $LAST_PATCHSTACK_UPDATE_COMMIT_SHA::. \
- | grep -v "Vendor libwebrtc from" | head -1`
-echo "OLDEST_CANDIDATE_COMMIT: $OLDEST_CANDIDATE_COMMIT"
-
-OLDEST_CANDIDATE_SHA=`echo $OLDEST_CANDIDATE_COMMIT \
- | awk '{ print $1; }'`
-echo "OLDEST_CANDIDATE_SHA: $OLDEST_CANDIDATE_SHA"
+CANDIDATE_COMMITS=`hg log --template "{node|short} {desc|firstline}\n" \
+ -r "children($LAST_PATCHSTACK_UPDATE_COMMIT_SHA)::. - desc('re:(Vendor libwebrtc)')" \
+ --include "third_party/libwebrtc/" | awk 'BEGIN { ORS=" " }; { print $1; }'`
+echo "CANDIDATE_COMMITS:"
+echo "$CANDIDATE_COMMITS"
EXTRACT_COMMIT_RANGE="{start-commit-sha}::."
-if [ "x$CURRENT_SHA" != "x$OLDEST_CANDIDATE_SHA" ]; then
- EXTRACT_COMMIT_RANGE="$OLDEST_CANDIDATE_SHA::."
+if [ "x$CANDIDATE_COMMITS" != "x" ]; then
+ EXTRACT_COMMIT_RANGE="$CANDIDATE_COMMITS"
echo "EXTRACT_COMMIT_RANGE: $EXTRACT_COMMIT_RANGE"
fi
-# After this point:
-# * eE: All commands should succeed.
-# * u: All variables should be defined before use.
-# * o pipefail: All stages of all pipes should succeed.
-set -eEuo pipefail
-
./mach python $SCRIPT_DIR/vendor-libwebrtc.py \
--from-local $MOZ_LIBWEBRTC_SRC \
--commit $MOZ_LIBWEBRTC_BRANCH \