Bug 1314460 - Update mp4parse import script for v0.6.0. r=kinetik
authorRalph Giles <giles@mozilla.com>
Tue, 01 Nov 2016 15:54:48 -0700
changeset 347207 9a8bca7c8ba594b9718748ca24d02bcea6d20140
parent 347206 775eb155363c1ea8df0de00a3b4b2605320c4a4e
child 347208 be0732f62787269a087c03b3004e5093c6b38a2e
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs1314460
milestone52.0a1
Bug 1314460 - Update mp4parse import script for v0.6.0. r=kinetik Update the import script to reference the latest published release. Add a cargo-update step to the script. Without this the gecko build will fail if the declared crate versions change from what is recorded in the in-tree Cargo.lock files. Also make it fail on first error. MozReview-Commit-ID: 6IDK6jdkSm1
media/libstagefright/binding/mp4parse-cargo.patch
media/libstagefright/binding/update-rust.sh
--- a/media/libstagefright/binding/mp4parse-cargo.patch
+++ b/media/libstagefright/binding/mp4parse-cargo.patch
@@ -1,28 +1,8 @@
-diff --git a/media/libstagefright/binding/mp4parse_capi/Cargo.toml b/media/libstagefright/binding/mp4parse_capi/Cargo.toml
-index 5092cd7..ecbc8c0 100644
---- a/media/libstagefright/binding/mp4parse_capi/Cargo.toml
-+++ b/media/libstagefright/binding/mp4parse_capi/Cargo.toml
-@@ -17,15 +17,7 @@ exclude = [
-   "*.mp4",
- ]
- 
--build = "build.rs"
--
- [dependencies]
- "mp4parse" = {version = "0.5.1", path = "../mp4parse"}
- 
--[build-dependencies]
--rusty-cheddar = "0.3.2"
--
--[features]
--fuzz = ["mp4parse/fuzz"]
--
- # Somewhat heavy-handed, but we want at least -Z force-overflow-checks=on.
 diff --git a/media/libstagefright/binding/mp4parse/Cargo.toml b/media/libstagefright/binding/mp4parse/Cargo.toml
 index ff9422c..814c4c6 100644
 --- a/media/libstagefright/binding/mp4parse/Cargo.toml
 +++ b/media/libstagefright/binding/mp4parse/Cargo.toml
 @@ -18,17 +18,11 @@ exclude = [
  ]
  
  [dependencies]
@@ -36,8 +16,30 @@ index ff9422c..814c4c6 100644
  test-assembler = "0.1.2"
  
 -[features]
 -fuzz = ["afl", "afl-plugin", "abort_on_panic"]
 -
  # Somewhat heavy-handed, but we want at least -Z force-overflow-checks=on.
  [profile.release]
  debug-assertions = true
+diff --git a/media/libstagefright/binding/mp4parse_capi/Cargo.toml b/media/libstagefright/binding/mp4parse_capi/Cargo.toml
+index aeeebc65..5c0836a 100644
+--- a/media/libstagefright/binding/mp4parse_capi/Cargo.toml
++++ b/media/libstagefright/binding/mp4parse_capi/Cargo.toml
+@@ -18,17 +18,9 @@ exclude = [
+   "*.mp4",
+ ]
+ 
+-build = "build.rs"
+-
+ [dependencies]
+ "mp4parse" = {version = "0.6.0", path = "../mp4parse"}
+ 
+-[build-dependencies]
+-rusty-cheddar = "0.3.2"
+-
+-[features]
+-fuzz = ["mp4parse/fuzz"]
+-
+ # Somewhat heavy-handed, but we want at least -Z force-overflow-checks=on.
+ [profile.release]
+ debug-assertions = true
--- a/media/libstagefright/binding/update-rust.sh
+++ b/media/libstagefright/binding/update-rust.sh
@@ -1,13 +1,13 @@
-#!/bin/sh
+#!/bin/sh -e
 # Script to update mp4parse-rust sources to latest upstream
 
 # Default version.
-VER=v0.5.1
+VER=v0.6.0
 
 # Accept version or commit from the command line.
 if test -n "$1"; then
   VER=$1
 fi
 
 echo "Fetching sources..."
 rm -rf _upstream
@@ -34,17 +34,23 @@ cp _upstream/mp4parse/mp4parse/tests/*.r
 cp _upstream/mp4parse/mp4parse/tests/*.mp4 mp4parse/tests/
 rm -rf mp4parse_capi
 mkdir -p mp4parse_capi/src
 cp _upstream/mp4parse/mp4parse_capi/Cargo.toml mp4parse_capi/
 cp _upstream/mp4parse/mp4parse_capi/build.rs mp4parse_capi/
 cp _upstream/mp4parse/mp4parse_capi/include/mp4parse.h include/
 cp _upstream/mp4parse/mp4parse_capi/src/*.rs mp4parse_capi/src/
 
-# TODO: update vendored dependencies in $topsrcdir/third_party/rust
-
 echo "Applying patches..."
 patch -p4 < mp4parse-cargo.patch
 
 echo "Cleaning up..."
 rm -rf _upstream
 
+echo "Updating gecko Cargo.lock..."
+pushd ../../../toolkit/library/rust/
+cargo update --package mp4parse_capi
+popd
+pushd ../../../toolkit/library/gtest/rust/
+cargo update --package mp4parse_capi
+popd
+
 echo "Updated to ${VER}."